Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity runtime models importer from sketchfab

Discussion in 'General Discussion' started by glutvort, May 9, 2019.

  1. glutvort

    glutvort

    Joined:
    Apr 13, 2019
    Posts:
    31
    Hello i need make this features: Can i download models from sketchfap api from unity and create model in my game at runtime. Is it possible?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,745
    I don't think the Sketchfab API has something that lets you create models, just download and view them.
     
  3. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    You can use sketchfab to download the model at runtime. For actually editing meshes at runtime you will need to get some kind of 3rd party asset
    https://assetstore.unity.com/packages/tools/input-management/sketchfab-for-unity-14302

    Maybe something like that for editing the models at runtime
    https://github.com/Unity-Technologies/ProBuilder-API-Examples/tree/master/Runtime

    Actually that one is no good, well anyway I guess you will need to find a runtime mesh editing tool, let me know if you do
     
    Last edited: May 9, 2019
  4. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    Do you mean other people's models, that they havent actually given you permission to reuse?
     
  5. glutvort

    glutvort

    Joined:
    Apr 13, 2019
    Posts:
    31
    i dont need modify models or mesh. I need load model from sketchfab at runtime and just instantiate. All scripts from https://assetstore.unity.com/packages/tools/input-management/sketchfab-for-unity-14302 has #if UNITY_EDITOR
     
  6. glutvort

    glutvort

    Joined:
    Apr 13, 2019
    Posts:
    31
    only my models
     
  7. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Are you sure you can search for sketchfab models, and download them at runtime? Because when I download the asset you mentioned, it seems to only add a Unity Editor menu which allows for this. I don't see any way to do this at runtime. The included .cs classes are all wrapped in #if UNITY_EDITOR which of course means they can only be used in the Editor. The Google Poly api on the other hand, does work great at runtime. I sure wish this worked the same for Sketchpad!

    Edit: I see now that OP also pointed out that the classes only work in the Editor. glutvort, did you ever figure this out? I'm trying to do the same thing.
     
    Last edited: Aug 15, 2019
  8. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    What would make you assume that he's be using other people's models without permission? The Sketchfab API only returns models with a Creative Commons license, so many are free to use as long as credits are provided.
     
  9. Matiasbru

    Matiasbru

    Joined:
    Sep 1, 2015
    Posts:
    20
    Any news about this? I saw a guy posted something on Twitter about doing an implementation with voice recognition. So you say "car" and a random car from the library will materialize in front of you. Unfortunately, I can´t find the link anymore.