• Manual
  • API Documentation
  • Bayat.Core
  • SceneReferenceResolver

    Show / Hide Table of Contents
    • Bayat
      • UnityThread
    • Bayat.Core
      • AddReferenceWindow
      • AddReferenceWindow.Dependency
      • AssetReferenceResolver
      • AssetReferenceResolverEditor
      • BayatEditorStyles
      • CoreAssetPostProcessor
      • EditorApplicationUtility
      • MaterialPropertiesResolver
      • MaterialPropertiesResolverEditor
      • ReferenceCheckerWindow
      • ReferenceResolverMode
      • RuntimeMaterialProperties
      • RuntimeMaterialProperty
      • RuntimeMaterialPropertyType
      • SceneReferenceResolver
      • SceneReferenceResolverEditor
      • UnityEditorInternalException
    • Bayat.Core.EditorWindows
      • AssetReferenceManagerWindow
      • AssetReferenceManagerWindow.Styles
      • DatabaseMigrationWindow
      • DatabaseMigrationWindow.SceneMigrationStatus
      • DatabaseMigrationWindow.Styles
      • EditorWindowExtensions
      • EditorWindowUtility
      • EditorWindowWrapper
      • SceneReferenceManagerWindow
      • SceneReferenceManagerWindow.Styles
      • WindowClose
      • WrappedEditorWindow
    • Bayat.Core.Profiling
      • ProfiledSegment
      • ProfiledSegmentCollection
      • ProfilingScope
      • ProfilingUtility
    • Bayat.Core.Reflection
      • AssemblyExtensions
      • Codebase
      • RuntimeCodebase
      • TypeExtensions
      • TypeUtility
    • Bayat.Core.Text
      • StringExtensions
      • StringUtility
    • Bayat.Core.Utilities
      • ExceptionExtensions
      • GuidToReferenceDictionary
      • SerializableDictionary<TKey, TVal>
    • Bayat.Json
      • ConstructorHandling
      • CreateObjectConverterWindow
      • CreateObjectConverterWindow.Styles
      • DateFormatHandling
      • DateParseHandling
      • DateTimeZoneHandling
      • DefaultValueHandling
      • FloatFormatHandling
      • FloatParseHandling
      • Formatting
      • GameObjectSerializationHandler
      • GameObjectSerializationManagerTreeView
      • GameObjectSerializationManagerTreeView.Styles
      • GameObjectSerializationManagerWindow
      • GameObjectSerializationManagerWindow.Styles
      • IArrayPool<T>
      • IJsonLineInfo
      • JsonArrayAttribute
      • JsonConstructorAttribute
      • JsonContainerAttribute
      • JsonContainerType
      • JsonConvert
      • JsonConverter
      • JsonConverterAttribute
      • JsonConverterCollection
      • JsonDefaultSettingsWindow
      • JsonDefaultSettingsWindow.Styles
      • JsonDictionaryAttribute
      • JsonException
      • JsonExtensionDataAttribute
      • JsonIgnoreAttribute
      • JsonObjectAttribute
      • JsonPosition
      • JsonPropertyAttribute
      • JsonReader
      • JsonReader.State
      • JsonReaderException
      • JsonRequiredAttribute
      • JsonSerializationException
      • JsonSerializer
      • JsonSerializerSettings
      • JsonSerializerSettingsPreset
      • JsonTextReader
      • JsonTextWriter
      • JsonToken
      • JsonWriter
      • JsonWriter.State
      • JsonWriterException
      • MemberSerialization
      • MetadataPropertyHandling
      • MissingMemberHandling
      • NullValueHandling
      • ObjectCreationHandling
      • PreserveReferencesHandling
      • ReadType
      • ReferenceLoopHandling
      • Required
      • StringEscapeHandling
      • TypeNameHandling
      • WriteState
    • Bayat.Json.Bson
      • BsonArray
      • BsonBinary
      • BsonBinaryType
      • BsonBinaryWriter
      • BsonObject
      • BsonObjectId
      • BsonProperty
      • BsonReader
      • BsonRegex
      • BsonString
      • BsonToken
      • BsonType
      • BsonValue
      • BsonWriter
    • Bayat.Json.Converters
      • AnimatorConverter
      • AudioClipConverter
      • BinaryConverter
      • BoundsConverter
      • BsonObjectIdConverter
      • ColliderConverter
      • ColorConverter
      • CustomCreationConverter<T>
      • DateTimeConverterBase
      • DiscriminatedUnionConverter
      • EntityKeyMemberConverter
      • ExpandoObjectConverter
      • GameObjectConverter
      • HashSetConverter
      • IsoDateTimeConverter
      • JavaScriptDateTimeConverter
      • KeyValuePairConverter
      • MaterialConverter
      • MaterialConverter.JsonSerializedMaterialProperty
      • Matrix4x4Converter
      • MeshConverter
      • MeshConverter.SerializedIndices
      • MeshFilterConverter
      • ObjectJsonConverter
      • QuaternionConverter
      • RectConverter
      • RectTransformConverter
      • RegexConverter
      • RendererConverter
      • ResolutionConverter
      • ShaderConverter
      • SpriteConverter
      • StringEnumConverter
      • Texture2DConverter
      • TransformConverter
      • UnityBehaviourConverter
      • UnityComponentConverter
      • UnityMonoBehaviourConverter
      • UnityObjectConverter
      • UriConverter
      • VectorConverter
      • VersionConverter
      • XmlNodeConverter
    • Bayat.Json.Linq
      • CommentHandling
      • Extensions
      • IJEnumerable<T>
      • JArray
      • JConstructor
      • JContainer
      • JEnumerable<T>
      • JObject
      • JProperty
      • JPropertyDescriptor
      • JPropertyKeyedCollection
      • JRaw
      • JsonLoadSettings
      • JsonMergeSettings
      • JToken
      • JTokenEqualityComparer
      • JTokenReader
      • JTokenType
      • JTokenWriter
      • JValue
      • LineInfoHandling
      • MergeArrayHandling
      • MergeNullValueHandling
    • Bayat.Json.Linq.JsonPath
      • ArrayIndexFilter
      • ArrayMultipleIndexFilter
      • ArraySliceFilter
      • BooleanQueryExpression
      • CompositeExpression
      • FieldFilter
      • FieldMultipleFilter
      • JPath
      • PathFilter
      • QueryExpression
      • QueryFilter
      • QueryOperator
      • ScanFilter
    • Bayat.Json.Serialization
      • CachedAttributeGetter<T>
      • CamelCasePropertyNamesContractResolver
      • DefaultContractResolver
      • DefaultContractResolver.EnumerableDictionaryWrapper<TEnumeratorKey, TEnumeratorValue>
      • DefaultContractResolverState
      • DefaultReferenceResolver
      • DefaultSerializationBinder
      • DefaultSerializationBinder.TypeNameKey
      • DiagnosticsTraceWriter
      • ErrorContext
      • ErrorEventArgs
      • ExpressionValueProvider
      • ExtensionDataGetter
      • ExtensionDataSetter
      • IAttributeProvider
      • IContractResolver
      • IReferenceResolver
      • ITraceWriter
      • IValueProvider
      • JsonArrayContract
      • JsonContainerContract
      • JsonContract
      • JsonContractType
      • JsonDictionaryContract
      • JsonDynamicContract
      • JsonFormatterConverter
      • JsonISerializableContract
      • JsonLinqContract
      • JsonObjectContract
      • JsonPrimitiveContract
      • JsonProperty
      • JsonPropertyCollection
      • JsonSerializerInternalBase
      • JsonSerializerProxy
      • JsonSerializerReader
      • JsonSerializerReader.CreatorPropertyContext
      • JsonSerializerReader.PropertyPresence
      • JsonSerializerWriter
      • JsonStringContract
      • JsonTypeReflector
      • MemoryTraceWriter
      • ObjectConstructor<T>
      • OnErrorAttribute
      • ReflectionAttributeProvider
      • ReflectionValueProvider
      • ResolverContractKey
      • SerializationCallback
      • SerializationErrorCallback
      • TraceJsonReader
      • TraceJsonWriter
    • Bayat.Json.Shims
      • PreserveAttribute
    • Bayat.Json.Utilities
      • Base64Encoder
      • BidirectionalDictionary<TFirst, TSecond>
      • BufferUtils
      • CollectionUtils
      • CollectionWrapper<T>
      • ConvertUtils
      • ConvertUtils.ConvertResult
      • ConvertUtils.TypeConvertKey
      • Creator<T>
      • DateTimeParser
      • DateTimeUtils
      • DictionaryWrapper<TKey, TValue>
      • DynamicProxy<T>
      • DynamicProxyMetaObject<T>
      • DynamicUtils
      • DynamicUtils.BinderWrapper
      • EnumUtils
      • EnumValue<T>
      • ExpressionReflectionDelegateFactory
      • FSharpFunction
      • FSharpUtils
      • ImmutableCollectionsUtils
      • ImmutableCollectionsUtils.ImmutableCollectionTypeInfo
      • IWrappedCollection
      • IWrappedDictionary
      • JavaScriptUtils
      • JsonTokenUtils
      • LateBoundReflectionDelegateFactory
      • MathUtils
      • MethodCall<T, TResult>
      • MiscellaneousUtils
      • NoThrowExpressionVisitor
      • NoThrowGetBinderMember
      • NoThrowSetBinderMember
      • ParseResult
      • ParserTimeZone
      • PrimitiveTypeCode
      • PropertyNameTable
      • ReflectionDelegateFactory
      • ReflectionMember
      • ReflectionObject
      • ReflectionUtils
      • StringBuffer
      • StringReference
      • StringReferenceExtensions
      • StringUtils
      • ThreadSafeStore<TKey, TValue>
      • TypeInformation
      • ValidationUtils
    • Bayat.SaveSystem
      • AutoSave
      • AutoSaveManager
      • AutoSaveManager.LoadEvent
      • AutoSaveManager.SaveEvent
      • AutoSaveManagerWindow
      • AutoSaveManagerWindow.Styles
      • LoadEventArgs
      • LoadIntoEventArgs
      • SaveEventArgs
      • SaveSystemAPI
      • SaveSystemDefaultSettingsWindow
      • SaveSystemDefaultSettingsWindow.Styles
      • SaveSystemEditorResources
      • SaveSystemJsonSerializer
      • SaveSystemManager
      • SaveSystemSettings
      • SaveSystemSettingsPreset
      • WelcomeWindow
      • WelcomeWindow.Styles
    • Bayat.SaveSystem.Security
      • ISaveSystemEncryption
      • SaveSystemCryptoStream
      • SaveSystemSymmetricCryptoStream
      • SaveSystemSymmetricEncryption
    • Bayat.SaveSystem.Storage
      • BuiltInConnectionFactory
      • ConnectionStringFactory
      • FileStorageStream
      • IConnectionFactory
      • IStorage
      • IStorageStream
      • LocalDiskStorage
      • PlayerPrefsStorage
      • PlayerPrefsStorageStream
      • StorageBackup
      • StorageBase
      • StorageClearOperationResult
      • StorageConnectionString
      • StorageCopyOperationResult
      • StorageDeleteOperationResult
      • StorageFactory
      • StorageFullException
      • StorageInvalidIdentifierException
      • StorageItemNotFoundException
      • StorageListOptions
      • StorageMetaData
      • StorageMoveOperationResult
      • StorageOperationResult
      • StorageStream

    Class SceneReferenceResolver

    The scene reference resolver.

    Inheritance
    System.Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    SceneReferenceResolver
    Implements
    UnityEngine.ISerializationCallbackReceiver
    Inherited Members
    UnityEngine.MonoBehaviour.IsInvoking()
    UnityEngine.MonoBehaviour.CancelInvoke()
    UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
    UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
    UnityEngine.MonoBehaviour.CancelInvoke(System.String)
    UnityEngine.MonoBehaviour.IsInvoking(System.String)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
    UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
    UnityEngine.MonoBehaviour.StopCoroutine(System.String)
    UnityEngine.MonoBehaviour.StopAllCoroutines()
    UnityEngine.MonoBehaviour.print(System.Object)
    UnityEngine.MonoBehaviour.useGUILayout
    UnityEngine.MonoBehaviour.runInEditMode
    UnityEngine.Behaviour.enabled
    UnityEngine.Behaviour.isActiveAndEnabled
    UnityEngine.Component.GetComponent(System.Type)
    UnityEngine.Component.GetComponent<T>()
    UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
    UnityEngine.Component.TryGetComponent<T>(T)
    UnityEngine.Component.GetComponent(System.String)
    UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentInChildren(System.Type)
    UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentInChildren<T>()
    UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInChildren(System.Type)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInChildren<T>()
    UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentInParent(System.Type)
    UnityEngine.Component.GetComponentInParent<T>()
    UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInParent(System.Type)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInParent<T>()
    UnityEngine.Component.GetComponents(System.Type)
    UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
    UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponents<T>()
    UnityEngine.Component.CompareTag(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
    UnityEngine.Component.SendMessageUpwards(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, System.Object)
    UnityEngine.Component.SendMessage(System.String)
    UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object)
    UnityEngine.Component.BroadcastMessage(System.String)
    UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.transform
    UnityEngine.Component.gameObject
    UnityEngine.Component.tag
    UnityEngine.Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
    UnityEngine.Object.Destroy(UnityEngine.Object)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
    UnityEngine.Object.FindObjectsOfType(System.Type)
    UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type)
    UnityEngine.Object.ToString()
    UnityEngine.Object.name
    UnityEngine.Object.hideFlags
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Bayat.Core
    Assembly: Bayat.Core.Runtime.dll
    Syntax
    [AddComponentMenu("Bayat/Core/Scene Reference Resolver")]
    [DisallowMultipleComponent]
    public class SceneReferenceResolver : MonoBehaviour, ISerializationCallbackReceiver

    Fields

    | Improve this Doc View Source

    guids

    Declaration
    [HideInInspector]
    [SerializeField]
    protected List<string> guids
    Field Value
    Type Description
    System.Collections.Generic.List<System.String>
    | Improve this Doc View Source

    guidToReference

    Declaration
    [SerializeField]
    protected GuidToReferenceDictionary guidToReference
    Field Value
    Type Description
    GuidToReferenceDictionary
    | Improve this Doc View Source

    invalidGameObjectTags

    Declaration
    [SerializeField]
    protected string[] invalidGameObjectTags
    Field Value
    Type Description
    System.String[]
    | Improve this Doc View Source

    referenceResolvers

    Declaration
    protected static Dictionary<Scene, SceneReferenceResolver> referenceResolvers
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<UnityEngine.SceneManagement.Scene, SceneReferenceResolver>
    | Improve this Doc View Source

    referenceToGuid

    Declaration
    protected ReferenceToGuidDictionary referenceToGuid
    Field Value
    Type Description
    Bayat.Core.Utilities.ReferenceToGuidDictionary
    | Improve this Doc View Source

    sceneDependencies

    Declaration
    [HideInInspector]
    [SerializeField]
    protected List<Object> sceneDependencies
    Field Value
    Type Description
    System.Collections.Generic.List<UnityEngine.Object>

    Properties

    | Improve this Doc View Source

    Current

    Gets the current scene reference resolver.

    Declaration
    public static SceneReferenceResolver Current { get; }
    Property Value
    Type Description
    SceneReferenceResolver
    | Improve this Doc View Source

    Guids

    Gets the GUIDs list.

    Declaration
    [Obsolete("This property will be removed in future releases, use GuidToReference or ReferenceToGuid instead.", false)]
    public virtual List<string> Guids { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.String>
    | Improve this Doc View Source

    GuidToReference

    Declaration
    public virtual GuidToReferenceDictionary GuidToReference { get; set; }
    Property Value
    Type Description
    GuidToReferenceDictionary
    | Improve this Doc View Source

    ReferenceResolvers

    A dictionary of all the available Scene Reference Resolvers based on the Scene they are managing.

    Declaration
    public static Dictionary<Scene, SceneReferenceResolver> ReferenceResolvers { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<UnityEngine.SceneManagement.Scene, SceneReferenceResolver>
    Remarks

    Use GetReferenceResolver(Scene) to get the appropriate reference resolver for a scene, it works on both Editor and Play mode but this property does not.

    | Improve this Doc View Source

    ReferenceToGuid

    Declaration
    public virtual ReferenceToGuidDictionary ReferenceToGuid { get; set; }
    Property Value
    Type Description
    Bayat.Core.Utilities.ReferenceToGuidDictionary
    | Improve this Doc View Source

    SceneDependencies

    Gets the scene dependencies list.

    Declaration
    [Obsolete("This property will be removed in future releases, use GuidToReference or ReferenceToGuid instead.", false)]
    public virtual List<Object> SceneDependencies { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<UnityEngine.Object>

    Methods

    | Improve this Doc View Source

    Add(Object)

    Adds the object to the database by generating a new GUID if it is not already in the database.

    Declaration
    public virtual string Add(Object obj)
    Parameters
    Type Name Description
    UnityEngine.Object obj
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Add(Object, String)

    Adds the object to the database with the given GUID if it is not empty, otherwise generates a new GUID.

    Declaration
    public virtual void Add(Object obj, string guid)
    Parameters
    Type Name Description
    UnityEngine.Object obj
    System.String guid
    | Improve this Doc View Source

    ChangeGuid(String, String)

    Changes the old GUID to the new GUID in the database.

    Declaration
    public virtual void ChangeGuid(string oldGuid, string newGuid)
    Parameters
    Type Name Description
    System.String oldGuid
    System.String newGuid
    | Improve this Doc View Source

    Clear()

    Clears the database.

    Declaration
    public virtual void Clear()
    | Improve this Doc View Source

    Contains(String)

    Checks whether the database contains the given GUID or not.

    Declaration
    public virtual bool Contains(string referenceID)
    Parameters
    Type Name Description
    System.String referenceID
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Contains(Object)

    Checks whether the database contains the given object or not.

    Declaration
    public virtual bool Contains(Object obj)
    Parameters
    Type Name Description
    UnityEngine.Object obj
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    CreateNewInstance()

    Creates a new instance of SceneReferenceResolver in the current scene.

    Declaration
    public static GameObject CreateNewInstance()
    Returns
    Type Description
    UnityEngine.GameObject
    | Improve this Doc View Source

    Get(String)

    Gets the object associated with the given GUID.

    Declaration
    public virtual Object Get(string guid)
    Parameters
    Type Name Description
    System.String guid
    Returns
    Type Description
    UnityEngine.Object
    | Improve this Doc View Source

    Get(Object)

    Gets the given object reference GUID.

    Declaration
    public virtual string Get(Object obj)
    Parameters
    Type Name Description
    UnityEngine.Object obj
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetAllUnityObjects()

    Gets all referenced Unity objects from all the currently available reference resolvers.

    Declaration
    public static List<Object> GetAllUnityObjects()
    Returns
    Type Description
    System.Collections.Generic.List<UnityEngine.Object>

    Returns a List of currently referenced Unity objecs from the available reference resolvers

    Remarks

    It retrieves the referenced Unity objects from the currently open scenes that have a SceneReferenceResolver in them.

    | Improve this Doc View Source

    GetAnyGuidReference(Object)

    Searches through all reference resolvers and gets the referenced unityObject's GUID.

    Declaration
    public static string GetAnyGuidReference(Object unityObject)
    Parameters
    Type Name Description
    UnityEngine.Object unityObject

    The referenced Unity object

    Returns
    Type Description
    System.String

    Returns the referenced unityObject GUID's if available, otherwise null

    | Improve this Doc View Source

    GetAnyUnityObjectReference(String)

    Searches through all reference resolvers and gets the Unity object by the specified guid.

    Declaration
    public static Object GetAnyUnityObjectReference(string guid)
    Parameters
    Type Name Description
    System.String guid

    The referenced Unity object GUID

    Returns
    Type Description
    UnityEngine.Object

    Returns the referenced Unity object if available, otherwise null

    | Improve this Doc View Source

    GetReferenceResolver(Scene)

    Gets the reference resolver for the specified scene.

    Declaration
    public static SceneReferenceResolver GetReferenceResolver(Scene scene)
    Parameters
    Type Name Description
    UnityEngine.SceneManagement.Scene scene

    The scene to look for the reference resolver

    Returns
    Type Description
    SceneReferenceResolver

    Returns the reference resolver in the provided scene if available, otherwise null

    | Improve this Doc View Source

    GetSceneGuidReference(Scene, Object)

    Gets the referenced unityObject GUID from the specified scene's reference resolver if available.

    Declaration
    public static string GetSceneGuidReference(Scene scene, Object unityObject)
    Parameters
    Type Name Description
    UnityEngine.SceneManagement.Scene scene

    The scene to look for the reference resolver

    UnityEngine.Object unityObject

    The referenced Unity object

    Returns
    Type Description
    System.String

    Returns the referenced unityObject GUID's if available, otherwise null

    | Improve this Doc View Source

    GetSceneUnityObjectReference(Scene, String)

    Gets the Unity object from the specified scene's reference resolver if available.

    Declaration
    public static Object GetSceneUnityObjectReference(Scene scene, string guid)
    Parameters
    Type Name Description
    UnityEngine.SceneManagement.Scene scene

    The scene to look for the reference resolver

    System.String guid

    The referenced Unity object GUID

    Returns
    Type Description
    UnityEngine.Object

    Returns the referenced Unity object if available, otherwise null

    | Improve this Doc View Source

    GetUnityObjectScene(Object)

    Gets the Unity object's scene.

    Declaration
    public static Scene? GetUnityObjectScene(Object unityObject)
    Parameters
    Type Name Description
    UnityEngine.Object unityObject

    The Unity object

    Returns
    Type Description
    System.Nullable<UnityEngine.SceneManagement.Scene>

    Returns the Unity object's scene if it is a GameObject or Component, otherwise null

    Remarks

    First checks if the provided Unity object is a GameObject or Component, then uses the GameObject.scene property to retrieve the scene the Unity object is residing at.

    | Improve this Doc View Source

    HasNullValues()

    Returns true if the database has null references, otherwise true.

    Declaration
    public virtual bool HasNullValues()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OnAfterDeserialize()

    Declaration
    public virtual void OnAfterDeserialize()
    | Improve this Doc View Source

    OnBeforeSerialize()

    Declaration
    public virtual void OnBeforeSerialize()
    | Improve this Doc View Source

    OnDisable()

    Declaration
    protected virtual void OnDisable()
    | Improve this Doc View Source

    OnEnable()

    Declaration
    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    protected virtual void OnEnable()
    | Improve this Doc View Source

    Remove(String)

    Removes the GUID and the associated object from the database.

    Declaration
    public virtual void Remove(string referenceID)
    Parameters
    Type Name Description
    System.String referenceID
    | Improve this Doc View Source

    Remove(Object)

    Removes the object and its GUID from the database.

    Declaration
    public virtual void Remove(Object obj)
    Parameters
    Type Name Description
    UnityEngine.Object obj
    | Improve this Doc View Source

    RemoveDuplicateValues()

    Removes the duplicate values.

    Declaration
    public virtual void RemoveDuplicateValues()
    | Improve this Doc View Source

    RemoveNullValues()

    Removes null values and references from the database.

    Declaration
    public virtual void RemoveNullValues()
    | Improve this Doc View Source

    Reset()

    Declaration
    public virtual void Reset()

    Implements

    UnityEngine.ISerializationCallbackReceiver
    • Improve this Doc
    • View Source
    • 0 Comments
    In This Article
    • Fields
      • guids
      • guidToReference
      • invalidGameObjectTags
      • referenceResolvers
      • referenceToGuid
      • sceneDependencies
    • Properties
      • Current
      • Guids
      • GuidToReference
      • ReferenceResolvers
      • ReferenceToGuid
      • SceneDependencies
    • Methods
      • Add(Object)
      • Add(Object, String)
      • ChangeGuid(String, String)
      • Clear()
      • Contains(String)
      • Contains(Object)
      • CreateNewInstance()
      • Get(String)
      • Get(Object)
      • GetAllUnityObjects()
      • GetAnyGuidReference(Object)
      • GetAnyUnityObjectReference(String)
      • GetReferenceResolver(Scene)
      • GetSceneGuidReference(Scene, Object)
      • GetSceneUnityObjectReference(Scene, String)
      • GetUnityObjectScene(Object)
      • HasNullValues()
      • OnAfterDeserialize()
      • OnBeforeSerialize()
      • OnDisable()
      • OnEnable()
      • Remove(String)
      • Remove(Object)
      • RemoveDuplicateValues()
      • RemoveNullValues()
      • Reset()
    • Implements