#Can you share a nice resource on worlds, sub-scenes and normal scene structures?

1 messages · Page 1 of 1 (latest)

small goblet
#

New to Dots

The general working logic of the scene system in the normal flow of Unity was fixed and simple (additive, single async operations etc) on this side, I still can't quite get the structures in my head, there are too many structures other than scenes.

What are worlds and what do they do ?
Can I create entities for normal scenes without subscenes ?
Are two different worlds created under each subscene I load ?

The system I want to create is as follows, I have an empty preloader scene and the necessary scenes are pulled from an SO kept as SceneAssetReference, call the scene and then call the necessary entities, bake operations are completed and the flow starts, how can I do this and when I do this, where are the worlds in this ?

deft aurora
#

A World is just a collection of Systems and Entities

#

Generally most games will have 1 world unless you're multiplayer in which case you might have 2 (Client and Server) ^ᵀᵉᶜʰⁿᶦᶜᵃˡˡʸ ᵗʰᵉʳᵉ ᵃʳᵉ ᵃ ᶜᵒᵘᵖˡᵉ ᵒᶠ ᵒᵗʰᵉʳ ʷᵒʳˡᵈˢ ᵐᵃⁿᵃᵍᵉᵈ ᵇʸ ᵉⁿᵗᶦᵗᶦᵉˢ ᶠᵒʳ ˡᵒᵃᵈᶦⁿᵍ ᵃˢˢᵉᵗˢ ᵇᵘᵗ ʷᵉ ᶜᵃⁿ ᶦᵍⁿᵒʳᵉ ᵗʰᶦˢ

#

SubScenes are just a giant blob of entities that can be loaded into a world

#

You can load them into 1 world or multiple worlds, or if you really want the same world multiple times

#

You canload them through subscenes or create them at runtime, those are basically your 2 options but loading through subscenes is the better approach unless you simply can't

small goblet
#

Can I create a world with manual apparouch, I want to handle most things manually and see how it works one by one.

We are currently trying to develop a project with NetCodeEntities, at the beginning we thought that we should try to write something after solving ECS systems, but since most of the structures will have to change later, we started this way from the beginning, can you have any advice here?

At the same time, I started to see the concepts of managed - unmanaged quite a lot, is the difference between the two ECS compatible or not?

deft aurora
#

Can I create a world with manual apparouch, I want to handle most things manually and see how it works one by one.
yes
var world = new World("Name"); all you need
it will not have any systems by default

#

if you want to create the primary world you can turn off automatic bootstrap with
UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD

#

look at
AutomaticWorldBootstrap
to see how the default world is setup with systems

#

DefaultWorldInitialization.Initialize("Default World", false);

small goblet
#

I was tried that world and i can see the world in editor section in list but when i add a system in that world i cant see any log the system that i added ( i put a debug line on OnUpdateSystem)

deft aurora
#

adding systems to a world manually is not recommended

#

there's a lot more that goes on that just add

#

you have to add it to a system group, order it, etc

#

highly recommend just controlling all this with the built in approach of implementing a custom ICustomBootstrap

small goblet
#

I understand that I have a lot more to learn 😄
Isn't mega city the most comprehensive 1.0 sample I can get right now?

deft aurora
#

ah yeah likely