This commit is contained in:
Janis
2022-06-03 22:53:35 +02:00
parent 87d77d2867
commit a31c6a16dd
21 changed files with 1005 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
using UnityEngine;
[CreateAssetMenu(menuName = "ScriptableObjects/ItemSO")]
public class ItemSO : ScriptableObject
{
public string id;
public string name;
public GameObject prefab;
public Sprite icon;
public void Spawn(Vector3 position)
{
GameObject item = Instantiate(prefab, position, Quaternion.identity);
item.name = name;
}
}