Hello I'm porting Spriter animations to Unity, did it already once via external tool and everything works fine. Now i'm trying to make it work again, but this time plugging it into Unity import system. While everything seems to work (more or less) fine, there are some big bumps on my way. Problem 1 - missing animation type What I do: - create AnimationClip instance in the code - create AnimationCurve instances (a lot of them, for every bone and sprite) - save it using AssetDatabase.CreateAsset (path created via Path.Combine, filename ending with '.anim') What i get: - animation created this way is of type "1" (it seems to be Generic, but there is no way of telling that for sure) - when i try to add this animation to AnimatorController, i get the following error: "Animation clip 'name' is not retargetable. Animation clips used within the Animator Controller need to have Muscle Definition set up in the Asset Importer Inspector” - animations created via “Animation / Create New Clip” are of type “2” (which seems to be Legacy). These animations have no problems and work fine. - so, i want to change animation type for AnimationClip’s that i’m creating, but it’s not that easy - adding (assetImporter as ModelImporter).animationType = ModelImporterAnimationType.Legacy and then reimporting animations via AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate) doesn’t help - trying to use reflection and just set some values doesn’t help either. typeof(AnimationClip).GetProperties(BindingFlags.N onPublic) returns 0 elements. My only idea now is to mem-map resulting .anim file (in text mode), find line with “m_animationType: 1” and change this one byte to “2”. Any better solutions? It has to be a pure code, no inspector clicking (i know about debug mode in inspector, but it doesn’t suit my needs) Problem 2 - assigning Sprites to animations (note: i won’t be doing exactly this in the final version of the importer, but i still wonder how to do it from script) What I want to do: - assign a Sprite to an animation at a given time How it’s done internally: - assignment to “m_PPtrCurves” in text mode What are the options: - Keyframes are out at start - only assigning floating point value - AnimationUtility.SetAnimationEvents seems to be much better hit, the only question is then: what function to call? Checking via reflection i can tell there are no set_Sprite methods, so i’d assume it is a field and not a property. Probably the answer is simple - instead of function it is enough to call it for a field and Unity messaging system assumes then a call to an assignment operator, but i’d like a confirmation on this (maybe i just didn't rtfm enough yet).