#[edit] Trying to load subscenes in a build with Content Management

1 messages · Page 1 of 1 (latest)

cold abyss
#

I'm trying to have a unit spawner system where the possible spawnable unit can be stored externally so that future game updates would be quick to download

#

(and to be able to actually push it into servers, some stores having a strict limitation for patches sizes)

#

If I try to call

sceneData.ValueRO.scene.LoadAsync(new Unity.Loading.ContentSceneParameters()
{
    loadSceneMode = UnityEngine.SceneManagement.LoadSceneMode.Additive
});

The loaded scene doesn't seem to have its content baked

#

So I'm trying to do something with SceneSystem.LoadSceneAsync but this one requires a EntitySceneReference which should be constructed with an already loaded SceneAsset

So: how can we load a WeakObjectSceneReference without actually loading it into the scene/world just to have a reference we may give EntitySceneReference so we can properly load it ?

Yeah.. I don't think it would work, but I don't know ^^'

vocal lava
#

WeakObjectSceneReference is a normal scene reference

#

you can only load game object with it

#

for entities you must use EntitySceneReference

#

or as alternative - you can ensure it's inside the build otherwise

#

and load via guid

cold abyss
#

can EntitySceneReference be loaded from a file that's outside the build ?

#

and what is the subscene section index ?

vocal lava
vocal lava
#

can be useful for unloading interiors and etc

cold abyss
#

so I guess 0 would be the default

vocal lava
#

yeah, by default it's just 1 section

cold abyss
#

Is what I'm trying to achieve possible ?

#

I mean: having scenes / entities using authoring/baker loaded from a content management system (which would be built apart from the rest of the build, like the addressables)

vocal lava
#

yes, there is a page in manual about it

cold abyss
vocal lava
#

that is within build

cold abyss
#

Yeah, but we are talking about baked scenes that produces entities

#

I'll try the script tomorrow, though, to see

vocal lava
cold abyss
#

You said "this is about loading game object scene", so I thought you meant scenes that has gameObjects (and no entities)

vocal lava
#

this is what your link is about

cold abyss
#

oh

#

okay

#

yeah, indeed, I though you were talking about your link; I'm getting tired (end of the day ^^')

cold abyss
#

alright, let's try this

#

This doesn't explain how a content-managed entity-(sub)scene is to be loaded.
The script doesn't work on editor, but 'works' on build, 'works' as "goes to the next scene".

I continue digging :p

#

Oh, just studied the ContentUpdateMenuItem, I can add disabled scenes

cold abyss
#

I have something that works in the editor but not in build

#

Scene 0: Has an empty scene with a script that does like in the docs:

#if ENABLE_CONTENT_DELIVERY && !UNITY_EDITOR
        ContentDeliveryGlobalState.Initialize(remoteUrlRoot.Replace('\\', '/'), Application.persistentDataPath + "/content-cache", initialContentSet, s =>
        {
            if (s >= ContentDeliveryGlobalState.ContentUpdateState.ContentReady)
                LoadMainScene();
        });
#else
        LoadMainScene();
#endif

This loads the next scene

#

In the next scene, I have a simple subscene with the 'other-subscene-loader'

#

That has an authority with an array of EntitySceneReference, creating as many entities with a component containing a scene ref each

#
public class SpawnersCreatorAuthoring : MonoBehaviour
{
    public EntitySceneReference[] scenesGuid;

    class SceneRefSampleBaker : Baker<SpawnersCreatorAuthoring>
    {
        public override void Bake(SpawnersCreatorAuthoring authoring)
        {
            //var entity = GetEntity(TransformUsageFlags.Dynamic);

            foreach (EntitySceneReference sceneRef in authoring.scenesGuid)
            {
                var sceneEntity = this.CreateAdditionalEntity(TransformUsageFlags.None);

                AddComponent(sceneEntity, new SpawnersCreatorComponent
                {
                    sceneRef = sceneRef
                });
            }

        }
    }
}
#

Then the system loads them:

public void OnUpdate(ref SystemState state)
{
    foreach (var sceneData in SystemAPI.Query<RefRW<SpawnersCreatorComponent>>())
    {
        if (sceneData.ValueRO.startedLoad == false)
        {                
            SceneSystem.LoadSceneAsync(state.WorldUnmanaged, sceneData.ValueRO.sceneRef, new SceneSystem.LoadParameters
            {
                Flags = SceneLoadFlags.NewInstance
            });

            sceneData.ValueRW.startedLoad = true;
        }

    }
}
#

I'll add a cube and a sphere to know what's loaded / not loaded

#

oh.. even the first subscene hasn't been loaded o.O

#

should have added those primitives earlier >.<'

#

no error in logs

#

Actually, can't we create entities from monobehaviour without using Baking ? I just need an entry point, a "main()" ^^'

vocal lava
#

basically recreation of baking

cold abyss
#

Yup, I did this, build in progress 🙂

#
public class LoadSubScene : MonoBehaviour
{
    [SerializeField] private EntitySceneReference[] scenesGuid;
    void Start()
    {
        EntityManager manager = World.DefaultGameObjectInjectionWorld.EntityManager;

        foreach (EntitySceneReference sceneRef in scenesGuid)
        {
            Entity e = manager.CreateEntity(new ComponentType(typeof(SpawnersCreatorComponent)));
            manager.SetComponentData(e, new SpawnersCreatorComponent { 
                sceneRef = sceneRef 
            });
        }
        
    }
}
#

I deleted the authoring that was basically doing this job before

#

:/ now I have a black screen
.....and a crisis on another project; I must pause this :/
I'll try later 🙂

vocal lava
#

you'll have to recreate thousands lines of code

#

and if you need physics or graphics...

#

oh well

#

this is like the biggest black box of entities packages

#

even with all source code available, trying to understand it might kill people 🤣

cold abyss
#

I have some "Doliprane" right next to me, I'm fully prepared xD

#

(estimation of death: a week)

vocal lava
#

and you're only one

#

(i think)

cold abyss
#

yeah this will be a complicated war xD

#

but I'm not alone, we are two (in my company).. erm.. well okay, we can't win xD

vocal lava
#

anyways

#

just figure how content management works over web

#

and you're suited

#

I also would love to know how it works tbh

cold abyss
#

another guy on a forum just posted this:

private IEnumerator LoadSubScene()
{
     yield return null;
     var world = World.DefaultGameObjectInjectionWorld.Unmanaged;
     var meta = SceneSystem.LoadSceneAsync(world, subScene.SceneGUID, new SceneSystem.LoadParameters {Flags = SceneLoadFlags.NewInstance});
     while (!SceneSystem.IsSceneLoaded(world, meta))
     {
         yield return null;
     }
}

#

so I'll retry the authoring approach, didn't know SceneSystem could be called from a MonoBehaviour x)

#

but.. this is weird: it worked in the editor, so maybe it's just that the content wasn't actually loaded

#

so I'm pretty sure I'll get the same result

#

Weird, I have black screens now even if I remove my scripts (from the scenes).. something killed the project somehow.. I'll remove the Library folder I guess

#

STATE => NoContentAvailable

#

maybe this comes from the fact that I don't have anymore subscene in a scene in the project :/

cold abyss
#

Alright, so removing Library + Adding an empty subscene removes the black screen.

#

Haven't tested the last test I mentioned (trusting you)

#

I get some logs :

Loading E:/Projects/(...)/TestDots/ContentBuild-RemoteContent
STATE => DownloadingCatalogInfo
STATE => UsingContentFromStreamingAssets
Loading main scene
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 0.214600 ms
Unloading 4 unused Assets to reduce memory usage. Loaded Objects now: 1829.
Total: 1.596500 ms (FindLiveObjects: 0.088900 ms CreateObjectMapping: 0.032800 ms MarkObjects: 1.461700 ms  DeleteObjects: 0.013000 ms)

Could not open file E:/Projects/(...)/TestDots/Builds/TestDots_Data/StreamingAssets/EntityScenes/d7b4c21b291cb9c4e9ac6f486d41a748.entityheader for read
Loading Entity Scene failed because the entity header file couldn't be resolved: guid=d7b4c21b291cb9c4e9ac6f486d41a748.```
#

So.. it's trying to load things from StreamingAssets.... which is empty

#

so, I'll try to populate it

#

..Actually, the StreamingAssets is automatically populated when building

#

..but it seems it only contains what was setted as subscenes in builded scenes.

#

Which would mean I need a scene referencing every subscene I wish to build

#

The black screen occured because I had no folder generated when no subscene was added in any scene (my first scene is black (no camera))

#

_
Alright.. every thing seems to be setted, but my subscene isn't loaded

#

Maybe because I need the scene I want to load my scene to have an empty subscene too?

#

Nope..

#

Not even my empty subscene that has its reference in the mainscene is loaded..

#

(in build)

#

even though it works on editor

vocal lava
vocal lava
#

or baked via EntitySceneReference (which gets included in subscene above) will be included

cold abyss
#
Loading Entity Scene failed because the entity header file couldn't be resolved: guid=d7b4c21b291cb9c4e9ac6f486d41a748.```
^ This error doesn't pop anymore, but nothing happen
vocal lava
#

Is it possible to add new files to StreamingAssets in runtime?

vocal lava
cold abyss
#

When I just reference a scene by using an EntitySceneReference, then the scene isn't created in the StreamingAssets on build

vocal lava
#

it must be part of subscene that gets included already

cold abyss
#

oh okay

#

no, I wasn't doing that

vocal lava
#

anyways, after you build your content bundle you probably have a baked subscene assets somewhere

#

I think this needs to be sent somehow

#

and what I'm not sure about - how Unity loads it into streaming assets

cold abyss
#

I don't know why when I build RemoteContent, it still uses StreamingAssets ?

vocal lava
cold abyss
#

So I have

  • RemoteContent (in local file system)
  • Load it in cache in Persistant Data path
  • But actually use something in StreamingAssets

What was weird is that even so I created a catalog myself by using the scenes I wanted, it was as if it didn't care about it.
It was still trying to access the StreamingAssets content made by building

#

I have the ENABLE_CONTENT_DELIVERY define symbol

#

_

Maybe, it has in StreamingAssets the initial wanted catalog. if an update is required, downloads it in cache then overwrite the streaming assets (that would make sense)
but since my remote catalog is supposed to be different...

#

_

In the docs they use RemoteContentCatalogBuildUtility.BuildContent but I see with intellisense that there is a ContentArchivesBuildUtility.BuildContentArchives
I'll look into that

cold abyss
#

[edit] Trying to load subscenes in a build

#

[edit] Trying to load subscenes in a build with Content Management

cold abyss
# vocal lava you absolutely shouldn't

maybe a phrased it weirdly; I didn't mean to call it from an authoring monobehaviour - but - to have a classic monobehaviour calling a subscene through SceneSystem; subscene that would call the other subscenes as I wanted

#

well.. same result..

vocal lava
#

injection of monob into ECS worlds is awful

cold abyss
cold abyss
vocal lava
cold abyss
#

It's just loading an ECS scene from a GameObject scene (as 'NewInstance', which I believe is to make a subscene) ?

#
using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Entities.Serialization;
using Unity.Scenes;
using UnityEngine;


[WorldSystemFilter(WorldSystemFilterFlags.Default | WorldSystemFilterFlags.Editor)]
[UpdateInGroup(typeof(PresentationSystemGroup))]
public partial struct SpawnersCreatorSystem : ISystem
{
    public void OnCreate(ref SystemState state) { }
    public void OnUpdate(ref SystemState state)
    {

        foreach (var sceneData in SystemAPI.Query<RefRW<SpawnersCreatorComponent>>())
        {
            Debug.Log("SpawnersCreatorSystem - detected sceneData");
            if (sceneData.ValueRO.startedLoad == false)
            {
                Debug.Log("SpawnersCreatorSystem starts load");
                sceneData.ValueRW.loaderEntity = SceneSystem.LoadSceneAsync(state.WorldUnmanaged, sceneData.ValueRO.sceneRef, new SceneSystem.LoadParameters
                {
                    Flags = SceneLoadFlags.NewInstance
                });

                
                sceneData.ValueRW.startedLoad = true;
            }
            else
            {
                var loadState = SceneSystem.GetSceneStreamingState(state.WorldUnmanaged, sceneData.ValueRO.loaderEntity);
                Debug.Log(loadState);
                sceneData.ValueRW.loadState = loadState;
            }

        }
    }
    public void OnDestroy(ref SystemState state) { }
}

I believe this script does the same thing ?

#

Let's try to create a World instead of trying to get one

#

I edited the script to get an idea of the loading state.

#

I get "Loading" every frame

vocal lava
#

mono behaviour runs in different loop

#

technically it's not a problem

#

for prototyping and testing

#

but when you start creating actual logic by injecting into default world

#

you are dooming yourself

#

😅

cold abyss
#

so.. ECS only works in Editor?

#

I really don't understand..

vocal lava
#

you just create your logic from within systems

#

not monobehaviours

#

or other logic entry points

cold abyss
#

That's the point: how can you have an ECS entry point if you can't load ECS logic ?

vocal lava
#

it creates world

#

either default, or you override with your own

#

everything else is from within systems

#

maybe with one exception - subscenes. They also inject into world

cold abyss
#

The last script I sent is supposed to load an ECS scene (subscene) from an ECS world, am I right ?

vocal lava
cold abyss
#

So gameobjects have nothing to do with it ?

vocal lava
#

as well as bursted

vocal lava
cold abyss
#

nope, gameobjects have nothing to do with it
or nope, gameobjects do have something to do with it ?

[^ compiler-like-brain-guy-here xD]

vocal lava
#

if you want to use game objects - you use them from within systems

#

not other way around

cold abyss
#

Oh, I understand what you mean.
Can you have UI, Input, Network, Audio in ECS ?

vocal lava
#

there is netcode for entities specifically

#

everything else you just use from within systems normally or via hybrid

cold abyss
#

I thought of having 'shadowed' components for the Hero (for example), a character with no renderer that's placed where the gameobject (which have renderers) is actually placed so that swarm-like-units (baked content) may attack him and avoid him.
Since my hero is unique and don't need to be an entity.
It actually work (in editor): what needs to be placed in ECS world is in ECS world concerning the hero, but the input intent is setted by monobehaviour and a system comes to set the value within a component so that other systems may work with it.

vocal lava
#

if you want to have ECS - you have everything in ECS

cold abyss
#

I don't understand why, though ?

vocal lava
#

how are you going to sync game objects with entities then?

#

entity physics have nothing to do with game object physics

#

it would be as if you are trying to synchronize two different games with each other

cold abyss
#

the game won't have physics

#

it's an RTS

vocal lava
#

that doesn't matter

#

target detection, anything

#

either you use ECS for everything, or you use ECS as particle system, nothing more

cold abyss
#

as I said, The unique units (a boss or the hero) will have it's data queried from an entity then, everything is entity handled
yes, it feels as doing network within the game; exactly the same as when playing with native code sometimes.

#

but that's not a big issue, we just need to avoid having a lot of transactions points

vocal lava
#

👴

#

and for each transaction point you'll have tons of bolierplate

#

while you can have non if everything is entity

cold abyss
#

it's one or two per frame max (made by me*)

vocal lava
#

eh, just give it a try

#

😅

#

hopefully you don't have any production deadlines

cold abyss
#

for now, I'm in a kind of R&D phase

#

we are not sure to use ECS yet

#

but I thought it would be a good idea if we have tons of units

vocal lava
#

ECS is generally better than OOP for simulation type of games

#

architecture makes it so much easier to work with

#

especially if your project doesn't have stricktly defined specifications

cold abyss
#

so knowing the limits is the point, and if we should have the whole game in ECS, knowing that we must prepare for multi platform and so on..
having OOP is not really an option to us

#

If what you say is true, then we should abandon ECS.
I'm a little optimistic and want to try a little prototype before reaching a conclusion

cold abyss
#

since we have presented the project to people to get funds ^^

