Upravit

Sdílet prostřednictvím


GKComponentSystem<TComponent>.AddComponent Method

Definition

Overloads

AddComponent(GKEntity)

Adds, to the component system, all components from entity that match the component class for the component system.

AddComponent(TComponent)

Adds the specified component to the component system.

AddComponent(GKEntity)

Adds, to the component system, all components from entity that match the component class for the component system.

[Foundation.Export("addComponentWithEntity:")]
public virtual void AddComponent (GameplayKit.GKEntity entity);
abstract member AddComponent : GameplayKit.GKEntity -> unit
override this.AddComponent : GameplayKit.GKEntity -> unit

Parameters

entity
GKEntity

The entity in which to search for compatible components to add.

Attributes

Applies to

AddComponent(TComponent)

Adds the specified component to the component system.

[Foundation.Export("addComponent:")]
public virtual void AddComponent (TComponent component);
abstract member AddComponent : 'Component -> unit
override this.AddComponent : 'Component -> unit

Parameters

component
TComponent

The component to add.

Attributes

Remarks

App developers must ensure that the specified component is of the same class as the component system.

Applies to