Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Splines as/in ScriptableObjects
#1
Hi!

So far really impressed with Curvy Splines.

In our game, we have a component that is configured in part by a spline. The rest of this objects configuration works nicely as a ScriptableObject and it would be nice to have the spline effectively included in that configuration. Maybe I'm missing something obvious, as I've tried a few things.

I looked through the calls available on a spline and I don't see anything that looks easily serialized that I could manually grab in an editor script and then inflate from at runtime.

I've scanned the tutorials and don't see anything that looks relevant.

Currently I'm putting the splines on a prefab but I seem some slightly wonky behavior that makes me think this isn't entirely intended usage.

Thoughts on this?

Cheers, thanks!
Reply
#2
Hi

I have a vague understanding of scriptable objects, so please correct me if I say something wrong.
From my understanding, you need to easily import/export splines to a simple data containing class. You can use the FluffyUnderware.Curvy.ImportExport.SerializedCurvySpline class, which is used for importing/exporting splines through the Import/Export wizard. Class should be self explanatory, but if needed you can see an usage of that class in the SplineJsonConverter class.

Please note that SerializedCurvySpline stores most data from a spline, but not all of it, like for example connections.

I hope this helped. Please let me know if you need further help.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Connections Between Opposing Splines lockiidraws 1 401 12-04-2025, 02:14 PM
Last Post: _Aka_
  Spawn at start/ end of splines rickgplus 4 2,612 03-21-2025, 12:34 PM
Last Post: _Aka_
  Any performance 'hacks' for scene with lots of splines rickgplus 1 1,666 03-18-2025, 10:11 PM
Last Post: _Aka_
Smile Simple splines movement shills 3 2,956 02-26-2025, 09:40 AM
Last Post: _Aka_

Forum Jump: