Hey all,
I’ve searched similar posts, but must be missing something as I’m not getting the desired result.
Basically, playing around with basic AI to get understanding down. Have a base class as follows:
[System.Serializable]
public abstract class ActionBaseClass {
public abstract void SetupAction(StateHandler stateHandler);
public abstract bool AbleToPerformCheck();
public abstract bool PerformAction();
}
I then have a ‘concrete’ class that inherits from this:
[System.Serializable]
public class Action_MoveTo : ActionBaseClass {
StateHandler ourHandler;
...
And finally a controller that SHOULD hold an array of the available actions to it - as follows:
public class StateHandler : MonoBehaviour {
[SerializeField] // I have tried it with this line missing as well.
public ActionBaseClass currentAction;
[SerializeField] // I have tried it with this line missing as well.
public ActionBaseClass[] actions;
...
However when the scripts are compiled I am NOT seeing a public array or single variable in the inspector…
As stated I have tried it with both “[SerializeField]” lines missing - however I’m still getting the same results. Any help would be gratefully appreciated.
Many thanks!