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

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:
    813
    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:
    813
    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:
    2,497
    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:
    813
    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