API ReferenceSandbox
GameObjectDirectoryclass
New GameObjects and Components are registered with this class when they're created, and unregistered when they're removed. This gives us a single place to enforce Id uniqueness in the scene, and allows for fast lookups by Id.
object→GameObjectDirectory
Methods3
Showing 3 methods
public Sandbox.GameObject FindByGuid(System.Guid guid)
Find a GameObject in the scene by Guid. This should be really really fast.
| Parameter | Type | Description |
|---|---|---|
| guid | Guid | — |
public System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> FindByName(string name, bool caseinsensitive = True)
Find objects with this name. Not performant.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| caseinsensitive = True | bool | — |
No results match this filter.
Properties3
Showing 3 properties
public int Sandbox.GameObjectDirectory.ComponentCount { get; set; }
Returns:
int—public int Sandbox.GameObjectDirectory.Count { get; set; }
Returns:
int—public int Sandbox.GameObjectDirectory.GameObjectCount { get; set; }
Returns:
int—No results match this filter.