playMaker

Author Topic: [SOLVED] Animation Settings Wrap Mode Issue?  (Read 4694 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
[SOLVED] Animation Settings Wrap Mode Issue?
« on: January 10, 2016, 11:57:00 AM »
Unity 5.3.1/PlayMaker 1.8

I have a simple legacy animation of a cube moving across the screen.

If I add an Animation Settings to my state, and I try to set 'Wrap Mode' to 'Once'... I can not.

Every time I use the pulldown and try to select 'Once'... 'Clamp' is chosen instead.

Bug or user error?

Thanks for any ideas!
« Last Edit: February 03, 2016, 10:10:33 PM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Animation Settings Wrap Mode Issue?
« Reply #1 on: January 13, 2016, 02:25:49 AM »
Hi,

 Can you make a screenshot of where this dropdown is on screen? Just so we are looking at the same thing.

 I recall such an issue, but I need to make sure where you are within the interface.

 Bye,

 JEan

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Animation Settings Wrap Mode Issue?
« Reply #2 on: January 18, 2016, 09:37:07 AM »
Sorry for the late reply... been traveling.

Attached is a screengrab showing the dialog.

Thanks!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Animation Settings Wrap Mode Issue?
« Reply #3 on: January 25, 2016, 06:19:19 AM »
Hi,

It's because the possible choices are wrong:

http://docs.unity3d.com/ScriptReference/WrapMode.html

the latest version do not have "clamp" anymore, so I suspect that depending on your Unity Version, some wrap mode are not available that's all.

open the help from your Unity menu, and search for WrapMode, you'll see which ones are supported, than based on that, please verify that the supported wrap modes are selectable as expected.

Bye,

 Jean

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Animation Settings Wrap Mode Issue?
« Reply #4 on: January 25, 2016, 10:46:58 AM »
I'm sorry... I'm a bit confused.

The Unity 5.3.1f1 helpfile shows that 'Clamp' is not a variable... and yet the PlayMaker 'Animation Settings>Wrap Mode' is allowing 'Clamp' to be selected.

Each 'Animation Settings>Wrap Mode' item can be selected EXCEPT 'Once'.  'Once' is still a variable according to the helpfile.

How is this not a problem with PlayMaker?

Thanks.



Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Animation Settings Wrap Mode Issue?
« Reply #5 on: January 25, 2016, 12:43:59 PM »
The problem is in the UnityEngine.WrapMode enum:

Code: [Select]
namespace UnityEngine
{
  public enum WrapMode
  {
    Default = 0,
    Clamp = 1,
    Once = 1,
    Loop = 2,
    PingPong = 4,
    ClampForever = 8,
  }
}

Clamp and Once share the same value.
Since the action just exposes WrapMode with an Enum Popup the duplicate definition causes the confusing behaviour you're seeing.

The solution would be to make a custom popup without Clamp (while maintaining saved data). But for now you can safely assume that Clamp and Once are the same Wrap Mode.

EDIT: I've added a note about this to the action reference:
https://hutonggames.fogbugz.com/default.asp?W5
« Last Edit: January 25, 2016, 12:48:58 PM by Alex Chouls »

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Animation Settings Wrap Mode Issue?
« Reply #6 on: January 25, 2016, 12:50:34 PM »
Ahhh... I understand now.

Thanks for the explanation!