Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

コード整理 #887

Merged
merged 4 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Assets/UniGLTF/Editor/Animation/AnimationValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using MeshUtility;
using MeshUtility.M17N;
using UnityEditor;
using UnityEngine;

Expand Down
3 changes: 1 addition & 2 deletions Assets/UniGLTF/Editor/EditorSettingsValidator/Messages.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using MeshUtility.M17N;


namespace UniGLTF.EditorSettingsValidator
{
public enum Messages
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using MeshUtility.M17N;
using UnityEditor;
using UnityEditor;

namespace UniGLTF.EditorSettingsValidator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using MeshUtility.M17N;
using UnityEditor;
using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Reflection;
using UnityEngine;
using UnityEditor;
using MeshUtility.M17N;
using UniGLTF;

namespace MeshUtility
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEditor;
using UnityEngine;

namespace MeshUtility
namespace UniGLTF
{
public delegate IEnumerable<Validation> Validator(GameObject root);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using UnityEngine;

namespace MeshUtility
namespace UniGLTF
{
public static class ExporterExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static void Export(GameObject go, string path, MeshExportSettings settin
}
}

MeshUtility.ExporterDialogState m_state;
ExporterDialogState m_state;
GltfExportSettings m_settings;
Editor m_settingsInspector;

Expand All @@ -79,7 +79,7 @@ void OnEnable()
m_settings = ScriptableObject.CreateInstance<GltfExportSettings>();
m_settingsInspector = Editor.CreateEditor(m_settings);

m_state = new MeshUtility.ExporterDialogState();
m_state = new ExporterDialogState();
m_state.ExportRootChanged += (root) =>
{
Repaint();
Expand Down Expand Up @@ -120,9 +120,9 @@ static BeginVerticalScrollViewFunc BeginVerticalScrollView
}
private Vector2 m_ScrollPosition;

IEnumerable<MeshUtility.Validator> ValidatorFactory()
IEnumerable<Validator> ValidatorFactory()
{
yield return MeshUtility.Validators.HierarchyValidator.ValidateRoot;
yield return HierarchyValidator.ValidateRoot;
yield return AnimationValidator.Validate;
if (!m_state.ExportRoot)
{
Expand All @@ -143,7 +143,7 @@ private void OnGUI()
EditorGUIUtility.labelWidth = 150;

// lang
MeshUtility.M17N.Getter.OnGuiSelectLang();
Getter.OnGuiSelectLang();

EditorGUILayout.LabelField("ExportRoot");
{
Expand Down Expand Up @@ -198,7 +198,7 @@ bool ScrollArea()
foreach (var v in m_state.Validations)
{
v.DrawGUI();
if (v.ErrorLevel == MeshUtility.ErrorLevels.Critical)
if (v.ErrorLevel == ErrorLevels.Critical)
{
// Export UI を表示しない
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using UnityEditor;

namespace MeshUtility.M17N
namespace UniGLTF
{
/// <summary>
/// 多言語対応
Expand Down Expand Up @@ -84,16 +84,16 @@ public static Languages Lang

public static string Msg<T>(this T key) where T : Enum
{
return M17N.MsgCache<T>.Get(Lang, key);
return MsgCache<T>.Get(Lang, key);
}

public static void OnGuiSelectLang()
{
var lang = (M17N.Languages)EditorGUILayout.EnumPopup("lang", Lang);
var lang = (Languages)EditorGUILayout.EnumPopup("lang", Lang);
if (lang != Lang)
{
m_lang = lang;
EditorPrefs.SetString(LANG_KEY, M17N.Getter.Lang.ToString());
EditorPrefs.SetString(LANG_KEY, Getter.Lang.ToString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using MeshUtility.M17N;
using UnityEngine;

namespace MeshUtility.Validators
namespace UniGLTF
{
public static class HierarchyValidator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using MeshUtility.M17N;
using UnityEditor;
using UnityEngine;

namespace MeshUtility.Validators
namespace UniGLTF
{
public class NameValidator
{
Expand Down
8 changes: 0 additions & 8 deletions Assets/UniGLTF/MeshUtility.meta

This file was deleted.

17 changes: 0 additions & 17 deletions Assets/UniGLTF/MeshUtility/Editor/MeshUtility.Editor.asmdef

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions Assets/UniGLTF/MeshUtility/LICENSE.md

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/UniGLTF/MeshUtility/LICENSE.md.meta

This file was deleted.

36 changes: 0 additions & 36 deletions Assets/UniGLTF/MeshUtility/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/UniGLTF/MeshUtility/README.md.meta

This file was deleted.

2 changes: 0 additions & 2 deletions Assets/UniGLTF/MeshUtility/README.url

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/UniGLTF/MeshUtility/README.url.meta

This file was deleted.

13 changes: 0 additions & 13 deletions Assets/UniGLTF/MeshUtility/Runtime/MeshUtility.asmdef

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/UniGLTF/MeshUtility/Runtime/MeshUtility.asmdef.meta

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using UnityEditor;
#endif

namespace MeshUtility
namespace UniGLTF
{
public enum ErrorLevels
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using MeshUtility;
using UniGLTF;
using UnityEngine;

namespace VRM
Expand Down
2 changes: 1 addition & 1 deletion Assets/VRM/Editor/FirstPerson/VRMFirstPersonEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MeshUtility;
using UniGLTF;
using UnityEditor;
using UnityEngine;

Expand Down
2 changes: 1 addition & 1 deletion Assets/VRM/Editor/FirstPerson/VRMFirstPersonValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MeshUtility;
using UniGLTF;
using UnityEngine;

namespace VRM
Expand Down
3 changes: 1 addition & 2 deletions Assets/VRM/Editor/Format/HumanoidValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using MeshUtility;
using MeshUtility.M17N;
using UniGLTF;
using UnityEngine;

namespace VRM
Expand Down
1 change: 0 additions & 1 deletion Assets/VRM/Editor/Format/VRMExportMeshesEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System;
using UnityEditor;
using UnityEngine;
using MeshUtility.M17N;

namespace VRM
{
Expand Down
3 changes: 1 addition & 2 deletions Assets/VRM/Editor/Format/VRMExportSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System;
using UnityEditor;
using UnityEngine;
using MeshUtility.M17N;
using System.Reflection;
using System.Linq;
using System.Collections.Generic;
Expand Down Expand Up @@ -49,7 +48,7 @@ public void Draw()

static string Msg(Options key)
{
return MeshUtility.M17N.Getter.Msg(key);
return Getter.Msg(key);
}

public enum Options
Expand Down
7 changes: 3 additions & 4 deletions Assets/VRM/Editor/Format/VRMExporterVaildator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using MeshUtility;
using MeshUtility.M17N;
using UniGLTF;
using UnityEngine;

namespace VRM
Expand Down Expand Up @@ -32,9 +31,9 @@ public static IEnumerable<Validation> Validate(GameObject ExportRoot)
if (vrmMeta != null && vrmMeta.Meta != null && vrmMeta.Meta.Thumbnail != null)
{
var thumbnailName = vrmMeta.Meta.Thumbnail.name;
if (MeshUtility.Validators.NameValidator.IsFileNameLengthTooLong(thumbnailName))
if (NameValidator.IsFileNameLengthTooLong(thumbnailName))
{
yield return Validation.Error(MeshUtility.Validators.NameValidator.ValidationMessages.FILENAME_TOO_LONG.Msg() + thumbnailName);
yield return Validation.Error(NameValidator.ValidationMessages.FILENAME_TOO_LONG.Msg() + thumbnailName);
}
}
}
Expand Down
Loading