diff --git a/Assets/UniGLTF/Runtime/UniHumanoid/HumanPoseClip.cs b/Assets/UniGLTF/Runtime/UniHumanoid/HumanPoseClip.cs index bed317955..4d9e63659 100644 --- a/Assets/UniGLTF/Runtime/UniHumanoid/HumanPoseClip.cs +++ b/Assets/UniGLTF/Runtime/UniHumanoid/HumanPoseClip.cs @@ -5,7 +5,7 @@ namespace UniHumanoid { public class HumanPoseClip : ScriptableObject { - public const string TPoseResourcePath = "T-Pose.pose"; + public const string TPoseResourcePath = "UniHumanoid/T-Pose.pose"; public Vector3 bodyPosition; diff --git a/Assets/UniGLTF/Runtime/Resources.meta b/Assets/UniGLTF/Runtime/UniHumanoid/Resources.meta similarity index 62% rename from Assets/UniGLTF/Runtime/Resources.meta rename to Assets/UniGLTF/Runtime/UniHumanoid/Resources.meta index 2285cdc60..6d2ba34e2 100644 --- a/Assets/UniGLTF/Runtime/Resources.meta +++ b/Assets/UniGLTF/Runtime/UniHumanoid/Resources.meta @@ -1,8 +1,6 @@ fileFormatVersion: 2 -guid: c61106d290c827b49b7a6e3f6497bd3f +guid: b4f2ed33f96cfdd4ab1057fccbe1d9e1 folderAsset: yes -timeCreated: 1519379142 -licenseType: Free DefaultImporter: externalObjects: {} userData: diff --git a/Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid.meta b/Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid.meta new file mode 100644 index 000000000..4e4b44155 --- /dev/null +++ b/Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c8d7024b7589844a9bbd3d632b5853e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UniGLTF/Runtime/Resources/T-Pose.pose.asset b/Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid/T-Pose.pose.asset similarity index 100% rename from Assets/UniGLTF/Runtime/Resources/T-Pose.pose.asset rename to Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid/T-Pose.pose.asset diff --git a/Assets/UniGLTF/Runtime/Resources/T-Pose.pose.asset.meta b/Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid/T-Pose.pose.asset.meta similarity index 100% rename from Assets/UniGLTF/Runtime/Resources/T-Pose.pose.asset.meta rename to Assets/UniGLTF/Runtime/UniHumanoid/Resources/UniHumanoid/T-Pose.pose.asset.meta diff --git a/Assets/UniGLTF/Runtime/Utils/CachedEnum/CachedEnum.cs b/Assets/UniGLTF/Runtime/Utils/CachedEnum/CachedEnum.cs index 05322b2fd..10292f329 100644 --- a/Assets/UniGLTF/Runtime/Utils/CachedEnum/CachedEnum.cs +++ b/Assets/UniGLTF/Runtime/Utils/CachedEnum/CachedEnum.cs @@ -33,16 +33,6 @@ namespace UniGLTF.Utils } } - /// - /// bool を返して out 変数に結果を返すのが TryXXX なので、Try ではない。 - /// - [Obsolete("use ParseOrDefault")] - public static T TryParseOrDefault(string name, bool ignoreCase = false, T defaultValue = default) - where T : struct, Enum - { - return ParseOrDefault(name, ignoreCase: ignoreCase); - } - public static T[] GetValues() where T : struct, Enum { return CachedEnumType.Values; diff --git a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_linear.png.meta b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_linear.png.meta index 8968f3a02..34e2b319c 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_linear.png.meta +++ b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_linear.png.meta @@ -23,6 +23,7 @@ TextureImporter: isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -54,9 +55,12 @@ TextureImporter: textureType: 0 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 diff --git a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_normal_map.png.meta b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_normal_map.png.meta index 01d1f4a11..4862a8127 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_normal_map.png.meta +++ b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_normal_map.png.meta @@ -23,6 +23,7 @@ TextureImporter: isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -54,9 +55,12 @@ TextureImporter: textureType: 1 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 diff --git a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_srgb.png.meta b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_srgb.png.meta index ab00cb466..39acaa02f 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_srgb.png.meta +++ b/Assets/UniGLTF/Tests/UniGLTF/4x4_gray_import_as_srgb.png.meta @@ -23,6 +23,7 @@ TextureImporter: isReadable: 1 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -54,9 +55,12 @@ TextureImporter: textureType: 0 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 diff --git a/Assets/UniGLTF/Tests/UniGLTF/CacheEnumTest.cs b/Assets/UniGLTF/Tests/UniGLTF/CacheEnumTest.cs index 2018c00ee..89d6da927 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/CacheEnumTest.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/CacheEnumTest.cs @@ -11,8 +11,8 @@ namespace UniGLTF [Test] public void CacheEnumTestSimplePasses() { - Assert.AreEqual(default(HumanBodyBones), CachedEnum.TryParseOrDefault("xxx")); - Assert.AreEqual(HumanBodyBones.UpperChest, CachedEnum.TryParseOrDefault("upperchest", true)); + Assert.AreEqual(default(HumanBodyBones), CachedEnum.ParseOrDefault("xxx")); + Assert.AreEqual(HumanBodyBones.UpperChest, CachedEnum.ParseOrDefault("upperchest", true)); Assert.AreEqual(CachedEnum.GetValues().First(x => x == HumanBodyBones.Hips), HumanBodyBones.Hips); } } diff --git a/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs b/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs index b3d050087..5f9e6a3fd 100644 --- a/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs +++ b/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs @@ -127,7 +127,7 @@ namespace VRM { if (x.mesh == index) { - return CachedEnum.TryParseOrDefault(x.firstPersonFlag, true); + return CachedEnum.ParseOrDefault(x.firstPersonFlag, true); } } diff --git a/Assets/VRM/Runtime/Format/glTF_VRM_FirstPerson.cs b/Assets/VRM/Runtime/Format/glTF_VRM_FirstPerson.cs index 82a7c3799..1c7517bef 100644 --- a/Assets/VRM/Runtime/Format/glTF_VRM_FirstPerson.cs +++ b/Assets/VRM/Runtime/Format/glTF_VRM_FirstPerson.cs @@ -72,7 +72,7 @@ namespace VRM { get { - return CachedEnum.TryParseOrDefault(lookAtTypeName, true); + return CachedEnum.ParseOrDefault(lookAtTypeName, true); } set { lookAtTypeName = value.ToString(); } } diff --git a/Assets/VRM/Runtime/Format/glTF_VRM_Meta.cs b/Assets/VRM/Runtime/Format/glTF_VRM_Meta.cs index ac668008c..89a11be0a 100644 --- a/Assets/VRM/Runtime/Format/glTF_VRM_Meta.cs +++ b/Assets/VRM/Runtime/Format/glTF_VRM_Meta.cs @@ -36,7 +36,7 @@ namespace VRM { static UssageLicense FromString(string src) { - return CachedEnum.TryParseOrDefault(src, true); + return CachedEnum.ParseOrDefault(src, true); } [JsonSchema(Description = "Title of VRM model")] @@ -69,7 +69,7 @@ namespace VRM { get { - return CachedEnum.TryParseOrDefault(allowedUserName, true); + return CachedEnum.ParseOrDefault(allowedUserName, true); } set { @@ -135,7 +135,7 @@ namespace VRM { get { - return CachedEnum.TryParseOrDefault(licenseName, true); + return CachedEnum.ParseOrDefault(licenseName, true); } set { diff --git a/Assets/VRM/Runtime/IO/VRMImporterContext.cs b/Assets/VRM/Runtime/IO/VRMImporterContext.cs index cff816329..ffe6a9772 100644 --- a/Assets/VRM/Runtime/IO/VRMImporterContext.cs +++ b/Assets/VRM/Runtime/IO/VRMImporterContext.cs @@ -153,12 +153,12 @@ namespace VRM if (group != null) { asset.BlendShapeName = groupName; - asset.Preset = CachedEnum.TryParseOrDefault(group.presetName, true); + asset.Preset = CachedEnum.ParseOrDefault(group.presetName, true); asset.IsBinary = group.isBinary; if (asset.Preset == BlendShapePreset.Unknown) { // fallback - asset.Preset = CachedEnum.TryParseOrDefault(group.name, true); + asset.Preset = CachedEnum.ParseOrDefault(group.name, true); } asset.Values = group.binds.Select(x => { diff --git a/Assets/VRM10_Samples/VRM10Viewer/Motions.meta b/Assets/VRM10_Samples/VRM10Viewer/Motions.meta new file mode 100644 index 000000000..5d616db2f --- /dev/null +++ b/Assets/VRM10_Samples/VRM10Viewer/Motions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b092f2ba86c6ec247afd37d38108bf03 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UniGLTF/Runtime/Resources/test_motion.txt b/Assets/VRM10_Samples/VRM10Viewer/Motions/vrm10viewer_test_motion.txt similarity index 100% rename from Assets/UniGLTF/Runtime/Resources/test_motion.txt rename to Assets/VRM10_Samples/VRM10Viewer/Motions/vrm10viewer_test_motion.txt diff --git a/Assets/VRM10_Samples/VRM10Viewer/Motions/vrm10viewer_test_motion.txt.meta b/Assets/VRM10_Samples/VRM10Viewer/Motions/vrm10viewer_test_motion.txt.meta new file mode 100644 index 000000000..fe3a37d2e --- /dev/null +++ b/Assets/VRM10_Samples/VRM10Viewer/Motions/vrm10viewer_test_motion.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 08df5151e71aed748b13547492fb8b9a +timeCreated: 1546851178 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10Viewer.unity b/Assets/VRM10_Samples/VRM10Viewer/VRM10Viewer.unity index b26cea286..15284a929 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10Viewer.unity +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10Viewer.unity @@ -5572,7 +5572,7 @@ MonoBehaviour: m_src: {fileID: 0} m_target: {fileID: 802105000} Root: {fileID: 0} - m_motion: {fileID: 4900000, guid: 7d2617171adc40b41ac50228f101e178, type: 3} + m_motion: {fileID: 4900000, guid: 08df5151e71aed748b13547492fb8b9a, type: 3} m_texts: m_textModelTitle: {fileID: 1111491925} m_textModelVersion: {fileID: 1045380263} @@ -5591,7 +5591,6 @@ MonoBehaviour: ToggleMotionTPose: {fileID: 1791103380} ToggleMotionBVH: {fileID: 1311520910} ToggleMotion: {fileID: 224350194} - m_pose: {fileID: 11400000, guid: 879e332f84a378c4da3b87af13da3e85, type: 2} --- !u!1 &1791103378 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs index 6bc7142c1..b9ab35159 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs +++ b/Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs @@ -168,9 +168,6 @@ namespace UniVRM10.VRM10Viewer [SerializeField] UIFields m_ui = default; - [SerializeField] - HumanPoseClip m_pose = default; - private void Reset() { var buttons = GameObject.FindObjectsOfType