Unity Tutorial - Item / Story Dialogues | Scriptable Object Events

Опубликовано: 26 Март 2026
на канале: Infinity PBR • Magic Pig Games
5,048
147

In this Unity / C# tutorial, create story dialogues for your items, signs, letters, and NPCs with an easy drag-and-drop scriptable object event system.

You can download this project here:
https://drive.google.com/file/d/13sEd...

-- IMPORTANT-- Import Instructions:
Before importing the package, go to Window / Package Manager and then in "Packages: Unity Registry" install "Input System." Also import "TextMeshPro" and "ProBuilder."

Then you can import (Assets / Import Package). If you imported first, get the packages, delete the imported folder and import again.

Our fantasy assets (goblin, flying eye, etc.) are all here:
https://assetstore.unity.com/publishe...

0:00 Intro
0:49 The Orb-server Pattern
2:18 Simple Orb Example
4:48 SO Event Scripts
6:15 Object Dialogue Overview
8:20 Creating Examinable Object
13:25 Scripts Overview
15:55 Considerations
16:40 C# Events
17:15 Thanks!

Using scriptable objects as an event system was first introduced by Ryan Hipple at Austin Unite 2017:    • Unite Austin 2017 - Game Architecture with...  

This concept is also used in Unity's Open Project. I'm using some things from the Open Project ("InteractionManager") and have simplified them. The "InputReader" SO comes from:
   • Handling complex input | Open Projects Devlog  

Check out Infallible Code's discussion on SO events (and Ryan Hipple's comment):
   • Pros and Cons of Using Scriptable Objects ...  

And thank you to Ciro @ Unity (Open Project) for your help on Discord!
The thumbnail icons come from https://game-icons.net/

Spellbook by Delapouite
Totem Head by Lorc
Galleon by Lorc
Stabbed Note by Delapouite
(CC By 3.0)
https://game-icons.net/1x1/delapouite...
https://game-icons.net/1x1/lorc/totem...
https://game-icons.net/1x1/lorc/galle...
https://game-icons.net/1x1/delapouite...

Join Jim from Infiniti PBR as we explore the exciting world of integrating story elements into your Unity games using Scriptable Object Event systems. This video diary of a developer dives deep into the intricacies of creating a highly interactive, immersive game narrative, focusing on real-time events triggered by the player.

We use a goblin character to illustrate how you can enrich your player's experience, enabling them to interact with the environment, examine objects, and initiate dialogues.

Not only do we delve into practical applications, but we also make programming concepts accessible with illustrative story examples, targeting both experienced developers and those new to C#. You'll get a handle on how to use a Scriptable Object event system to manage player interactions in a streamlined, intuitive manner.

In this diary entry, we recreate a hypothetical 'fantasy February' restaurant scene to explain the 'Orb-server Pattern', a concept fundamental to our interactive game development. We then take these lessons back into Unity, setting up event channels, and crafting reactions to events coming through.

Walk with us as we dissect the SO Event Scripts, exploring how to register, raise, and respond to events on these channels, with our little goblin scene serving as a visual guide.

The tutorial also includes an overview of creating interactive dialogue objects or items, and we'll guide you through the steps of implementing such an object in your game.

Remember, this developer's diary is not just a tutorial; it's a journey through game development, where we share our insights, our challenges, and our triumphs.

Feel free to comment below on your experiences with game development, and share any tips you may have discovered along the way. We'd love to hear from you!