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
*.dllfile will be automatically placed inPackages/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.logwherePROJECT_DIRis current Unity project folder.[FIRST_LOGICAL_DRIVE]/Temp/GeneratedCode/Stratkit.SourceGen.logwhereFIRST_LOGICAL_DRIVEis first logical drive in you OS (e.g. in Windows it would beC:)