#archived-dots

1 messages ยท Page 194 of 1

light mason
#

So the new direction is no sub scenes ?

#

So we had ss but was removed

zenith wyvern
#

I wouldn't say that really...they just removed the need to use them to make a tiny project work

#

So you can use them if you want to and gain all the benefits, but it's not necessary just to get your project running

light mason
#

How do we work in the editor .. sorry for all the questions I feel like Iโ€™m missing something here

#

Ah ok

zenith wyvern
#

Well I can only speak for myself - I just use IConvertGameObjectToEntity scripts on everything in my scene - except the camera

#

And they just automagically get converted to entities when the project is built

light mason
#

How do I setup the build w sub scenes

zenith wyvern
#

I can't really help you there, I avoid subscenes like the plague personally, every time I tried to use them I just end up confused and frustrated

light mason
#

Ok no problem, your help is really appreciated

#

Ok seem like all you need to do is include your sub scene in the scene list for the build and you are good to go

zenith wyvern
#

Some kind of hierarchical solution like you described would be best imo. One way would be to chunk out your map then calculate the paths between chunks so you could first run astar on the chunk level, then eliminate all other chunks when you drill down to the per-tile level. I think there's still a chance you could get suboptimal paths that way but it should be a massive performance improvement

steel pike
#

alright

#

I'm just struggling a little with the in-between now

#

but I think I got a solution

steel pike
#

nvm I don't

hollow scroll
#

does anyone has hybrid renderer V2 with dots in unity 2020.2 working on android?

#

it's not rendering anything for me

honest plinth
#

@hollow scroll Have you added the scripting define in the android settings as well?

#

Also you need to be running vulkan, GLES is unsupported

hollow scroll
#

I did the define... not vulkan, will check that! thanks!

#

@honest plinth thanks you sir! that fixed the problem! ๐Ÿ˜„

deft stump
#

how... do i mix animation events with dots?

#

no wait.... there is a way, go hybrid

#

or is there a "DOTS" way to do it other than hybrid?

safe lintel
#

they arent implemented yet ๐Ÿฅฒ

deft stump
#

hahahahaha

#

I knew it

#

๐Ÿ˜ข

#

MARCH!? wow

#

welp time to work more on the backend

safe lintel
#

march is kinda soon in my mind lol

#

really hope not but given how slow its been im expecting it to be delayed

amber flicker
#

^ didn't say which year

#

wish I was joking ๐Ÿ˜ฌ

deft stump
#

noooooooo

#

not 2025!?

pliant pike
#

off topic question but is there a way to get back the pause button in the Editor UI on the latest version I don't understand why the removed it I used it quite a lot ๐Ÿ˜•

safe lintel
#

must be a bug but you can use the hotkeys for it

#

afaik it still shows in the edit menu so assuming its a bug

dull siren
#

If I am putting my jobs in an array and executing CompleteAll, how do I get my output values?

coarse turtle
#

how are you writing the data?

#

typically you would write back to a NativeContainer

#

and access the NativeContainer

#

ofc it also depends on the lifetime of your NativeContainer (so you may need to look into a persistent native container if you need to access the data on the next frame or so)

opaque escarp
#

related to that, if I wanted to create a persistent nativecontainer that would stay around for the lifetime of the app, how would I go about making it so that the console doesn't fill up with undisposed messages when exiting play mode? In the past I did it by registering the containers in a monobehaviour with OnDestroy disposing them, but that seems a little inelegant

coarse turtle
#

I guess it depends on structure - if it's a MonoBehaviour, you can use OnDestroy/OnDisable, if it's a SystemBase, OnDestroy can work too. If you have like a static one, you'll likely need to find a way to explicitly manage the native container yourself

dull siren
#

I am running 400 jobs and I have 2 output parameters (path and finalGCost) per job. I want to use them, then dispose of them to prevent memory leaks.

coarse turtle
#

the way you structure your jobs is just making it difficult, and 400 jobs is a lot

dull siren
#

That is why I am running them multi-threaded

coarse turtle
#

well you're still scheduling 400 jobs, I'm curious as to why a job can't handle n tasks

dull siren
#

Oh, I could make a special job just for getting all paths, hmmm

#

So I have a pathfinding job, which finds a path from one location to another

coarse turtle
#

but back to your point of concern, if you need to access path and finalGcost, you will need to refer back to those native containers

dull siren
#

Oh I just refer back to the jobHanldeArray before disposing of it

#

Ah I think I understand, or what your saying is I could have a custom path finding job for when I need to get all paths and do it all inside of one job

coarse turtle
#

so if you want to access the 5th path NativeList, you will need to somehow grab that path variable and access it

coarse turtle
#

so if a Job handles "n elements" you wouldn't have to schedule 400 jobs

dull siren
#

Well most often when finding a path I am only running 1 job, from start to end position

#

However when displaying a grid of all possible places you can move, I must run a path to all 400 positions, so that the grid can be updated

#

Using DOTS I can do this so quickly I can almost do it between frames without a hitch, trying to get away from ASYNC calls, which have to wait over multiple frames and then update the view

warped coral
#

can i get advice on good ways to do this... Like.. you know text-games with a console and you input commands? How should i use ecs to carry out the commands. Like lets say each command has its own system and regex pattern. Could i just like... put a fixedstring buffer for commands on all players, and then each command system does an entities.foreach on all players with a change filter for that string buffer? does that sound ok

warped coral
#

can i do async await stuff in OnUpdate in systembase?

dull siren
#

@coarse turtle I create a job to check paths all in one job, I am concerned that it is not using other threads doing it this way though

coarse turtle
#

Well it really depends on the implementation

#

Usually if I use IJobParallelFor, multiple cores are utilized (ofc this depends on the parameters that are set when scheduling the job)

dull siren
#

I think by having multiple jobs, each checking a single path, it can make the best use of your CPU

coarse turtle
#

well if scheduling 400 jobs work, consistently across the target platforms you intend to release to without major issues, then that methodology would work @dull siren

dull siren
#

Yea I just could never get to my outputs, because they all run in one CompleteAll function, I have no chance to grab the arrays I put into them and dispose of them or get the data

#

I guess the problem is that you can't just put a single parameter into a job, like int. It must be an Array of size 1 int. But for 400 jobs, I need an array where I can put the index into each job, however I can't have an array of arrays

#

Well maybe I could have a List of NativeArrays of size 1

coarse turtle
#

some parts in the code I was confused about

dull siren
#

Yes the first remarks is my big problem, I have been running one job at a time, so to access for example the "path" variable I just access it after running the job. So when switching to putting all jobs in an array and executing CompleteAll I was passing the same varaible to all jobs and it was being overritten

#

Also I forgot to put the count++ line and take out the original Schedule

#

I think what I need, outside of the for loops, it a List<NativeList<int2>> paths

coarse turtle
#

possibly, but I'm not so sure

#

i think the issue you may run into if you store the path into a list would be

#

that NativeLists are structs, and by default, structs are copied over. So you can imagine when you add the struct to a list, you would copy that list over. The problem here lies in the Length property of a NativeList

#

because a copy of the length property would be passed to the job (not its reference)

dull siren
#

A simpler example would be gcost, since it is just an int. Essentially I want to run 400 jobs simultaneously and get 400 int variables back

coarse turtle
#

so the job would do the work on a copy of the NativeList, manipulate the Length property, and if you possibly tried to access in a later frame, the Length property would be 0, as you're looking at a copy before the work was done (the pointer would still be pointing to the correct data though)

#

I'd try storing the NativeList<T> into a list to see if it would work, if you end up with a length of 0 per native list, then you would know it wouldn't work (since this depends on scope) ๐Ÿค”

or you may need a different data structure to solve your problem

dull siren
#

Oh I could just increase the length of the existing native list, hmm

low tangle
#

has it shifted to a 5y roadmap? 10y?

#

something to plan for future titles

dull siren
#

I will play around with it some more

#

400 is just to test the limitations right now, in reality the calls will be much smaller on average, but I am trying to see how fast I can get it

coarse turtle
#

yeah makes sense, I have limited knowledge based on your problem domain - so I'm just commenting lol

dull siren
#

thanks! I have 2 things I can try now, a List of NativeList or just having all jobs work with increasing the native list

neon pewter
#

Set your agent to run AStar only within maybe 100 meters. Then, take the point you want to get to and project a line between your agent and that point. Compute the intersection of that line with the far edge of your AStar "radius" and choose that point as the navigation location. Periodically re-run the line intersection to pick a new "navigate to" point at the edge of your AStar radius. Repeat this until the destination location enters your AStar "radius".

#

Trying to run AStar across your entire multi-km map would be essentially the same as making all agents omniscient as far as path navigation goes.

#

The method I just described as an alternative is much more performant and also more closely resembles what real organisms do for navigation.

steel pike
echo panther
#

hello, how can I have a child entity follow the transform of its parent? Like in non-dots you just set the child object and it just works. I can't seem to get the same thing in dots

neon pewter
#

Pre-baked maps across multi-km tiles doesn't really scale well. I would greatly reduce the size of the maps and compute a new one periodically for each agent as it moves.

stiff skiff
#

@dull siren Instead of using 200 jobs for your 20x20 grid, why not a single IJobParallelFor

dull siren
#

@stiff skiff Will have to research it. The tutorial on pathfinding in DOTS recommended doing multiple jobs to make the best use of the CPU and proved it by showing how quickly it runs

stiff skiff
#

IJobParallelFor does this as well

#

This issue with IJob is that is basically 1 task == 1 job. And those jobs are spread across your X cpu cores. With some scheduling overload per job

safe lintel
#

yeah 400 jobs seems excessive

#

for one thing

stiff skiff
#

But on your end, you technically have the same task, 400 times

#

So an IJobParallelFor lets you define that task, and schedule it with 400 different inputs

#

then tell the scheduler to have 1 job per, lets say 20 of them

#

This means every job will now do 20 iterations, leaving you with 20 instances of your job, spread over your cpu cores

#

