Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        ItemTool myScript = (ItemTool)target;

        if (GUILayout.Button("Create Item"))
        {
            myScript.AddItemToItemDB();
        }
        if (GUILayout.Button("Destroy Item"))
        {
            myScript.RemoveItemFromItemDB();
        }
    }