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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 5 13 10-29-2024, 10:19 AM
Last Post: _Aka_
Information New free asset: Converter For Dreamteck Splines _Aka_ 0 0 07-19-2024, 08:27 PM
Last Post: _Aka_
Information New free asset: Converter For Unity Splines _Aka_ 20 61 07-19-2024, 05:15 PM
Last Post: _Aka_
  Invisible Gizmos In Latest Curvy Splines orrenravid1 1 5 06-11-2024, 07:36 AM
Last Post: _Aka_

Forum Jump: