World.SetMaxCapacity_T_(int).md
March 19, 2022 ยท View on GitHub
DefaultEcs
DefaultEcs.World
World.SetMaxCapacity(int) Method
Sets up the current World to handle component of type T with a different maximum count than MaxCapacity.
If the type of component is already handled by the current World, does nothing.
This method is not thread safe.
public bool SetMaxCapacity<T>(int maxCapacity);
Type parameters
T
The type of component.
Parameters
maxCapacity System.Int32
The maximum number of component of type T that can exist in this World.
Returns
System.Boolean
Whether the maximum count has been setted or not.
Exceptions
System.ArgumentException
maxCapacity cannot be negative.