Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curvy Splines Built In Editor Undo causes issues.
#1
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.
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 18 04-25-2024, 11:11 AM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 10 04-03-2024, 03:16 PM
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: