Table of Contents

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

handle ulong

Native handle supplied by the engine.

Properties

activeInHierarchy

Indicates whether the object is active considering its parent hierarchy.

public bool activeInHierarchy { get; }

Property Value

bool

activeSelf

Indicates whether the object is marked active in the engine.

public bool activeSelf { get; }

Property Value

bool

isStatic

Indicates whether the object is treated as static by the engine.

public bool isStatic { get; }

Property Value

bool

layer

Rendering or collision layer assigned to this object.

public int layer { get; set; }

Property Value

int

transform

Cached Transform for this game object.

public Transform transform { get; }

Property Value

Transform

visibility

Controls whether the object is rendered.

public bool visibility { get; set; }

Property Value

bool

Methods

DeleteGameObjectInternal(ulong)

[NativeMethod("DeleteGameObject")]
[StaticAccessor("ManagedGameObjects", StaticAccessorType.DoubleColon)]
public static extern void DeleteGameObjectInternal(ulong handle)

Parameters

handle ulong

Destroy(GameObject)

Destroys a game object instance.

public static void Destroy(GameObject obj)

Parameters

obj GameObject

Object to delete.

Find(string)

Finds a game object by name.

public static GameObject Find(string name)

Parameters

name string

Name 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

handle ulong

Returns

bool

SetVisibleInternal(ulong, bool)

[NativeMethod("SetVisible")]
[StaticAccessor("ManagedGameObjects", StaticAccessorType.DoubleColon)]
public static extern void SetVisibleInternal(ulong handle, bool visible)

Parameters

handle ulong
visible bool