Table of Contents

Class ObjectRegistry

Namespace
nadena.dev.ndmf

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 Transform
parent ObjectRegistry

Properties

ActiveRegistry

public static IObjectRegistry ActiveRegistry { get; set; }

Property Value

IObjectRegistry

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

ObjectReference

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

oldObject Object
newObject Object

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 ObjectReference
newObject Object

Returns

ObjectReference

The ObjectReference for the objects in question