Merge pull request #2893 from joanllobera:fix/passive-attribute-droped

PiperOrigin-RevId: 878958794
Change-Id: I2d1fe080bd02b5c3e685cefbf36d45821cdfb46d
This commit is contained in:
Copybara-Service
2026-03-05 03:18:10 -08:00
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ public static class MjHierarchyTool {
// Finds a single component that matches both the type and the name criteria.
public static T FindComponentOfTypeAndName<T>(string name) where T : MjComponent {
var components = UnityEngine.Object.FindObjectsOfType<T>().Where(
var components = UnityEngine.Object.FindObjectsByType<T>(FindObjectsSortMode.None).Where(
component => component.gameObject.name == name);
var numComponents = components.Count();
if (components == null || numComponents == 0) {