Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question The type or namespace name 'Words' could not be found

Discussion in 'Entity Component System' started by Cell-i-Zenit, Jun 7, 2021.

  1. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    Updated to entities 0.17.0 preview 42 and i get this error:

    Library\PackageCache\com.unity.entities@0.17.0-preview.42\Unity.Scenes\ResolveSceneReferenceSystem.cs(34,16): error CS0246: The type or namespace name 'Words' could not be found (are you missing a using directive or an assembly reference?)


    Anyone has an idea how to fix this?

    EDIT: apparently this error is because of my upgrade to collections 0.17
     
    Last edited: Jun 7, 2021
    MNNoxMortem likes this.
  2. LazarusOfSuburbia

    LazarusOfSuburbia

    Joined:
    Jun 20, 2019
    Posts:
    3
    I had a very similar issue, and had a hell of a time trying to get it to work. The fix that worked for me was very simple though!
    upload_2021-6-13_20-47-21.png

    By clicking this button, you should be able to clear out all the packages (deleting the folders and changing the manifest wasn't working for me), and allow you to let the ECS packages load their dependencies. I had more success by adding the big DOTS packages first and letting the package manager do its thing than manually adding each one for whatever reason.

    Sounds like you might have solved your problem, but thought I'd leave this here in case someone else comes along.
     
  3. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    383
    I got the same error. Had to downgrade to 0.15.0-preview.21 to keep working.
     
  4. Scoth_

    Scoth_

    Joined:
    May 25, 2020
    Posts:
    9
    I fixed it by resetting Packages to default, and then installing Entities first (Entities Package automatically installs the other necessary dependencies like Burst, Mathematics etc)
     
    Last edited: Sep 7, 2021
    deus0 likes this.
  5. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    240
    Note the difference; Words struct does not exist in 0.17.0-preview.18 under same namespace. I found it moved here:
    https://docs.unity3d.com/Packages/c.../Unity.Collections.LowLevel.Unsafe.Words.html

    This is why entities@0.17 and collections >= 0.17 are not compatible

    Adding
    using Unity.Collections.LowLevel.Unsafe;
    line there solves the issue.
     
    Last edited: Oct 23, 2021
  6. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,221
    It's been like this for quite some time, and that is a pretty easy fix it sounds like.. would be really nice if, you know, it was fixed.