Hello, I'm having a question and I need a C # command to enable and disable a layer inside the animator in 3d unity. This server command for this?
Animator.GetLayerName ("Nadando");
In case I want to select the layer "Swimming".
Hello, I'm having a question and I need a C # command to enable and disable a layer inside the animator in 3d unity. This server command for this?
Animator.GetLayerName ("Nadando");
In case I want to select the layer "Swimming".
This command returns the name of a layer, and takes as parameter int
, ie
(retorna string) GetLayerName(int layerIndex);
For what you want the best is to change the weight of the layer:
SetLayerWeight(int layerIndex, float weight);
You can also disable it with:
minhalayer.enabled = false;
To know the id of the layer you can use:
(retorna int) GetLayerIndex(string layerName);
I recommend reading Unity's documentation