This is significantly more efficient

#

And a better way of thinking about your data

dull siren
#

Ok, as long as I can get the outputs for each job

#

400 times is how many paths you need to check if your character can move 20 spaces, a bit excessive but a good test. If the character can only move 3 spaces then it would simply by 9 path jobs

stiff skiff
#

For A*?

dull siren
#

Yes, it is using A*, but instead of waiting for the player to click and see if a path can be found, it is showing all possibilities, like XCOM

stiff skiff
#

I mean, pretty sure XCOM only shows 1 path, the one i'll take IF you were to click

#

so it just takes the grid cell your mouse is over, and calculate the path to that 1 cell

dull siren
#

well I have not played XCOM but maybe a better example would be Wasteland 3 then, where it literally shows every possible spot you could move to, every possible spot you could move and shoot from, continuously

stiff skiff
#

Do you have an image?

#

Because I feel doing an A* job to every grid cell, is very much the wrong way to go around this

steel pike
dull siren
stiff skiff
#

I highly doubt this does the A* like you are trying

#

For example, this doesnt need the path as the output

#

You just want to know if which cells are within range

#

If you look at a visualization of A* you can see this "flood fill" style of calculating adjacent cells movement cost (total)

#

And this is very similar

#

you don't want to know the cheapest path from X to Y. You want to know what cells gcost <= distance from X

#

Thats something that you can do in a single job. Using your current XY and a MaxGCost as input, and a NativeList<int2> as output for the cells you can reach

#

You'll only need A* once the player hover over one of the "in range" cells to figure out the path

#

and you can even re-use the NativeList<int2> you calculated earlier as your list of open cells, since you know these are all what will be in range, ever

#

I hope I'm making some sense ๐Ÿ˜„

dull siren
#

Yes your right, in fact I dispose of the path and only keep the gcost when doing this. But i still need to path find a path to check for things like 2 corners on diags, etc. Then just return the finalnode gcost for each tile

dull siren
#

So right now I am just collecting 400 gCost ints in 1 job. I need to split it back out to separate jobs but run them simultaneously

#

Oh I re-read what your saying with doing it in 1 job, while pathfinding I am getting the gCost for every cell, but not sure how to pathfind in all directions.

odd ridge
#

hey, is there a way to speedup the hybrid renderer v1? When I look into profiling, my game logic in total takes like 3ms, and the hybrid renderer takes 60ms ๐Ÿ˜จ

fluid kiln
#

Another person said before that it was not very well optimized and I believe it's no longer in development

odd ridge
#

I know about v2, but my issue is that I use a lot of visual assets on the asset store and the majority of them want nothing to do with SRP. and v2 only works with SRP

#

else I'm gonna have to write my own DOTS renderer system which I would rather avoid spending time on

stiff skiff
#

Thats sadly the reality of using DOTS rendering

odd ridge
#

I believe the hybrid renderer is used when converting unity objects to dots right? if I remove the conversion and use pure DOTS rendering components, will that remove the hybrid renderer out of my way?

safe lintel
#

i know nothing of your situation but it seems like it would be easier to rewrite things over to hybrid v2 than writing your own dots renderer

#

no conversion is a separate step that has nothing to do with rendering in that way

fluid kiln
#

Is there a good way to to have a ForEach(c1, c2, c4, c5) with a condition on the parent? Say Entities.Where(Parent.HasComponent<C>).ForEach() ?

#

Or is it negligible to loop over all these entities and check manually parent.HasComponent<C>?

#

That's why nested loops would be fun...

coarse turtle
#

honestly, I just use ComponentDataFromEntity.Has - I haven't tested on thousands, since my case is generally hundreds and falls within the target metrics ๐Ÿค”

stiff skiff
#

Question is, is it faster to do the check and branch in the job. or 3 jobs. 1 to split the entities between have and have not, and 2 for the separate branches ๐Ÿ˜›

#

caching will be better on the latter, but job scheduling is pretty bad currently, so might not be worth it

fluid kiln
#

I'll stick to HasComponent since it's a very low amount of entities

#

Actually just splitting in it two systems with events works... idk why I was looking for another way

odd ridge
#

some of those assets are quite massive (like a volumetric cloud renderer, I can't rewrite that easily in SRP)

warped coral
#

how do i know if i a container is able to be scheduled parallel? and whats the proper way to do stuff like making temp containers to transfer field data and using with burst, and then disposing of them?

zenith wyvern
#

If a container can be written to in parallel it will have an AsParallelWriter function. Except nativearray which just works I guess

#

Any container can be used as ReadOnly in parallel

#

For passing a container between jobs you just need to make sure you pass the job handle along with the container and dispose it at the end, passing in the dependency to Dispose

warped coral
#

what about entities foreach scheduleparallel? i dont need to do any job handle stuff with that?

#

and uh.. are dynamic buffers able to be in parallel?

zenith wyvern
#

You would still need to manually manage the job handle only if the container you're passing between jobs leaves your system. If it's only contained to one system you shouldn't need to worry about it in most cases

#

A buffer can be used as an argument in your query for a schedule parallel job, but the work won't be parallel on any single buffer

warped coral
#

im confused about like... i know schedule parallel uses multiple threads... but is there any guarantee when it finishes? like if i do an entities.foreach.scheduleparallel and then right after i do entities.foreach.withoutburst.run in the same OnUpdate, what really happens

zenith wyvern
#

The work is parallel across chunks

#

In that case your first job gets scheduled then your second run job runs immediately afterwards - meaning the one you scheduled hasn't happened yet

warped coral
#

oh.. how do i know when its finished or uh

#

idk how to make sure the stuff happens in order

zenith wyvern
#

It's finished the next time OnUpdate runs at the latest. Otherwise any time you call complete, a structural change happens, or some other job that depends on it needs to complete

#

My advice would be to only worry about ordering between systems via UpdateBefore/UpdatAfter

#

Let unity handle the rest if you can

warped coral
#

so... uh... when do i use scheduleparallel or schedule

#

if i dont have a lot of data... like maybe just one chunk.... scheduleparallel doesn't bring any benefit?

#

also can i put entities.foreach inside entities.foreach... like nesting them?

zenith wyvern
#

I don't know what you mean by nesting. If you don't have enough entities to have multiple chunks for an archetype then scheduleparallel won't do anything afaik

#

It will just work like schedule but probably be more expensive

warped coral
#

it doesnt give any compile errors when i do that but idk wtf it does when i do stuff like entities.foreach.withoutburst(() => { Entities.foreach.scheduleparallel(() => {};);}).Run()

zenith wyvern
#

I don't think that works

warped coral
#

so uh.. if im making a mud... and i need to parse commands with regex... I'm reading input on the main thread with networkstream... What's a good way to bridge like... my input string stuff from each client and have the server parse the commands?

zenith wyvern
#

Sorry you lost me, hahah

warped coral
#

this is what i have. how do i make it better. oh wait the first scheduleparallel shouldnt be there

        // Remove unused commands.
        Entities.ForEach((ref DynamicBuffer<CommandData> commandBuffer, ref DynamicBuffer<LogData> logBuffer, in Player player) => {
            foreach (var command in commandBuffer) {
                logBuffer.Add(new LogData() { Value = FixedString.Format("Couldn't understand: '{0}'", command.Value) });
            }
            commandBuffer.Clear();
                
        }).ScheduleParallel();
        // Set new commands if any.
        if (commandMap.Any()) {
            Entities.WithoutBurst().ForEach((ref DynamicBuffer<CommandData> commandBuffer, in Player player) => {
                if (commandMap.TryGetValue(player.Name, out FixedList32<FixedString512> commands)) {
                    foreach (var command in commands) {
                        commandBuffer.Add(new CommandData() { Value = command });
                    }
                    commandMap.Remove(player.Name);
                }
            }).Run();
            commandMap.Clear();
        }
        // Send logs to respective players.
        Entities.WithChangeFilter<LogData>().WithoutBurst().ForEach((ref DynamicBuffer<LogData> logBuffer, in Player player) => {
            SendLogsToPlayer(player.Name, ref logBuffer);
        }).Run();
    }
#

uhh idk... trying to like... get the data into and out of the ecs stuff seems weird or maybe im thinking about it wrong... should i just stick to using withoutburst unless i have a lot of data to do stuff on

zenith wyvern
#

I think you should try something simpler until you're more familiar with unitys ecs

safe lintel
#

@odd ridge are you sure the hybrid renderer is your bottleneck here? you profiling using the timeline view or hierarchy?

odd ridge
safe lintel
#

the timeline should give a better idea of whats taking up performance. if the hybrid renderer is waiting for other jobs its possible the 60ms is partially waiting

fluid kiln
#

I assume there's no way yet to have floating text in DOTS?

#

Since 2D isn't supported

#

Oh maybe 3D text...

safe lintel
#

i dont think hybrid v1 should even be a bottleneck if you are using assets incompatible with it, they shouldnt even affect how the hybrid renderer operates, so im thinking the 60ms you might be seeing is hv1 waiting on other jobs to complete, but its hard to speculate without further info

odd ridge
#

@safe lintel right, I will turn everything off to make sure

safe lintel
#

should be easy enough to just run it and drill into the timeline view to see what is eating up your cpu

#

no need to disable anyrthing

odd ridge
#

here

#

RenderMeshSystemV2 is the hybrid renderer v1

#

I'm not sure why but according to this profiler, it's horribly slow and single threaded

#

I mean, I know it's supposed to be slow

warped coral
#

how come when i do this it says i dont have any capacity (list capacity is 0? i thought it would allocate. how do i do that?)

