Search Unity

Using Ads with AR Foundation

Discussion in 'AR' started by DrSharky, Nov 26, 2019.

  1. DrSharky


    Dec 7, 2016
    I am creating a game using the newest preview packages of AR Foundation (preview.1 - 3.1.0 at time of writing). Also I am creating with Unity version 2019.2.0f1.

    So I've incorporated ads into this game, but sometimes when using a full video advertisement, the game seems to lose the tracking in the background, and objects will be placed in a different location than before when returning to the game.
    Are there best practices to avoiding this issue? Whenever I search for AR + Advertisements, I get results about advertisements that use AR, and I can't find any useful information.

    The game uses a plane manager to detect the floor, then by using touch I'm attaching an ARAnchor on the detected plane on the floor. Once that's confirmed, the user places 2 other objects that should stay in place, using the anchor point as a reference for position.

    I'm wondering if I should be doing something like deactivating the AR Session, then re-activating when the ad closes, or is there a setting that keeps the tracking active in the background that I'm not aware of, or am I just plain wrong about whether it would lose tracking due to an ad?
    Thanks in advance for any insight/help.