Align Unity-style object and hierarchy scripting APIs
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Reflection;
|
||||
|
||||
namespace XCEngine
|
||||
{
|
||||
public abstract class Component
|
||||
public abstract class Component : Object
|
||||
{
|
||||
internal ulong m_gameObjectUUID;
|
||||
|
||||
@@ -34,6 +34,16 @@ namespace XCEngine
|
||||
return GameObject.GetComponent<T>();
|
||||
}
|
||||
|
||||
public T GetComponentInChildren<T>() where T : Component
|
||||
{
|
||||
return GameObject.GetComponentInChildren<T>();
|
||||
}
|
||||
|
||||
public T GetComponentInParent<T>() where T : Component
|
||||
{
|
||||
return GameObject.GetComponentInParent<T>();
|
||||
}
|
||||
|
||||
public T AddComponent<T>() where T : Component
|
||||
{
|
||||
return GameObject.AddComponent<T>();
|
||||
|
||||
Reference in New Issue
Block a user