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.

objectGameObjectDirectory
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.GameObjectDirectory

Methods3

Showing 3 methods

public Sandbox.GameObject FindByGuid(System.Guid guid)PUBLIC

Find a GameObject in the scene by Guid. This should be really really fast.

ParameterTypeDescription
guidGuid
Returns:GameObject

public System.Collections.Generic.IEnumerable`1<Sandbox.GameObject> FindByName(string name, bool caseinsensitive = True)PUBLIC

Find objects with this name. Not performant.

ParameterTypeDescription
namestring
caseinsensitive = Truebool
Returns:IEnumerable<GameObject>

public Sandbox.Component FindComponentByGuid(System.Guid guid)PUBLIC

Find a Component in the scene by Guid. This should be really really fast.

ParameterTypeDescription
guidGuid
Returns:Component

Properties3

Showing 3 properties

On this page