#archived-dots

1 messages ยท Page 124 of 1

warped trail
#

are you using latest version of Unity platforms?

amber flicker
#

if anything RooBubba's using a future version afai can tell ๐Ÿ˜…

wary anchor
#

I was using 0.2.2 preview 7 but have switched down to 0.2.1 preview 4 following timboc's pic up there

warped trail
#

restart unity?

wary anchor
#

yeah I'll kill the library again too sec

warped trail
#

and ultimate advice, delete library folder ๐Ÿ˜…

wary anchor
#

yeah already did that before, will do again now I've 'downgraded' some packages

zenith wyvern
#

Dreaming of the day when UPM can figure this out on it's own

wary anchor
#

I can only imagine the unholy hell of trying to code a package manager

#

WOO we're there, I'll have to rewrite a load of old JobComponentSystems now in the new style with SystemBase but that's all manageable. Thank you very much for your help, @amber flicker @zenith wyvern @warped trail

#

but first, another backup ๐Ÿ˜„

amber flicker
#

Glad to hear it.. obviously not good that happened but good if you can get going again

wary anchor
#

well you expect a certain amount of this with preview packages, it's all good ๐Ÿ™‚

amber flicker
#

yes.. I have my own nightmare to track down... it would appear CreateAdditionalEntity on conversion not actually creating any entities in a very specific scenario (but works fine in another project) so I think some nightmarish timing issue

wary anchor
#

yikes. I ended up making a big chain of systems for loading time where each one runs once on an event component being present, deletes it then creates the next component in the chain

#

works surprisingly nicely even if conceptually it's horrible ๐Ÿ˜„

frail seal
#

Entity archetype component data is too large. Previous archetype size per instance {archetype->InstanceSizeWithOverhead} bytes. Attempting to add component size {componentInstanceSize} bytes. Maximum chunk size {chunkDataSize}.

#

Uh, help

mint iron
#

put smaller/less components on your archetypes perhaps

frail seal
#

I can't

zenith wyvern
#

Your component is too large to fit inside a chunk

#

Your archetype rather

#

If your entity has dynamic buffers on it you can add [InternalBufferCapacity(0)] to force it to allocate on the heap so it doesn't impact how much space in the chunk your entity takes up

frail seal
#

It does use dynamic buffers, more specifically 2-capacity (Entity), 1024-capacity and 2048-capacity (double).

#

But heap is slower, right?

#

Is there no way to make chunks bigger?

zenith wyvern
#

I don't think so

frail seal
#

So many gosh darn limitations

#

2 whole days of drowning in errors

#

Well, that worked

#

Thanks a lot

#

Nice, I reverted my file quite a long period of time back in time to get a function I removed for some reason

#

But then I couldn't revert back into the present

#

Even though I did not save changes after arriving into the past

#

I love Visual Studio

zenith wyvern
#

Ouch

vagrant surge
#

@frail seal the point of dynamic buffers is for them to be very small

#

if they are large they shouldnt be dynamic buffers, but more stuff like native-list

frail seal
#

Yeah-yeah, okay

#

I'm just dying on the inside a little bit (a lot)

vagrant surge
#

as a rule of thumb, the smaller your components, the better the ecs works

frail seal
#

I practically wasted 3 hours

zenith wyvern
#

But you can't attach a nativelist to an entity

vagrant surge
#

you cant?

zenith wyvern
#

Unless I'm missing something

#

If you need a resizable list on an entity, Dynamic Buffer is the solution

mint iron
#

But heap is slower, right? chunks are on the heap too; its just adding one more ptr dereference.

opaque ledge
#

true, but its still fast i think

mint iron
#

yeah with the amount of hoops the defualt collections jump through already with their access methods i'd be surprised if the difference is significant.

#

But you can't attach a nativelist to an entity true but you can add an UnsafeList to an entity. It might be faster to manage it yourself but DynamicBuffers are basically the same thing with added benefits like being automatically deallocated.

warped trail
#

i heard this a lot of times DynamicBuffers being automatically deallocated but i don't fully understand this ๐Ÿค”

zenith wyvern
#

I haven't tried that, is it really as simple as just adding Unsafe* as a member of the component struct? You don't need pointers or anything?

warped trail
#

DynamicBuffers is basically just component, why do you need to deallocate component๐Ÿค”

mint iron
#

@zenith wyvern they have been adding "Unsafe" prefixed versions of the collections in recent versions; most of the safe versions now are just wrappers around the unsafe version and add safety. UnsafeList can just be a member of an IComponentData and exposes all the same list methods you'd expect.

zenith wyvern
#

The only difference being you have to manually call dispose before removing the component?

mint iron
#

exactly

zenith wyvern
#

Huh, good to know

#

I thought you would still have to use pointers with the Unsafe version of the containers so I was too scared to use them, hahah

mint iron
#

@warped trail yeah if you go beyond the default size allowed for a dynamic buffer in a chunk, then it copies the data out elsewhere and all the DynamicBuffer methods can auto switch between in and out of chunk locations. So if you've forced it to go out of chunk, then its been 'allocated' and needs to be free'd at some point. When chunks remove entities, they have to go through and deallocate any space the buffers might have created. Its just going through every buffer component and calling Dispose() on it.

warped trail
#

wait, you don't have to dispose fixel lists๐Ÿค”

zenith wyvern
#

FixedList is "faking" a resizable list

#

It's always a fixed size in memory regardless of how much you add to it or remove from it

#

Same as FixedString

warped trail
#

wait, im just confused๐Ÿ˜… You can add unsafe version of NativeList to components?

mint iron
#

A dynamic buffer isn't nessesarily fixed. It does have some fixed space set aside in the chunk for it to use.

#

but if it needs more than that amount, it then starts pointing to a location elsewhere.

#

if you remove enough items, then it goes back to using the chunk space again.

coarse turtle
#

@warped trail yep you can - you do lose some serialized debugging in the entity debugger tho

mint iron
#

the default is actually quite small unless specified, most people will be using non-chunk dynamic buffer space id wager

zenith wyvern
#

I thought Unity would need to know the exact size of the component to properly fit it in a chunk. I thought that's why you need to explicitly specify the "default" size of a a dynamic buffer

#

So it can move it out if it needs to like @mint iron described

#

So I'm confused how that works with UnsafeList

frail seal
#

Finally!

#

Oh my gooood

#

It finally works

#

Just like butter

bright sentinel
#

I guess that's why it's called UnsafeList. But I don't think ECS actually needs to know component size, they just fill in entities into the component until it's filled, then create a new chunk

frail seal
#

0.2 ms too (9 nodes)

dull copper
#

@vagrant surge I didn't check it yet, seems to be yet another DOTS game project

mint iron
#

the actual component data a DynamicBuffer uses has BufferHeader https://pastebin.com/raw/72bLEAK6 but then is directly followed by the in-chunk space reserved, so you need to stride with the SizeInChunk from the IBufferElementData's TypeInfo

dull copper
#

I wouldn't be surprised if it's just some quick demo

#

(or something propagated from hackweek)

frail seal
#

500 nodes is only 7 ms, DOTS is awesome

hollow sorrel
#

@zenith wyvern UnsafeList is basically just a pointer stored on the component to a list, which is a constant size
the actual contents will never be in the chunk

frail seal
#

I can finally sleep

zenith wyvern
#

@hollow sorrel Ahh okay, thank you

amber flicker
#

Nice one @frail seal - hope itโ€™s faster than your old version ๐Ÿ˜

vagrant surge
#

that sounds slow

#

what are you doing?

#

500 of x at 7m is very slow

frail seal
#

About 10x faster

zenith wyvern
#

That makes sense, then I guess in that case you don't really have your data nicely laid out in memory

coarse turtle
#

Malloc likely calls the C like implementation - so it's likely just pointing to a place on the heap too

frail seal
#

@vagrant surge I am running 3 foreach loops per frame, within each I loop 1024 times per entity - I either grab values from other entities and store them into buffer or do maths between buffers of a single entity

#

Something like that

vagrant surge
#

thats a looot of loops

frail seal
#

Yup, I am doing sound generation after all

#

Via node tree

#

Basically a synth, but digital instead of analogue

hollow sorrel
#

yea that's why dynamicbuffer lets you choose
when you iterate a component with a dynamicbuffer in a system ForEach and you're only touching the component data + buffer data, if it's all in the same component array it should be slightly faster than looking up a seperate array outside the chunk

zenith wyvern
#

I guess using UnsafeList would be similar to just using DynamicBuffers that are always allocated on the heap then? Except you have to dispose it yourself

hollow sorrel
#

yeah pretty much

vagrant surge
#

ah, thats absolutely not an ECS thing @frail seal

#

thats the sort of thing you sholdnt use the ecs for

hollow sorrel
#

i think dynamicbuffer handles serialization for you tho if you're using that and unsafe versions don't

frail seal
#

In pursuit of performance, DOTS community slowly adapting assembler

vagrant surge
#

but just direct jobs and burst api

zenith wyvern
#

Thanks for explaining so clearly, feels good to learn things ๐Ÿค“

frail seal
#

@vagrant surge But I want it to be super-quick and run in parallel

#

So... so.. Yeah

vagrant surge
#

thats jobs or burst, ecs is not needed for that

frail seal
#

Why not?

#

Explain to me like I'm 6 years old

zenith wyvern
#

An IJobParallelFor will still run in parallel and gives you better control over batch sizes per thread

vagrant surge
#

@frail seal the ECS is a "bag" data structure, you use it when you have tons of systems you want semi-autoparallelized, and have quite changing objects with different sets of components

#

if you have a given "algorithm", its not a good idea to use the ECS for it

#

just use the jobs api for the muleithreading and the burst compiler stuff, and you will get quite better perf

#

