Change AnimatorController during runtime

Hey guys^^

I wanted to write a script that changes the AnimatorController of my player during the runtime. If I press 1 it should be the first controller by press 2 it should be the second.
Okay this is what I have so far:

using UnityEngine;
using System.Collections;

public class SwitchAnimator : MonoBehaviour {


	Animator animator;

	void Start () {
		animator = this.GetComponent<Animator>();
	}
	

	void Update () {
		if (Input.GetKeyDown ("1")) {
			animator.runtimeAnimatorController = (RuntimeAnimatorController)RuntimeAnimatorController.Instantiate(Resources.Load("Animation/Char1Animator.controller", typeof(RuntimeAnimatorController )));
		}

		if (Input.GetKeyDown ("2")) {
			animator.runtimeAnimatorController = (RuntimeAnimatorController)RuntimeAnimatorController.Instantiate(Resources.Load("Animation/C1AnimatorRange.controller", typeof(RuntimeAnimatorController )));
		}
	
	}
}

But I get an “ArgumentException: The thing you want to instantiate is null” error. What did I wrote wrong?

Thank you so much^^

Please remove the controller’s file extention.

RuntimeAnimatorController newController =  (RuntimeAnimatorController)Resources.Load("Animation/Char1Animator");

I’m pretty sure you don’t need to Instantiate a Controller after it’s loaded… Try it without the instantiate

animator.runtimeAnimatorController = (RuntimeAnimatorController)Resources.Load("Animation/Char1Animator.controller", typeof(RuntimeAnimatorController ));