google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 400 forks source link

Texture ViewInARIcon.png should be optional shown when enabling ARCoreBackground #588

Open wmgappteam opened 5 years ago

wmgappteam commented 5 years ago

Cube Icon shows up on every enable of ARCoreBackground. It may be a feature, but would be nice if it is an optional one because not every application wants to have this icon when starting ARCore.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

  1. Use ARCore SDK for Unity 1.9.0 with Examples HelloAR scene
  2. Add script to scene which disables and enables the ARCoreBackgroundRenderer. Example script: add to scene, drag and drop ARCoreBackgroundRenderer in inspector.

` using UnityEngine; using System.Collections; using GoogleARCore;

public class EnableDisableLoop : MonoBehaviour { public ARCoreBackgroundRenderer arCoreBackgroundRend;

IEnumerator Start()
{
    while(true)
    {
        yield return new WaitForSeconds(1f);
        arCoreBackgroundRend.enabled = false;
        yield return new WaitForSeconds(1f);
        arCoreBackgroundRend.enabled = true;
    }
} 

} `

  1. Build scene to device. Note: OnEnable the ViewInARIcon.png shows up in the middle and fades out:

ViewInARIcon2

WORKAROUND

Replace the png ViewInARIcon with a transparent pixel (same name required because texture name is hardcoded in ARCoreBackgroundRenderer script). Not a "good" workaround... but fast

andorfermichael commented 5 years ago

I would also appreciate that.