Skip to content

Code Generation

To reduce some boilerplate code, shadow components and reactive components use code generation in similar way as Unity Entities does.

Recompile dll

If you want to change something in the code generation:

  • Open following project in Rider: Packages/com.stratkit.entities-reactive/SourceGen~/SourceGeneration/SourceGeneration.sln
  • Do necessary changes.
  • Make sure that solution configuration is Release.
  • Build Solution.
  • Proper *.dll file will be automatically placed in Packages/com.stratkit.entities-reactive/SourceGen/ and Unity will detect it.

Debug Logs

If you encounter some problems with code generation, you can add more logs SourceGenTools.LogInfo(), recompile the analyzer as described above and you can look into following paths:

  • [PROJECT_DIR]/Temp/GeneratedCode/Stratkit.SourceGen.log where PROJECT_DIR is current Unity project folder.
  • [FIRST_LOGICAL_DRIVE]/Temp/GeneratedCode/Stratkit.SourceGen.log where FIRST_LOGICAL_DRIVE is first logical drive in you OS (e.g. in Windows it would be C:)