Search Unity

Export FBX Runtime

Discussion in 'Asset Importing & Exporting' started by Spaniel, Aug 12, 2020.

  1. Spaniel

    Spaniel

    Joined:
    Dec 23, 2012
    Posts:
    52
    I have written a model viewer utility and would like the ability to export the model to FBX from runtime in a standalone view. Apparently this is possible using the FBX export package. They even mention that it is possible during runtime:

    https://docs.unity3d.com/Packages/com.unity.formats.fbx@3.2/manual/devguide.html

    When I install the package, I can export models by right clicking on the prefab. But during runtime, I can't get it to work. It says it apparently works on a scene? Where does my script have to live? Can I export one specific prefab in the scene rather than the entire scene?

    Thank you!
     
  2. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    78
    The Exporter itself is "Editor Only" - the examples it gives wouldn't be relevant in your use case (Note how they include the UnityEditor namespace).

    The part of the package that you'd want to explore is the FBX SDK bindings which may be executed at runtime. However, you'd have to take care of that process yourself - the FBX Exporter source code would be a good place to start.
     
  3. Spaniel

    Spaniel

    Joined:
    Dec 23, 2012
    Posts:
    52
    Thanks for the reply!
     
  4. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    78
    No problem, & good luck!
     
  5. tomph

    tomph

    Joined:
    Nov 6, 2013
    Posts:
    33
    Hey @Spaniel ! I'm about to go down this road myself. Did you make any progress with a runtime exporter?
     
  6. wxxhrt

    wxxhrt

    Joined:
    Mar 18, 2014
    Posts:
    163
    Hey @Spaniel I'm trying to figure this out myself too! Any progress made?
     
  7. Spaniel

    Spaniel

    Joined:
    Dec 23, 2012
    Posts:
    52
    Sorry all, I had no luck with a runtime exporter.