- Home /
Cant load custom classs in editor
Hello, so my game is implementing a trigger system. It involves a target object to be affected by the trigger and an action to perform when triggered.
This is achieved through a class that has a [GameObject] target and an [actionScript] action to perform public class LinkedTriggerTarget{ [SerializeField] GameObject target; // TARGET [SerializeField] actionScript actionScript; // ACTIONS TO PERFORM public void trigger() => actionScript.trigger(); public void unTrigger() => actionScript.unTrigger(); }
This actionScript is an abtract class that has two methods : onTrigger() and offTrigger() and this is made so that there can be multiple scripts with different actions.
public abstract class actionScript : MonoBehaviour { public abstract void trigger(); public abstract void unTrigger(); }
My problem is that I want to manually select the actionScript script in the editor but it wont allow me because it expects an actionScript type and it exist only inside of the scriptsHow do I solve this?
Thank you