- Home /
Question by
KJoanette · Jan 18, 2014 at 01:01 AM ·
state saving
CreateAsset for AnimatorController doesn't save StateMachine
I'm creating an AnimatorController, Layer, States, AnimationClips all from code. It all works perfectly... until I save the scene and all of my states and layers leak away and are collected.
I've been trying to find out how to force them to be saved as well? Currently I create an asset for the controller and for each clip, as well as saving a prefab of my 2D skeleton.
Is there a way to force the layers and the states to also be saved along with the controller?
Comment
how do you mean you are creating states from code? do you mean you do it from your editor script or in runtime ?
Your answer
![](https://koobas.hobune.stream/wayback/20220613130726im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Sate Saving 1 Answer
Enemy attacked state 1 Answer
Save as many pickables as you want to 1 Answer
Save and load 0 Answers
Saving data made using the editor 2 Answers