public GLTFExporter(GLTFRoot gltf, IMaterialExporter materialExporter, IMeshExporter meshExporter, IAnimationExporter animationExporter) { this.gltf = gltf; _materialExporter = materialExporter ?? new MaterialExporter(); _meshExporter = meshExporter ?? new MeshExporter(); _animationExporter = animationExporter ?? new AnimationExporter(); this.gltf.extensionsUsed.AddRange(extensionUsed); this.gltf.asset = new GLTFAsset { generator = "GLTFumaExporter", version = "2.0", }; }
public gltfExporter(ExportingGltfData data, GltfExportSettings settings, IProgress <ExportProgress> progress = null, IAnimationExporter animationExporter = null) { _data = data; _gltf.extensionsUsed.AddRange(ExtensionUsed); _gltf.asset = new glTFAssets { generator = "UniGLTF-" + UniGLTFVersion.VERSION, version = "2.0", }; m_settings = settings; if (m_settings == null) { // default m_settings = new GltfExportSettings(); } m_animationExporter = animationExporter; }
public VRMExporter(ExportingGltfData data, GltfExportSettings exportSettings, IAnimationExporter animationExporter = null) : base( data, exportSettings, animationExporter: animationExporter) { if (exportSettings == null || exportSettings.InverseAxis != Vrm0xSpecificationInverseAxis) { throw new Exception($"VRM specification requires InverseAxis settings as {Vrm0xSpecificationInverseAxis}"); } _gltf.extensionsUsed.Add(glTF_VRM_extensions.ExtensionName); }