Class GameObject
- Namespace
- BasilEngine
- Assembly
- BasilEngine.dll
Represents a game object in the Basil Engine.
[NativeHeader("Bindings/ManagedGameObjects.hpp")]
[NativeClass("ManagedGameObjects", ".")]
public class GameObject : NativeObject
- Inheritance
-
GameObject
- Inherited Members
Constructors
GameObject(ulong)
Creates a managed wrapper for an existing native game object.
public GameObject(ulong handle)
Parameters
handleulongNative handle supplied by the engine.
Properties
activeInHierarchy
Indicates whether the object is active considering its parent hierarchy.
public bool activeInHierarchy { get; }
Property Value
activeSelf
Indicates whether the object is marked active in the engine.
public bool activeSelf { get; }
Property Value
isStatic
Indicates whether the object is treated as static by the engine.
public bool isStatic { get; }
Property Value
layer
Rendering or collision layer assigned to this object.
public int layer { get; set; }
Property Value
transform
Cached Transform for this game object.
public Transform transform { get; }
Property Value
visibility
Controls whether the object is rendered.
public bool visibility { get; set; }
Property Value
Methods
DeleteGameObjectInternal(ulong)
[NativeMethod("DeleteGameObject")]
[StaticAccessor("ManagedGameObjects", StaticAccessorType.DoubleColon)]
public static extern void DeleteGameObjectInternal(ulong handle)
Parameters
handleulong
Destroy(GameObject)
Destroys a game object instance.
public static void Destroy(GameObject obj)
Parameters
objGameObjectObject to delete.
Find(string)
Finds a game object by name.
public static GameObject Find(string name)
Parameters
namestringName of the game object to locate.
Returns
- GameObject
A managed GameObject wrapper or null if no match is found.
GetVisibleInternal(ulong)
[NativeMethod("GetVisible")]
[StaticAccessor("ManagedGameObjects", StaticAccessorType.DoubleColon)]
public static extern bool GetVisibleInternal(ulong handle)
Parameters
handleulong
Returns
SetVisibleInternal(ulong, bool)
[NativeMethod("SetVisible")]
[StaticAccessor("ManagedGameObjects", StaticAccessorType.DoubleColon)]
public static extern void SetVisibleInternal(ulong handle, bool visible)