• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ifeltdave · Nov 15, 2017 at 08:42 PM · iosaugmented reality

ARKit scene loading causes a flash / flicker

I'm using the ARKit plugin and can't seem to track down the cause of this one. I have a main menu scene that loads a gameplay scene. The gameplay scene features all of the ARKit stuff from the MultiARManager asset.

When testing builds on iPhones, we see a flashing / flicker during the transition between these two scenes. It doesn't happen every single time the scene is loaded, but happens consistently when launching the app for the first time, or after manually closing it and re-opening it.

I tried creating a transition that would cover the screen during this but it didn't work. That seems kind of hacky anyways. I'm hoping someone else can help shed some light on the issue.

Here is my code that loads the scene.

 IEnumerator LoadingSceneRealProgress(string sceneName) {
             //yield return new WaitForSeconds(0);
             _scene = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single);
             
             
             // disable scene activation while loading to prevent auto load
             _scene.allowSceneActivation = true;
 
             while (!_scene.isDone) {
                 //loadingProgbar.value = _scene.progress;
                 LoadProgressPercent = _scene.progress;
                 
                 if (_scene.progress >= LoadReadyPercent)
                 {
                     
                     LoadComplete = true;
                     if (_applicationManager != null)
                     {
                         ApplicationManager.OnSceneLoaded(_scene);
                     }
                     if (_simulationManager != null)
                     {
                         SimulationManager.OnSceneLoaded(_scene);
                     }
                     
                     
                 }
                 //Debug.Log(_scene.progress);
                 yield return null;
             }
         }
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ifeltdave · Nov 20, 2017 at 08:47 PM

Okay I believe I had fixed this by taking the following steps.

First I created a custom GameObject I called "ARCreator". This object has a script that references the MultiARController prefab, and also the ARKitRemoteController prefab for testing. It also refs the info text debug canvas, but that part isn't required.

Next, set your scene's camera background color to black for good measure. I am fading to black from my main menu so this may not be applicable for you.

On ARCreator object I use this script:

 public class ARCreator : MonoBehaviour
     {
 
         public static ARCreator Instance;
 
         public GameObject MultiARPrefab;
         public GameObject ARRemotePrefab;
         public Text InfoText;
     
         //
         void Awake()
         {
             Instance = this;
         }
         
         //
         public void Init ()
         {
             GameObject multiAR = Instantiate(MultiARPrefab, Vector3.zero, Quaternion.identity);
             multiAR.GetComponent<MultiARManager>().infoText = InfoText;
             Instantiate(ARRemotePrefab, Vector3.zero, Quaternion.identity);
         }
     }

And In my SimulationManager's Update method:

 //
         private void Update()
         {
             // Start the ARCreator
             // This delay exists to help resolve the screen flickering
             if (!_arInitialized && ARCreator.Instance != null)
             {
                 _arInitialized = true;
                 StartCoroutine(ARInitDelay());
             }
         }
         
         //
         IEnumerator ARInitDelay()
         {
             yield return new WaitForSeconds(1);
             ARCreator.Instance.Init();
         }

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by arturmandas · Nov 20, 2017 at 10:38 AM

Same thing here, I will try an inbetween scene with no camera.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ifeltdave · Nov 20, 2017 at 05:35 PM 0
Share

Thanks for the input, I think I'll give that a shot today.

Another thing I plan to try is simply delaying the initialization of the AR$$anonymous$$it stuff in the second scene. I have a sneaking suspicion that things are still firing up with activating the camera, computing the 3D camera, all at once.

I'll report back with the results, knowing someone else has the issue makes me wanna make sure we can mark this resolved for future users who might be googling for it.

avatar image
0

Answer by aledwa · May 09, 2018 at 08:01 AM

Hey there!

i have the same issue but the solution is not working. I am not using the MultiARManager Asset. I just have a startscene with a button to load the arkitscene. When loading arkitscene the flickering is there for about 1 second.

Does any other of the other ideas worked?

i have no idea how to fix..

Thanks a lot! Aljoscha

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by slow_izzm · May 19, 2018 at 06:32 PM

I have this same issue, but a little different scenario. I am starting my scene with artoolkit and detecting an image that disables artk and enables arkit, but when arkit enables I get the flicker. I believe I have narrowed it down to the arcameramanager ... I don't want to pay for image detection, this is why I have chosen artk over vuforia, artk is working great when it comes to image detection, but I prefer arkit when it comes to everything else atm. If anyone has any ensight/directon on this, it would be much appreciated.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

150 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why is my augmented reality app not working for ios? 0 Answers

World Space UI Falls Back With ArKit 1 Answer

What are the options for making AR mobile application for iOS/Android/Windows Phone? 0 Answers

Modify ARKit to use a Video Output instead of a Camera Output 0 Answers

Can I use unity UI image in the ARKIT ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges