#archived-dots

1 messages ยท Page 95 of 1

dull copper
#

I wish I could just write burst optimized code without all that boilerplate of jobs tbh

#

at least the boilerplate amount got smaller now

#

but it's still extra if you need things that have one instance etc

worldly pulsar
#

but most of that code also does structural changes, and those can't happen in the new JobComponentSystem.ForEach

mint iron
#

which thread its on does matter tho because scheduling has overhead
i was thinking more about if you can hijack whatever system they're using to execute the job directly without using the jobs system or scheduling.

hollow sorrel
#

hmm i wonder if the jobified foreach that runs on main thread lets you add/remove components
because it does run synchronized, but on the other hand it uses burst and i dunno if it supports that

dull copper
#

I'd really love to be able to just use burst on dedicated threads :p

worldly pulsar
#

@hollow sorrel nope, structural changes not allowed within new ForEach

mint iron
#

yeah, and its interesting that the messaging earlier was job scheduling is the performance by default and now they're bypassing it all entirely.

hollow sorrel
#

have you tried with the alwayssynchronize and using .run() like in above post?

worldly pulsar
#

also, you can run it with no burst: Entities.WithoutBurst().ForEach(...)

hollow sorrel
#

ahh

#

thats unfortunate

worldly pulsar
#

I'm bad at discord and can't paste 5 lines of code :D
but no, .Run() doesn't help, you can create an ECB and .Playback() it right after you Run() the job

mint iron
#

i saw in the notes that ComponentDataStore uses burst compiled delegates for add/remove

#

im gonna hvae to have a play i guess ๐Ÿ˜„ too interesting

hollow sorrel
#

i imagine they'd allow it in the future since it seems to make more sense to merge ComponentSystem and JobComponentSystem now that they can do (almost) the same thing

#

also maybe we can check their codegen of the ForEach to see what it does to bypass the job system and still run burstified so that maybe it can be used without jobs

worldly pulsar
#

oh they do not bypass the job system

mint iron
#

ohhh that was you posting in that thread scorr, didnt notice!

worldly pulsar
#

they do generate a job

mint iron
#

yes, but its not scheduled like normal but called directly as i understand it

worldly pulsar
#

you can .Run() normal jobs

hollow sorrel
#

oh so the requirement for burst is still always a job

mint iron
#

ohhhh, okay, i was thinking it was doing something new - i was confused ๐Ÿ˜ฆ

worldly pulsar
#

btw, the bottom half of Unity.Entities/CodeGeneratedJobForEach/UniversalDelegates.gen.cs is art ๐Ÿ˜„

mint iron
vagrant surge
#

@dull copper doesnt the new foreach use jobs automatically?

dull copper
#

well, it reduces the boilerplate to half

#

but you still need to write some

#

this is the sample Joachim gave on running the job on main thread with AlwaysSynchronizeSystem: ```cs
[AlwaysSynchronizeSystem]
public class RotationSpeedSystem_ForEach : JobComponentSystem
{
// OnUpdate runs on the main thread.
protected override JobHandle OnUpdate(JobHandle inputDependencies)
{
float deltaTime = Time.DeltaTime;

    // Schedule job to rotate around up vector
    Entities.ForEach((ref Rotation rotation, in RotationSpeed_ForEach rotationSpeed) =>
         {
             rotation.Value = math.mul(
                 math.normalize(rotation.Value),
                 quaternion.AxisAngle(math.up(), rotationSpeed.RadiansPerSecond * deltaTime));
         })
        .Run();

 
    // Return job handle as the dependency for this system
    return default;
}

}```

#

I was mainly talking about the amount of code you need to write for one off kinda things.. even having burst there isn't needed for perf but it's the only way to guarantee that the floating point math you do is deterministic

#

of course the burst float determinism isn't 100% done yet either

#

apparently it's supposed to be deterministic within the same platform but I don't really know if that means anything

#

considering that most code you build for specific platform using same compiler tend to run exactly the same on that platform anyway

#

but I am really waiting for full crossplatform determinism

#

but also, considering how many times Unity has postponed it, it might not even be a thing even next year

worldly pulsar
#

Have you done any tests on how good is Burst at determinism right now (vs what Mono/il2cpp are doing)?

#

I had to do a fully deterministic project recently, but I've chickened out and went integer only for logic ๐Ÿ˜›

dull copper
#

not yet and it doesn't really matter as long as the crossplatform support isn't in either if you do crossplatform multiplayer

#

and in the case of physics and multiplayer, you can't have 100% determinism anyway because lag, there will always be moments during dynamic collisions where you have to predict things and things don't match in the end

#

like, if you have two player controlled dynamic objects simulated through physics, any input players do the moment before impact will be simulated differently on each client as the up-to-date input isn't known for any but the each players own clients dynamic object at time of impact

#

so these things need to be resynced after collision anyway

#

and well, same goes with all predicted movement really

worldly pulsar
#

yeah, luckily my project was fast enough to do the rewind&resimulate trick after each input received

dull copper
#

also fixed point math is still the most safe bet if you need to have that thing done now

#

so it's not really a bad choice by any standards

#

we all know that works today

tawdry tree
#

If you're pretty close to determinism you can reduce the amount of synchronization needed, though

dull copper
#

sure

#

but then even the existing floating point differences won't be big

tawdry tree
#

Less network traffic, potentially less complexity, etc..

dull copper
#

when you have full determinism, you can trust some things to be exact tho

flat talon
dull copper
#
A few important additional notes:

* Function pointers are compiled asynchronously by default as for jobs. You can still force a synchronous compilation of function pointers by specifying this via the [BurstCompile(SynchronousCompilation = true)].
* Function pointers have limited support for exceptions. As is the case for jobs, exceptions only work in the editor (2019.3+ only) and they will result in a crash if they are used within a standalone player. It is recommended not to rely on any logic related to exception handling when working with function pointers.
* Using Burst-compiled function pointers from C# could be slower than their pure C# version counterparts if the function is too small compared to the cost of P/Invoke interop.
* A function pointer compiled with Burst cannot be called directly from another function pointer. This limitation will be lifted in a future release. You can workaround this limitation by creating a wrapper function with the [BurstCompile] attribute and to use the shared function from there.
* Function pointers don't support generic delegates.```
flat talon
#

None of those are surprising really.. its a bit of an inconvenience not being able to call FPs from other FPs, but can be easily worked around I guess.

dull copper
#

this is great

#

I mean, I'd love to have some codegen for this too

#

but at least it's supported officially now

#

and it's not terrible amount of extra code to wire the delegates

flat talon
#

yep

dull copper
#

also thanks for the heads up ๐Ÿ™‚

#

Note that you can also use these function pointers from regular C# as well, but it is highly recommended (for performance reasons) to cache the FunctionPointer<T>.Invoke property (which is the delegate instance) to a static field.
well, people who do this may not always care about the perf, like if you need that burst determinism for example

#

also what was the regular quote block again? ๐Ÿ˜„

#

I never remember it

flat talon
#

` was it ?

#

test

dull copper
#

no I mean, I used now three `

#

but there's the block quote

flat talon
#

is this not a block quote?
this for code samples

dull copper
#

ah, it's three >

#

like this

#

eh

#

you need space

#

after it

worldly pulsar
#

wait, so what does triple ' do? I tried to paste some code earlier with 3x single quotes and it just disappeared

dull copper
#

need to be ` not ยด or '

flat talon
#

you need to start with 3x ` and end too. That wrapt it in a block, useful for code

dull copper
#

