Constructor ObjectReference
ObjectReference(string, Object)
Creates a serialized object-reference entry for one Unity object field.
public ObjectReference(string key, Object target)
Parameters
keystringThe synthetic key that identifies the serialized field.
targetObjectThe Unity object assigned to that field.
Exceptions
- ArgumentException
Thrown when
keyis null or empty.- ArgumentNullException
Thrown when
targetis null.