Hey guys I was wondering how I might be able to access a remote enum in C#. Right now i have this enum setup in a kinda global “meta” object. I was planning on using this as a sort of index for my layers.
public enum Layers {
playerActorLayer = 8,
civilianActorLayer = 9,
enemyActorLayer = 10,
};
Now I try and grab this in the awake function of my other script as follows
myLayers = GameObject.Find("debug_terrain").GetComponentInChildren<enumLayers>();
Which should grab the script component with the public enum from the child object it’s living in on my terrain. However I can’t seem to access myLayers.Layers in the other scirpt. Am I not handling this the right way? I have the enum scroped public. Is there something specific to enums that I am missing?