Unite Austin 2017 - Game Architecture with Scriptable Objects
Why Game Development Stack Exchange recommends it
Game Development Stack Exchange users link it when answering or asking about Unity architecture, especially ScriptableObject-based data, events and runtime sets.
Recommended by 5 people across 5 different months, 2018 to 2020.
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about sharing data between scenes, replacing singletons, and building event or variable systems with Unity ScriptableObjects.
Recommended by 11 people across 11 different months, 2017 to 2024.
What it is
A Unite Austin 2017 conference talk by Ryan Hipple of Schell Games on building Unity game architecture around ScriptableObjects. It covers modular data, an event system, runtime sets, replacing enums, and cross-scene communication, with a public sample project.
What people said
Strong rec JesseTG · 2020-02 · Game Development Stack Exchange · on “How can I implement an inventory that stores different types of items?”
Assuming you're using Unity like the tags suggest, I strongly recommend watching these [LINK] two [this video] talks about `ScriptableObject`s. They may give you exactly the inspiration you need.
Strong rec Matt · 2020-11 · Game Development Stack Exchange · on “Workflow for authoring Pokémon-like game database content”
Not directly an answer, but for ScriptableObjects and the architectual side od things check out this great Unite talk: [this video]
Recommends Hellium · 2017-11 · Stack Overflow · on “How to manage Unity3D Instances/singletons”
@gilamran : If you are interested by Dependency Injection, the Unity inspector can be seen as a Dependency Injector by itself. If you have not seen it take a look at this blog post [LINK] and the talk at Unite Austin by Ryan Hipple [this video] who uses scriptable objects in a very elegant way.
Recommends James McGhee · 2018-02 · Stack Overflow · on “Discussion about separation of game logic vs. Unity scipting”
1st MonoBehaviour is the place for your logic not your structure For structure use ScriptableObject, scriptable object is quite handy think of it as a game object (mono behaviour) without a transform, no start, update, awake, etc. just data model and ... like any class you can add funcitons but nothing that Unity automatically calls. For Example [CreateAssetMenu(menuName = "Custom Objects/SimpleObject")] public class SimpleObject : ScriptableObject { public float myData; public GameObject someReference; public Vector3 someMoreData; } Now you can define your games 'model' seperate from your games logic 'controller?' ... a game wont perfectly fit into a MVC or MVVC paradigm but doesn't mean yo
Recommends Pyreal · 2018-04 · Game Development Stack Exchange · on “How do you pass arguments with UnityEvents?”
I was inspired by a great talk at Unite by Ryan Hipple. [this video] His examples didn’t cover passing arguments with UnityEvents Do I need to extend UnityEvent, GameEvent and GameEventListener from a generic base class for this to work properly? If so do I need to make a new set of classes for each Type and combination of Types that I want to pass? Game Event Scriptable Object [CreateAssetMenu] public class GameEvent : ScriptableObject { /// <summary> /// The list of listeners that this event will notify if it is raised. /// </summary> private readonly List<GameEventListener> eventListeners = new List<GameEventListener>(); public void Raise() { for(int i = eventListeners.Count -1; i >= 0; i--) e
Recommends João Santana · 2019-01 · Stack Overflow · on “How to create a dynamic variable system with Scriptable Objects”
In this talk [this video] I learned how to create variables with scriptable objects, creating classes like FloatVariable, DoubleVariable, StringVariable and others. But, in the same talk, the guy said that he uses a more dynamic variable system, that prevents creating several classes to handle all variable types. Using the first system, I had a C# script called ImageFillSetter, that given two float variables and a Image script, it returns the division of the two variables to the fillAmount variable of the image. But, when I get a Double Variable, and I'd like to set a progress bar with this value, I need to create another script called ImageFillSetterDouble, and put in these variables. And if I n
Recommends Daruden · 2019-05 · Stack Overflow · on “How I call the ShootingSettings method from the Update only when there are changes?”
I personally suggest you check ScriptableObjects, it`s a good thing to learn. Here are some videos that could help you. Brackeys: [LINK] Unite Austin 2017 - Game Architecture with Scriptable Objects: [this video]
Recommends Jack Mariani · 2019-06 · Stack Overflow · on “Best way to use Singletons in unity”
Not much related to the question, so I add it as a comment. This video [this video] shows how to use SO for a cleaner implementation.
Recommends Arc2066 · 2019-11 · Stack Overflow · on “Hierarchy issue Unity”
You can use a scriptable object to keep track of your object. Objects just need to add and remove themselves to a list in the scriptable object in their OnEnable() and OnDisable() callbacks. When an object removes itself you can have code check to see if there are no more objects left and trigger an event that something in your scene will react to. (Dragable Object) public class DragableObject : MonoBehaviour{ //reference to the scriptable object public DragableObjectSet RuntimeSet; void OnEnable(){ RuntimeSet.Add(this); } void OnDisable(){ RuntimeSet.Remove(this); //you can put code checking if the runtime set is empty here //or you can put it in the DragableObjectSet Remove method } } Scri
Recommends Max Play · 2020-04 · Stack Overflow · on “How to save a float between scenes in unity”
Okay, so first: This scenario does not sound like you should use multiple scenes, so I would say "reconsider your architecture and scene flow in this case." But I am also here, to answer your question, so let's do that instead. A great way of sharing data between scenes is using a ScriptableObject as a data container. You simply create the class of the data you want to use in multiple scenes and then create an instance of your ScriptableObject as an asset in your Assets-folder. This asset can then be assigned to all components that need to use it for data transfer. It is basically like a texture that is painted on in one scene and read from in another scene. You can even improve on this by c