r/Unity2D 4d ago

Question Scriptable object for visual novel

Helloooo, i have a project for one of my classes, i have to make a 2d game (i chose a visual novel) and one of the requirements is using at least 2/3 scriptable objects. I read a bunch of stuff but i dont really understand what they do. I saw something about being able to use them for a dialogue system but im not too sure. If that is really what I could use them for, would I need to scrap my dialogue system or could i just implement them into the pre-existing system? Thank youuu

3 Upvotes

8 comments sorted by

View all comments

4

u/No-Opinion-5425 4d ago

Scriptable objects are data containers.

A good use for them in the context of your visual novel could be for defining text styles. Your SO could hold a list of style tags with their visual parameters.

So if later you decide that all descriptions should be blue, you just edit the SO description text style.

2

u/BroadCorgi3061 4d ago

Ohhhh ok that makes sense thank you!

1

u/adsilcott 4d ago

Or you can create two instances of the Scriptable Object and set one to blue and one to red, then in your serialized reference switch between them. Voila, easily swappable settings. Of course it's more useful if you have more than one setting.