marian42/wavefunctioncollapse

CS0103 Error -> BuildMethodException

ztffn opened this issue · 2 comments

ztffn commented

Getting a BuildMethodException / Can't make standalone build because of these two errors. Seems to be related to #if UNITY_EDITOR. Any suggestions?

Assets/3rd Party Assets/WaveFunctionCollapse/Code/WaveFunctionCollapse/ModuleData.cs(126,9): error CS0103: The name 'EditorUtility' does not exist in the current context

Assets/3rd Party Assets/WaveFunctionCollapse/Code/WaveFunctionCollapse/ModuleData.cs(127,9): error CS0103: The name 'AssetDatabase' does not exist in the current context

ztffn commented

Got a working solution from https://github.com/vertxxyz

"using UnityEditor;" must be wrapped in #if UNITY_EDITOR

#endif must be after "SavePrototypes()", but before "OnBeforeSerialize()" and "OnAfterDeserialize()"

Thank you! It's fixed now.