Shared Player Stats with Scriptable Objects ~ Unity GameDev 2023
Chris' Tutorials
Demo of how to share scriptable object runtime data between 4 different MonoBehaviour scripts. The scripts know nothing about each other, only about the scriptable objects so they are decoupled from each other game object that depends on the scriptable object. Also the scriptable object persists between scenes so we don't need to worry about the data resetting between levels.
Scripts and Assets ➣ https://www.patreon.com/posts/76670129
➣ Downloadable Assets, Video Courses, and Other Places to Follow Me https://www.patreon.com/christutorials https://chris-tutorials.itch.io/ https://linktr.ee/ChrisTutorials
◢ Chris Recommends ◥ Master Skills with Skillshare Video Courses ►► https://www.skillshare.com/r/user/christutorials?gr_tch_ref=on Save Money Shopping Online with Honey Extension ►► https://joinhoney.com/ref/qd04c25
00:00 - What to Expect 00:42 - Scriptable Object Data Persistence 01:23 - GameObjects Interactions with Player Stats 01:53 - PlayerStats ScriptableObject C# Code 03:24 - UnityAction HealthChanged 04:35 - MonoBehaviours Setting and Reacting to Health Stat (C# Code) 06:35 - Benefits of Sharing Data Through Scriptable Objects 08:01 - Wrapup ... https://www.youtube.com/watch?v=h7n4GL4h9Dc
24600064 Bytes