get<T>(tag: Tag | Tag[], opts?: GetOpt): GameObj[]
Get a list of all game objs with certain tag.
param
tag- The tag to search for. Use "*" to get all objects.
param
opts- Additional options.
// get a list of all game objs with tag "bomb"
const allBombs = get("bomb");
// To get all objects use "*"
const allObjs = get("*");
// Recursively get all children and descendents
const allObjs = get("*", { recursive: true });
// Get a live query which updates in real-time
const allObjs = get("*", { liveUpdate: true });
returns
A list of game objects that have the tag.
since
v2000.0
group
Game Obj