Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with Rope (Chain) in scene
#2
(03-02-2018, 05:05 AM)Sbmhome Wrote: Hi,
I created a chain (similar to the example scene). After I saved the scene, it works. 

After I continue to work on my scene (without making any changes to the chain), I notice that the mesh for chain shows up in the scene view (when its not running ) and I can't select it. Even if I delete the Obi rope from the scene it stays there, until I reboot Unity.

This in itself is a bug, however my real issue is that at this point if I bake Occlusion Culling in the scene, the Obi Rope causes the scenes Occlusion Data to be corrupted. This prevents me from opening the scene (it crashes every time), until I manually delete the Occlusion Data for the scene.

If i remove Obi rope from the scene, I can then re-bake the Occlusion Culling and I have no more issues.

Note: I also have Obi Cloth installed and I have no issues with it.

Unity 5.6.3 p4

Hi there,

This happens when an object with the hide flag HideAndDontSave is not properly destroyed.

The rope mesh is created in ObiRope's Start() and destroyed in ObiRope's OnDestroy(). So rope and mesh should always be created and destroyed together (at least in theory). For some reason the rope was removed from the scene without OnDestroy() being called, possibly the result of Unity crashing or a bug of some sort. We've been unable to reproduce it with ObiRope, but has happened for us in the past with other assets and even with Unity's own components, that's why I recognize the problem.

Unity won't let you see this mesh in the hierarchy or select it, because it is marked as HideAndDontSave. It will stay in the scene permanently until you destroy it. The only fix for this is to access all Mesh components that have this hide flag trough an editor script and remove them from the scene by calling DestroyImmediate(). It's just a couple lines of code, but let me know if you need help with it.

kind regards,
Reply


Messages In This Thread
Issue with Rope (Chain) in scene - by Sbmhome - 03-02-2018, 05:05 AM
RE: Issue with Rope (Chain) in scene - by josemendez - 03-02-2018, 09:20 PM
RE: Issue with Rope (Chain) in scene - by Sbmhome - 05-02-2018, 08:52 PM
RE: Issue with Rope (Chain) in scene - by Sbmhome - 05-02-2018, 11:42 PM