As mentioned in the previous text, the value type and the reference type, then this will be a separate reference type;
The C # language in Unity3d provides a special type to provide developers with the convenience of developing games using C #;
In this engine, you use the Unityengine namespace to put your own defined type in place. Among them, the Unityengine.object class is the most basic class in the C # scripting language of the game engine, which is the base class for all objects. All exposed variables derived from this class are displayed in the Monitor (Inspector) view.
Class members provided by this class:
field |
hideflags |
identifies whether the object is hidden [the 2017 version I used, all returned is none] |
fields |
name |
name of Object |
Public method |
getinstanceid |
Return instance ID for this object |
Public method |
tostring |
Return the object name |
static method |
destroy |
Destroy a Game object, component, or resource |
static method |
destroyimmediate |
Destroy a Game object, component, or resource (destroyed immediately, but not recommended) |
static method |
dontdestroyonload |
Ensure that the target object is not destroyed when switching scenes |
static method |
findobjectoftype |
Returns the first activated target type Object |
static method |
findobjectsoftype |
Returns a sequence that includes all active target pairs |
static method |
instantiate |
Copy original object |
|
|
|
Note: unity2017 version, determine whether the object is activated in the scene, I use the API is sth.activeself; "The return value is False, or true"
Unityengine.component class
In addition to the most basic unityengine.object, this class is also important, which derives from Unityengine.object and introduces new members in addition to the members that inherit from Unityengine.object.
See the next article ....
Unity3d reference types in the scripting language