Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Getting a Reference rewriter error for SpatialStageFrameOfReference

Discussion in 'Windows' started by RageAgainstThePixel, Jun 10, 2020.

  1. RageAgainstThePixel

    RageAgainstThePixel

    Joined:
    Mar 11, 2020
    Posts:
    53
    I'm targeting the latest UWP apis but getting this re-writer error and I'm not sure how to fix it.

    @Tautvydas-Zilys is there something I'm missing here?

    Using .net 4.x and il2cpp

    Reference rewriter: Error: method `System.Numerics.Vector3[] Windows.Perception.Spatial.SpatialStageFrameOfReference::TryGetMovementBounds(Windows.Perception.Spatial.SpatialCoordinateSystem)` doesn't exist in target framework. It is referenced from XRTK.WindowsMixedReality.dll at System.Boolean XRTK.WindowsMixedReality.Providers.BoundarySystem.WindowsMixedRealityBoundaryDataProvider::TryGetBoundaryGeometry(System.Collections.Generic.List`1<UnityEngine.Vector3>&).
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Which Unity version are you on? Generally that error indicates that either you're using APIs from a newer Windows SDK that you're targeting, or there's an issue in reference rewrite not properly projecting Windows Runtime types (there have been a few known issues there but I thought we fixed them). If it's the latter, you can ignore the error: it will not cause the build to fail (but we'd like a bug report).
     
  3. RageAgainstThePixel

    RageAgainstThePixel

    Joined:
    Mar 11, 2020
    Posts:
    53
    I'm using 2019.1.14f but was able to reproduce it with 2019.4.1 LTS

    I double checked the API targets and that seems to be correct. I'm thinking it might be the latter?

    I'll go ahead and file the bug report
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Does it cause any issues at your app runtime?
     
  5. RageAgainstThePixel

    RageAgainstThePixel

    Joined:
    Mar 11, 2020
    Posts:
    53
    Case 1254820

    > Does it cause any issues at your app runtime?

    That method doesn't seem to return any data when it should.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Thanks, we will take a look.

    If there's no exception at runtime, it's likely is working correctly. Are you sure that API is supposed to return stuff when you're using it the way you are? It's very unlikely data gets lost on IL2CPP side if the call is made successfully. I would suggest looking at that because our fix will likely just be fixing this error without any other functional changes.
     
    RageAgainstThePixel likes this.
  7. RageAgainstThePixel

    RageAgainstThePixel

    Joined:
    Mar 11, 2020
    Posts:
    53
    It's working. I made a simple mistake of not actually loading the test level /facepalm.
     
  8. emerge-sjh

    emerge-sjh

    Joined:
    Oct 16, 2020
    Posts:
    14
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    The backport is in progress. Unfortunately I have no ETA at this point.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Is this blocking you in any way? That error is purely cosmetic and should not cause issues at runtime.
     
  11. emerge-sjh

    emerge-sjh

    Joined:
    Oct 16, 2020
    Posts:
    14
    It is not, just curious about the level of effort for LTS
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Backports work on priority basis: higher priority issues are prioritized. This particular issue was deemed as cosmetic and was given low priority.
     
    emerge-sjh likes this.