Unite Europe 2016 - Overthrowing the MonoBehaviour tyranny in a glorious ScriptableObject revolution

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

Help us caption & translate this video!

Рекомендации по теме
Комментарии
Автор

One minor errata: On the slide about Reload-proof Singletons, I use 'FindObjectOfType' to retrieve the singleton object. This will use Object.FindObjectOfType, which will fail to find objects that are marked with HideAndDontSave... what you should use instead is Resources.FindObjectOfType, which should find the singleton correctly. I think I fixed it in the demo project already.

richardfine
Автор

One of the best talks given 1. clarity, 2. depth, 3. great examples

Feynaro
Автор

Fantastic talk Richard! Very informative. I've been using SO with lists for a few months and this was enlightening. I'm still on unity version 5.0 and now I'm tempted to update to use some of these wonderful new features shown here.
Please do not be discouraged by the naysayers as we need MORE high level talks such as this. There's an overabundance of beginner tutorials and youtubers teaching the basics. Anyone who thinks this was bad bc it's above their understanding should be directed to the live training on unity archives. Thanks for your time.

FitnessEat
Автор

Holy moley this is EXACTLY what I needed to hear to be convinced on ScriptableObject. The project I'm working on uses so many 'singleton-like' shared controllers that would be perfect for scriptableobject! I knew about them, but I wasn't quite convinced to use them until this talk. Great presentation, 5/5. Be careful with that 'radio' voice though.. it was almost too soothing xD

bdafeesh
Автор

Good bye different GameManager objects. By the way it is really nice to see someone who actually is working with code a lot.

anonymousmokona
Автор

So many knowledge and good practices in just 50 minutes. Thanks, Bro!

giertych
Автор

From what I can tell the concerns on MonoBehaviours are all centered around just general carelessness. For example: You will only have an orc with 300 health if someone willingly makes it 300, puts it into a scene and apply/save it. This can be fixed easily if you instead apply the orc prefab with health of 100 and have a spawner of sorts instantiate the object. Then again, I work alone so that's just me.

legoguy
Автор

Thanks so much, Richard. This was precisely the guidance I needed in handling a tricky problem of managing some shared data using .asset files, and managing the life cycle of that data in memory.

scottcourtney
Автор

25:17 Reload-proof Singleton ScriptableObject, this is gold

shadesbelow
Автор

I've been using ScriptableObjects for custom asset files for a few years now, and it's one of my favorite things when working in Unity! I didn't know about the CreateAssetMenu attribute and was using a little Editor script to add the menu items - this'll be a big time saver!
I also didn't know about loading from external files with JsonUtility - that's a real game-changer for me! My one complaint about custom assets was that they weren't open to modders, since the files are packed into the game. I am delighted to be wrong!

Tayrtahn
Автор

i just discovered this and its saved the fucking life of my project

XnecromungerX
Автор

Great talk! Thank you so much! Can't wait to take a look at the demo project. :)

Xarbrough
Автор

Good job Richard Fine, another great talk from you! :)

tatoforever
Автор

Great presentation
Thanks for providing the Demo project

rwells
Автор

Richard, could you explain the benefits of doing a Delegate Objects Pattern vs attaching a new MB that does it's own work inside it's own coroutine attached to a Prefab? It seems prefab can do the same, including persisting data from play mode.

grue.
Автор

34:34 He did not explain where "Shell Explode" scriptable object is used. He created scriptable object but he did assign it in the Inspector Window.

kayumiy
Автор

An important thing to note with ScriptableObjects is that you CANNOT instantiate them at runtime on a built project. This is something that caused me a lot of pain in the past because all of you logic will work just fine when testing in the editor. Just something to keep in mind if you are going to use them you may need to reference an asset. But if you are using them for editor tools that isn't an issue.

DetectivePoofPoof
Автор

This part of the demo code does not make sense to me, if we DO NOT have an instance of the, destroy it? How can you destroy it if it does not exist?

public static void LoadFromJSON(string path)
{
if (!_instance) DestroyImmediate(_instance);

endasil
Автор

This is really clever solution to a lot of problems I have had with unity.

I'm not sure if the original presenter will be reading these, but how does ScriptableObject work with something like the decorator pattern?

Yokain
Автор

ScriptableObjects are they are saved by reference?, if so and you were doing something like a loot table with a dictionary or list of custom Loot classes on the scriptable object. Would referencing an item in the list be saved as references, or would they need to be ScriptableObjects as well?

Artamaru