Page 1 of 1

Restart scene error

Posted: Tue Dec 20, 2016 9:31 pm
by DarkcomWired
hi, i am using scene streamer in a large scene that i have split in small scenes.
when my character died, i have restart the base scene and occur this:

Code: Select all

[Singleton] Instance SceneStreamer already destroyed on application quit. Won't create again - returning null.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.SceneStreamer.SceneStreamer:get_instance() (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneStreamer.cs:96)
PixelCrushers.SceneStreamer.SceneStreamer:SetCurrentScene(String) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneStreamer.cs:364)
PixelCrushers.SceneStreamer.SceneEdge:SetCurrentScene() (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:62)
PixelCrushers.SceneStreamer.SceneEdge:CheckEdge(String) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:56)
PixelCrushers.SceneStreamer.SceneEdge:OnTriggerEnter(Collider) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:38)

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.SceneStreamer.SceneStreamer.SetCurrentScene (System.String sceneName) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneStreamer.cs:364)
PixelCrushers.SceneStreamer.SceneEdge.SetCurrentScene () (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:62)
PixelCrushers.SceneStreamer.SceneEdge.CheckEdge (System.String otherTag) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:56)
PixelCrushers.SceneStreamer.SceneEdge.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Pixel Crushers/Scene Streamer/Scripts/SceneEdge.cs:38)

And stop loading the scenes.

Is there any way to restart the scenes by avoiding this problem?

thanks

Re: Restart scene error

Posted: Tue Dec 20, 2016 11:17 pm
by Tony Li
Hi,

I confirmed the issue. I'll try to post an update here by the end of tomorrow.

Re: Restart scene error

Posted: Wed Dec 21, 2016 6:12 pm
by Tony Li
Hi,

This is the release candidate for version 1.22. It should fix the bug you reported.

SceneStreamer_1_22.unitypackage

Re: Restart scene error

Posted: Fri Dec 23, 2016 11:37 am
by DarkcomWired
thanks, :D

work perfectly, i am very happy.

But before that I found a small detail that will not affect performance.

Image

Scenes are duplicated each time my character passes through of the scene edges

Re: Restart scene error

Posted: Fri Dec 23, 2016 3:02 pm
by Tony Li
Hi,

Those are empty scene stubs. In the final release version of 1.22, I'll make sure they get cleaned up. This is due to the new SceneManagement system introduced in Unity 5.3.