Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How change imported AnimationClip wrap mode? #7

Open
marcinbiegun opened this issue May 24, 2018 · 1 comment
Open

How change imported AnimationClip wrap mode? #7

marcinbiegun opened this issue May 24, 2018 · 1 comment
Assignees
Labels

Comments

@marcinbiegun
Copy link

marcinbiegun commented May 24, 2018

I'd like the imported animations to loop. There is no default GUI for animation with wrap mode selection, so this needs to be done inside the importer script.

I've tried to set wrapMode in MidiAnimImporter class:

            var anim = clip.ConvertToAnimationClip();
            anim.wrapMode = WrapMode.Loop; // <--- set wrap mode
            context.AddObjectToAsset("MIDI", anim);
            context.SetMainObject(anim);

But it's still not looping. The animation clip is running via animator with a single entry -> clip logic.

What else is missing to have the clip looping?

@keijiro keijiro self-assigned this May 24, 2018
@marcinbiegun
Copy link
Author

So far I'm using a workaround: add the midi animation clip twice inside an animator and connect them with bi-directional transition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants