- Home /
Similar named Enums causing import issues
ok big giant Unity Answers brain, i'm having a really weird error. i have a project where i had a script that had an enum called GameState. in another project i created another enum called GameState as well. when i imported this project into the first one it left the conflicting script out, as expected. i eventually found the error and corrected my second project's enum to read WalkthroughGameState. to be safe i changed that name in that script whenever GameState was called, instanced, or made into a variable. so as far as i know there's no overlap in code. no dice - it still doesn't show up when importing the package, but it does show up in a completely blank project. so clearly Unity is seeing a conflict.
is there something about how Unity's compiler parses data that on import it would think that WalkthroughGameState and GameState are related? or is this maybe old metadata getting in the way?
put more simply as a question - does Unity regard similarly Suffixed enums in a script as being related?
any answers appreciated! - thanks...
No Unity does not regard similarly suffixed enums in a script as being related.
I think you need to post some more info. Exact error message, and some code.
no that's it. there is no error - i just don't see whatever Unity thinks will possibly be conflicting on import of the package. thanks! your information is helpful, though....i'm currently trying to rule out metadata corruption/confusion by creating a brand new script, changing the enum again, re-associating it with all my variables and trying the export again. i'll post back again if there's more to update.
Did you also change the name of the file containing WalkthroughGameState?
i did - i figure you have to start with a new name as well as a new file. still configuring, but ready to test now...
aaand the first hurdle is over - it shows up in the package import - yay! basically my question's answered. now it's just grinding away importing stuff....annd we're good! works well as far as i can see. thanks everyone! it was getting a little frustrating...
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Fastest Way Import 1 Answer
Importing to Unity from Blender questions 1 Answer
Importing from Blender to Unity, animation problem 0 Answers