Version 3.1.1.0

ObjectAddress class

Namespace: Sirenix.OdinValidator.Editor
Assembly: Sirenix.OdinValidator.Editor
public class ObjectAddress : IEquatable<ObjectAddress>
Inheritance
  • System.Object
  • ObjectAddress

Constructors

ObjectAddress(SceneReference)
public ObjectAddress(SceneReference validatedScene)
Parameters
SceneReference validatedScene

ObjectAddress(ObjectAddress.AddressType, String, String, ObjectAddress.SubAssetAddress, ObjectAddress.HierarchyAddress, ObjectAddress.ComponentAddress, String, Type, Boolean)
public ObjectAddress(ObjectAddress.AddressType type, string assetGUID, string assetPath, ObjectAddress.SubAssetAddress subAsset, ObjectAddress.HierarchyAddress hierarchyAddress, ObjectAddress.ComponentAddress component, string niceObjectName, Type objectType, bool isBroken)
Parameters
ObjectAddress.AddressType type

System.String assetGUID

System.String assetPath

ObjectAddress.SubAssetAddress subAsset

ObjectAddress.HierarchyAddress hierarchyAddress

ObjectAddress.ComponentAddress component

System.String niceObjectName

System.Type objectType

System.Boolean isBroken

Fields

AssetPath
public string AssetPath
Component
public ObjectAddress.ComponentAddress Component
Hierarchy
public ObjectAddress.HierarchyAddress Hierarchy
IsBroken
public bool IsBroken
Name
public string Name
ObjectType
public UnitySerializableType ObjectType
SubAsset
public ObjectAddress.SubAssetAddress SubAsset
Type
public ObjectAddress.AddressType Type
Unknown
public static readonly ObjectAddress Unknown

Properties

AssetGUID
public string AssetGUID { get; set; }

Methods

Equals(ObjectAddress)
public bool Equals(ObjectAddress other)
Parameters
ObjectAddress other

Returns
System.Boolean

Equals(Object)
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

GetHashCode()
public override int GetHashCode()
Returns
System.Int32

GetHierarchyAddress(GameObject)
public static ObjectAddress.HierarchyAddress GetHierarchyAddress(GameObject go)
Parameters
UnityEngine.GameObject go

Parse(String)
public static ObjectAddress Parse(string json)
Parameters
System.String json

Returns
ObjectAddress

ToString()
public override string ToString()
Returns
System.String

ToString(Boolean)
public string ToString(bool prettyPrint = false)
Parameters
System.Boolean prettyPrint

Returns
System.String

TryCreateObjectAddress(Object, out ObjectAddress, out String)
public static bool TryCreateObjectAddress(Object obj, out ObjectAddress finalResult, out string errorMessage)
Parameters
UnityEngine.Object obj

ObjectAddress finalResult

System.String errorMessage

Returns
System.Boolean

TryGetObjectReference(Boolean, Boolean, out Object, out String)
public bool TryGetObjectReference(bool openSceneIfNeeded, bool autoSaveIfOpenScene, out Object result, out string errorMessage)
Parameters
System.Boolean openSceneIfNeeded

System.Boolean autoSaveIfOpenScene

UnityEngine.Object result

System.String errorMessage

Returns
System.Boolean

TryGetObjectReference(Boolean, Boolean, out Object, out String, out Object)
public bool TryGetObjectReference(bool openSceneIfNeeded, bool autoSaveIfOpenScene, out Object result, out string errorMessage, out Object closestObject)
Parameters
System.Boolean openSceneIfNeeded

System.Boolean autoSaveIfOpenScene

UnityEngine.Object result

System.String errorMessage

UnityEngine.Object closestObject

Returns
System.Boolean

Operators

Equality(ObjectAddress, ObjectAddress)
public static bool operator ==(ObjectAddress a, ObjectAddress b)
Parameters
ObjectAddress a

ObjectAddress b

Returns
System.Boolean

Inequality(ObjectAddress, ObjectAddress)
public static bool operator !=(ObjectAddress a, ObjectAddress b)
Parameters
ObjectAddress a

ObjectAddress b

Returns
System.Boolean