Class ObjectRegistry
The ObjectRegistry tracks the original position of objects on the avatar; this is used to be able to identify the source of errors after objects have been moved within the hierarchy.
public sealed class ObjectRegistry : IObjectRegistry
- Inheritance
-
ObjectRegistry
- Implements
- Inherited Members
Constructors
ObjectRegistry(Transform, ObjectRegistry)
public ObjectRegistry(Transform avatarRoot, ObjectRegistry parent = null)
Parameters
avatarRoot
Transformparent
ObjectRegistry
Properties
ActiveRegistry
public static IObjectRegistry ActiveRegistry { get; set; }
Property Value
Methods
GetReference(Object)
Returns the ObjectReference for the given object, using the ambient ObjectRegistry.
public static ObjectReference GetReference(UnityEngine.Object obj)
Parameters
obj
Object
Returns
RegisterReplacedObject(Object, Object)
Record that a particular object (asset or scene object) was replaced by a clone or transformed version. This will be used to track the original object in error reports.
public static ObjectReference RegisterReplacedObject(UnityEngine.Object oldObject, UnityEngine.Object newObject)
Parameters
Returns
- ObjectReference
The ObjectReference for the objects in question
RegisterReplacedObject(ObjectReference, Object)
Record that a particular object (asset or scene object) was replaced by a clone or transformed version. This will be used to track the original object in error reports.
public static ObjectReference RegisterReplacedObject(ObjectReference oldObject, UnityEngine.Object newObject)
Parameters
oldObject
ObjectReferencenewObject
Object
Returns
- ObjectReference
The ObjectReference for the objects in question