Search Unity

Error in Unity.Mathematics.Extensions after upgrading to p26

Discussion in 'Entity Component System' started by learc83, Mar 5, 2019.

  1. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    41
    Has anyone else had this error when upgrading to preview 26?

    Library\PackageCache\com.unity.entities@0.0.12-preview.26\Unity.Mathematics.Extensions\MinMaxAABB.cs(27,52): error CS0246: The type or namespace name 'AABB' could not be found (are you missing a using directive or an assembly reference?)
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    I'm not having the issue but I'm running the mathematics library version 1.0.0-preview.1

    The entities package only depends on 0.0.12-preview.20 so maybe they've buggered the dependency version again, try upgrading mathematics.
     
  3. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    41
    I noticed that and upgraded. Still getting the same error. Maybe it's a cache problem. I'll try removing and reinstalling entities p26.

    Edit: Nope that didn't do it.
     
    Last edited: Mar 5, 2019
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    what version of unity?

    I also did a full cache clear (deleted Library folder) when I upgraded because I was getting some random errors. Good last resort.
     
  5. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    41
    I'll try that.

    I'm on 2019.1.0b1

    I tried upgrading to 2019.1.0b5, but got that error plus more errors so I downgraded.
     
  6. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
  7. andynayrb

    andynayrb

    Joined:
    Feb 28, 2019
    Posts:
    25
    I am getting the same error. I uninstalled entities and mathmatics, deleted Library folder. Reinstalled. Still same error.
     
  8. learc83

    learc83

    Joined:
    Feb 28, 2018
    Posts:
    41
    Deleting the library Folder didn't work.

    But I made a new project and it worked. I replaced the dependencies in my original project's manifest.json with the dependencies from the new project's manifest file and it's working.

    The only difference I can see is that Unity.Mathematics isn't explicitly listed in the manifest now.
     
  9. andynayrb

    andynayrb

    Joined:
    Feb 28, 2019
    Posts:
    25
    I made a new project and it worked also. Thanks for the help guys.
     
    Last edited: Mar 6, 2019
    learc83 likes this.
  10. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    I found the answer and it's a little weird:

    1.
    AABB
    is a struct that is defined from the Unity Entities package (Scripting API here).
    2. However, it's written into the
    Unity.Mathematics
    namespace.
    3. If you use
    .asmdef
    files like I do, we have to reference the
    Unity.Mathematics.Extensions
    assembly.

    upload_2020-7-10_10-11-8.png
    upload_2020-7-10_10-10-47.png
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Hi,

    I upgraded a project to 2019 and have this issue, seems i cant get a correct emtnties and math combination.

    Is there any easy way to not destroy my project and just make it work ?