handzlikchris / handzlikchris/FastScriptReload
Hot-reloading issue with specific child class of a generic class
- Ngôn ngữ chính
- C#
- Star
- 2.2k
- Fork
- 167
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Tái hiện vấn đề trong chế độ Play của Unity bằng cách sử dụng một lớp con như GameManager kế thừa từ MonoBehaviourSingleton, sau đó kiểm tra mã nguồn kết hợp được tạo ra và đầu ra biên dịch hot-reload. Bản sửa được hoàn tất khi việc sửa đổi lớp được tải lại thành công mà không có lỗi CS0246 đối với kiểu tự tham chiếu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, unity
- Lĩnh vực
- game-dev, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100