Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline mesh optimization
#1
Hi,
I have used Curvy for a while now and everything was working fine until I started to add more (20 total) splines in my scene.
I setup my generators to create meshs along the spline (from a premade model, no mesh extrusion)

This result in thousands of objects. This affect my scene in various ways, it takes about 25s to exit the play mode when all my Generators are active (2s when I disable them).
My scene file also became very heavy (probably due to all the dynamic mesh infos the generators must save).
So my question is, what's the best practice for this scenario ?
  • Should I create longer meshs to reduce the amount of objects ?
  • Should I switch to extruded splines ?
  • I don't need to modify the mesh in realtime, should I bake it into a single object ?

I read the performance tips documentation but didn't find an answer there.

Thanks for reading my issue, I hope I will find a solution here.

I'm using Curvy 8.4.0

Here is my generated spline :
[Image: cM1elc7.png] 

and spline generator:
[Image: IV2fTyf.png]

Here are my stalls.log
Code:
===== STALL BEGIN at 3470.01
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);mono_threads_exit_gc_safe_region_unbalanced 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;FindObjectsOfTypeImplementation 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();UnityEngine.Resources:ConvertObjects<T_REF> (UnityEngine.Object[]);(wrapper stelemref) object:virt_stelemref_class (intptr,object);(wrapper write-barrier) object:wbarrier_conc (intptr) 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Partition_by_median_guess_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Partition_by_median_guess_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:op_Equality (UnityEngine.Object,UnityEngine.Object) 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Partition_by_median_guess_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Partition_by_median_guess_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;scripting_object_get_class;mono_object_get_class 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh;mono_gc_wbarrier_set_field 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();UnityEngine.Resources:ConvertObjects<T_REF> (UnityEngine.Object[]);(wrapper castclass) object:__castclass_with_cache (object,intptr,intptr) 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh;Scripting::ScriptingWrapperFor 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;scripting_object_get_class;mono_object_get_class 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);mono_threads_enter_gc_safe_region_unbalanced 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh;mono_gc_wbarrier_set_field 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;scripting_object_get_class;mono_object_get_class 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh 2
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();UnityEngine.Object:FindObjectsOfType<T_REF> ();(wrapper managed-to-native) UnityEngine.Object:FindObjectsOfType (System.Type,bool);Object_CUSTOM_FindObjectsOfType;Scripting::FindObjectsOfType;Object::FindObjectsOfType;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Sort_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID>;std::_Partition_by_median_guess_unchecked<Object * __ptr64 * __ptr64,CompareInstanceID> 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;EditorSceneManager::RestoreSceneBackups;PreloadManager::WaitForAllAsyncOperationsToComplete;PreloadManager::UpdatePreloadingSingleStep;LoadSceneOperation::IntegrateMainThread;LoadSceneOperation::PostLoadSceneAdditive;LoadSceneOperation::CompleteAwakeSequence;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::PersistentManagerAwakeFromLoad;AwakeFromLoadQueue::InvokePersistentManagerAwake;MonoBehaviour::AwakeFromLoad;MonoBehaviour::AddToManager;MonoBehaviour::CallAwake;SerializableManagedRef::CallMethod;ScriptingInvocation::InvokeChecked;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.DevTools.DuplicateEditorMesh:Awake ();(wrapper managed-to-native) UnityEngine.MeshFilter:get_sharedMesh (UnityEngine.MeshFilter);MeshFilter_Get_Custom_PropSharedMesh 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;PlayerLoopController::UpdateScene;PlayerLoop;ExecutePlayerLoop;ExecutePlayerLoop;`InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward;BehaviourManager::Update;BaseBehaviourManager::CommonUpdate<BehaviourManager>;MonoBehaviour::CallUpdateMethod;MonoBehaviour::CallMethodIfAvailable;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.Curvy.Generator.CurvyGenerator:Update ();FluffyUnderware.Curvy.Generator.CurvyGenerator:Initialize (bool);FluffyUnderware.Curvy.Generator.CurvyGenerator:Refresh (bool);FluffyUnderware.Curvy.Generator.CGModule:doRefresh ();FluffyUnderware.Curvy.Generator.Modules.CreateMesh:Refresh ();FluffyUnderware.Curvy.Generator.Modules.CreateMesh:UpdateColliders ();System.Threading.Tasks.Parallel:For (int,int,System.Action`1<int>);System.Threading.Tasks.Parallel:ForWorker<TLocal_REF> (int,int,System.Threading.Tasks.ParallelOptions,System.Action`1<int>,System.Action`2<int, System.Threading.Tasks.ParallelLoopState>,System.Func`4<int, System.Threading.Tasks.ParallelLoopState, TLocal_REF, TLocal_REF>,System.Func`1<TLocal_REF>,System.Action`1<TLocal_REF>);System.Threading.Tasks.TaskReplicator:Run<System.Threading.Tasks.RangeWorker> (System.Threading.Tasks.TaskReplicator/ReplicatableUserAction`1<System.Threading.Tasks.RangeWorker>,System.Threading.Tasks.ParallelOptions,bool);System.Threading.Tasks.TaskReplicator:.ctor (System.Threading.Tasks.ParallelOptions,bool);System.Collections.Concurrent.ConcurrentQueue`1<T_REF>:.ctor ();ves_icall_object_new_specific;mono_object_new_specific_checked;mono_gc_alloc_obj;GC_malloc_kind;GC_generic_malloc;GC_generic_malloc_inner;GC_allocobj;GC_collect_a_little_inner;GC_finish_collection;GC_finalize;GC_make_disappearing_links_disappear 1
WinMain;MainMessageLoop;Application::TickTimer;PlayerLoopController::SetIsPlaying;PlayerLoopController::ExitPlayMode;PlayerLoopController::UpdateScene;PlayerLoop;ExecutePlayerLoop;ExecutePlayerLoop;`InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward;BehaviourManager::Update;BaseBehaviourManager::CommonUpdate<BehaviourManager>;MonoBehaviour::CallUpdateMethod;MonoBehaviour::CallMethodIfAvailable;ScriptingInvocation::Invoke;scripting_method_invoke;mono_runtime_invoke;do_runtime_invoke;mono_jit_runtime_invoke;(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr);FluffyUnderware.Curvy.Generator.CurvyGenerator:Update ();FluffyUnderware.Curvy.Generator.CurvyGenerator:Initialize (bool);FluffyUnderware.Curvy.Generator.CurvyGenerator:Refresh (bool);FluffyUnderware.Curvy.Generator.CGModule:doRefresh ();FluffyUnderware.Curvy.Generator.Modules.CreateMesh:Refresh ();FluffyUnderware.Curvy.Generator.Modules.CreateMesh:CreateSpotMeshes (System.Collections.Generic.List`1<FluffyUnderware.Curvy.Generator.CGVMesh>,ToolBuddy.Pooling.Collections.SubArray`1<FluffyUnderware.Curvy.Generator.CGSpot>,bool,bool,System.Collections.Generic.List`1<FluffyUnderware.Curvy.Generator.CGMeshResource>);FluffyUnderware.Curvy.Generator.Modules.CreateMesh:WriteVMeshToMesh (FluffyUnderware.Curvy.Generator.CGVMesh,System.Collections.Generic.List`1<FluffyUnderware.Curvy.Generator.CGMeshResource>);FluffyUnderware.Curvy.Generator.Modules.CreateMesh:GetNewMesh (int);FluffyUnderware.Curvy.Generator.CGModule:AddManagedResource (string,string,int);FluffyUnderware.Curvy.Generator.CGResourceHandler:CreateResource (FluffyUnderware.Curvy.Generator.CGModule,string,string);FluffyUnderware.Curvy.Generator.CGMeshResourceLoader:Create (FluffyUnderware.Curvy.Generator.CGModule,string);FluffyUnderware.DevTools.ComponentPool:Pop (UnityEngine.Transform);FluffyUnderware.DevTools.ComponentPool:create ();UnityEngine.GameObject:AddComponent (System.Type);(wrapper managed-to-native) UnityEngine.GameObject:Internal_AddComponentWithType (UnityEngine.GameObject,System.Type);GameObject_CUSTOM_Internal_AddComponentWithType;MonoAddComponentWithType;AddComponent;AddComponentUnchecked;InitializeIManagedObjectHostCreatedFromCode;SerializableManagedRef::CallMethod;Scripting::GetMethodWithSearchOptions;Scripting::GetMethodWithSearchOptions;Scripting::GetMethodWithSearchOptions;Scripting::GetMethodWithSearchOptions;Scripting::GetMethodWithSearchOptions;scripting_class_get_method_from_name_filter;scripting_class_get_method_from_name_filter;scripting_class_get_method_from_name_filter;mono_class_get_methods;mono_class_get_method_count 1
===== STALL END after 26.79s
Reply
#2
Hi
  1. About heavy scene files: please see =preferences#save_generator_outputs]this
  2. About delays exiting play mode:
    • Longer meshes => less meshes to fill your spline => less processing but also less smooth results.
      To use longer meshes, you can modify the scale property in your Input Meshes module.
    • Extrude splines will have bette performance.
    • You can use the "Save Output To Scene" button in the Curvy Generator output, and then deactivate the generator.
    • The logs you send show the list of methods that were called, but no information about what exactly takes time. If you are willing to investigate more, please use Unity's profiler to see what exactly is taking this long. If you do so, please share the information with me.
I hope this helped. Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Hi Aka,
Thank you for the fast answer !
Deactivating Save Generator Outputs worked well for reducing scene size (when from +100mb to 7mb)

I'm still investigating the long exit times and I did an Editor Iteration Profiling that should help shed some light:

[Image: QeQsBLi.png]

Let me know if I can give you anything else that would be useful
Thanks again
Reply
#4
That code's execution time is proportional to the number of generated meshes, so yes having less meshes will reduce that time. The solutions described in my previous post should solve this issue.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
Is it possible for you to send me a reproduction case, so I can profile things more in detail and see how I can improve the execution time?
Thanks, and have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
Switched to extruded meshs and indeed the issue is gone (even with way more curves) thanks for the solutions !

I'll try to make a reproduction case when I get the time.
Thanks again for helping me, have a great day

edit: Sent you a PM with a link to the reproduction case project
Reply
#7
Update: issue should be fixed in the next release
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  building game changes UV spaces for generated mesh scr33ner 9 11 01-18-2023, 09:16 AM
Last Post: _Aka_
  How to make mesh appear only on curves? Vancete 2 11 01-09-2023, 09:10 AM
Last Post: _Aka_
  Volume Mesh bug based on whether input spline is closed GameJazz 2 10 12-15-2022, 08:32 AM
Last Post: GameJazz
  Changing range affects generated mesh GameJazz 10 32 12-15-2022, 08:28 AM
Last Post: GameJazz

Forum Jump: