Unite 2016 - Overthrowing the MonoBehaviour Tyranny in a Glorious Scriptable Object Revolution

preview_player
Показать описание

This session goes over ScriptableObject class in detail, compares it to the MonoBehaviour class and works through many examples of how it might be applied in a project.

Richard Fine - Unity Technologies

00:00 Intro
1:34 The MonoBehaviour Tyranny
5:58 Uninstantiated prefabs help a bit, but...
8:31 C# statics are very DIY
9:34 ScriptableObject
10:51 How ScriptableObject saves us pain
12:55 How to declare + reference ScriptableObject
13:55 How to create ScriptableObject
15:49 ScriptableObjects Callbacks
17:18 ScriptableObject Lifecycle
18:05 A note on Destroy() / DestroyImmediate()

20:55 Patterns
21:29 Data Objects and Tables
23:39 Extendable Enums
25:44 Dual Serialisation
26:37 Dual Serialisation example
28:31 Reload-Proof Singletons
30:14 Reload-Proof Singletons example
31:44 Delegate objects
32:53 Delegate objects example
35:44 Practice
35:49 TANKS! Demo
Рекомендации по теме
Комментарии
Автор

I think the reason most people don't know about it is because none of the tutorials or live training sessions ever mention it. Every Unity Learn video I've seen relies on the singleton design pattern using static variables in a game controller script.

nipponese
Автор

[1:00] In this talk
[1:34] The MonoBehaviour Tyrrany
[5:58] Uninstantiated prefabs help a bit, but...
[8:31] C# statics are very DIY
[9:34] ScriptableObject
[10:51] How ScriptableObject saves us pain
[12:55] How to declare + reference ScriptableObject
[13:55] How to create ScriptableObject
[15:49] ScriptableObjects Callbacks
[17:18] ScriptableObject Lifecycle
[18:05] A note on Destroy() / DestroyImmediate()

[20:55] Patterns
[21:29] Data Objects and Tables
[23:39] Extendable Enums
[25:44] Dual Serialisation
[26:37] Dual Serialisation example
[28:31] Reload-Proof Singletons
[30:14] Reload-Proof Singletons example
[31:44] Delegate objects
[32:53] Delegate objects example
[35:44] Practice
[35:49] TANKS! Demo

unityberserkers
Автор

This guy is a really good speaker, and the information is priceless for game developers. Thanks for sharing this wonderful talk!

tonyrigatoni
Автор

I'm starting to think that planning code architecture with scriptableObjects in Unity is actually more fun than playing actual games

DerrickTheFork
Автор

Absolute mandatory talk for anyone even remotely interested in using Unity for more than day or two. Sad that it only has a handful of likes, and even sadder still that in 2021 almost all the tutorials you find on YouTube, Udemy, etc. don't come close to teaching these patterns!

notsospy
Автор

So much good stuff in here, I highly recommend downloading his repo to check out his code first hand. That audio preview is extremely clean. Thank you Richard

NoComment_Plays
Автор

Mister Fine, your talk is still as of today the most influential and useful 'learning' element I could run into among all the tutorials/Unity Learn videos/stack overflow posts/e-book I ever saw/read.
For this, I send you my Regards !

vincentdaxbek
Автор

As an experienced software engineer coming back to Unity after 10 years, when I saw ScriptableObject referenced in one of the eBooks, I was instantly interested. Simplicity is indeed king and from an architectural standpoint, using these for A LOT of different purposes is so much cleaner than jamming singletons or MonoBehaviors everywhere.

RenegadeVile
Автор

this video just changed everything about the way i build games. Everything. Thank you so much I dont stray from mono very often but i will now for sure

MElsy
Автор

This talk is awesome!! Thank you! As a new Unity developer this has resolved most of my heaviest concerns I've had since trying to learn game development. Im so excited to get home and fix my code :)

rad-man
Автор

Fantastic talk, this sounds incredibly useful. I'm not sure I can wrap my head around how to actually use them yet, but I can look up the documentation for that hopefully. (I'm really less than 2 weeks in to actually using Unity. A lot to learn still.)

BJBaye
Автор

this is an amazing talk. my mysophonia was on fire with the lip smacking at the end of every sentence, but... its so informationally relevant 7 years later i watched the whole thing!

benjaminhawkins
Автор

48:40 Ok, this is where the ScriptableObject potential is starting to click for me. Thanks Richard and team!!

ClutchGen
Автор

Watching in 2020, still a good intro.

ccerrato
Автор

Amazing !
I'm a Game Design student, finishing my 2nd year. Next year we will be focusing on producing a game along with the artists of the school, and this talk has been very inspiring on how we can manage implementation on a wider production than the prototypes we've done so far !

noejacques
Автор

This man is peak performance. Clear presentation, zero filler everything needed for understanding even to a newbie like me that only gets the most basic concepts of OOP.

drawnsequence
Автор

I've watched this like 20 times. I thought it made sense, I just wasn't fully ready to hear it until today

elbow
Автор

I was just struggling with a problem without clues on how to cope with in a decent way, and voila' the answer: Scriptable Objects! thank you for this precious class

soogoonu
Автор

Fantastic presentation and game changer .. for making games.

TheSacrificialLambda
Автор

This can work amazingly well with state machines and custom mod support.
It supports functions as well. Meaning you can make an interface with scriptable objects to add functions to for example, transition to certain states.
The ScriptableObject can hold all the stats, animation and conditions and any custom npc, enemy or feature can simply tell the other player's state machine to enter into their state they've made in a scriptableObject.
I love open mod support that's flexible, powerful, just like in game content and easy to use for anyone.

magnusm