because you have more control

mint iron
#

@frail seal ecs has a lot of overheads that are intended to make it flexible (chunks, adding/removing components), if you're doing something that needs extreme performance it would be faster to write something specialized and then run it in burst jobs directly without ECS.

frail seal
#

Okay, gotcha

#

Though I always thought that Burst is for DOTS only

vagrant surge
#

as an example, instead of having your stuff as entities, have your stuff in a contiguous array

#

and to connect stuff to each other (graph), use int IDs to that array

#

this will be much faster than having entities accessing other entities

amber flicker
#

DOTS = ECS + Burst + Jobs.

frail seal
#

@vagrant surge So I should just store all my data in multiple NativeArrays, where each one represents a component of my node or something?

vagrant surge
#

indeed. But that depends on your algorithm

frail seal
#

I am quite shaky at the moment with understanding where ECS's performance even comes from, so I am not sure how I should even organize my data

vagrant surge
#

ECS perf comes from burst and jobs, and from linear data layouts

#

when you do a query (for-each), the layout of the components is generally equivalent-ish to structure of arrays, contiguous

frail seal
#

Ah

#

So memory consists out of many entities, laid one after another?

vagrant surge
#

not exactly

#

there is a talk about it

#

multiple in fact

frail seal
#

By entity I mean group of components

#

But, oh well

#

Thanks for the info

vagrant surge
#

components are on arrays by their type

#

entity ID is used to index into them

#

also chunk layout stuff. Takes a while to explain, so better to just watch one of the many unity talks about it

frail seal
#

I'll just do that

#

Welp, thanks everyone for everything

#

I'm out

amber flicker
#

rest well - nice work making the progress you have so far

nimble ether
#

Is there an issue with Jobs preview package 0.2.7?
0.2.6 works good. I update to 0.2.7 and I can't compile. The compile error isn't from my code

#

is there a Unity forum for Jobs. I'm having issues locating it

safe lintel
#

0.2.7p11 works for me, could be other dependencies if you upgraded them manually

#

the dots forum is the forum for jobs

#

notably there is an issue with properties if you changed that to the latest instead of what the various dots packages rely on

nimble ether
#

@safe lintel thank you for all this

#

the issue might be that I don't have the DOTS package

#

I'm just using Jobs and burst

safe lintel
#

dots is just an umbrella term for those packages(as well as entities etc)

nimble ether
#

I thought they have a package called dots now. Maybe I'm getting confused with entities. I slimmed it down when I was trying to figure out what was causing some crashing issues

safe lintel
#

well somewhat confusingly there is a package called dots editor, which maybe should be renamed entities editor but im just the messenger ๐Ÿ˜‰

nimble ether
#

haha yeah

#

mm yeah you're right this is a dependencies issue

#

unity.collections doesn't have the right dependencies

#

anyways I'll figure this out

#

thanks for your help

safe lintel
#

pretty sure Ive read at least a few complaints on the forums with other people running into this

nimble ether
#

I have to use the Burst preview and not the release burst package I think

#

but Jobs package doesn't enforce this dependency

zenith wyvern
#

Is the physics debugger supposed to not work while the editor is playing?

warped trail
#

Physics Debug Display?@zenith wyvern

safe lintel
#

it needs to be converted to an entity

zenith wyvern
#

Yeah I mean how it shows colored boxes for all the physics shapes - it's only showing until I press play

#

They are entities

warped trail
#

@zenith wyvern i guess this is PhysX

safe lintel
#

damn i just screenshotted mine ๐Ÿ˜„

zenith wyvern
#

Ahh okay, thank you

#

It works

dull copper
#

yeah, the physics debugger only shows before you enter play mode because they are physx objects prior to converson

#

I feel it would be better to just use physics shape and physics body instead to make it more clear

safe lintel
#

it shows what it gets created to in editor though as a wireframe

dull copper
#

well, it's not 100% accurate still

zenith wyvern
safe lintel
#

using the new authoring components that is

dull copper
#

or are you talking about the new physics debug display script?

warped trail
#

@zenith wyvern i suggest to use Draw Collider Edges๐Ÿ˜…

safe lintel
#

me? if you use the authoring shape, it shows the actual dots collider, not the physx equivalent

zenith wyvern
safe lintel
#

are you just using the stock authoring components? hard to tell from a debug display

#

also the debug display is kinda irritating with the clipping

warped trail
#

don't use draw colliders๐Ÿ˜…

zenith wyvern
#

I am for the one on the right, the one on the left is dynamically generated. It looks like the collider it's ending up with is malformed

#

Has anyone used MeshCollider.Create from the physics package?

safe lintel
#

might be the mass component and the center of mass?

south falcon
#

Hello. How can i find Animation package in PackageManager?

#

This package is existed in DotsSample Project

safe lintel
#

add it manually through the packagemanifest

#

YourProject/Packages/<something like manifest>.xml

south falcon
#

OK, Thank you

zenith wyvern
safe lintel
#

I dont fully understand what ive been doing ๐Ÿ˜„ but ive been using

var massProperties = MassProperties.UnitSphere;
var kinematicMass = PhysicsMass.CreateKinematic(massProperties);
var dynamicMass = PhysicsMass.CreateDynamic(massProperties, body.mass);
south falcon
#

Hello, I have another question. If I spawn a Gameobject attached with Convert To Entity script in runtime. Will the Entity be only spawned in World.DefaultGameObjectInjectionWorld ?

safe lintel
#

yeah

zenith wyvern
#

Yay, it works. I was giving it a nonsense center of mass. Thanks @safe lintel @warped trail

safe lintel
#

I had some really strange ragdoll results until I started using that ๐Ÿ˜„

south falcon
#

Do you guys know how to get Entity's unique ID in the world?

zenith wyvern
#

entity.Index

warped trail
#

isn't Entity itself a unique ID ?๐Ÿค”

opaque ledge
#

its actually not i think, since entities are reused, their ID is same, but whenever they destroyed and reused their 'version' increments

opaque ledge
#

When was i ever wrong ๐Ÿค”

warped trail
#

but you can't have entity which points to different tables at same time?

naive parrot
#

does HybridRenderer support Built In Pipeline?

zenith wyvern
#

It does right now. Moving forward I think they will only support srp

naive parrot
#

that mean ECS with Built In is not a viable choice ?

zenith wyvern
#

If you want to benefit from future updates to hybrid renderer then no, I would not go with built-in

#

If I remember right the new v2 doesn't support built-in shaders

#

@dull copper Would know most likely

dire frigate
#

Are there any character controllers available made for DOTS?

dire frigate
#

Thank you so much ๐Ÿ™‡โ€โ™‚๏ธ

formal scaffold
#

Can I turn off a System within code with an Attribute like UpdateAfter? Didn't find anything searching the code ๐Ÿค”

mint iron
#

there's [DisableAutoCreation] if you want it to not show up in the world.

coarse turtle
#

^yea that

dull copper
#

@naive parrot @zenith wyvern that's true, hybrid renderer v2 is only for SRPs

#

and we'd expect v1 to be deprecated

#

that being said, nobody forces you to use hybrid renderer at all if you just want to use entities, but it does make some things more convenient

formal scaffold
#

Thanks @mint iron it works ๐Ÿ‘

digital kestrel
#

is there a parallel version of IJobNativeMultiHashMapMergedSharedKeyIndices

#

there each hashkey gets divided into a parallel job

#

rather than 1 thread per hashkey

bright sentinel
#

@digital kestrel I haven't worked with it, but your question doesn't seem to make much sense?

#

You're saying each hashkey gets divided into a parallel job. Aren't they running on different threads?

remote coyote
warped trail
#

new Tiny package ๐Ÿฅณ

amber flicker
#

new burst though looks minor

#
- Double math builtins in `Unity.Mathematics` now use double vector implementations from SLEEF.
- Fixed a bug with `lzcnt`, `tzcnt`, and `countbits` which when called with `long` types could produce invalid codegen.
- New F16C X86 intrinsics. These are gated on AVX2 support, as our AVX2 detection requires the AVX2, FMA, and F16C features.
- Add user documentation about generic jobs and restrictions.
- Add new experimental compiler intrinsics `Loop.ExpectVectorized()` and `Loop.ExpectNotVectorized()` that let users express assumptions about loop vectorization, and have those assumptions validated at compile-time.Enabled with `UNITY_BURST_EXPERIMENTAL_LOOP_INTRINSICS`.

### Changed
- Changed how `Unity.Mathematics` functions behave during loop vectorization and constant folding to substantially improve code generation.
- Our SSE4.2 support was implicitly dependent on the POPCNT extended instruction set, but this was not reflected in our CPU identification code. This is now fixed so that SSE4.2 is gated on SSE4.2 and POPCNT support.
- The popcnt intrinsics now live in their own static class `Unity.Burst.Intrinsics.Popcnt` to match the new F16C intrinsics.
- Deferred when we load the SLEEF builtins to where they are actually used, decreasing compile time with Burst by 4.29% on average.

### Fixed
- Fix an issue where a generic job instance (e.g `MyGenericJob<int>`) when used through a generic argument of a method or type would not be detected by the Burst compiler when building a standalone player.
- [DlIimport("__Internal")] for iOS now handled correctly. Fixes crashes when using native plugins on iOS.```
dull copper
#

ah, these are not in the bintray

#

gotta come up with some way to poll the new registry :p

#

there was some commandline tool that let you browse even bintray in past

#

anymore remember what it was called?

#

I do like this one: ```Add new experimental compiler intrinsics Loop.ExpectVectorized() and Loop.ExpectNotVectorized() that let users express assumptions about loop vectorization, and have those assumptions validated at compile-time.Enabled with UNITY_BURST_EXPERIMENTAL_LOOP_INTRINSICS.

amber flicker
#

yea, likewise

vagrant surge
#

oh hey thats super useful

safe lintel
#

Almost more curious if the roadmap talk is some dude in his house doing it or if its like in a professional setting than the roadmap itself at this point

dull copper
#

๐Ÿ˜„

#

also about the burst vectorizing thing, I think the burst debugger / whatever it's called already tells on 1.3 if it failed to autovectorize something but it's not as straight forward than directly throwing a warning to users about it (I haven't checked if it does output it on console with this new thing)

#

my point being, it was possible to tell if it succeeded in past too, but they probably made it more convenient now

safe lintel
#

@dull copper did you get a chance to try out that repo for TheHardestGame? just noticed its gone, was gonna try it today

dull copper
#

huh

#

I think I cloned it but I think they pushed some update after it

#

but I should have the first version locally here ๐Ÿ˜„

#

I tend to grab these asap in case they do things like... immediately remove the repo after ๐Ÿ˜„

safe lintel
#

yeah I meant to but just also lazy ๐Ÿ™‚

dull copper
#

they used internal registry for it's packages

#

I can check if we have access to these without

#

haven't checked if the IPs match :p

#

but yeah, that game doesn't seem to even use bleeding edge packages, it tries to use one older collections package that doesn't exist but I'm sure it can be replaced by some other version

safe lintel
#

gonna miss browsing bintray

dull copper
#

I'm currently trying to figure out a way to list the current registry here :p

#

it should be a npm registry, you at least could list bintrays contents using some nodejs tool

#

so while there's no bintray, if it's a public access registry and uses same protocol, one should be able to list the contents without unity package manager

junior fjord
#

I have a relatively simple but large world. Think rimworld (or pokemon without the forrests). so large open terrains and in between I have maybe mountains that are a plateau for themselves, i.e. I can only access them from certain directions. What would be the cheapest way to do pathfinding in dots? is there something implented already?

#

I want a lot of entities but since the terrain does not change to often I could precalculate some stuff if that is possible

dull copper
warped trail
#

omg ๐Ÿ˜‚

dull copper
#

I can tell this game is impossible

safe lintel
#

looks like a gamejam project

warped trail
#

you haven't played it?

#

this game was sort of popular 10 years ago๐Ÿ˜…

dull copper
#

I know how you are supposed to play that but I can't

warped trail
#

thats why it is called hardest game ๐Ÿ˜‚

dull copper
#

the moment I'm trying to change direction, the objects hit me

#

I'm way too slow

warped trail
#

just go up or down

dull copper
#

yeah, I tried ๐Ÿ˜„

zenith wyvern
#

Wow, kiss goodbye to your Gamer Cred

dull copper
#

you can't even position the player so precisely that it would be in right place for that

#

๐Ÿ˜„

#

this would be hard even in slow motion

warped trail
#

it is kinda easy really

safe lintel
#

he says without playing it ๐Ÿ˜„

dull copper
#

yeah, it was totally easy on my mind too

warped trail
#

i played it 10 years ago

#

๐Ÿ˜…

dull copper
#

I totally get how you should move to zigzag through that

#

oh wait

#

it's using simulationgroup

#

so it's tied to framerate :p

#

I put fixed timestep to 10x slower and game crawls now

#

so I don't think I got even fair chance :p

#

this is so broken ๐Ÿ˜„

#

basically player movement is tied to framerate

#

but those moving blocks are not

zenith wyvern
#

Did anyone try the update project tiny samples?

#

The runtime mesh one doesn't work for me

dusty scarab
#

I remember this game

warped trail
#

works fine๐Ÿค”

zenith wyvern
#

Are you using the same version of unity they made it with?

warped trail
#

but i guess you can't run it in editor at all๐Ÿ˜•

zenith wyvern
#

Oh

warped trail
#

latest 2020

zenith wyvern
#

Yeah if I do a manual build it does work, weird

opaque ledge
#

30 mins until stream ๐Ÿ‘€

warped trail
#

it is not weird at all๐Ÿ˜…

zenith wyvern
#

As far as I know we are supposed to be able to run these in the editor

warped trail
#

i guess this part is in heavy development๐Ÿ˜…

#

...has no dependency on the existing UnityEngine. Our goal is to ensure that if a project is compatible with the DOTS Runtime, it also works in DOTS Hybrid / Unity. (Weโ€™re not there yet.)

coarse turtle
#

oo that's cool

warped trail
#

not so cool, if you want to test things in editor๐Ÿ˜•

coarse turtle
#

that's true

#

I do enjoy minimal dependencies

warped trail
#

things that will work in editor, won't work in build and vice versa

#

but it is cool, that i can build and play tiny project faster, than i can compile and enter playmode in classic Unity๐Ÿ˜…

vagrant surge
#

for an example of that taken to the absolute limit, check OurMachinery

#

ECS runtime, and the entire engine itself is a bunch of plugin dlls

#

the editor is just a standalone app that loads this plugin dlls (including your game dlls) and has the whole editor thing, but you dont need it at all, and could ignore it enterely if you wanted

zenith wyvern
#

Yeah the other samples work fine in the editor so it just seems like a bug in that specific sample

warped trail
#

i don't think it is bug๐Ÿค”

zenith wyvern
#

Then why would the other samples work but not this one?

warped trail
#

because Tiny has their own renderer which don't work in editor

zenith wyvern
#

It does work. It works fine in every other sample...

warped trail
#

so you have authoring components, in editor conversion system converts them to Unity hybrid renderer, in dotruntime they convert them to different renderer

#

just look at package code

#

at runtime they use glfw for input and window management and bgfx for rendering

fallow mason
#

5 minutes to roadmap talk ^

warped trail
#

at least in desktop

#

it is like entirely different engine at runtime๐Ÿ˜…

junior fjord
#

is project tiny thought for 2d games in general or for ads?

#

and unity mathematics offers no matrix operations does it?

safe lintel
#

when i initially saw tiny it seemed aimed at ads and I was like oh hell no! but now im assuming more and more its an efficient alternative for 2d in general(when it matures)

fallow mason
#

also, supposed to become the de facto way to publish for web eventually

zenith wyvern
#

@warped trail I can run the Tiny3D racing sample in the editor. It renders fine, it plays fine. I cannot run the runtime mesh sample. They are both using the same renderer. If one of them doesn't work, how is that not a bug?

#

Tiny is not just for 2D, they are making it for lightweight 3d as well

#

and unity mathematics offers no matrix operations does it?
@junior fjord

Yes it does, float4x4 is identical to a Matrix4x4

dull copper
#

still counting down

warped trail
#

when you run Tiny3D racing in editor it may look the same, but is not the same under the hood

junior fjord
#

@zenith wyvern oh great

amber flicker
#

This roadmap looks on course to take an hour tell us what we know already.... ๐Ÿ˜ง

dull copper
#

well, we know most of the things already :p

#

but we don't know the new estimates for the feats to land at

safe lintel
#

most of us here keep up with this stuff but id expect a majority dont

dull copper
#

oh snap

wooden canopy
#

crap

dull copper
#

experimental things going to focus groups

#

that sucks

safe lintel
#

yeah

dull copper
#

bloody hell

coarse turtle
#

):

warped trail
#

they make another demo shooter? ๐Ÿ˜…

wooden canopy
#

they want that sweet battle royale money

worldly pulsar
#

BattleRoyaleSample ๐Ÿ˜„

#

oh yes, Package Manager is definately an experience

bright sentinel
#

New resolver ๐Ÿฅณ

dull copper
#

that feedback thread is going to get crowded ๐Ÿ˜„

bright sentinel
#

But pretty happy that they're working on stability/UX rather than new features

coarse turtle
#

Ooh Performance Counter API ๐Ÿ‘€

fallow mason
#

mmorpg checkbox plzzzz ๐Ÿคž

bright sentinel
#

Haha the FPS code is barely working as is

#

And I think they focus on RTS and Fighting games first

zenith wyvern
#

Huh. I remember a time when they said they would never support runtime recompiling

bright sentinel
#

With Burst and LiveLink it's a lot easier tho

dull copper
#

I'm guessing burst enables them to do this

coarse turtle
#

I think that's the idea behind livelink

dull copper
#

yeah

#

well, you don't even need livelink

warped trail
#

why there is no word about Visual scripting only for DOTS ?

coarse turtle
#

isnt visual scripting only for DOTS by unity? ๐Ÿค”

#

I havent tried that package yet

dull copper
#

yes

#

the point was more like, they could have mentioned it's for DOTS

#

people who have not followed the development and watch this stream may think they can use it for regular monobehaviours

safe lintel
#

hierachy folders, wow

fallow mason
#

so instead of parenting transforms to organize, we could use folders?

dull copper
#

the animation stuff is kinda bummer

#

even kinematica is using old tech underneath

zenith wyvern
#

That's great. Too many people use GameObjects like folders already without thinking about the performance cost

dull copper
#

ah, they are bringing kinematica still to dots

coarse turtle
#

wait I missed the hierarchy folders - what does it do? ๐Ÿค”

safe lintel
#

kinematica, is that even available as preview?

dull copper
#

no

#

but they keep teasing it

safe lintel
#

i know right

warped trail
#

so they will release kinematica before DOTS animation?

fallow mason
#

yeah, thats nice. I wonder if its a step in the direction of GOs without transforms someday

safe lintel
#

just a folder apparently @coarse turtle , i would assume no gameobject involved

coarse turtle
#

ah - that's cool

dull copper
#

I'm guessing they refer to baked GI on that last thing

worldly pulsar
#

"still in early development"

coarse turtle
#

I wonder what happened to Cinecast ๐Ÿค”

wooden canopy
#

this talk could have been just the slides

bright sentinel
#

That's a lot of cameras, but I wonder if they're all rendering ๐Ÿค”

wooden canopy
#

its mostly just reading the slides slowly over an hour

dull copper
#

@wooden canopy you haven't seen earlier unity roadmap talks?

#

it's always going through slides

wooden canopy
#

yeah but I think they explain a bit the bullet points

dull copper
#

well, they usually got other talks for this

#

this is for giving an overview of the roadmap

wooden canopy
#

maybe the speackers moving on the stage entertained me a bit ๐Ÿ™‚

dull copper
#

IMO it's always the best talk ๐Ÿ˜„

wooden canopy
#

speakers

dull copper
#

well, main dots talk has been quite good usually

#

too bad we didn't get it now for gdc

coarse turtle
amber flicker
#

tbh I was hoping for a bit more than 5x ... but still.. it's in the right direction ๐Ÿ˜„ - I'm greedy

dull copper
#

I'm more about the compatibality atm tbh

#

they didn't even cover it

zenith wyvern
#

Did they even mention URP with hybrid renderer?

amber flicker
#

true - they're missing a lot currently I think

dull copper
#

not, but it's confirmed already

#

(mentioned on the hybrid renderer v2 forum thread)

amber flicker
#

wow.. netcode.. vague

dull copper
#

so yeah, there wasn't really much info about dots at all

bright sentinel
#

@amber flicker He did state like 3 times to watch the other video on the 1st ๐Ÿ˜‚

amber flicker
#

haha - I was only half paying attention.. his voice is getting a little monotonous now haha ๐Ÿ˜…

bright sentinel
#

If you wait a bit you can put the speed to x1.5 ๐Ÿ˜›

dull copper
#

they've also almost totally omitted targets for the in development things

#

they've mentioned some targets for things that have practically landed already

#

but they are way more cautious now for giving estimates of future work

#

did they say anything about ui elements and "full" DOTS?

warped trail
#

no

safe lintel
#

he keeps saying "and finally" which keeps making me think its over ๐Ÿ™‚

bright sentinel
#

Yeah lol

dusty scarab
#

Done

safe lintel
#

alright it really does look over now ๐Ÿ˜„

dusty scarab
#

Unless, after summary he says 'and finally' again

safe lintel
#

damn wanted more dots talk ๐Ÿ˜ฉ

amber flicker
#

ยฏ_(ใƒ„)_/ยฏ

dull copper
#

heh, they moderate each question(?)

#

This message is awaiting moderator approval, and is invisible to normal visitors.

amber flicker
#

yea - you would have thought they could auto-remove requests for free dark skin ๐Ÿคฃ

bright sentinel
#

Isn't that already out though? ๐Ÿค”

warped trail
#

free dark skin is out?๐Ÿ˜…

dull copper
#

for students it is

amber flicker
#

I didn't know that actually.. makes sense to get them hooked though ๐Ÿ˜ฌ

#

first answered question haha

south falcon
#

Hello. I have noted that on ConvertToEntity script have a Convert and Inject GameObject mode. What does this mode do?

zenith wyvern
#

It "attaches" all the monobehaviours on the gameobject to an entity without destroying the original gameobject. The monobehaviours can be queried from ECS like normal ecs components

south falcon
#

Thank you. Where can I find some example about this?

#

about query monobehaviours in ECS

zenith wyvern
#

Then give us some proper documentation/usage examples on Subscenes

pliant pike
#

I thought subscenes were just supposed to be used for static stuff, like environments etc leahWTF

zenith wyvern
#

And isn't ConvertToEntity needed for things like the camera right now which has no ECS equivalent?

south falcon
#

I am thinking how I can access animator in ECS if using Convert and Inject GameObject

zenith wyvern
#

about query monobehaviours in ECS
@south falcon

After you "ConvertAndInject" your gameobject you do

Entities.WithoutBurst().ForEach((Animator animator)=>
  {
    // Do whatever
  }).Run();
warped trail
#

can't wait for better story around prefabs + dots very soon ๐Ÿ˜„

dull copper
#

huh

#

I posted my message when there still wasn't any posts

#

and it's still waiting for moderation ๐Ÿค”

#

ah, was commenting to the roadmap forum threads QA

safe lintel
#

@digital scarab is there any documentation on what happens with the camera now?

south falcon
#

how can I get magnitude of float3?

zenith wyvern
#

math.length

south falcon
#

thx

zenith wyvern
#

?

coarse turtle
#

Hey @digital scarab is that true for 2D Entities too with the texture?

You declare the Texture as an Entity and attach a ComponentObject to it?

fallow mason
#

ooo I hadn't seen that example. I was just thinking it'd be nice to get some gizmos in DOTS

warped trail
#

this is only for Tiny2D, isn't it?๐Ÿค”

coarse turtle
#

Seems like it - I'm just checking out the 2D Entities package docs lol

zenith wyvern
#

I don't think UnityEngine.Object can exist in Tiny runtime

dull copper
#

^

zenith wyvern
#

Whatever they're using to represent textures it's probably not a HybridComponent

warped trail
#

no dependency on the existing UnityEngine ๐Ÿ˜„

coarse turtle
#

Right ๐Ÿค”

frail seal
#

Turns out, I shouldn't have used node tree at all.
.NET already has an expression library, which can compile "expressions" into lambda functions.
God. -_-

#

So, now I'll be writing my 3rd attempt at fast digital sound synthesizer.

safe lintel
#

@digital scarab I was more annoyed that the hybrid camera that gets auto converted/added/whatever isnt really mentioned anywhere, and after upgrading the package it doesnt use the settings of whatever the main scene camera had(even if it was the only camera in scene).
kinda spent more time than id like to admit trying to figure out what was happening given that the companion object is hidden from hierarchy, so after an upgrade I had a convert&inject camera not rendering by default or using postprocessing/urp renderpasses and seemingly no other changes other than the entities package.

coarse turtle
#

ah so I took a look at 2D Entities package, I guess Textures and Materials are stored as ISCDs

south falcon
#

@zenith wyvern If I using "ConvertAndInject" and have a self-create-mono script MyScript on gameobject, is that the as same way as accessing animator?

warped trail
#

@south falcon cs Entities.WithoutBurst().ForEach((MyScript myScript)=> { // Do whatever }).Run();

zenith wyvern
#

Yeah

south falcon
#

@warped trail @zenith wyvern Thank you ๐Ÿ˜„

fallow mason
#

anyone else's project take >2 minutes to re-import every time it's opened? using 2020.1.0b2.3333 and I only have a handful of small textures and scripts in there.

#

Maybe it's always this slow and I'm just noticing because of the timer for all blocking processes Unity's added recently

glacial widget
#

how does one destroy an entity in an entity query? (or flag for destruction at the end of this frame)

opaque ledge
#

well, i do, but my pc is potat

fallow mason
#

I think its just the timer

coarse turtle
#

@glacial widget cmdBuffer.DestroyEntity(...)

fallow mason
#

just timed a non-DOTS project on 2019.3.5 that was about 1/3 my other project size and it took about 1/3 the time

coarse turtle
#

the cmdBuffer will playback in a CommandBufferSystem at the start of the next frame depending on the system group it is a part of

warped trail
#

i don't think next frame is correct ๐Ÿค”

glacial widget
#

you mean EntityCommandBuffer? how do i get a handle to that? or do i just make a new one with a contructor?

warped trail
#

if you record command to BeginSimulationECB in initialization group it will playback in current frame ๐Ÿ˜…

coarse turtle
#

World.GetOrCreateSystem<BeginPresentationCommandBufferSystem>() if your system is in the PresentationSystemGroup or use the simulated one if its in the SImulatedSystemGroup

glacial widget
#

which group is a regular ComponentSystem falling into? ๐Ÿค”

coarse turtle
#

uhh by default I believe SimulatedSystemGroup

warped trail
#

@glacial widget cs BeginInitializationEntityCommandBufferSystem ecbSystem; protected override void OnCreate() { ecbSystem = World.GetOrCreateSystem<BeginInitializationEntityCommandBufferSystem>(); } protected override void OnUpdate() { var ecb = ecbSystem.CreateCommandBuffer().ToConcurrent(); Entities .ForEach((Entity entity, int entityInQueryIndex, ref LevelComponent levelComponent)=> { ecb.DestroyEntity(entityInQueryIndex, entity) }) .ScheduleParallel(); }

glacial widget
#

so for the last piece of information, is there a query that has an entity handle so i can feed it to the buffer?

warped trail
#

i don't understand what you mean๐Ÿค”

glacial widget
#

problem is this kind of query only has component handles

warped trail
#

i edited code๐Ÿ˜…

glacial widget
#

oh, it comes as an optional argument ๐Ÿ˜ฎ

warped trail
#

i strongly recommend to read documentation and official ECS samples project๐Ÿ˜…

glacial widget
#

I'm reading package manual, is that equivalent to documentation?

warped trail
#

i guess so๐Ÿค”

#

everything is in pinned messages

glacial widget
#

actually entity query doc doesn't have a use case with an entity handle ๐Ÿค”

warped trail
#

i wonder if there will be some kind of HDRP renderer in Tiny๐Ÿ˜…

dull copper
#

I'd love to know what's the end goal for DOTS rendering

#

but it feels that even Unity doesn't know that yet

opaque ledge
#

shouldnt it be... render everything properly ? ๐Ÿ˜„

south falcon
#

If I want MySystemGroup update after TransformSystemGroup, I need to add [UpdateAfter(typeof(TransformSystemGroup))] to MySystemGroup. Is that right?

opaque ledge
#

yes

south falcon
#

Or I have to add [UpdateAfter(typeof(TransformSystemGroup))] to each system belong to MySystemGroup?

opaque ledge
#

if your system has UpdateInGroup attribute for typeof MySystemGroup, then you can just do that

#

if your system doesnt belong to MySytemGroup then yeah you have to add the attribute to your system

south falcon
#

There is the problem. Once I add [UpdateAfter(typeof(TransformSystemGroup))] to MySystemGroup, and create this MySystemGroup and add update to SimulationSystemGroup, unity log error once I play

opaque ledge
#

what does the log say

south falcon
#

Oh, I may know what the problem is.

#

Maybe I can't update my transform sync position system after TransformSystemGroup.

#

once I update my system before TransformSystemGroup is fine

opaque ledge
#

never heard a case like that, i know for physics stuff such as catching triggers/collisons and ray/collider cast you have to update after step physics world, but never heard of your case

#

but if your problem is solved then yay ๐Ÿ˜„

south falcon
#

I sync the gameobject's position with entity's, so maybe has some order limitation with systems. I guess

warped trail
#

why are you manually creating your system group ?

south falcon
#

Do you mean not using [UpdateIn(typeof(MySystemGroup))] ?

opaque ledge
#

You can use copytransformToGameObject or FromGameObject components for that

warped trail
#

i mean thiscreate this MySystemGroup and add update to SimulationSystemGroup

south falcon
#

yes, I want to add this systemGroup into SimulationSystemGroup

#

You can use copytransformToGameObject or FromGameObject components for that
@opaque ledge Good to know ๐Ÿ‘

warped trail
#

[UpdateIn(typeof(SimulationSystemGroup))] this will update your system or system group in simulation group

#

i think i just misunderstood you ๐Ÿ˜…

south falcon
#

[UpdateIn(typeof(SimulationSystemGroup))] this will update your system or system group in simulation group
@warped trail I want to control some system's update order

#

one is NormalUpdateGroup and another is LateUpdateGroup

safe lintel
#

fps sample should show you how to create your own custom system order

south falcon
#

once I have entered battle scene, I create default world then add these 2 group into SimulationSystemGroup update list

#

all the self made system use [DisableAutoCreation]

warped trail
#

why?๐Ÿค”

south falcon
#

Because outside my battle scene is a main page which is not using dots

#

๐Ÿ˜„

#

if I use autocreation, unity will log error crazy in that scene. updating all systems with some null data

warped trail
#

why not use some singlton entities for example?๐Ÿค”

#

and why your system should update if there is nothing in query๐Ÿค”

south falcon
#

some systems have to get some data from a mono script that only existing in battle scene

#

if this script reference is null, log error

#

But I am interesting in singleton entities, I may need this later for some global data.

#

How to create that ?\

warped trail
#

when this mono script that only existing in battle scene it creates singlton entity with OkImHereThereIsNoNullReferencesYouCanUpdateSafely component ๐Ÿ˜„

#

your system Requires this singlton and updates only that this entity exists๐Ÿค”

#

is this a bad idea?

south falcon
#

That is a way to do. But it only sounds not habitual to me ๐Ÿ˜„ . I don't want those unrelative system in my world. May have some unexpected.

pliant pike
#

why would it be?, that's what I did for a pause system

warped trail
#

what do you mean by unrelative system?๐Ÿค”

south falcon
#

I will even destroy the world once I am out of battle scene and let all existing entities dead with it

warped trail
#

singlton entity is just an entity it will be destroyed with world๐Ÿค”

dull copper
#

staff answer on the roadmap QA thread:```The new entity debugger is still very early, but expect update throughout the year.

I do want to mention some what related, that visualising job dependencies in the profiler is coming in 2020.1. ```

south falcon
#

For example, If this battleA is a racing game logic, it does will have some racing systems. But battleB is a rts game logic๏ผŒsome of those racing systems no longer wanted and need to remove

dull copper
#

so... not really much new

pliant pike
#

being able to see the dependencies would be really great

warped trail
#

@south falcon if you want racing systems not to update you will just remove singlton entity

south falcon
#

Like a switch turn and off๐Ÿ˜„

warped trail
#

Racing game logic creates singlton entity with RacingLogic component -> RacingSystems updates. RacingLogic finishes and deletes RacingLogic entity-> RacingSystems don't update

#

rts game logic creates and deletes entity with RTSLogic component

south falcon
#

๐Ÿ‘

warped trail
#

i think this would be better than creating and deleting systems at runtime๐Ÿค”

south falcon
#

By the way, how to create singleton componentData? any example?

warped trail
south falcon
#

Thank you

coarse turtle
#

visualizing job dependencies is cool

tough raptor
#

hi i want to ask about dots's status. are ecs and networking enough for production? especially big worlds with too much players? will we will have to handle stability problem of framework besides of game mechanics?

safe lintel
#

its not recommended for production, but now is as good a time as any to start learning

dull copper
#

I dunno about networking though

#

also don't know if the stability should be first concern, it's just quite raw atm and not much info around

tough raptor
#

its not recommended for production, but now is as good a time as any to start learning
@safe lintel i am planning to develop a competitive game. rooms are for 32 players .so it is not stable you said. i will use mirror. but i am worry about latency and bloaty servers.

safe lintel
#

well they will have another roadmap on april 1st about the roadmap for networking/connected games

fallow mason
#

hey I've never used native containers. In my game, the player can click all over the map and add targets to the queue which are then dequeued as the player object moved from one to the next. Does a native queue stored in an IComponentData on the player sound like the right way to go about this?

zenith wyvern
#

You cant store nativecontainers in components. You can use unsafe containers or use a dynamic buffer.

gusty comet
#

Hey guys, I know it's not the ideal place to ask about this, but there's not much talk about Graphics.DrawMesh outside of this channel... (or anywhere online for that matter)
What I can't seem to find any information about, is how am I supposed to split the material (atlas) and draw Graphics.DrawMesh onto each quad

#

It seems like I could use texture2d, but that would just be applying a new, big texture instead of inside the quads themselfs?

#

I've also been trying to look at how you do it in your latest project, @zenith wyvern but I can't find how you render any of it ๐Ÿ˜›

coarse turtle
#

not sure what you're asking @gusty comet

#

If you wanted to take a slice of a texture atlas you would assign a mesh particular uv coordinates

gusty comet
#

Hmm.. basically how should i go about drawing the quads using Graphics.DrawMesh i guess

worldly pulsar
#

DrawMesh operates on materials, not textures. Calling DrawMesh every frame is pretty much the same as putting a material and mesh in a MeshRenderer - atlases and textures are a separate issue

gusty comet
#

Oh. Well, that clears up some stuff

#

umm... in that case once my mesh is readt, its hould be a new material of its own to render it with DrawMesh?

coarse turtle
#

well you should have a material associated so that you can render it

#

since you'd be passing the material as an argument in Graphics.DrawMesh - so something like this

gusty comet
#

The material as in, the new tilemap i created for that mesh?

coarse turtle
#

well - no the Material asset effectively

#

(unless you're creating a material on runtime)

gusty comet
#

what if my material is the sprite atlas then? is that what the key[i] is referencing out of the atlas?

#

oh i guess not

coarse turtle
#

yea this is out of context - just took a snippet of my code in this case

#

what I do is foreach material/texture - they're declared as entities and are linked to rendering entities so I can have a render pass draw some stuff for me in my project

#

technically I can use Graphics.DrawMesh - but I'm using a command buffer so I can do some orthographic projection (couldnt figure out how to do it with the Graphics static functions)

gusty comet
#

Oh i see. I'm just trying to have a mesh full of quads to render textures out of my atlas. I guess its completely not DOTS related i suppose if G.DrawMesh doesn;t take part of that

#

The easy way would be to use Texture2D but it seems widely inefficient

#

Thanks for your input anyway. I atleast got some better understanding of what i should and shouldn't use

digital kestrel
#

what's the diff between systembase and jobcomponentsystem

worldly pulsar
#

SystemBase is the up-to-date api

#

I'd treat both jobcomponentsystem and componentsystem as deprecated

zenith wyvern
#

@gusty comet It sounds like you have your mesh vertices set up but you might not know how uv mapping works? You should definitely google uv mapping to understand better but basically you assign coordinates of your material texture to the uv of each vertex on your quad such that it maps the sprite from your texture onto the quad of your mesh

gusty comet
#

Thank you Sark, yes. It's exactly as you said. Finally tho, after 3 days of research and psuong's input i managed to ask the right questions to find the answer @_@

#

basically setting uv[0-3] is all i need to do to make a particular texture to render in it

#

so stupid

zenith wyvern
gusty comet
#

Oh. Cheers! It will surely help

zenith wyvern
#

Or UvJob rather

gusty comet
#

In jobs aswell... Pure goldmine

dusty scarab
#

Can someone help me out with this? On executing this 2 separate entities are being created in the EntityDebugger. The difference is one has a Prefab component and the other has a Physics Velocity component.

If I do not add a velocity in the code below, one entity has a Prefab tag, rest are same.

    private void Start()
    {
        Entity playerTankEntity = manager.Instantiate(tankEntity);
        Vector3 dir = new Vector3(UnityEngine.Random.Range(0, 3) == 0 ? -1 : 1, UnityEngine.Random.Range(0f, 3f), 2f).normalized;
        Vector3 speed = dir * 5f;

        PhysicsVelocity velocity = new PhysicsVelocity()
        {
            Linear = speed,
            Angular = float3.zero
        };

        manager.AddComponentData(playerTankEntity, velocity);
}
warped trail
#

what is tankEntity?

dusty scarab
#
private void Awake()
    {
        blobAsset = new BlobAssetStore();
        manager = World.DefaultGameObjectInjectionWorld.EntityManager;
        GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld(World.DefaultGameObjectInjectionWorld, blobAsset);
        tankEntity = GameObjectConversionUtility.ConvertGameObjectHierarchy(tankPrefab, settings);
    }
#

Just a cube prefab I'm converting to an entity

opaque ledge
#

prefab is a prefab ๐Ÿ˜„ it shows that entity is a prefab

#

unless you explicitly say so, queries wont include prefab and disabled entities

dusty scarab
#

Yes but why are two being created

opaque ledge
#

because you are instantiating ๐Ÿ˜„

#

instantiating is basically making a copy of an entity

warped trail
#

on Awake you create Entity with prefab component, on Start you are Instantiating(creating a copy of entity with prefab and removing prefab component)

opaque ledge
#

so, 1 when you convert your game object to entity (which has the prefab component) 2 when you instantiate which makes a copy of your prefab entity

warped trail
#

tankEntity = GameObjectConversionUtility.ConvertGameObjectHierarchy(tankPrefab, settings); this creates Entity with prefab component

dusty scarab
#

Got it, thank you. my understanding was that i create a temp variable in 'tankEntity' which could be later used for instantiating it.

dusty scarab
#

Finally understood that I just create a prefab entity in the Awake method ๐Ÿคฆโ€โ™‚๏ธ

dusty scarab
#

project tiny- tinyracing project ^

#

All the packages are updated!!

warped trail
#

i don't think that updating packages is a good idea while using Tiny๐Ÿค”

dusty scarab
#

Any specific package I should go back on?

warped trail
#

it works fine if i open tiny racing project in 2020๐Ÿค”

dusty scarab
#

weird. I'll delete the whole thing and reimport it again and hope :x

odd cipher
#

why does my FixedList have a capacity of 0?

#

IndexOutOfRangeException: NewLength 1 is out of range of '0' Capacity.

opaque ledge
#

have you added anything to your fixedlist before using it ?

odd cipher
#

yeah its happening when im trying to add something to it

opaque ledge
#

you are using FixedList<T> right ?

odd cipher
#

well.. I want a list of strings FixedList128<FixedString128>

opaque ledge
#

yeah, the thing is the number that comes after FixedList indicates amount of bytes, not 'items', and internally 2 bytes are used, so in FixedList128 you actually can use up to 126 bytes, thats why fixedstring128 doesnt fit in, hence capacity is 0

#

btw, i am not sure what your use cases, but you most likely dont need strings in your components

eager oracle
#

I have a weird issue. Even thought I have installed the package "Entities" from the "Package manager", I cannot seem to access "Unity.Entities" from my code. Is there any additional step necessary to access it?

odd cipher
#

@opaque ledge Yeah I might have an idea to avoid using it

eager oracle
#

@digital scarab It is the classic " type or namespace name 'Entities' does not exist in the namespace 'Unity' (are you missing an assembly reference?)"

#

Even thought I am writing "using Unity.Entities"

#

Wait, ill show you the code

#
using UnityEngine;
using Unity.Entities;

public class Main : MonoBehaviour
{
    void Start()
    {
        EntityManager foo;
    }
}
#

It doesnt get much simpler than this...

dull copper
#

@eager oracle I'd check the console for errors

eager oracle
#

Let me see

dull copper
#

if there's some other errors, they may prevent loading that

eager oracle
#

Thats all there is to it

#

Intellisense in Visual Studio also doesnt pick it up

fallow mason
#

And it's not a Tiny project?

eager oracle
#

nope. a 2D project

#

using 2019.3.6f1

opaque ledge
#

isnt it Unity.Entity

eager oracle
#

No

opaque ledge
#

maybe just restart editor

fallow mason
#

Delete library folder too maybe

eager oracle
#

Delete Library?

#

I already restarted

fallow mason
#

The library folder in your top-level project folder

eager oracle
#

Ok, lets see what that does...

#

I have to close Unity to delete the folder

#

Ok, done. Restarting Unity...

#

Also restarting Visual Studio after that

#

Well, the greeting message now was a little worse

#

๐Ÿ˜จ

fallow mason
#

If that doesn't work, maybe removing entities package, make sure you don't have any errors once it's gone, and install entities again

warped trail
#

update Burst maybe๐Ÿค”

eager oracle
#

Burst is up-to-date. Actually "Unity.Burst" DOES get recognized by my editor

warped trail
#

can't trust package manager ๐Ÿ˜…

#

oh my god b3 is out ๐Ÿฅณ

fallow mason
#

HRv2 time?

warped trail
#

oh, wait

#

it is not in unity hub, but i got message in editor๐Ÿค”

eager oracle
#

@fallow mason I have HybridRenderer 0.4.0

fallow mason
#

Sorry, I wrote that in response to b3 @eager oracle

warped trail
#

@eager oracle what version of Burst is installed?

eager oracle
warped trail
#

update burst๐Ÿ˜…

fallow mason
#

Yeah that old. 1.3.0 is latest, no?

eager oracle
#

The package manager says it is up-to-date

#

How can I update it??

fallow mason
#

Lies

eager oracle
#

Then how can I update it, if the package manager wont recognize a newer version?

#

Oh, seeing the "other versions"

#

Installing...

#

But shouldnt "Entities" be usable, without the Burst compiler, anyway??

warped trail
eager oracle
#

Still installing....

#

I sure hope it hasnt frozen....

warped trail
opaque ledge
#

should be on hub soon enough ๐Ÿ˜„

#

maybe restart ๐Ÿ‘€

#

did urp/hdrp get to 9 yet ?

eager oracle
#

Still nothing happening... Im gonna try to rebooting the editor

amber flicker
#

doesn't look like it @opaque ledge .. unless they require b3 to appear

opaque ledge
#

aww, k thanks

warped trail
#

from 8.0 to 9.0๐Ÿค”

fallow mason
#
Unity

Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.

#

Install version from Unity Hub

warped trail
fallow mason
#

Shift-refresh? lol

eager oracle
#

Apparently I had run out of space in my HDD. Time to empty the trash ๐Ÿ˜›

#

Ok, yes... that worked

#

๐Ÿคฆโ€โ™‚๏ธ

#

Don't you guys think that the whole DOTS stack should be one single package? I mean, this compatibility issues are silly.

fallow mason
#

eh, some things like Jobs can be used without ECS. They're trying to be as modular as possible, which I get.

eager oracle
#

In that case, the package manager needs to have better dependency management

fallow mason
#

Plus they have different teams working on each part. Making everything one package would slow down release iteration and that's especially important when its in preview and being evaluated.

#

Yes, it does.

eager oracle
#

Well, at least it works now. Thanks everyone for your help!!!

#

I see that World.Active is no more...

fallow mason
#

World.DefaultGameObjectInjectionWorld I think

dusty scarab
#

Still getting these errors on just opening the TinyRacing project in editor, all are ScriptAssemblies errors?!

fallow mason
eager oracle
#

@fallow mason Great! Much shorter!

fallow mason
#

@dusty scarab I just got one of those errors after opening my project in the latest beta. Restarting the editor fixed it for me.

dusty scarab
#

Restarting... ๐Ÿ˜ฟ

#

@fallow mason Nope, the number went down from 20 to 12 but still there

eager oracle
#

Is it normal that there is an entity "WorldTime" by default in the scene?

dusty scarab
#

Yeah

#

Downgrading to version .22 of project tiny

#

Down to 3 errors. Progress

warped trail
#

i guess you better post this error in Tiny forum if you can't open tiny racing project๐Ÿค”

dusty scarab
#

wtf, the errors actually came back

#

forum it is then

#

@warped trail What version of Project tiny are you on which it works?

warped trail
#

i just download projects from github and launching them๐Ÿ˜…

eager oracle
#

in DOTS, Time.deltaTime is written now as Time.DeltaTime??

warped trail
#

@eager oracle yes

eager oracle
#

holy frog

dusty scarab
#

same tbh why isn't it working ๐Ÿ˜ข

eager oracle
#

Way to make it confusing.

#

There is no way I can work on DOTS without Intellisense

gusty comet
#

hello

#

i was wonderink

#

what about unity asset store assets

#

they dont work with dots

#

ofc some are small and easy to remake

#

but other are big and remaking them in ecs would take ages

#

soo how does unity see this

amber flicker
#

My take is 1) Monobehaviours aren't going anywhere - a lot of tools will still work, they just won't be working natively with the new dots stuff, 2) assets (like models) don't need to change, 3) the new render pipelines are probably more disruptive than dots (especially to e.g. shader assets), 4) existing authors will hopefully be encouraged to update their assets (they'll get better performance) and 5) there's plenty of space for a new wave of assets

#
  1. you should always carefully consider what dependencies you introduce to your pipeline outside of Unity for when Unity changes things or the assets stop being supported
#

(coming from the perspective of someone who's making a DOTS asset for the store)

eager oracle
#

@amber flicker Definitely they are not going anywhere

#

What components are needed to render a Mesh with an entity, besides "RenderMesh" and "LocalToWorld"?

amber flicker
#

I think I remember reading you need WorldRenderBounds or similar - best to check out a cube in the entity debugger or something to check

eager oracle
#

It would be nice to set dependencies between Components

#

"RenderBounds" seems to be enough

amber flicker
#

beware you may get some rendering artifacts if you don't initialize it properly and only add the component

eager oracle
#

Not really sure what is the right way to do that. All my tutorials seem rather outdated ๐Ÿ˜›

warped trail
#

i guess recommended way is to convert prefab to entity๐Ÿค”

eager oracle
#

probably

#

This doesnt work anymore for systems?

Entities.ForEach((ref Comp1 comp1, ref Comp2 comp2) => {...})
#

Aparently the lambda can only have 1 parameter now?

dull copper
#

?

#

what error do you get?

eager oracle
#

Mmm... now it is gone... probably was because I made Comp2 a "class" and not an "struct"

dull copper
#

(and it definitely works still)

eager oracle
#

Components must be always structs, right?

dusty scarab
worn stag
#

So beta 3 is out. Anyone got hybrid v2 to work? I'm getting black cubes in spawner sample

dull copper
#

it worked for me even on b2

#

and does still work on b3

warped trail
#

it worked for me, but no ambient light

dull copper
#

@worn stag you've coupled it with correct HDRP?

warped trail
#

just one directional light and thats all๐Ÿ˜•

dull copper
#

I'm using HDRP from SRP master

worn stag
#

yes 9.0

mint iron
#

is URP intended to be functional with v2?

digital kestrel
#

can you execute entityquery in gameobject update?

mint iron
#

@digital kestrel yes

dull copper
#

@mint iron ultimately at least, I dunno how functional it is today

digital kestrel
#

how?

#

GetEntityQuery isn't available in Gameobject

dull copper
#

they said they want to support core URP functionality on the forum thread

warped trail
#

@mint iron Official URP support (minimal feature set)๐Ÿ˜…

digital kestrel
#

@mint iron

warped trail
#

entityquery is system stuff ๐Ÿค”

mint iron
#
var myQuery = World.DefaultGameObjectInjectionWorld.EntityManager.CreateEntityQuery(
     ComponentType.ReadWrite<EcsTestData>());
myQuery.CalculateEntityCount();
digital kestrel
#

ah ok, thanks ๐Ÿ˜„

warped trail
#

oh, didn't know you can do this

digital kestrel
#

I looked for GetEntityQuery and missed that

worn stag
opaque ledge
#

iirc, in SRP github

mystic mountain
#

Is it possible to add the TransformSystemGroup also into ClientPresentationSystemGroup? ๐Ÿง

opaque ledge
#

hmm, i dont think you can add a system twice, but perhaps you can manually update it ๐Ÿค”

#

tho i never tried something so exotic

dull copper
#

@worn stag I only know of the hybrid test projects in the SRP repo but I don't think they refer to those on that

#

so, I wonder if they just add those two to current samples repo

#

also don't really see immediate gain of having such sample projects myself

#

what would be more useful would be just a simple list on what a) works with these b) what doesn't work with these

