Official documentation & support

Safer Unity script replacements.

Script Contract Guard compares a known-good C# contract with the current source and highlights changes that may break callers or serialized Unity data.

Get started

Import the package under Assets/ScriptContractGuard. No project setting, runtime component, external service, or additional Asset Store package is required.

Open the tool

After Unity compiles, choose Tools → Script Contract Guard.

Verify installation

Run Built-In Self-Test. It uses embedded source and does not modify project files.

Capture a safe baseline

Select a C# script while the project is known-good, then choose Capture Safe Baseline.

Analyze after editing

Choose Analyze Current Script to review contract changes, serialized fields, and possible callers.

What it checks

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.

API contract changes

Removed members, changed method signatures, changed member types, and removed Unity message methods.

Serialized-field risks

Removed private [SerializeField] fields and likely same-type renames that may need [FormerlySerializedAs].

Reference candidates

Type-aware source matches under Assets/, reported with file paths and line numbers for review.

Limits & safe use

Script Contract Guard is a conservative source scanner, not a compiler, runtime test, or formal proof that behavior is unchanged.

Review manually when using

  • Generated source or complex preprocessor branches
  • Partial types split across files
  • Reflection-only or dynamic access
  • Uncommon or deliberately obfuscated syntax
  • Behavior changes that preserve signatures

Recommended workflow

Keep 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.

Private by design

The package operates locally inside the Unity Editor. It does not contact a network service or send project information anywhere.

No telemetry

No analytics, tracking, account, API key, or external service is used by the package.

Local baselines

Captured contracts stay under Library/ScriptContractGuard in the local project.

User-controlled export

AI Context Packs are written only to a location the user explicitly selects. They are never uploaded automatically.

Need support?

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.

Review setup