ドキュメント

Unity Engine

Download Unity

Unity Engine

SetSharedComponent

Sets the value of a shared component of an entity.
読み終わるまでの所要時間 1 分最終更新 2日前

Definition

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

SetSharedComponent<T>(Entity, T)

Sets the value of a shared component of an entity.
public static void SetSharedComponent<T>(Entity entity, T componentData) where T : unmanaged, ISharedComponentData

Parameters

entity

The entity.

componentData

T
The new value.

Remarks

This is a structural change.

SetSharedComponent(Entity, ComponentType, void*)

Sets the value of a shared component of an entity.
public static void SetSharedComponent(Entity entity, ComponentType type, void* componentData)

Parameters

entity

The entity.


componentData

The new value, TypeManager.TypeInfo.TypeSize bytes long.

Remarks

This is a structural change.