Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

GameObjects set to DontDestroyOnLoad not rendering in preview 27

Discussion in 'Data Oriented Technology Stack' started by Shii, Mar 10, 2019.

  1. Shii

    Shii

    Joined:
    Nov 23, 2014
    Posts:
    11
    It was working in 0.0.12-preview.24 but broken in preview.26 and preview.27.
    Bug or not implemented yet? Any workaround to make this work in 0.0.12-preview.27?
    dontdestroy.png
     
  2. Josh4364

    Josh4364

    Joined:
    Aug 11, 2017
    Posts:
    24
    Oh hey was about to make a bug report for this. Also found out having the newest package prevents maps with lightmaps from rendering at all, camera in DontDestroyInLoad world as well
     
  3. Creepgin

    Creepgin

    Joined:
    Dec 14, 2010
    Posts:
    297
    Can't test this right now, but it's possibly related to https://forum.unity.com/threads/bug-ecs-disables-drawmeshinstanced.641320/

    Temp workaround is to exclude SubSceneLiveLinkSystem via ICustomBootstrap:

    Code (CSharp):
    1. public class CustomBootstrap : ICustomBootstrap
    2. {
    3.     public List<Type> Initialize(List<Type> systems)
    4.     {
    5.         return systems.Where((t) => t.Name != "SubSceneLiveLinkSystem").ToList();
    6.     }
    7. }
     
  4. Josh4364

    Josh4364

    Joined:
    Aug 11, 2017
    Posts:
    24
    oooh wonderful, I'll test that out now. Didn't see ICustomBootstrap before now, that must be how you customize the startup auto creation systems (something that also changed on last version)
     
  5. Josh4364

    Josh4364

    Joined:
    Aug 11, 2017
    Posts:
    24
    Yep that did the trick, cameras inside of dontdestroyonload world now render everything, and maps baked with lightmaps work as well.
     
    Creepgin likes this.