GameObject

csharp
public sealed class GameObject : Object

Namespace NodeWorld.Flux.

An object of the world: a GameObject of the scene, or one the scripts made. On the server, an object of the server's copy of the scene, with its transform only.

Properties

transform

csharp
public Transform transform { get; }

The object's Transform.

activeSelf

csharp
public bool activeSelf { get; }

The object's own active state (SetActive).

activeInHierarchy

csharp
public bool activeInHierarchy { get; }

The object is active and so is every parent.

layer

csharp
public int layer { get; set; }

The object's layer, 0 to 31. Layer 31 is NodeWorld's interface: setting it is refused.

tag

csharp
public string tag { get; set; }

The object's tag. A tag the world's project does not define is refused.

Methods

SetActive

csharp
public void SetActive(bool value)

Turns the object on or off, with its children.

GetComponent<T>

csharp
public T GetComponent<T>()
    where T : Component

The component of that type on this GameObject, or null.

GetComponents<T>

csharp
public T[] GetComponents<T>()
    where T : Component

The components of that type on this GameObject (several colliders, several audio sources...).

GetComponentsInChildren<T>

csharp
public T[] GetComponentsInChildren<T>(bool includeInactive = false)
    where T : Component

The components of that type on this GameObject and its children (inactive ones too if asked), in hierarchy order.

GetComponentInChildren<T>

csharp
public T GetComponentInChildren<T>(bool includeInactive = false)
    where T : Component

The first component of that type on this GameObject and its children (inactive ones too if asked), in hierarchy order, or null.

GetScript<T>

csharp
public T GetScript<T>()
    where T : FluxScript

The FL# script of that class on this GameObject (the first one), or null.

GetScripts<T>

csharp
public T[] GetScripts<T>()
    where T : FluxScript

The FL# scripts of that class on this GameObject.

GetScriptsInChildren<T>

csharp
public T[] GetScriptsInChildren<T>(bool includeInactive = false)
    where T : FluxScript

The FL# scripts of that class on this GameObject and its children (inactive ones too if asked), in hierarchy order.

CompareTag

csharp
public bool CompareTag(string tag)

The object has this tag.

Find

csharp
public static GameObject Find(string name)

An object of the world with this name, or null. Only the world's own objects: not the avatars, portals, photo cameras and voices NodeWorld puts in the scene.

FindPath

csharp
public static GameObject FindPath(string path)

The object at this path from a root of the world scene ("Root/Child/Leaf"), or null.