#

(funds for a prototype / proof of concept)

vocal lava
cold abyss
vocal lava
#

I mean if you don't know exactly how your project codebase should look to handle all edge cases - OOP code can be really tricky

#

here's example:

  1. Fantasy game. Designer asked to make weapons: ice sword, fire sword.
  2. Developper made a design: Weapon abstract class. Sword inherits. FireSword and IceSword classes inheirit.
  3. Then designer asked for Fire and Ice Sword simultaniously.
  4. Developper had to rework his system/Duplicate fire/ice logic.
cold abyss
#

depends, at your example, I'm not sure I will do the Fire/Ice sword classes
depends on what they do. If they induce an effect, I would do an EffectInducingWeapon or maybe an array of WeaponEffects

vocal lava
#

this is a silly example

#

but I think many OOP developpers have encountered similiar case in their career

cold abyss
#

yeah, I know, but I think having to duplicate code is very rare

#

Personnaly I prefer to rewire things a little bit

vocal lava
#

anyway

#

point is - in ECS it's impossible alltogether

#

there is no inheritance

cold abyss
#

you can emulate inheritance by having components that don't exist without their base

#

CharacterComponent
UniqueCharacterComponent
HeroComponent

vocal lava
#

yeah, different logic is achieved via composition

#

it's not inheritance though

cold abyss
#

yes, that's correct

vocal lava
#

unless I don't understand your example correctly

cold abyss
#

I think you were saying all this to state that the parodigms are so different we shouldn't use them in parallel.
In that regards, I disagree, we can adapt so that the classes that are supposed to communicate reflect each other well and have their own jurisdiction.
For example, if health is managed by ECS, no damage should occur outside ECS world.
Or if movement is managed by ECS, then all movement should occur within ECS. But some parameters (wantedDirection, wantedOrientation) for this movement can be queried from gameObjects if the unit is unique.

vocal lava
#

but then if you try to have UI code modify ECS world via callbacks... oh well

#

good luck debugging and refactoring that, once you have a big codebase

cold abyss
#

No, that won't happen.
I see that as two ships at see looking at each other with a telescope x)

vocal lava
cold abyss
#

and if one or two frames are inexact, that shouldn't pose problem

vocal lava
#

assuming units are entities

cold abyss
#

hero is GO, have some of its logic in ECS, and it's brain "intents" in Go

vocal lava
#

yeah, that sounds awful

cold abyss
#

Pratical example: if we build a game for Switch. Switch asks us to use its OOP classes (mandatory).
In that case, should ECS be complely ignored?

vocal lava
#

huh?

#

if you're talking about some specific API - that has no relation to game logic

cold abyss
#

for example; a pause menu should pause everything, ECS systems too

vocal lava
#

I worked on quest 2 project, which also has some very specific VR API, but it's realtion to game logic is 0, because it's literally just about passing input/rendering stuff

vocal lava
cold abyss
#

input is quite related to gameplay since it's a part of gameplay parameters

vocal lava
#

input is just data

#

struct with values

cold abyss
#

yeah, that's basically what I meant by brain intents

vocal lava
#

if you talk about callbacks for buttons

#

so it calls some game logic stuff - bad idea

cold abyss
#

In my case: in which direction should my hero go
In your case: where should my hands/head be, which buttons are pushed

vocal lava
#

all of this is just a struct with values though

#

input system reads it before simulation

#

and then other systems access it via component

cold abyss
#

no, no, I won't do callbacks

#

and only ECS knows GO, not the other way around

#

so that it writes/read data (without calling anything)

vocal lava
#

well, ECS is fine calling something

cold abyss
#

Then, there will be callbacks in OOP but that won't be called from ECS, only from the update of the Go when it will check the data

vocal lava
#

OOP calling ECS is not

cold abyss
#

yup, I saw that 😄

vocal lava
#

yeah, I see what you mean - it's partially forced on us, for using stuff like particle systems

#

as we rely on it's own update

#

but in general, my opinion is that absolutely all source of logic should be from within systems

#

because this way you have absolute control over execution order

#

and you can put any specific logic to update between any data flow you need

#

while with monob updates - you are forced to update before simulation

#

and after initialization group

#

besides

#

monob updates are slower

#

due to native->managed->native interop

cold abyss
#

My Swarm-like-units are completely handled in ECS: there no question about it

#

The only data that may be passed is some counters (such as the remaining units count)

#

so having slow gameobject is fine since there won't be a lot of them

#

(ui, camera, hero, boss, buildings (visuals) + ui 'plugins')

#

__

But to even try doing that I must manage to have a bootstrap xD

#

which at this time doesn't work yet xD

#

ok bootstrap being an ECS concept, this was wrongly phrased

#

I want my ECS baked content to be loaded in the ECS world x)

vocal lava
#

your swarm like units have hp, right? Your boss doesn't?

#

your units move. your boss doesn't?

cold abyss
#

They have shadowed ECS components

#

no duplicates

vocal lava
#

and what's the reason for that even?

#

why not just all of it within ECS

cold abyss
#

complicated animations can be a reason

vocal lava
#

so you don't have to sync between go and entities at all

#

there is hybrid for that

cold abyss
#

yeah, rukhanka

vocal lava
#

no

#

it's pure ecs

#

I talk about hybrid

#

when your entity contains reference to skinned mesh go prefab

#

system manages it's instantiation

#

and passing entity component data to animator parameters

#

as well as transform

#

different systems do that in fact

#

as wlel as disposal of go when entity is destroyed

#

one way interaction ECS -> GO

cold abyss
#

For now I thought of having units are two separated elements is basically because things might be asked, which I don't know of yet.
I could have a scenario of events (currently managed by OOP) that asks a boss to do some things

#

x)

#

Moreover programming in ECS is quite difficult, the R&D I'm doing actually proves it: I can't do a thing I do in 2s in OOP : loading a scene.
I had previously issues to spawn a unit, and everything we must do in ECS must be redone often (well.. we take plugins, but ^^)

#

so having a part of OOP programming is confortable

#

What MUST be done in ECS will be done in ECS, as for the rest.. I prefer staying where I know things (for me and the whole team)

#

because, we keep getting stuck otherwise, and as you said: deadlines

#

If being ready to be productive in ECS was faster, this would have been a no brainer I guess

#

but even hybrid animations were giving weird results : the rig have additional development constraints otherwise some skinned mesh just don't work, that means graphists must be extra vigilant.
So I prefer them to be vigilant only for units they need to be vigilant

vocal lava
vocal lava
#

Rukhanka != hybrid

cold abyss
#

^ this

vocal lava
#

That's just assembly name he used similiarly to how Unity named their baking assembly

cold abyss
#

Well, I use that on baked characters and it works

vocal lava
#

Hybrid is known as a way to have classic unity game object do something, while controlled by entities

#

so for example: instantiating particle systems GO prefabs from within entities

#

or having game object animations for skinned meshes

cold abyss
vocal lava
#

Rukhanka is not hybrid

#

it's pure ECS animations

cold abyss
#

the way I see it : it's a wrapper so that their pure ECS can work with baked gameobjects

vocal lava
#

game objects are just authoring data

cold abyss
#

sorry baked entities (from go authoring)

vocal lava
#

in baking all it's data read to create unmanaged animation data

#

after you build your project - there won't be anything left of authoring game object

cold abyss
#

yeah, I understood that

vocal lava
#

hybrid is different; it's using game objects in runtime

#

it bakes game object prefab isntead of unmanaged data

cold abyss
#

oh ?

vocal lava
#

and then instantiates game object and controls it

cold abyss
#

I thought Hybrid == using Baker+Authoring

vocal lava
#

public class MyHybridPrefab : IComponentData { public GameObject prefab; }

vocal lava
#

that's just authoring

cold abyss
#

ooh

#

okay

vocal lava
#

Hybrid is a word used to describe hybrid between classic Unity (game objects) and DOTS (entities)

#

Managed components used to be called Hybrid components even

cold abyss
#

The chicken I have is a prefab.
This prefab is referenced by an authoring gameobject (using 'GetEntity' on the GameObject Prefab)
And then the chicken is spawned from a system, by using an ECB.

The prefab is what's containing what I shared. (#1154077489774202971 message)
Is that Hybrid or not at all ?

cold abyss
#

oh, but I'm not sure this is a runtime gameobject since it might have been baked when the authoring was

vocal lava
#

hybrid is when you bake a game object reference with VFXGraph

#

game object prefab*

#

and then isntantiate it in runtime using Object.Instantiate to playback VFX

#

but all that code is called from within entities systems

#

based on entity simulation

cold abyss
#

Okay, so Rukhanka called Hybrid what was just Authoring

vocal lava
#

it's just Unity naming convention

#

they called baking assembly Hybrid for some reason

cold abyss
#

Because ProjectDawn (agents navigation, local avoidance) did the same thing.
So Unity called Hybrid, the authoring baking assembly
Do unity also call hybrid what you call hybrid ? So that I won't lose myself in the docs ^^'

vocal lava
#

Records a command to add a hybrid component and set its value for all entities matching a query.

cold abyss
vocal lava
#

just an example. Hybrid is used for a lot of stuff which has no alternative in ECS

#

audio for example

cold abyss
vocal lava
#

Entities Graphics has it's own as well

#

if you try to bake Light

#

it will be baked as hybrid

#

so, it's literally going to be a game object hidden in hierarchy, fully managed by Entities.Graphics code

#

or SpriteRenderer

#

there are a bunch of hybrid they do

cold abyss
#

ooh! You mean managed entities ?

cold abyss
#

I'm on Unity 2022.3, entities package 1.0.11

#

"The Entities Graphics Package replaces the Hybrid Renderer Package." oh right

vocal lava
cold abyss
#

I'll try compiling the samples.. and then tweak it to try to be on the same level
I'm getting nowhere right now :/

vocal lava
#

use bursted jobs

#

if don't want/don't have time to learn ECS - best to just avoid it alltogether, until such opportunity occurs

#

Simply using data oriented patterns within game objects + jobs and burst can achieve equally same or even better boosts than pseudo GO-authoritative hybrid

rancid atlas
#

Moreover programming in ECS is quite difficult, the R&D I'm doing actually proves it: I can't do a thing I do in 2s in OOP
I can also say that about the time I learned OOP with a procedural programming mindset. It was hard to reason about object relationships and interactions. I think it's really just the matter of time and practicing. But as Issue said, if you don't have time, then avoid it altogether or you'll have a mess hard to fix later on.

cold abyss
#

It's more about the whole company than me.
If I can do it alone, then it's fine to take the time; but that means just a part of the project must be ECS. Not the whole program

__

#

I tried building the samples (Entities sample, the Streaming part), but it doesn't compile with 2022.3.6f1 :/
https://github.com/Unity-Technologies/EntityComponentSystemSamples

Do you know of a buildable sample for ECS Streaming I can test?
Everything seems to be done for Editor ^^'

Edit: deleted everything except for the folder "Streaming/RuntimeContentManagement" and "SceneDependencyCache" + "Settings"
a build can be done, and things are scrolling, now: it's study time 🙂

cold abyss
#

ECS reasoning isn't that complicated

cold abyss
#

..this is weird.. in the samples, the subscenes seems to be loaded automatically.
this isn't what happens with my own project..

cold abyss
#

Nice! 🙂
So the sample doesn't work once we add the define symbol "ENABLE_CONTENT_DELIVERY"
Now I need to make it work again with the first scene

#

It doesn't work with the first load scene 🙂

#

So the issue comes from the define symbol, not the way I load scenes

#

_

I'll try to load the gameobject scene that contains the subscene through this:

#

Maybe that will work

cold abyss
#

even trying without subscene, with a SystemBase to load once the ContentDeliveryGlobalState.Initialize callbacks sets a singleton boolean..
can't load the first scene this way.. ..even in the sample

#

well. budget asks me to stop researching on that front. I'll need to develop other aspects of the prototype, I flagged a warning on the content management system on our end.
So I'll close the topic for now