ComponentListclass

objectComponentList
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.ComponentList

Methods24

Showing 24 methods

public T GetInAncestors(bool includeDisabled = False)PUBLIC

Find component on this gameobject's ancestors

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInAncestorsOrSelf(bool includeDisabled = False)PUBLIC

Find component on this gameobject's ancestors or on self

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInChildren(bool includeDisabled = False)PUBLIC

Find component on this gameobject's immediate children

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInChildrenOrSelf(bool includeDisabled = False)PUBLIC

Find component on this gameobject's immediate children or on self

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInDescendants(bool includeDisabled = False)PUBLIC

Find component on this gameobject's decendants

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInDescendantsOrSelf(bool includeDisabled = False)PUBLIC

Find component on this gameobject's decendants or on self

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInParent(bool includeDisabled = False)PUBLIC

Find component on this gameobject's parent

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetInParentOrSelf(bool includeDisabled = False)PUBLIC

Find component on this gameobject's parent or on self

ParameterTypeDescription
includeDisabled = Falsebool
Returns:T

public T GetOrCreate(Sandbox.FindMode flags = 7)PUBLIC

Find this component, if it doesn't exist - create it.

ParameterTypeDescription
flags = 7FindMode
Returns:T

public void Move(Sandbox.Component baseComponent, int delta)PUBLIC

Move the position of the component in the list by delta (-1 means up one, 1 means down one)

ParameterTypeDescription
baseComponentComponent
deltaint
Returns:void

public bool TryGet(T component, Sandbox.FindMode search = 5)PUBLIC

Try to get this component

ParameterTypeDescription
componentT
search = 5FindMode
Returns:bool

Properties1

Showing 1 properties

public int Sandbox.ComponentList.Count { get; set; }PUBLICGETSET

Amount of components - including disabled

Returns:int

On this page

Methodspublic Sandbox.Component Create(Sandbox.TypeDescription type, System.Boolean startEnabled = True)public T Create(System.Boolean startEnabled = True)public Sandbox.Component FirstOrDefault(System.Func`2<Sandbox.Component,System.Boolean> value)public System.Void ForEach(System.String name, System.Boolean includeDisabled, System.Action`1<Sandbox.Component> action)public System.Void ForEach(System.String name, System.Boolean includeDisabled, System.Action`1<T> action)public Sandbox.Component Get(System.Guid id)public Sandbox.Component Get(System.Type type, Sandbox.FindMode find = 5)public T Get(Sandbox.FindMode search)public T Get(System.Boolean includeDisabled = False)public System.Collections.Generic.IEnumerable`1<Sandbox.Component> GetAll()public System.Collections.Generic.IEnumerable`1<Sandbox.Component> GetAll(Sandbox.FindMode find)public System.Collections.Generic.IEnumerable`1<Sandbox.Component> GetAll(System.Type type, Sandbox.FindMode find)public System.Collections.Generic.IEnumerable`1<T> GetAll(Sandbox.FindMode find = 69)public T GetInAncestors(System.Boolean includeDisabled = False)public T GetInAncestorsOrSelf(System.Boolean includeDisabled = False)public T GetInChildren(System.Boolean includeDisabled = False)public T GetInChildrenOrSelf(System.Boolean includeDisabled = False)public T GetInDescendants(System.Boolean includeDisabled = False)public T GetInDescendantsOrSelf(System.Boolean includeDisabled = False)public T GetInParent(System.Boolean includeDisabled = False)public T GetInParentOrSelf(System.Boolean includeDisabled = False)public T GetOrCreate(Sandbox.FindMode flags = 7)public System.Void Move(Sandbox.Component baseComponent, System.Int32 delta)public System.Boolean TryGet(T component, Sandbox.FindMode search = 5)Propertiespublic System.Int32 Sandbox.ComponentList.Count { get; set; }Metadata