ドキュメント

Unity Engine

Unity Engine

Add

Adds a new key-value pair.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

Add(T, T)

Adds a new key-value pair.
public void Add(TKey key, TValue item)

Parameters

key

T
The key to add.

item

T
The value to add.

Remarks

If the key is already present, this method throws without modifying the hash map.

Add(T, T, int)

Adds a new key-value pair.
public void Add(TKey key, TValue item, int threadIndexOverride)

Parameters

key

T
The key to add.

item

T
The value to add.

threadIndexOverride

The thread index which must be set by a field from a job struct with the NativeSetThreadIndexAttribute attribute.

Remarks

If the key is already present, this method throws without modifying the hash map.