AnimancerPlayable.LayerList.

AnimancerPlayable.

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
AnimancerPlayable.LayerList

Syntax

public static int DefaultCapacity { get; set; }

Examples

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

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

AnimancerComponent animancer;
animancer.Layers.Capacity = 8;

Value

Type Description
int