Hi,
I'v setup your project like your example and work fine
Now I try to load scene by code but this not work, just SceneStreamer.SetCurrentScene("wld1lvl1sub1"); work's but it's not possible to used : SceneStreamer.IsSceneLoaded("wld1lvl1sub1");
Can you provide a simple example code to use this ?
Thanks
LoadScene() error
Re: LoadScene() error
Hi,
Use SceneStreamer.LoadScene():
The line above will load "wld1lvl1sub1" as the current scene. It will also load the correct number of neighbors (set this with SceneStreamer.maxNeighborDistance) and unload any neighbor scenes that are beyond maxNeighborDistance.
Use SceneStreamer.LoadScene():
Code: Select all
SceneStreamer.LoadScene("wld1lvl1sub1");
Last edited by Tony Li on Wed Jul 15, 2015 7:36 pm, edited 1 time in total.
Reason: Wrong method. It's LoadScene().
Reason: Wrong method. It's LoadScene().
Re: LoadScene() error
Hi Toni,
thanks for reply, i tried your code but :
error CS0120: An object reference is required to access non-static member `PixelCrushers.SceneStreamer.SceneStreamer.LoadCurrentScene(string)'
LoadCurrentScene not exist in SceneStreamer.cs
Thanks
thanks for reply, i tried your code but :
error CS0120: An object reference is required to access non-static member `PixelCrushers.SceneStreamer.SceneStreamer.LoadCurrentScene(string)'
LoadCurrentScene not exist in SceneStreamer.cs
Thanks
Re: LoadScene() error
[EDIT: Sorry, I was going from memory. It's not
it's
Code: Select all
FindObjectOfType<SceneStreamer>().LoadCurrentScene("wld1lvl1sub1"); //incorrect
Code: Select all
SceneStreamer.LoadScene("wld1lvl1sub1"); //correct
Last edited by Tony Li on Wed Jul 15, 2015 7:37 pm, edited 1 time in total.