Bug description: Simple scenery object animation is static in the built package when in comm folder but works in edit mode/scenery editor. Please find videos attached.
Attachments:
In community folder
In scenery editor with project open
Private attachments:
I sent the model files to private content for you to verify and test with
The textures don’t work because I forgot to include the texture .xmls. My bad, sorry for that.
Anyways, thank you for testing! I am glad the animation works for you which means that there should, in theory, be nothing wrong with the export / animation itself. But, unfortunately, I still can’t get it to work consistently on my end. I just tried a clean all and then a rebuild. Now back in the editor, where it worked yesterday as you saw, the lights are animated, but the emissive meshes don’t move. This is weird because the lights are actually parented to the emissive meshes, so I don’t understand how the lights are moving when the meshes to which they are parented to don’t.
If I re-add the lights model with the animation it works again
I then put this into the (empty) community folder and now one of them is not animated at all, and the other one has only the lights moving but again not the meshes the lights are parented to. This is extremely weird and for some reason completely inconsistent in what actually works animation wise.
Do you have any idea as to what could be going on here? Because I have to admit that I am completely lost and I don’t know what’s going on at all. If you need any more resources let me know and I am happy to send them in Private Content.
I think I found the issue. Well, a combination of 2 issues. First the animation xml didn’t have braces for the GUIDs. Which makes me question how it worked to begin with and for you, but maybe these caused the inconsistencies.
And then I also realised that in order to get the placing right I copied the existing fire engine and used the “replace with model” feature. I then noticed the fire engine themselves are set to use instancing. As we know animations don’t work with instancing and because they were stull using it from the previous model the anim didn’t work!
Long story short it works now in the built package too.
Thanks for testing it though that actually kind of limited what to test and made it easier to fix as I knew what I needed to look for. As always thanks for the help!
However, regarding the firetruck, I’m not sure I understand what you mean.
Did you copy another asset that you had previously added to your scenery, one that had the mass instancing option enabled? If this case this was likely the culprit here as you know mass instancing don’t support animations.
Oh okay good to know. Then it was probably just the accidental instancing that messed with it.
Yeah so the fire trucks themselves are instanced. As you saw in the sources I sent the lights are actually a separate model I made after I had already placed all the firetrucks, so in order to line the lights up perfectly I duplicated a firetruck, used the replace model function, and replaced the duplicated truck with the lights. Because I did this the lights still had “use instancing” checked hence why the animation didn’t work. And it only worked in the editor because, as you know, instancing only takes effect in the built package. This is why it didn’t work in the built package.
This is what must have happened. Thank you very much for letting me know about the braces though, I thought that also had something to do with it. Anyways, like I mentioned it works now. Thanks for the help Boris. Greatly appreciated.