Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug "DllNotFoundException: lib_unity_tiny_image2d_native" exception when i try to create sprite entities

Discussion in 'Project Tiny' started by xOrfe, Jul 28, 2021.

  1. xOrfe

    xOrfe

    Joined:
    Apr 21, 2013
    Posts:
    31
    Im getting exception whic is below. I tried a lot of things but i cant figure out how can i solve this. Is this bug or about me? Dots gods please bless me :p
    Here is repo : https://github.com/xOrfe/TinyStep
    Windows10 / rider
    And error :
    DllNotFoundException: lib_unity_tiny_image2d_native
    Unity.Tiny.STB.ImageIOSTBSystemLoadFromFile.StartLoad (Unity.Entities.EntityManager man, Unity.Entities.Entity e, Unity.Tiny.Image2D& image, Unity.Tiny.STB.Image2DSTB& imgSTB, Unity.Tiny.Image2DLoadFromFile& fspec, Unity.Tiny.STB.Image2DSTBLoading& loading) (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Image2D.Native/Image2DIOSTB.cs:88)
    Unity.Tiny.GenericAssetLoading.GenericAssetLoader`4[T,TN,TS,L].OnUpdate () (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Core/GenericAssetLoader.cs:127)
    Unity.Tiny.STB.Image2DIOSTBSystem.OnUpdate () (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Image2D.Native/Image2DIOSTB.cs:186)
    Unity.Entities.SystemBase.Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/SystemBase.cs:412)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:477)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
     
  2. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    You are missing the Image2D native web reference on you assembly definition. On the phone now so I don’t know the precise name.
     
    xOrfe likes this.
  3. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    Actually your project should compile fine but if you still have problems try including Unity.Tiny.Image2D.Native into you root assembly definition.
    I also seen that you are trying to write on a readonly dynamic buffer and are not disposing of them afterwards.
    Change line 116 of SetCrewsJobSystem.cs to:
    Code (CSharp):
    1. var blockDefinitionBuffers = GetBufferFromEntity<BlockDefinitionBuffer>(false)[blockMatrixEntity];
    And add to the end of your Update function:
    Code (CSharp):
    1.       setCrewsJob.BlockCrewBuffers.Dispose();
    2.       setCrewsJob.BlockDefinitionBuffers.Dispose();
     
    xOrfe likes this.
  4. jraja0722

    jraja0722

    Joined:
    Nov 22, 2015
    Posts:
    1
    I have this issue as well. I added Unity.Tiny.Image2D.Native and this did not solve the problem.

    Using the DOTs Tiny2D starter package.

    The repo itself seems to have this issue and will not run out of the box

    I'm on unity version 2020.3.13f1
    It installs Project Tiny Full Version 0.32.0-preview.55
     
  5. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    You should use Unity 2020.1.17f1.

    I did not have the DLL problem but I can only test on Mac for now. Built .NET and IL2CPP without such problems.
     
    Last edited: Aug 1, 2021
  6. xOrfe

    xOrfe

    Joined:
    Apr 21, 2013
    Posts:
    31
    Thank youu sir
     
  7. abivos

    abivos

    Joined:
    Sep 15, 2018
    Posts:
    9
    Having the same issue with TinySpaceship sample on Unity 2020.3.3. Unity.Tiny.Image2D.Native is included in Assets/Scripts/Runtime/TinySpaceship.asmdef
    Here is the two errors, that appear constantly when I run TinySpaceship scene.

    Code (CSharp):
    1. InvalidOperationException: GetSingleton<Unity.Tiny.DisplayInfo>() requires that exactly one Unity.Tiny.DisplayInfo exist that match this query, but there are 0.
    2. Unity.Entities.EntityQueryImpl.GetSingleton[T] () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Iterators/EntityQuery.cs:863)
    3. Unity.Entities.EntityQuery.GetSingleton[T] () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Iterators/EntityQuery.cs:1523)
    4. Unity.Tiny.Rendering.UpdateCameraMatricesSystem.OnUpdate () (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Rendering/CameraComponents.cs:352)
    5. Unity.Entities.SystemBase.Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/SystemBase.cs:412)
    6. Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    7. UnityEngine.Debug:LogException(Exception)
    8. Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:19)
    9. Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:477)
    10. Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    11. Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    12. Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
    Code (CSharp):
    1. DllNotFoundException: lib_unity_tiny_image2d_native
    2. Unity.Tiny.STB.ImageIOSTBSystemLoadFromFile.StartLoad (Unity.Entities.EntityManager man, Unity.Entities.Entity e, Unity.Tiny.Image2D& image, Unity.Tiny.STB.Image2DSTB& imgSTB, Unity.Tiny.Image2DLoadFromFile& fspec, Unity.Tiny.STB.Image2DSTBLoading& loading) (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Image2D.Native/Image2DIOSTB.cs:88)
    3. Unity.Tiny.GenericAssetLoading.GenericAssetLoader`4[T,TN,TS,L].OnUpdate () (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Core/GenericAssetLoader.cs:127)
    4. Unity.Tiny.STB.Image2DIOSTBSystem.OnUpdate () (at Library/PackageCache/com.unity.tiny@0.32.0-preview.54/Unity.Tiny.Image2D.Native/Image2DIOSTB.cs:186)
    5. Unity.Entities.SystemBase.Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/SystemBase.cs:412)
    6. Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    7. UnityEngine.Debug:LogException(Exception)
    8. Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:19)
    9. Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:477)
    10. Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    11. Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    12. Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
    13.  
     
  8. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    Why do you use Unity 2020.3.3 when the "Get Started" specifically state to use Unity 2020.1.17f1?
     
  9. abivos

    abivos

    Joined:
    Sep 15, 2018
    Posts:
    9
    Get started said it's minimum required version.
    Btw, I have the same problem with Tiny2D sample on 2020.1.17

    Update:
    I guess running the scene through standard play button is wrong, trying to build project through asset in build folder but having problem with compiler. Maybe just Rider is not enough and you need to have Visual Studio compiler installed.

    Update 2:
    Success! I was able to run Tiny2D sample through asset in build folder, Visual Studio 2019 with all prerequisites listed in Google Doc is still required, even if you have Rider installed.
     
    Last edited: Aug 5, 2021
    GilCat likes this.
  10. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    You can’t play the game in the editor because some packages simply won’t run (eg. Renderer). But you still can test your systems as in regular DOTS.
    As mentioned in the docs you must build using the builds scripts for a scriptable build pipeline and you can attach your IDE to the running build (if DEBUG build) and set breakpoints and so on…
    I also advice on creating Unit Tests for your systems as it will save you a lot
    of time in the end.
     
    abivos likes this.
  11. xAdamQ

    xAdamQ

    Joined:
    Jul 23, 2016
    Posts:
    53
    I have the exact same 2 errors, build works but play doesn't, did you solve this?
     
  12. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    676
    As I said before and from reading the "Getting Started Guide", you can't play the tiny projects in the editor.
    Well, that is not entirely true but several key systems won't work (eg. rendering), but you can still do a fair amount of testing with your systems as long as they do not depend on editor missing features.
     
  13. xAdamQ

    xAdamQ

    Joined:
    Jul 23, 2016
    Posts:
    53
    Yes I sadly read this...
    The last version of the project was in jan 25, is the project dead?
     
  14. Elringus

    Elringus

    Joined:
    Oct 3, 2012
    Posts:
    484
  15. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    77
    Not quite. We were told someone would poke someone. Far from the promise of a status update.

    We were also told in the DOTS compatibility thread months ago that they would "catch up with questions." However, we are still waiting for any additional response.
     
    GilCat likes this.
  16. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    Right-o. I guess Tiny is so much DOTS, that if they are busy fixing and implementing things in Core and DOTS libs in general, is understandable that new Tiny based on those is delayed. Also it was kind of experimental to begin with, interesting to see where they take the lessons. We are now testing normal WebGL builds on mobiles for our things again, tested with Tiny too earlier. Is ok for our current things to be a bit heavier to start, and 2021.2 beta already brings some improvements.