Just upgraded my project to 2019 and jump on ECS. Ive installed all the packages but seeing missing assembly reference error. Please help, makes no sense
The type or namespace name ‘Entities’ does not exist in the namespace ‘Unity’ (are you missing an assembly reference?)
using UnityEngine;
using Unity.Entities;
using Unity.Rendering;
using Unity.Transforms;
using UnityEngine.SceneManagement;
namespace Test.HexSphereECS
{
bootstrapECS
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void Init()
{
}
}
}
Can you show screenshot, with installed Entities in Package Manager? It works for me, so unless you installed something different by accident, restarting Unity may help?
Your assembly definition needs to reference the Entities package. I don’t know if the ‘Auto Referenced’ property is meant to do this for you but I’ve always had to manually link in the packages I use if I’m working with assembly definitions.
I had the same issue, which I curcumvented differently, as I couldn’t “manually link in the packages I use” as JJJohan mentioned above.
Here’s my fix. Navigate to your manifest.json (typically under UnityProjects->PROJECTNAME->Packages->manifest) and add the following after your dependencies.
I had the same issue. For me the classes and files where not added automatically to the assembly definition. The mistake I made was apparently, that I created the definition file inside the Rider IDE. I was able to see this when I switched to the solution view inside Rider.
When I create the definition in the unity Editor it correctly added all files to the assembly definition.