Search Unity

[Hololens] Load a FBX from a KnownFolder

Discussion in 'VR' started by Heaume, Dec 13, 2018.

  1. Heaume

    Heaume

    Joined:
    Jul 31, 2018
    Posts:
    5
    Hello,

    The app I'm currently developing loads FBX and CSV files. I can read just fine both if the files are in the local folder of the app: ApplicationData.Current.LocalFolder but I need to use a KnownFolder instead because I need to be able to create folders. I'm currently using the folder 3D Objects (windows.storage.knownfolders.objects3d).

    My issue is the CSV reads fine but not the FBX, it's the same exact script that is working in the local folder, I'm using an asset called TriLib to load the FBX (https://assetstore.unity.com/packages/tools/modeling/trilib-unity-model-loader-package-91777).
    Again this error happen only if I use a KnownFolder it loads the FBX model just fine if loaded from the local app folder, so I'm not sure the issue lies with TriLib.
    TriLib erreur2.jpg

    The app manifest is correctly written I think:

    xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

    manifest2.jpg
    fileSystem2.jpg

    Is there any alternative to TriLib I could try? Did any of you manage to load a FBX from a KnownFolder?

    I know the Microsoft app 3D Viewer Beta (https://www.microsoft.com/en-us/p/3d-viewer-beta/9nblggh5pm4z#activetab=pivot:overviewtab) is able to load FBX from the 3D Objects folder, so I guess it can be done.
     
  2. Heaume

    Heaume

    Joined:
    Jul 31, 2018
    Posts:
    5
    [Update][Resolved]

    I found a way to make it work, knowing that txt files could be read, I deconstructed and then reconstructed the FBX file in order to load it as a txt file. A kind of serialization.

    I'm still interested in a better solution if any of you has one since this is just a band aid solution, I'm not sure more complex FBX files will survive the conversion process.

    At least I can resume development now.
     
  3. Nervia

    Nervia

    Joined:
    May 4, 2018
    Posts:
    1
  4. HaithemK

    HaithemK

    Joined:
    Jun 21, 2017
    Posts:
    1
    @Heaume Hi!
    i am facing the same problem. Could you please explain me how did you managed to make it work ?
    thank you