Hello, I am trying to assign an animation controller through script. However, I cant get this to work. I am trying with two different ways and neither are working.
playerAnimation.runtimeAnimatorController = Resources.Load("animController") as RuntimeAnimatorController;
playerAnimation.runtimeAnimatorController = Resources.Load<RuntimeAnimatorController>("animController");
My file structure is the main asset folder, then a resource folder in there and then the animation in that resource folder. Should this work? I need to do this through script and not in the inspector as i need to change the controller at one point