- Home /
Animation WrapMode - whats the difference between 'default' and 'once'?
What is the difference between wrapModes default and once?
In fact what is 'default' as I'd assumed that was the same as once? However in testing this does not appear to be the case.
By placing a callback event at the end of the animation to call a script function to replay it (intention later is to switch animations in the callback), default wrapMode (set in the animation panel) results in the callback function failing to replay the animation. Yet change it to once and the same code now works!
Also Whilst trying to debug this I noticed when viewing the gameobject with the animation in the 'inspector debugger' the wrapMode is always displayed as 'Default' regardless of the settings applied in the animation panel. Whats up with that?
Still like to get some more information on this question. Specifically what the actual difference is, as using 'default' in the animation view panel doesn't appear to allow the animation to be replayed via code, but 'once' does. Also noticed that the setting in the animation panel doesn't appear to 'stick' when opening/closing the project, you have to set it on the animation. thx
Answer by dhendrix · Jun 05, 2010 at 12:31 AM
Default uses the animation setting that you have set in the Animation View Window.
But the Animation View window (if we are talking about the same thing) also lets you set wrapmode to 'default' so that doesn't make any sense.