Open the tool
After Unity compiles, choose Tools → Script Contract Guard.
Official documentation & support
Script Contract Guard compares a known-good C# contract with the current source and highlights changes that may break callers or serialized Unity data.
Import the package under Assets/ScriptContractGuard. No project setting, runtime component, external service, or additional Asset Store package is required.
After Unity compiles, choose Tools → Script Contract Guard.
Run Built-In Self-Test. It uses embedded source and does not modify project files.
Select a C# script while the project is known-good, then choose Capture Safe Baseline.
Choose Analyze Current Script to review contract changes, serialized fields, and possible callers.
The scanner focuses on the parts of a script most likely to affect other C# files or serialized project data during a replacement or refactor.
Removed members, changed method signatures, changed member types, and removed Unity message methods.
Removed private [SerializeField] fields and likely same-type renames that may need [FormerlySerializedAs].
Type-aware source matches under Assets/, reported with file paths and line numbers for review.
Script Contract Guard is a conservative source scanner, not a compiler, runtime test, or formal proof that behavior is unchanged.
dynamic accessKeep the project under version control or maintain a backup. After each refactor, run normal compilation, Play Mode checks, and project tests. A possible reference is a review candidate, not a compiler-confirmed call graph.
The package operates locally inside the Unity Editor. It does not contact a network service or send project information anywhere.
No analytics, tracking, account, API key, or external service is used by the package.
Captured contracts stay under Library/ScriptContractGuard in the local project.
AI Context Packs are written only to a location the user explicitly selects. They are never uploaded automatically.
Use the public support contact shown on the Unity Asset Store publisher profile. Include the Unity version, Script Contract Guard version, reproduction steps, and relevant Console output. Redact private source code before sending it.