handzlikchris / handzlikchris/FastScriptReload

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

オープン
#192 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
game-dev, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。