mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 22:39:39 -05:00
add VRMShaders.Symbols
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
18
Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs
Normal file
18
Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace VRMShaders
|
||||
{
|
||||
public static class Symbols
|
||||
{
|
||||
/// <summary>
|
||||
/// #if 文を局所化する。
|
||||
/// VRMShaders が最下層になるため、ここに配置している
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public const bool VRM_DEVELOP =
|
||||
#if VRM_DEVELOP
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
;
|
||||
}
|
||||
}
|
||||
11
Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs.meta
Normal file
11
Assets/VRMShaders/GLTF/IO/Runtime/Util/Symbols.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffb4175afef01ea48ad7669a8b12d93f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user