AnimationState.layer Manual     Reference     Scripting  
Scripting > Runtime Classes > AnimationState
AnimationState.layer

var layer : int

Description

The layer of the animation. When calculating the final blend weights, animations in higher layers will get their weights

distributed first. Lower layer animations only receive blend weights if the higher layers didn't use up all blend weights.

JavaScripts
// Puts the walk and run animation in layer 1
animation["Walk"].layer = 1;
animation["Run"].layer = 1;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
animation["Walk"].layer = 1;
animation["Run"].layer = 1;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
animation['Walk'].layer = 1
animation['Run'].layer = 1