diff --git a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs
index 07e0cff36..97df735f5 100644
--- a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs
+++ b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterEditorGUI.cs
@@ -117,12 +117,13 @@ namespace UniVRM10
case Vrm10FileType.Vrm0:
EditorGUILayout.HelpBox(m_result.Message, m_model != null ? MessageType.Info : MessageType.Warning);
-#if VRM_DEVELOP
- if (GUILayout.Button("debug export"))
+ if (VRMShaders.Symbols.VRM_DEVELOP)
{
- File.WriteAllBytes("tmp.vrm", m_result.MigratedBytes);
+ if (GUILayout.Button("debug export"))
+ {
+ File.WriteAllBytes("tmp.vrm", m_result.MigratedBytes);
+ }
}
-#endif
// migration check boxs
base.OnInspectorGUI();
diff --git a/Assets/VRM10/Runtime/IO/Vrm10Data.cs b/Assets/VRM10/Runtime/IO/Vrm10Data.cs
index 9dc63571f..b5fffaec1 100644
--- a/Assets/VRM10/Runtime/IO/Vrm10Data.cs
+++ b/Assets/VRM10/Runtime/IO/Vrm10Data.cs
@@ -120,10 +120,13 @@ namespace UniVRM10
throw new NullReferenceException("oldMeta");
}
result = new Vrm10Data(migratedData, vrm, Vrm10FileType.Vrm0, "vrm0: migrated", oldMeta);
-#if VRM_DEVELOP
- // 右手左手座標変換でバッファが破壊的変更されるので、コピーを作っている
- result.MigratedBytes = migrated.Select(x => x).ToArray();
-#endif
+
+ if (VRMShaders.Symbols.VRM_DEVELOP)
+ {
+ // 右手左手座標変換でバッファが破壊的変更されるので、コピーを作っている
+ result.MigratedBytes = migrated.Select(x => x).ToArray();
+ }
+
return true;
}
diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs b/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs
new file mode 100644
index 000000000..7035e055e
--- /dev/null
+++ b/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs
@@ -0,0 +1,18 @@
+namespace VRMShaders
+{
+ public static class Symbols
+ {
+ ///
+ /// #if 文を局所化する。
+ /// VRMShaders が最下層になるため、ここに配置している
+ ///
+ ///
+ public const bool VRM_DEVELOP =
+#if VRM_DEVELOP
+true
+#else
+false
+#endif
+ ;
+ }
+}
diff --git a/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs.meta b/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs.meta
new file mode 100644
index 000000000..d60f2fbd2
--- /dev/null
+++ b/Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ffb4175afef01ea48ad7669a8b12d93f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: