diff --git a/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs b/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs index d0f73512d..7438803b0 100644 --- a/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs +++ b/Assets/UniGLTF/Editor/Animation/AnimationExporter.cs @@ -133,12 +133,12 @@ namespace UniGLTF var property = AnimationExporter.PropertyToTarget(binding.propertyName); if (property == glTFAnimationTarget.AnimationProperties.NotImplemented) { - Debug.LogWarning("Not Implemented keyframe property : " + binding.propertyName); + UniGLTFLogger.Warning("Not Implemented keyframe property : " + binding.propertyName); continue; } if (property == glTFAnimationTarget.AnimationProperties.EulerRotation) { - Debug.LogWarning("Interpolation setting of AnimationClip should be Quaternion"); + UniGLTFLogger.Warning("Interpolation setting of AnimationClip should be Quaternion"); continue; } diff --git a/Assets/UniGLTF/Editor/GltfImportMenu.cs b/Assets/UniGLTF/Editor/GltfImportMenu.cs index cbc19bdfc..f04e002c3 100644 --- a/Assets/UniGLTF/Editor/GltfImportMenu.cs +++ b/Assets/UniGLTF/Editor/GltfImportMenu.cs @@ -33,7 +33,7 @@ namespace UniGLTF // if (path.StartsWithUnityAssetPath()) { - Debug.LogWarningFormat("disallow import from folder under the Assets"); + UniGLTFLogger.Warning("disallow import from folder under the Assets"); return; } diff --git a/Assets/UniGLTF/Editor/MeshUtility/MeshUtilityDialog.cs b/Assets/UniGLTF/Editor/MeshUtility/MeshUtilityDialog.cs index 6207d98c8..e21a01cfc 100644 --- a/Assets/UniGLTF/Editor/MeshUtility/MeshUtilityDialog.cs +++ b/Assets/UniGLTF/Editor/MeshUtility/MeshUtilityDialog.cs @@ -212,7 +212,7 @@ namespace UniGLTF.MeshUtility catch (Exception ex) { #if DEBUG - Debug.LogException(ex, context.Instance); + UniGLTFLogger.Exception(ex, context.Instance); context.Keep = true; #endif } diff --git a/Assets/UniGLTF/Editor/TestRunner/TestRunner.cs b/Assets/UniGLTF/Editor/TestRunner/TestRunner.cs index 39e371477..aa2e94eac 100644 --- a/Assets/UniGLTF/Editor/TestRunner/TestRunner.cs +++ b/Assets/UniGLTF/Editor/TestRunner/TestRunner.cs @@ -54,14 +54,14 @@ namespace UniGLTF _tmpStackTraceLogType = Application.GetStackTraceLogType(LogType.Log); Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None); - Debug.Log($"{LogPrefix}Edit Mode Tests Started."); + UniGLTFLogger.Log($"{LogPrefix}Edit Mode Tests Started."); } public void RunFinished(ITestResultAdaptor result) { - Debug.Log($"{LogPrefix}Edit Mode Tests Finished."); - Debug.Log($"{LogPrefix}Passed: {result.PassCount}, Skipped: {result.SkipCount}, Failed: {result.FailCount}"); - Debug.Log($"{ResultLogPrefix}{result.FailCount}"); + UniGLTFLogger.Log($"{LogPrefix}Edit Mode Tests Finished."); + UniGLTFLogger.Log($"{LogPrefix}Passed: {result.PassCount}, Skipped: {result.SkipCount}, Failed: {result.FailCount}"); + UniGLTFLogger.Log($"{ResultLogPrefix}{result.FailCount}"); Application.SetStackTraceLogType(LogType.Log, _tmpStackTraceLogType); @@ -69,7 +69,7 @@ namespace UniGLTF { if (!string.IsNullOrEmpty(_xmlFilePath)) { - Debug.Log($"{LogPrefix}Write NUnit XML to {_xmlFilePath}"); + UniGLTFLogger.Log($"{LogPrefix}Write NUnit XML to {_xmlFilePath}"); var xmlNode = CreateNUnitXmlTree(result); using var xmlWriter = new XmlTextWriter(_xmlFilePath, Encoding.UTF8); @@ -92,8 +92,8 @@ namespace UniGLTF if (result.TestStatus != TestStatus.Passed) { - Debug.Log($"{LogPrefix}{result.Message}"); - Debug.Log($"{LogPrefix}{result.StackTrace}"); + UniGLTFLogger.Log($"{LogPrefix}{result.Message}"); + UniGLTFLogger.Log($"{LogPrefix}{result.StackTrace}"); } } diff --git a/Assets/UniGLTF/Editor/TopMenu.cs b/Assets/UniGLTF/Editor/TopMenu.cs index 0d6e4f678..aa3fe2ae7 100644 --- a/Assets/UniGLTF/Editor/TopMenu.cs +++ b/Assets/UniGLTF/Editor/TopMenu.cs @@ -50,11 +50,11 @@ namespace UniGLTF { if (Selection.activeObject is GameObject go) { - Debug.Log(go.GetPrefabType()); + UniGLTFLogger.Log($"{go.GetPrefabType()}"); } else { - Debug.Log(Selection.activeContext.GetType()); + UniGLTFLogger.Log($"{Selection.activeContext.GetType()}"); } } #endif diff --git a/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/ExportDialogState.cs b/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/ExportDialogState.cs index 85fbbbfba..8026e869c 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/ExportDialogState.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ExportDialog/ExportDialogState.cs @@ -49,7 +49,7 @@ namespace UniGLTF } catch (ArgumentException) { - // Debug.LogWarning(ex); + // UniGLTFLogger.LogWarning(ex); } } if (m_root.GameObject == value) diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs index 4a065457e..05fb2110a 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/TextureExtractor.cs @@ -58,7 +58,7 @@ namespace UniGLTF else { // throw new Exception($"{key} is not converted."); - Debug.LogWarning($"{key} is not converted."); + UniGLTFLogger.Warning($"{key} is not converted."); } } diff --git a/Assets/UniGLTF/Editor/UniGLTF/Serialization/DeserializerGenerator.cs b/Assets/UniGLTF/Editor/UniGLTF/Serialization/DeserializerGenerator.cs index 68f84b0a0..96bec277c 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/Serialization/DeserializerGenerator.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/Serialization/DeserializerGenerator.cs @@ -42,7 +42,7 @@ public static class GltfDeserializer public static void GenerateSerializer() { var info = new ObjectSerialization(typeof(glTF), "gltf", "Deserialize_"); - Debug.Log(info); + UniGLTFLogger.Log($"{info}"); using (var s = File.Open(OutPath, FileMode.Create)) using (var w = new StreamWriter(s, new UTF8Encoding(false))) @@ -52,7 +52,7 @@ public static class GltfDeserializer w.Write(End); } - Debug.LogFormat("write: {0}", OutPath); + UniGLTFLogger.Log($"write: {OutPath}"); UnityPath.FromFullpath(OutPath).ImportAsset(); } } diff --git a/Assets/UniGLTF/Editor/UniGLTF/Serialization/SerializerGenerator.cs b/Assets/UniGLTF/Editor/UniGLTF/Serialization/SerializerGenerator.cs index 201419a7a..0366adda8 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/Serialization/SerializerGenerator.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/Serialization/SerializerGenerator.cs @@ -42,7 +42,7 @@ namespace UniGLTF { public static void GenerateSerializer() { var info = new ObjectSerialization(typeof(glTF), "gltf", "Serialize_"); - Debug.Log(info); + UniGLTFLogger.Log($"{info}"); using (var s = File.Open(OutPath, FileMode.Create)) using (var w = new StreamWriter(s, new UTF8Encoding(false))) @@ -52,7 +52,7 @@ namespace UniGLTF { w.Write(End); } - Debug.LogFormat("write: {0}", OutPath); + UniGLTFLogger.Log($"write: {OutPath}"); UnityPath.FromFullpath(OutPath).ImportAsset(); } } diff --git a/Assets/UniGLTF/Editor/UniHumanoid/BoneMappingEditor.cs b/Assets/UniGLTF/Editor/UniHumanoid/BoneMappingEditor.cs index 29ed3e1bc..20456a51b 100644 --- a/Assets/UniGLTF/Editor/UniHumanoid/BoneMappingEditor.cs +++ b/Assets/UniGLTF/Editor/UniHumanoid/BoneMappingEditor.cs @@ -4,6 +4,7 @@ using System.Linq; using System.IO; using UnityEditor; using UnityEngine; +using UniGLTF; namespace UniHumanoid @@ -122,7 +123,7 @@ animator.GetBoneTransform(x.Head), animator.GetBoneTransform(x.Tail))) } else { - Debug.LogWarning("fail to CreateAvatar"); + UniGLTFLogger.Warning("fail to CreateAvatar"); } } } diff --git a/Assets/UniGLTF/Editor/UniHumanoid/HumanPoseTransferEditor.cs b/Assets/UniGLTF/Editor/UniHumanoid/HumanPoseTransferEditor.cs index 6a8489a45..26f8b1027 100644 --- a/Assets/UniGLTF/Editor/UniHumanoid/HumanPoseTransferEditor.cs +++ b/Assets/UniGLTF/Editor/UniHumanoid/HumanPoseTransferEditor.cs @@ -120,7 +120,6 @@ namespace UniHumanoid var _target = (HumanPoseTransfer)target; if (_target.PoseClip != old) { - //Debug.Log("clip != old"); if (_target.PoseClip != null) { var pose = _target.PoseClip.GetPose(); @@ -133,7 +132,7 @@ namespace UniHumanoid { if (GUILayout.Button("Apply PoseClip")) { - Debug.Log("apply"); + UniGLTFLogger.Log("apply"); var pose = default(HumanPose); _target.PoseClip.GetPose(out pose); _target.SetPose(pose); diff --git a/Assets/UniGLTF/Editor/UniHumanoid/HumanoidEditor.cs b/Assets/UniGLTF/Editor/UniHumanoid/HumanoidEditor.cs index f6c95afc7..42c836440 100644 --- a/Assets/UniGLTF/Editor/UniHumanoid/HumanoidEditor.cs +++ b/Assets/UniGLTF/Editor/UniHumanoid/HumanoidEditor.cs @@ -5,6 +5,7 @@ using System.IO; using UnityEditor; using UnityEngine; using System; +using UniGLTF; namespace UniHumanoid { @@ -410,7 +411,7 @@ namespace UniHumanoid } else { - Debug.LogWarning($"cannot create {path}"); + UniGLTFLogger.Warning($"cannot create {path}"); } } } diff --git a/Assets/UniGLTF/Editor/UniHumanoid/bvhAssetPostprocessor.cs b/Assets/UniGLTF/Editor/UniHumanoid/bvhAssetPostprocessor.cs index 0ca4ca2d8..bfe2efec4 100644 --- a/Assets/UniGLTF/Editor/UniHumanoid/bvhAssetPostprocessor.cs +++ b/Assets/UniGLTF/Editor/UniHumanoid/bvhAssetPostprocessor.cs @@ -40,7 +40,7 @@ namespace UniHumanoid } catch (Exception ex) { - Debug.LogError(ex); + UniGLTFLogger.Exception(ex); context.Destroy(true); } } diff --git a/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.asmdef b/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.asmdef index b200fed37..a7c28e065 100644 --- a/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.asmdef +++ b/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.asmdef @@ -2,8 +2,8 @@ "name": "GltfViewer", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:8d76e605759c3f64a957d63ef96ada7c" + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.cs b/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.cs index dc8596b53..bcfcdec0c 100644 --- a/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.cs +++ b/Assets/UniGLTF/Samples~/GltfViewer/GltfViewer.cs @@ -26,7 +26,7 @@ namespace UniGLTF.GltfViewer { return; } - Debug.Log($"open: {path}"); + UniGLTFLogger.Log($"open: {path}"); LoadPathAsync(path); } @@ -46,15 +46,15 @@ namespace UniGLTF.GltfViewer _instance = await GltfUtility.LoadAsync(path.FullPath); if (_instance == null) { - Debug.LogWarning("LoadAsync: null"); + UniGLTFLogger.Warning("LoadAsync: null"); return; } - Debug.Log($"LoadAsync: {sw.Elapsed}"); + UniGLTFLogger.Log($"LoadAsync: {sw.Elapsed}"); _instance.ShowMeshes(); } catch (Exception ex) { - Debug.LogException(ex); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/UniGLTF/Samples~/GltfViewer/OpenFileDialog/OpenFileDialog.cs b/Assets/UniGLTF/Samples~/GltfViewer/OpenFileDialog/OpenFileDialog.cs index 47695f73c..8dbe022bf 100644 --- a/Assets/UniGLTF/Samples~/GltfViewer/OpenFileDialog/OpenFileDialog.cs +++ b/Assets/UniGLTF/Samples~/GltfViewer/OpenFileDialog/OpenFileDialog.cs @@ -1,13 +1,16 @@ +using UnityEngine; + namespace UniGLTF.GltfViewer { public static class OpenFileDialog { public static PathObject Show(string title, params string[] extensions) { + Debug.Log(typeof(UniGLTFLogger)); #if UNITY_STANDALONE_WIN return PathObject.FromFullPath(FileDialogForWindows.FileDialog(title, extensions)); #else - UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented."); + UniGLTFLogger.Warning("Non-Windows runtime file dialogs are not yet implemented."); return default; #endif } diff --git a/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.asmdef b/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.asmdef index b200fed37..a7c28e065 100644 --- a/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.asmdef +++ b/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.asmdef @@ -2,8 +2,8 @@ "name": "GltfViewer", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:8d76e605759c3f64a957d63ef96ada7c" + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.cs b/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.cs index dc8596b53..bcfcdec0c 100644 --- a/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.cs +++ b/Assets/UniGLTF_Samples/GltfViewer/GltfViewer.cs @@ -26,7 +26,7 @@ namespace UniGLTF.GltfViewer { return; } - Debug.Log($"open: {path}"); + UniGLTFLogger.Log($"open: {path}"); LoadPathAsync(path); } @@ -46,15 +46,15 @@ namespace UniGLTF.GltfViewer _instance = await GltfUtility.LoadAsync(path.FullPath); if (_instance == null) { - Debug.LogWarning("LoadAsync: null"); + UniGLTFLogger.Warning("LoadAsync: null"); return; } - Debug.Log($"LoadAsync: {sw.Elapsed}"); + UniGLTFLogger.Log($"LoadAsync: {sw.Elapsed}"); _instance.ShowMeshes(); } catch (Exception ex) { - Debug.LogException(ex); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/UniGLTF_Samples/GltfViewer/OpenFileDialog/OpenFileDialog.cs b/Assets/UniGLTF_Samples/GltfViewer/OpenFileDialog/OpenFileDialog.cs index 47695f73c..8dbe022bf 100644 --- a/Assets/UniGLTF_Samples/GltfViewer/OpenFileDialog/OpenFileDialog.cs +++ b/Assets/UniGLTF_Samples/GltfViewer/OpenFileDialog/OpenFileDialog.cs @@ -1,13 +1,16 @@ +using UnityEngine; + namespace UniGLTF.GltfViewer { public static class OpenFileDialog { public static PathObject Show(string title, params string[] extensions) { + Debug.Log(typeof(UniGLTFLogger)); #if UNITY_STANDALONE_WIN return PathObject.FromFullPath(FileDialogForWindows.FileDialog(title, extensions)); #else - UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented."); + UniGLTFLogger.Warning("Non-Windows runtime file dialogs are not yet implemented."); return default; #endif } diff --git a/Assets/VRM/Editor/AOT/VRMDeserializerGenerator.cs b/Assets/VRM/Editor/AOT/VRMDeserializerGenerator.cs index ca306488b..7a71fe8ee 100644 --- a/Assets/VRM/Editor/AOT/VRMDeserializerGenerator.cs +++ b/Assets/VRM/Editor/AOT/VRMDeserializerGenerator.cs @@ -1,6 +1,7 @@ using System.IO; using System.Reflection; using System.Text; +using UniGLTF; using UnityEditor; using UnityEngine; @@ -25,7 +26,7 @@ namespace VRM public static void GenerateCode() { var info = new UniGLTF.ObjectSerialization(typeof(glTF_VRM_extensions), "vrm", "_Deserialize"); - Debug.Log(info); + UniGLTFLogger.Log($"{info}"); using (var s = File.Open(OutPath, FileMode.Create)) using (var w = new StreamWriter(s, Encoding.UTF8)) @@ -53,7 +54,7 @@ public static class VrmDeserializer } // VRM "); - Debug.LogFormat("write: {0}", OutPath); + UniGLTFLogger.Log($"write: {OutPath}"); } } } diff --git a/Assets/VRM/Editor/AOT/VRMSerializerGenerator.cs b/Assets/VRM/Editor/AOT/VRMSerializerGenerator.cs index df8e19524..3bc34f57f 100644 --- a/Assets/VRM/Editor/AOT/VRMSerializerGenerator.cs +++ b/Assets/VRM/Editor/AOT/VRMSerializerGenerator.cs @@ -44,7 +44,7 @@ namespace VRM { public static void GenerateCode() { var info = new ObjectSerialization(typeof(glTF_VRM_extensions), "vrm", "Serialize_"); - Debug.Log(info); + UniGLTFLogger.Log($"{info}"); using (var s = File.Open(OutPath, FileMode.Create)) using (var w = new StreamWriter(s, new UTF8Encoding(false))) @@ -54,7 +54,7 @@ namespace VRM { w.Write(End); } - Debug.LogFormat("write: {0}", OutPath); + UniGLTFLogger.Log($"write: {OutPath}"); UnityPath.FromFullpath(OutPath).ImportAsset(); } } diff --git a/Assets/VRM/Editor/BlendShape/PreviewEditor.cs b/Assets/VRM/Editor/BlendShape/PreviewEditor.cs index a84b9ecd2..543dff439 100644 --- a/Assets/VRM/Editor/BlendShape/PreviewEditor.cs +++ b/Assets/VRM/Editor/BlendShape/PreviewEditor.cs @@ -80,7 +80,6 @@ namespace VRM { if (m_scene != null) { - //Debug.Log("Bake"); m_scene.Bake(GetBakeValue()); } } diff --git a/Assets/VRM/Editor/Format/VRMEditorExporter.cs b/Assets/VRM/Editor/Format/VRMEditorExporter.cs index 856f88b7e..47bbba57e 100644 --- a/Assets/VRM/Editor/Format/VRMEditorExporter.cs +++ b/Assets/VRM/Editor/Format/VRMEditorExporter.cs @@ -33,7 +33,7 @@ namespace VRM foreach (var x in destroy) { // エラーを引き起こす場合がある - // Debug.LogFormat("destroy: {0}", x.name); + // UniGLTFLogger.LogFormat("destroy: {0}", x.name); GameObject.DestroyImmediate(x); } } @@ -133,7 +133,7 @@ namespace VRM var newName = sb.ToString(); if (!nameCount.ContainsKey(newName)) { - Debug.LogWarningFormat("force rename {0} => {1}", transform.name, newName); + UniGLTFLogger.Warning($"force rename {transform.name} => {newName}"); transform.name = newName; nameCount.Add(newName, 1); return; @@ -245,7 +245,7 @@ namespace VRM exporter.Export(); } var bytes = data.ToGlbBytes(); - Debug.LogFormat("Export elapsed {0}", sw.Elapsed); + UniGLTFLogger.Log($"Export elapsed {sw.Elapsed}"); return bytes; } } diff --git a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs index 9cdac0ce0..7bfc9826d 100644 --- a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs +++ b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs @@ -119,7 +119,7 @@ namespace VRM if (Symbols.VRM_DEVELOP) { // 来ない? - Debug.LogWarning($"{o} already exists. skip write"); + UniGLTFLogger.Warning($"{o} already exists. skip write"); } return; } diff --git a/Assets/VRM/Editor/Format/VRMExporterWizard.cs b/Assets/VRM/Editor/Format/VRMExporterWizard.cs index cb2a44768..5c5248b67 100644 --- a/Assets/VRM/Editor/Format/VRMExporterWizard.cs +++ b/Assets/VRM/Editor/Format/VRMExporterWizard.cs @@ -222,7 +222,7 @@ namespace VRM } else { - Debug.LogWarning("not found"); + UniGLTFLogger.Warning("not found"); } } } diff --git a/Assets/VRM/Editor/Format/VRMImporterMenu.cs b/Assets/VRM/Editor/Format/VRMImporterMenu.cs index c99d1ff91..a4e5f541b 100644 --- a/Assets/VRM/Editor/Format/VRMImporterMenu.cs +++ b/Assets/VRM/Editor/Format/VRMImporterMenu.cs @@ -26,7 +26,7 @@ namespace VRM // import vrm to asset if (path.StartsWithUnityAssetPath()) { - Debug.LogWarningFormat("disallow import from folder under the Assets"); + UniGLTFLogger.Warning("disallow import from folder under the Assets"); return; } diff --git a/Assets/VRM/Editor/Format/VRMSampleCopy.cs b/Assets/VRM/Editor/Format/VRMSampleCopy.cs index 9724cbce1..b08ad4796 100644 --- a/Assets/VRM/Editor/Format/VRMSampleCopy.cs +++ b/Assets/VRM/Editor/Format/VRMSampleCopy.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using UniGLTF; using UnityEngine; namespace VRM @@ -57,14 +58,13 @@ namespace VRM Directory.Delete(dstDir, recursive: true); } _Copy(srcDir, dstDir); - Debug.Log($"copy {srcDir} \n => {dstDir}"); + UniGLTFLogger.Log($"copy {srcDir} \n => {dstDir}"); } static void _Copy(string src, string dst) { if (Directory.Exists(src)) { - // Debug.Log($"CreateDirectory({dst})"); Directory.CreateDirectory(dst); foreach (var child in Directory.EnumerateFileSystemEntries(src)) { @@ -73,7 +73,6 @@ namespace VRM } else if (File.Exists(src)) { - // Debug.Log($"Copy {src} => {dst}"); File.Copy(src, dst); } else @@ -93,7 +92,7 @@ namespace VRM { if (!Directory.Exists(dst)) { - Debug.LogError($"{dst} not exists"); + UniGLTFLogger.Error($"{dst} not exists"); return false; } @@ -110,7 +109,7 @@ namespace VRM if (list.Count > 0) { var remain = string.Join(",", list); - Debug.LogError($"only dst: {remain}"); + UniGLTFLogger.Error($"only dst: {remain}"); return false; } return true; @@ -120,12 +119,12 @@ namespace VRM // same file if (!File.Exists(dst)) { - Debug.LogError($"{dst} not exists"); + UniGLTFLogger.Error($"{dst} not exists"); return false; } if (!File.ReadAllBytes(src).SequenceEqual(File.ReadAllBytes(dst))) { - Debug.LogError($"{src} != {dst}"); + UniGLTFLogger.Error($"{src} != {dst}"); return false; } return true; @@ -133,7 +132,7 @@ namespace VRM else { // throw new FileNotFoundException(src); - Debug.LogError($"dir nor file"); + UniGLTFLogger.Error($"dir nor file"); return false; } } diff --git a/Assets/VRM/Editor/Format/VRMVersionMenu.cs b/Assets/VRM/Editor/Format/VRMVersionMenu.cs index 92f9f2b9d..6875a519f 100644 --- a/Assets/VRM/Editor/Format/VRMVersionMenu.cs +++ b/Assets/VRM/Editor/Format/VRMVersionMenu.cs @@ -250,11 +250,11 @@ namespace UniGLTF UpdateVrmVersion(vrmVersion); UpdateUniGLTFVersion(m_uniGltfVersion, vrmVersion); AssetDatabase.Refresh(); - Debug.Log($"{m_uniGltfVersion}, {vrmVersion}"); + UniGLTFLogger.Log($"{m_uniGltfVersion}, {vrmVersion}"); } else { - Debug.LogWarning($"InvalidFormat: {m_vrmVersion}"); + UniGLTFLogger.Warning($"InvalidFormat: {m_vrmVersion}"); } // COPY diff --git a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs index 688e7ffc5..1ebaaee95 100644 --- a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs +++ b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs @@ -23,7 +23,7 @@ namespace VRM if (unityPath.IsStreamingAsset) { - Debug.LogFormat("Skip StreamingAssets: {0}", path); + UniGLTFLogger.Log($"Skip StreamingAssets: {path}"); continue; } @@ -59,7 +59,7 @@ namespace VRM { if (!prefabPath.IsUnderWritableFolder) { - Debug.LogWarningFormat("out of Asset or writable Packages folder: {0}", prefabPath); + UniGLTFLogger.Warning($"out of Asset or writable Packages folder: {prefabPath}"); return; } diff --git a/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs b/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs index 19c4d1ac0..e11ff6156 100644 --- a/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs +++ b/Assets/VRM/Editor/Meta/VRMMetaObjectEditor.cs @@ -327,7 +327,6 @@ namespace VRM { var r = GUILayoutUtility.GetRect(GUIContent.none, GUIStyle.none, GUILayout.Height(EditorGUIUtility.singleLineHeight)); var (left, right) = FixedRight(r, 64); - // Debug.Log($"{left}, {right}"); EditorGUI.LabelField(left, label); EditorGUI.PropertyField(right, prop, new GUIContent(""), false); } diff --git a/Assets/VRM/Editor/SkinnedMeshUtility/VrmBlendShapeUpdater.cs b/Assets/VRM/Editor/SkinnedMeshUtility/VrmBlendShapeUpdater.cs index aa9e58257..af0568d39 100644 --- a/Assets/VRM/Editor/SkinnedMeshUtility/VrmBlendShapeUpdater.cs +++ b/Assets/VRM/Editor/SkinnedMeshUtility/VrmBlendShapeUpdater.cs @@ -71,12 +71,12 @@ namespace VRM }; if (used.Contains(binding)) { - Debug.LogWarning($"duplicated: {binding}"); + UniGLTFLogger.Warning($"duplicated: {binding}"); } else { #if VRM_DEVELOP - Debug.Log($"{val} >> {binding}"); + UniGLTFLogger.Log($"{val} >> {binding}"); #endif used.Add(binding); yield return binding; @@ -86,7 +86,7 @@ namespace VRM else { // skip - Debug.LogWarning($"SkinnedMeshRenderer not found: {val.RelativePath}"); + UniGLTFLogger.Warning($"SkinnedMeshRenderer not found: {val.RelativePath}"); } } } diff --git a/Assets/VRM/Editor/SpringBone/VRMSpringBoneUtilityEditor.cs b/Assets/VRM/Editor/SpringBone/VRMSpringBoneUtilityEditor.cs index 9380f20e3..efbbb6c73 100644 --- a/Assets/VRM/Editor/SpringBone/VRMSpringBoneUtilityEditor.cs +++ b/Assets/VRM/Editor/SpringBone/VRMSpringBoneUtilityEditor.cs @@ -95,7 +95,7 @@ namespace VRM { if (index < 0 || index >= nodes.Count) { - Debug.LogWarning($"nodes[{index}] is not found !"); + UniGLTFLogger.Warning($"nodes[{index}] is not found !"); node = default; return false; } diff --git a/Assets/VRM/Editor/VRMExportUnityPackage.cs b/Assets/VRM/Editor/VRMExportUnityPackage.cs index 1ad482342..132a7c785 100644 --- a/Assets/VRM/Editor/VRMExportUnityPackage.cs +++ b/Assets/VRM/Editor/VRMExportUnityPackage.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Collections.Generic; using System.IO; using UnityEditor; +using UniGLTF; + #if UNITY_2018_1_OR_NEWER using UnityEditor.Build.Reporting; #endif @@ -145,20 +147,20 @@ namespace VRM.DevOnly.PackageExporter { try { - Debug.Log($"[{nameof(VRMExportUnityPackage)}] Start CreateUnityPackageWithBuild..."); + UniGLTFLogger.Log($"[{nameof(VRMExportUnityPackage)}] Start CreateUnityPackageWithBuild..."); var folder = GetProjectRoot(); if (!Directory.Exists(folder)) { Directory.CreateDirectory(folder); } - Debug.Log($"[{nameof(VRMExportUnityPackage)}] Try to build test scenes..."); + UniGLTFLogger.Log($"[{nameof(VRMExportUnityPackage)}] Try to build test scenes..."); BuildTestScene(); - Debug.Log($"[{nameof(VRMExportUnityPackage)}] Create UnityPackages..."); + UniGLTFLogger.Log($"[{nameof(VRMExportUnityPackage)}] Create UnityPackages..."); CreateUnityPackages(folder); - Debug.Log($"[{nameof(VRMExportUnityPackage)}] Finish CreateUnityPackageWithBuild"); + UniGLTFLogger.Log($"[{nameof(VRMExportUnityPackage)}] Finish CreateUnityPackageWithBuild"); if (Application.isBatchMode) { EditorApplication.Exit(0); @@ -166,7 +168,7 @@ namespace VRM.DevOnly.PackageExporter } catch (Exception e) { - Debug.LogException(e); + UniGLTFLogger.Exception(e); if (Application.isBatchMode) { EditorApplication.Exit(1); @@ -262,8 +264,8 @@ namespace VRM.DevOnly.PackageExporter { var targetFileNames = package.List.SelectMany(x => x.Files).ToArray(); - Debug.LogFormat("Package '{0}' will include {1} files...", package.Name, targetFileNames.Count()); - Debug.LogFormat("{0}", string.Join("", targetFileNames.Select((x, i) => string.Format("[{0:##0}] {1}\n", i, x)).ToArray())); + UniGLTFLogger.Log($"Package '{package.Name}' will include {targetFileNames.Count()} files..."); + UniGLTFLogger.Log($"{string.Join("", targetFileNames.Select((x, i) => string.Format("[{0:##0}] {1}\n", i, x)).ToArray())}"); var path = MakePackagePathName(outputDir, package.Name); AssetDatabase.ExportPackage(targetFileNames, path, ExportPackageOptions.Default); @@ -283,7 +285,7 @@ namespace VRM.DevOnly.PackageExporter private static void Build(string[] levels) { var buildPath = Path.GetFullPath(Application.dataPath + "/../build/build.exe"); - Debug.LogFormat("BuildPath: {0}", buildPath); + UniGLTFLogger.Log($"BuildPath: {buildPath}"); var build = BuildPipeline.BuildPlayer(levels, buildPath, BuildTarget.StandaloneWindows, diff --git a/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef new file mode 100644 index 000000000..fd7f783ee --- /dev/null +++ b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef @@ -0,0 +1,18 @@ +{ + "name": "BlendShapeMenu", + "rootNamespace": "", + "references": [ + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:05dd262a0c0a2f841b8252c8c3815582" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef.meta b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef.meta new file mode 100644 index 000000000..959831536 --- /dev/null +++ b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 65a83bac7c049b341b41b20eac1c926d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.cs b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.cs index 95ae2a461..4f5dabe6a 100644 --- a/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.cs +++ b/Assets/VRM/Samples~/BlendShapeMenu/BlendShapeMenu.cs @@ -1,5 +1,6 @@ using System.IO; using System.Text; +using UniGLTF; using UnityEditor; using UnityEngine; @@ -82,11 +83,10 @@ namespace VRM.Sample.BlendShapeMenu [MenuItem("CONTEXT/BlendShapeAvatar/Add ARKit FaceTracking BlendShapes")] public static void AddARKitFaceTrackingBlendShapes(MenuCommand command) { - // Debug.Log(command.context); var avatar = command.context as BlendShapeAvatar; if (avatar == null) { - Debug.LogError("no context"); + UniGLTFLogger.Error("no context"); return; } @@ -124,17 +124,16 @@ namespace VRM.Sample.BlendShapeMenu avatar.Clips.Add(clip); } - Debug.Log("Create\n" + sb.ToString()); + UniGLTFLogger.Log("Create\n" + sb.ToString()); } [MenuItem("CONTEXT/BlendShapeAvatar/Assign all BlendShapes in a folder")] static void AssginAllBlendShapesInAFolder(MenuCommand command) { - // Debug.Log(command.context); var avatar = command.context as BlendShapeAvatar; if (avatar == null) { - Debug.LogError("no context"); + UniGLTFLogger.Error("no context"); return; } var assetPath = AssetDatabase.GetAssetPath(avatar); @@ -175,7 +174,7 @@ namespace VRM.Sample.BlendShapeMenu avatar.Clips.Add(clip); } - Debug.Log($"Assign\n" + sb.ToString()); + UniGLTFLogger.Log($"Assign\n" + sb.ToString()); } #endif } diff --git a/Assets/VRM/Samples~/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef b/Assets/VRM/Samples~/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef index fd74fd317..5ae8a8c26 100644 --- a/Assets/VRM/Samples~/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef +++ b/Assets/VRM/Samples~/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef @@ -1,9 +1,10 @@ { "name": "VRM.Samples.FirstPersonSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:05dd262a0c0a2f841b8252c8c3815582" ], "includePlatforms": [], diff --git a/Assets/VRM/Samples~/FirstPersonSample/VRMRuntimeLoader.cs b/Assets/VRM/Samples~/FirstPersonSample/VRMRuntimeLoader.cs index 8ca9f94e0..be8a35132 100644 --- a/Assets/VRM/Samples~/FirstPersonSample/VRMRuntimeLoader.cs +++ b/Assets/VRM/Samples~/FirstPersonSample/VRMRuntimeLoader.cs @@ -60,7 +60,7 @@ namespace VRM.FirstPersonSample { if (m_canvas == null) { - Debug.LogWarning("no canvas"); + UniGLTFLogger.Warning("no canvas"); return; } @@ -162,7 +162,7 @@ namespace VRM.FirstPersonSample void LoadBvh(string path) { - Debug.LogFormat("ImportBvh: {0}", path); + UniGLTFLogger.Log($"ImportBvh: {path}"); var context = new UniHumanoid.BvhImporterContext(); context.Parse(path); diff --git a/Assets/VRM/Samples~/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef b/Assets/VRM/Samples~/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef index d4c423ecd..c7bdeb5b8 100644 --- a/Assets/VRM/Samples~/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef +++ b/Assets/VRM/Samples~/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef @@ -1,8 +1,9 @@ { "name": "VRM.Samples.RuntimeExporterSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", "GUID:05dd262a0c0a2f841b8252c8c3815582" ], "includePlatforms": [], diff --git a/Assets/VRM/Samples~/RuntimeExporterSample/VRMRuntimeExporter.cs b/Assets/VRM/Samples~/RuntimeExporterSample/VRMRuntimeExporter.cs index ad237600c..2a5f7f4b8 100644 --- a/Assets/VRM/Samples~/RuntimeExporterSample/VRMRuntimeExporter.cs +++ b/Assets/VRM/Samples~/RuntimeExporterSample/VRMRuntimeExporter.cs @@ -82,7 +82,7 @@ namespace VRM.RuntimeExporterSample // add blendshape clip to avatar.Clips var clip = ScriptableObject.CreateInstance(); var name = $"custom#{avatar.Clips.Count}"; - Debug.Log($"Add {name}"); + UniGLTFLogger.Log($"Add {name}"); // unity asset name clip.name = name; // vrm export name @@ -131,7 +131,7 @@ namespace VRM.RuntimeExporterSample var bytes = useNormalize ? ExportCustom(model, false, bakeBlendShape) : ExportSimple(model); File.WriteAllBytes(path, bytes); - Debug.LogFormat("export to {0}", path); + UniGLTFLogger.Log($"export to {path}"); } static byte[] ExportSimple(GameObject model) @@ -151,7 +151,7 @@ namespace VRM.RuntimeExporterSample void OnExported(UniGLTF.glTF vrm) { - Debug.LogFormat("exported"); + UniGLTFLogger.Log("exported"); } } } diff --git a/Assets/VRM/Samples~/SimpleViewer/AIUEO.cs b/Assets/VRM/Samples~/SimpleViewer/AIUEO.cs index 2edcd72b1..69e7142c8 100644 --- a/Assets/VRM/Samples~/SimpleViewer/AIUEO.cs +++ b/Assets/VRM/Samples~/SimpleViewer/AIUEO.cs @@ -1,4 +1,5 @@ using System.Collections; +using UniGLTF; using UnityEngine; @@ -67,7 +68,7 @@ namespace VRM.SimpleViewer private void OnDisable() { - Debug.Log("StopCoroutine"); + UniGLTFLogger.Log("StopCoroutine"); StopCoroutine(m_coroutine); } } diff --git a/Assets/VRM/Samples~/SimpleViewer/FileDialog/FileUtil.cs b/Assets/VRM/Samples~/SimpleViewer/FileDialog/FileUtil.cs index 1baf5fe7f..4d98bd9c5 100644 --- a/Assets/VRM/Samples~/SimpleViewer/FileDialog/FileUtil.cs +++ b/Assets/VRM/Samples~/SimpleViewer/FileDialog/FileUtil.cs @@ -19,7 +19,7 @@ namespace VRM.SimpleViewer return ""; #else // fall back constant path - UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented."); + UnityEngine.UniGLTFLogger.Warning("Non-Windows runtime file dialogs are not yet implemented."); return UnityEngine.Application.dataPath + "/default.vrm"; #endif } diff --git a/Assets/VRM/Samples~/SimpleViewer/VRM.Samples.SimpleViewer.asmdef b/Assets/VRM/Samples~/SimpleViewer/VRM.Samples.SimpleViewer.asmdef index ccfa5649c..b356b2415 100644 --- a/Assets/VRM/Samples~/SimpleViewer/VRM.Samples.SimpleViewer.asmdef +++ b/Assets/VRM/Samples~/SimpleViewer/VRM.Samples.SimpleViewer.asmdef @@ -2,9 +2,9 @@ "name": "VRM.Samples.SimpleViewer", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:05dd262a0c0a2f841b8252c8c3815582", "GUID:3e5d614bc16b50d41bd94c8d7444ca46" ], diff --git a/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs b/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs index 575f44556..e3e03d610 100644 --- a/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs +++ b/Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs @@ -179,7 +179,7 @@ namespace VRM.SimpleViewer } else { - Debug.Log("motion: no toggle"); + UniGLTFLogger.Log("motion: no toggle"); } } } @@ -368,7 +368,7 @@ namespace VRM.SimpleViewer /// public void FileSelected(string url) { - Debug.Log($"FileSelected: {url}"); + UniGLTFLogger.Log($"FileSelected: {url}"); StartCoroutine(LoadCoroutine(url)); } @@ -386,7 +386,7 @@ namespace VRM.SimpleViewer { if (!File.Exists(path)) { - Debug.LogWarning($"{path} not exists"); + UniGLTFLogger.Warning($"{path} not exists"); return; } var bytes = File.ReadAllBytes(path); @@ -396,7 +396,7 @@ namespace VRM.SimpleViewer public async Task LoadBytesAsync(string path, byte[] bytes) { var size = bytes != null ? bytes.Length : 0; - Debug.Log($"LoadModelAsync: {path}: {size}bytes"); + UniGLTFLogger.Log($"LoadModelAsync: {path}: {size}bytes"); var ext = Path.GetExtension(path).ToLower(); if (ext == ".bvh") diff --git a/Assets/VRM10/Editor/Components/ScrollView.cs b/Assets/VRM10/Editor/Components/ScrollView.cs index 0a35ab38d..6de720b64 100644 --- a/Assets/VRM10/Editor/Components/ScrollView.cs +++ b/Assets/VRM10/Editor/Components/ScrollView.cs @@ -30,7 +30,6 @@ namespace UniVRM10 if (isScroll) { var maxScroll = bottom.y - (height - EditorGUIUtility.singleLineHeight * 2); - // Debug.Log($"{bottom.y}: {this.position.size.y}: {maxScroll}"); if (m_scrollPosition.y > maxScroll) { m_scrollPosition = new Vector2(0, maxScroll); diff --git a/Assets/VRM10/Editor/Components/SpringBone/CustomInspector.cs b/Assets/VRM10/Editor/Components/SpringBone/CustomInspector.cs index fb8d83a76..36941c5d8 100644 --- a/Assets/VRM10/Editor/Components/SpringBone/CustomInspector.cs +++ b/Assets/VRM10/Editor/Components/SpringBone/CustomInspector.cs @@ -30,10 +30,6 @@ namespace UniVRM10 continue; } -#if DEBUG - // Debug.Log($"{iterator.propertyPath}({iterator.propertyType})"); -#endif - if (m_callback is null || !m_callback(iterator)) { EditorGUI.indentLevel = iterator.depth + m_depth; diff --git a/Assets/VRM10/Editor/Components/VRM10MetaEditor.cs b/Assets/VRM10/Editor/Components/VRM10MetaEditor.cs index 67d442e0e..0582a2dfd 100644 --- a/Assets/VRM10/Editor/Components/VRM10MetaEditor.cs +++ b/Assets/VRM10/Editor/Components/VRM10MetaEditor.cs @@ -124,7 +124,6 @@ namespace UniVRM10 { var r = GUILayoutUtility.GetRect(GUIContent.none, GUIStyle.none, GUILayout.Height(EditorGUIUtility.singleLineHeight)); var (left, right) = FixedRight(r, 64); - // Debug.Log($"{left}, {right}"); EditorGUI.LabelField(left, label); EditorGUI.PropertyField(right, prop, new GUIContent(""), false); } diff --git a/Assets/VRM10/Editor/Components/VRM10MetaPropertyValidator.cs b/Assets/VRM10/Editor/Components/VRM10MetaPropertyValidator.cs index d95ebaa71..5db12ac27 100644 --- a/Assets/VRM10/Editor/Components/VRM10MetaPropertyValidator.cs +++ b/Assets/VRM10/Editor/Components/VRM10MetaPropertyValidator.cs @@ -47,7 +47,6 @@ namespace UniVRM10 if (match != null && iterator.type == "string") { // ArrayItem - // Debug.Log($"{match.Groups[1].Value}"); iterator.stringValue = EditorGUILayout.TextField($" {arrayName}[{match.Groups[1].Value}]", iterator.stringValue); } else diff --git a/Assets/VRM10/Editor/EditorTool/VRM10BoneSelectorEditorTool.cs b/Assets/VRM10/Editor/EditorTool/VRM10BoneSelectorEditorTool.cs index 250e4b981..aa4603745 100644 --- a/Assets/VRM10/Editor/EditorTool/VRM10BoneSelectorEditorTool.cs +++ b/Assets/VRM10/Editor/EditorTool/VRM10BoneSelectorEditorTool.cs @@ -88,7 +88,6 @@ namespace UniVRM10 { EditorGUI.BeginChangeCheck(); Quaternion rot = Handles.RotationHandle(selected.HeadObject.transform.rotation, selected.HeadObject.transform.position); - // Debug.Log($"{selected}"); if (EditorGUI.EndChangeCheck()) { // UNDO diff --git a/Assets/VRM10/Editor/MeshUtility/Vrm10ExpressionUpdater.cs b/Assets/VRM10/Editor/MeshUtility/Vrm10ExpressionUpdater.cs index e435e1fa0..e95928653 100644 --- a/Assets/VRM10/Editor/MeshUtility/Vrm10ExpressionUpdater.cs +++ b/Assets/VRM10/Editor/MeshUtility/Vrm10ExpressionUpdater.cs @@ -68,13 +68,13 @@ namespace UniVRM10 }; if (used.Contains(binding)) { - Debug.LogWarning($"duplicated: {binding}"); + UniGLTFLogger.Warning($"duplicated: {binding}"); } else { if (Symbols.VRM_DEVELOP) { - Debug.Log($"{val} >> {binding}"); + UniGLTFLogger.Log($"{val} >> {binding}"); } used.Add(binding); yield return binding; @@ -84,7 +84,7 @@ namespace UniVRM10 else { // skip - Debug.LogWarning($"SkinnedMeshRenderer not found: {val.RelativePath}"); + UniGLTFLogger.Warning($"SkinnedMeshRenderer not found: {val.RelativePath}"); } } } diff --git a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs index a3c5d71b2..4b58034e5 100644 --- a/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs +++ b/Assets/VRM10/Editor/ScriptedImporter/VrmScriptedImporterImpl.cs @@ -86,7 +86,7 @@ namespace UniVRM10 { if (Symbols.VRM_DEVELOP) { - Debug.Log("OnImportAsset to " + scriptedImporter.assetPath); + UniGLTFLogger.Log("OnImportAsset to " + scriptedImporter.assetPath); } // 1st parse as vrm1 @@ -117,7 +117,7 @@ namespace UniVRM10 // fail to migrate... if (migration != null) { - Debug.LogWarning(migration.Message); + UniGLTFLogger.Warning(migration.Message); } return; } diff --git a/Assets/VRM10/Editor/Vrm10ExportDialog.cs b/Assets/VRM10/Editor/Vrm10ExportDialog.cs index 091662f6f..f1872e585 100644 --- a/Assets/VRM10/Editor/Vrm10ExportDialog.cs +++ b/Assets/VRM10/Editor/Vrm10ExportDialog.cs @@ -45,7 +45,7 @@ namespace UniVRM10 if (value != null && AssetDatabase.IsSubAsset(value)) { // SubAsset is readonly. copy - Debug.Log("copy VRM10ObjectMeta"); + UniGLTFLogger.Log("copy VRM10ObjectMeta"); value.Meta.CopyTo(m_tmpObject.Meta); return; } @@ -197,7 +197,7 @@ namespace UniVRM10 } else { - Debug.LogWarning("not found"); + UniGLTFLogger.Warning("not found"); } } } @@ -288,7 +288,7 @@ namespace UniVRM10 { if (m_settings.FreezeMesh) { - Debug.Log("vrm-1.0 FreezeMesh"); + UniGLTFLogger.Log("vrm-1.0 FreezeMesh"); var copy = GameObject.Instantiate(root); copy.GetComponent().UpdateType = Vrm10Instance.UpdateTypes.None; disposer.Push(copy); @@ -329,7 +329,7 @@ namespace UniVRM10 m_logLabel += $"write to {path}...\n"; File.WriteAllBytes(path, exportedBytes); - Debug.Log("exportedBytes: " + exportedBytes.Length); + UniGLTFLogger.Log("exportedBytes: " + exportedBytes.Length); var assetPath = UniGLTF.UnityPath.FromFullpath(path); if (assetPath.IsUnderWritableFolder) @@ -344,7 +344,7 @@ namespace UniVRM10 m_logLabel += ex.ToString(); // rethrow //throw; - Debug.LogException(ex); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/VRM10/Editor/Vrm10SerializerGenerator.cs b/Assets/VRM10/Editor/Vrm10SerializerGenerator.cs index 034f3b792..0229699b6 100644 --- a/Assets/VRM10/Editor/Vrm10SerializerGenerator.cs +++ b/Assets/VRM10/Editor/Vrm10SerializerGenerator.cs @@ -1,4 +1,5 @@ using System.IO; +using UniGLTF; using UnityEditor; using UnityEngine; @@ -94,14 +95,14 @@ namespace UniVRM10 var extensionSchema = parser.Load(extensionSchemaPath, ""); var formatDst = new DirectoryInfo(Path.Combine(projectRoot.FullName, arg.FormatDir)); - Debug.Log($"Format.g Dir: {formatDst}"); + UniGLTFLogger.Log($"Format.g Dir: {formatDst}"); var serializerDst = new DirectoryInfo(Path.Combine(projectRoot.FullName, arg.SerializerDir)); - Debug.Log($"Serializer/Deserializer.g Dir: {serializerDst}"); + UniGLTFLogger.Log($"Serializer/Deserializer.g Dir: {serializerDst}"); if (debug) { - Debug.Log(extensionSchema.Dump()); + UniGLTFLogger.Log(extensionSchema.Dump()); } else { diff --git a/Assets/VRM10/MToon10/Editor/EditorMenu.cs b/Assets/VRM10/MToon10/Editor/EditorMenu.cs index 388891199..5259b2807 100644 --- a/Assets/VRM10/MToon10/Editor/EditorMenu.cs +++ b/Assets/VRM10/MToon10/Editor/EditorMenu.cs @@ -1,4 +1,5 @@ using System.Linq; +using UniGLTF; using UnityEditor; using UnityEngine; @@ -25,11 +26,11 @@ namespace VRM10.MToon10.Editor if (obj is Material material && migrator.TryMigrate(material, validateShaderName: true)) { - Debug.Log($"Migrated {material.name} to MToon10"); + UniGLTFLogger.Log($"Migrated {material.name} to MToon10"); } else { - Debug.LogWarning($"Failed to migrate {obj.name} to MToon10"); + UniGLTFLogger.Warning($"Failed to migrate {obj.name} to MToon10"); } } } diff --git a/Assets/VRM10/MToon10/Editor/VRM10.MToon10.Editor.asmdef b/Assets/VRM10/MToon10/Editor/VRM10.MToon10.Editor.asmdef index 20754f5c4..3915e0025 100644 --- a/Assets/VRM10/MToon10/Editor/VRM10.MToon10.Editor.asmdef +++ b/Assets/VRM10/MToon10/Editor/VRM10.MToon10.Editor.asmdef @@ -2,6 +2,7 @@ "name": "VRM10.MToon10.Editor", "rootNamespace": "", "references": [ + "GUID:1cd941934d098654fa21a13f28346412", "GUID:0aaf403bd13871a44b7127aef2695ff8" ], "includePlatforms": [ diff --git a/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothGuess.cs b/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothGuess.cs index 13e0deab6..cba2c9987 100644 --- a/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothGuess.cs +++ b/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothGuess.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using UniVRM10.ClothWarp.Components; using UnityEngine; +using UniGLTF; namespace UniVRM10.Cloth.Viewer @@ -116,7 +117,7 @@ namespace UniVRM10.Cloth.Viewer var bone = animator.GetBoneTransform(humanBone); if (bone == null) { - Debug.LogWarning($"{humanBone} not found"); + UniGLTFLogger.Warning($"{humanBone} not found"); group = default; return false; } @@ -148,7 +149,6 @@ namespace UniVRM10.Cloth.Viewer } if (transforms.Count == 0) { - // Debug.LogWarning($"{string.Join(',', targets)} not found"); group = default; return false; } @@ -163,7 +163,7 @@ namespace UniVRM10.Cloth.Viewer var bone = animator.GetBoneTransform(humanBone); if (bone == null) { - Debug.LogWarning($"{humanBone} not found"); + UniGLTFLogger.Warning($"{humanBone} not found"); group = default; return false; } @@ -189,7 +189,6 @@ namespace UniVRM10.Cloth.Viewer } if (transforms.Count == 0) { - // Debug.LogWarning($"{string.Join(',', targets)} not found"); group = default; return false; } diff --git a/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothViewerUI.cs b/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothViewerUI.cs index 57ece660e..a71347aa4 100644 --- a/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothViewerUI.cs +++ b/Assets/VRM10/Samples~/ClothSample/ClothViewer/ClothViewerUI.cs @@ -249,7 +249,7 @@ namespace UniVRM10.Cloth.Viewer var ext = Path.GetExtension(path).ToLower(); if (ext != ".vrm") { - Debug.LogWarning($"{path} is not vrm"); + UniGLTFLogger.Warning($"{path} is not vrm"); return; } @@ -299,11 +299,11 @@ namespace UniVRM10.Cloth.Viewer } catch (UniJSON.ParserException) { - Debug.LogWarning("UniJSON.ParserException"); + UniGLTFLogger.Warning("UniJSON.ParserException"); } catch (UniJSON.DeserializationException) { - Debug.LogWarning("UniJSON.DeserializationException"); + UniGLTFLogger.Warning("UniJSON.DeserializationException"); } } @@ -411,7 +411,7 @@ namespace UniVRM10.Cloth.Viewer } catch (Exception ex) { - Debug.LogException(ex); + UniGLTFLogger.Exception(ex); } } @@ -426,7 +426,7 @@ namespace UniVRM10.Cloth.Viewer try { - Debug.LogFormat("{0}", path); + UniGLTFLogger.Log($"{path}"); var vrm10Instance = await Vrm10.LoadPathAsync(path, canLoadVrm0X: true, showMeshes: false, @@ -446,7 +446,7 @@ namespace UniVRM10.Cloth.Viewer if (vrm10Instance == null) { - Debug.LogWarning("LoadPathAsync is null"); + UniGLTFLogger.Warning("LoadPathAsync is null"); return; } @@ -461,12 +461,12 @@ namespace UniVRM10.Cloth.Viewer { if (ex is OperationCanceledException) { - Debug.LogWarning($"Canceled to Load: {path}"); + UniGLTFLogger.Warning($"Canceled to Load: {path}"); } else { - Debug.LogError($"Failed to Load: {path}"); - Debug.LogException(ex); + UniGLTFLogger.Error($"Failed to Load: {path}"); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs b/Assets/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs index d432342aa..c51a2b7ae 100644 --- a/Assets/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs +++ b/Assets/VRM10/Samples~/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs @@ -48,7 +48,6 @@ namespace UniVRM10.ClothWarp.Components sb.Append("]."); sb.Append(subpath); var s = sb.ToString(); - // Debug.Log(s); prop.BindProperty(serializedObject.FindProperty(s)); prop.SetEnabled(enableFunc(i)); } diff --git a/Assets/VRM10/Samples~/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs b/Assets/VRM10/Samples~/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs index 99f8db10a..bbff82739 100644 --- a/Assets/VRM10/Samples~/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs +++ b/Assets/VRM10/Samples~/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs @@ -27,7 +27,6 @@ namespace SphereTriangle var y = t.position.z - _o.z; var a = (int)(Mathf.Rad2Deg * Mathf.Atan2(x, y)); a = Rot180(a); - // Debug.Log($"{t.name} => {a}"); return a; } diff --git a/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef new file mode 100644 index 000000000..35bf2477d --- /dev/null +++ b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef @@ -0,0 +1,19 @@ +{ + "name": "SimpleVrma", + "rootNamespace": "", + "references": [ + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:e47c917724578cc43b5506c17a27e9a0", + "GUID:f06555f75b070af458a003d92f9efb00" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef.meta b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef.meta new file mode 100644 index 000000000..07f8e238c --- /dev/null +++ b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0466374a47130e740bf6c1c1857dc6f6 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.cs b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.cs index cc8c2f25b..9d40e48b5 100644 --- a/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.cs +++ b/Assets/VRM10/Samples~/SimpleVrma/SimpleVrma.cs @@ -20,14 +20,14 @@ public class SimpleVrma : MonoBehaviour if (GUILayout.Button("open vrm")) { var path = EditorUtility.OpenFilePanel("open vrm", "", "vrm"); - Debug.Log(path); + UniGLTFLogger.Log(path); LoadVrm(path); } if (GUILayout.Button("open vrma")) { var path = EditorUtility.OpenFilePanel("open vrma", "", "vrma"); - Debug.Log(path); + UniGLTFLogger.Log(path); LoadVrma(path); } #endif @@ -59,7 +59,7 @@ public class SimpleVrma : MonoBehaviour Vrma = instance.GetComponent(); Vrm.Runtime.VrmAnimation = Vrma; - Debug.Log(Vrma); + UniGLTFLogger.Log($"{Vrma}"); var animation = Vrma.GetComponent(); animation.Play(); diff --git a/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef b/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef index 032a31c0c..d0c864bb7 100644 --- a/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef +++ b/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef @@ -1,9 +1,10 @@ { "name": "VRM10.Samples.VRM10FirstPersonSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:e47c917724578cc43b5506c17a27e9a0" ], "includePlatforms": [], diff --git a/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10RuntimeLoader.cs b/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10RuntimeLoader.cs index d0b498891..e7024504f 100644 --- a/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10RuntimeLoader.cs +++ b/Assets/VRM10/Samples~/VRM10FirstPersonSample/VRM10RuntimeLoader.cs @@ -47,7 +47,7 @@ namespace UniVRM10.FirstPersonSample { if (m_canvas == null) { - Debug.LogWarning("no canvas"); + UniGLTFLogger.Warning("no canvas"); return; } @@ -117,7 +117,7 @@ namespace UniVRM10.FirstPersonSample void LoadBvh(string path) { - Debug.LogFormat("ImportBvh: {0}", path); + UniGLTFLogger.Log($"ImportBvh: {path}"); var context = new UniHumanoid.BvhImporterContext(); context.Parse(path); diff --git a/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef b/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef index 82076b528..3096882b2 100644 --- a/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef +++ b/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef @@ -2,10 +2,10 @@ "name": "VRM10.Samples.VRM10RuntimeExporter", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", "GUID:60c8346e00a8ddd4cafc5a02eceeec57", "GUID:0aaf403bd13871a44b7127aef2695ff8", - "GUID:8d76e605759c3f64a957d63ef96ada7c", "GUID:e47c917724578cc43b5506c17a27e9a0", "GUID:2ef84b520212e174a94668c7a0862d3b" ], diff --git a/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs b/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs index c1beea3e3..347015611 100644 --- a/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs +++ b/Assets/VRM10/Samples~/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs @@ -81,7 +81,7 @@ namespace UniVRM10.RuntimeExporterSample // // add blendshape clip to avatar.Clips // var clip = ScriptableObject.CreateInstance(); // var name = $"custom#{avatar.Clips.Count}"; - // Debug.Log($"Add {name}"); + // UniGLTFLogger.Log($"Add {name}"); // // unity asset name // clip.name = name; // // vrm export name @@ -130,7 +130,7 @@ namespace UniVRM10.RuntimeExporterSample var bytes = ExportSimple(m_settings, model, m_meta); File.WriteAllBytes(path, bytes); - Debug.LogFormat("export to {0}", path); + UniGLTFLogger.Log($"export to {path}"); } static byte[] ExportSimple(GltfExportSettings settings, GameObject root, VRM10ObjectMeta meta) @@ -141,7 +141,7 @@ namespace UniVRM10.RuntimeExporterSample var model = converter.Export(settings, arrayManager, root); // 右手系に変換 - Debug.Log($"convert to right handed coordinate..."); + UniGLTFLogger.Log($"convert to right handed coordinate..."); model.ConvertCoordinate(VrmLib.Coordinates.Vrm1, ignoreVrm: false); // export vrm-1.0 @@ -156,7 +156,7 @@ namespace UniVRM10.RuntimeExporterSample void OnExported(UniGLTF.glTF vrm) { - Debug.LogFormat("exported"); + UniGLTFLogger.Log("exported"); } } } diff --git a/Assets/VRM10/Samples~/VRM10Viewer/TinyPbrDescriptorGenerator.cs b/Assets/VRM10/Samples~/VRM10Viewer/TinyPbrDescriptorGenerator.cs index 7ebc55bfe..8382e0822 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/TinyPbrDescriptorGenerator.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/TinyPbrDescriptorGenerator.cs @@ -34,7 +34,7 @@ namespace UniVRM10.VRM10Viewer // NOTE: Fallback to default material if (Symbols.VRM_DEVELOP) { - Debug.LogWarning($"material: {i} out of range. fallback"); + UniGLTFLogger.Warning($"material: {i} out of range. fallback"); } return GetGltfDefault(GltfMaterialImportUtils.ImportMaterialName(i, null)); } diff --git a/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerUI.cs b/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerUI.cs index 0c9188d66..f76456da5 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerUI.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerUI.cs @@ -683,7 +683,7 @@ namespace UniVRM10.VRM10Viewer var ext = Path.GetExtension(path).ToLower(); if (ext != ".vrm") { - Debug.LogWarning($"{path} is not vrm"); + UniGLTFLogger.Warning($"{path} is not vrm"); return; } @@ -696,7 +696,7 @@ namespace UniVRM10.VRM10Viewer /// public void FileSelected(string url) { - Debug.Log($"FileSelected: {url}"); + UniGLTFLogger.Log($"FileSelected: {url}"); StartCoroutine(LoadCoroutine(url)); } @@ -750,11 +750,11 @@ namespace UniVRM10.VRM10Viewer } catch (UniJSON.ParserException) { - Debug.LogWarning("UniJSON.ParserException"); + UniGLTFLogger.Warning("UniJSON.ParserException"); } catch (UniJSON.DeserializationException) { - Debug.LogWarning("UniJSON.DeserializationException"); + UniGLTFLogger.Warning("UniJSON.DeserializationException"); } } @@ -837,7 +837,7 @@ namespace UniVRM10.VRM10Viewer try { - Debug.LogFormat("{0}", path); + UniGLTFLogger.Log($"{path}"); var vrm10Instance = await Vrm10.LoadBytesAsync(bytes, canLoadVrm0X: true, showMeshes: false, @@ -854,7 +854,7 @@ namespace UniVRM10.VRM10Viewer if (vrm10Instance == null) { - Debug.LogWarning("LoadPathAsync is null"); + UniGLTFLogger.Warning("LoadPathAsync is null"); return; } @@ -880,12 +880,12 @@ namespace UniVRM10.VRM10Viewer { if (ex is OperationCanceledException) { - Debug.LogWarning($"Canceled to Load: {path}"); + UniGLTFLogger.Warning($"Canceled to Load: {path}"); } else { - Debug.LogError($"Failed to Load: {path}"); - Debug.LogException(ex); + UniGLTFLogger.Error($"Failed to Load: {path}"); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs index 13e0deab6..cba2c9987 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothGuess.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using UniVRM10.ClothWarp.Components; using UnityEngine; +using UniGLTF; namespace UniVRM10.Cloth.Viewer @@ -116,7 +117,7 @@ namespace UniVRM10.Cloth.Viewer var bone = animator.GetBoneTransform(humanBone); if (bone == null) { - Debug.LogWarning($"{humanBone} not found"); + UniGLTFLogger.Warning($"{humanBone} not found"); group = default; return false; } @@ -148,7 +149,6 @@ namespace UniVRM10.Cloth.Viewer } if (transforms.Count == 0) { - // Debug.LogWarning($"{string.Join(',', targets)} not found"); group = default; return false; } @@ -163,7 +163,7 @@ namespace UniVRM10.Cloth.Viewer var bone = animator.GetBoneTransform(humanBone); if (bone == null) { - Debug.LogWarning($"{humanBone} not found"); + UniGLTFLogger.Warning($"{humanBone} not found"); group = default; return false; } @@ -189,7 +189,6 @@ namespace UniVRM10.Cloth.Viewer } if (transforms.Count == 0) { - // Debug.LogWarning($"{string.Join(',', targets)} not found"); group = default; return false; } diff --git a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs index 57ece660e..a71347aa4 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothViewer/ClothViewerUI.cs @@ -249,7 +249,7 @@ namespace UniVRM10.Cloth.Viewer var ext = Path.GetExtension(path).ToLower(); if (ext != ".vrm") { - Debug.LogWarning($"{path} is not vrm"); + UniGLTFLogger.Warning($"{path} is not vrm"); return; } @@ -299,11 +299,11 @@ namespace UniVRM10.Cloth.Viewer } catch (UniJSON.ParserException) { - Debug.LogWarning("UniJSON.ParserException"); + UniGLTFLogger.Warning("UniJSON.ParserException"); } catch (UniJSON.DeserializationException) { - Debug.LogWarning("UniJSON.DeserializationException"); + UniGLTFLogger.Warning("UniJSON.DeserializationException"); } } @@ -411,7 +411,7 @@ namespace UniVRM10.Cloth.Viewer } catch (Exception ex) { - Debug.LogException(ex); + UniGLTFLogger.Exception(ex); } } @@ -426,7 +426,7 @@ namespace UniVRM10.Cloth.Viewer try { - Debug.LogFormat("{0}", path); + UniGLTFLogger.Log($"{path}"); var vrm10Instance = await Vrm10.LoadPathAsync(path, canLoadVrm0X: true, showMeshes: false, @@ -446,7 +446,7 @@ namespace UniVRM10.Cloth.Viewer if (vrm10Instance == null) { - Debug.LogWarning("LoadPathAsync is null"); + UniGLTFLogger.Warning("LoadPathAsync is null"); return; } @@ -461,12 +461,12 @@ namespace UniVRM10.Cloth.Viewer { if (ex is OperationCanceledException) { - Debug.LogWarning($"Canceled to Load: {path}"); + UniGLTFLogger.Warning($"Canceled to Load: {path}"); } else { - Debug.LogError($"Failed to Load: {path}"); - Debug.LogException(ex); + UniGLTFLogger.Error($"Failed to Load: {path}"); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs index d432342aa..c51a2b7ae 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Editor/ClothWarpRootEditor.cs @@ -48,7 +48,6 @@ namespace UniVRM10.ClothWarp.Components sb.Append("]."); sb.Append(subpath); var s = sb.ToString(); - // Debug.Log(s); prop.BindProperty(serializedObject.FindProperty(s)); prop.SetEnabled(enableFunc(i)); } diff --git a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs index 99f8db10a..bbff82739 100644 --- a/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs +++ b/Assets/VRM10_Samples/ClothSample/ClothWarp/Runtime/SphereTriangle/TransformSort.cs @@ -27,7 +27,6 @@ namespace SphereTriangle var y = t.position.z - _o.z; var a = (int)(Mathf.Rad2Deg * Mathf.Atan2(x, y)); a = Rot180(a); - // Debug.Log($"{t.name} => {a}"); return a; } diff --git a/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef new file mode 100644 index 000000000..35bf2477d --- /dev/null +++ b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef @@ -0,0 +1,19 @@ +{ + "name": "SimpleVrma", + "rootNamespace": "", + "references": [ + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:e47c917724578cc43b5506c17a27e9a0", + "GUID:f06555f75b070af458a003d92f9efb00" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef.meta b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef.meta new file mode 100644 index 000000000..07f8e238c --- /dev/null +++ b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0466374a47130e740bf6c1c1857dc6f6 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.cs b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.cs index cc8c2f25b..9d40e48b5 100644 --- a/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.cs +++ b/Assets/VRM10_Samples/SimpleVrma/SimpleVrma.cs @@ -20,14 +20,14 @@ public class SimpleVrma : MonoBehaviour if (GUILayout.Button("open vrm")) { var path = EditorUtility.OpenFilePanel("open vrm", "", "vrm"); - Debug.Log(path); + UniGLTFLogger.Log(path); LoadVrm(path); } if (GUILayout.Button("open vrma")) { var path = EditorUtility.OpenFilePanel("open vrma", "", "vrma"); - Debug.Log(path); + UniGLTFLogger.Log(path); LoadVrma(path); } #endif @@ -59,7 +59,7 @@ public class SimpleVrma : MonoBehaviour Vrma = instance.GetComponent(); Vrm.Runtime.VrmAnimation = Vrma; - Debug.Log(Vrma); + UniGLTFLogger.Log($"{Vrma}"); var animation = Vrma.GetComponent(); animation.Play(); diff --git a/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef b/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef index 032a31c0c..d0c864bb7 100644 --- a/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef +++ b/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10.Samples.VRM10FirstPersonSample.asmdef @@ -1,9 +1,10 @@ { "name": "VRM10.Samples.VRM10FirstPersonSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:e47c917724578cc43b5506c17a27e9a0" ], "includePlatforms": [], diff --git a/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10RuntimeLoader.cs b/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10RuntimeLoader.cs index d0b498891..e7024504f 100644 --- a/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10RuntimeLoader.cs +++ b/Assets/VRM10_Samples/VRM10FirstPersonSample/VRM10RuntimeLoader.cs @@ -47,7 +47,7 @@ namespace UniVRM10.FirstPersonSample { if (m_canvas == null) { - Debug.LogWarning("no canvas"); + UniGLTFLogger.Warning("no canvas"); return; } @@ -117,7 +117,7 @@ namespace UniVRM10.FirstPersonSample void LoadBvh(string path) { - Debug.LogFormat("ImportBvh: {0}", path); + UniGLTFLogger.Log($"ImportBvh: {path}"); var context = new UniHumanoid.BvhImporterContext(); context.Parse(path); diff --git a/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef b/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef index 82076b528..3096882b2 100644 --- a/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef +++ b/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10.Samples.VRM10RuntimeExporter.asmdef @@ -2,10 +2,10 @@ "name": "VRM10.Samples.VRM10RuntimeExporter", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", "GUID:60c8346e00a8ddd4cafc5a02eceeec57", "GUID:0aaf403bd13871a44b7127aef2695ff8", - "GUID:8d76e605759c3f64a957d63ef96ada7c", "GUID:e47c917724578cc43b5506c17a27e9a0", "GUID:2ef84b520212e174a94668c7a0862d3b" ], diff --git a/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs b/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs index c1beea3e3..347015611 100644 --- a/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs +++ b/Assets/VRM10_Samples/VRM10RuntimeExporterSample/VRM10RuntimeExporter.cs @@ -81,7 +81,7 @@ namespace UniVRM10.RuntimeExporterSample // // add blendshape clip to avatar.Clips // var clip = ScriptableObject.CreateInstance(); // var name = $"custom#{avatar.Clips.Count}"; - // Debug.Log($"Add {name}"); + // UniGLTFLogger.Log($"Add {name}"); // // unity asset name // clip.name = name; // // vrm export name @@ -130,7 +130,7 @@ namespace UniVRM10.RuntimeExporterSample var bytes = ExportSimple(m_settings, model, m_meta); File.WriteAllBytes(path, bytes); - Debug.LogFormat("export to {0}", path); + UniGLTFLogger.Log($"export to {path}"); } static byte[] ExportSimple(GltfExportSettings settings, GameObject root, VRM10ObjectMeta meta) @@ -141,7 +141,7 @@ namespace UniVRM10.RuntimeExporterSample var model = converter.Export(settings, arrayManager, root); // 右手系に変換 - Debug.Log($"convert to right handed coordinate..."); + UniGLTFLogger.Log($"convert to right handed coordinate..."); model.ConvertCoordinate(VrmLib.Coordinates.Vrm1, ignoreVrm: false); // export vrm-1.0 @@ -156,7 +156,7 @@ namespace UniVRM10.RuntimeExporterSample void OnExported(UniGLTF.glTF vrm) { - Debug.LogFormat("exported"); + UniGLTFLogger.Log("exported"); } } } diff --git a/Assets/VRM10_Samples/VRM10Viewer/TinyPbrDescriptorGenerator.cs b/Assets/VRM10_Samples/VRM10Viewer/TinyPbrDescriptorGenerator.cs index 7ebc55bfe..8382e0822 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/TinyPbrDescriptorGenerator.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/TinyPbrDescriptorGenerator.cs @@ -34,7 +34,7 @@ namespace UniVRM10.VRM10Viewer // NOTE: Fallback to default material if (Symbols.VRM_DEVELOP) { - Debug.LogWarning($"material: {i} out of range. fallback"); + UniGLTFLogger.Warning($"material: {i} out of range. fallback"); } return GetGltfDefault(GltfMaterialImportUtils.ImportMaterialName(i, null)); } diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs index 0c9188d66..f76456da5 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs @@ -683,7 +683,7 @@ namespace UniVRM10.VRM10Viewer var ext = Path.GetExtension(path).ToLower(); if (ext != ".vrm") { - Debug.LogWarning($"{path} is not vrm"); + UniGLTFLogger.Warning($"{path} is not vrm"); return; } @@ -696,7 +696,7 @@ namespace UniVRM10.VRM10Viewer /// public void FileSelected(string url) { - Debug.Log($"FileSelected: {url}"); + UniGLTFLogger.Log($"FileSelected: {url}"); StartCoroutine(LoadCoroutine(url)); } @@ -750,11 +750,11 @@ namespace UniVRM10.VRM10Viewer } catch (UniJSON.ParserException) { - Debug.LogWarning("UniJSON.ParserException"); + UniGLTFLogger.Warning("UniJSON.ParserException"); } catch (UniJSON.DeserializationException) { - Debug.LogWarning("UniJSON.DeserializationException"); + UniGLTFLogger.Warning("UniJSON.DeserializationException"); } } @@ -837,7 +837,7 @@ namespace UniVRM10.VRM10Viewer try { - Debug.LogFormat("{0}", path); + UniGLTFLogger.Log($"{path}"); var vrm10Instance = await Vrm10.LoadBytesAsync(bytes, canLoadVrm0X: true, showMeshes: false, @@ -854,7 +854,7 @@ namespace UniVRM10.VRM10Viewer if (vrm10Instance == null) { - Debug.LogWarning("LoadPathAsync is null"); + UniGLTFLogger.Warning("LoadPathAsync is null"); return; } @@ -880,12 +880,12 @@ namespace UniVRM10.VRM10Viewer { if (ex is OperationCanceledException) { - Debug.LogWarning($"Canceled to Load: {path}"); + UniGLTFLogger.Warning($"Canceled to Load: {path}"); } else { - Debug.LogError($"Failed to Load: {path}"); - Debug.LogException(ex); + UniGLTFLogger.Error($"Failed to Load: {path}"); + UniGLTFLogger.Exception(ex); } } } diff --git a/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef new file mode 100644 index 000000000..fd7f783ee --- /dev/null +++ b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef @@ -0,0 +1,18 @@ +{ + "name": "BlendShapeMenu", + "rootNamespace": "", + "references": [ + "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:05dd262a0c0a2f841b8252c8c3815582" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef.meta b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef.meta new file mode 100644 index 000000000..959831536 --- /dev/null +++ b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 65a83bac7c049b341b41b20eac1c926d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.cs b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.cs index 95ae2a461..4f5dabe6a 100644 --- a/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.cs +++ b/Assets/VRM_Samples/BlendShapeMenu/BlendShapeMenu.cs @@ -1,5 +1,6 @@ using System.IO; using System.Text; +using UniGLTF; using UnityEditor; using UnityEngine; @@ -82,11 +83,10 @@ namespace VRM.Sample.BlendShapeMenu [MenuItem("CONTEXT/BlendShapeAvatar/Add ARKit FaceTracking BlendShapes")] public static void AddARKitFaceTrackingBlendShapes(MenuCommand command) { - // Debug.Log(command.context); var avatar = command.context as BlendShapeAvatar; if (avatar == null) { - Debug.LogError("no context"); + UniGLTFLogger.Error("no context"); return; } @@ -124,17 +124,16 @@ namespace VRM.Sample.BlendShapeMenu avatar.Clips.Add(clip); } - Debug.Log("Create\n" + sb.ToString()); + UniGLTFLogger.Log("Create\n" + sb.ToString()); } [MenuItem("CONTEXT/BlendShapeAvatar/Assign all BlendShapes in a folder")] static void AssginAllBlendShapesInAFolder(MenuCommand command) { - // Debug.Log(command.context); var avatar = command.context as BlendShapeAvatar; if (avatar == null) { - Debug.LogError("no context"); + UniGLTFLogger.Error("no context"); return; } var assetPath = AssetDatabase.GetAssetPath(avatar); @@ -175,7 +174,7 @@ namespace VRM.Sample.BlendShapeMenu avatar.Clips.Add(clip); } - Debug.Log($"Assign\n" + sb.ToString()); + UniGLTFLogger.Log($"Assign\n" + sb.ToString()); } #endif } diff --git a/Assets/VRM_Samples/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef b/Assets/VRM_Samples/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef index fd74fd317..5ae8a8c26 100644 --- a/Assets/VRM_Samples/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef +++ b/Assets/VRM_Samples/FirstPersonSample/VRM.Samples.FirstPersonSample.asmdef @@ -1,9 +1,10 @@ { "name": "VRM.Samples.FirstPersonSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:05dd262a0c0a2f841b8252c8c3815582" ], "includePlatforms": [], diff --git a/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs b/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs index 8ca9f94e0..be8a35132 100644 --- a/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs +++ b/Assets/VRM_Samples/FirstPersonSample/VRMRuntimeLoader.cs @@ -60,7 +60,7 @@ namespace VRM.FirstPersonSample { if (m_canvas == null) { - Debug.LogWarning("no canvas"); + UniGLTFLogger.Warning("no canvas"); return; } @@ -162,7 +162,7 @@ namespace VRM.FirstPersonSample void LoadBvh(string path) { - Debug.LogFormat("ImportBvh: {0}", path); + UniGLTFLogger.Log($"ImportBvh: {path}"); var context = new UniHumanoid.BvhImporterContext(); context.Parse(path); diff --git a/Assets/VRM_Samples/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef b/Assets/VRM_Samples/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef index d4c423ecd..c7bdeb5b8 100644 --- a/Assets/VRM_Samples/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef +++ b/Assets/VRM_Samples/RuntimeExporterSample/VRM.Samples.RuntimeExporterSample.asmdef @@ -1,8 +1,9 @@ { "name": "VRM.Samples.RuntimeExporterSample", + "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", "GUID:05dd262a0c0a2f841b8252c8c3815582" ], "includePlatforms": [], diff --git a/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs b/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs index ad237600c..2a5f7f4b8 100644 --- a/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs +++ b/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs @@ -82,7 +82,7 @@ namespace VRM.RuntimeExporterSample // add blendshape clip to avatar.Clips var clip = ScriptableObject.CreateInstance(); var name = $"custom#{avatar.Clips.Count}"; - Debug.Log($"Add {name}"); + UniGLTFLogger.Log($"Add {name}"); // unity asset name clip.name = name; // vrm export name @@ -131,7 +131,7 @@ namespace VRM.RuntimeExporterSample var bytes = useNormalize ? ExportCustom(model, false, bakeBlendShape) : ExportSimple(model); File.WriteAllBytes(path, bytes); - Debug.LogFormat("export to {0}", path); + UniGLTFLogger.Log($"export to {path}"); } static byte[] ExportSimple(GameObject model) @@ -151,7 +151,7 @@ namespace VRM.RuntimeExporterSample void OnExported(UniGLTF.glTF vrm) { - Debug.LogFormat("exported"); + UniGLTFLogger.Log("exported"); } } } diff --git a/Assets/VRM_Samples/SimpleViewer/AIUEO.cs b/Assets/VRM_Samples/SimpleViewer/AIUEO.cs index 2edcd72b1..69e7142c8 100644 --- a/Assets/VRM_Samples/SimpleViewer/AIUEO.cs +++ b/Assets/VRM_Samples/SimpleViewer/AIUEO.cs @@ -1,4 +1,5 @@ using System.Collections; +using UniGLTF; using UnityEngine; @@ -67,7 +68,7 @@ namespace VRM.SimpleViewer private void OnDisable() { - Debug.Log("StopCoroutine"); + UniGLTFLogger.Log("StopCoroutine"); StopCoroutine(m_coroutine); } } diff --git a/Assets/VRM_Samples/SimpleViewer/FileDialog/FileUtil.cs b/Assets/VRM_Samples/SimpleViewer/FileDialog/FileUtil.cs index 1baf5fe7f..4d98bd9c5 100644 --- a/Assets/VRM_Samples/SimpleViewer/FileDialog/FileUtil.cs +++ b/Assets/VRM_Samples/SimpleViewer/FileDialog/FileUtil.cs @@ -19,7 +19,7 @@ namespace VRM.SimpleViewer return ""; #else // fall back constant path - UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented."); + UnityEngine.UniGLTFLogger.Warning("Non-Windows runtime file dialogs are not yet implemented."); return UnityEngine.Application.dataPath + "/default.vrm"; #endif } diff --git a/Assets/VRM_Samples/SimpleViewer/VRM.Samples.SimpleViewer.asmdef b/Assets/VRM_Samples/SimpleViewer/VRM.Samples.SimpleViewer.asmdef index ccfa5649c..b356b2415 100644 --- a/Assets/VRM_Samples/SimpleViewer/VRM.Samples.SimpleViewer.asmdef +++ b/Assets/VRM_Samples/SimpleViewer/VRM.Samples.SimpleViewer.asmdef @@ -2,9 +2,9 @@ "name": "VRM.Samples.SimpleViewer", "rootNamespace": "", "references": [ - "GUID:da3e51d19d51a544fa14d43fee843098", - "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:8d76e605759c3f64a957d63ef96ada7c", + "GUID:1cd941934d098654fa21a13f28346412", + "GUID:b7aa47b240b57de44a4b2021c143c9bf", "GUID:05dd262a0c0a2f841b8252c8c3815582", "GUID:3e5d614bc16b50d41bd94c8d7444ca46" ], diff --git a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs index 575f44556..e3e03d610 100644 --- a/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs +++ b/Assets/VRM_Samples/SimpleViewer/ViewerUI.cs @@ -179,7 +179,7 @@ namespace VRM.SimpleViewer } else { - Debug.Log("motion: no toggle"); + UniGLTFLogger.Log("motion: no toggle"); } } } @@ -368,7 +368,7 @@ namespace VRM.SimpleViewer /// public void FileSelected(string url) { - Debug.Log($"FileSelected: {url}"); + UniGLTFLogger.Log($"FileSelected: {url}"); StartCoroutine(LoadCoroutine(url)); } @@ -386,7 +386,7 @@ namespace VRM.SimpleViewer { if (!File.Exists(path)) { - Debug.LogWarning($"{path} not exists"); + UniGLTFLogger.Warning($"{path} not exists"); return; } var bytes = File.ReadAllBytes(path); @@ -396,7 +396,7 @@ namespace VRM.SimpleViewer public async Task LoadBytesAsync(string path, byte[] bytes) { var size = bytes != null ? bytes.Length : 0; - Debug.Log($"LoadModelAsync: {path}: {size}bytes"); + UniGLTFLogger.Log($"LoadModelAsync: {path}: {size}bytes"); var ext = Path.GetExtension(path).ToLower(); if (ext == ".bvh")