VRM-0.X の export dialog から RuntimeTextureSerializer を選択できる

#2762
This commit is contained in:
ousttrue
2026-07-21 16:52:22 +09:00
parent 8de0d48137
commit e47d36c9c9
4 changed files with 13 additions and 2 deletions

View File

@@ -239,7 +239,7 @@ namespace VRM
using (var exporter = new VRMExporter(data, gltfExportSettings,
animationExporter: settings.KeepAnimation ? new EditorAnimationExporter() : null,
materialExporter: materialExporter,
textureSerializer: new EditorTextureSerializer()))
textureSerializer: settings.KeepTextureAssetConfiguration ? new RuntimeTextureSerializer() : new EditorTextureSerializer()))
{
exporter.Prepare(target);
exporter.Export();

View File

@@ -53,7 +53,11 @@ namespace VRM
KEEP_VERTEX_COLOR,
[LangMsg(Languages.ja, "glTF Animationをエクスポートする。")]
[LangMsg(Languages.en, "export glTF animation.")]
[LangMsg(Languages.en, "Export glTF animation.")]
EXPORT_GLTF_ANIMATION,
[LangMsg(Languages.ja, "テクスチャーアセット設定を変更しない。")]
[LangMsg(Languages.en, "Keep texture asset configuration.")]
KEEP_TEXTURE_ASSET_CONFIGURATION,
}
}

View File

@@ -67,6 +67,12 @@ namespace VRM
[Tooltip("Keep animation")]
public bool KeepAnimation = false;
/// <summary>
/// Export時にTexture設定を変更しない
/// </summary>
[Tooltip("Keep texture configuration")]
public bool KeepTextureAssetConfiguration = false;
public GltfExportSettings GltfExportSettings => new GltfExportSettings
{
UseSparseAccessorForMorphTarget = UseSparseAccessor,

View File

@@ -56,6 +56,7 @@ namespace VRM
m_checkbox_list.Add(new CheckBoxProp(serializedObject.FindProperty(nameof(VRMExportSettings.DivideVertexBuffer)), VRMExportOptions.DIVIDE_VERTEX_BUFFER));
m_checkbox_list.Add(new CheckBoxProp(serializedObject.FindProperty(nameof(VRMExportSettings.KeepVertexColor)), VRMExportOptions.KEEP_VERTEX_COLOR));
m_checkbox_list.Add(new CheckBoxProp(serializedObject.FindProperty(nameof(VRMExportSettings.KeepAnimation)), VRMExportOptions.EXPORT_GLTF_ANIMATION));
m_checkbox_list.Add(new CheckBoxProp(serializedObject.FindProperty(nameof(VRMExportSettings.KeepTextureAssetConfiguration)), VRMExportOptions.KEEP_TEXTURE_ASSET_CONFIGURATION));
}