text wrapped in single ` will just do the thing inline

#

three does the separate box like seen above

#

block quote is less intrusive, hence trying to use it

flat talon
#

oohh

test
public field;
dull copper
mint iron
#

makes me happy that the blittable structural changes code is in now, its a huge step forward cause they had to rewrite a lot of the core for it. com.unity.entities@0.2.0-preview.18\Unity.Entities\EntityManagerChangeArchetype.cs

flat talon
#

ah nice you can do 3xand language name like csharp

dull copper
#

I just use shorter cs, it works as well

#

and md for markdown (I mainly use this if I paste any changelogs here)

#

also sorry for offtopic

flat talon
#

"The syntax to use Block Quotes is > or >>> followed by a space. "

#

This works?

And yes, lets get back on track ๐Ÿ˜„

#

Going to be exploring the new subscene flows today. It's quite nice the V2 asset DB now handles the saving and no need to have those cached assets anymore

mint iron
#

anyone know the costs involved in a P/Invoke and is there a way to get around it - i guess the burst method ptr would have to be called from the C++ side?

flat talon
#

you mean interop between c++ and burts compiled code? Havent tried that actually

dull copper
#

I think the overhead is mentioned because they have to do individual pinvoke for each function pointer individually

#

you don't do much work on single invoke call

#

so you mainly pay for the overhead

flat talon
#

just curious, what is it you are planning to do on the c++ side you think you cannot in HPC#? use some existing libs?

dull copper
#

if you've read about il2cpp, it doesn't remove this overhead fully either

#

there was some unity blog post about this at some point

vagrant surge
#

oh, so this function pointer stuff lets you burst compile random stuff?

dull copper
#

it lets you use burst separate from job system yes

mint iron
vagrant surge
#

like, lets say i have a voxel creator. Can i make that function be burst-compiled and then just execute it normally?

#

without jobs

dull copper
#

I'm now wondering if I can invoke these burst-compiled delegates from regular c# thread

#

because that's really the thing I'd want to do

flat talon
#

I think you can yeah. All of this in the context of il2cpp is interesting though.. like is it going to be cheaper accessing native collections from il2cpp compiled code?

dull copper
#

I'd expect it to work

mint iron
#

@flat talon i don't have a need right now; i'm just interested to know how to do it in case i need to at some point.

flat talon
#

Keep in mind, some of the perf benefits of Jobs+Burst is being able to skip some expensive checks because of assumptions you can make about security of the memory. Outside of Jobs you probably still need to pay those costs?

#

yeah its interesting

#

So a burst-compiled FP accessed from managed code that iterates over a native array is prob going to be slower than when done from a job?

dull copper
#

I don't really now much about practical cases where il2cpp is better other that you can actually link your own c++ code in the same native dll and have tad faster interop action

#

oh wait

#

burst compiles into separate dll's?

#

oh right they have to due to own compiler

flat talon
#

honestly I havent read much up on il2cpp + Burst/Jobs. Just heard they should work fine together

dull copper
#

I wouldn't wonder if IL2CPP would give tad better perf with DOTS than on regular c# code, at least all figures Unity has given seem to support this assumption

#

on regular c# code, people get quite mixed results on IL2CPP, usually it's slightly faster but not always

flat talon
#

yeah I was always a bit confused what the future of IL2CPP would be in the brave new world of HPC# ๐Ÿ™‚

#

ie in a pure DOTS project, is there a need?

dull copper
#

IL2CPP is very much needed by many platforms in general as Unity doesn't even support mono backend on all

flat talon
#

yeah.. but! the zero player doesnt need Mono does it?

#

its a new type of Unity player for pure dots projects, used I think only by Tiny atm

dull copper
#

is that a thing already?

#

I mean, it was supposed to launch for 2019.3

#

but I haven't followed the progress since the ditched tiny editor

flat talon
#

probably just "under the covers" ๐Ÿ™‚ but it exists. Im not so sure anymore though, because of the U turn that Tiny is taking now. New conversion flow vs the "pure dots" approach

dull copper
#

yeah, it was weird

flat talon
#

I just hope they will drop mono at some point and use .NET Core

dull copper
#

no more dots mode, no more tiny 2D ๐Ÿ˜„

flat talon
#

2D will be back ๐Ÿ˜„ but yeah, must be annoying for people who started making stuff there

#

since 0.2 is out now, I expect we'll see the new Tiny soon

vagrant surge
#

teh thing is that the C# jit will optimize stuff with knowledge gained from running the program

#

for example, stuff like devirtualization

#

meanwhile il2cpp cant do such things, as its ahead of time

flat talon
#

aye and it can do processor-specific optimizations when doing the jit

vagrant surge
#

in heavily OOP code, its possible to see C# and java outperform C++

#

but it needs to be an absolute nightmare of "enterprise Java(tm)" level OOP

#

and its mostly due to the devirtualization stuff

flat talon
#

btw @vagrant surge do I remember your name from a UE4 group/discord? or am I misremembering? ๐Ÿ˜„

#

(Im getting old after all haha)

vagrant surge
#

yes

flat talon
#

oh cool ๐Ÿ™‚ /wave

#

I havent done much in UE4 since shipping my last project and leaving CCP. Honestly Im more excited about the DOTS future of Unity, as much as I like some of the tools and editor in UE4.

vagrant surge
#

im working on my own ecs implementations for C++

#

maybe i actually try to release a marketplace plugin of something like a highly flexible projectile system that works with that ecs (ue4)

flat talon
#

nice! I would love to see that pattern for UE4. I had sooo many issues with the brittle actors and actor components, trying to parent things together was a nightmare when doing networking.

That ChildActorComponent thingie still gives me nightmares

#

it was .. so not deterministic ๐Ÿ™‚

vagrant surge
#

yeah child actor is a nightmare

#

im working at PUBG now, and we run into bottlenecks due to the oop-ness of the ue4 architecture

flat talon
#

oh wow, nice! ๐Ÿ™‚

vagrant surge
#

funny enough, we are moving code precisely into "bad practises" because its a lot faster

#

having a huge monolyth on the player is a lot more performant than spreading those replicated variables over multiple components

flat talon
#

yeah there hasn't really been much movement on the programming architecture in UE4 since the initial UE 4.0 release. Sure compile times have gotten faster, but no big changes coming up that Im aware of.

vagrant surge
#

nope

#

but they are interested on ecs stuff

flat talon
#

btw didnt they buy some company somewhere to do a new higher level scripting language thingie?

vagrant surge
#

i got contacted by a epic engine dev about the experiments i was doing with ECS on unreal

flat talon
#

oh nice, thats good

vagrant surge
flat talon
#

They need to look into this or be left in the dust! I was very surprised how UE4 code doesnt even use SSE instructions

#

(I know you can turn that on)

#

very cool! cant wait to see where you take this.

dull copper
#

@flat talon I'm pretty sure the use SIMD for math lib in ue4

#

at least I had to strip some of that out for my double precision variant as I didn't want to bother with vectorization

#

it's only used in few select places tho

#

also for ue4 future scripting, there was interesting comment from Tim Sweeney about it

#

they clearly want to explore more efficient ways to script things but I dunno if it'll ever affect the actual engine side of things

#

they seemed to be doubtful about Unity's ECS because it's quite compicated for the things users need it

#

I wonder if I can find the exact quote still

vagrant surge
#

they do indeed use simd

#

the FTransform and the likes is simd-d directly

trail burrow
#

@dull copper IL2CPP performs quite a lot better than mono, for code that deals with a lot of pointers, structs, etc.

dull copper
#

Unity is exploring an interesting direction with their ECS (Entity-Component System), which aims to escape the overhead of C# by moving data away from high-level objects linked by pointers to much tighter data layout, as is commonly seen in graphics programming and particle systems, and is less explored in gameplay programming. What's unknown is the productivity cost of recasting gameplay programming problems within the more constrained data model, and whether it would scale to e.g. a triple-A multiplayer game developed by a large team. from https://www.reddit.com/r/unrealengine/comments/aezhdv/it_seems_people_at_epic_are_considering_adding/edxha25/ see two top comments from Tim

vagrant surge
#

i do know from some engine devs i keep contact with, that epic games is absolutely going into more data-oriented stuff

#

most of the new renderer internals follow those sort of practises

trail burrow
#
What's unknown is the productivity cost of recasting gameplay programming problems within the more constrained data model, and whether it would scale to e.g. a triple-A multiplayer game developed by a large team.

This is so true.

vagrant surge
#

even more on the physics

dull copper
#

@vagrant surge I had to do my own transform component so if ftransform had it, that's very likely place where I saw that stuff

vagrant surge
#

where they even have the whole ISPC stuff

#

which is somewhat like burst

dull copper
#

you mean chaos now

#

but physx also has direct simd code

vagrant surge
#

no, i mean actual fmatrix ands tuff

#

there are 2 implementations separated by a define

#

one of them is TransformVectorized, and the other one too

dull copper
#

oh I thought they only used ISPC on chaos

#

I haven't really followed up what they do there lately tho

vagrant surge
#

nonono

#

TransformVectorized has been there from unreal 4.0

dull copper
#

yes

vagrant surge
#

the ispc stuff is for chaos things, they vectorize some inner loops

#

like calculating AABBs on a fkton of objects at onces

dull copper
#

ok so we still talk about same things then ๐Ÿ˜„

#

all I meant that you referred to chaos with ispc, not for the vectorization in general

vagrant surge
#

i still think they are cooking something. Lets see

#

you dont buy a team who makes a scripting language

#

and not make a scripting language

flat talon
#

@dull copper yeah I remember the same article from Tim.

dull copper
#

didn't they make python scripting for the editor tho?

flat talon
#

I remember they bought some company, and it was some language I didnt know

vagrant surge
#

yes, but you dont need a team who makes his own lang for that

#

the python thing even kinda already existed

#

what they have done is to expose BP function reflection to python

#

except python is editor only

flat talon
#

yeah it makes sense to support python for tooling, so many other programs do that

dull copper
#

(they did skookumscript or something like that)

#

(before epic acquired them)

vagrant surge
#

the funniest part is tha the python support is python 2

#

because all other CG programs still use 2

dull copper
#

also, this day is super off topic now here :p

vagrant surge
#

tho they made the implementation in a way that they would flip a switch and now its 3

flat talon
#

its semi related ๐Ÿ™‚ talking patterns and where the industry is heading with dod

vagrant surge
#

i managed to add unity style for-each to my c++ ecs

flat talon
#

cool

vagrant surge
#
world.for_each([&](EntityID id, I1& c, I2&c2) {
                count += c.val;
            });

#

im taking some inspiration from what unity does, but i havent even looked at the code of unity ecs

#

i prefer to solve the problems on my own. Much more fun

flat talon
#

all depends on what you want to spend you time on ๐Ÿ™‚ if you enjoy it and have fun, by all means!

vagrant surge
#

but yeah, writing my own implementation lets me know first hand how something like the unity one works

#

and what could be good/bad to use

#

for example, editing a random component (or reading it) from a random enemy outside of a loop is quite slow

#

as it needs to find exactly what offset to use within the chunk for that component type

flat talon
#

they probably have some cached lookup tables for that? I havent dug into their code though

vagrant surge
#

its not so easy

#

each archetype has different offsets

#

so you need to first get the archetype and chunk of the entity ID, which is easy

#

but then you have to search the archetype component list to check the offsets for that component type

#

and then access the chunk memory

flat talon
#

I cant find that component or behavior

vagrant surge
#

as far as i know i think thats about flattining the hierarchy

flat talon
#

it's being discussed in the context of rendering optimizations

vagrant surge
#

if you know the entity will be fully static, there is a lot of fun stuff you can do

worldly pulsar
#

@flat talon it's called StaticOptimizeEntity

vagrant surge
#

like store JUST the render matrix, and nothing else

#

so the entity ends up being super small

#

just render matrix + render mesh

#

and i guess AABB comp for culling

flat talon
#

thanks @worldly pulsar ! Im thinking about using this for static parts of a subscene, like walls in a level

vagrant surge
#

use it. If unity ecs can know your stuff is static, it can collapse plenty of stuff

#

which is quite great

flat talon
#

Im doing an RPG game and rendering a dungeon from a bunch of pieces

vagrant surge
#

then thats perfect

worldly pulsar
#

are they actually static, or do you spawn them, position, and from then on they are static?

flat talon
#

the startup speed (hit play) when using subscene and the new quick start is quite impressive

vagrant surge
#

i actually had some ideas for my own engine (which im also making) to use the features of chunk components and such to preprocess static scenes

#

and make sure the stuff is extremelly hyperoptimized in a few ways

flat talon
#

@worldly pulsar Im using the subscene flow, so they are already converted into entities on disk and never moved.. so completely static

#

@vagrant surge kinda like the subscene conversion flow?

vagrant surge
#

maybe but a bit more overkill than that

#

i want to actually do some fairly advanced stuff

#

like use shared components to split objects by coordinate in a way that they are clumped togther, for culling

#

but not only for culling, but for mesh too

#

i want to do batching by merging the meshes of entities inside a chunk

flat talon
#

well, you can hook into the conversion flow in Unity ECS ๐Ÿ™‚ for example write a conversion system that write everything into a blob asset

vagrant surge
#

and then use drawindirect

flat talon
#

blobs are very cool

vagrant surge
#

yeah the concept of blobs is very good

#

great idea there

flat talon
#

ah mesh merging, yeah. We used that quite a lot on EVE Valkyrie, it was key to getting good perf on AMD cards

vagrant surge
#

64 wide waveforms suck when your meshes are small

flat talon
#

(AMD cards back then did not play nicely with UE4 rendering, because of all the extra gbuffers)

#

anyways.. ๐Ÿ™‚

vagrant surge
#

i was bottlenecked as fuck on mem bandwidth for my PSVR game

#

managed to reach 120 fps, but the resolution had to be on the smaller side

#

and no matter if i simplified the scene, it wouldnt improve much

flat talon
#

yeah we only did 90 fps on the psvr iirc

vagrant surge
#

on base ps4?

flat talon
#

yes

#

on Pro we just support a slightly higher res framebuffer afaik

vagrant surge
#

damn thats impressive as fuck

#

i tried to do 90 on the base ps4 but ran into a similar issue

#

had to be low res

flat talon
#

yeah we undersampled a bit on Sparc ๐Ÿ™‚ Key for perf on Valkyrie was we implemented a dynamic res algorithm like the one described by Valve's Alex Vlachos. Basically monitored the fps and tuned some gfx settings up/down on the go

vagrant surge
#

ah, that does make sense

#

main issue i had is also the PSVR tracking overhead

#

90 fps is 11 ms

#

but you need to budget at 8

#

couse the psvr tracker comes and says "fuck yo frame"

flat talon
#

ugh dont get me started on that tracking... ๐Ÿ™‚ but getting WAY off topic ๐Ÿ˜„ haha

#

I left VR for now, but doing some personal project exploration still. Mainly programming AI these days, and atm writing an influence map system in DOTS ๐Ÿ™‚

#

Planning to make a pure DOTS based utility AI at some point too

vagrant surge
#

influence map looks a perfect match

#

after all its basically a parallel for calculating a score

flat talon
#

it really is ๐Ÿ™‚ Im just using Burst and jobs for now (lots of native arrays)

#

once Entities 1.0 ships I will most likely explore converting some of our simulation systems to Entities too

#

Does anyone know what the "Hierarchy color" on the subscene does? I cant see it used anywhere

worn stag
#

how to enable entity preview in inspector? or its isn't in 0.2?

flat talon
#

I havent seen it at least, maybe it only shows up when using live link? /shrug

worn stag
languid stirrup
#

anyone implemented a DOTS octree of any kind yet?

vagrant surge
#

@languid stirrup octrees generally go against the thinking of the whole data-oriented thing

#

for accel structures, the unity physics does some things there

languid stirrup
#

@vagrant surge yea i figured. ok these accel structures using unity physics, any exmaples or implementation?

vagrant surge
#

implementation

#

there is also the boids sample that does a hash-grid

#

if you want to create one, a rule of thumb is "all nodes go into an array, and you connect them through indices"

#

if you feel like tryharding, look at how octrees are implemented for GPUs

#

as GPUs basically only undesrtand arrays

mystic mountain
#

Are there any cons of using the lambda generating jobs?

languid stirrup
#

@vagrant surge yea that i get, I always have flattened arrays anyways. Easier to play with them in interesting ways XD

#

thnx, i will look into it

#

so, anyone know when to use the [DeallocateOnJobCompletionAttribute]

worldly pulsar
#

error DCICE001: Entities.ForEach Lambda expression uses something from its outer class. This is not supported. Seeing this error indicates a bug in the dots compiler. We'd appreciate a bug report (About->Report a Problem). Thnx! <3
And now I'm confused because it gives me a clear error message about something I totally expected to not be supported, and then asks to report it as a compiler bug ๐Ÿค”

#

@languid stirrup you mean with the new ForEach or in general?

flat talon
#

@worldly pulsar Are you captureing variables from outside the lambda? I was trying that last night but it wasnt working correctly

worldly pulsar
#

worse, I'm capturing system class fields ๐Ÿ˜›

languid stirrup
#

in general. i just found out about that attribute tag, so wondering where i can use it @worldly pulsar

flat talon
#

Native arrays I guess? yeah not sure about that, have only used the new syntax a little bit

#

DeallocateOnJobCompletionAttribute was used on native arrays on jobs, so they would auto call Dispose when job is done. Afaik ๐Ÿ™‚

worldly pulsar
#

@languid stirrup use it on native containers that are fields in a job struct, the container will be deallocated after the job completes

flat talon
#

saves you a "jobVar.MyArray.Dispose()" call later ๐Ÿ™‚

languid stirrup
#

ah, thnx, fields in the Job Struct. But will these be atleast be available a bit after the Completed() is called, or at Completed() poof, they are gone?

worldly pulsar
#

assume they are gone at Complete()

languid stirrup
#

also, TempJob allocations are also automatically disposed after the job is done right?

worldly pulsar
#

Pretty sure TempJob have to be disposed manually (not 100% sure)

flat talon
#

yes it does have to be disposed

worldly pulsar
#

Temp allocs don't care about Dispose

flat talon
#

sure about that? I thought the alloc type was really just in what memory blob they ended up in and how much the system would monitor their lifetime

worldly pulsar
#

Well, I'm dropping Temp allocs on the floor and it never complained ๐Ÿ˜›

#

afaik Temp is just a linear allocator that gets reset at the end of frame

#

ok, more specifically, it's deallocated when returning from managed to native:
Scripting: Allocator.Temp memory in NativeContainer types is now automatically disposed of when returning from managed code back to native. Also enforced the restriction of passing Allocator.Temp memory to jobs, which enables the use of Allocator.Temp NativeContainer types in Burst compiled jobs

flat talon
#

thanks! ๐Ÿ™‚ thats useful to know (for sure)

violet garden
#

Hello

#

Anybody knows what I'm messing up?

#

This is after I build

mystic mountain
#

So, did you build from build settings?...

worldly pulsar
#

Assets->Create->Build->BuildSettings Classic

#

And build using the inspector on that asset

violet garden
#

I'll look at that thank you

#

That create is greyed out

#

Not sure if I need to select something beforehand

worldly pulsar
#

click on any folder in the project window

violet garden
#

Ah yes

worldly pulsar
#

btw, there is a nice example of what you can do with BuildSettings in the ECS Samples repo

violet garden
#

Do I have to put just scenes or subscenes in there also?

#

I should probably check that out yeah

flat talon
#

subscenes belong to a scene, so just the scene

violet garden
#

Alrighty!

worldly pulsar
#

Unity now has a built-in way to specify the build directory without writing code, the future is here ๐Ÿ˜„

violet garden
#

Not quite sure what you mean by that ^^'

flat talon
#

Joachim recently commented on the forums that this new build pipeline will slowly take over the old ways, they are just developing it first with DOTS in mind

worldly pulsar
#

You can now add Build Output Directory in the BuildSettings, instead of selecting it every time you press build, or writing a custom build script

violet garden
#

Ah alright yeah I see

flat talon
#

yeah I didnt notice the giant + sign on the bottom of the inspector at first, to add new build modules

plain cloak
#

can someone tell me what is the purpose of ".WithName()"

#

is it for burst inspector?

flat talon
#

entities can have names now, show up in the entity inspector. Maybe that?

plain cloak
#

this is for job systems though?

flat talon
#

interesting

#

its used to give the job a name it seems

#

ie the job created from the lambda

plain cloak
#

But I can't find that name anywhere

flat talon
#

profiler?

#

* **`WithName(string)`** โ€” assigns the specified string as the name of the generated job class. Assigning a name is optional, but can help identify the function when debugging and profiling.

#

there ya go

plain cloak
#

ye, you are right

#

thanks

flat talon
#

np

plain cloak
#

Where is that docs from btw?

worldly pulsar
#

One unfortunate thing of the codegen magic is that you can't figure out what a piece of code does from looking at the source ๐Ÿ˜ฆ

violet garden
#

So I managed to setup the new build settings, but my scene is still not playing correctly.
My environment subscene displays only 1 GA out of 4, and seems out of place.
Could it be there is more to setup for a build?

#

Works fine in-editor

flat talon
#

its from the Entities documentation, not sure its been published fully yet

plain cloak
#

i see

flat talon
#

look in your packages folder

#

Library\PackageCache\com.unity.entities@0.2.0-preview.18\Documentation~

#

what I pasted is from entities_job_foreach.md

#

its not as handy as just reading it from the webpage though, but Im sure they'll push those out very soon

plain cloak
#

thanks found it

#

looks pretty complete, i wonder why its not out yet

flat talon
#

package was published very late on Friday, I guess the docs people had gone home for the weekend ๐Ÿ™‚

trail burrow
#

I'm not fan of the il patching magic tbh

#

They've done this in the past, il weaver for unet for example, it always ends up with a bunch of weirdness and code that cant be source code stepped (when debugging)

worldly pulsar
#

If they wanted to reduce the amount of boilerplate I don't see a better way to do it

trail burrow
#

Magic implicit shit always ends coming back and biting you in the ass

#

Every time

#

This is a lambda that's not a delegate but gets turned into a magic structure with an interface on it..

#

I'm sure that's never gonna confuse anyone lol

plain cloak
#

you can still write IJobChunk though. I think its nice to reduce boilerplate for simple and common cases

worldly pulsar
#

I'm mostly ok with ForEach() being essentially a compiler intrinsic... There are way more confusing things in dots already (like all the magic attributes, [ExcludeComponent], [DeallocateOnJobCompletion], [DisableAutoCreation] etc).

mystic mountain
#

But are there performance cons for using the lambda generated jobs? Or are they equal to writing them explicitly?

worldly pulsar
#

They should be as fast as hand-written IJobChunks

safe lintel
#

except when compiling(at least for me)

dull copper
#

@worn stag I totally expected the new live inspector to be there but haven't seen it anywhere yet

#

I hope it's not far away because we need it badly / using entity debugger is far from convenient

plain cloak
#

what is live inspector?

dull copper
#

they showed this at Unite Copenhagen keynote

#

I was under impression that it would ship with the new dots packages

plain cloak
#

ye that would be nice

dull copper
#

this probably needs changes to the unity editor itself that haven't landed yet

#

we'll know this for sure once the dots shooter project lands

#

I just tried simple subscene from ECS samples on both 2019.3b12 and 2020.1a14 and don't see anything obvious to enable that entity conversion option for the subscenes

hollow sorrel
#

except when compiling(at least for me)
@safe lintel you mean compiling takes noticably longer using ForEach?

dull copper
#

Joachim said all what they showed will land on 2019.3 soon

#

so I guess, soon(tm)

#

it's from september

#
# About com.unity.dots.editor
##DOTS Editor
This package provides data analysis and visualization tools that are built on top of the ECS architecture.```
#

