Unity ScriptableObjects: Ultimate Intro Guide ๐ฎ
Learn what ScriptableObjects are, how to create them, and why they're useful in Unity game development.

samyam
120.0K views โข Jan 24, 2022

About this video
In this video I'll introduce you to ScriptableObjects (SOs), show you what they are, how they work, how to make one, and why you should use them.
แ Get the full Source Code Bundle to my Unity Tutorials ๐ค
https://sam-yam.itch.io/samyam-full-source-code-to-all-videos
๐ฅ Get the Source Code ๐ฅ
https://www.patreon.com/posts/61460588
๐ค Support Me ๐ค
Patreon: https://www.patreon.com/samyg
Donate: https://ko-fi.com/samyam
Try out Machinations for FREE today!!
๐https://machinations.io/?utm_source=influencer&utm_medium=referral&utm_campaign=samyam
โบ๐ Relevant Video Links ๐
แ Unity Forum - ScriptableObject behaviour discussion (how Scriptable Objects work)
https://forum.unity.com/threads/scriptableobject-behaviour-discussion-how-scriptable-objects-work.541212/
แ Scriptable Object API Unity Documentation
https://docs.unity3d.com/ScriptReference/ScriptableObject.html
I go over the Scriptable Object creation, instantiating them through code dynamically, showing the functions you can call within them, and will mention additional uses with them such as event based messaging and replacing enums. I will be making another video going more in-depth with the event based messaging. Scriptable Objects are scene and play-mode independent assets that live in the project scope and are used to contain data. This makes it great for rapid iteration for both developers and designers and allows for easier testing due to reduced dependencies (can isolate testing features).
Small Fix, in the video I said to put SerializeField and a private setter, but make sure to add the field tag as so
[CreateAssetMenu]
public sealed EnemyData : ScriptableObject
{
[field: SerializeField]
public Int32 MaxHealth { get; private set; } = 100;
}
โบโฑ๏ธ Timestamps โฑ๏ธ
0:00 Intro
0:38 Machinations Sponsorship
1:55 What are Scriptable Objects
3:47 How to make a Scriptable Objects
7:11 Enemy Scriptable Object Example
11:16 Scriptable Objects Overview
11:53 Scriptable Object Functions and Execution Order
14:47 Instantiate Scriptable Object in Code
16:33 Event Based Messaging with Scriptable Objects
17:07 Sidenote - Don't destroy original Scriptable Object
17:21 Replacing Enums with Scriptable Objects
19:11 Outro
๐๐THANK YOU TO ALL MY PATRONS ๐๐
โฏโฏโฏ My Links โฎโฎโฎ
๐ Patreon ๐
https://www.patreon.com/samyg
๐ฌ Discord Server ๐ฌ
https://discord.gg/SwCKB3Q
๐ฆ Twitter ๐ฆ
https://twitter.com/samyam_utube
๐ Facebook ๐
https://www.facebook.com/samyam.youtube/
๐ต Music ๐ต
Ambient Gold
streambeats.com
๐ Like and Subscribe! ๐
๐ฅ๏ธ Computer Setup ๐ฅ๏ธ
*As an Amazon Associate I earn from qualifying purchases.
https://www.amazon.com/shop/samyam
Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!
#madewithunity #gamedev #unity
แ Get the full Source Code Bundle to my Unity Tutorials ๐ค
https://sam-yam.itch.io/samyam-full-source-code-to-all-videos
๐ฅ Get the Source Code ๐ฅ
https://www.patreon.com/posts/61460588
๐ค Support Me ๐ค
Patreon: https://www.patreon.com/samyg
Donate: https://ko-fi.com/samyam
Try out Machinations for FREE today!!
๐https://machinations.io/?utm_source=influencer&utm_medium=referral&utm_campaign=samyam
โบ๐ Relevant Video Links ๐
แ Unity Forum - ScriptableObject behaviour discussion (how Scriptable Objects work)
https://forum.unity.com/threads/scriptableobject-behaviour-discussion-how-scriptable-objects-work.541212/
แ Scriptable Object API Unity Documentation
https://docs.unity3d.com/ScriptReference/ScriptableObject.html
I go over the Scriptable Object creation, instantiating them through code dynamically, showing the functions you can call within them, and will mention additional uses with them such as event based messaging and replacing enums. I will be making another video going more in-depth with the event based messaging. Scriptable Objects are scene and play-mode independent assets that live in the project scope and are used to contain data. This makes it great for rapid iteration for both developers and designers and allows for easier testing due to reduced dependencies (can isolate testing features).
Small Fix, in the video I said to put SerializeField and a private setter, but make sure to add the field tag as so
[CreateAssetMenu]
public sealed EnemyData : ScriptableObject
{
[field: SerializeField]
public Int32 MaxHealth { get; private set; } = 100;
}
โบโฑ๏ธ Timestamps โฑ๏ธ
0:00 Intro
0:38 Machinations Sponsorship
1:55 What are Scriptable Objects
3:47 How to make a Scriptable Objects
7:11 Enemy Scriptable Object Example
11:16 Scriptable Objects Overview
11:53 Scriptable Object Functions and Execution Order
14:47 Instantiate Scriptable Object in Code
16:33 Event Based Messaging with Scriptable Objects
17:07 Sidenote - Don't destroy original Scriptable Object
17:21 Replacing Enums with Scriptable Objects
19:11 Outro
๐๐THANK YOU TO ALL MY PATRONS ๐๐
โฏโฏโฏ My Links โฎโฎโฎ
๐ Patreon ๐
https://www.patreon.com/samyg
๐ฌ Discord Server ๐ฌ
https://discord.gg/SwCKB3Q
๐ฆ Twitter ๐ฆ
https://twitter.com/samyam_utube
๐ Facebook ๐
https://www.facebook.com/samyam.youtube/
๐ต Music ๐ต
Ambient Gold
streambeats.com
๐ Like and Subscribe! ๐
๐ฅ๏ธ Computer Setup ๐ฅ๏ธ
*As an Amazon Associate I earn from qualifying purchases.
https://www.amazon.com/shop/samyam
Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!
#madewithunity #gamedev #unity
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
120.0K
Likes
4.3K
Duration
20:45
Published
Jan 24, 2022
User Reviews
4.7
(23) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.