#Manually enabled subscene editing after using SceneManager.LoadScene() causes an error

1 messages · Page 1 of 1 (latest)

toxic lava
#

So it's line 336 of LiveConversionConnection.cs

Not sure if it's that important but when my game is running and I load the DOTS scene, It floods my console with this error if I tick the box next to the subscene to enable it

#

Am I supposed to be loading the scene a different way?

daring atlas
#

absolutely unclear what you are doing at all, needs far more details than that

toxic lava
#

Okay so I'm in a scene, I press a key which loads a new scene which has the dots subscene in it

And the subscene is inactive so I click to activate it in the editor and it turns from closed to live converted

#

Now it seems if I end playmode after doing that, it floods the console with that argumentexception

fiery escarp
#

Press a key in the editor or at runtime?

toxic lava
#

runtime

fiery escarp
#

You shouldn’t enable it during runtime

toxic lava
#

I have "D" bound to the scenemanger.loadscene

fiery escarp
#

You should set the sub scene as auto load

#

And keep it closed in the editor

#

It should automatically load when you load the scene

toxic lava
#

In the sub scene script?

fiery escarp
#

Yeah

toxic lava
#

So this is what I get when I start from inside that scene

#

If I load using the scenemanager it gives me this

#

And it's wrong

daring atlas
#

feel free to load via guid

#

but to load subscenes

#

you must use different api

#

SceneSystem to be precise

toxic lava
#

So I need to load the scene using the SceneSystem.LoadSceneAsync for the SubScene to work?

daring atlas
#

yes

#

for some context: subscenes and scenes are different. SubScene is entity data, Scene is game object data.
By using normal API you load gameobject scene, by using ECS API you load subscene.
Both would work in Editor, but not in build.

toxic lava
#

For build do I use both then or just the ECS one?

#

the docs just says it loads a scene

#

Param it says is a EntitySceneReference though

daring atlas
#

you always use ECS one

#

authoring scene is not meant to make it into build