From b0bbd1fdfc54a283ac986c9728f4c81e9f901b7e Mon Sep 17 00:00:00 2001 From: Unity Technologies <@unity> Date: Fri, 8 Nov 2024 00:00:00 +0000 Subject: [PATCH] com.unity.entities.graphics@1.4.5 ## [1.4.5] - 2024-11-08 ### Added * The new PerVertexMotionVectors_Tag component data type informs Entities Graphics that an Entity needs to participate in the object motion vector pass. The tag is automatically added for entities that go through the builtin MeshRendererBaker path. ### Fixed * "MaterialMeshInfo does not point to a valid mesh" for runtime created entities --- CHANGELOG.md | 11 +++++++++ .../EntitiesGraphicsSystem.cs | 8 +++---- Unity.Entities.Graphics/RenderMeshArray.cs | 4 ++-- ValidationExceptions.json | 23 ++++--------------- package.json | 10 ++++---- 5 files changed, 26 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de41ed..77b7898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ uid: changelog # Changelog +## [1.4.5] - 2024-11-08 + +### Added + +* The new PerVertexMotionVectors_Tag component data type informs Entities Graphics that an Entity needs to participate in the object motion vector pass. The tag is automatically added for entities that go through the builtin MeshRendererBaker path. + +### Fixed + +* "MaterialMeshInfo does not point to a valid mesh" for runtime created entities + + ## [1.4.3] - 2024-10-16 ### Fixed diff --git a/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs b/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs index 3ca6504..f567157 100644 --- a/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs +++ b/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs @@ -247,11 +247,11 @@ public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useE } else { - if (!materialMeshInfo.IsRuntimeMaterial) - outOfBounds = outOfBounds || (materialMeshInfo.MaterialArrayIndex) >= materials.Length; + if (materialMeshInfo.Material < 0) + outOfBounds = outOfBounds || MaterialMeshInfo.StaticIndexToArrayIndex(materialMeshInfo.Material) >= materials.Length; - if (!materialMeshInfo.IsRuntimeMesh) - outOfBounds = outOfBounds || materialMeshInfo.MeshArrayIndex >= meshes.Length; + if (materialMeshInfo.Mesh < 0) + outOfBounds = outOfBounds || MaterialMeshInfo.StaticIndexToArrayIndex(materialMeshInfo.Mesh) >= meshes.Length; } if (outOfBounds) diff --git a/Unity.Entities.Graphics/RenderMeshArray.cs b/Unity.Entities.Graphics/RenderMeshArray.cs index 3e2a09c..0df2390 100644 --- a/Unity.Entities.Graphics/RenderMeshArray.cs +++ b/Unity.Entities.Graphics/RenderMeshArray.cs @@ -170,9 +170,9 @@ public BatchMaterialID MaterialID set => Material = (int) value.value; } - internal bool IsRuntimeMaterial => Material >= 0; + internal bool IsRuntimeMaterial => !HasMaterialMeshIndexRange && Material >= 0; - internal bool IsRuntimeMesh => Mesh >= 0; + internal bool IsRuntimeMesh => !HasMaterialMeshIndexRange && Mesh >= 0; internal int MeshArrayIndex { diff --git a/ValidationExceptions.json b/ValidationExceptions.json index 7ddb748..8b59190 100644 --- a/ValidationExceptions.json +++ b/ValidationExceptions.json @@ -3,34 +3,19 @@ { "ValidationTest": "API Updater Configuration Validation", "ExceptionMessage": "stdout:\nAPIUpdater Configuration Validation\n-----------------------------------\n\nConfiguration Validation Tests (Failed: 0, Total: 1, Ignored 0):\n----------------------------------------------------------------\n\n\nAuto Generated Tests (Failed: 1, Total: 1, Ignored 0):\n------------------------------------------------------\n1) Expected updates not applied for configuration:\n[*] System.SByte [*] Unity.Rendering.MaterialMeshInfo::Submesh -> * Unity.Rendering.MaterialMeshInfo::SubMesh\n\nInput : unsafe class Test : object { System.SByte Method(System.SByte memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.SByte local = obj.Submesh; return Method(obj.Submesh, obj); } }\nExpected: unsafe class Test : object { System.UInt16 Method(System.UInt16 memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.UInt16 local = obj.SubMesh; return Method(obj.SubMesh, obj); } }\nActual : unsafe class Test : object { System.SByte Method(System.SByte memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.SByte local = obj.SubMesh; return Method(obj.SubMesh, obj); } }\n\n\nBase type validation (Failed: 0, Total: 0, Ignored 0):\n------------------------------------------------------\nstderr:\n", - "PackageVersion": "1.4.3" + "PackageVersion": "1.4.5" }, { "ValidationTest": "API Validation", "ExceptionMessage": "Breaking changes require a new major version.", - "PackageVersion": "1.4.3" - }, - { - "ValidationTest": "API Validation", - "ExceptionMessage": "Additions require a new minor or major version.", - "PackageVersion": "1.4.3" - } + "PackageVersion": "1.4.5" + } ], "WarningExceptions": [ - { - "ValidationTest": "Manifest Validation", - "ExceptionMessage": "Package dependency com.unity.entities@0.60.0-preview.88 must be promoted to production before this package is promoted to production. (Except for core packages)", - "PackageVersion": "1.4.3" - }, { "ValidationTest": "Folder Structure Validation", "ExceptionMessage": "The Resources Directory should not be used in packages. For more guidance, please visit https://docs.unity3d.com/Manual/BestPracticeUnderstandingPerformanceInUnity6.html", - "PackageVersion": "1.4.3" - }, - { - "ValidationTest": "Package Lifecycle Validation", - "ExceptionMessage": "com.unity.entities.graphics has never been promoted to production before. Please contact Release Management through slack in #devs-pkg-promotion to promote the first version of your package before trying to use this automated pipeline. Read more about this error and potential solutions at https://docs.unity3d.com/Packages/com.unity.package-validation-suite@latest/index.html?preview=1&subfolder=/manual/lifecycle_validation_error.html#the-very-first-version-of-a-package-must-be-promoted-by-release-management", - "PackageVersion": "1.4.3" + "PackageVersion": "1.4.5" } ] } diff --git a/package.json b/package.json index 9bff652..a500bb0 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "com.unity.entities.graphics", "displayName": "Entities Graphics", - "version": "1.4.3", + "version": "1.4.5", "unity": "2022.3", "unityRelease": "11f1", "description": "The Entities Graphics package provides systems and components for drawing meshes using DOTS, including support for instanced mesh rendering and LOD.", "dependencies": { - "com.unity.entities": "1.3.5", + "com.unity.entities": "1.3.8", "com.unity.modules.particlesystem": "1.0.0", "com.unity.render-pipelines.core": "14.0.9" }, @@ -17,15 +17,15 @@ "unity" ], "_upm": { - "changelog": "### Fixed\n* Entities graphics constantly allocating more memory without releasing it until next time system update is called." + "changelog": "### Added\n\n* The new PerVertexMotionVectors_Tag component data type informs Entities Graphics that an Entity needs to participate in the object motion vector pass. The tag is automatically added for entities that go through the builtin MeshRendererBaker path.\n\n### Fixed\n\n* \"MaterialMeshInfo does not point to a valid mesh\" for runtime created entities" }, "upmCi": { - "footprint": "6a13371f12053bdd67b593a0076cbd3c777a3351" + "footprint": "691a23e7498ac2c03ccf7de35f5c3c6db2db3e0c" }, "documentationUrl": "https://docs.unity3d.com/Packages/com.unity.entities.graphics@1.4/manual/index.html", "repository": { "url": "https://github.cds.internal.unity3d.com/unity/dots.git", "type": "git", - "revision": "97e332ca8068d973f6571bcb144c924ebd679c79" + "revision": "3ea543f9dd8be902be20c6f04e900cb913436f36" } }