Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted MARS Image Track m_Subscriber Empty In IOS

Discussion in 'Unity MARS' started by andysdds, Dec 15, 2020.

  1. andysdds

    andysdds

    Joined:
    Aug 29, 2019
    Posts:
    11
    I tried to add some custom event when Image tracking in different conditions , so I make some change in MARSession.
    I turn m_Subscriber from readonly to public , so I can get it , then , I access m_Subscriber to my script :
    Code (CSharp):
    1.  MARS_instance.m_Subscriber.SubscribeMarkerUpdated (customMarkerUpdateEvent);
    It work fine in editor , but not work in iOS.
    When I trigger this line , it show this on Xcode

    [B]Uploading Crash Report
    NullReferenceException: Object reference not set to an instance of an object.[/B]

    And I find out , m_Subscriber is null when I run in iOS , but it exist in the editor .

    Is there anyway to find it? Many thx!
     
  2. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    139
    Hi there! Would you be able to share your project so we can look at your code? If so, please use the Unity Bug Reporter (Help > Report a bug...) to zip up the project and send it our way. A Google Drive link also works :)

    As for your issue, I'll need to know a little more about how your script is set up. What sets up `m_Subscriber` in the Editor? Do you have any provider selection options set that would prevent it from being set up in Player Builds?
     
unityunity