jeffcampbellmakesgames / Entitas-Redux

An entity-component framework for Unity with code generation and visual debugging
MIT License
102 stars 13 forks source link

[FEATURE REQUEST] Add preprocessing symbol #if #endif on content's of generated code #25

Closed jeffcampbellmakesgames closed 3 years ago

jeffcampbellmakesgames commented 3 years ago

Is your feature request related to a problem? Please describe. A workflow was recently described on an easier way to refactor existing code that is also touched by auto-generated code. Rather than need to hand-modify auto-generated code where it had been changed, instead it was easier to:

Describe the solution you'd like

jeffcampbellmakesgames commented 3 years ago

Menu Item for Toggling Refactor Mode I have a preview of this work available on branch feat/compile_out_implementation. A new menu item has been added such that a developer can execute it or press hotkey "Shift + Ctrl + R" to toggle a "Refactor Mode". When this mode is enabled, it will safely compile out all areas of auto-generated code's implementation related to component members and should make it easier for a developer to quickly refactor component members without needing to manually modify auto-generated code. When completed and before playing, this mode should be disabled.

image

Example code when refactor mode is enabled image

jeffcampbellmakesgames commented 3 years ago

Merged to develop