Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TriLib - Model Loading Package

Discussion in 'Assets and Asset Store' started by rickomax, Jun 21, 2017.

  1. QQMatt

    QQMatt

    Joined:
    Sep 29, 2016
    Posts:
    11
    Any idea when this update will be available?
     
  2. HyunMok_Moon

    HyunMok_Moon

    Joined:
    Oct 14, 2016
    Posts:
    24
    I build a target platform as WebGL
    Thank you.
     
  3. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    It should be ready in one or two weeks.

    Best regards,
    Ricardo Reis.
     
    andgest likes this.
  4. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    The problem may be due to the forced manual inclusion of TriLib native plugins, something that can't be done on an automated build. I'll fix this by automatically including the iOS native libraries when Unity runs on bathc mode.
     
    andgest likes this.
  5. andgest

    andgest

    Joined:
    Apr 26, 2018
    Posts:
    26
    Hi!
    Thank you for your answer.
    I don't sure to right understand, you will fix this in the future release of TriLib or it's an action that I can and need achieve on my project ?
     
  6. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Sorry, it will be available on the next update.

    Best regards,
    Ricardo Reis.
     
    andgest likes this.
  7. virgidiaz25

    virgidiaz25

    Joined:
    Feb 11, 2019
    Posts:
    1
    Hi! I just bought TriLib and I tried testing the AssetDownloader scene with the URL of a .ZIP file but it's just showing the obj model without the materials and textures. Could you please explain to me what do I need to activate for the obj to load correctly with its mtl file and textures?
     
  8. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    If the .MTL file and the textures are at the same ZIP folder as the .OBJ model, textures should be loaded just fine.

    Best regards,
    Ricardo Reis.
     
  9. JovanStojsic

    JovanStojsic

    Joined:
    Jan 8, 2019
    Posts:
    5
    Hello, I am having a problem that I don't see anyone mentioned :(

    Build for IOS goes fine for me, but when the model is supposed to load, it doesn't, and the following error appears:

    WARNING: Shader Unsupported: 'Standard (Specular setup)' - Pass 'META' has no vertex shader

    WARNING: Shader Unsupported: 'Standard (Specular setup)' - Pass 'DEFERRED' has no vertex shader

    WARNING: Shader Unsupported: 'Standard (Specular setup)' - Pass 'META' has no vertex shader

    Also, the whole app freezes for about 5s. It loads fine in the Unity editor btw, and it is a very simple .obj model with 3 files (obj mtl png).

    I will try a different file format, and I tried to include the mentioned shader in the Project Settings/Graphics/Always Included Shaders, but did not help.

    Here is the download link for the model I am using:
    https://wetransfer.com/downloads/b4...e162a048ab6f922b0ae1300220190513145659/2a2351
     
    Last edited: May 13, 2019
  10. eleworks

    eleworks

    Joined:
    Oct 15, 2017
    Posts:
    3
    Hi!
    How to change the default name of loaded mesh?
    Thank you.
     
  11. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    I'm getting similar issues report and I'll be checking out as soon as possible.

    Best regards,
    Ricardo Reis.
     
  12. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    You can use the AssetLoaderBase.OnMeshCreated callback:

    Code (CSharp):
    1. using (var assetLoader = new AssetLoader()) {
    2.     assetLoader.OnMeshCreated += delegate(uint meshIndex, Mesh mesh) {
    3.         //You can change the Mesh name here
    4.     };
    5.     var myGameObject = assetLoader.LoadFromFile("PATH_TO_MY_MODEL.FBX");
    6. }
     
  13. JovanStojsic

    JovanStojsic

    Joined:
    Jan 8, 2019
    Posts:
    5
    Just an update on my issue, the models do appear, after the whole app freezes for about 3 - 15 seconds on my iPhone 8 (depending on the model). So that is a bit of a bummer because the app is frozen during that time.

    Update 1, I opened Autodesk Maya, created a simple pyramid model and exported it to obj and fbx for using with our app, and the model loads for 10 seconds while the app is frozen, so I do not believe the model is so complex that it is causing such a freeze.

    Update2, I now created a simple model and exported it to obj and fbx in Sketchup, and the load time is the same ( around 5 to 10 seconds). However, simple model in Sketchup exported to 3ds loaded instantly. Does anyone know which models should perform better with this plugin?

    Thank you for replying quickly, and I hope that there is something you can do.
    Cheers
     
    Last edited: May 14, 2019
  14. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Are you using AssetLoader or AssetLoaderAsync?

    Unity is single-threaded by nature, so any heavy proccess like building a big mesh procedurally or loading a native texture will take some time to be accomplished, but AssetLoaderAsync will do all the native model loading proccess on a parallel thread, so the freeze in the main thread should be way less noticeable.

    Best regards,
    Ricardo Reis.
     
  15. JovanStojsic

    JovanStojsic

    Joined:
    Jan 8, 2019
    Posts:
    5
    Hi, async did help, so the loading is faster, so thank you for that!

    However, a new problem arises for us. It appears the plugin is not releasing the memory it allocates for the models. So with each new loading of a model, more memory is used.
    We Destroy the GameObject when we load a new one, and we have set the option "AddAssetUnloader" to true. We also tried adding:
    Resources.UnloadUnusedAssets();
    GC.Collect();

    Help would be very appreciated,
    Thanks!
     
  16. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    The update to be released have some memory leak fixes, so we can check if it fixes your issues.

    I apologize everyone for the delay on the update. I'm working to release it as soon as possible.

    Best regards,
    Ricardo Reis.
     
  17. carvayne

    carvayne

    Joined:
    Jul 7, 2018
    Posts:
    3
    Hello!
    Version of the Unity: 2018.3.12f
    Build: WebGL
    Situation: load the FBX file.
    When calling methods: AssetLoader.LoadFromFileWithTextures or AssetLoader.LoadFromMemoryWithTextures
    we are catch a error.
    below provide screenshots

    upload_2019-5-25_21-22-11.png

    Can anyone help to understand what's the matter?
     

    Attached Files:

  18. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    These issues have been fixed on the update that is gonna be released this week.

    Best regards,
    Ricardo Reis.
     
  19. mikkoauvinen_vincit

    mikkoauvinen_vincit

    Joined:
    Aug 22, 2018
    Posts:
    1
    Hello Ricardo!

    TriLib license list on website ( https://ricardoreis.net/?p=264 ) lists DevIL library (which uses problematic LGPL lisence) as dependency. I also saw you mentioning somewhere that you had plans to replace DevIL with some other library (STB?).

    We're now using TriLib 1.8.7.1 and can't see any reference to DevIL anymore in it.

    Can you confirm the version of TriLib in which DevIL has been replaced with STB image library? (Probably good to have this info updated also to the website :) )

    Thanks!
     
  20. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Sorry!

    The site info is outdated, we don't use DevIL anymore.
     
  21. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Web demo updated with the latest patches:
    http://ricardoreis.net/trilib/demo

    Simply drag and drop your model files into the browser window (can contain additional files like textures or all files inside a ZIP Archive)

    Asset Store update will be released in the next days.

    Update: Fixed small webdemo issues.
     
    Last edited: May 29, 2019
  22. windbylocus

    windbylocus

    Joined:
    Aug 1, 2018
    Posts:
    5
    Hi, rickomax
    That demo was perfect and it was exatlly what I want, I purchased trilib just now, but couldn't find "Material options" , this option will be released at next version? this model works well in WebGl Demo. 正常示例.png However , there is no "Material options" in AssetStore Version 1.8.7.1, and here is the pic. I tried
    Code (CSharp):
    1.                         assetLoaderOptions.ScanForAlphaMaterials = true;
    2.                         assetLoaderOptions.UseCutoutMaterials = false;
    3.                         assetLoaderOptions.DisableAlphaMaterials = false;
    but not working, Can you help me?
    editor.png
     

    Attached Files:

    • Fbx.rar
      File size:
      401.9 KB
      Views:
      364
  23. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Olá Ricardo, tudo bem?
    Te mandei um email, mas não tive retorno!
    Estamos utilizando o plugin da Trilib no nosso projeto na Unity3D, e estamos tendo um problema para importar um FBX no Android (no iOS não testamos).
    Na hora de colocar o FBX na cena, o aplicativo simplesmente fecha. Pela Unity ele importa normalmente.
    Tentamos exportar tanto para 2016, tanto para 2012, mas nenhum deles deu certo.
    Testamos com a cena "Scene1 - Asset Loader" via link.
    Na versão anterior (mais ou menos na época de dezembro) funcionava, só não importava as texturas do fbx, poderia ser isso o problema?
    No email estou te mandando o log, versão da unity/tipo de build, e o link do FBX que está dando erro.

    Log:
    05-28 19:07:08.014 30232 30270 I Unity : Compiled for Android
    05-28 19:07:08.014 30232 30270 I Unity :
    05-28 19:07:08.014 30232 30270 I Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
    05-28 19:07:08.014 30232 30270 I Unity :
    05-28 19:08:09.871 30232 30270 E Unity : Unable to find libassimp

    Versão:
    Unity: "Built from '2018.3/staging' branch, Version '2018.3.14f1 (d0e9f15437b1)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'"
    TriLib: 1.8.7.1

    FBX: https://we.tl/t-j8rp3rH50l
     
  24. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    This option will be available on the next update.
    The update should be released in the next days

    Best regards,
    Ricardo Reis.
     
  25. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Olá!

    Vou dar uma olhada assim que possível!

    Estou corrigindo os últimos detalhes para que a versão WebGL funcione na Unity 2019, esse é o último problema que está me impedindo de lançar a atualização. Alguma coisa causa incompatibilidade entre as bibliotecas dos Emscripten antigos nessa versão. Assim que essa versão for para a Asset Store, trabalharei no seu problema.

    Atenciosamente,
    Ricardo Reis.
     
  26. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Uma dica, por favor verifique se o arquivo "libassimp.so" e "libstb_image.so" estão sendo adicionados ao seu pacote Android, e se são os mesmos arquivos que correspondem a pasta "\TriLib\TriLib\Plugins\Android\armeabi-v7a" da sua instalação da Unity.
     
  27. Tohrak

    Tohrak

    Joined:
    Nov 2, 2015
    Posts:
    12
    Hello,
    Is there any way to load non legacy AnimationClip at runtime (To use with Animator) ?
    I'm expectedly getting this error : "Can't use AnimationClip::SetCurve at Runtime on non Legacy"

    Else, should I use the legacy animation system and find a way to control AnimationClip like in Animator ? With multiple simultaneous animation, rewind animation, reset animation, either loop or not animation, modulate speed etc. I'm not really experienced with the old Animation Component, but it doesn't seams like I do as much with it.

    Thank you for your time.
     
  28. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Obrigado pelo retorno!
    O mais estranho de tudo é que são em poucos fbx que dão esse crash, em outros funcionam normalmente!
    Desde já fico no aguardo pela atualização!
     
  29. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    upload_2019-5-31_12-48-43.png
    Nesse sentido me parece tudo ok.
    E verifiquei nas pastas do projeto, e estão certinho desse jeito!
     
  30. windbylocus

    windbylocus

    Joined:
    Aug 1, 2018
    Posts:
    5
    Hi rickomax

    Can you send me the new version to my e-mail?
    Adress: 913422986@qq.com
    My project is very urgent. :(

    Best regards
     
  31. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Beta update (1.8.9) available at:
    https://ricardoreis.net/?p=217

    Use your invoice number to download.

    Release notes:

    STEP reader fixes
    3DS progress handler fix
    FBX reader fixes
    GLTF2 reader fixes
    GLTF reader fixes
    MD4 reader fixes
    MMD reader fixes
    OBJ reader fixes
    DAE reader fixes
    SMD reader fixes
    Removed invalid data checking which was preventing some models from loading
    Removed iOS internal ZLIB dependency (using TriLib own ZLIB)
    Fixed WebGL issues*
    Fixed a bug where older Android devices couldn't accept 32-bits indexed meshes
    Fixed a bug where unnamed embedded textures couldn't be loaded correctly
    Fixed a bug where temporary textures weren't disposed
    Fixed memory leaks
    Fixed material transparency issues
    Fixed FBX base-64 textures reading bug
    Fixed async errors catching
    Fixed bug where textures with empty names would cause errors
    Fixed samples issues
    Fixed misc. issues
    Added Hololens 2 experimental support
    Added UTF-8 texture path support
    Added WebGL template which is used on TriLib demo
    Added WebGL utility class JsHelper which contains methods to read file data from Javascript
    Added AssetLoaderOptions.UseOriginalPositionRotationAndScale to allow maintaining original model coordinates
    Added AssetLoaderOptions.MaterialShadingMode to allow material shading mode selection (Standard, Roughness or Specular)
    Added AssetLoaderOptions.MaterialTransparencyMode to allow material transparency mode selection
    Added AssetLoaderOptions.LoadRawMaterialProperties to allow custom material data loading. Custom properties will be available on AssetLoaderBase.MaterialData Properties field
    Added TIFF images support
    Added AssetLoaderOptions fields: ApplyGlossinessScale, ApplyGlossiness, ApplyNormalScale, ApplyMetallicTexture, ApplyOcclusionTexture, ApplyDisplacementTexture, ApplyNormalTexture, ApplySpecularTexture, ApplyEmissionTexture, ApplyDiffuseTexture, ApplySpecularColor, ApplyEmissionColor, ApplyDiffuseColor, ApplyColorAlpha to allow selectively components loading
    Added AssetLoaderOptions.DontAddMetadataCollection, when enabled, TriLib will add an AssimpMetadataCollection component to every GameObject child, containing a collection of metadata found while loading the model
    Added AssetLoaderOptions.ForceAnimationComponents to enforce Animation/Animator components creation even when there are no animated objects on the model
    *Note: WebGL module isn't working on Unity 2019 yet, we are working on a fix for this issue
     
  32. windbylocus

    windbylocus

    Joined:
    Aug 1, 2018
    Posts:
    5
    TYVM!
     
    m4d likes this.
  33. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Dear customers,
    If your issues have been fixed with the latest update, please consider updating your review on Asset Store.
     
  34. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Sobre o problema que estava havendo no Android foi resolvido, mas agora não consigo visualizar no editor.
    Aparece acesso negado quando tento importar da asset store para Assets/TriLib/TriLib/Plugins/Windows/x86_64/assimp.dll, já tentei apagar a pasta e reimportar mas também não deu certo. Btw, estou num Windows 10. Um print do erro:
    upload_2019-6-3_16-8-43.png
    Estou tentando achar um jeito de arrumar isso, se tiver como ver isso pra mim, desde já agradeço! (Ou mandar o arquivo por fora). Obrigado!
     
  35. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    By mistake, I haven’t replaced the WebGL libraries on the build.

    I’m sending a patch to Asset Store, meanwhile, the updated version can be downloaded at:
    https://ricardoreis.net/?p=217

    Best regards,
    Ricardo Reis.
     
  36. ventsie

    ventsie

    Joined:
    Nov 12, 2016
    Posts:
    5
    I have been trying to get a model at Runtime on the Hololens and I just can't get it to work. I tried everything I could find and nothing seems to work. Would anyone be able to do a tutorial or explain how to do this using Trilib? I can't seem to find a solution and I don't know what I am doing wrong.
     
  37. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Are you getting any error?
     
  38. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Oi Ricardo, tudo bom?
    Estou tentando fazer uma build para IL2CPP com Build System em Gradle. Sem sua biblioteca, ele gera o apk normalmente, mas com ela ocorre esse erro abaixo:

    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Android\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp3F8C.tmp" -o "C:\Project\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_BDF35F77E62779FD56C7A45ACCEA205C\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Android\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Android\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Android\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

    [B]C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34253: error: undefined reference to 'TriLibGetBrowserFileName'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34264: error: undefined reference to 'TriLibGetBrowserFileData'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34275: error: undefined reference to 'TriLibGetBrowserFileLength'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34253: error: undefined reference to 'TriLibGetBrowserFileName'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34264: error: undefined reference to 'TriLibGetBrowserFileData'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34275: error: undefined reference to 'TriLibGetBrowserFileLength'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)[/B]


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Android\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp3F8C.tmp" -o "C:\Project\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_BDF35F77E62779FD56C7A45ACCEA205C\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Android\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Android\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Android\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

    [B]C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34253: error: undefined reference to 'TriLibGetBrowserFileName'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34264: error: undefined reference to 'TriLibGetBrowserFileData'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34275: error: undefined reference to 'TriLibGetBrowserFileLength'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34253: error: undefined reference to 'TriLibGetBrowserFileName'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34264: error: undefined reference to 'TriLibGetBrowserFileData'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34275: error: undefined reference to 'TriLibGetBrowserFileLength'
    C:\Project\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_10.cpp:34286: error: undefined reference to 'TriLibFreeMemory'[/B]
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    Tem ideia do que pode ser?
     
  39. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Sim. Esses são métodos da JsHelper.cs. Ele deve estar tentando linkar em tempo de compilação, e como ele não anexa a biblioteca nativa que contém esses métodos no Android, vai ocorrer este erro. Acabei de reparar que deixei a versão corrigida dessa classe no Mac, vou atualizar o pacote e enviar a correção para a Asset Store.
     
    visualjoy likes this.
  40. spoonshoe

    spoonshoe

    Joined:
    Jan 25, 2010
    Posts:
    9
    I have been using this plugin for quite some time but I started a clean projection, 2018 and I am not getting this error.
     
  41. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Latest TriLib update should fix that.
     
  42. ventsie

    ventsie

    Joined:
    Nov 12, 2016
    Posts:
    5
    upload_2019-6-11_9-42-48.png

    This is the error I am getting.

    Visual studio says the issue comes from the following line:
    intptr_t returnValue = il2cppPInvokeFunc(___ptrStore0, ___name1, ___value2);

    And the error is:
    Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

    Edit: Forgot to mention that it works perfectly in the editor. If I open the Holographic settings in Unity I can even Emulate it to remote device and see it in the Hololens. As soon as I try to build and deploy it, however, it doesn't work.
     
    Last edited: Jun 11, 2019
  43. hendrikk1

    hendrikk1

    Joined:
    Aug 7, 2012
    Posts:
    15
    Hi there,

    Firstly I'm sorry if this question has been already asked before, is anyone having a download issue with Android Pie ?

    Thanks
     
  44. hendrikk1

    hendrikk1

    Joined:
    Aug 7, 2012
    Posts:
    15
    Sorry, just solved the problem by use https instead of http.
     
  45. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Ontem atualizei o projeto e consegui fazer a build! Só esqueci ontem de dar o feedback, mas to dando agora. Valeu Ricardo, essa att foi importante pra a gente já fazer a build pra 64 no Android, que em agosto vai ser obrigatório!
     
  46. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Ok, tive mais um problema na hora de chamar a função LoadFromMemoryWithTextures com IL2CPP, na hora de ler o arquivo, ele me mostra esse erro:

    assetLoader.LoadFromMemoryWithTextures - filename: etc.fbx - exception: System.Exception: Error parsing file. ---> System.NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. at TriLib.AssimpInterop._aiImportFileFromMemoryWithProperties (System.IntPtr ptrBuffer, System.UInt32 uintLength, System.UInt32 uintFlags, System.Int32 fileId, System.String strHint, System.IntPtr ptrProps, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssimpInterop.ai_ImportFileFromMemoryWithProperties (System.Byte[] fileBytes, System.UInt32 uintFlags, System.String strHint, System.IntPtr ptrProps, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, System.Int32 fileId, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.ImportFileFromMemory (System.Byte[] fileBytes, System.String fileHint, TriLib.AssetLoaderOptions options, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, System.Int32 fileId, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemory (System.Byte[] fileBytes, System.String filename, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback, TriLib.FileLoadData customFileLoadData) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip (System.Byte[] data, System.String assetExtension, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderAsync+<>c__DisplayClass2_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at TriLib.ThreadUtils+<>c__DisplayClass1_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at TriLib.AssetLoaderBase.InternalLoadFromMemory (System.Byte[] fileBytes, System.String filename, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback, TriLib.FileLoadData customFileLoadData) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip (System.Byte[] data, System.String assetExtension, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderAsync+<>c__DisplayClass2_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at TriLib.ThreadUtils+<>c__DisplayClass1_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0


    Eu tentei fazer um debug com as linhas pra conseguir dar um melhor feedback, não consegui aqui. Com isso eu tive que voltar pro Mono :/ Tem ideia do que possa ser?
     
  47. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    I haven't seen this error before.
    Are you deploying to Hololens or Hololens 2?
    Could you share a screenshot of your build settings?

    Best regards,
    Ricardo Reis.
     
  48. ventsie

    ventsie

    Joined:
    Nov 12, 2016
    Posts:
    5
  49. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    I can't find any issue at the moment, but I could find a video from a user who managed to deploy TriLib on Hololens:


    There are other users who were able to use it on Hololens, but they don't do any special configuration by the way. I can only test with the emulator, which works fine on my end.

    I will research more about this subject.

    Best regards,
    Ricardo Reis.
     
  50. spoonshoe

    spoonshoe

    Joined:
    Jan 25, 2010
    Posts:
    9

    Hello, nope, this is iOS but I found / fixed the error. In the plugin there are few extern methods that I had to wrap in '#if UNITY_IOS and it worked fine after that. I just did a search for TriLibGetBrowserFileLength etc and wrapped the offending methods. Hope this helps someone else! This is an awesome plugin, it saved my butt on a project.
     
    guneyozsan likes this.