Restart scene error

Announcements, support questions, and discussion for Scene Streamer.
Post Reply
DarkcomWired
Posts: 2
Joined: Tue Dec 20, 2016 9:19 pm

Restart scene error

Post 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
User avatar
Tony Li
Posts: 22083
Joined: Thu Jul 18, 2013 1:27 pm

Re: Restart scene error

Post by Tony Li »

Hi,

I confirmed the issue. I'll try to post an update here by the end of tomorrow.
User avatar
Tony Li
Posts: 22083
Joined: Thu Jul 18, 2013 1:27 pm

Re: Restart scene error

Post by Tony Li »

Hi,

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

SceneStreamer_1_22.unitypackage
DarkcomWired
Posts: 2
Joined: Tue Dec 20, 2016 9:19 pm

Re: Restart scene error

Post 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
User avatar
Tony Li
Posts: 22083
Joined: Thu Jul 18, 2013 1:27 pm

Re: Restart scene error

Post 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.
Post Reply