enum not accesible by seperate class?

Ok… I’ve set up a public enum in a class of mine, and, for some reason, I can’t access it from a different class. Here’s my code… (Each class is in a separate script)

public class Class1 : Class2 //class2 is not problomatic
{
    public enum MyEnum {value1, value2}
}

public class Class 3 : MonoBehaviour
{
    public Class1 class1;

    void FixedUpdate
    {
        class1.MyEnum //MyEnum dosn't show up on intellisence (I use VS)
    }
}

I think the problem you are finding is that you are trying to reference the enum through an instance of the class rather then directly through the class. This seems to be working… (alternatively you could declare the enum above the class so you could reference it globally)

public class Class2
{
	
}


public class Class1 : Class2 //class2 is not problomatic
{
    public enum MyEnum {value1, value2};
}

public class Class3 : MonoBehaviour
{
    public Class1 class1;

    void FixedUpdate()
    {
        // use the Class1 (class), not the class1 (instance)
        Class1.MyEnum enumTest = Class1.MyEnum.value1; 
    }
}

You are using the data member class1 to access my enum.

class1.MyEnum

Make it the class name. Uppercase the first letter.

Class1.MyEnum