Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curvy Splines Built In Editor Undo causes issues.
I believe I stated this issue before but ill state it again in case it hasn't been addressed.

I have an undo system built into my game (using ctrl+z, and ctrl+shift+z for redo). The problem I'm running into is how CurvySplines editor seems to work. It appears to register an undoable action when making connections (and possibly elsewhere). The problem is if I accidentally leave keyboard inputs enabled when in play mode, the system will undo things causing strange, unexpected errors within curvy.

It makes sense that ctrl+z would undo an editor action in playmode if I still have the keyboard enabled, but for it to undo a runtime action is very odd to me.

Is it possible to add a check for if its in playmode and just not record undoable inputs if so?

I noticed you have an #if UNITY_EDITOR check, however I believe this only runs when actually compiling the game. I still believe you need to add a Application.IsRunning or something similar.
Hi Lupos

To keep things coherent, Curvy's behaviour mimics the one from Unity. Unity allows for undoing its operations in the editor even in playmode. Most users expect that undoing works in playmode. Curvy Splines is designed to match that expectation.

Your case (implementing an in-game undoing system) is uncommon. Reworking Curvy's undo system to fit this use case, as part of the next update, is not easily justifiable, compared to working on other features that would benefit most users.

If you are willing to do the modification yourself, you will have to look for all the occurrences of calls to Undo.<something> and handle the check on play mode.
I am open to implement this feature as part of a contractual work, let me know if you are interested in commissioning such work.

Have a nice
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 9 27 05-17-2024, 09:35 AM
Last Post: _Aka_
  Twisting Splines ZiggZagg 6 11 05-14-2024, 04:48 PM
Last Post: _Aka_
  Help with procedural roads and splines ramiroflores 1 6 05-07-2024, 08:57 AM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_

Forum Jump: