Creating and managing Scriptable Objects

As developers, we usually need to store and load data persistently. We've probably used some formats in the past, such as XML, JSON, and CSV via text files. As such, we know it takes development time to support changes and iterations throughout the project. Much of this data is used to set up the game and shape levels, enemies, and the whole game mechanics.

As Unity developers, we harness the power of the Inspector window via public/serialized member variables; however, it makes more sense to store these values in a persistent file—that's why the ScriptableObject class exists. In this recipe, we will be exploring its value.

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.