Search Unity

Pink Scene in Editor and Blue Scene on Device

Discussion in 'Addressables' started by David_CGA, Feb 18, 2020.

  1. David_CGA

    David_CGA

    Joined:
    Apr 27, 2018
    Posts:
    7
    I am trying to use the addressables system for mostly scene loading and some loading seperate prefabs
    I have tried to test the game in editor and scenes are just loading in pink, I saw something saying that the assets need to be built for the editor platform but I couln't find how to build bundles for the editor platform (windows) and not just for the target platform (Android)

    Loading scenes for the first time work fine on the device but trying to reload that scene is just seen as a blue screen

    Here is an image of the Editor scene when trying to load the scene first try


    Screenshot of the android device when loading the same scene for the second time
    https://i.imgur.com/ama0xXr.png


    Screenshot of loading the same scene for the first time (this is how it should look)


    Link to the album of photos: https://imgur.com/a/n3kgS9t
     
  2. David_CGA

    David_CGA

    Joined:
    Apr 27, 2018
    Posts:
    7

    Image of the second attempt at loading the same scene on device (Android) and only getting a bluescreen and no error in the log
     
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    The Addressables system builds content based on your active build target. So in the Build Settings window if you set your build target to Android, then build your Addressable player content, then build your Android Player you should have the correct setup of built bundles for Android.

    If you want to test bundles in the editor (instead of using AssetDatabase mode or Simulate bundles mode) you'll have to switch your active build target to Window/OSX Standalone then do another Addressables player content build. Just as a note, this won't override your build Android data so it's not like you'll have to re-build all that from scratch.

    However, if you're testing in the editor be sure you re-build your Addressables player content for your desired platform before building the player for that platform (in your case: Android).
     
  4. David_CGA

    David_CGA

    Joined:
    Apr 27, 2018
    Posts:
    7
    I have changed the target plaform to windows standalone64 and built the bundles and I can now play the game in the editor
    After it working I tried to move back to android as the target platform and play the game in editor but the scene is still loading in as purple

    I found out the blue screen on mobile is being caused by the PostProcess v2 but it wasn't happening when I wasn't using the addressables system to load scenes.
    If I disabled the post process layer component the camera works normally


    I was using 2019.2.19f1 but I'm updating to 2019.3 to see if there are any differences in the issues.

    With creating the addressable bundles would it be possible to always stay in the Android build target but then have an addressable profile for building for editor and another for building for the target device/platform?

    Thanks David :)
     
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    At the moment there's nothing that ties Addressable profiles to the build target but that's an interesting thought. I'll bring that up.

    Thanks for letting me know that was a PostProcess v2 issue. I was actually unaware of any such problems and was very confused about the solid blue screen.

    Happy to help!