Question by
Max_Chen · Oct 18, 2018 at 05:15 AM ·
object reference
using Createassetmenu attribute and get object reference error
I'm new to unity, hope anyone could help me. Thanks!
Here's my code .
using UnityEngine;
[CreateAssetMenu(fileName ="NewItem", menuName = "inventory/NewItem")]
public abstract class Item_Class : ScriptableObject
{
void DoSomething()
{
Debug.Log("Perform operation");
}
}
when I'm trying to create new asset in the project menu, error shows up.
15398395291.png
(85.3 kB)
Comment
Your answer
Follow this Question
Related Questions
PLEASE HELP!! Object reference not set to an instance of an object at ChangeMasterVolume.Update 1 Answer
Errors appear when i get a bad Raycast hit. Meaning when it hits another object in the scene. 0 Answers
Invisible Prefab spawning at location of Player before being instantiated 1 Answer
NullReferenceException: Object reference not set to an instance of an object 1 Answer