Hey, guys! I am a C# developer but not from the gamemade sphere. At work I am developing one static code analyzer. I study Unity as a hobby, hoping to realize something working and cool one day 🙂
In order to have enough time for everything, I want to combine hobby and work somehow. This aspiration gave birth to the idea of analyzer's warning scripts specific for Unity, which I try to promote at work.
Now I'm studying ECS and it seems that there are a lot of non-obvious points in this approach. A lot of things Unity has thought about and handled with appropriate warnings in the inspector, but not everything. Plus, these warnings are usually only shown when the problematic code is executed.
And in general, I would like to know the opinion of real Unity-developers. Could a code analyzer taking into account ECS specifics make code writing more efficient?
Just for example, we could make warnings indicating:
- that [BurstCompile] is used where it is not supposed to be used or on the contrary is not used where it could be used
- Bake performs state saving, e.g. by writing to a field;
- Bake uses data from a component other than authoring, but this component is not passed to DependsOn.
This is the first thing that came to mind, I think if you go through the documentation, you can find a lot of such nuances.