Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when trying to connect nodes in prefab edit mode
#1
I discovered an error when trying to connect nodes in runtime when prefab editor is open.



Code:
[Curvy] Couldn't find Curvy Global Manager. Please raise a bug report.
UnityEngine.Debug:LogError (object)
FluffyUnderware.DevTools.DTLog:LogError (object) (at Assets/Plugins/ToolBuddy/Dependencies/DevTools/Classes/DTUtility.cs:914)
FluffyUnderware.Curvy.CurvyConnection:Create (FluffyUnderware.Curvy.CurvySplineSegment[]) (at Assets/Plugins/ToolBuddy/Assets/Curvy/Scripts/Splines/Connections/CurvyConnection.cs:148)
Lupos.TowerBreak.TowerBreakDefence.Props.Prop.Modules.PropSpline.PropSplineBuilderMb:ApplyConnection (Lupos.TowerBreak.TowerBreakDefence.Props.Prop.Modules.PropSpline.PropSplineNodeGenerator.SplineControlNodeMb) (at Assets/Lupos/TowerBreak/TowerBreakDefence/Scripts/Props/Prop/Modules/PropSpline/PropSplineBuilderMb.cs:181)
Lupos.TowerBreak.TowerBreakDefence.Props.Prop.Modules.PropSpline.PropSplineBuilderMb:ApplyConnections (Lupos.TowerBreak.TowerBreakDefence.Props.Prop.PropMb) (at Assets/Lupos/TowerBreak/TowerBreakDefence/Scripts/Props/Prop/Modules/PropSpline/PropSplineBuilderMb.cs:160)
Lupos.TowerBreak.TowerBreakDefence.Props.Prop.Modules.PropSpline.PropSplineBuilderMb/<>c__DisplayClass25_0:<Build>b__2 () (at Assets/Lupos/TowerBreak/TowerBreakDefence/Scripts/Props/Prop/Modules/PropSpline/PropSplineBuilderMb.cs:138)
Doozy.Runtime.Global.Coroutiner/<DelayExecutionToTheNextFrame>d__15:MoveNext () (at Assets/Doozy/Runtime/Global/Coroutiner.cs:147)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
Reply
#2
Hi

What version of Curvy Splines where you using?

From reading the stack, I see that Curvy Splines does not find the _CurvyGlobal_ object, and could not create it. The latter happens as far as I know either while destroying a scene, or when in prefab mode. Were you in one of these situations?
If you can provide more information and/or reproduction case, I will hopefully be able to fix the 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
#3
Version: Curvy Splines 8.6.1
And yes as the op stated, it was in the prefab editor.
Reply
#4
Sorry, my bad. I will take a look at this issue very soon. If you can easily send me a reproduction case, please do that will make the debugging process easier and faster.
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
#5
Hi

Creating connections while in prefab mode is not allowed. This is an unfortunate consequence of how things were designed initially:
The issue comes from the fact that connections are stored in a separate object, the _CurvyGlobal_ object which has a component of type CurvyGlobalManager. Because of this, creating a connection in prefab mode is not allowed, since it would modify an object that exists outside of the prefab.

A work around for this limitation could be to make your script check if it is running in prefab mode (PrefabStageUtility.GetCurrentPrefabStage() != null) and create the connections only when not in prefab mode.

The error message you got was misleading. Sorry for that, I will correct the message in the next update.

Did this help?
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
  Disable rebuild of meshes in dynamic mode Zilk1 3 12 05-27-2024, 08:14 AM
Last Post: _Aka_
  playmaker integration error DNeville 5 9 05-23-2024, 07:01 AM
Last Post: _Aka_
  Support for "Fast Enter Play Mode" via "No Domain Reload" XtroTheArctic 5 9 11-27-2023, 12:03 PM
Last Post: _Aka_
  Raise spline events during edit mode arcadeperfect 3 9 08-24-2023, 08:38 AM
Last Post: _Aka_

Forum Jump: