UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Unity 2020.3.30f1 Exporting a prefab from Project will result in missing animations.

Open ArminRoiderKubat opened this issue 1 year ago • 4 comments

gameObject.activeInHierarchy will return false if the GameObject is a prefab and not instantiated in the scene.

ArminRoiderKubat avatar Jun 28 '24 14:06 ArminRoiderKubat

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 28 '24 14:06 CLAassistant

Seems to work with Unity 2021.3.+ without these changes. @hybridherbst, whats your opinion? it would only benefit the compatibility support for 2020.3

robertdorn83 avatar Sep 04 '24 06:09 robertdorn83

I remember we had to do changes in the past to make that usecase work (exporting from Project), despite activeInHierarchy being false.

@ArminRoiderKubat could you please provide reproduction steps and a reproduction .unitypackage? Thanks

hybridherbst avatar Sep 04 '24 12:09 hybridherbst

Here is the package and the exported glTF files. PR745.zip

CubeScene.gltf will contain animations. CubeProject.gltf has no animations. Both are exported from the same prefab. The first was exported by selecting the Prefab instance in the Hierarchy window in a open scene. The other by selecting it in the Project tab.

Steps:

  • Open the SampleScene, select the CubeScene GameObject and "Export selected as glTF".
  • Select the Prefab CubeProject and "Export selected as glTF".
  • Compare both files. The second export does not contain animations.

ArminRoiderKubat avatar Sep 10 '24 07:09 ArminRoiderKubat

We determined this issue only affects Unity 2020.3, which isn't supported by either Unity nor UnityGLTF anymore. Thus, we're closing this PR to not add legacy code to the current codebase. Hope you understand!

hybridherbst avatar Apr 02 '25 14:04 hybridherbst