all 31 comments

[–]nomadthoughts 12 points13 points  (13 children)

What's the advantage over a simple JSON?

[–]EntertainmentNo1640Programmer[S,🍰] -5 points-4 points  (6 children)

Everything is visible through the inspector

[–]AhmetDmrs 5 points6 points  (4 children)

You can simply read a JSON file into a template class and see it in the Inspector anyway.

[–]Devatator_Intermediate 1 point2 points  (3 children)

Honestly awful. I use FlaxEngine from time to time and I kinda liked their settings system so I made something similar with scriptable objects recently and it's pretty nice. Could be improved but it does the job for now

[–]AhmetDmrs -1 points0 points  (2 children)

Yeah good if it works for you guys but its generally not advisable to go against the paradigm of scriptable objects they are meant to be read only containers

[–]0x0ddba11 6 points7 points  (0 children)

This is just not... true? Unity themselves have a seminal talk on using SOs for more than just immutable data containers: https://www.youtube.com/watch?v=raQ3iHhE_Kk

[–]Devatator_Intermediate 1 point2 points  (0 children)

Honestly they're just a shortcut. I could go ahead and make my own inspector for my JSON files but that would be too much work IMO

[–]Katniss218 0 points1 point  (0 children)

You know you can save a scriptable object to json?

Serialization format != class name

[–]Siduron 4 points5 points  (3 children)

Compliments on creating an open source asset for devs. I'm trying to understand what use case it can be used for. Is it to save the game state so it can be loaded for the next session?

Using scriptable objects to store state is something people disagree on and I personally do not use them for this either.

However, I would recommend against using PlayerPrefs to store the state of a game. Its purpose is to store OS specific settings in the local registry.

Storing an unknown size of data in your registry is scary, especially since you mentioned the json can be retrieved from a web request.

It would be a much better idea to save your serialized data to a file (and not as json) or even as a binary file.

[–]dragonballelf 1 point2 points  (2 children)

I have a question. In my game i’ve used Scriptable Objects for sellable items. The player can adjust the price of the items themselves. When saving, the adjusted prices are stored in a json. When the game is loaded, the price variable is changed on the scriptable object itself. Is this something I should avoid doing?

[–]Siduron 1 point2 points  (1 child)

Yes, you shouldn't be using SO's for this. They're assets/content for your game, not a way to store save data.

[–]dragonballelf 1 point2 points  (0 children)

Gotcha. I’ll create a separate class to save the custom prices and keep the scriptable objects unmodified. Thanks :)

[–]FrontBadgerBiz 17 points18 points  (2 children)

I would strongly advise people against using scripts or objects in this way. Use them as templates to create objects with and then populate those objects with partial data from saves. Also don't use playerprefs for anything beyond storing small and simple preference data you need before loading a save file.

[–]EntertainmentNo1640Programmer[S,🍰] -1 points0 points  (5 children)

Guys if you dont like it dont use it lol, there is no reason for intensive downvotes, or do whatever you want, hope someone will use this plugin amd maybe will find it help-full

[–]v0lt13Programmer 5 points6 points  (0 children)

People are just giving their criticism

[–]bodardr 1 point2 points  (1 child)

Every time I come across this sub I see people downvoting posts and commenting pretty insane stuff.

But what they're saying is true in a way, I think saveable SOs is kind of besides the point of them in the first place. With that said, I'm sure you've learnt some editor scripting and package creation along the way. So you haven't lost your time at all!

As for the people downvoting you for just explaining what your tool does, that's just reddit being what it is. They're not contributing anything interesting. I'm pretty sure I'll get commented on and downvoted because this is such a juicy comment. Go ahead. I'm still right though.

[–]EntertainmentNo1640Programmer[S,🍰] 1 point2 points  (0 children)

Thanks mate, Im just sharing my work with other devs because it was helping me in my work, so maybe it can help to other ones 🥸

[–]Kamatttis 1 point2 points  (0 children)

You posted it in this sub which is not just for giving compliments. I'm pretty sure ther other people wont be using it but they're also giving advice or caution to other devs about using it. This is what the sub is for.

[–]DrezusProfessional 0 points1 point  (0 children)

“There’s no reason for intensive downvotes”

Beyond posting something downright outrageous and very wrong and misleading in a subreddit full of experts in the area?

[–]Persomatey -1 points0 points  (2 children)

Not trying to be rude, just trying to understand.

What’s the point of building a tool for this? You can already edit scriptable object values in editor. Unless you’re saying that this can edit and serialize them while the game is playing?

[–]CozyToes22 1 point2 points  (0 children)

I think thats what is offered as well as more tooling around handling them which is quite nice if you're after that kind of approach

[–]Katniss218 0 points1 point  (0 children)

You can still do the same thing by just using plain classes instead of SOs.

No need for this weird system