handzlikchris / handzlikchris/FastScriptReload
Inheriting from 'Editor' in runtime script is causing error CS0118: 'Editor' is a namespace but is used like a type
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 167
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
This is down to Editor assembly not being referenced for new hot reloaded assembly
FSR: Error when updating files: 'AddNewFieldsTest.cs', FastScriptReload.Editor.Compilation.HotReloadCompilationException: Compiler failed to produce the assembly. Output: 'C:\Users\Chris\AppData\Local\Temp\72848fbb3b4645e28394c26e99b3c675.SourceCodeCombined.cs(124,52): error CS0118: 'Editor' is a namespace but is used like a type
C:\Users\Chris\AppData\Local\Temp\72848fbb3b4645e28394c26e99b3c675.SourceCodeCombined.cs(126,30): error CS0115: 'AddNewFieldsTestEditor__Patched_.OnInspectorGUI()': no suitable method found to override' ---> System.Exception: Compiler failed to produce the assembly. Output: 'C:\Users\Chris\AppData\Local\Temp\72848fbb3b4645e28394c26e99b3c675.SourceCodeCombined.cs(124,52): error CS0118: 'Editor' is a namespace but is used like a type
C:\Users\Chris\AppData\Local\Temp\72848fbb3b4645e28394c26e99b3c675.SourceCodeCombined.cs(126,30): error CS0115: 'AddNewFieldsTestEditor__Patched_.OnInspectorGUI()': no suitable method found to override'
at FastScriptReload.Editor.Compilation.DotnetExeDynamicCompilation.ExecuteDotnetExeCompilation (System.String dotnetExePath, System.String cscDll, System.String rspFile, System.String outLibraryPath, System.Collections.Generic.List`1[System.String]& outputMessages) [0x001fe] in E:\_src-unity\FastScriptReload\Assets\FastScriptReload\Scripts\Editor\Compilation\DotnetExeCompilator.cs:309
at FastScriptReload.Editor.Compilation.DotnetExeDynamicCompilation.Compile (System.Collections.Generic.List`1[T] filePathsWithSourceCode, ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher unityMainThreadDispatcher) [0x00145] in E:\_src-unity\FastScriptReload\Assets\FastScriptReload\Scripts\Editor\Compilation\DotnetExeCompilator.cs:107
--- End of inner exception stack trace ---
at FastScriptReload.Editor.Compilation.DotnetExeDynamicCompilation.Compile (System.Collections.Generic.List`1[T] filePathsWithSourceCode, ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher unityMainThreadDispatcher) [0x001e7] in E:\_src-unity\FastScriptReload\Assets\FastScriptReload\Scripts\Editor\Compilation\DotnetExeCompilator.cs:150
at FastScriptReload.Editor.Compilation.DynamicAssemblyCompiler.Compile (System.Collections.Generic.List`1[T] filePathsWithSourceCode, ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher unityMainThreadDispatcher) [0x0000e] in E:\_src-unity\FastScriptReload\Assets\FastScriptReload\Scripts\Editor\Compilation\DynamicAssemblyCompiler.cs:23
at FastScriptReload.Editor.FastScriptReloadManager+<>c__DisplayClass54_1.b__1 () [0x00063] in E:\_src-unity\FastScriptReload\Assets\FastScriptReload\Scripts\Editor\FastScriptReloadManager.cs:380
UnityEngine.Logger:Log (UnityEngine.LogType,object)
ImmersiveVrToolsCommon.Runtime.Logging.LoggerScoped:LogInternal (UnityEngine.LogType,object) (at Assets/FastScriptReload/Plugins/ImmersiveVrToolsCommon/Runtime/Logging/LoggerScoped.cs:52)
ImmersiveVrToolsCommon.Runtime.Logging.LoggerScoped:LogError (object) (at Assets/FastScriptReload/Plugins/ImmersiveVrToolsCommon/Runtime/Logging/LoggerScoped.cs:57)
FastScriptReload.Editor.FastScriptReloadManager/<>c__DisplayClass54_1:b__1 () (at Assets/FastScriptReload/Scripts/Editor/FastScriptReloadManager.cs:425)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start in Assets/FastScriptReload/Scripts/Editor/Compilation/DotnetExeCompilator.cs around the compilation flow reported at line 309, then trace DynamicAssemblyCompiler.cs and FastScriptReloadManager.cs. Reproduce the AddNewFieldsTest.cs hot-reload failure and determine how the new assembly references Unity's Editor assembly; done means the inherited Editor script compiles and reloads without the CS0118 and CS0115 errors.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, unity
- Área
- devtools, game-dev
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100