Skip to content

Conversation

@ArminRoiderKubat
Copy link

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

…check. gameObject.activeInHierarchy will return false if the GameObject is a prefab and not instantiated in the scene
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2024

CLA assistant check
All committers have signed the CLA.

@robertdorn83
Copy link
Collaborator

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

@hybridherbst
Copy link
Collaborator

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

@ArminRoiderKubat
Copy link
Author

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.

@hybridherbst
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants