Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Warning about multiple Array Pools Settings
I was getting this warning "[Curvy] More than one instance of 'Array Pools Settings' detected. You should keep only one instance of this script." any time I switched scenes from one scene that used Curvy to another that used Curvy.

It seems like the issue is due to the way DTSingleton checks for and removes duplicates. Any time you add Curvy components to a scene it generates a CurvyGlobalManager in that scene with its own ArrayPoolsSettings. If the singleton detects that it is a duplicate it will call "this.Invoke(DestroySelf, 0)" to remove itself, however due to the way the Invoke works it won't be removed until the next tick. That means that the duplicate ArrayPoolsSettings that is attached to the CurvyGlobalManager has a chance to run its OnEnable before being destroyed which throws the warning because for that single tick it detects multiples of itself.

I was able to fix the warning by changing the "this.Invoke(DestroySelf, 0)" to just DestroySelf() and everything seems to work fine. Was there a specific reason that the Invoke was used instead of an immediate call?
Thanks for sharing the issue and its fix with me.
The next update of Curvy Splines will fix a lot of things regarding CurvyGlobalManager. The issue you stated is one of them.
DTSingleton (and DevTools in general) was not written by me, so I am wondering as much as you for the reason the destruction is delayed. I see no valid reason from reading the code, and tests do not show any issue with using DestroySelf right away.
Anything else I can help with?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
I am getting frequent editor crashes (as in the editor shuts down completely) when trying to edit prefabs containing splines and connections. Sometimes the editor doesn't crash completely but spams the console with stack overflow exceptions instead. I assume this is caused by the same issue?
StackOverflowException: The requested operation caused a stack overflow.
UnityEngine.GameObject..ctor () (at <61c05f8d81804e929ff4198c5bcc7a62>:0)
FluffyUnderware.DevTools.DTSingleton`1[T].get_Instance () (at Assets/Plugins/ToolBuddy/Dependencies/DevTools/Components/DTSingleton.cs:47)
FluffyUnderware.DevTools.DTSingleton`1[T].Awake () (at Assets/Plugins/ToolBuddy/Dependencies/DevTools/Components/DTSingleton.cs:58)
FluffyUnderware.Curvy.CurvyGlobalManager.Awake () (at Assets/Plugins/ToolBuddy/Assets/Curvy/Scripts/Other Components/CurvyGlobalManager.cs:315)

I can work around it, but it is a huge pain. Do you have any eta for an updated version of the plugin that addresses this?
I estimate the actual release to around mid-April. But I can probable provide you with a WIP stable version in about 10 days.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Cool, thanks for the update. I can work around the crashes by creating a spline in the scene before opening a prefab, but I'll keep an eye out for the update.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Distance travelled across multiple splines jh092 1 7 02-23-2024, 09:44 AM
Last Post: _Aka_
  Multiple Splines and Generators Performantly for Road System drock 1 6 07-17-2023, 10:31 AM
Last Post: _Aka_
  Multiple ArrayPoolsSettings tairoark 6 11 11-15-2022, 11:34 AM
Last Post: tairoark
  Multiple Mesh Extrude Generator bakin 1 10 09-17-2022, 12:40 PM
Last Post: _Aka_

Forum Jump: