Documentation

Unity Engine

Unity Engine

Add(T)

Adds an element to the end of the buffer, resizing as necessary.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public int Add(T elem)

Parameters

elem

T
The element to add to the buffer.

Returns

Type

Description

intThe index of the added element, which is equal to the new length of the buffer minus one.

Remarks

The buffer is resized if it has no additional capacity.