it depends on the Entities 0.1

dull copper
#

I wonder about the live link tho

#

they only covered changing materials or manipulating existing objects

#

which leads me to believe that you still can't import new meshes or textures live

tawdry tree
#

Didn't someone say it basically re-compiled and sent a dll? That would imply potentially greater changes

dull copper
#

they basically save the data serialized along with subscene I think

#

I dunno how they included materials in that tho

civic bay
#

I'm instantiating approx. 20,000 entities from a prefab which is just a cube with a material, no physics shape / body authoring - and converted to an entity. But my FPS drops under 60FPS, the system with the biggest load seems to be RenderMeshSystemV2 , can anyone see what I might be missing or how I can better optimise this? Cheers

vagrant surge
#

1 ms is not a big load at all

#

bigger issue is that its not instancing

civic bay
#

No I know

vagrant surge
#

you have 23.000 drawcalls

civic bay
#

How can I batch it?

#

Or fix it instancing?

vagrant surge
#

i dont know

twin raven
#

Do you have gpu instancing enabled in the prefabs material?

civic bay
#

@twin raven Yeah :/

twin raven
#

Can you post a screenshot of the inspector window of the material

civic bay
#

I just changed the material to the standard one and it's fixed it

dull copper
#

what shader that was?

civic bay
#