list.Add(cmd);```
odd ridge
#

but that's really bad

safe lintel
#

hm i guess it is hrv1 being the bottleneck

#

how many entities are you rendering?

odd ridge
#

that's with 1 million entities, everything is an entity, each piece of grass, each tree, each object

safe lintel
#

curious what your tri count is for scene statistics

odd ridge
#

I know that's not the problem because my GPU is at 8% usage

amber flicker
#

v1 was only ever any good at rendering statics - v slow when it came to dynamic and one of the things v2 is working on addressing

odd ridge
odd ridge
#

yes most my stuff is dynamic, not static

amber flicker
#

still wouldn't expect 1mil dynamic meshes to render super fast on v2 mind you..

#

only way to get decent perf for that kind of count is manually through drawmeshinstancedirect I believe - but that's pretty manual

#

who knows, maybe easier and better than I expect in the future

odd ridge
#

that's my next best bet, trying to write a DOTS rendering system with indirect

#

instance I mean

amber flicker
#

on my laptop (8 cores) I can render about 200k dynamic cubes on v2 in about 10ms in case that helps give any kind of ballpark reference (urp unlit)

odd ridge
#

hmm, I see

safe lintel
#

yeah, not really sure for your options here. v1 is basically deprecated, and they are fairly communicative for feedback for v2. i still think it would be easier to try to update stuff for v2/srp batcher rather than writing my own rendering system but thats just me. you might be able to communicate with some of the asset devs to update for srp batcher

#

srp batcher stuff is basically the future so id imagine any decent dev would want to help out and improve the perf of their stuff

odd ridge
#

I might just try to isolate my code stripped of the assets I use and try v2 on it

amber flicker
#

to state the obvious... it's rare you'd ever want to throw all your cpu power at blades of grass so.. just make sure it's worth the time investment ๐Ÿ˜„

odd ridge
#

well, the thing is my CPU is sleeping. my DOTS game logic takes 3 ms on 1 million entities.

safe lintel
#

yeah a million entities for only 80k tris, wonder if any of that can be improved. there are some good techically minded people on the forums if you want to pose the problem there

amber flicker
odd ridge
#

lolll

amber flicker
#

you could try raytracing on the cpu.. that's expensive ๐Ÿคฃ

odd ridge
#

it's just because of the hybrid renderer though, it's locking my main thread at 10fps, so I can't schedule more jobs than 10 times a second. at 60fps, that would be 3ms*6 = 18ms, which is a pretty decent load on the CPU

amber flicker
#

you could do 100k instead of 1mil? ๐Ÿ˜…

odd ridge
#

hybrid can't even handle 100k lol, GPU usage at 1 million is 8%. at 100k I'm at 20% GPU usage.. hmmm

#

it's not unplayable, far from it. but yeah, 20% GPU usage

#

and huge CPU single thread bottleneck

#

I mean, I would expect better from "performance by default", why am I using DOTS otherwise ๐Ÿ˜„

safe lintel
#

well apparently v2 and srp batcher is worth it if you want perf, 2.2ms for 1mil entity cubes

#

gpu usage is 88%

#

with all safety checks on(1070 and 8700k)

#

and in editor, not a build

zenith wyvern
# odd ridge

Sorry for the dumb question, are you sure you have burst enabled?

odd ridge
#

@zenith wyvern it's a valid question : ) I do have Enable Burst Compilation turned on

zenith wyvern
#

I've been hearing nothing but horrible things about hybrid renderer with this version, seems like a rough patch for sure

odd ridge
#

yeah, it's pretty horrible. if only v2 was backported to built-in renderer..

warped coral
#

how should i do singletons or global variables in ecs? like if i want an in-game time variable or something

warped coral
#

do i just use uh.. addsingleton

odd ridge
#

many ways to do it. for time variables, I just pass a time value to my job struct

warped coral
#

is there any advantage to like.. using a singleton component? and uh... does calling get or set singleton cause a sync point?

#

oh wait

#

does this look ok

        WorldTime worldTime = GetSingleton<WorldTime>();
        worldTime.Time += worldTime.WorldTimeToRealTimeFactor * Time.DeltaTime;
        SetSingleton(worldTime);
    }```
pulsar jay
#

Is there any simple way to render a plane from ecs? I am trying to render I grid and I would like to avoid creating a plane entity via conversion

vagrant lotus
#

about functions in Entities.Foreach under SystemBase

#

is it possible to turn this bit into a function withBurst and ScheduleParallel

slim nebula
vagrant lotus
#

tldr, can i have functions for use in jobs especially with entitycommandbuffer

slim nebula
#

Yes you can create burst compile static functions

#

Just mark it with first compile or whatever the attribute is I forget

vagrant lotus
slim nebula
#

And make sure it's static

pulsar jay
#

@slim nebula I am using a custom map data structure for the levels so the entities are not "classically" using conversion workflow

slim nebula
#

Yeah entity command buffer is burst compatible

vagrant lotus
#

much thanks

slim nebula
#

I haven't tried that specifically myself but I think it should work

pulsar jay
#

but I have a grid component which basically contains every info necessary to render the grid. so I would like to have a system just render it without having to create another entity with render components etc

slim nebula
#

Ohhhh

pulsar jay
slim nebula
#

Hmm

#

I'm not familiar with custom renderer stuff.

pulsar jay
#

was thinking about using Graphics.DrawMesh or similar. But its tough to get a mesh into the job

slim nebula
#

Off the top of my head you need to convert the data into a format that's usable by the ECS renderer at some point. So I would think that it would be about the same amount of work to create those entities as it would be to write the renderer. But I don't know for sure

#

Maybe someone else can help?

pulsar jay
slim nebula
pulsar jay
#

would be great to just do sth like: for each grid render a quad with this shader and these shader parameters

#

sounds like a perfect fit for system to do ๐Ÿค”

slim nebula
#

I mean it's no different than like the physics system right. it does a build physics world every frame which just converts the data to a format that's more efficient to process. It's doing that data conversion every frame.

#

But I don't know maybe the custom renders stuff is super easy I'm not sure

pulsar jay
hollow scroll
#

Hello, is it possible to use Hybrid Renderer V1 with unity 2020.2?? Nothing is being rendered if I don't set ENABLE_HYBRID_RENDERER_V2 (which I don't want)

hollow scroll
#

I wonder what the issue is

vagrant lotus
#

no error?

hollow scroll
#

nop... and I created a new project just to test that in isolation... unity 2020.2, "com.unity.rendering.hybrid": "0.5.2-preview.4", a cube with convert to entiy... and it just not rendering that

vagrant lotus
#

classic unity

vagrant lotus
hollow scroll
#

I just did... same problem

vagrant lotus
#

๐Ÿคฆ

#

its clear unity want you to use V2

#

what is stopping you from using it

hollow scroll
#

yap... but I can't ๐Ÿ˜›

#

vulkan support on mobile devices

vagrant lotus
#

oh

hollow scroll
#

yappp

vagrant lotus
#

Important: Hybrid Renderer V2 is considered experimental in Unity 2020.1. We have validated it on Windows DX11, DX12, Vulkan and Mac Metal backends in both Editor and Standalone builds. Mobile device and console platform support will be validated in 2020.2.

what does validate even mean?

karmic basin
#

does it work with a subscene insntead of convertToEntity ?

karmic basin
vagrant lotus
#

ye

karmic basin
#

Unityโ€™s release management only grants a package the verified status after it passes several testing stages and validation procedures, which also include checks for appropriate documentation, changelog, and license files. Packages in this state may appear in the Unity Editor with the 2019.4 verified label and never use preview as part of their version.

From https://docs.unity3d.com/Manual/upm-concepts.html#States
But I'm more confused what they mean

vagrant lotus
#

seperate unrelated question of my own:
is it possible to have an array of RenderMesh and another for PhysicsCollider that can be used in Entities.Foreach?
1) it can be converted from a C# array if neccessary
2) i dont need to write to it, I just need to access copies of it

vagrant lotus
#

verified == no error log ๐Ÿ™ƒ

karmic basin
#

SO it's not "verified", but it's "validated" for DX11, 12 and Vulkan ๐Ÿค”

hollow scroll
#

@karmic basin I didn't try with a subscene... it's just an empty scene with a camera and a cube with the convert to entity component

vagrant lotus
#

have you try pure ecs scene

slim nebula
vagrant lotus
#

the problem is the mesh is generated at launch on the main thread

karmic basin
#

Yeah and if you put them in components, you already get copies of them

hollow scroll
#

@vagrant lotus sorry... what do you mean?

vagrant lotus
#

its a terrain generation thing

#

should i make holder entities as a way to store them and use entityquery to use it in Jobs?

vagrant lotus
slim nebula
#

Yeah I mean all your data should be on an entity

vagrant lotus
#

brainfart of my own

slim nebula
#

You might use static members as a shortcut sometimes but I think in most cases it should be on an entity

hollow scroll
#

but V1 works by default in 2020.1 it seems

vagrant lotus
hollow scroll
#

it was a pure ecs entity

#

convert and destroy creates a pure ecs entity

#

or am i missing something?

vagrant lotus
#

does this qualify for a bug report

hollow scroll
#

same packages in completely new project same scene... works fine in 2020.1, but not in 2020.2

vagrant lotus
#

try making a new project with V1 and 2020.2

hollow scroll
#

I did

vagrant lotus
#

if the same bug occurs

hollow scroll
#

that's the project I was testing

vagrant lotus
#

you can file bug report

#

it is clear your problem can be replicated

hollow scroll
#

๐Ÿ‘ thx

vagrant lotus
#

they often ask if you can replicate your bug

slim nebula
#

Yeah my s*** crashes all the time. They asked so many questions I can't really report it

#

But if you can reproduce it then you can report it

vagrant lotus
#

if it always crash, you report maybe able to get through

#

but there are just so many threads closed because dev cant replicate it

#

๐Ÿฅฒ

hollow scroll
#

@vagrant lotus yep... I just created a new project and same issue

half jay
#

why dynamic buffer has 0 elements after this

  var buffer =  entityManager.AddBuffer<LinkedEntityGroup>(blockEntity);
  buffer.Add(entity);
slim nebula
#

Var buffer is not a ref, I don't think. You I have to set the buffer back on the component.

#

@half jay

#

Or maybe I'm wrong actually I'm not sure

half jay
#

its strange when using EntityManager and method AddBuffer return buffer then

