We were looking for the object menu target using the ObjectMenuTarget and MediaContentBounds components but more than one entity in the hierarchy can have those (spawned glTF that spawns media) but that's not the object the object menu actions (like pin) need to work on.
This PR updates the root object menu target lookup by looking for the Deletable entity that also has an ObjectMenuTargetcomponent.
We should probbaly try to find a better way of tagging this root entity that's more verbose. Something like SpawnedMediaRoot.
We were looking for the object menu target using the
ObjectMenuTarget
andMediaContentBounds
components but more than one entity in the hierarchy can have those (spawned glTF that spawns media) but that's not the object the object menu actions (like pin) need to work on.This PR updates the root object menu target lookup by looking for the
Deletable
entity that also has anObjectMenuTarget
component.We should probbaly try to find a better way of tagging this root entity that's more verbose. Something like SpawnedMediaRoot.
Fixes https://github.com/mozilla/hubs/issues/6360