Support for serialising Animators

Vote for new features, or make your own requests here.
Post Reply

Support for serialising Animators

Yes, I would like this feature
No, I would not like this feature
No votes
Total votes: 5

User avatar
Moodkie Staff
Posts: 3530
Joined: Wed Nov 07, 2012 10:32 pm

Support for serialising Animators

Post by Joel »






Ability to save Unity Animator components.

This is not automatically serialisable, so further exploration would be needed to understand whether it can be serialised using its Get/Set methods. As such, this is not trivial to implement.
Joel @ Moodkie Interactive
Buy Easy Save | Contact | Guides | Docs | Getting started

User avatar
Posts: 13
Joined: Wed May 05, 2021 8:44 am

Re: Support for serialising Animators

Post by AdamStepinski »

+1, when loaded, Animator loses "Controller" field

My solution: have singleton with RuntimeAnimatorController field

Code: Select all

public class EasySaveReferenceHelper : MonoBehaviour
	public static EasySaveReferenceHelper Instance;
	public RuntimeAnimatorController CharRuntimeAnimController;

	private void Awake()
		Instance = this;
Create script on your animator and in Start():

Code: Select all

private void Start()
	Animator charAnimator = GetComponent<Animator>();
	charAnimator.runtimeAnimatorController = EasySaveReferenceHelper.Instance.CharRuntimeAnimController;

Posts: 7
Joined: Thu May 13, 2021 1:05 am

Re: Support for serialising Animators

Post by syu15 »

I am also hoping for this feature as I am loading the animator controller from an accessibles directory when I instantiate my prefab. If I can't save my runtime animator controller, I will have to reload it again from the accessibles directory when the saved prefab is loaded which is not ideal.

Post Reply