zenith wyvern
zenith wyvern
slim nebula
#

Oops my bad

half jay
zenith wyvern
#

Can you show the test?

karmic basin
#

Does someone have up-to-date documentation on the netcode package ? Latest versions have deprecated ConvertToClientServerEntity and ask to use the subscene workflow, but I can't get my head around it, I think I'm missing important step(s)

safe lintel
#

@hollow scroll try toggling srp batcher if you havent already

hollow scroll
#

@safe lintel I'll try that

#

@safe lintel ahh by unchecking that it seems to work! thanks!

safe lintel
#

just note that v1 is deprecated and wont get any support going forward

hollow scroll
#

yep... I know... I'm hoping for them to add support for OpenGL ES to V2... or I'll need to start thinking about other optoins :S

#

V1 also works with 2020.1.17 and a lower version of URP [8 instad of 10] (mentioning just in case)

slim nebula
#

@karmic basin the way I did it was to set the subscenes to not autoload, then only load certain subscenes programatically depending if server prediction system or client prediction system exists in the current world. (client and thinclient load the same subscenes for me)

#

I'm not sure if there's a better way

karmic basin
#

I think I saw in a changelog to only use thinclient now

#

but I'm not there yet

slim nebula
#

ultimately I'm tagging the subscenes and processing them with a system. identical to the deprecated component, so I'm not sure why they did that

#

i mean thinclient has a singleton component in their worlds

#

the normal client doesn't. they have different input processing or w/e but I just load the same subscenes cause it's only in dev and I have 64gb of ram

karmic basin
#

Alright I'm gonna read more about subscenes, ultimately if I spend too much time making it work I might revert to older versions. This is a side experiment, I wanna quickly test things

#

Thanks for your input

slim nebula
#

if it's just testing, then use the depricated component. it still works

karmic basin
#

yeah, true

slim nebula
#

i use it when I'm lazy and just jamming debug junk in the root of my scene

karmic basin
#

Yeah ok deprecated way works, so I dunno why I was obsessed with novelty

#

Thanks again for putting me back on the right track ๐Ÿ™‚

slim nebula
raven grail
#

So I've got a system that runs on scene load that's supposed to create a GameObject and link it to an Entity. However it seems to run once and then the scene load wipes the GameObject. Is there any way to delay a System's first execution until after scene load is finished?

slim nebula
#

sceneSystem.IsSceneLoaded(entity)

#

if false then just return and try again next frame

#

@raven grail

raven grail
#

sceneSystem would be World.GetExistingSystem<SceneSystem>();?

slim nebula
#

yup

#

and entity is the result of sceneSystem.LoadSceneAsync(guid)

coarse turtle
#

hmm, I'm wondering if people had success with conversionSystem.AddHybridComponent(Camera) in mobile builds? I seem to be getting this error on Android via the CompanionLink:InstantiateCompanionObject(entity, gameobject):

The referenced script on this Behaviour (Game Object 'Camera') is missing!
raven grail
#

Still getting nothing

#

Though now I'm getting an assertion failure AssertionException: Assertion failure. Value was False Expected: True The scene catalog has not been loaded yet

slim nebula
#

so your RenderObjectLinkComp is on your entity from the query, not on the subscene. is that intended?

raven grail
#

There is no subscene

slim nebula
#
                    var sceneEntity = sceneSystem.LoadSceneAsync(guid);
                    if(!sceneSystem.IsSceneLoaded(sceneEntity))
                        return;```
raven grail
#

I'm loading the game into a main menu scene and then loading a game scene

slim nebula
#

this will 100% always return false

#

it's loading it asyncronously. you'd need to wait a few frames

#

and not load in a new scene every frame heh

#

err... the subsiquent loadsceneasyncs will prolly fail? I dunno

raven grail
#

And yes, the idea is to run the system on every entity with RenderObjectComp, create a GameObject, then store an ID linking to that GameObject in RenderObjectLinkComp

slim nebula
#

also ur GUID is like hard-codedish var guid = sceneSystem.GetSceneGUID("Scenes/GameScene");

#

you can only load a subscene once. you can't load multiple instances of it

#

subscenes are for disk to memory, prefabs are for instancing (in-memory copy).

raven grail
#

The GUID is just for testing now

slim nebula
#

kk

#

just sayin if you have multiple maybe that's why ur seeing wierd things but if ur testing is just 1 then it's fine

raven grail
#

Again, I'm not using subscenes

#

Just one scene

slim nebula
#

kk hmm

#

yea I mean

#

var sceneEntity = sceneSystem.LoadSceneAsync(guid);

#

this will like... return a value right

#

then

#
     if(!sceneSystem.IsSceneLoaded(sceneEntity))
                        return;```
#

this will make it return

#

will always return

raven grail
#

Basically the issue right now is I'm doing SceneManager.LoadScene, which triggers map gen, which puts an entity with RenderObjectComp in the World

slim nebula
#

then you've lost "sceneEntity" cause it's fallen out of scope

raven grail
#

And that triggers the System to run once on it

#

But the GameObject gets wiped

slim nebula
#

then next frame you do it again. I assume var sceneEntity = sceneSystem.LoadSceneAsync(guid); on the next frame will throw some error or return null

#

i don't think it's getting to that new gameobject line is it?

#
if(!sceneSystem.IsSceneLoaded(sceneEntity))
                        return;```
#

this will always return right?

#

the "new gameobject" is after it

raven grail
#

Nope, it just goes assertion fail

slim nebula
#

ohh wow I'm sorry I totally didn't understand

#

so this line

#
var sceneEntity = sceneSystem.LoadSceneAsync(guid);```
#

is throwing that error right?

#

or maybe this line var guid = sceneSystem.GetSceneGUID("Scenes/GameScene");

#

sorry I'm not sure. if the guid is correct it should just go... I"m not sure

raven grail
#

It's var guid = sceneSystem.GetSceneGUID("Scenes/GameScene");

slim nebula
#

I've never used that method. as a work-around you could try using the GUID directly. from unity docs:

raven grail
#

Yeah but where do I find the GUID

slim nebula
#

put it on a component or monobehavior and assign it in unity editor

#

drag the scene onto your property in the editor

#

should just be "Scene" type, then there's a property on it for the guid

#

iirc

warped coral
#

with serializeutility.. if you want to serialize objects to files, then you have to save their assemblyqualifiedname and data and recreate them when you load?

#

or will that break things

#

also im confused as to what's a sync point. So... any structural change, (creating/destroying, adding / removing stuff) or any setting to component data (causing component sync point?)? So getting component data... also getting singleton data... are fine and wont cause sync points?

raven grail
#

Doesn't seem to work for me, can't assign a scene to a scene field. Is there no other way to just delay a system for the first frame?

warped coral
#

ok

slim nebula
#
public class SceneLinkAuthoring : MonoBehaviour, IConvertGameObjectToEntity
{
    public SubScene Scene;

    public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
    {
        dstManager.AddComponentData(entity, new SceneLink { SceneGUID = Scene.SceneGUID });
    }
}
#

i know that's subscene but

#

I assume you have to do the same thing with scene

#

the generated authoring stuff doesn't work for scene/subscene

#

I assume you're using a component

#

so you can either use a monobehavior to have the "Scene" property directly, or write ur own authoring like I did above

#

Scene and SubScene are not blittable. only the GUID property is. so it can't go directly on a component.

karmic basin
#

Or better, use [UpdateBefore/UpdateAfter] to control flow

raven grail
#

I've tried UpdateAfter but it didn't seem to fix the problem

deft stump
raven grail
#

I'm not using subscenes

#

This is the initial scene loading

deft stump
#

ah

raven grail
#

The weird thing is I've got this older job code that does something similar, instantiating GameObjects on scene load and linking them to an entity and it works just fine

#

So really the question is, how do I set up the system to either run at the end of the frame, after the scene has fully loaded, or to run only on the second frame

deft stump
#

Why not just pre query the entities you need.
If the query is empty (i cant remember the actual syntax) skip the entities.Foreach?

raven grail
#

The problem is that the query isn't empty

#

The Job code does everything it's supposed to, it just fires too soon so the GameObject it instantiates gets wiped

#

Or at least that's what I'm assuming here, cause when I set the Job to run every frame it works

#

I've tried UpdateAfter(typeof(EndPresentationEntityCommandBufferSystem) which looking at the documentation should be the last system updated but that still didn't work

#

So either it needs to be even later than that somehow or there's something else going on that I'm not seeing

warped coral
#

is it safe to reference entities in buffers? like... if the entity is destroyed, does the buffer update or uh.. i gotta manually check before i use it or idk?

#

like containers holding items... rooms holding stuff

#

DynamicBuffer<Entity>

hollow sorrel
#

you gotta check it manually, or have a system that removes it from dynamicbuffers on entity destroy

#

also not sure if you can do dynamicbuffer<entity> as it's not an ibufferelement

#

can make a bufferelement that holds an entity tho

warped coral
#

oh right

#

ok

warped coral
#

what naming convention do you guys use for ecs? Like for components... do you just name them the thing... or maybe thingData?

manic reef
#

I prefer to name them as a thing. Don't see any reason to add suffix it will just clutter naming

coarse turtle
ocean tundra
#

Anyone heard anything about when the next updates will drop (0.17)?

zenith wyvern
#

Friday last I heard

#

Tomorrow

#

Not 100% but that's the plan

ocean tundra
#

Sweet, been away from dots for awhile and exicted to get back into it

#

well fingers crossed

#

Have they released component enabling/disabling?

safe lintel
#

not yet

#

i dont think it was on the patchnotes for .17 either?

ocean tundra
#

yea i just read those and didnt see anything about it

odd ridge
#

someone from Unity confirmed me hybrid renderer v2 won't come to built-in. I'm considering getting rid of the assets that don't support SRP so I can upgrade to URP asap. v1 is just horrible

ocean tundra
#

@odd ridge I thought that was said ages ago?

ocean tundra
#

Does animation finally work? I see it has its own forum now

