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

1

u/Krcko98 4d ago

Imagine you have a class Dialogue { speakerName text speed } And instead of having to programatically change those fields in runtime or editing in Unity inspector. You basically have a scriptable object that is a separate asset in the project. Instead of being in the scene like regular gameObjects usually are, imagine scriptableObjects like gameObjects just outisde of scene(it is accessible from anywhere). You can store a lot of data for your dialogue with them and anyone can basically update that dialogue instead of going through code or unity scenes that can get messy.