ドキュメント

Unity Engine

Download Unity

Unity Engine

SetComponentEnabled

Enables or disables an enableable component of an entity.
読み終わるまでの所要時間 1 分最終更新 2日前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

SetComponentEnabled<T>(Entity, bool)

Enables or disables an enableable component of an entity.
public static void SetComponentEnabled<T>(Entity entity, bool value) where T : unmanaged, IEnableableComponent

Parameters

entity

The entity.

value

True to enable the component, false to disable it.

SetComponentEnabled(Entity, ComponentType, bool)

Enables or disables an enableable component of an entity.
public static void SetComponentEnabled(Entity entity, ComponentType type, bool value)

Parameters

entity

The entity.

A component type that implements IEnableableComponent.

value

True to enable the component, false to disable it.