It's just this material causing issues..

#

This one is one I purchased from Unity Asset store

dull copper
#

shader basically

#

so you are still using the built-in renderer?

civic bay
#

Yeah

solar ridge
#

๐Ÿค” Json...

#

Having troubles reading a string value into a NativeString struct

#

I was assuming the added implicit would help the JsonUtility, but that seems not the case

safe lintel
#

@hollow sorrel yeah, feels slower compiling with the new ForEach

rare umbra
#

So does that mean ForEach is optimized like an an IJobChunk now?

flat talon
#

Anyone having issues with the contents of a subscene disappearing as soon as you save+close the subscene? Then once I hit edit they show up again

civic bay
#

How can I set the Collision Filter "Belongs To" and "Collides With" data at runtime when I instantiate an entity?

rare skiff
#

@civic bay I noticed not all shaders are able to use GPU instancing properly

#

For example if I use standard shader, GPU instancing works

#

But if I use mobile diffuse, the batches will skyrocket again. Even though GPU instancing is enabled and the only thing that changed was the shader

civic bay
#

Hmm

#

I'll roll with the standard for now, see how far I can get with that

rare skiff
#

Set your shader back to the standard and see if it helps

#

yeah

civic bay
#

Yeah it did ๐Ÿ™‚

rare skiff
#

nice

slate breach
#

Does the new update have any animation support?

safe lintel
#

no

rare skiff
#

Anyone using ECS with the new Input system?

safe lintel
#

yes but im still trying to wrap my head around it, current implementation is super simplistic

#

mine that is

rare umbra
#

Anyone using Component data outside of a system? Wondering how to update a Text field from a value in a component

#

Ideally Iโ€™d like to convert a GO to an entity and then get back a reference to that entity in a monobehavior

#

Any examples appreciated

safe lintel
#

use entitymanager to query that data?

#

use IConvertGameObjectToEntity on your monobehaviour, and in Convert store the entity on your script. Then in update or wherever use get the entitymanager via World.DefaultGameObjectInjectionWorld.EntityManager and then use entitymanager from there

#

@rare umbra ```cs
public class GameManager : MonoBehaviour, IConvertGameObjectToEntity {
private Entity m_Entity;
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) {
m_Entity = entity;
}

    public void Update()  {
        var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
        if (entityManager.HasComponent<MyData>(m_Entity)) {
            var data = entityManager.GetComponentData<MyData>(m_Entity);
        }
  }

}

rare skiff
#

@safe lintel looks like the unity physics sample includes an ECS implementation of the new input system

#

It seems very complicated.

rare umbra
#

Great thanks @safe lintel

rare skiff
#

I really feel like the Unity samples are a mess.

onyx mist
#

are enums in compdatas supposed to show the enum name instead of the variable name in the debugger? for example: "AllPossibleStates" vs "CurrentState"

rare skiff
#

Many files which include authoring, components, systems, etc. all in 1 file

onyx mist
#

its not a big deal, just kinda odd

safe lintel
#

I dont think i ever noticed that @rare skiff , thanks for pointing that out

rare skiff
#

np

golden heron
#

sup guys, anyone formed any meshes in dots?

#

Like, used the ecs systems to actually create them?

rare skiff
#

that was my plan this weekend lol

#

but boy I am spending a lot more time just wrapping my head around this

#

than I thought I would need

golden heron
#

Hehe nice, good person to talk to then - im mostly interested in the thought about it rather than implementation

#

Its a completely new way of thinking.

#

You've heard of thinking outside the box?

#

Monobehaviour is the box. Ecs shreds the box and pees on it.

rare skiff
#

yep

golden heron
#

But, with love. Very quickly calculated love hehehehe

#

Have you got any issues atm?

#

"Burst Compiler -> Premature Calculations for the cpu" :P

rare skiff
#

I have a lot of experience with Entitas but still just trying to figure out the API

golden heron
#

Ah, i see, api is a pain, but ive gotten through most things now hehe

#

My own trouble is figuring out a way to create a sphere which can dissolve and subdivide at will, and unevenly.

rare skiff
#

what resources did you use to learn it

#

I've found a few things but they are outdated

golden heron
#

three main resources; blood, sweat, and tears.

#

Well, not so much the blood hehehe

#

But yeah, its just odd bits here and there

#

I found it best to look at premade systems, starting with the simplest, and replicate them yourself from scratch.

#

I've actually gone as far as designing my own physics for it... Then they released unity.physics the damned helpful gits hehehe

#

In particular, the boids example shows how problems can be solved in ways you never expected, and it teaches you to think about the entities differently.

#

Have you created any systems yet?

#

I find generally picking something from the api and googling the method/property name works, and go from there. If needed, try it out and get your feedback recorded somewhere, test the output with debug.logs or something, to avoid that mysterious background numbers feel.

#

@me if you reply :)

rare skiff
#

Yeah @golden heron

#

I'm just starting with simple random cube spawner

#

Then adding more components

#

and more complexity

golden heron
#

I'd go through all the examples, and just start by trying to get your head around whats going on first.

#

That includes the boids one.

#

The thing about ecs is you arent just rearranging memory and programming layout, you are also exposing your entities to types of data analysis and statistical composition that the usual monobehaviours just plain cant do.

#

The boids example is a beginning idea of this, and it uses a very basic implementation of swarm mechanics to keep the fish both together, and apart, and also avoiding the shark.

safe lintel
#

i still dont understand the boids example ๐Ÿ˜„

golden heron
#

hehehe

#

well it uses the hashmap and the combined directions of the entities. It basically looks at the entities as a group simultaneously, using multiple jobs one after the other to achieve this, as of course each job pertains to only one entity at a time. So, they run through gather data, then they do their swarm calculations and then they return the data to the entities. All this is done by modifying data only component data, updating direction intention and so on, then the rest is simple movement systems.

#

Dont try to understand the math, just follow where the data goes and what it does.

#

the boids math is cool, but its irrelevant unless you have a swarm. What matters is how they manipulate data of entities as a group. That part is invaluable for any cohesive behaviour of a game world.

safe lintel
#

hmm boids system code example looks different from how I remember it

#

i think it used to be chunk iteration previously? not sure if this is more readable or not

#

oh joy, looks like probuilder meshes are messed up with dots again

rare skiff
#

What platforms does DOTS support?

safe lintel
#

i think its supposed to support all of them? burst is another question though. also they are targetting hdrp first, urp is on the backburner so that probably limits the platforms right off the bat

#

sidenote getting strange behaviour if static is enabled on a gameobject that is converted to an entity

golden heron
#

Basically, all of them, but its still young hehe

safe lintel
#

its like the baby yoda, technically older than it looks and sometimes acts

solar ridge
#

So having experimented a bit with the new serialization package, anyone happen to know if I am using this wrong? I am getting a VAST difference of performance when serializing a json string with JsonUtility vs Serialization.DeserializeFromString

https://forum.unity.com/threads/json-to-struct-with-nativestring-preview18-0-2-0.782123/

hollow jolt
#

Is there a performance impact when reading static variables inside * a system while having the IComponentData as an empty tag ?

#

( assuming in some cases the static vars will be changing during runtime )

#

plz tag me, if anyone knows, cheers

mint iron
#

@hollow jolt can you provide an example of what you're trying to do?

hollow jolt
#

runtime editable variables in the inspector

#

i was thinking to make a mono that will edit any changes values on update -- to the static class *

#

while the system will act on the component tag without the data

#

also the system job will read directly form the static class

hollow sorrel
#

dunno about static but what you can also do is use OnValidate() on the mono which runs when you change inspector data, and then setcomponentdata in there
then you wont have to run it every update either

mint iron
#

yeah, definately check out the proxy classes in the entities hybrid source, they use that strategy.
\Unity.Entities.Hybrid\Components\ComponentDataProxyBase.cs

hollow jolt
#

wouldn't that be too much changing 1000's component data at the same time ?

#

i guess ill try both methods ( static and onValidate )

#

would there be something like shared component data ?

hollow sorrel
#

dunno, if its just something you change in editor every once in a while to test i wouldnt worry tbh

hollow jolt
#

true that

#

OnValidate looks like the proper ecs approach method ( when calling set component data, instead of unnecessary system modifications in the test code )

#

@mint iron so something like that ?

public class EditorComponentDataMono : ComponentDataProxy<ComponentData>
{
    public float var1 = 0f;
    public float var2 = 1f;
    public float var3 = 2f;
}
#

where var1,var2 & var3 are also present in the ComponentData ?

mint iron
#

hmmm, i havent used it directly tbqh, i just took the technique and implemented the OnValidate/Serialization hooks but for a scriptable object. The default proxies use it like this

    public class TranslationProxy : ComponentDataProxy<Translation>
    {
    }

    public class RotationProxy : ComponentDataProxy<Rotation>
    {
        protected override void ValidateSerializedData(ref Rotation serializedData)
        {
            serializedData.Value = math.normalizesafe(serializedData.Value);
        }
    }```
