Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved]TriLib on Hololens, folder access

Discussion in 'VR' started by Roest_, Jan 29, 2019.

  1. Roest_

    Roest_

    Joined:
    Nov 3, 2014
    Posts:
    25
    I'm trying to use https://assetstore.unity.com/packages/tools/modeling/trilib-model-loader-package-91777 to load models at runtime. The idea is to have a json file containing the file names and additional info and the models as fbx.

    Ideally I want to use a folder that is visible when you connect the hololens to a PC via USB. So I am trying to the "3D Objects" folder. My app has permission to access that folder, I can load the json file just fine. Now when I try to load a fbx file with TriLib the Assimp part in there returns a "Unable to open file". When I put the fbx in ApplicationData.Current.LocalFolder TriLib can access and load it. The problem is that would require the user to use the device portal or for me to implement some upload function in the app.

    Has anyone run into this kind of problem and know how to fix it?
     
  2. Roest_

    Roest_

    Joined:
    Nov 3, 2014
    Posts:
    25
    Ok workaround, use File.Copy to copy the file to the LocalApp folder and then TriLib can access it.
     
  3. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    682
    If you have any question, feel free to e-mail at:
    contato@ricardoreis.net

    Best regards,
    Ricardo Reis - TriLib.
     
  4. ccarrieta

    ccarrieta

    Joined:
    Dec 2, 2017
    Posts:
    3
    Hi Roest I am using this asset as well.. when I load a model using the asset loader example how can I apply the box collider/near interaction grabbable and handler prefabs to the object ? Do I have to add it manually each time the model loads ?
     
  5. ATIliev

    ATIliev

    Joined:
    May 5, 2019
    Posts:
    2
    You can use a predefined prefab with all scripts you need like a container. Just check if some of the scripts need to reattach to the newly loaded object.
     
  6. Mike_Chatz

    Mike_Chatz

    Joined:
    Jan 18, 2019
    Posts:
    8
    Hello, could you please post the code you used on how to use Trilib to load an fbx file on HoloLens?