safe lintel
#

yeah, still tricky to figure out

ocean tundra
#

tricky is better then impossible ๐Ÿ˜› I couldnt get it to do anything before

safe lintel
#

it sorta always worked but they never updated the samples alongside the package updates. just hoping they keep it up to date this time around but you know how it goes ๐Ÿฅฒ

ocean tundra
#

yea the samples were painful

#

Is there any writeup on native streams?

warped coral
#

how should i structure this? Like... if entities can have a whole bunch of stats. I usually need to process through all the stats since each stat can have temporary decaying/growing statmodifiers. But i also usually need to retrieve stats by name. Do i use a DynamicBuffer<Stat> and then manually find each stat by name when i use them?

#

does this look ok ```
public struct Stat : IBufferElementData {
public FixedString32 Name;
public float BaseValue;
public float FinalValue;
public FixedList32<StatModifier> AdditiveStatModifiers;
public FixedList32<StatModifier> PercentStatModifiers;
public FixedList32<StatModifier> MultiplicativeStatModifiers;
}

public struct StatModifier {
public float Gradation;
public float Initial;
public float Final;
public float Duration;
public float Time;
}

#

am i doing anything weird

#

and then if i just want to get like... an attack stat.. i manually go through the dynamic buffer and find it by name? or is there a better way?

dense wren
#

How do you add a subsystem descriptor for a custom SubSystem? I created a UnitySubsystemsManifest.json file but can't see my descriptor when I call GetSubsystemDescriptors

My UnitySubsystemsManifest.json is very simple,

{
"name": "VoxelSubSystem",
"version": "0.0.1"
}

Do I need to add more to this or specify my descriptor class?

ocean tundra
#

@warped coral I would make each stat and stat modifyer a real type
eg Health (which contains value, min/max) and then healthModifyer

#

unfortuantully that means you need to make a ton of types :/

#

heallth would be a normal component and modifyer would be a buffer

warped coral
#

and then a health system to process the modifiers to update the correct max health value?

ocean tundra
#

yup

pulsar jay
#

I did the same thing. Actually I have gone one step further and have a healthBase so I can reset it

ocean tundra
#

once you got the basic pattern down you could probably code gen it all somehow

warped coral
#

that... sounds like a lot of systems and components... if i have a lot of stats... although it does seem better for having each stat have unique values or different ways they work i guess

ocean tundra
#

yea you need alot of code ๐Ÿ˜ฆ i was using a ton of code gen for my stuff

warped coral
#

do generics work with systems? like... will unity automatically create the generic system stuff.. like if i made a ResourceSystem<T> or something. would unity autocreate it like normal

ocean tundra
#

so with Health i would put a attribute on it, thats the only component i would actually write, and the code gen will make the modifiers / systems

#

honestly i had sooo many issues with generics

#

i gave up on them

#

but that was many versions ago

pulsar jay
#

@ocean tundra is Unitys internal codegen accessible through scripting?

ocean tundra
#

i dont think so

#

i made my own

#

using t4 templates (which were aweful) ๐Ÿ˜›

#

and ive seen some other teams (ai planner) use that, not sure what entities use

pulsar jay
#

interesting thx

ocean tundra
#

good luck ๐Ÿ™‚

pulsar jay
#

I guess I will try without it for now and see how long I can handle all the boilerplate code

#

but I will def keep it in mind ๐Ÿ™‚

ocean tundra
#

yea i think thats the best way

#

what i found is i was spending tons of time updating the code gen and templates cause i missed a use case or found a bug

#

best to get a nice useable system with a few of your core stats

#

then code gen

pulsar jay
#

yeah I can absolutely see that. I am not even sure about the core patterns to use yet

#

but its good to hear that I am not the only one handling single stats like health with multiple components

ocean tundra
#

for me it was for networking

#

i wouldnt sync the value, instead capturing the value change into a 'timeline' and syncing that

#

every value i wanted to sync needed like 3 other components and soooo many systems ๐Ÿ˜›

pulsar jay
#

well that sounds way more complex. which network solution are you using?

ocean tundra
#

my own ๐Ÿ˜›

#

hence complexity

pulsar jay
#

I see ๐Ÿ˜…

warped coral
#

how does uhh.. schedule parallel work? like... what's it really do?

ocean tundra
#

it will 'magicly' schedule the work to be done on 1 or many threads

#

how it decides i cant remember

#

maybe was something todo with the number of entities

#

but i think it was the recommended way to schedule things

low tangle
#

array len / chunk size > min, spawn job for each slice of chunk size

ocean tundra
#

what was chunk size again? the number of entities that could fit into 1mb?

warped coral
#

im still confused on how to properly use schedule parallel... Like.. so.. it uses one thread per chunk? and then when does it complete... and how to tell when it completes.. err

ocean tundra
#

yea that took me a bit

warped coral
#

and since it does stuff based on chunks.. i should try to make sure most entities have the same architecture so they can be processed in parallel right

ocean tundra
#

basicly schedule (and schedule parallel) dont actually do the work then, it 'schedules' it to be done 'soon'. so all your systems are running, declearing what they read and write too and then all that work gets safely ordered and runs in different threads

#

i didnt really worry about making entities have the same architecture

warped coral
#

ok.. so.. there's no uh.. guarantee on when it finishes? can we tell when they finish.. or do we design systems so they just continue when finish conditions are met or something

ocean tundra
#

so you can order your systems somehow (cant remeber the attirbute name) and if your using the same components they will be scheduled to run after the previous

warped coral
#

oh so... if i tried to multithread every single thing... it'd actually be much slower than just multithreading the big tasks

ocean tundra
#

i think its actually faster

warped coral
#

like if i have tasks that can finish on the current frame, it'd be slower if i schedule them instead and wait for them right

ocean tundra
#

i think everything has to finish in the current frame

#

i remember trying to get jobs to run across frames and it was super hard

warped coral
#

oh

ocean tundra
#

dont think of them as threads, sorry for using that word ๐Ÿ˜› they are TINY little jobs scheduled and run VERY quickly across all your cpu cores

warped coral
#

oh

ocean tundra
#

each 'job' should be realitivly simple and you have many and many of them

warped coral
#

uhh... then... wait idk im confused. whats the difference between Run() and Schedule() and ScheduleParallel(), considering they all finish by the next frame?

ocean tundra
#

Run runs on the main thread

#

but i cant remember if it runs it right then or still schedules it to be run later

worldly pulsar
#

runs immediately

#

you can .Run() and use the results right after that

coarse turtle
#

Run -> does the work immediately on the main thread
Schedule -> tells the scheduler to do the work later on a single thread
ScheduleParallel -> tells the scheduler, do this work later on multiple threads (depending on collection size / amount of work done on slice)

warped coral
#

ohhh

ocean tundra
#

for me i was trying to make sure everything would scale large, so was trying to use scheduleparallel everywhere (and failing)

warped coral
#

should i always use scheduleparallel if i can... and i dont need the work immediately? also.. uh... how later is "later"

#

the next frame... within the same frame.... a few frames ahead?

ocean tundra
#

within the same frame i belive

#

with the order attribute unity can work out what jobs you want to have done first and can schedule your work to run after

#

so you can have job1 that updates translation then job2 that reads it and then job3 that updates it again all execute and complete within the one frame

#

ahh UpdateBefore and UpdateAfter are their names

warped coral
#

oh... wait.. can i make groups within groups? so... it's perfectly fine to have a bunch of subsystems each do one parallel job?

ocean tundra
#

do you mean making ComponentSystemGroups?

warped coral
#

yeah... But is there any way to have one system do... uh... a bunch of parallel jobs in a certain order? where the jobs have different entityqueries so they cant be scheduled together, but they have to be in a certain order?

ocean tundra
#

I think if you just have 1 large system with all your entities.foreachs within they 'might' be automaticly dependant on eachother

#

but if they use different components/querys then why do that?

warped coral
#

oh.. then... that means the system should be split into smaller pieces?

ocean tundra
#

yea, normally i have 1 foreach per system

warped coral
#

i have a player system that does three things in order, each thing having a different query

#

i guess maybe it's too big

ocean tundra
#

if theres no dependancies between those 3 i would make those 3 systems

#

even if there is dependancies i would still make that 3 different ones

#

not sure what the use case is for large systems

warped coral
#

the first task i can scheduleparallel, but i need the next two to be done after it... so currently i just use Run() for all three

ocean tundra
#

to confirm your using Entities.Foreach right?

warped coral
#

so it would be better to split the stuff into three systems and use [Update] attributes to order them and have the first task able to uh.. schedule parallel?

#

yeah

ocean tundra
#

yea then unity can automaticly schedule them in order

warped coral
#

oh

ocean tundra
#

if your only reading a component then make sure to mark that as 'in' instead of 'ref'

warped coral
#

yeah i did that

#

if i want to use a dictionary.. i need to uh... have it be a native hashmap and copy it to some local variable first before the ForEach in order for it to be able to be scheduled parallel?

ocean tundra
#

oh in that case you dont get automatic ordering

warped coral
#

using a hashmap?

ocean tundra
#

as your storing the data outside of the entities and unity cant track that

#

yea

#

whats the hash map do?

warped coral
#

so... what would happen if i still split into three systems and used the Update attributes? the second task is the one that i wanna pass the dictionary into. Currently it's just using the dictionary directly without burst

#

it stores the commands for each player. Like for a MUD game. currently i take all the received commands from all the clients and put them in a dictionary

#

dunno if there's a better way to do it

ocean tundra
#

maybe dynamic buffer?

#

is the hashmap key entities?

warped coral
#
    Dictionary<string, List<string>> commandMap = new Dictionary<string, List<string>>();```
ocean tundra
#

oh strings

#

cant use strings in ecs

warped coral
#

yeah.. player name to a list of their uh... commands. Yeah im using without burst. If i want to make it able to be scheduled parallel... should i make it with FixedStrings and then pass that to a local variable in ForEach?

ocean tundra
#

can you get away from strings completly? i think even fixedstrings would be hard

