기술 자료

Unity Engine

Unity Engine

Add(TKey, TValue)

Adds a new key-value pair. If the key is already present in the collection, this method should throw, but currently does not! Instead, it silently fails, without replacing said value.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

Add(T, T)

public void Add(TKey key, TValue item)

Parameters

key

T
The key to add.

item

T
The value to add.

Remarks

Prefer UnsafeParallelHashMap<TKey, TValue>.TryAdd if your intent is to allow graceful failure, as this API will eventually become more strict (and begin to throw).