handzlikchris / handzlikchris/FastScriptReload

Hot-reloading issue with specific child class of a generic class

Abierto
#192 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
2.2k
Forks
167
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When a class inherits from a generic class with itself as a type argument, FSR tries to hot reload but causes error due to the reference to original class name is missing.

For example, the class below will causes exception when modified inside play mode.
```
public partial class GameManager : MonoBehaviourSingleton
```
```
FSR: Error when updating files: 'GameManager.cs', FastScriptReload.Editor.Compilation.HotReloadCompilationException: Compiler failed to produce the assembly. Output: 'C:\Users\Nugget\AppData\Local\Temp\0fe7e28f1b734ebeb756f4db6ff4d726.SourceCodeCombined.cs(42,152): error CS0246: The type or namespace name 'GameManager' could not be found (are you missing a using directive or an assembly reference?)' ---> System.Exception: Compiler failed to produce the assembly. Output: 'C:\Users\Nugget\AppData\Local\Temp\0fe7e28f1b734ebeb756f4db6ff4d726.SourceCodeCombined.cs(42,152): error CS0246: The type or namespace name 'GameManager' could not be found (are you missing a using directive or an assembly reference?)'
```

Is it a known or unknown limitation, or a bug?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the issue in Unity play mode using a child class such as GameManager inheriting from MonoBehaviourSingleton, then inspect the generated combined source and hot-reload compilation output. The fix is complete when modifying the class reloads successfully without the CS0246 error for the self-referential type.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, unity
Área
game-dev, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.