Game Events - Power & Simplicity in Unity3D

preview_player
Показать описание
Learn how to use simple, easy to understand, scriptable objects with events to build an extensible and manageable game architecture or just solve the killer problems of cross referencing Unity3d gameobjects & prefabs across scenes.

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

- free Asset on Unity store implementing all this for you. There is only one major flaw with this pattern, which is never talked about. I learned the hard way, after implementing this in my project.
That is, that you lose any reference-tracking with implementing this ScriptableObject event (or any other type) system.
What do I mean with that? If you take a look again into your IDE (Visual Studio), you will notice that there is no helper for WHICH class is calling/using this ScriptableObject. It is a interface into the void.
You are fine with 1-5 ScriptableObjects like that. But in a more bigger project, you will effectively have 100's of those, to manage your game mechanics. And will suddenly wake up in a nightmare. "Can I safely delete or modify this SO, is anything still using it?", "which systems are actually using this SO?" those will be your main concerns each day.
I found it to be very frustrating and removed the system completely at the end.
Just a heads up.

victoraurelius
Автор

Very interesting. I work with designers a lot, but never thought of exposing events to them like this. Thanks for sharing.

peterhou
Автор

I use a similar pattern with C# Action delegates for blistering fast performance and ease of communicating across scripts in my project.

iDerp
Автор

Jason, i just wanted to report back and say I used game events/Scriptable objects for the first time today after watching your vids, and also I read the article you mentioned and wow, very powerful stuff! I'm glad it totally clicked with me because the biggest thing that always seems to be holding me back when i tried any game engine, is getting all the parts to communicate properly without errors or bugs, to the point where it actually overwhelmed me more than anything.. and finally i feel i've found a way to build my games that really suits me and won't have me pulling my hair out thanks to your videos! I just got up and legit cheered when I just had an event easily do everything i wanted it to do, felt so good! Multiple features in my game just got added within 20 minutes because the only solution i needed was a way for the parts to communicate as some were not.

That article is fantastic too the way it breaks down the sword data and what not, thats a great example to refer to. I think a lot of people are like me where even though they may be somewhat new to programming/Unity, they can actually code stuff they need to make or always find a way but they just suffer with the fundamentals like how to get parts of the game to communicate easily without running into walls, more people need to see these videos and be aware of Scriptable Objects and Events and how they can tie together. I feel more free now to make my game.

Choco-skgj
Автор

I have a playlist with game dev tutorials for when I get deeper into a project and i bump into problems / want to improve performance and so far your channel totally dominates said playlist. Literally the best programming channel for game makers! Sincerely thank you man.

ivandamyanov
Автор

This is great stuff Jason. Your specific tutorials such as this one always help me out a lot. Your channel is great!

kellyrodgers
Автор

0:23 Getting fancy with the editing there!

joliveres
Автор

Incredible timing! I started learning about the observer pattern and C# delegates yesterday!

Ryan-wwun
Автор

I didn't appreciate the events until I had to turn my 3d game into d2. Swapping scenes, collisions etc. I was downright shocked at how easy it was for me. Most of the logic was based on them. And this is just lvl 2 of this :D It's great.

szaaary
Автор

OG Jason is back!!! Love this kind of content <3

geri
Автор

Agree 100%! I've built my game using Scriptable Objects with events extensively and it saves you so many headaches! Everything is much better separated and can still tightly work together.

yellowmarschmallow
Автор

Really interesting. I like how well it is explained and is not only for advanced users (explaining quickly each concept). Thanks!

matounette
Автор

Brilliant having moved back to Unity from UE recently. This technique will keep me working my core game mechanics rather than working on say dissolve mesh effects before the core game is done :)

sqwert
Автор

You make a huge difference in my life as a developer. When I finish some games and start making money with it I'll definitely become a Patreon. Thanks for the videos!

Автор

Thank you for this video. It really simplifies triggering actions between scripts a ton.

UnfamiliarLandsGame
Автор

Clever Code. It takes little effort to understand and it takes you to another level. Awesome.

fernandoz
Автор

Game programming is truly overwhelming, I'm currently trying to learn patterns like factories, observers, commands, adapters, etc. and there's always something new popping up. Just learned about abstract classes and invokes and now here comes game events, and I know it's just the beginning! Does it ever end? I find most of this stuff really hard to learn without real examples of how to implement them, and it gets even harder when you try it yourself on more complex features. All this knowledge is insanely fragmented into hundreds of courses, books and youtube tutorials. How do most people learn about all of this?

Chronomatrix
Автор

This is a great technique; thank you for sharing it! I appreciate the way you frame explanations of a system with potential use cases and intent. It makes things very clear and straightforward.

ViciousProgressor
Автор

Appreciate the fact that you explained every little thing that you were doing. Good job!

leohunter
Автор

This is a really useful system. I first seen it used from a Unite talk on scriptable objects.

MegaBoxer