AnimancerLayerList.

DefaultCapacity Property

Summary

[Pro-Only] The maximum number of layers that can be created before an System.ArgumentOutOfRangeException will be thrown (default 4).

Lowering this value will not affect layers that have already been created.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerLayerList

Syntax

public static int DefaultCapacity { get; set; }

Remarks

Example: To set this value automatically when the application starts, place a method like this in any class:

[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void SetMaxLayerCount()
{
    Animancer.AnimancerLayerList.DefaultCapacity = 8;
}
Otherwise you can set the Animancer.AnimancerLayerList.Capacity of each individual list:

AnimancerComponent animancer;
animancer.Layers.Capacity = 8;

Value

Type Description
int