Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Is there a better way (less cpu intensive) of....

Discussion in 'Editor & General Support' started by seon, Sep 5, 2007.

  1. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    I have 100 prefabs of an object with an animation on it that has a script with an update() that calls if (!animation.isPlaying) animation.Play(); to keep the animation looping... because the "loop" option on the animation controller doesn't loop.

    I need them all looping indefinitely until each is destroyed...

    Is there a more efficient way of doing this?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Set the wrapmode to loop in the inspector.

    I am pretty sure this works correctly, if it doesn't it's most likely there is a script which is set to stop the animation for some reason.
     
  3. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Well, funnily enough.. it didn't work before... but it is now... and we have worked out why.

    Exporting animation from LW using FBX is, well... sometimes great and sometimes flakey.

    For some reason the animation wouldn't loop, but when we re-exported from LW and re-imported, it now does loop using wrap mode.
     
  4. bronxbomber92

    bronxbomber92

    Joined:
    Nov 11, 2006
    Posts:
    888
    FBX seems to be such a flakey format. Each modeler imports and exporters differently! It's terrible. I wish there was a true universal model format.. I guess FBX is the closest thing to it. Oh well :p
     
  5. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Yeah, we get totally different results out of Modo than we do out of LW... LW doesnt support multi UV in FBX... but has animation. Modo has teh multi-UV's but renames all UV... grrr! And often a geometry change will cause Modo to re-order UV! What a friggin pain!

    But on a more positive note... it's almost the weekend!