hollow jolt
#

why is the 1st class don't override ?

#

( is that because it will auto serialize the base class data as well ... ? )

mint iron
#

i suspect its because the base class parameter (Translation/Rotation) is stored as a private field marked with the property WrappedComponentData, then a custom drawer will display it Unity.Entities.Editor\PropertyDrawers\WrappedComponentDataDrawer.cs

hollow jolt
#

would the TranslationProxy be needed to be added on top of the gameObject who is getting converted to entity ?

#

Where * did you implemented it if i may ask ...

mint iron
#

bare in mind this is just me messing around with different ideas

hollow jolt
#

woah that's a lot of material, thanks !

trail burrow
#

anyone else having trouble installing burst 1.2.0 ?

#

maybe it's not specific to burst

#

but i can't get it to install the package

#

maybe package manager causing issues

hollow sorrel
#

what does your package manager look like

#

every dependency needs a checkmark next to it

#

and if it doesn't then you'll prob have to add it manually in the package json

#

had to do that for properties 10

#

or serialization i forget

plain cloak
#

Is there a way to ScheduleSingle with new ForEach syntax?

languid stirrup
#

I have a IJobParrelelFor and itโ€™s scheduled as (100*100, 1000) and in every thread I check for a condition. If the condition is met in ANY of the threads I want a true after the job is completed(). I tried creating a bool and an int and setting bool to true or setting that int to 1 but when I check the job.conditionFlag after the completed() it returns false or 0......

dull copper
#

@hollow sorrel checkmark is basically there to give you a visual clue that the package version installed is as new or newer than marked for that package dependency

#

only case when you'd see X there is if you've manually installed older package for some of the dependencies

#

and I guess it's also technically possible some other packge installed older dependency too, considering how fragile PM has been in past :p

hollow sorrel
#

ye

dull copper
#

but all in all, the less amount of packages you install manually and just rely on the dependencies, easier it will be for you

#

oh right, you were replying to fholm

#

my bad ๐Ÿ˜„

#

@trail burrow you've hit the expand arrow on the Burst package versions?

trail burrow
#

i solved it

#

restarted unity

#

๐Ÿ˜„

dull copper
#

they now hide more experimental versions by default if there's verified package

#

ah

#

"have you tried to turn off and on your computer"

#

still works

#

there used to be this "by design" thing about PM

#

I wonder if it still works the same way... basically PM's cache didn't update if you had it open/docked to your layout and you opened Unity

#

it's super dumb as it's a thing you'd expect to have there open on some background tab

#

but after I found it was root cause of my issues (around 2018), I just systematically taught myself to always open it only on demand and close it immediately after

#

most of my PM oddities went away after that

flat talon
#

hmm.. has anyone experimented with this? seems to be a way to Burst compile a block of code within a lambda? :)