mystic mountain
#

@opaque ledge Seems to work, thanks!

zenith wyvern
#

Ahh, we have 2020.1b3 but since we don't have URP/HDRP 9 yet we can't use Hybrid v2 yet right?

opaque ledge
#

yeah, i think i will wait until they are released and then i will upgrade

#

without issues i hope D:

digital kestrel
#

did the 2020 roadmap talk about hybrid renderer v2 @dull copper

eager oracle
#

I wanted to try the "Visual Scription ECS" package, but it is not listed for me. Isnt that available for everyone?

worn stag
#

Tried v2 in another scene and it works correctly but indeed without ambient light. It's also less performant for me than v1.๐Ÿคทโ€โ™‚๏ธ

zenith wyvern
#

Yes they've said it will perform worse until we have the correct SRP packages too which are not released yet

worn stag
#

i'm using it with the github master branch which is 9.0

worn stag
#

yeah

zenith wyvern
#

Well that doesn't sound good

#

I wouldn't read into it too much though until they've officially released the packages

bright sentinel
#

@digital kestrel There was some talk about V2

#

Nothing major though

formal scaffold
#

Hey, been looking at Tensors to understand dynamic physics bodies. Does someone know what the Interia Tensor describes?
It says "Resistance to angular motion". Does a higher value on X mean no angular motion in direction X?

I noticed, making the Tensor smaller and then applying velocity on one direction to my capsule makes the capsule tilt faster ๐Ÿค”

gusty comet
#

I'm trying to update Burst and I've been sitting on this one part of importing for like 20 minutes now. If I Terminate Unity is it going to break my project? Or is this supposed to be a really long wait?

#

this exact script is taking this long not the entire process

#

Apparently when I terminated Unity and reopened it now it's installed package lol. So sorry everyone

formal scaffold
#

Thanks @dull copper, hard topic to understand but it's getting clearer.
Anyone know what MTranfrom stands for? It holds a
float3x3 roation,
float3 translation,

could it have anything to do with LocalToWorld?

safe lintel
#

afaik updating burst shouldnt have any effect on your project @gusty comet , just might have to delete the package cache in the library if it doesnt update properly

gusty comet
#

guys

#

why when i remove model leg

#

other body parts get alll stupid

#

and bigger and deformed

mint iron
#

perhaps you can rephrase the question with more info

fallow mason
safe lintel
#

thats what my ide does when i look into the math definitions ๐Ÿ˜„

fallow mason
#

its infuriating. and you know some web dev was thinking "should I add pagination? nah, documentation never gets that long!" ๐Ÿ˜ฉ

safe lintel
#

i do despise the package docs ๐Ÿ™‚ i guess theyre permanent though, was hoping they would get the same treatment as the old main manual for the editor/api

fallow mason
#

I typically just use the github math class and search through there, but it doesn't have an implementation that I've seen used in some of the physics demos

#

any idea what math.forward(quaternion q) does?

safe lintel
#

gets the forward vector for that rotation

#

kinda like what transform.forward was for gameobjects(though there is LocalToWorld.Forward)

fallow mason
#

That's what I thought. I'd really like to get the up vector, but there isn't a math.up(quaternion) function (at least in my version of math)

#

Right now, I'm pulling in ltw just for the local up, but I'm already using the Rotation component, so it would be nice to just use that

safe lintel
#

someone else can correct me if this is wrong but you can do math.mul(quaternion, float3(0,1,0))

fallow mason
#

I'll try it out!

#

it worked! Thanks @safe lintel

zinc plinth
#

I'll reformulate my question as it had too many details:

is there a way I can create a persisting(between systems) 2d grid of entities in ecs and be able to access it's members by it's coordinates [x, y] within systems ?

zenith wyvern
#

You can represent your grid in a collapsed 1d dynamic buffer, and you just convert between 1d and 2d indices as needed

zinc plinth
#

so the whole grid including all the stuff on each tile would be in a single entity with a dynamic buffer for each component ?

zenith wyvern
#

Each element of the buffer is a tile. You can represent the tile however you want. If your tiles are meant to contain many things then things get a lot more complicated

#

In my game my tiles are only used for rendering. I have a separate buffer to represent the "state" of the map that gets updated every frame and details collision and references to whatever entity is in a tile

zinc plinth
#

for the context this is the grid I'll use to place buildings on(city builder prototype), so I need to pathfinding between them and apply some area effect from other buildings for example.

so for each use of a grid representation, I could have a component with a buffer containing the data I need(pathfinding and heat for now) ?
and have everything that does not absolutly need to be aware of it's neighbors in their own entities

digital kestrel
#

how do u step through entity.foreach jobs?

zinc plinth
#

for now I don't have anything in code yet, I have the game written in OOP, and I'm trying to figure out how to go back from scratch in ecs

#

oops thought that was sark lol

zenith wyvern
#

A component doesnt contain a buffer, a buffer lives on an entity. If this is your first time using ECS I would strongly recommend something simpler to start with

glacial widget
#

anyone knows how to successfully modify a SharedComponent such as RenderMesh? (trying to do a simple quad deformation from a component system)
doc mentions having to use memcpy but they didn't provide a snippet on how to actually do that

warped trail
#
var renderMesh = EntityManager.GetSharedComponentData<RenderMesh>(entity);
var mesh = renderMesh.mesh;
//Do your thing
renderMesh.mesh = mesh;
EntityManager.SetSharedComponentData(entity,renderMesh);```
#

something like this i guess๐Ÿค”

glacial widget
#

i wasn't setting shared data, thought it works just like modifying components in queries, lets see if this works

#

nothing happens still ๐Ÿค”

#

im finding an entity handle through a hack but shouldn't this work?

#

oops, there's a typo in SetShared

#

but passing entity handle from a query throws an exception, so this hack is actually accounted for

warped trail
#

if you are using entitymanager in ForEach you have to use .WithoutBurst() .WithStructuralChanges()

#

and i think mesh.vertices returns a copy of vertices๐Ÿค”

glacial widget
#

afaik in vanilla Unity it was done through mesh filters but I don't think we have a component for that

#

I've searched for it already ๐Ÿ˜ฆ

warped trail
#

i mean that you have to mesh.SetVertices() to set vertices๐Ÿค”

glacial widget
#

and this is what the console thinks about it:
"Entities.ForEach Lambda expression makes a structural change with a Schedule call. Structural changes are only supported with .Run()"

warped trail
#

yeah, you have to use .Run() instead of .Schedule()๐Ÿ˜…

#

and i think you should consider to use SystemBase instead of JobComponentSystem๐Ÿค”

glacial widget
#

I've been using ComponentSystem before but it didn't have .WithoutBurst().WithStructuralChanges() for queries

#

so ive been reading the documentation and it seems like those come from JobComponentSystem

#

so here I am

warped trail
#

JobComponentSystem is on its way to be deprecated

glacial widget
#

good, i hate it already ๐Ÿ˜…

#

had to change "ref" to "in" for RenderMesh component and don't actually need to get that shared data from entity manager

#

another caveat: if you use SetSharedComponentData on a RenderMesh and just pass mesh (with no material), he will reset the material to null and the mesh won't render

warped trail
#

maybe try thiscs var mesh = renderMesh.mesh; //your work renderMesh.mesh = mesh; _entityManager.SetSharedComponentData(entity, rendermesh)

glacial widget
#

nope

#

readonly D:

warped trail
#

maybe try without in?๐Ÿค”

glacial widget
#

lets see ๐Ÿค”

warped trail
#

without ref or in it should pass component by value

glacial widget
#

oh that works, right, since im setting through SetShared i don't actually need ref or anything like that

warped trail
#

i bet you can do this through shaders in upcoming hybridrendererV2๐Ÿ˜…

glacial widget
#

I'm thinking about this in the context of 2D sprites (skeletal 2D animations), things like Spine usually modify the mesh (or mesh filter I guess) at runtime, this way you can easily use whatever shader you want (eg: Sprite-Lit shader for LWRP lighting, shaders that display outlines or any specific effect)

mint iron
#

so quiet ๐Ÿฆ—

opaque ledge
#

Alright, a question for you @mint iron ๐Ÿ˜„ What is the difference between NativeList and UnsafeList exactly ?

dusty scarab
#

One from me too,

[UpdateInGroup(typeof(SimulationSystemGroup))]```
Why is this required? Isn't Simulation the default SystemGroup
mint iron
#

