Search Unity

Automatically calling ProBuilder STL exporter

Discussion in 'Scripting' started by unity_noob267, Oct 27, 2020.

  1. unity_noob267

    unity_noob267

    Joined:
    Oct 27, 2020
    Posts:
    1
    (Disclaimer: I have very limited unity experience and am not doing game development)

    I am able to use the Pro Builder STL exporter to do exactly what I want manually, but I would like to be able to run this automatically (due to random environment generation). Does anyone have any advice of how to get started? I see ProBuilder has an API, could it access the STL exporter function (seems like no from the description)? Is my only path forward copying some of the source into my project (https://github.com/Unity-Technologies/com.unity.probuilder/tree/master/External/StlExporter) ?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Depends where else this code is! Obviously it has to be somewhere in your build to do it at runtime, but on the other hand this line (from the above README) seems to indicate that what you want is completely possible.

    I quote,

    - Export and import Binary & ASCII STL files in editor or at runtime.