Complete the code to declare a ScriptableObject class named ItemData.
public class ItemData : [1] { public string itemName; public int itemID; }
The class must inherit from ScriptableObject to be used as a ScriptableObject in Unity.
Complete the code to create an instance of the ScriptableObject ItemData.
ItemData newItem = [1]<ItemData>();Use ScriptableObject.CreateInstance<T>() to create a new ScriptableObject instance.
Fix the error in the code to save the ScriptableObject asset in the Unity Editor.
AssetDatabase.[1](newItem, "Assets/Data/NewItem.asset"); AssetDatabase.SaveAssets();
The correct method to save a ScriptableObject as an asset is CreateAssetAtPath.
Fill both blanks to create a dictionary from a list of ItemData where keys are item IDs and values are item names.
var itemDict = [1].ToDictionary(item => item.[2], item => item.itemName);
Use the list variable name and the property for the key (itemID) to build the dictionary.
Fill all three blanks to define a ScriptableObject with a CreateAssetMenu attribute and a public int field called 'value'.
[CreateAssetMenu(fileName = "[1]", menuName = "[2]")] public class [3] : ScriptableObject { public int value; }
The fileName is 'NewValue', the menuName is 'Game Data/Value Data', and the class name is 'ValueData'.