文档

Unity Engine

Download Unity

Unity Engine

AddUnmanagedSharedComponentData<T>(Entity, T)

Obsolete. Use EntityManager.AddSharedComponent instead.
阅读时间1 分钟最后更新于 20 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
警告
Removed. Use AddSharedComponent\<T\>
public bool AddUnmanagedSharedComponentData<T>(Entity entity, T componentData) where T : unmanaged, ISharedComponentData

Parameters

entity

The entity.

componentData

T
The shared component value to set.

Returns

Type

Description

boolReturns false if the entity already has the shared component. The shared component value is set either way.