UnityEngine.Animator.SetLayerWeight C# (CSharp) Method

SetLayerWeight() public method

public SetLayerWeight ( int layerIndex, float weight ) : void
layerIndex int
weight float
return void
		public void SetLayerWeight(int layerIndex, float weight){}
		public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex){}

Usage Example

	public void Init(string letter) {
		anim = GetComponent<Animator>();
		//this is getting called before start for
		char asciiLetter = letter.ToCharArray ()[0];
		int stateLayerIndex = System.Convert.ToInt32 (asciiLetter) - 97;
		anim.SetLayerWeight(0,1f);
		anim.SetLayerWeight(stateLayerIndex +1,1f);


	}
All Usage Examples Of UnityEngine.Animator::SetLayerWeight
Animator