Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack overflow when editing prefab containing splines
#4
Hi

(11-30-2022, 05:35 AM)rhys_vdw Wrote: Ah, I think so? Our artists just followed this tutorial adding objects to the prefab in prefab editor mode.

https://youtu.be/eP6QEn9SFoM

Then when I checked out her changes and opened the prefab it started happening.

Thanks for the details, I managed to reproduce the issue. I tested the current LTS versions, and all but 2019LTS have the issue. The issue seems to be due to changes introduced in Unity post 2019LTS.

I will try to fix this issue, but until then I have a work around. I will come back to this later.

(11-30-2022, 05:35 AM)rhys_vdw Wrote: It doesn't seem feasible that we would add manager singleton to every prefab, and this is apparently required for editing the spline.

_CurvyGlobal_ is not expected to be part of every prefab. That object is created automatically in the scene when needed. I will even add: avoid including _CurvyGlobal_ in any prefab, except if it is unavoidable.

(11-30-2022, 05:35 AM)rhys_vdw Wrote: I don't think it's appropriate for an editor tool to make scene modifications during edit mode.

Noted. Personally I never thought of this as an issue, but I can see why this can be seen as innapropriate. I will try to fix this in the future.

(11-30-2022, 05:35 AM)rhys_vdw Wrote: (unless it's using the correct hide flags: https://docs.unity3d.com/ScriptReference/Object-hideFlags.html)

_CurvyGlobal_ can be automatically hidden (it sets it's hide flags to HideFlags.HideInHierarchy). To do so, please go to the Preferences menu*, and set Hide _CurvyGlobal_ to true:
https://curvyeditor.com/documentation/toolbar/preferences#hide_curvyglobal

*Preferences menu is available either through the Options/Preferences in Curvy's scene view toolbar, or Unity's Edit/Preferences/Curvy

When hiding _CurvyGlobal_, it is still saved to the scene. This object store some global objects needed by Curvy, like pools for example.

Now back to the workaround: to avoid the stack overflow, have a _CurvyGlobal_ object present in your scene while editing your prefab*. It's not perfect, but I don't think it is too restrictive. Is it? Please let me know of what you thought of it.

*Easiest way to do that: create an empty spiine then delete it. Or drop the prefab in the scene.

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


Messages In This Thread
RE: Stack overflow when editing prefab containing splines - by _Aka_ - 11-30-2022, 10:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Twisting Splines ZiggZagg 5 5 Yesterday, 05:53 AM
Last Post: ZiggZagg
  Help with procedural roads and splines ramiroflores 1 5 05-07-2024, 08:57 AM
Last Post: _Aka_
Information New free asset: Converter For Unity Splines _Aka_ 5 23 04-25-2024, 11:11 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_

Forum Jump: