Hello everyone,
I have a scriptable object that store all my weapon’s data :
[CreateAssetMenu(fileName = "New weapon", menuName = "Weapon")]
public class WeaponData : ScriptableObject
{
public string name_;
public Sprite sprite;
public bool ranged;
public int capacityPrimary;
public int capacitySecondary;
public int energy;
public float energyRestore;
public int cast;//how many different spells are cast every time the player fires
public float cooldown;
public float reload;
public float durability;
SpellsData[] spellsArrayPrimary;
SpellsData[] spellsArraySecondary;
I want to create a weapon from this scriptable object, i tried this :
var thing = ScriptableObject.CreateInstance<WeaponData>();
thing.name_ = "fnjkejzvcbcvjhbcvjhbjvhbejkrvbe";
thing.energy = 100;
But the new scriptable object isn’t displayed nowhere.
Can you help me?