Skip to content

Properties and Variables

Game Creator property sources and Asset Reference variables let designers pass stable IDs through normal Game Creator workflows while the repository remains responsible for resolving the asset.

Asset References provides property getters for:

  • GameObject
  • AudioClip
  • Material
  • Sprite
  • Texture
  • Texture2D
  • AnimationClip
  • Scene build index

Other Unity asset types may be registered, but the source directs custom types to the runtime API or custom scripts rather than claiming a built-in Game Creator property getter.

Asset References adds an Asset Reference value type to Game Creator 2 local and global name variables.

  1. Create a Local Name Variables component or Global Name Variables asset.
  2. Add a variable with type Asset Reference.
  3. Select an initial Reference ID.
  4. Use Set Local Asset Reference or Set Global Asset Reference at runtime.
  5. Use a variable-backed Asset Reference selector to resolve the current ID.

The variable stores the Reference ID, not the loaded Unity object. Direct and Streamed resolution still goes through the runtime cache.

Use the selector’s Manual ID tab when the ID should come from a literal or a dynamic Game Creator string-property source. The source describes this for custom flows where a variable, Condition, or script determines the ID.

Database-selected IDs remain string-backed so namespace-like IDs and slash segments are preserved. A dynamic Manual ID value is resolved at runtime and cannot be treated as a statically renameable database usage.

AssetReferenceVariables provides helpers for setting, reading, and resolving Asset Reference variables from code. See the full example on C# API.