NativeList has safety mechanisms and UnsafeList does not, also UnsafeList<T> can be cast to an UnsafeList untyped version because they share the same members. All members of NativeList<T> are passed by ref/ptr (stored in the internal UnsafeList), but UnsafeList has length etc that will stay when copied by value.

opaque ledge
#

yeah but what is the practical meaning of having safety mechanicsm turned off ?

#

like.. will my pc explode if i try to access an index number that is more than capacity ?

pliant pike
#

I'm guessing it means you could end up with weird outcomes, like variables not incrementing properly

#

like several threads accessing the same data each reading and writing it at different times you end up with a result that doesn't make sense

#

I've had that happen

mint iron
#

yeah i assume most of them get stripped out when safety checks are turned off, but you're still limited to how you can use it because of the class members.

warped trail
#

you pc will collapse into black hole๐Ÿ˜‚

opaque ledge
#

๐Ÿ˜ฑ

pliant pike
#

no thats only if you divide by zero leahYTHO

opaque ledge
#

i heard something like, you can put pointers in structs (meaning that they are blittable), that true ?

zinc plinth
#

isn't that only true for shared component ?

zenith wyvern
#

One from me too,

[UpdateInGroup(typeof(SimulationSystemGroup))]```
Why is this required? Isn't Simulation the default SystemGroup

@dusty scarab

It isn't required, unless you [DisableAutoCreation] or change the default behaviour Unity will do this automatically to any system you create.

dusty scarab
#

@zenith wyvern was in the TinyRacing example and had me pegged on why it was being used. Thanks btw!

warped trail
#

i guess Tiny is different๐Ÿ˜…

dusty scarab
#

What do you mean?

zenith wyvern
#

I'm not sure if Tiny uses the same world initialization stuff as default. My assumption would be that they don't actually need to be doing that

#

Since they use the same Entities package as normal Unity

#

But I don't know for sure

dusty scarab
#

What exactly is the difference between Tiny and the entire group of packages? All i could get was that tiny is being used to develop smaller size projects

#

I'm looking at Tiny examples to understand the ECS workflow

zenith wyvern
#

Tiny doesn't use any normal Unity stuff. It's basically a whole different engine using bits and pieces of other open source software

#

They pretty much just use Unity for the editor workflows

#

And for the ECS stuff of course

dusty scarab
#

The scripting for both is essentially same right. All I can understand online is that in Tiny ECS is enforced, and it uses a different pipelines. (I'm looking over these examples to get started coding in dots. so any changes I would have to adjust to?)

warped trail
#

in tiny you can't use anything from UnityEngine

dusty scarab
#

Right. in DOTS I can use MonoBehaviours

zenith wyvern
#

No gameobjects, no camera, no mesh, nothing that isn't in the packages

warped trail
#

Tiny is as pure DOTS as it can get๐Ÿค”

zenith wyvern
#

Anything from the editor has to be converted to an entity inside a subscene

glacial widget
#

no mesh? isn't mesh in the hybrid renderer package?

dusty scarab
#

I see. Back to working in ecs then. way too much to learn to dive into tiny

warped trail
#

they don't use hybrid renderer

vagrant surge
#

@zenith wyvern it does have meshes now

#

you can do procgen meshes on the 3d tiny

#

but 3d tiny not being compatible with 2d tiny is..... impressive

zenith wyvern
#

Yeah I saw that, I'm going to poke at it this weekend. Seems very complicated right now

gusty comet
#

Hello

#

will my monobehaviour based game benefit from DOTS performance if i decide to spawn only visual things (like houses, mountains, etc, often static, that dont have code on their own) with ECS? e.g with convert to entity component?

toxic mural
#

Anyone pro with FilterWriteGroup ?

warped trail
#

Mike Acton๐Ÿ˜…

zinc plinth
#

hmm, it's weird that atm you can't use the latest versions of entities + physics + hybrid renderer together Thonkeng

warped trail
#

probably you need to update some packages manually๐Ÿ˜…

#

collections or burst

zinc plinth
#

hoo ye, updated collection manually and now it works :D

coarse turtle
#

write groups are interesting ๐Ÿค”

zinc plinth
#

how do you organize your files in ecs, just have Assets/Scripts/Components and Assets/Scripts/Systems or ?

formal scaffold
#

Hey, I'm playing around with Angular Velocity and I wonder if it's commonly used to rotate characters? I have been looking at Witcher3 for inspiration and it looks like when rotating, his arms are affected by centrifugal force. It seems to me that the arms are connected to the body via Joints and this is whats moving them when rotating. Tho I could be wrong and it's just an animation playing, hence my question if Angular Velocity is the way to go when rotating a character with a dynamic physics body.

toxic mural
#

I'm trying to use WriteGroups but its not working when loading an assembly at runtime, and Im trying to figure out where to start looking

#

Like it'll work if the writegroup is in the same assembly as the engine, but if its loaded in as a DLL, it doesnt

zinc plinth
#

can you have helper functions in components for code that might be used by multiple system ?

#

like translating a world pos to a grid pos

toxic mural
#

In components? I dont think you're supposed to

zinc plinth
#

so you have to repeat that code each time ? Thonkeng

toxic mural
#

I think Joachim ante has said static functions are okay, but I think he meant on Systems

zenith wyvern
toxic mural
#

How specifically relevant, lol

zinc plinth
#

alright, will probably do the same I think

also am wondering, for dynamic buffers, are the buffers in the 64K chunks and count towards the limit, or are they elsewhere in memory ?

mint iron
#

it depends, you can set InternalBufferCapacity attribute on your IBufferElementData, or by default it will use 128 / elementSize in the chunk. If you go beyond the defined size, it allocates new space elsewhere.

#

is there a way for a test assembly to access internal members of a different asmdef used for package runtime? i dont want to expose some members as public, but it also doesn't seem like a good idea to put my tests inside the runtime package assembly.

#

seems like Unity.Entities packages are doing exactly this but i can't seem to figure out how.

toxic mural
#

[InternalsVisibleTo] maybe?

mint iron
#

ahh yes thats how its done, thank you

raven grail
#

Hi,
I'm trying to figure out what the correct pattern is for accessing a shared component from within a Job. So far I've been using chunk.GetSharedComponentData(RenderType, World.DefaultGameObjectInjectionWorld.EntityManager); but from skimming the Unity forums that seems unintentional and not thread-safe?

sour ravine
#

World.DefaultGameObjectInjectionWorld does not necessarily have anything to do with the World owning the system you're working with

#

so that code is just broken

raven grail
#

Yeah, the question is what's the correct way to do it

#

I need to access RenderMesh from a Job to get the bounds data

sour ravine
#

you don't, if you're using Burst

#

might be able to copy some of that into another component in an Entity depending on needs, but SharedComponents are by design not really data containers

#

they're a grouping tool

raven grail
#

Yeah but I need that data to calculate the size of a UI element

#

And it runs on a large number of entities

sour ravine
#

grab that data up front?

#

when does that change

raven grail
#

Any time RenderMesh changes

#

I've got a world canvas that scales with model size

#

grab that data up front?
How would I do that for an IJobChunk?

#

Is there a way to get the shared component data in a way that I can link it from the Job?

sour ravine
#

you read whatever blittable types you're interested in and park them in an Entity

#

(well, component belonging to one)

zinc plinth
#

with the new SystemBase we don't necessarily need to create a struct for a job, but if we prefer to still use it, do we know if it's going to get deprecated at some point ?

sour ravine
#

loosely this is how groups in the transform hierarchy work

#

(re: @raven grail)

#

hierarchy is inherently not parallel

raven grail
#

So like a catch all component that contains fields for all the shared data I'm interested in and a system to copy-paste it all?

sour ravine
#

you can put all that in a component, as mentioned

#

it is possible to have an Entity field and access the properties with the accessor structs

#

this will limit parallelism, though, so it might not be a good fit for jobs

#

innately

raven grail
#

Just seems hacky to me. Rule of thumb is when you're copy-pasting code you're doing something wrong

sour ravine
#

not at all true

#

inlining, etc. Again, if you need one copy of something, put it in an Entity or use a singleton

#

and use an Entity field in a component to establish that link

#

you can access component data for Entities other than the one being processed in a ForEach job

raven grail
#

Not really what I'm after. Really all I need is the bounds per chunk since it's shared

#

Ideally I'd have a IJobChunk Execute() that accesses the bounds once, calculates what it needs from those and then moves onto Entity-specific calculations

sour ravine
#

It's actually a lot closer to the actual mechanism the theoretical SharedComponent approach would use. Chunks internally store a shared component index so there's always an indirection

raven grail
#

Wouldn't it be possible to access that index? I've seen some methods that return collections of shared data but the documentation is vague or non-existent

sour ravine
#

it's available directly from the chunk

#

GetSharedComponentIndex<> or something to that effect

#

you need the EntityManager to turn that into a shared component reference, which is a no-go for Burst

raven grail
#

Yeah but wouldn't it be possible to get it from the System and pass to the Job as parameter?