AOT generator does not detect enum class and shows MISSING when added manually (Again?)

Issue #492 resolved
Jakub Kasztalski created an issue

I commented on a similar ticker from December but wasn't sure if the comments are seen on resolved issues. The original poster resolved by upgrading, however, I am up to date and still experiencing the issue.

What happened?

When I add my enum in the list under Odin Inspector->Preferences\AOT Generation, it states "Missing."

I tested it both as just a class (no inheritance) and class inheriting from SerializedMonoBehavior. Same thing. Here's an example for ETestEnum

missing.jpg

Globally defined Enums (EGender) and classes (CMHeadlinerEp2ScenarioVars) are loading fine.

How can we reproduce it?

See code sample above. Seems to happen even if you create a dummy class:

public class SomeClass
{
        public enum ETestEnum
        {
            One,
            Two
        }
}

What version of Unity are you using?

2018.2.20f

What version of Odin are you using?

2.0.15 (latest)

Do you have Editor Only mode enabled?

Nay

What operating system are you on?

Win10, 64bit

Comments (6)

  1. Tor Esa Vestergaard

    You need to use a proper type name that can be resolved by the C# Type.GetType() method, and nested classes have a special type name form: "Namespaces.ParentTypeName+NestedTypeName". If there's still issues, it's always advisable to add the assembly name as an extra hint: "Namespaces.ParenTypeName+NestedTypeName, AssemblyName".

    Does this resolve your issue?

  2. Jakub Kasztalski reporter

    Tor, thank you for the quick response. Yes, that worked! I didn't realize I had to use different type name; I looked through the documentation before posting and couldn't find anything about it.

  3. Tor Esa Vestergaard

    That's a good point - we'll be sure to add an infobox stating this fact more clearly to the AOT window itself :)

  4. Log in to comment