AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.4k stars 289 forks source link

Plugin class disappear on failed build #765

Closed DollarSignSubjectNameHere closed 4 years ago

DollarSignSubjectNameHere commented 4 years ago

Summary

I have encountered some strange behavior with Duality: when you introduce a variable to a component class that is never set the build will succeed in Visual Studio but tell you of the error. When you remove the variable or the class altogether and rebuild Duality will reload and all of the plugins from the .csproj that contained the null object will be missing.

How to reproduce

ilexp commented 4 years ago

Can you provide a specific code example that reproduces this behavior? I'm not 100% sure I follow the repro steps so far, as what you described sounds quite normal. How does your class look like after each of these steps:

  1. add a var into the new class ie Vector2 target;

  2. remove the previously added var or the class that contains it

Does the build succeed after each step, or are there any errors?

When you remove the variable or the class altogether and rebuild Duality will reload and all of the plugins from the .csproj that contained the null object will be missing.

When you remove the class, it would be expected behavior for it to be missing in Duality, since there no longer is anything that defined what a Component of that type is. Did I miss something?

DollarSignSubjectNameHere commented 4 years ago

I have tried several times to recreate the bug on a different project and cannot seem to do it sorry...