Jump to content

Exceptions when optimising new Gaia terrain as root


mroshaw

Recommended Posts

Posted

Hi!

 

I have set up a brand new project in Unity 2021.3.11f1, HDPR 12.1.7 with Gaia Pro 2021 3.3.0 and Scene Optimizer 1.1.0.

 

I've spawned a biome using the out-of-the-box Alpine Meadow biome spawner. I've then set Scene Optimizer loose on the Terrain Game Object, to see how it can optimize all of the Gaia spawned Game Objects (e.g., stones and bushes). I've checked both "Merge Colliders" and "Add Colliders" against all 4 default optimisation commands (Small, Medium, Large, Extra Large objects).

 

It's hard to tell if optimisation has completed or not, but there are two exceptions thrown in the console during optimization:

Couldn't add object to asset file because the Mesh 'M0_L20_0' is already an asset at 'Assets/SO_UserData/OptimizedObjects/GaiaScene/Medium Objects/SP0/LG0/M0_L20_0.asset'!
UnityEngine.StackTraceUtility:ExtractStackTrace ()
ProceduralWorlds.SceneOptimizer.EditorEvents:EditorSaveMeshToDisk (UnityEngine.SceneManagement.Scene,UnityEngine.Mesh) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Utilities/EditorEvents.cs:103)
ProceduralWorlds.SceneOptimizer.SceneOptimizer:PostProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall,bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:105)
ProceduralWorlds.SceneOptimizer.SceneOptimizer:ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall,bool,bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:48)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor:PerformSceneOptimization (bool,bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:194)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor:SceneOptimizationPanel (bool) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:581)
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:128)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditorWindow:OnGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Windows/SceneOptimizerEditorWindow.cs:148)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

 

UnityException: Creating asset at path Assets/SO_UserData/OptimizedObjects/GaiaScene/M0_L20_0.asset failed.
ProceduralWorlds.SceneOptimizer.EditorEvents.EditorSaveMeshToDisk (UnityEngine.SceneManagement.Scene scene, UnityEngine.Mesh sharedMesh) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Utilities/EditorEvents.cs:103)
ProceduralWorlds.SceneOptimizer.SceneOptimizer.PostProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall optimizeCall, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:105)
ProceduralWorlds.SceneOptimizer.SceneOptimizer.ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall optimizeCall, System.Boolean useGaia, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:48)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.PerformSceneOptimization (System.Boolean useGaia, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:194)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.SceneOptimizationPanel (System.Boolean helpEnabled) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:581)
PWCommon5.EditorUtils.Panel (UnityEngine.GUIContent panelLabel, System.String helpKey, System.Action`1[T] contentMethod, UnityEngine.GUIStyle labelStyle, System.Boolean ignoreGuiChange, System.Boolean defaultStatus, System.Boolean showVersionNumber, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
PWCommon5.EditorUtils.Panel (UnityEngine.GUIContent panelLabel, System.String helpKey, System.Action`1[T] contentMethod, System.Boolean ignoreGuiChange, System.Boolean defaultStatus, System.Boolean showVersionNumber, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
PWCommon5.EditorUtils.Panel (System.String nameKey, System.Action`1[T] contentMethod, System.Boolean defaultStatus, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.OnInspectorGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:128)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditorWindow.OnGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Windows/SceneOptimizerEditorWindow.cs:148)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEditor.DockArea.OldOnGUI () (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <24cb545f0fda44d7a6fbdc3f90b29dfb>:0)

 

This is a completely fresh project, nothing other than Gaia and Scene Optimizer, and I've dragged the Terrain from within the Gaia Terrains Game Object, into Scene Optimizer to optimise:

 

image.png.6f7cb266a41572b5e9a8684c86154f27.png

As I say, "Merge Colliders" and "Add Colliders" are both enabled across all commands.

 

Any thoughts?

 

Thanks again!

image.png

Posted

I'll try with 1.1.1 and will let you know!

Posted

Hey Manny,

 

Same exception with 1.1.1:

 

UnityException: Creating asset at path Assets/SO_UserData/OptimizedObjects/GaiaScene/M0_L20_0.asset failed.
ProceduralWorlds.SceneOptimizer.EditorEvents.EditorSaveMeshToDisk (UnityEngine.SceneManagement.Scene scene, UnityEngine.Mesh sharedMesh) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Utilities/EditorEvents.cs:103)
ProceduralWorlds.SceneOptimizer.SceneOptimizer.PostProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall optimizeCall, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:105)
ProceduralWorlds.SceneOptimizer.SceneOptimizer.ProcessSceneOptimization (ProceduralWorlds.SceneOptimizer.OptimizeCall optimizeCall, System.Boolean useGaia, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Runtime/SceneOptimizer.cs:48)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.PerformSceneOptimization (System.Boolean useGaia, System.Boolean recordUndo) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:194)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.SceneOptimizationPanel (System.Boolean helpEnabled) (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:581)
PWCommon5.EditorUtils.Panel (UnityEngine.GUIContent panelLabel, System.String helpKey, System.Action`1[T] contentMethod, UnityEngine.GUIStyle labelStyle, System.Boolean ignoreGuiChange, System.Boolean defaultStatus, System.Boolean showVersionNumber, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
PWCommon5.EditorUtils.Panel (UnityEngine.GUIContent panelLabel, System.String helpKey, System.Action`1[T] contentMethod, System.Boolean ignoreGuiChange, System.Boolean defaultStatus, System.Boolean showVersionNumber, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
PWCommon5.EditorUtils.Panel (System.String nameKey, System.Action`1[T] contentMethod, System.Boolean defaultStatus, UnityEngine.GUILayoutOption[] options) (at <5e780e565d3b4b63836c767b4e8e9d7f>:0)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditor.OnInspectorGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Tools/SceneOptimizerEditor.cs:128)
ProceduralWorlds.SceneOptimizer.SceneOptimizerEditorWindow.OnGUI () (at Assets/Procedural Worlds/Scene Optimizer/Scripts/Editor/Windows/SceneOptimizerEditorWindow.cs:148)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEditor.DockArea.OldOnGUI () (at <4e64905d831f4883a53259ef37fb023b>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <d6d3e943009b43f5918507e063c0198e>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <24cb545f0fda44d7a6fbdc3f90b29dfb>:0)

 

It seems to be related to having "Add Colliders" checked. If I don't check that, I don't see the exception.

Posted

Hi Manny, 

Any thoughts on this? I'm unable to use Scene Optimiser for my terrains and Gaia spawns. 

 

Thanks! 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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...