warped coral
#

still dunno which containers scheduleparallel works with. does like.. schedule parallel try and interpret what to do or idk

#

i dont think so...

ocean tundra
#

well each player is a entity right?

#

and theres a limited amout of commands?

warped coral
#

i need to take their commands and then add them into ecs. I put the commands in a buffer for each command system to use regex and parse/consume the command

#

and also by using regex i can't use burst ... idk how ๐Ÿ˜ฆ

#

idk if i did stuff alright... but i cant use like... a lot of classes with ecs. like Regex, TcpClient

ocean tundra
#

yea you cant use like 90% of c#

warped coral
#

yeah... idk if i'm bridging between them right

ocean tundra
#

is it a mp game?

warped coral
#

yeah

ocean tundra
#

๐Ÿ˜›

warped coral
#

offline, online, or server

ocean tundra
#

yea, its hard

#

for me i setup like this

warped coral
#

i just have an abstract session class with write/read/parse methods on it, then i have offline, client, and server subclasses from that

ocean tundra
#

each player has a stuct containing a TON of native lists, each native list was for 1 command (eg select unit, move unit)
and it would contain job handels (as unity cant track dependancies for native lists)
when the player does something it will be written into that list and job handle set
then another system will schedule a job to be dependant on that handle and read from that list, depending if its networked or not it will then send it to the server

#

server then reads incomming packets, figures out what type they are and then adds them into a server verson of that same stuct (except having a native list per player) again setting up job handels and other jobs scheduled against that

#

was super painfull to work out

#

and had SOOOO many job/world scheduling issues

#

eg server world updates at 10 fps, and if its running a client locally thats runnibg at 60 fps, but they both need to write data into eachothers lists (no network connection)

#

i would recommend staying away from the crazyness that is custom mp ๐Ÿ˜›

#

even tho i wont take that advice

#

take a look at DOTSNET

warped coral
#

ok

ocean tundra
#

im planning on rewriting my mp stack and releasing that open source

#

maybe that could work for you

ocean tundra
#

Sorry probably sounded a bit negitive ๐Ÿ˜› just custom mp = crazyness

ocean tundra
#

How do native streams work if your writing all sorts of different types into it?

#

When you read or peak you need to supply the type? so you have to know the type in advance?

#

also does it work with any struct?

opaque escarp
ocean tundra
#

yea that makes sense

#

based on my reading of the docs it looks easist to just have 1 stream per type

opaque escarp
#

Unrelated question, anyone know if there's a way of doing random-ish writes safely, that doesn't have to rely on an Entity Command Buffer?
At the moment I have a system that writes its value to another entity any time it's changed, and I love the speed bonus from only doing it on change, the problem is that using an ECB takes a whopping 40x longer than a straight random write from ComponentDataFromEntity with NativeDisableParallelForRestriction

#

and to top it off said performance hit happens on the main thread

ocean tundra
#

Maybe a 'event entity'?

#

no you still have to use ecb...

#

so for one of my issues i reversed the issue

#

entity b would read from a

#

but that loses out on the change detection

opaque escarp
#

yeah

ocean tundra
#

you could try a hashmap?

#

write entityA value into that

#

then schedule a job to read from that hashmap/list thing

opaque escarp
#

doesn't that still lose out on change filtering?

ocean tundra
#

or even a normal entities foreach and do hashmap.containskey or something

#

where do you want the change filtering?

#

when entityA changes or B?

opaque escarp
#

data on A changes, propagates that change to B

ocean tundra
#

I think componentDataFromEntity is correct then..

opaque escarp
#

The issue is it's so unsafe. If there was a way for me to tell it "hey, only this job is allowed to write to that component, ever", or even better in this case "only this specific entity will ever write to that one, throw an error if any other tries", that'd make me feel much better

#

don't want undetected race shenanigans

ocean tundra
#

ohhh

#

the issue is your using sheduleparallel?

opaque escarp
#

I'm using an ijobchunk, I originally tried with .Schedule instead of ScheduleParallel but it seemed to suffer from the same issue

#

ijobchunks just seem to do parallel regardless of if you say parallel

#

but I also would want to avoid the case of another system writing to the written value

ocean tundra
#

i think what your doing is the fastest way

#

but as you said, maybe not safest

low tangle
#

ComponentDataFromEntity(false) (non read only) is the only way to do direct writes

ocean tundra
#

no way to guarantee EntityA and EntityB is a 1 to 1 link?

low tangle
#

you're gonna have to tell it that its allowed to write to it though

opaque escarp
#

ofc. I have it working with CDFE, it's just the unsafety of it is exceptionally unsettling

low tangle
#

'guarantee' a link, or do you want a valid up to date entity ref? @ocean tundra

#

its not unsafe, if you validate that your logic doesn't allow for it to read+write during a job when you might pivot on said value

#

most of the time when you just write out to a value, it never even matters that its 'safe' to write anyways. but you might just want to switch to transient data durning the job, though native arrays, and then the final job writes out any data for the next frame to start with

ocean tundra
#

to confirm i understand the issue?
EntityTypeA-1 updates EntityTypeB-1
EntityTypeA-2 updates EntityTypeB-2
BUT your worried when
EntityTypeA-3 updates EntityTypeB-1

low tangle
#

sync points and/or setting up job chains is how you validate what the current state of the component will be when your system runs @ocean tundra

opaque escarp
#

I'm worried that I'll forget about the fact that only one thing is supposed to be writing, later on in the project. Or that someone else is using my code, and doesn't know

low tangle
#

well in that case you might want to rework the logic to omit the random write

#

if you describe the logic I might be able to help with that. there are a lot of ways to pull off desired logic with ecs

opaque escarp
#

yeah, I have an already-working safe read-based system, but I wanted that speed boost from only updating on data changes instead of reading every frame, when the data in question will probably only change at most once every 2-3 seconds

low tangle
#

ah so the event system problem

ocean tundra
#

so your read safe way is EnityB reads values from EntityA?

opaque escarp
#

yes

ocean tundra
#

you could store the chunk change value and compare that

#

of entityA

low tangle
#

how many entities is this that are effected by the write

ocean tundra
#

that will mimic WithChangeFilter

low tangle
#

is it 1 signals a large volume of change, or is it one to one, with a total count of 1K+

opaque escarp
#

one to one for the most part, 1k+

opaque escarp
#

would it really be more efficient that just eating the random read?

ocean tundra
#

no idea ๐Ÿ˜›

#

need to try it and profile

opaque escarp
#

profile all the things

low tangle
#

if its one to one, can you do a direct update within the ForEach, if you moved the signal value into one of the components?

opaque escarp
#

they're in separate entities, idt foreach allows for that

low tangle
#

and a follow up to that, is the value change and the entities updated grouped with some sort of high level logical chunk?

opaque escarp
#

default chunk grouping, chunks of type A do not correspond to chunk of B

low tangle
#

hm, can you give me more info on the big picture

#

you can be super abstract

opaque escarp
#

it's a Buff and Resource system. Buffs can be applied that increase stats on the main entity

#

the Resources can have changes every frame, so I'm using Reads for that over the writes, but since buffs being applied on consecutive frames is unlikely, I'd rather avoid that

low tangle
#

ah, that helps a ton

#

so your resource, needs to know what buffs to apply to it, this frame, but only once, until a few seconds later you might need it again?

opaque escarp
#

Buff A is activated, that increases Speed of Entity B. When Buff A runs out, the SPeed on Entity B drops back to its previous value. idt the resource part of the system is relevant, unsure why I brought it up

ocean tundra
#

and buffA can effect many Entities?

#

eg a AOE speed buff?

opaque escarp
#

for the purpose of this let's assume it's 1 to 1. It can actually do multiple, but that's handled by a different part of the system

ocean tundra
#

so for this i would structure it all on the target entity

low tangle
#

okay so your trying to map a single buff to 1-n targets, using a entity ref, and are doing a random write, from the buff or target?

opaque escarp
#

from buff to target

ocean tundra
#

eg entity has SpeedStat component, and SpeedModifiersBuffer

low tangle
#

I think flattening all buffs on a per target (npc, w/e) is what I'd attempt to do

#

flatten and apply current state of all buffs onto target every frame

#

only have to deal with variable n of number of live buffs, and no random crossing writes

opaque escarp
#

the issue is if the values on the buff change. Such as a speed buff that decreases in strength as time goes on, or such. Having a buff that holds a "flattened" representation of the buffs loses any references that could be used for such a thing

low tangle
#

the flattened stack of buffs would be current each frame, so the buffs being updated by other systems would be ran first, giving a live value before the flatten

opaque escarp
#

how does that get around the random write?

#

I think that's how I'm doing it now essentially

low tangle
#

run for all buff0 - store into hash map containing a all buff stats struct
run for all buffN - store into each hash entry, updating
run for all targets - lookup read each value
just have to use a stable ID for your targets (entity is stable)

all linear loops. followed by a single linear random lookup and write.
I will note that people argue about buff systems a lot in here and dots fourms, wait a few hours and someone will give you another way to do it

opaque escarp
#

lol noted

#

thanks, I'll give a hashmap based method a shot

low tangle
#

because of the whole target-event-ref setup theres about a million ways to pull off buff systems

opaque escarp
#

tbh that's why I'm so excited about DOTS and performance stuff in general. OoP got to feeling very linear for me for many years. DOTS feels like an art form

low tangle
#

since I imagine your buff-able values are a small set of values, it makes sense to just have a struct that contains all values within it, to act as your flattened value. you can concat values too, so have +50% move, added to +100% move

ocean tundra
#

yea everyone has a different way for buffs

#

๐Ÿ˜›

low tangle
#

then your apply final run is just, evaluated current movement speed = 2346% move buff * base input move value

#

if you get stuck on this let me know and I'll write a system that does this (contrived ofc)

opaque escarp
#

I think I'm good with all the help I've received so far. I didn't really consider hash maps. I think I'll get that implemented and then compare it to the random read and writes, see what ends up being best