Job.WithName("AMainThreadJob").WithCode(() =>
{
    for (int i = 0; i != myCapturedFloats.Length; i++)
        myCapturedFloats[i] *= 2;
}).Run();```
amber flicker
#

That looks cool. Been working with DOTS for a year-ish now and suddenly I feel a bit lost again ๐Ÿ˜… - like I was using AddComponentObject for managed components and later chunk.GetComponentObjects<type> - but the latter now requires a struct. There's now these 'hybrid components' but completely unsure if that's what I need to be using.. sigh

flat talon
#

hybrid components are slow, and only supposed to be a temporary patch until everything is in "dots land" ๐Ÿ™‚ ie for things you cannot convert into component data.

And yes its all changing a lot

dull copper
#

^ sounds like every big Entities api update

flat talon
#

I hope it will start to stabilize soon! 1.0 is not that far off (or so we think!)

mystic mountain
flat talon
#

not sure you need to? I cant see many cases where perf sensitive code would need to send web requests? and you also wouldn't need to reference a web request class from an entity?

#

it is possible though ofc ๐Ÿ™‚ SpatialOS changed their main SDK to use entities for all network calls

mystic mountain
#

For my server I send a web request for each client , i.e. entity. Holding the Request and Operation in a managed component.

#

Hmm, I guess one* solution would be to have an ID to the request that exists in some managed code.

flat talon
#

sure, if you dont need to process the request in dots land you can just have a ref to a managed array

dull copper
#

@flat talon I'm 100% convinced that the API will still keep evolving a lot after 1.0

flat talon
#

sure, but at that point they need to maintain and support the shipped APIs too

dull copper
#

Unity rarely locks API tightly once the first stable gets out

trail burrow
#

Lol to the answer to "how do i do a web request in dots is?" is "not sure you need to?" ๐Ÿ˜„ lol

flat talon
#

I know they want to move away from the explicit jobs and rely on the lambdas

trail burrow
#

we're only allowed to do high perf stuff?

#

_<

flat talon
#

ofc not fholm, its just a question of practicality ๐Ÿ™‚ currently there is more effort required in doing dots code

#
  • overhead of doing simple things, like iterating over 1-2 items is most likely going to be slower than managed code
trail burrow
#

@mystic mountain you can just pin the web request handle, hold on to its IntPtr, and check it occasionally on the main thread

#

that lets you keep a reference to a web req on a component

mystic mountain
#

pin?

trail burrow
#

eh... i dont have unity with ecs/dots installed (in this project right now), there's a utilty method deep down somere

#

UnsafeUtilty.PinObjectAndGetAddr

#

or some shit

mystic mountain
#

Oh!

amber flicker
#

Appreciate thoughts on the following. GameObject with Camera component on. First constraint is no requirement to convert this gameobject to ECS land and to be left as-is. I want to create an entity with a ref (somehow) back to this camera MB. Let's say this entity has a 'CameraZoom' ICD and a system runs over those components and I want the system to be able to write values to the original Camera MB. This is a specific example but my use-case is any gameobject/components being left as-is.
Currently when I create the entity I do AddComponentObject(origCameraMB) and in my system chunk.GetComponentObjects(CameraType) then set values directly. This seems no longer viable (although god knows what this ArchetypeChunkComponentTypeDynamic is now).
It seems like I may be able to use AddHybridComponent when I first create the entity but I can't find anything on how you'd access the component later from a job.

trail burrow
#

been pondering building a fully deterministic 2.5D physics engine for ecs/dots

dull copper
#

what is 2.5D in physics?

trail burrow
#

@dull copper 2D physics with verticality/heigh

mystic mountain
#

~~Do I need to unpin it? ~~ Can I check the ptr in job, or how did you propose I would connect the two?~

dull copper
#

so basically just omitting rotation?

#

(from 3D physics)

trail burrow
#

@dull copper well 2D colliders with extruded colliders in height/depth, and allowing height/depth offset

#

it's a normal 2D physics engine also ofc

hollow jolt
#

a multi layered 2D physics engine

trail burrow
#

@hollow jolt well, yes 2D physics with depth and thickness basically

#

it's pretty useful for a lot of 2D games, or semi-2d/top-down games like diablo style stuff, etc.

hollow jolt
#

yep, or use 3d ?

trail burrow
#

@hollow jolt well the 3d engine isn't deterministic, nor is it predict/rollback, and 3d is waaay slower than 2d physics

#

if you want to simulate lots and lots of stuff in 2D, it's much faster to just do it in 2D, than lock an axis/rotation in 3D

hollow jolt
#

didn't know that, i figured determinism comes along the ride on each added dimension

trail burrow
#

huh? there's no determinism in dots physics atm at all

hollow jolt
#

yea but you can save any given point in time

#

or rather solve backwards ( if that's even possible )

#

like reversing the time var

trail burrow
#

how does that help determinism?

hollow jolt
#

math wise reversing the time should work

mystic mountain
#

So what would the advantages be of using PinGC compared to having a managed Component? (since I still need to go main thread to check the managed object) Or just that the managed component will be deprecated in future?

trail burrow
#

@mystic mountain none maybe, right they added managed component now a days... use that then

#

maybe it slows it down? idk

hollow jolt
#

iirc i remember somebody did a box2d time rollback effect few years ago

trail burrow
#

@hollow jolt well, i'm not sure what you're on about... lol

#

i want to do full determinism, not play time backwards

hollow jolt
#

oh as if you want to predict the simulation before it starts ?

#

like avoid chaos theory and all

#

?

trail burrow
#

no, i just want a deterministic physics engine for multiplayer, so i can do predict/rollback and lockstep games in dots lol ๐Ÿ˜„

hollow jolt
#

sounds like you are making the next CSGO if you need that amount of precision

trail burrow
#

what

hollow jolt
#

would it be 265 tick server O.o

mystic mountain
#

It means same input => same output every time wherever

trail burrow
#

i don't even... ยฏ_(ใƒ„)_/ยฏ

hollow jolt
#

jk, speaking of multiplayer physics, why the current ecs-physics won't work ?

trail burrow
#

because they are not deterministic

#

like i said

hollow jolt
#

you could save the sate of any given time step

trail burrow
#

lol

hollow jolt
#

and roll back if needed ...

trail burrow
#

it's still not deterministic lol

hollow jolt
#

hmm... so you would need to predict something like a attack hit before it happens ?

trail burrow
#

that has nothing to do with determinism, that's an orthogonal problem to determinism itself

hollow jolt
#

what do you mean by determinism ?

trail burrow
#

that the simulation can be seen as a pure function

#

and that the simulation always produces the same result

#

for the same start state and input

#

i.e. s' = f(s, i)

hollow jolt
#

assuming the player input does not introduce chaos into the equation ?

#

not sure that i get it

trail burrow
#

i'm pretty sure of that

#

lol

#

i'm out o/ gotta work

hollow jolt
#

ok, ill go read some about that

rare umbra
#

still getting compile errors after updating to 0.2.0

#

com.unity.entities@0.2.0-preview.18\Unity.Entities.CodeGen\EntitiesILPostProcessor.cs(36,40): error CS1061: 'ICompiledAssembly' does not contain a definition for 'Defines' and no accessible extension method 'Defines' accepting a first argument of type 'ICompiledAssembly' could be found (are you missing a using directive or an assembly reference?)

#

anyone able to help?

hollow jolt
#

@trail burrow are you looking to implement lock stepping ?

trail burrow
#

both

#

lockstep and predict/rollback

hollow jolt
#

via mlapi ?

trail burrow
#

huh?

#

no why would i use that

hollow jolt
#

what are you going to use ?

trail burrow
#

my own stuff

hollow jolt
#

why not tho ?

#

sounds like you are a networking engineer

trail burrow
#

because... i don't want to use MLAPI

#

Yes I am, I build networking stacks for games for a living

hollow jolt
#

can you recommend some learning material for networking ?

trail burrow
#

nope

#

there's none

#

well gaffer on games

#

and gambetta

#

and then the tribes paper

#

and a few GDC talks

#

but that's about it

hollow jolt
#

so basically trial and error ?

trail burrow
#

yes

hollow jolt
#

god damn ...

tiny ore
#

Lol

#

Here we go again...:=)

#

@hollow jolt some of us here do game networking for a living.

#

It's a nice community.

hollow jolt
#

iirc unity had a multiplayer talk recently were they discussed many different implemented algorithms for this, is that relevant ?

trail burrow
#

relevant to what?

hollow jolt
#

networking with unity & physics

tiny ore
#

And sometimes that (networking) has a super close relationship with data models (dots, for example)

hollow jolt
#

sounds complex

trail burrow
#

how should i answer that lol, never seen the talk ยฏ_(ใƒ„)_/ยฏ

hollow jolt
trail burrow
#

i know the guys behind it, nice guys

glad grail
#

@trail burrow I recently spent a lot of time investigating determinism. I didn't really find anything suitable off the shelf. If you have the budget Quantum does it, I've ended up keeping my own deterministic gamelogic running in a native plugin.

trail burrow
#

@glad grail I'm the inventor/lead behind Quantum btw ๐Ÿ˜›

glad grail
#

oh, hi ๐Ÿ˜„ Nice job!

tiny ore
#

@glad grail how's that going? Are you guys waiting for an answer from us?

#

Just checked here. We answered you.

glad grail
#

Hi Erick, I've been in touch and all looks great, but for a few reasons we're not really in a position to commit to Quantum for this project. If our situation was any different I would be trialing Quantum without a doubt.

tiny ore
#

I'll send you a PM

hollow jolt
#

@tiny ore so 1K$US is the fixed price ?

tiny ore
#

For SDK access yes... That or you pay a (very good) developer to write something similar over 3 years..

hollow jolt
#

sdk access only ? so that doesn't include hosting ?

tiny ore
#

That comes with 500 CCU hosting during development/beta testing games, etc

#

For live ops, your game can grow a LOT, right? So that's a separate agreement.

#

1K doesn't pay for a lot of servers if your game gets successful. You pay based on the number of concurrent players.

#

But anyway...

hollow jolt
#

500 active at any given point in time or 500 in total ?

tiny ore
#

Send us an email. I should not "polute" this channel.

#

CCU (concurrent at the same time). You need a lot of players to reach that.

hollow jolt
#

ok thanks

rare umbra
#

marcmcg Today at 9:42 AM
still getting compile errors after updating to 0.2.0
com.unity.entities@0.2.0-preview.18\Unity.Entities.CodeGen\EntitiesILPostProcessor.cs(36,40): error CS1061: 'ICompiledAssembly' does not contain a definition for 'Defines' and no accessible extension method 'Defines' accepting a first argument of type 'ICompiledAssembly' could be found (are you missing a using directive or an assembly reference?)
anyone able to help?

Fixed it by updating 2020 to the latest alpha (14)

night cargo
deft niche
#

Does the new entities package allow commadbuffer commands to be burst compiled ?

trail burrow
#

yes

deft niche
#

InvalidOperationException: Burst failed to compile the function pointer Void AddComponentEntitiesBatchExecute(Unity.Entities.EntityComponentStore*, Unity.Collections.LowLevel.Unsafe.UnsafeList*, Int32)
Unity.Burst.BurstCompiler.Compile[T] (T delegateObj, System.Boolean isFunctionPointer) (at Library/PackageCache/com.unity.burst@1.2.0-preview.9/Runtime/BurstCompiler.cs:160)

#

@trail burrow I get this error

trail burrow
#

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

deft niche
#

๐Ÿ˜ฆ

trail burrow
#

beta editor with preview package

#

idk what to tell you lol

deft niche
#

I have not seen a working example yet.. everyone keeps saying its working..

solemn ice
#

If I want to use an EntityQuery with the new JobComponentSystem's Entities.ForEach(), (equivalent to the Entities.With(query).Foreach() in ComponentSystem), Do I use WithStoreEntityQueryInField?

dull copper
#

@deft niche are you using same dependencies as on the entities 0.2 package?

#

or do you have different collections etc package

deft niche
#

yep I am... everything is on 0.2.0.

deft niche
#

ok got it to work.. had to delete the library folder..

#

Well.. everyone else was right.. commandbuffers do work in burst compiled jobs now ๐Ÿ˜„

gusty comet
#

Hmm updated to a14 today (along with all packages) and it looks like "Convert and Inject GameObject" has changed; a GameObject is no longer being created (so it's basically just Convert and Destroy)

worldly pulsar
#
{
    for (int i = 0; i < randomNumbers.Length; i++)
    {
        randomNumbers[i] = randomGen.NextFloat();
    }
}).Schedule(inputDeps);

Job.WithCode is new, right?

deft niche
#

wasn't there before...any documentation anywhere on what it does exactly ?

worldly pulsar
#

generates a job apparently

gusty comet
#

@worldly pulsar thanks for that ๐Ÿ™‚
Silly workaround but it'll do for now

dull copper
#

it's a silly bug

gusty comet
#

is Job.WithCode burstable?

worldly pulsar
#

yeah, I hope they hotfix it soon, it's annoying

dull copper
#

considering this is really basic usage now

#

makes one wonder how it could even slip through

trail burrow
worldly pulsar
#

@gusty comet according to Lucas Meijer on the forums, Job.WithCode uses burst, yes

gusty comet
#

interesting

worldly pulsar
dull copper
#

people really are losing their cool

#

I totally expected superpig to step in ๐Ÿ˜„

#

but I guess he doesn't do dots subforums

candid willow
#

Has anyone gotten similar issue to this? My default HDRP Lit shader is glowing bright pink!

dull copper
#

you have bloom enabled?

#

also probably more of a HDRP issue than hybrid

candid willow
#

No. It randomly happens. It'll render normally one day, then does this another day.

#

After updating to 0.20

worldly pulsar
#

search for "Empty scene with no light.. default cube, new project in: dots " on discord

#

(I don't know if there is a way to link to a post on discord? )

candid willow
#

oh, pretty specific ok lol

worldly pulsar
#

I'd link you the post but don't know how ๐Ÿ˜›

dull copper
#

right click the message and you should see message link option as last option

candid willow
#

ok things are improving

dull copper
#

"copy message link"

deft niche
#

ArgumentException: Unknown Type:MasteryEffectComponent All ComponentType must be known at compile time. For generic components, each concrete type must be registered with [RegisterGenericComponentType].

#

Anyone got this error ?

#

Its not even a generic component ๐Ÿ˜

#

The same code was working with previous versions..

worldly pulsar
#

So... apparently to see the "copy message link" option you need to have developer mode active

dull copper
#

ah, that's possible

worldly pulsar
#

I sometimes feel like I'm getting too old for the intuitive, modern software (and I'm not even 30)

#

Is there a way to convince the new ForEach job generator to mark a captured NativeArray [ReadOnly]?

deft niche
#

Cant you specify that component to be readonly in entity query itself ?

worldly pulsar
#

not component, NativeArray

#
Entities.ForEach((ref Thing thing) =>
{ 
    thing.Value = readOnly[thing.Idx]; 
}).Run(); ```
deft niche
#

