I’m sure this is a question that has already been answered but any answers i could find i couldn’t get working properly.
I currently have the following scriptable object
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class ScriptableWeaponBase : ScriptableObject
{
public string Name;
public string Description;
public AttackType attackType;
public WeaponStats weaponStats;
[Header("Modules")]
public AttackBase attack;
public HitBase hit;
[Header("Charge weapon only")]
public float chargeTime;
public float minCharge;
public float maxCharge;
public virtual void update(Weapon weapon, ScriptableWeaponBase scrWeaponBase)
{
attack.AttackUpdate(weapon,scrWeaponBase);
}
}
I want to be able to have the AttackBase and HitBase field be displayed as a drop down that will list all potentials.
when i’m assigning these values manually I’m currently having to create a prefab applying the AttackBase or HitBase Type script to the prefab then dragging the prefab into the scriptable object. Strangely as well when i click the little circle bit it won’t even show the prefabs stored in my assets.
Cheers for any help.