Auto-Reference Cheat Sheet

This document provides a quick overview of the available functionality. Not all types, attributes or settings are included here. Refer to the documentation for more comprehensive information.

Primary Attributes

Add one of these to a serializable field to retrieve references:

  • Get
  • GetInChildren
  • GetInParent
  • GetInSiblings
  • FindInScene
  • FindInAssets
  • FindInParent

See more

Filters

Add one more of these to filter references:

  • ExactType
  • TypeConstraint
  • Contains
  • ContainsInChildren
  • ContainsInParent

  • IgnoreSelf

  • IgnoreInactive
  • IgnoreDisabled

  • Layer

  • Tag
  • Name
  • FilterBy

  • IgnoreNested

  • Unique

  • SortByID

  • SortByDistance
  • SortByName
  • Sort
  • SortBy

  • Reverse

  • Take

  • TakeLast
  • TakeWhile

See more

Note: Filters are not applied in the order they're given in the code, due to how C# works. They're applied roughly in the order given above.

Please refer to this section in the documentation for more information.

Useful utilities

  • Various sync operations: Tools ▸ Auto-Reference
  • Open Auto-Reference Window: Tools ▸ Auto-Reference ▸ Auto-ReferenceWindow
  • Access Project Settings ▸ Auto-Reference to control automatic syncing.
  • Access Preferences ▸ Auto-Reference to control appearance and logging settings.

Other Useful Types

  • AutoReferenceEditor
    Inherit this for custom editors. See more
  • OnAfterSync
    Provide a method name for an after-sync callback. See more
  • ISyncObserver
    Implement this interface to receive sync notifications on custom non-Unity classes or structs. See more

Useful methods

  • AutoReference.SyncData<T>(MonoBehaviour target, ...):
    Various methods to sync data on ISyncObserver classes, structs, or array/lists. See more
  • AutoReference.Sync(MonoBehaviour or GameObject):
    Sync on demand (does not work during playing). See more