microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

MRTK3 FindAncestorComponent not implemented, leading to stack overflow #11415

Closed srinjoym closed 1 year ago

srinjoym commented 1 year ago

This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:


Describe the bug

Transform.FindAncestorComponent is not implemented fully in the MRTK 3 branch. The current implementation falls back to ComponentExtensions.cs here which calls itself recursively, leading to a stack overflow. The previous implementation in MRTK 2 relied on TransformExtensions here which has been removed.

To reproduce

Steps to reproduce the behavior:

  1. Call FindAncestorComponent on any game object
  2. Stack overflow
shaynie commented 1 year ago

Resolved with the addition of TransformExtensions.cs in https://github.com/microsoft/MixedRealityToolkit-Unity/pull/11435