diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs index d7588cbcf..83dd81993 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporterBase.cs @@ -61,7 +61,7 @@ namespace UniGLTF context.AddObjectToAsset(k.Name, o); }); var root = loaded.Root; - GameObject.DestroyImmediate(loaded); + DestroyImmediate(loaded); context.AddObjectToAsset(root.name, root); context.SetMainObject(root); diff --git a/Assets/UniGLTF/Runtime/Extensions/UnityExtensions.cs b/Assets/UniGLTF/Runtime/Extensions/UnityExtensions.cs index 43b7da04b..ba9218ff5 100644 --- a/Assets/UniGLTF/Runtime/Extensions/UnityExtensions.cs +++ b/Assets/UniGLTF/Runtime/Extensions/UnityExtensions.cs @@ -66,6 +66,14 @@ namespace UniGLTF } } + public BlendShape(string name, int numPositions, int numNormals, int numTangents) + { + Name = name; + Positions = new List(numPositions); + Normals = new List(numNormals); + Tangents = new List(numTangents); + } + public List Positions { get; private set; } public List Normals { get; private set; } public List Tangents { get; private set; } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshData.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshData.cs index ed312613a..9cb09fd4e 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshData.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshData.cs @@ -203,7 +203,10 @@ namespace UniGLTF return (vertexCount, indexCount); } - private BlendShape GetOrCreateBlendShape(int i) + private BlendShape GetOrCreateBlendShape(int i) => + GetOrCreateBlendShape(i: i, numPositions: 0, numNormals: 0, numTangents: 0); + + private BlendShape GetOrCreateBlendShape(int i, int numPositions, int numNormals, int numTangents) { if (i < _blendShapes.Count && _blendShapes[i] != null) { @@ -215,7 +218,7 @@ namespace UniGLTF _blendShapes.Add(null); } - var blendShape = new BlendShape(i.ToString()); + var blendShape = new BlendShape(i.ToString(), numPositions, numNormals, numTangents); _blendShapes[i] = blendShape; return blendShape; } @@ -293,6 +296,79 @@ namespace UniGLTF { bool isOldVersion = data.GLTF.IsGeneratedUniGLTFAndOlder(1, 16); + { + // 事前に blendShape.{Positions,Normals,Tangents} のサイズを設定することで、GC Alloc を減少させる + int maxTargetsCount = 0; + Dictionary numPositions = new(); + Dictionary numNormals = new(); + Dictionary numTangents = new(); + + foreach (var primitives in gltfMesh.primitives) + { + if (primitives.targets != null && primitives.targets.Count > 0) + { + maxTargetsCount = Math.Max(maxTargetsCount, primitives.targets.Count); + for (var i = 0; i < primitives.targets.Count; i++) + { + gltfMorphTarget primTarget = primitives.targets[i]; + glTF GLTF = data.GLTF; + List accessors = GLTF.accessors; + if (primTarget.POSITION != -1) + { + numPositions.TryAdd(i, 0); + numPositions[i] += GetAccessorElementCount(GLTF, accessors[primTarget.POSITION]); + } + if (primTarget.NORMAL != -1) + { + numNormals.TryAdd(i, 0); + numNormals[i] += GetAccessorElementCount(GLTF, accessors[primTarget.NORMAL]); + } + if (primTarget.TANGENT != -1) + { + numTangents.TryAdd(i, 0); + numTangents[i] += GetAccessorElementCount(GLTF, accessors[primTarget.TANGENT]); + } + continue; + + // GetTypedFromAccessor 相当の、エレメント数のみを取得する関数 + static int GetTypedArrayElementCount(glTFAccessor accessor, glTFBufferView view) + { + if (view.byteStride == 0 || view.byteStride == accessor.GetStride()) + { + // planar layout + return accessor.CalcByteSize() / accessor.GetStride(); + } + else + { + // interleaved layout + return accessor.count; + } + } + + // GetArrayFromAccessor 相当の、エレメント数のみを取得する関数 + static int GetAccessorElementCount(glTF GLTF, glTFAccessor accessor) + { + if (accessor.count <= 0) return 0; + if (accessor.bufferView is null) return 0; + return accessor.bufferView.HasValidIndex() + ? GetTypedArrayElementCount(accessor, GLTF.bufferViews[accessor.bufferView.Value]) + : accessor.count; + } + } + } + } + // 実際のサイズを確定 + for (var i = 0; i < maxTargetsCount; i++) + { + GetOrCreateBlendShape( + i, + numPositions.GetValueOrDefault(i, 0), + numNormals.GetValueOrDefault(i, 0), + numTangents.GetValueOrDefault(i, 0) + ); + } + } + foreach (var primitives in gltfMesh.primitives) { var vertexOffset = _currentVertexCount; @@ -368,7 +444,7 @@ namespace UniGLTF throw new Exception("different length"); } - blendShape.Positions.AddRange(array.Select(inverter.InvertVector3).ToArray()); + blendShape.Positions.AddRange(array.Select(inverter.InvertVector3)); } if (primTarget.NORMAL != -1) @@ -379,7 +455,7 @@ namespace UniGLTF throw new Exception("different length"); } - blendShape.Normals.AddRange(array.Select(inverter.InvertVector3).ToArray()); + blendShape.Normals.AddRange(array.Select(inverter.InvertVector3)); } if (primTarget.TANGENT != -1) @@ -390,7 +466,7 @@ namespace UniGLTF throw new Exception("different length"); } - blendShape.Tangents.AddRange(array.Select(inverter.InvertVector3).ToArray()); + blendShape.Tangents.AddRange(array.Select(inverter.InvertVector3)); } } } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs index 8261452a4..e37857f65 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/PackageVersion.cs @@ -5,7 +5,7 @@ namespace UniGLTF { public const int MAJOR = 0; public const int MINOR = 129; - public const int PATCH = 1; - public const string VERSION = "0.129.1"; + public const int PATCH = 2; + public const string VERSION = "0.129.2"; } } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs b/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs index 79f7d94c1..6f4374687 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/RuntimeGltfInstance.cs @@ -9,6 +9,10 @@ namespace UniGLTF /// ImporterContext の Load 結果の GltfModel /// /// Runtime でモデルを Destory したときに関連リソース(Texture, Material...などの UnityEngine.Object)を自動的に Destroy する。 + /// + /// TODO: Editor Importの場合でも一瞬だけこのクラスのインスタンスが生じるが、すぐDestroyImmediateされるため、それらを区別する用途に使うことができる + /// Editorでも利用されている以上、名前・責務が良くないので見直したい。 + /// /// public class RuntimeGltfInstance : MonoBehaviour, IResponsibilityForDestroyObjects { diff --git a/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs b/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs index b81fd8008..ad4c83d70 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs @@ -5,7 +5,7 @@ namespace UniGLTF { public const int MAJOR = 2; public const int MINOR = 65; - public const int PATCH = 1; - public const string VERSION = "2.65.1"; + public const int PATCH = 2; + public const string VERSION = "2.65.2"; } } diff --git a/Assets/UniGLTF/package.json b/Assets/UniGLTF/package.json index 378ea1c48..80a7981d0 100644 --- a/Assets/UniGLTF/package.json +++ b/Assets/UniGLTF/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.gltf", - "version": "0.129.1", + "version": "0.129.2", "displayName": "UniGLTF", "description": "GLTF importer and exporter", "unity": "2021.3", diff --git a/Assets/VRM/package.json b/Assets/VRM/package.json index 07572e3f1..1d95b13c2 100644 --- a/Assets/VRM/package.json +++ b/Assets/VRM/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.univrm", - "version": "0.129.1", + "version": "0.129.2", "displayName": "VRM", "description": "VRM importer", "unity": "2021.3", @@ -14,7 +14,7 @@ "name": "VRM Consortium" }, "dependencies": { - "com.vrmc.gltf": "0.129.1", + "com.vrmc.gltf": "0.129.2", "com.unity.ugui": "1.0.0" }, "samples": [ diff --git a/Assets/VRM10/Runtime/Components/Expression/ExpressionMerger.cs b/Assets/VRM10/Runtime/Components/Expression/ExpressionMerger.cs index 791397b22..e178df0c5 100644 --- a/Assets/VRM10/Runtime/Components/Expression/ExpressionMerger.cs +++ b/Assets/VRM10/Runtime/Components/Expression/ExpressionMerger.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -8,7 +9,7 @@ namespace UniVRM10 /// /// ブレンドシェイプを蓄えてまとめて適用するクラス /// - internal sealed class ExpressionMerger + internal sealed class ExpressionMerger : IDisposable { /// /// Key から Expression を得る @@ -24,7 +25,7 @@ namespace UniVRM10 MaterialValueBindingMerger m_materialValueBindingMerger; - public ExpressionMerger(VRM10ObjectExpression expressions, Transform root) + public ExpressionMerger(VRM10ObjectExpression expressions, Transform root, bool isPrefabInstance) { m_clipMap = expressions.Clips.ToDictionary( x => expressions.CreateKey(x.Clip), @@ -33,7 +34,7 @@ namespace UniVRM10 ); m_valueMap = new Dictionary(ExpressionKey.Comparer); m_morphTargetBindingMerger = new MorphTargetBindingMerger(m_clipMap, root); - m_materialValueBindingMerger = new MaterialValueBindingMerger(m_clipMap, root); + m_materialValueBindingMerger = new MaterialValueBindingMerger(m_clipMap, root, isPrefabInstance); } /// @@ -74,5 +75,10 @@ namespace UniVRM10 { m_materialValueBindingMerger.RestoreMaterialInitialValues(); } + + public void Dispose() + { + m_materialValueBindingMerger.Dispose(); + } } } diff --git a/Assets/VRM10/Runtime/Components/Expression/MaterialValueBindingMerger.cs b/Assets/VRM10/Runtime/Components/Expression/MaterialValueBindingMerger.cs index 495ccfd90..665b2b611 100644 --- a/Assets/VRM10/Runtime/Components/Expression/MaterialValueBindingMerger.cs +++ b/Assets/VRM10/Runtime/Components/Expression/MaterialValueBindingMerger.cs @@ -3,13 +3,14 @@ using System.Collections.Generic; using UniGLTF.Extensions.VRMC_vrm; using UnityEngine; using VRM10.MToon10; +using Object = UnityEngine.Object; namespace UniVRM10 { /// /// Base + (A.Target - Base) * A.Weight + (B.Target - Base) * B.Weight ... /// - internal sealed class MaterialValueBindingMerger + internal sealed class MaterialValueBindingMerger : IDisposable { private static readonly string COLOR_PROPERTY = MToon10Prop.BaseColorFactor.ToUnityShaderLabName(); private static readonly string EMISSION_COLOR_PROPERTY = MToon10Prop.EmissiveFactor.ToUnityShaderLabName(); @@ -18,6 +19,8 @@ namespace UniVRM10 private static readonly string SHADE_COLOR_PROPERTY = MToon10Prop.ShadeColorFactor.ToUnityShaderLabName(); private static readonly string MATCAP_COLOR_PROPERTY = MToon10Prop.MatcapColorFactor.ToUnityShaderLabName(); + private readonly HashSet _clonedMaterials = new(); + public static string GetProperty(MaterialColorType bindType) { switch (bindType) @@ -50,16 +53,44 @@ namespace UniVRM10 /// Dictionary m_materialMap = new Dictionary(); - void InitializeMaterialMap(Dictionary clipMap, Transform root) + void InitializeMaterialMap(Dictionary clipMap, Transform root, bool isPrefabInstance) { - Dictionary materialNameMap = new Dictionary(); + var materialNameMap = new Dictionary(); foreach (var renderer in root.GetComponentsInChildren()) { - foreach (var material in renderer.sharedMaterials) + // VFXRendererなど、Materialが設定できないRendererが存在する + if (renderer is not SkinnedMeshRenderer && renderer is not MeshRenderer) continue; + + if (isPrefabInstance) { - if (material != null && !materialNameMap.ContainsKey(material.name)) + // EditorImportされたPrefabのInstanceとして生成されている場合、Materialを複製する + var sharedMaterials = renderer.sharedMaterials; + var materials = renderer.materials; + for (var i = 0; i < materials.Length; i++) { - materialNameMap.Add(material.name, material); + var sharedMaterial = sharedMaterials[i]; + var material = materials[i]; + + if (!sharedMaterial || !material) continue; + + // 複製されたマテリアルはこのクラス内で破棄 + if (sharedMaterial != material) _clonedMaterials.Add(material); + + // 複製前の名前に揃え、それを記録しておく + // なお、Vrm10Runtimeのインスタンスが作られるより先にユーザーによってMaterialが複製されるパターンは想定しない + material.name = sharedMaterial.name; + materialNameMap.TryAdd(sharedMaterial.name, material); + } + } + else + { + // PrefabのInstanceでない(RuntimeImportされている)ならMaterialは複製しない + foreach (var material in renderer.sharedMaterials) + { + if (material) + { + materialNameMap.TryAdd(material.name, material); + } } } } @@ -284,9 +315,18 @@ namespace UniVRM10 } #endregion - public MaterialValueBindingMerger(Dictionary clipMap, Transform root) + public MaterialValueBindingMerger(Dictionary clipMap, Transform root, bool isPrefabInstance) { - InitializeMaterialMap(clipMap, root); + InitializeMaterialMap(clipMap, root, isPrefabInstance); + } + + public void Dispose() + { + foreach (var clonedMaterial in _clonedMaterials) + { + Object.Destroy(clonedMaterial); + } + _clonedMaterials.Clear(); } } } diff --git a/Assets/VRM10/Runtime/Components/Vrm10Instance/Vrm10Instance.cs b/Assets/VRM10/Runtime/Components/Vrm10Instance/Vrm10Instance.cs index f27be9aea..5b4d46531 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Instance/Vrm10Instance.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Instance/Vrm10Instance.cs @@ -141,8 +141,11 @@ namespace UniVRM10 } var initPose = RuntimeGltfInstance.SafeGetInitialPose(transform); + + // NOTE: RuntimeGltfInstanceがないかどうかでPrefabのインスタンスであるか(EditorImportされているか)が判別できる + var isPrefabInstance = !GetComponent(); - return new Vrm10Runtime(this, useControlRig, m_springBoneRuntime, initPose); + return new Vrm10Runtime(this, useControlRig, m_springBoneRuntime, initPose, isPrefabInstance); } public Vrm10Runtime Runtime diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs index c6e8661e2..5a800d2e1 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs @@ -52,7 +52,7 @@ namespace UniVRM10 IReadOnlyDictionary _initPose; public Vrm10Runtime(Vrm10Instance instance, bool useControlRig, IVrm10SpringBoneRuntime springBoneRuntime, - IReadOnlyDictionary initPose) + IReadOnlyDictionary initPose, bool isPrefabInstance) { if (!Application.isPlaying) { @@ -77,7 +77,7 @@ namespace UniVRM10 } Constraints = instance.GetComponentsInChildren(); LookAt = new Vrm10RuntimeLookAt(instance, instance.Humanoid, ControlRig); - Expression = new Vrm10RuntimeExpression(instance, LookAt.EyeDirectionApplicable); + Expression = new Vrm10RuntimeExpression(instance, LookAt.EyeDirectionApplicable, isPrefabInstance); SpringBone = springBoneRuntime; } diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs index 1a4f747ce..902654f35 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs @@ -23,9 +23,9 @@ namespace UniVRM10 public float LookAtOverrideRate { get; private set; } public float MouthOverrideRate { get; private set; } - internal Vrm10RuntimeExpression(Vrm10Instance target, ILookAtEyeDirectionApplicable eyeDirectionApplicable) + internal Vrm10RuntimeExpression(Vrm10Instance target, ILookAtEyeDirectionApplicable eyeDirectionApplicable, bool isPrefabInstance) { - _merger = new ExpressionMerger(target.Vrm.Expression, target.transform); + _merger = new ExpressionMerger(target.Vrm.Expression, target.transform, isPrefabInstance); _keys = target.Vrm.Expression.Clips .Select(x => target.Vrm.Expression.CreateKey(x.Clip)) .ToList(); @@ -56,6 +56,9 @@ namespace UniVRM10 _eyeDirectionApplicable?.Restore(); _eyeDirectionApplicable = null; + + _merger?.Dispose(); + _merger = null; } internal void Process(LookAtEyeDirection inputEyeDirection) diff --git a/Assets/VRM10/Samples~/ClothSample/ClothViewer/Motions/BvhMotion.cs b/Assets/VRM10/Samples~/ClothSample/ClothViewer/Motions/BvhMotion.cs index e6c397046..671f79fbd 100644 --- a/Assets/VRM10/Samples~/ClothSample/ClothViewer/Motions/BvhMotion.cs +++ b/Assets/VRM10/Samples~/ClothSample/ClothViewer/Motions/BvhMotion.cs @@ -28,7 +28,7 @@ namespace UniVRM10.Cloth.Viewer // create SkinnedMesh for bone visualize var animator = m_context.Root.GetComponent(); m_boxMan = SkeletonMeshUtility.CreateRenderer(animator); - var shaderName = UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset == null + var shaderName = UnityEngine.Rendering.GraphicsSettings.defaultRenderPipeline == null ? "Standard" : "Universal Render Pipeline/Lit" ; diff --git a/Assets/VRM10/Samples~/VRM10Viewer/UIToolkit/VRM10MainView.cs b/Assets/VRM10/Samples~/VRM10Viewer/UIToolkit/VRM10MainView.cs index 006291804..23a5b1495 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/UIToolkit/VRM10MainView.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/UIToolkit/VRM10MainView.cs @@ -106,7 +106,7 @@ namespace UniVRM10.VRM10Viewer QueryOrAssert(out m_useCustomPbrMaterial, root, "UseCustomPbrMaterial"); QueryOrAssert(out m_useCustomMToonMaterial, root, "UseCustomMToonMaterial"); // URP かつ WebGL で有効にする - m_useCustomMToonMaterial.value = Application.platform == RuntimePlatform.WebGLPlayer && GraphicsSettings.renderPipelineAsset != null; + m_useCustomMToonMaterial.value = Application.platform == RuntimePlatform.WebGLPlayer && GraphicsSettings.defaultRenderPipeline != null; QueryOrAssert(out m_motionMode, root, "MotionMode"); QueryOrAssert(out m_springboneExternalX, root, "SpringboneExternalX"); QueryOrAssert(out m_springboneExternalY, root, "SpringboneExternalY"); diff --git a/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerController.cs b/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerController.cs index 067fe204b..d0a1e2072 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerController.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerController.cs @@ -115,7 +115,7 @@ namespace UniVRM10.VRM10Viewer if (m_motion != null) { Motion = BvhMotion.LoadBvhFromText(m_motion.text); - if (GraphicsSettings.renderPipelineAsset != null + if (GraphicsSettings.defaultRenderPipeline != null && m_pbrAlphaBlendMaterial != null) { Motion.SetBoxManMaterial(GameObject.Instantiate(m_pbrOpaqueMaterial)); diff --git a/Assets/VRM10/Samples~/VRM10Viewer/VRM10VisualPrimitive.cs b/Assets/VRM10/Samples~/VRM10Viewer/VRM10VisualPrimitive.cs index b87a30f79..3a8b200ad 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/VRM10VisualPrimitive.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/VRM10VisualPrimitive.cs @@ -30,7 +30,7 @@ namespace UniVRM10.VRM10Viewer visual.transform.localScale = Vector3.one; // URP 判定 - if (GraphicsSettings.renderPipelineAsset != null + if (GraphicsSettings.defaultRenderPipeline != null // WebGL ビルドでは GraphicsSettings.renderPipelineAsset が常に null ? || Application.platform == RuntimePlatform.WebGLPlayer) { diff --git a/Assets/VRM10/Samples~/VRM10Viewer/uGui/VRM10ViewerUI.cs b/Assets/VRM10/Samples~/VRM10Viewer/uGui/VRM10ViewerUI.cs index e316d9d7d..88332f56c 100644 --- a/Assets/VRM10/Samples~/VRM10Viewer/uGui/VRM10ViewerUI.cs +++ b/Assets/VRM10/Samples~/VRM10Viewer/uGui/VRM10ViewerUI.cs @@ -180,7 +180,7 @@ namespace UniVRM10.VRM10Viewer private void Start() { // URP かつ WebGL で有効にする - m_useCustomMToonMaterial.isOn = Application.platform == RuntimePlatform.WebGLPlayer && GraphicsSettings.renderPipelineAsset != null; + m_useCustomMToonMaterial.isOn = Application.platform == RuntimePlatform.WebGLPlayer && GraphicsSettings.defaultRenderPipeline != null; m_autoEmotion = gameObject.AddComponent(); m_autoBlink = gameObject.AddComponent(); diff --git a/Assets/VRM10/package.json b/Assets/VRM10/package.json index c9dd836eb..66644b5bc 100644 --- a/Assets/VRM10/package.json +++ b/Assets/VRM10/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.vrm", - "version": "0.129.1", + "version": "0.129.2", "displayName": "VRM-1.0", "description": "VRM-1.0 importer", "unity": "2021.3", @@ -15,7 +15,7 @@ }, "dependencies": { "com.unity.timeline": "1.7.6", - "com.vrmc.gltf": "0.129.1" + "com.vrmc.gltf": "0.129.2" }, "samples": [ { diff --git a/Assets/VRM10_Samples/VRM10Viewer/FaceCameraTarget.asset b/Assets/VRM10_Samples/VRM10Viewer/FaceCameraTarget.asset index 4a4a1220c..dc5b55f8e 100644 --- a/Assets/VRM10_Samples/VRM10Viewer/FaceCameraTarget.asset +++ b/Assets/VRM10_Samples/VRM10Viewer/FaceCameraTarget.asset @@ -10,8 +10,10 @@ CustomRenderTexture: m_ImageContentsHash: serializedVersion: 2 Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 m_IsAlphaChannelOptional: 0 - serializedVersion: 6 + serializedVersion: 5 m_Width: 300 m_Height: 300 m_AntiAliasing: 1 @@ -22,7 +24,6 @@ CustomRenderTexture: m_GenerateMips: 1 m_SRGB: 0 m_UseDynamicScale: 0 - m_UseDynamicScaleExplicit: 0 m_BindMS: 0 m_EnableCompatibleFormat: 1 m_EnableRandomWrite: 0 diff --git a/Packages/manifest.json b/Packages/manifest.json index 0a1716d0b..39132c32c 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,18 +1,14 @@ { "dependencies": { - "com.unity.ai.navigation": "2.0.7", "com.unity.burst": "1.8.21", "com.unity.cloud.ktx": "3.3.0", - "com.unity.cloud.ktx.webgl-2023": "1.0.1", + "com.unity.cloud.ktx.webgl-2022": "1.0.1", "com.unity.ide.rider": "3.0.36", - "com.unity.ide.visualstudio": "2.0.23", - "com.unity.multiplayer.center": "1.0.0", "com.unity.postprocessing": "3.4.0", "com.unity.render-pipelines.universal": "17.0.4", - "com.unity.test-framework": "1.5.1", + "com.unity.test-framework": "1.1.33", "com.unity.timeline": "1.8.7", "com.unity.ugui": "2.0.0", - "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 76b9f5749..9d23fdef0 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,14 +1,5 @@ { "dependencies": { - "com.unity.ai.navigation": { - "version": "2.0.7", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.ai": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.burst": { "version": "1.8.21", "depth": 0, @@ -28,30 +19,19 @@ }, "url": "https://packages.unity.com" }, - "com.unity.cloud.ktx.webgl-2023": { + "com.unity.cloud.ktx.webgl-2022": { "version": "1.0.1", "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.collections": { - "version": "2.5.1", - "depth": 2, - "source": "registry", - "dependencies": { - "com.unity.burst": "1.8.17", - "com.unity.test-framework": "1.4.5", - "com.unity.nuget.mono-cecil": "1.11.4", - "com.unity.test-framework.performance": "3.0.3" - }, - "url": "https://packages.unity.com" - }, "com.unity.ext.nunit": { - "version": "2.0.5", + "version": "1.0.6", "depth": 1, - "source": "builtin", - "dependencies": {} + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" }, "com.unity.ide.rider": { "version": "3.0.36", @@ -62,37 +42,13 @@ }, "url": "https://packages.unity.com" }, - "com.unity.ide.visualstudio": { - "version": "2.0.23", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.9" - }, - "url": "https://packages.unity.com" - }, "com.unity.mathematics": { - "version": "1.3.2", + "version": "1.2.6", "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.multiplayer.center": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.uielements": "1.0.0" - } - }, - "com.unity.nuget.mono-cecil": { - "version": "1.11.4", - "depth": 3, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, "com.unity.postprocessing": { "version": "3.4.0", "depth": 0, @@ -103,18 +59,14 @@ "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "17.0.4", + "version": "14.0.11", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.burst": "1.8.20", - "com.unity.mathematics": "1.3.2", - "com.unity.ugui": "2.0.0", - "com.unity.collections": "2.4.3", + "com.unity.ugui": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.rendering.light-transport": "1.0.1" + "com.unity.modules.jsonserialize": "1.0.0" } }, "com.unity.render-pipelines.universal": { @@ -122,61 +74,44 @@ "depth": 0, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "17.0.4", - "com.unity.shadergraph": "17.0.4", - "com.unity.render-pipelines.universal-config": "17.0.3" + "com.unity.mathematics": "1.2.1", + "com.unity.burst": "1.8.9", + "com.unity.render-pipelines.core": "14.0.11", + "com.unity.shadergraph": "14.0.11", + "com.unity.render-pipelines.universal-config": "14.0.9" } }, "com.unity.render-pipelines.universal-config": { - "version": "17.0.3", + "version": "14.0.10", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "17.0.3" - } - }, - "com.unity.rendering.light-transport": { - "version": "1.0.1", - "depth": 2, - "source": "builtin", - "dependencies": { - "com.unity.collections": "2.2.0", - "com.unity.mathematics": "1.2.4", - "com.unity.modules.terrain": "1.0.0" + "com.unity.render-pipelines.core": "14.0.10" } }, "com.unity.searcher": { - "version": "4.9.3", + "version": "4.9.2", "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "17.0.4", + "version": "14.0.11", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "17.0.4", - "com.unity.searcher": "4.9.3" + "com.unity.render-pipelines.core": "14.0.11", + "com.unity.searcher": "4.9.2" } }, "com.unity.test-framework": { - "version": "1.5.1", + "version": "1.1.33", "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.ext.nunit": "2.0.3", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - } - }, - "com.unity.test-framework.performance": { - "version": "3.1.0", - "depth": 3, "source": "registry", "dependencies": { - "com.unity.test-framework": "1.1.33", + "com.unity.ext.nunit": "1.0.6", + "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" }, "url": "https://packages.unity.com" @@ -202,12 +137,6 @@ "com.unity.modules.imgui": "1.0.0" } }, - "com.unity.modules.accessibility": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, "com.unity.modules.ai": { "version": "1.0.0", "depth": 0, @@ -255,12 +184,6 @@ "com.unity.modules.animation": "1.0.0" } }, - "com.unity.modules.hierarchycore": { - "version": "1.0.0", - "depth": 1, - "source": "builtin", - "dependencies": {} - }, "com.unity.modules.imageconversion": { "version": "1.0.0", "depth": 0, @@ -349,8 +272,7 @@ "dependencies": { "com.unity.modules.ui": "1.0.0", "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.hierarchycore": "1.0.0" + "com.unity.modules.jsonserialize": "1.0.0" } }, "com.unity.modules.umbra": { diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index c856329cd..344a766ac 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -3,7 +3,7 @@ --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 - serializedVersion: 16 + serializedVersion: 15 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} @@ -63,12 +63,13 @@ GraphicsSettings: m_FogKeepExp: 1 m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] - m_RenderPipelineGlobalSettingsMap: - UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 46a76356a8d93364bab3c841a0826a14, - type: 2} m_LightsUseLinearIntensity: 1 m_LightsUseColorTemperature: 1 + m_DefaultRenderingLayerMask: 1 m_LogWhenShaderIsCompiled: 0 + m_SRPDefaultSettings: + UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 46a76356a8d93364bab3c841a0826a14, + type: 2} m_LightProbeOutsideHullStrategy: 0 m_CameraRelativeLightCulling: 0 m_CameraRelativeShadowCulling: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 7a12cc2b7..3b8759d92 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.0.49f1 -m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) +m_EditorVersion: 2022.3.52f1 +m_EditorVersionWithRevision: 2022.3.52f1 (1120fcb54228) diff --git a/ProjectSettings/ShaderGraphSettings.asset b/ProjectSettings/ShaderGraphSettings.asset index 0beb39ac9..486aaba59 100644 --- a/ProjectSettings/ShaderGraphSettings.asset +++ b/ProjectSettings/ShaderGraphSettings.asset @@ -15,4 +15,3 @@ MonoBehaviour: shaderVariantLimit: 2048 customInterpolatorErrorThreshold: 32 customInterpolatorWarningThreshold: 16 - customHeatmapValues: {fileID: 0} diff --git a/ProjectSettings/URPProjectSettings.asset b/ProjectSettings/URPProjectSettings.asset index 08faf0336..cd7fd8c61 100644 --- a/ProjectSettings/URPProjectSettings.asset +++ b/ProjectSettings/URPProjectSettings.asset @@ -12,4 +12,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} m_Name: m_EditorClassIdentifier: - m_LastMaterialVersion: 9 + m_LastMaterialVersion: 7 diff --git a/ProjectSettings/Vrm10ProjectEditorSettings.asset b/ProjectSettings/Vrm10ProjectEditorSettings.asset new file mode 100644 index 000000000..124120f60 --- /dev/null +++ b/ProjectSettings/Vrm10ProjectEditorSettings.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2b096596ea97420ca637d240bc264e28, type: 3} + m_Name: + m_EditorClassIdentifier: + materialDescriptorGeneratorFactory: {fileID: 0}