The ScriptableWrapper class is a ScriptableObject that can act as a simple wrapper for a plain old class object. It makes it easy to take a plain old class object and serialize it as an asset in the project. Let’s say you had a plain old class called Settings: public class Settings { public float ..
Category : 07. Wrappers
Wrappers can be used to attach plain old C# objects to a GameObjects, have them receive callbacks during Unity events like Update and OnDestroy, and to start coroutines. Creating a Wrapper Let’s say you had a plain old C# class called Player: using System; using UnityEngine; [Serializable] public class Player { [SerializeField] private Id id; ..