Add Unity-style GetComponents scripting API
This commit is contained in:
@@ -34,6 +34,11 @@ namespace XCEngine
|
||||
return GameObject.GetComponent<T>();
|
||||
}
|
||||
|
||||
public T[] GetComponents<T>() where T : Component
|
||||
{
|
||||
return GameObject.GetComponents<T>();
|
||||
}
|
||||
|
||||
public T GetComponentInChildren<T>() where T : Component
|
||||
{
|
||||
return GameObject.GetComponentInChildren<T>();
|
||||
|
||||
Reference in New Issue
Block a user