Page 1 of 1

Build Errors from Editor scripts

Posted: Mon Oct 05, 2020 12:52 am
by nrvllrgrs
Using Unity 2020.1.2 and Dialogue System 2.2.11:

I'm getting 100+ build errors, all related to Dialogue System editor scripts. Such errors include:

Code: Select all

Assets\Plugins\Pixel Crushers\Common\Scripts\Editor\Save System\DiskSavedGameDataStorerEditor.cs(5,7): error CS0246: The type or namespace name 'UnityEditorInternal' could not be found (are you missing a using directive or an assembly reference?)

Code: Select all

Assets\Plugins\Pixel Crushers\Common\Scripts\Editor\Save System\SaveSystemEditorUtility.cs(5,19): error CS0234: The type or namespace name 'SceneManagement' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Code: Select all

Assets\Plugins\Pixel Crushers\Common\Scripts\Editor\Message System\MessageEventsEditor.cs(10,40): error CS0246: The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?)

Code: Select all

Assets\Plugins\Pixel Crushers\Common\Scripts\Editor\Misc\HelpBoxAttributeDrawer.cs(24,30): error CS0115: 'HelpBoxAttributeDrawer.OnGUI(Rect)': no suitable method found to override
Any ideas as to why these errors are happening? Should the scripts in the Editor directories be included in separate Assembly Definitions?

Re: Build Errors from Editor scripts

Posted: Mon Oct 05, 2020 9:22 am
by Tony Li
Hi,

Yes, if you're using unitypackages, Editor folders need their own separate assembly definition files (asmdefs).

The Dialogue System provides unitypackages containing premade asmdefs. One is in Common/Scripts. The other is in Dialogue System/Scripts. Did you import these unitypackages or make your own? If you made your own, please make one for any Editor folders. Mark them as editor only.

Re: Build Errors from Editor scripts

Posted: Mon Oct 05, 2020 10:45 am
by nrvllrgrs
Well then. Now I just feel dumb. Thanks for the help.

Re: Build Errors from Editor scripts

Posted: Mon Oct 05, 2020 10:52 am
by Tony Li
No worries! Glad to help.