Search Unity

GameObjects set to DontDestroyOnLoad not rendering in preview 27

Discussion in 'Graphics for ECS' started by Shii, Mar 10, 2019.

  1. Shii

    Shii

    Joined:
    Nov 23, 2014
    Posts:
    31
    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. June1111

    June1111

    Joined:
    Aug 11, 2017
    Posts:
    33
    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. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    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. June1111

    June1111

    Joined:
    Aug 11, 2017
    Posts:
    33
    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. June1111

    June1111

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