low tangle
#

sounds good, in my personal experience a hashmap setup usually wins

ocean tundra
#

my issue with hash maps is its outside the automagic dependancy tracker

low tangle
#

more data is always nice

ocean tundra
#

so you may need to watch job handles

low tangle
#

shouldn't have to at all

#

just chain your system that flattens and write out at the end of the chain

opaque escarp
#

yeah I got a (literal) crash course in job handles earlier, even if I have to do shenanigans with them should be good

low tangle
#

other system come before or after it will already complete or be scheduled before

ocean tundra
#

sorry just clicked, you dont read the buffs out of the hashmap, just using it during caculation?

low tangle
#

try to work with the system, get the hang of the golden path before getting zany with the scheduling

#

yeah, either you try to do safe read/write to it for the multiple buff type passes, or you swap chain the buffer and alternate two hashmaps for read write

#

if you got the swap chain route, you can get a easy win by warming up both hashmaps in the first job (write to both)

#

then you wont have any new buckets getting alloc'ed later on

ocean tundra
#

Theres no concept of single producer multiple consumer anywhere in dots is there?

#

like i want to watch when Translation gets updated, then trigger a bunch of stuff

#

๐Ÿคฆโ€โ™‚๏ธ With Change Filter would do that...

low tangle
#

per chunk level is economical, but you have to scan though the chunk and find the ones that actually changed (hopefully more than one)

ocean tundra
#

yea thats what im thinking

#

but after that it would be nice to have just a single 'thing' that can then trigger all the next stuff, eg a native stream but with many readers

#

will probably just make many native streams (1 per reader type)

low tangle
#

events and caching are somewhat complex to do performant, I just keep my stuff light and run it all the time

#

event entities for the small N, and it really hasn't failed me

ocean tundra
#

normally i would agree, but this is for network syncing stuff and I dont want to be sending the same info over and over

#

I'm probably going to have to keep a cached copy of the last value and then combo checking that value and WithChangeFilter

low tangle
#

oh for networking at I keep that signal updated every frame and checked every frame

#

even at 2m network entities it was still fine

ocean tundra
#

Ooo very cool

#

what networking stack?

low tangle
#

just have to make that really really light, and let hashmap generate the much much smaller set of whats actually read to be processed

#

custom, only within burst and entites

ocean tundra
#

and what trasport?

low tangle
#

unity transport before, but its migrated a few times now

ocean tundra
#

yea i used Enet last time

#

but considering transport this time

low tangle
#

I'm currently using litenetlib due to some external prototyping

#

working on a cloud setup with some raw servers in c# for the moment, and eventually will move them again later

ocean tundra
#

yea that makes sense

low tangle
#

the unity side is now the small side, being a single client

#

so it doesn't matter what I pick. its only the server that has to handle the big work

ocean tundra
#

how did you find using unity Transport?

low tangle
#

well a year ago it was fine. its just a thin wrapper over c sockets at that time

#

tested to work within jobs/burst which was more restrictive then

ocean tundra
#

whats your project?

low tangle
#

VR social sandbox on a few different platforms

ocean tundra
#

very cool

#

how much of the project is DOTS?

low tangle
#

the core of it has be fully dots since 2018 when it came out

#

the rendering isn't obviously

ocean tundra
#

i considered messing with VR + dots ages ago, but had enough issues using all the core gameobject stuff from the sdks

low tangle
#

yep there all messes

#

and the new XR stuff is more of the same

ocean tundra
#

haha that was my opinion then too

#

๐Ÿ˜›

low tangle
#

I check in every few months, its getting close but still not there

ocean tundra
#

whats the new unity XR stuff called?

low tangle
#

uh, openxr and unity xr

#
  • oculus's xr runtime (built in)
ocean tundra
#

my index just sits around gathering dust atm, would be nice to develop something for it

low tangle
#

good luck, I've been at this for so long now

#

I'd like a clean break from VR, but that isn't happening

ocean tundra
#

๐Ÿ˜› ill probably just stick to building a mp stack that will be enough work

low tangle
#

yep

#

try not to overwork yourself

ocean tundra
#

yea im good at that

#

for now just a mp stack and some samples is what i want to make

#

my last attempt got everything working but was annoying to work with

#

as it was game + networking

#

and was too easy to break the codegen which then breaks your project code

low tangle
#

yep

#

gotta get back to work, good luck

warped coral
#

can i use multidimensional arrays in component data

#

nevermind

zenith wyvern
#

What do you mean by persistent reference?

vagrant lotus
#

oh my mistake, let me change the question

vagrant lotus
#

Any method to get a reference(works thoughout runtime)(be it index or other wise) to a shared component?
note: I will not modify the data and the related component after grabbing the index

zenith wyvern
#

I mean if your component is implemented as a class then I guess you're getting a reference - but I'm still not sure what you mean by "works throughout runtime"

#

Works how?

vagrant lotus
#

its just unique rendermeshes and physicscolliders these two

#

but they are pre-generated pieces as part of a terrain generation

#

and putted into entities that do nothing but hold them

#

do just use getSharedComponentIndex?

zenith wyvern
#

I'm not sure how the shared component indices are implemented to be honest, my guess would be that they are recycled since shared components are ref counted

vagrant lotus
#

I need to swap them in place with actual terrain pieces in the world

vagrant lotus
#

quote

Removing things from List<object> is done by just null the element. So all ever happen to this List<object> is .Add. Never .Remove. This way we have no need to go and update all the existing indexes on all the chunks, making sure they are always usable.

#

does this means the int index does not change throughout runtime?

amber flicker
stiff skiff
#

Isn't that just when you last refreshed ๐Ÿ˜› ?

#

Or are you showing that you've been pressing that button since this morning? ๐Ÿ˜‚

karmic basin
#

Why are you so eager to break your project ? ^^

stiff skiff
#

That doesn't require you to update, only to install entities in the first place ๐Ÿ˜›

fading nest
karmic basin
#

Yeah we are all crazy people here

amber flicker
north bay
#

How long has it been since the last release 4 months?

amber flicker
#

feels like 4 years but yea, end of October.

#

tbf if it's the first time that Unity are testing all the DOTS packages together, it's a wonder it's not more like a year

north bay
#

Which is actually a really good thing since we will finally have a release of dots packages that just works.

#

But I still miss my package updates

#

...

slim nebula
#

Wait there's a release that just works? I don't believe it I'm going to have to try it

lusty otter
#

C#'s built in crypto classes don't work with Burst, right?

#

I need client to send SHA1 digest of files before they upload to the server so server can do duplication check, files can be up to 30MB and the game is targeting mobile of all ranges.

#

I'm worried that it might be too much for low end mobiles to do cryptographic hashing on files of that size, thinking maybe I could move it to Burst to speed it up.

scarlet inlet
#

Hi guys strangely enough I am not getting any feedback on the animator package in the slack unity dots channel, so I wonder if any of you used it yet

#

ping me in case, I have a simple question

amber flicker
viral sonnet
#

seems like no 0.17 release today?

safe lintel
#

ive used it, not sure if i can help because its a beast

#

also .17 is out on my package manager

amber flicker
scarlet inlet
#

thanks @amber flicker I am wondering if the Gameobject conversion already works for it or I have to rig from scratch

safe lintel
#

im afraid to update ๐Ÿฅฒ

viral sonnet
#

must be a really nasty bug in there. 0.17 was released on 11-13

amber flicker
safe lintel
#

conversion works, have you tried the animation samples @scarlet inlet ? it will need to be in a subscene if you want it to work in a build

scarlet inlet
#

I tried to convert a rigged GO to a subscene and nothing happened

amber flicker
scarlet inlet
amber flicker
scarlet inlet
#

so I am using the scoprion example, but I am not sure how it would help

#

what else do I have to check?

viral sonnet
#

lol, 0.17 just released? have to check

karmic basin
#

No .17 on my side ๐Ÿ˜ข

#

You guys in the USA, Europe, Asia ?

amber flicker
safe lintel
#

what are you expecting to happen @scarlet inlet ? animators themselves are discarded, theres no conversion yet for animation controllers > dots (dataflowgraph) animation nodes

viral sonnet
#

cool! i can see 0.17 too with 2021.1.0b2

scarlet inlet
#

forgive me I am actually not really used to hierarchies with bones in Unity, but I can see that the SkinnedMeshRenderer is not converted either

north bay
#

Did it just release?

#

I already gave up

coarse turtle
karmic basin
scarlet inlet
#

if there is something I have to study/check please let me know @safe lintel

safe lintel
#

does the model show when its converted?

scarlet inlet
#

yes, as a normal gameobject though

#

I do get conversion errors:

scarlet inlet
#

I see, I am realising now that it's a robot that dxoesn't need blending so I didn't realise it before

safe lintel
#

the basic vertex skinning shader is what im using as a starting point

scarlet inlet
#

interesting I will try and explore more, but surely I am still a bit confused

amber flicker
#

you're not the only one.. it's impressive how confusing it is

scarlet inlet
#

well it's still preview and I am not surely using it for produciton

#

I just wanted to make a demo

#

note that I do use entities havok ecs in production ๐Ÿ™‚

safe lintel
#

one more thing, assuming you have show dependency packages enabled, you should import the DataFlowGraph "Guided tour in code" samples for reading

scarlet inlet
#

is that the tutorial package? Because I removed it

safe lintel
#

i consider it essential to understanding how animation is setup(until they release a visual component to all of this)

scarlet inlet
#

I will check it

safe lintel
#

yeah its a set of like 15 scenes that explain DFG, and everything in animation is built on top of it

scarlet inlet
#

@safe lintel how come you know it so well?

safe lintel
#

i spent ages learning it because I really want animation in my project, and to ditch gameobjects for good

scarlet inlet
#

ok now tell me, why have you been more useful than the official unity team ๐Ÿ˜„

#

self-oooof

amber flicker
#

the code reads like only 2 people at Unity understand it...

safe lintel
#

i dont know, im just happy they made a self help forum after all this time ๐Ÿ˜†

