Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feedback [FEATURE REQUEST] Edit Loop setting at runtime

Discussion in 'Animation' started by jhocking, Nov 12, 2020.

  1. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    792
    This is half a request to change how that animation setting works, and half wondering why that setting works the way it does. Specifically, I am talking about how the "Loop Time" checkbox can only be toggled in the editor.

    While working with GLTF files lately, I figured out the code to adjust that setting:
    https://forum.unity.com/threads/gltfutility-a-simple-gltf-plugin.654319/page-4#post-6506247

    As noted there, this code relies on the UnityEditor namespace and thus only works in the editor. But the thing is, it works even while the game is playing, not only beforehand as some sort of preparation step. That is, in the code that runs when I hit Play, I could load the model from StreamingAssets (ie. load it at runtime), toggle loopTime with that code, and then play the looping animation using the Playables API. That's still in the editor, but also while the game is playing.

    Is there a reason Unity can't enable this functionality in a built game? I never thought about this limitation before, because I never did anything before where it mattered, but as I mess with loading GLTF files at runtime I'm realizing there's no way to loop animations loaded that way, and that seems silly.
     
    Last edited: Nov 13, 2020
  2. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    792
    Is there a new place to post feature requests for Unity to see? I figured my best bet was simply posting in the forum since the Feedback site is no more.
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,517
    Nope, you just post here and it feels like pissing into the wind because you basically never get any response.

    There is a "Feedback" tag which you can apply to the thread somehow though, which they might potentially use to search for all feature requests.

    I like the idea by the way. There are a lot of random things in the animation system that you just can't do for no apparent reason like accessing the actual animation curves of a clip. The data has to be there, so it doesn't make sense for it to not be accessible.
     
  4. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    792
    hm I figured out how to add that tag (when I edit the title there's a button for options) hopefully that gets seen by Unity. I think I'll post this in General Support for more visibility...
     
    Last edited: Nov 18, 2020
unityunity