I am trying to play another animation by accessing another animatorcontroller.How would i correct this script?
using UnityEngine;
using System.Collections;
public class ActivateAnimation : MonoBehaviour
{
void OnCollisionEnter (Collision col)
{
if(col.gameObject.name == "prop_powerCube")
{
anim = GetComponent<Animator>();
anim.runtimeAnimatorController = AnimationforPioyu ;
}
}
}