Summary
[Editor-Only]
Directly serializing an
UnityEngine.Object reference doesn't always work (such as with scene
objects when entering Play Mode), so this class also serializes their instance ID and uses that if the
direct reference fails.
- Assembly
- Kybernetik
.InspectorGadgets .Editor .dll - Namespace
- InspectorGadgets
.Editor - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["Serialization.ObjectReference"]
class Type type-node
Syntax
[Serializable]
public class Serialization.ObjectReference
Attributes
| Type | Description |
|---|---|
| Serializable |
Constructors
| Name | Summary |
|---|---|
| ObjectReference |
Creates a new InspectorGadgets.Editor.Serialization.ObjectReference which wraps the specified
UnityEngine.Object.
|
Properties
| Name | Value | Summary |
|---|---|---|
| InstanceID | int |
The
UnityEngine.Object.GetInstanceID. |
| Object | Object |
The referenced
UnityEditor.SerializedObject. |
Methods
| Name | Value | Summary |
|---|---|---|
| AreSameObjects |
bool |
Indicates whether both arrays refer to the same set of objects.
static
|
| Convert |
Serialization |
Creates a new array of
InspectorGadgets.Editor.Serialization.ObjectReferences representing the `objects`.static
|
| Convert |
Object[] |
Creates a new array of
UnityEngine.Objects containing the target InspectorGadgets.Editor.Serialization.ObjectReference.Object of each
of the `references`.
static
|
| ToString |
string |
Returns a string describing this object.
|
Operators
| Name | Value | Summary |
|---|---|---|
| implicit operator |
Object | |
| implicit operator |
Serialization |
Extension Methods
| Name | Value | Summary |
|---|---|---|
| IsValid |
bool |
Returns true if the `reference` and
InspectorGadgets.Editor.Serialization.ObjectReference.Object are not null.From Serialization
|