Closed matthiashermsen closed 3 years ago
I don't think this is as much a question specific to ER than it is a general Unity question on how to use AssemblyDefinitions.
If you don't use AssemblyDefinitions, everything gets put into an appropriate auto-generated C# project based on whether it's runtime or editor code. All runtime code for example gets placed automatically for example in the CSharp-Assembly
project if not in an AssemblyDefinition. EntitasRedux's own AssemblyDefinitions are auto-referenced by these C# Projects by Unity as part of it's auto-generated process.
If an AssemblyDefinition is created, it will only reference the AssemblyDefinitions the developer explicitly adds. That means unless the EntitasRedux AssemblyDefinitions are explicitly added, you will have compiler errors.
Using your example branch I created the same Sources AssemblyDefinition, added the EntitasRedux runtime AssemblyDefinitions, and hit Apply which resolved all open compiler errors.
I'm sorry, I didn't know that. Thanks a lot!
I'm using Unity 2020.3.13f1 want to setup an assembly definition asset to pass it as a reference to the Play/Edit mode tests.
Project Settings
=>Player
=> Change the API compability level to .NET 4.x (for PC, Android and HTML)openupm add com.jeffcampbellmakesgames.entitasredux
Assets
folder and name itGenesis.CLI
Project Settings
=>Genesis
=> Set this folder as the Genesis installation folder by selecting itGenesisSettings
insideAssets/Sources
via context menu =>Create
=>JCMG
=>Genesis
=>GenesisSettings
GenesisSettings.asset
in the inspectorAssets/Sources/Generated
Assets/Sources/Features/AComponent.cs
with the contentEverything should be fine for now. You can find a stable version in this temporary reproduction repository branch
https://github.com/matthiashermsen/er-namespace-reproduction
Since I want to setup unit tests I have to create the assembly definition asset. To ensure all the code is picked up I created it here
Asset/Sources/Sources.asmdef
with this setupCompile errors come up
I tried to generate the code again but unfortunately the errors remain. I pushed the broken version on this branch
https://github.com/matthiashermsen/er-namespace-reproduction/tree/broken
I would like to know how to solve this problem