MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
411 stars 111 forks source link

MRTK3 FindAncestorComponent not implemented, leading to stack overflow #186

Closed IssueSyncBot closed 1 year ago

IssueSyncBot commented 1 year ago

Original issue opened by:

@srinjoym srinjoym


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

ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/11415

IssueSyncBot commented 1 year ago

Original comment by:

@shaynie shaynie


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