Interface IGltfWritable
Is able to receive asset resources and export them to glTF
Namespace: GLTFast.Export
Assembly: solution.dll
Syntax
public interface IGltfWritable
Methods
Name | Description |
---|---|
AddCamera(Camera, out int) | Creates a glTF camera based on a Unity camera |
AddCameraToNode(int, int) | Assigns a camera to a previously added node |
AddImage(ImageExportBase) | Adds an ImageExport to the glTF and returns the resulting image index |
AddLight(Light, out int) | Creates a glTF light based on a Unity light Uses the KHR_lights_punctual extension. |
AddLightToNode(int, int) | Assigns a light to a previously added node |
AddMaterial(Material, out int, IMaterialExport) | Adds a Unity material |
AddMeshToNode(int, Mesh, int[]) | Assigns a mesh to a previously added node |
AddNode(float3?, quaternion?, float3?, uint[], string) | Adds a node to the glTF |
AddSampler(FilterMode, TextureWrapMode, TextureWrapMode) | Creates a glTF sampler based on Unity filter and wrap settings |
AddScene(uint[], string) | Adds a scene to the glTF |
AddTexture(int, int) | Creates a glTF texture from with a given image index |
RegisterExtensionUsage(Extension, bool) | Registers the use of a glTF extension |
SaveToFileAndDispose(string) | Exports the collected scenes/content as glTF, writes it to a file and disposes this object. After the export this instance cannot be re-used! |
SaveToStreamAndDispose(Stream) | Exports the collected scenes/content as glTF, writes it to a Stream and disposes this object. Only works for self-contained glTF-Binary. After the export this instance cannot be re-used! |