I got a bit of a tangle in what I’m trying to achieve. Wondering if someone can help me out.
I want a enum that isn’t global between all scenes.
And I need to access this enum with out knowing the name of the class its inside lol.
public class EarthAI : MonoBehaviour {
public enum AISelection {
Soldier
};
}
So in another script I want to be able to do
public AISelection m_AISelection;
I know i can do this below but I don’t want to know the name of the class its in.
public EarthAI.AISelection m_AISelection;
Is there some way i can reference it into another script say named PlanetSettings so i can do
public PlanetSettings.AISelection m_AISelection;
I read something online about using a interface. I’m confused how to do it.
Can someone please give me an example using the information above so i can easily understand it.