- Home /
Instance of [Editor] couldn't be created because there is no script with that name.
Hello all,
I'm getting this error only when I try to build and run. The error doesn't come up when I run the game within Unity.
Instance of FXSenderEditor couldn't be created because there is no script with that name. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
This is the relevant section from the editor log report:
Unloading 282 unused Assets to reduce memory usage. Loaded Objects now: 3224. System memory in use: 296.8 MB. Unloading 25 Unused Serialized files (Serialized files now loaded: 2 / Dirty serialized files: 2) Instance of FXSenderEditor couldn't be created because there is no script with that name. UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions) UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) (at C:\BuildAgent\work\6bc5f79e0a4296d6\Editor\Mono\BuildPlayerWindow.cs:339) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at C:\BuildAgent\work\6bc5f79e0a4296d6\Editor\Mono\BuildPlayerWindow.cs:263)
[C:/BuildAgent/work/6bc5f79e0a4296d6/Runtime/Mono/MonoExportUtility.cpp line 781] (Filename: C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/BuildPlayerWindow.cs Line: 339)
This is FXSenderEditor.cs, which is in Assets/Editor:
using UnityEditor; using UnityEngine; using System.Collections; using System.Collections.Generic;
[CustomEditor(typeof(FXSender))] public class FXSenderEditor : Editor
{ private bool foldoutDefault=false;
public override void OnInspectorGUI()
{
FXSender theScript = (FXSender)target;
EditorGUIUtility.LookLikeInspector();
//...
Have scoured the web and not really found an answer. Any ideas?
lame suggestion, but it might work: re-install unity? It sounds like a script of the editor is missing.
That sounds a bit strange. Are you sure you don't have another script with that name outside of the editor folder? The content of the Editor folder should be completely ignored when building a game. As long as the filename match the classname everything should be fine.
Thanks for the suggestions, but no dice. Definitely just once copy of the script, which is located in Assets/Editor. However... it doesn't seem to actually affect the game? I found some more info the editor log, have added it to my question.
Answer by jrobichaud · Apr 18, 2012 at 06:16 PM
I had a very similar issue when making builds with a custom "Editor" selected. I used "Selection.activeGameObject = null;" before the build and it fixed this issue.
Your answer
Follow this Question
Related Questions
EditorWindow texture effected by Playmode Color Tint 1 Answer
"add selected" editor script 1 Answer
Draw specific Object Inspector into Rect 1 Answer
Editor Window Views 0 Answers
Cancel build in PostProcessScene? 0 Answers