Jump to content

Optimised objects losing Colliders


mroshaw
Go to solution Solved by Bryan,

Recommended Posts

Hello again!

 

Within my scene, I had a pile of rocks at kind of covering up the source of a river. This is a number of PW_Stone prefab instances, grouped under a parent Game Object.

 

When I optimise this parent, everything renders great, but now my player can just pass through the rocks. I can see that there are no Colliders on the "Optimized" Game Objects, which I guess pretty clearly explains why.

 

Is this expected? Is this a limitation of Mesh Colliders, or something I've done wrong in running the Scene Optimizer?

 

Many thanks again for your help!

 

Oli

Link to comment

Sorry, I've totally misrepresented the situation in the title! Apologies.

 

The Mesh Colliders are there, in child objects of the optimized objects. It's just that my player seems to be able to walk through them. The Game Objects with the colliders are in the correct layer (PW_Medium_Object), and if I "undo" the optimisation and go back to the original Game Objects, I'm not able to walk through them.

 

I should have used the title: "Player able to walk through objects after optimization".

 

Can you update the title, or should I create a new ticket?

Link to comment

I've re-done the optimization, and I see a couple of warnings in the Console that might be relevant:

 

Combine mesh instance 0 is null.
UnityEngine.Mesh:CombineMeshes (UnityEngine.CombineInstance[])
ProceduralWorlds.SceneOptimizer.OptimizeCommand:HMPCMMOIBNC (ProceduralWorlds.SceneOptimizer.Tools,UnityEngine.Transform,System.Collections.Generic.List`1<UnityEngine.Collider>)
ProceduralWorlds.SceneOptimizer.OptimizeCommand:NAHLCMDEADF (string,ProceduralWorlds.SceneOptimizer.OptimizeCall,UnityEngine.Bounds,UnityEngine.Material,System.Collections.Generic.List`1<ProceduralWorlds.SceneOptimizer.MeshCombination>,int,UnityEngine.Transform,single&)
ProceduralWorlds.SceneOptimizer.OptimizeCommand:FGGOOPHIEAL (int,ProceduralWorlds.SceneOptimizer.OptimizeCall,UnityEngine.Material,System.Collections.Generic.List`1<ProceduralWorlds.SceneOptimizer.MeshCombination>,UnityEngine.Transform,single&)
ProceduralWorlds.SceneOptimizer.OptimizeCommand:ProcessOptimization (ProceduralWorlds.SceneOptimizer.SceneOptimizerInternal,ProceduralWorlds.SceneOptimizer.OptimizeCall)
ProceduralWorlds.SceneOptimizer.Tools:ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.SceneOptimizerInternal,ProceduralWorlds.SceneOptimizer.OptimizeCall,bool)
ProceduralWorlds.SceneOptimizer.SceneOptimizerInternal:ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall,bool)
ProceduralWorlds.SceneOptimizer.SceneOptimizer:ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall,bool,bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:51)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor:PerformSceneOptimization (bool,bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:192)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor:SceneOptimizationPanel (bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:579)
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,UnityEngine.GUIStyle,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (string,System.Action`1<bool>,bool,UnityEngine.GUILayoutOption[])
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor:OnInspectorGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:126)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditorWindow:OnGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Windows/SceneOptimizerEditorWindow.cs:148)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

 

Link to comment
  • Solution

You will want to disable Merge Colliders in the Objects that they are being placed under. 
For example your screen shot shows Medium objects. 
Go to the Scene Optimizer Main window - Optimization settings - Medium Objects - General Settings 
Then disable merge colliders, you can enable add colliders if you needed to: 
image.png
 

Link to comment
  • Bryan locked this topic
Guest
This topic is now closed to further replies.
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...