矢張り、EditorPrefs を使うことにした

* symbol UNIGLTF_DEFAULT_AXES_X は止める
This commit is contained in:
ousttrue 2021-05-20 12:56:00 +09:00
parent 3ba3f899e3
commit 5ffab988dc
2 changed files with 8 additions and 6 deletions

View File

@ -20,11 +20,7 @@ namespace UniGLTF
case ScriptedImporterAxes.X: return Axes.X;
case ScriptedImporterAxes.Default:
{
#if UNIGLTF_DEFAULT_AXES_X
return Axes.X;
#else
return Axes.Z;
#endif
return UniGLTFPreference.GltfIOAxis;
}
default: throw new System.NotImplementedException();

View File

@ -15,7 +15,13 @@ namespace UniGLTF
EditorGUILayout.HelpBox($"Custom editor language setting", MessageType.Info, true);
// default axis
ToggleSymbol("Use X axis for default invert axis", "UNIGLTF_DEFAULT_AXES_X");
EditorGUI.BeginChangeCheck();
var gltfIOAxis = (Axes)EditorGUILayout.EnumPopup("Default Invert axis", GltfIOAxis);
EditorGUILayout.HelpBox($"Default invert axis when glb/gltf import/export", MessageType.Info, true);
if (EditorGUI.EndChangeCheck())
{
GltfIOAxis = gltfIOAxis;
}
}
const string AXIS_KEY = "UNIGLTF_IO_AXIS";