scarlet inlet
#

you mean this server?

safe lintel
scarlet inlet
#

oh cool I was looking for this too!

#

thank you

safe lintel
#

new animation package too. lets see how much stuff breaks..

zenith wyvern
#

Dang, still can't use struct shared componets in a foreach

deft stump
#

0.17!?

#

nice time to update

#

wow batching ecb looks cool

#

yo Entities.WithFilter(NativeArray filteredEntities)
more micro optimization

#

๐Ÿฅณ

amber flicker
#

ugh this definitely isn't going as smoothly as I'd hoped

deft stump
#

what's entitySelectionProxy?

#

I only jsut now heard of it

amber flicker
#

yea I'm also curious - assume it's to do with editor selection?

zenith wyvern
#

Hybrid still just silently fails to render if SRP batcher is enabled

deft stump
#

Deprecated Frozen component as it is no longer in use
we had a frozen component!?

amber flicker
#

yea but it was obsolete I think? some static optimize component or something now? unsure

scarlet inlet
#

@safe lintel with the right shader I don't have errors but still didn't work. I will study all the new info you gave to me before to ask other questions

deft stump
#

I have no idea what this means...

amber flicker
#

damn these errors are unhelpful - just pointing me to blank lines

deft stump
#

so now that we have 0.17... should we now hammer the dots team for 0.18?

amber flicker
#

wait.. can we not use SetSharedComponentFilter within an ISystemBase.. gah

zenith wyvern
#

Oh. That kinda kills it for something I was hoping to use it for too

#

rip

deft stump
#

are there any docs or samples for isysbase?

amber flicker
#

not 100% - too many errors to know exactly what's going on but I think it counts as managed

#

stuff like this (0,0): Burst error BC1042: The managed class type `System.IntPtr` is not supported. Loading from a non-readonly static field `Unity.Jobs.IJobExtensions.JobStruct`1<Unity.Collections.LowLevel.Unsafe.UnsafeDisposeJob>.jobReflectionData` is not supported ยฏ_(ใƒ„)_/ยฏ

#

pointing to a closing bracket of a job struct.. so.. I guess something in the job

zenith wyvern
#

Looks like it works to me

amber flicker
#

that's a relief... could you just add a ResetFilter for a quick check while you're there? no idea why it'd be different

north bay
#

But that system is not burst compiled is it?

amber flicker
#

oh

north bay
#

Wouldn't you have to add a BurstCompile attribute on top of the struct and OnUpdate method

deft stump
#

oh nice, ISystemBase just works like regular SystemBase

amber flicker
#

yea I believe so

zenith wyvern
#

Yeah you're right

#

That broke it

#

Rip again

#

Hmm - if you set the shared filter outside the bursted function it actually does work

#

That still kinda breaks it for me though

odd ridge
#

any updates to the hybrid rendereR?

zenith wyvern
#

Like if I set it in OnCreate it works

amber flicker
#

I set it in a loop in update so no go for me but good to know

safe lintel
#

@scarlet inlet If you havent already, would definitely start out testing the samples repo(where that shader is located first) before embarking on custom models. i also noticed issues with humanoid rig models, though one of the samples uses a humanoid rig I wasnt able to get them to work(switched all to generic)

zenith wyvern
odd ridge
#

cool

zenith wyvern
#
## [0.11.0] - 2020-11-13

### Added

* Frame queuing limiting solution to avoid hazards in the GPU uploader
* Hybrid V2 should now render objects with errors (e.g. missing or broken material) as bright magenta when the used SRP contains compatible error shaders, and display warnings.
* Support for lightmaps in hybrid renderer. You will need to bake with subscenes open, upon closing the lightmaps will be converted into the subscene. (Note: Requires release 10.1.0 of graphics packages).
* Support for lightprobes in hybrid renderer. Entities can dynamically look up the the current ambient probe or probe grid. (Note: Requires release 10.1.0 of graphics packages).
* Added error message when total used GPU memory is bigger than some backends can handle (1 GiB)
* HybridBatchPartition shared component that can force entities into separate batches.
* It is now possible to override DOTS instanced material properties using `ISharedComponentData`.
* RenderMeshDescription and RenderMeshUtility.AddComponent APIs to efficiently create Hybrid Rendered entities.
#
### Changed

* Log warning instead of error message when shader on SMR does not support DOTS Skinning
* Update minimum editor version to 2020.1.2f1

### Fixed

* Fixed float2 and float3 material properties like HDRP emissive color to work correctly.
* GPU buffer now grows by doubling, so initial startup lag is reduced.
* GPU resources are now cleaned up better in case of internal exceptions, leading to less errors in subsequent frames.
* Hybrid Renderer forces entities using URP and HDRP transparent materials into separate batches, so they are rendered in the correct order and produce correct rendering results.
* Fixed a bug with motion vector parameters not getting set correctly.
* HLOD conversion code now properly handles uninitialized components
* Removed internal frame queuing and replace it with frame fencing. Hybrid renderer will now longer wait for GPU buffers to be available, making it easier to see if you are GPU or CPU bound and avoiding some potential deadlocks.
* Disable deformation systems when no graphics device is present instead of throwing error.
* Fixed a bug with converting ambient light probe settings from GameObjects.
scarlet inlet
#

@safe lintel btw do not update animation package if you still want to use the examples ๐Ÿ˜„

amber flicker
#

wait... am I crazy or can you no longer set a public int in a job? That's what this error points to but it must be something else right?

rocky path
#

was thinking of starting a project using the ECS paradigm and was wondering if anyone here would recommend it, I worry a bit since it's still in a "preview" stage. I mostly want to use it to keep things organized and scalable but I'm wondering if it's more effort than it's worth lol

zenith wyvern
#

If you put in the work it will keep things organized and scalable for sure

#

It's not easy though

zenith wyvern
amber flicker
north bay
#

huh

deft stump
#

wow

coarse turtle
#

ah they actually put compile time errors to blobs now if you add in a managed reference/pointer by mistake lol

amber flicker
#

I wonder how you found that out ๐Ÿคฃ

#

ok... looks like my strange System.IntPtr error was due to calling ScheduleParallel on IJobEntityBatch with an entity query - talk about cryptic error

amber flicker
#

... can you use the foreach lambda's in ISystemBase?

#

looks like no

deft stump
#

this is what i get for updating all the packages at the same time.

#

๐Ÿ™‚

keen spruce
#

Oh, wow. Time to introduce new and unexpected bleeding edge bugs on top of heaping pile of existing issues. ๐Ÿฅณ

warped coral
#

instead of arrays, im supposed to use dynamicbuffers in componentdata?

#

nevermind

keen spruce
#

did transport and netcode update too?

deft stump
#

arrays are considered non blittable so you can't use arrays in struct ICD.
if you want to use an array in an icd. you can use class/manage ICD's
no wait... arrays are blittable according to msdn. oops

safe lintel
#

@scarlet inlet figured it out, there were little additions or subtractions of in for node interfaces, ie in MessageContext ctx is now MessageContext ctx also for kernelnode update interface uses in KernelData data instead of just KernelData data

#

but they also made some animation components internal, damn it had a working switch to ragdoll and stuff and this update breaks that ๐Ÿ˜ข

keen spruce
#

If you have a need for a small list of ints in a componentdata then FixedListInt32 FixedListInt64 FixedListInt128 etc are good candidates

scarlet inlet
#

we need to wait they update the examples

safe lintel
#

i will go pout on the forums ๐Ÿ˜‰

warped coral
#

so.. if want a length less than 32.. it's not possible? i gotta at least use 32?

keen spruce
#

it will take up 32 bytes or

#

8 ints

amber flicker
#

my lambdas that don't match any entities seem to be taking about 1000x longer to execute over nothing than before.... wut

warped coral
#

ohhh didnt realize they were all in bytes

#

entities take up 8 bytes right

keen spruce
#

yes

warped coral
#

what happens if i make a struct more than 32 bytes and try to allocate a fixedlist of 32 bytes for it?

deft stump
#

it'll just move to the next chunk

keen spruce
#

well if it exceeds the fixed container size then I assume it will throw an error

viral sonnet
#

what's EntitySelectionProxy in 0.17? edit: Oh, it isn't new, something editor related

warped coral
#

trying to think of how to implement rooms, obstacles, and containers in ecs for a MUD. like... So... should i do like... a node-based structure? So FixedList<Entity> for children and each child has an Entity Parent field?

#

and then i guess if i want obstacles and containers to have different functionality... i have to make them all entities

#

thinking of everything in terms of data is messing my mind

#

i cant have multiple components of the same type on the same entity right? i have to use a dynamic buffer then?

safe lintel
#

could also make more entities and reference them on your main entity, but yes, only one component type per entity

warped coral
#

im pretty confused on how to structure rooms, exits, and doors

#

in oldschool muds i think they just have each room having an array for exits where each index is a direction...

#

but that's too limiting i think

#

so if i wanna be able to add/remove functionality i guess i need to make stuff entities so i can add/remove components from them.. so i guess i'll have to use a bunch of entity references... dunno how hard that is to manage or if that's slow

light mason
#

How is system execution order determined

warped coral
#

can i make generic systems and will they be autocreated?

#

so... interfaces in ecs aren't really the same as monobehaviour? instead we just use abstract systems?

#

so like.. instead of interfaces on monobehaviours... all the functionality stuff is just... system stuff?

safe lintel
#

anyone figured out how to use ISystemBase yet? ive made a simple system yet it doesnt get added to the loop(automatically), I assume there was nothing more needed to make it work?

north bay
#

The methods for referencing unmanaged systems are internal and netcode has no support for unmanaged systems

#

That's a big yikes from me

warped coral
#

oh wait.. generics can't use structs as the type param... so generic systems aren't really useful i guess?

safe lintel
#

ah false alarm, was using class instead of struct for ISB

little moon
#

Did anyone test HybridRenderer 0.11 yet? Did they fix the bug with LODs crashing HR after LODed entity is destroyed?