interesting..never really needed to do that. But yeah.. don't think there is a way to do that..

candid willow
#

Alright turns out its dx12 if someone else runs into that default bloom issue

worldly pulsar
#

oh, ok, there is Entites.WithReadOnly(readOnly).ForEach(...)

rare umbra
#

So I have a MonoBehavior running on a GameObject that is in a subscene - the component has it's own conversion definition. I'm finding that he monobehavior only runs when I actively have the subscene in the "Edit" state in the editor

safe lintel
#

monobehaviours dont exist when it gets converted to entity representation

#

which is what happens when you close it

rare umbra
#

@safe lintel hrm in that case I'm confused - I'm using the code you gave me yesterday. I guess I shouldn't be using it on a game object in that case?

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


public class GameManager : MonoBehaviour, IConvertGameObjectToEntity {
        private Entity m_Entity;
        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) {
            m_Entity = entity;
        }

        public void Update()  {
                            Debug.Log("moooose" +m_Entity.ToString());
            var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
            Debug.Log(entityManager.Exists(m_Entity));
            if (entityManager.HasComponent<WalletComponent>(m_Entity)) {
                var data = entityManager.GetComponentData<WalletComponent>(m_Entity);
                Debug.Log("moooose1");
            }
      }
}```
#

ignore my crazy log messages

deft niche
#

Don't put it in a sub scene..

#

As far as I know.. things in sub scene will get converted to pure entities and monobehaviors won't exist

rare umbra
#

still stripping out the monobehavior - even if I use Convert and Inject

safe lintel
#

well anything in a subscene is treated as convertanddestroy

#

anything you want as inject dont put in a subscene

#

subscenes are just entities, no gameobjects

#

(you use a gameobject to author their conversion though)

rare umbra
#

@safe lintel did I hear something about Convert and Inject issues in 0.2.0? Because My GO is being destroyed now that itโ€™s in the main scene and marked as convert and inject. Hrmm maybe thereโ€™s a new compiler directive for this

deft niche
rare umbra
#

this works great, thanks!

#

and the code that you gave me @safe lintel works a treat too

safe lintel
#

@rare umbra I added a line to the ConvertToEntity class
where it says toBeDestroyed.Add(convert.gameObject);
I added if(convert.ConversionMode == ConvertToEntity.Mode.ConvertAndDestroy) above it
it solves the issue for me withoiut needing to parent anything, but im not 100% sure if this is correct which is why i didnt post anything to the forums about it

deft niche
#

I am just using GameObjectConversionUtility method at the Start() on the authoring scripts as an alternative till unity fixes converttoentity

rare umbra
#

@safe lintel nice fix! I did the parenting one from the forums and I named it something really obvious so I wonโ€™t forget to check if this is fixed in a new version ๐Ÿ˜‚

craggy orbit
#

anyone know how to use the inputs for the Linear Blend Skinning node in ShaderGraph? i know that some things like UV can contain a bunch of Vector2s, kind of like a texture containing colors, but im not sure what contains a bunch of Vector3s to use with this node. im 82% sure it's a DOTS-specific thing which is why im asking here. i also can't find any documentation on it

deft niche
#

Does anyone know what is the minimum version of unity that the new ecs package requires ?

#

Does 2019.3.0b8 work ?

safe lintel
#

i think 19.3b10

deft niche
#

Thats the last beta that's accessible in cloud builds

#

Awwww... ๐Ÿ˜

safe lintel
#

well maybe im misremembering things

craggy orbit
#

it's b11 actually

safe lintel
#

but the new entities does need the new build stuff to work properly with subscenes

dull copper
#

can confirm, 2019.3b11 is the min for new entities package

safe lintel
#

really wish unity would add some more buttons to the ui, getting ridiculous with all the buried menu items

dull copper
#

don't get me started on the dropdowns

#

it's almost always the lazy programmer decision

coarse turtle
#

so true ๐Ÿ˜†

magic frigate
#

At this point it could use a search bar

dull copper
#

There is one though..

magic frigate
#

For the dropdown menus? Or do you mean the asset browser? I assumed we were talking about the long lists of different components you can create like this

#

If there has been one for this menu this entire time that will explain my blue name

magic frigate
#

Aw nuts, the animation package documentation is mostly a placeholder

dull copper
#

you still need to install that quicksearch package manually for it to work

magic frigate
#

Sweet! Thanks for the info.

upper ingot
#

If the burst compiler strenghtens performance so much, what are the reasons to nรณt use it?

plain cloak
#

managed data?

#

can't access anything from current unityengine/classes etc.

solar ridge
#

Not everything works, string manipulation (because strings are managed references) they break horrendously on burst sadly

#

Im hoping for some burstable equivalents on NativeStrings but the fact you can compare them now in Burst is great

trail burrow
#

@upper ingot Burst is only faster if it can vectorize the loops properly

#

If it can't, you're either sacrificing performance (it ends up slower than IL2CPP) or features (you can only use the limited HPC# subset of C#)

solar ridge
#

In some scenarios though you do get performance increases in code that you didnt necessarily change: ie looping over a queue to filter values out

#

I got a 10x speedup from just that alone

#

Which was fantastic

trail burrow
#

Yeah there's cases where you cant get perf improvements anyway due to how aware burst is of how the unity native collections, etc. work internally, etc.

solar ridge
#

So it is worth a try

#

Absolutely

trail burrow
#

But I've had many pieces of code which end up slower in burst than il2cpp

#

(yes tested in builds, not editor)

solar ridge
#

Do you have an example? (Not doubting, more curious) :)

trail burrow
#

specifically burst doesn't seem to do so well on integer math atm, the tests I've done on our fixed point library (all integer math), burst ends up about 5-10% slower than IL2CPP if it can't vectorize the operations

solar ridge
#

Mmm were you doing operators or math library?

#

I remember (VERY FAINTLY) that math was better off using the library in place of operators

trail burrow
#

Hand inlined integer math

solar ridge
#

But then there are cases where the intrisic talk was useful for this case scenario

trail burrow
#

@solar ridge I can dig up the code later, but it was part of our 2d physics engine i tried to burst compile to see how it handles what we do internally

#

It was not a very scientific test

#

Just burst compiling some of the narrow checks between different shapes

#

And see how they perform in burst vs il2cpp

#

Results were basically ~same speed or ~slightly slower

#

but again, no scientific method or anything used, just threw some code in and see how it ran

solar ridge
#

Ah no worries :)

trail burrow
#

It's all integer math, and loads of it

solar ridge
#

I've been scrambling around trying figure out what exactly is slowing down their new deserializer like crazy

#

No avail yet :/

#

So havent got to move over to bursting too much this update

#

Though Command buffers being burstable is nice now

trail burrow
#

yeah that's nice

violet garden
#

Could two entities share a component? Or does that go against the design?

#

Trying to think of how you would go about implementing an input lock without adding any code to the input system

#

Thinking of using a data field on my input data component and accessing it via another entity/system altogether

solar ridge
#

Mmmm not ... exactly.. they could store a pointer , but I think at that point you need to reconsider the problem. What do you mean by "Input lock"?

violet garden
#

Trying to think of it as mixins, sort of

#

So I would add an entity that uses the same input component as that used by my player

#

And a system that manages all those lock mechanics. As in prevents input

solar ridge
#

Oh! You could handle that a better way realistically. You'd have an input entity

#

And then everything you want being that youd just use the value of that entity

violet garden
#

I'm just at the figuring things out stage, probably doing things very wrong ^^'

solar ridge
#

Locking would be as simple as not updating that entity

violet garden
#

And to not updated it, would it use some "lock" bool on the related input component?

solar ridge
#

Enitity value*

#

I mean... you could do that, or some other conditional to not set the data

#

Purely up to you

violet garden
#

Okay, I see, thank you

#

Stuff is very different from the usual oop

solar ridge
#

Yes. Data driven design is a mindset change

#

No polymorphism is a big one

violet garden
#

Yeah, for sure

mint iron
#

Though Command buffers being burstable is nice now
anyone know if it can it playback from a burst job yet?

solar ridge
#

Unsure

#

It seemed fast but....

#

I didnt check

#

I will later

#

Json deserializing was more important to get performant for me

violet garden
#

By the way, speaking of input. Does this whole system make input delayed by one frame? If input is read and stored as data, there is no way to know if it will happen before or after the other systems which read this data

solar ridge
#

Well you could potentially be very specific with it. But 1 frame of delay is not a thing to really worry about

#

16ms is less than a human perception notice change

violet garden
#

So it is not a matter of me missing something then, the current way of reading input through a dedicated system induces this 0 to 1 frame lag

dull copper
#

hmmm, I haven't actually tried to use burst on this rig before

#

Burst requires Visual Studio (installable via Add Component in the Unity Installer) & the C++ build tools for Visual Studio, along with the Windows 10 SDK in order to build a standalone player for Windows with X64_SSE4

#

joke is that I have VS2019, c++ toolchain and bunch of Win10 SDKs installed here

#

if I had to guess, it's seeking for some windows SDK that I don't have here tho

slow epoch
#

Same error trying to build an empty project that didn't use Burst a couple of weeks ago

dull copper
#

burst docs aren't helping me either, because requirements are: Visual Studio (can be installed via Add Component in Unity Install), or C++ Build Tools for Visual Studio. Windows 10 SDK

slow epoch
#

Didn't find anything googling

dull copper
#

burst clearly works in the editor

#

does it work for others here on latest entities and burst?

#

@slow epoch was that with latest burst still?

#

oh wait, you said it didn't even use it

slow epoch
#

I mean it was installed but never used

#

And yeah it was the latest version

#

Don't know if there are any updates tho

dull copper
#

I'm only trying to package boids demo with IL2CPP backend here

#

I'll try with stock mono setup

solar ridge
#

Aaah so for builds I had to add it to the editor itself in the hub when I got that error. May not be your case but it was for me ๐Ÿ™‚

dull copper
#

you mean install VS with unity installation?

solar ridge
#

Yeah :\

dull copper
#

it could help as it's preconfigured for Unity's use

#

but it's silly that I'd have to redo the installation just because they can't list the requirements more specifically

solar ridge
#

I believe it is temporary

#

especially with their new builder in the works

dull copper
#

that sounds like more trouble ๐Ÿ˜„

#

ok so, can't do mono build with burst either

#

I guess I'll go with the addcomponent thing then

#

thanks for the headsup

#

I tend to avoid letting 3rd party tools mess up with Visual Studio, hence installed it manually (I also use it outside Unity ecosystem)

#

I can't even count how many times my Visual Studio installation has gone sideways because of some random thing somewhere

#

especially if you uninstall older and then install newer, cmake etc scripts often still seek for the old installation

#

(even aften running microsofts own VS cleanup tool after uninstall)

#

well... adding the vs module didn't change a thing ๐Ÿ˜„

solar ridge
#

Riiip

dull copper
#

wonder if their silent installer backed off once it figured it was installed already

#

there's probably some log file somewhere if one is able to find it

amber flicker
#

I might have read somewhere that you have to use the new build pipeline to successfully build burst stuff now? Haven't had a chance to look myself though.

dull copper
#

hmmmm, I don't have the latest c++ toolchain installed tho... so it could be complaining about that, it's still toolchain meant for VS2019 but older version

#

mainly because ue4 engine builds break on the newest

amber flicker
#

Anyone have any clue what warnings such as Assembly for Assembly Definition File 'Packages/com.unity.rendering.hybrid/Unity.Rendering.Hybrid.Tests/Unity.Rendering.Hybrid.Tests.asmdef' will not be compiled, because it has no scripts associated with it. are about? I renamed some files, have no compilation errors but crash when enter play mode. If I delete my lib folder I get the above warning (amongst some others)

dull copper
#

it really sounds like the hybrid.tests is just a shell folder with asmdef in it

#

technically you don't even need the hybrid tests at all yourself

amber flicker
#

it's hard to see what's going on exactly (long editor log to go through) but another line I notice is Symbol file LoadedFromMemory doesn't match image ..\Library\PackageCache\com.unity.ext.nunit@1.0.0\net35\unity-custom\nunit.framework.dll Native extension for WindowsStandalone target not found :/

dull copper
#

well

#

on the bright side

#

2019.3 release is super close now, so they might really give the shooter sample with it

#

2019.3.0f1

#

it could be RC but still, not many weeks anymore

amber flicker
#

Speaking of releases.. anyone tried the animation package yet? Saw it was up on bintray at least.

dull copper
#

oh right, it is there

#

probably way easier to get into it with the sample tho

#

to comment the previous thing a bit, I can't even do IL2CPP build with this now :/ I disabled burst compilation and IL2CPP just fails without giving proper error

dull copper
#

all the past nightmares of trying to make VS play ball with tool x are coming back at me now ๐Ÿ˜„

dull copper
#

solved it but wasn't all straight forward: had to uninstall VS, then uninstall Unity to be able to reinstall it with visual studio module (it wouldn't let me install it again otherwise), but this would first just flash the VS installer screen and not do anything... so what I had to do is I had to navigate to program files (x86) and manually wipe the remaining bits VS installed didn't manage to remove on it's own... and then when I let unity installer install VS it still failed to install the Win 10 SDK it relied with

#

fortunately this time around the console error message actually said which sdk was missing so went and installed it and then Unity built both burst + il2cpp

hollow sorrel
#

@violet garden late reply but you can use [UpdateAfter(systemtype)] and updatebefore on your system to make sure input has already been processed before your system runs

#

there shouldnt be a frame delay

mystic mountain
#

@hollow sorrel Depends on how you do it, if you Add a component with input, it is present after the commandBuffer played back, so Adding input component to BeginSimulation/initialization/EndSimulation would make a frame delay.

safe lintel
#

@amber flicker cant get this one to compile ๐Ÿ˜ฆ the previous version at least didnt give me compilation errors though I couldnt enter play mode without some errors

amber flicker
#

yea... guess it's not ready..

slate breach
#

I'm using this to get an entity manager in the awake method of a monobehaviour "World.DefaultGameObjectInjectionWorld.EntityManager" and I'm getting a null reference exception after the update. Anyone have any ideas?

#

DefaultGameObjectInjectionWorld is returning null not just the EntityManager

safe lintel
#

might not exist during awake? im not too familiar with the order of systems creation and monobehaviours events but could you get the entity manager during convert instead of awake or start?

slate breach
#

It doesn't have a convert it's a UI menu that needs to interact with the ECS. It worked fine in awake until the update.

#

I don't think it's a game object lifecycle problem, doesn't work in Start or Update either.

#

Seems like the automatic world creation/automatic system bootstrap isn't working for some reason.

slate breach
#

Now I'm getting this error "Cannot find the field TypeInfos required for supporting TypeManager intrinsics in burst
at Unity.Entities.TypeManager.GetTypeInfo(int typeIndex"

violet garden
#

@hollow sorrel Thanks!

tired mulch
#

Hi there, I'm decently new to creating games (and Unity), but I do have very good ground knowledge in programming as it is.

Is there anyone who has some slight experience with Tilemap, Tilemap Renderer and the API (Scripting) that comes with it?

I want to be able to get the following data for each tile in the grid:
Position, size etc (So I can use it for interaction, collision and placement in the world)
Sprite / Material (So I can render it)

Do keep in mind that I want this data so I can create Entity equivalents to use with (ECS / DOTS), so I want / need to do everything in code (I don't want to use Tileset Colliders etc)

Thanks in advance

night cargo
dusty scarab
#

SetEntityComponentData()
Doesn't exist in current context? Help anyone?

safe lintel
#

maybe you mean to use the EntityManager?

dusty scarab
#

I'm trying to create an entity and set the component data

#

is there any method except to use EntityManager.SetComponentData ?

#

The tutorial I'm following is using SetEntityComponentData()

safe lintel
#

link to the tutorial?

#

sounds incorrect

dusty scarab
safe lintel
#

also, what at what time?

dusty scarab
#

2:55

safe lintel
#

oh SetEntityComponentData() is a method he made earlier

dusty scarab
#

oh shit. didn't see that my bad

#

thanks

winter veldt
#

do you need to create a new command buffer for each job? or can you create one and use it for multiple jobs

untold night
#

1 per job. but if that job runs on multiple cores the ToConcurrent() struct interface will handle it fine.

winter veldt
#

thanks!

onyx mist
#

What are some common causes for editor crashes when using ECS? Trying to narrow down what I should do since the crash log I get basically means "we have no idea" according to Google

#

I'm thinking stack overflow but I got an error message when that happened before, not a total crash

untold night
#

I'd turn up the Jobs/ memory leak logging levels

that usually gets you closer

prisma anchor
#

I have an event when an object collides with each other, But I am having a problem when I try to set the PhysicsVelocity Linear to reflect from the collision normal. It seems that it happens multiple times for each event. Does that mean the the object is still inside each other? Is there a way to fix this?

onyx mist
#

Alright thanks recursive

safe lintel
#

anyone gotten the livelink to work? ive tried building using the new build tools but i get an error if I modify anything in the subscene when the built player is working. just assuming its not ready for prime time unless someone else has gotten it to work?

chrome pawn
#

every time I've tried to check out ECS Samples there are dozens of compile-time errors to wade through, is there a known working editor version + package version configuration anywhere?

#

to be specific Physics Samples is more important to me than ECS Samples right now but getting both working would be nice

prisma anchor
#

@chrome pawn I have the UnityPhysicsSamples working on 2019.1.14f1

chrome pawn
#

could you tell me the versions of your Entities, Physics, and Input packages?

#

all the latest available on that editor version?

dull copper
#

latest entities requires 2019.3.0b11 or newer

#

I have Unity Physics Samples running on 2019.3b12 here but I've manually updated it's manifest to use latest:
-hybrid renderer (which also updates to latest entities)
-urp (older lwrp/urp don't work with latest hybrid + entities)

dusty scarab
#

Each system has a property for the EntityManager ? Or do we need to manually access it using World.Active.EntityManager.

I'm able to do so without it, but just checking whether I'm doing it right

safe lintel
#

Each system has it

dusty scarab
#

ok thanks

dull copper
#

oh snap

#

DOTS editor has that editor visualization now

#

(package)

deft niche
#

whoa...how do I get that ?

dull copper
#
    "com.unity.dots.editor": "0.1.0-preview.2",```