Add "find()" method for GameObjects
Opened this issue · 0 comments
patschreiber commented
Should look in each container to find a game object by an id.
GameObject.find(10) => Returns the GameObject and optionally which container it was located in.
GameObject.find(10).container
(?)
GameObject.find(10, "debug")
(?)
Returns the GameObject or a hash depending on if you want the debug info or not
GameObject.find(10, "debug");
// Output
{
gameobject: GameObject,
container: "container name"
}
Stretch Goal. Make this generic and part of the tooling for the engine. .find()
can find any active instantiated object (texture, GameObject, Component, etc.)