Contents
Are scriptable objects good?
Scriptable objects are useful when you have certain tuples of data which you want to be able to maintain separately and assign to many different objects. When each of the enemies in the scene has unique properties, then moving those properties to scriptable objects is unlikely to have any benefit.
Can you instantiate scriptable objects?
Instantiate does not implicitly duplicate any sub-assets, which if they are referenced by the root, the clone will maintain a reference to the original Scriptable Object’s sub-assets. Unless these ScriptableObjects allocate a massive amount of memory, the adverse effects of duplication should be nominal.
How are scriptable objects used in a scene?
Most often, they are used as assets which are only meant to store data, but can also be used to help serialize objects and can be instantiated in our scenes. We won’t cover serialization in depth in this session, but will just touch on the subject and how Scriptable Objects can help us.
How are scriptable objects used in Unity game?
Introduction to Scriptable Objects shows how you use Scriptable Object to create and edit Inventory Lists. Saving Data in Unity: ScriptableObjects shows how you can create multiple Enemy ScriptableObject and use them in the EnemyMove MonoBehaviour.
How does the ability system with scriptable objects work?
Ability System with Scriptable Objects shows how you implement an Ability System, where Ability is ScriptableObject with its own behaviour functions. The Ability class contains data and abstracts methods which act on GameObject based on those data.
Can a GameObject be attached to a scriptableobject?
Just like MonoBehaviours, ScriptableObjects derive from the base Unity object but, unlike MonoBehaviours, you can not attach a ScriptableObject to a GameObject The fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more.