Align Unity-style object and hierarchy scripting APIs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace XCEngine
|
||||
{
|
||||
public sealed class GameObject
|
||||
public sealed class GameObject : Object
|
||||
{
|
||||
private readonly ulong m_uuid;
|
||||
|
||||
@@ -67,6 +67,16 @@ namespace XCEngine
|
||||
return InternalCalls.GameObject_GetComponent(UUID, typeof(T)) as T;
|
||||
}
|
||||
|
||||
public T GetComponentInChildren<T>() where T : Component
|
||||
{
|
||||
return InternalCalls.GameObject_GetComponentInChildren(UUID, typeof(T)) as T;
|
||||
}
|
||||
|
||||
public T GetComponentInParent<T>() where T : Component
|
||||
{
|
||||
return InternalCalls.GameObject_GetComponentInParent(UUID, typeof(T)) as T;
|
||||
}
|
||||
|
||||
public T AddComponent<T>() where T : Component
|
||||
{
|
||||
return InternalCalls.GameObject_AddComponent(UUID, typeof(T)) as T;
|
||||
|
||||
Reference in New Issue
Block a user