#archived-dots

1 messages ยท Page 166 of 1

lusty otter
#

It really depends on the type of task they are trying to do, passing data back and forth between CPU and GPU is quite expensive from my reading.

#

If the data output from compute shader can be directly used in rendering that might just be faster than doing the task on CPU then pass a huge data to GPU afterwards.

solid flume
#

I get a list of vertices/triangles from the shader, put that in a mesh and then put the mesh at the right position

lusty otter
#

I can't say.

#

Though last time I read some talks here about job system multithreading can take up to 1ms just the scheduling itself, not sure if that's true or true anymore.

#

I'd say it's probably not worth redoing everything though if your current solution is already pretty performant.

deft stump
#

it's still true

#

job system doesn't make sense if you have like... 1 or 2 stuff that you need to move.

dark cypress
#

If it's the only way to use burst you still might get it to be faster.

solid flume
#

Right now it's not worth. Maybe for something else

lusty otter
#

I'm not having good experience with GPU stuffs though, but maybe that's because I'm targeting mobile and especially low end mobile.

#

I did a GPU based particle system, which program just needs to pass in some vertex data and the shader takes care of transforming positions based on animation and all that jazz, so that there's only one transfer from CPU to GPU on particle spawning and despawning (comparing to a CPU based particle system, which needs to update vertex positions every frame and pass to GPU)

#

On low end mobile devices even a few hundred vertices are too much for them, so now I'm working on converting it to CPU based instead.

#

I feel like for small projects like mine, bursted job on main thread is more than enough for most use cases.

#

I really enjoy using Burst and Job system even not in the context of ECS.

dark cypress
#

Does anyone know if it's possible to clone a NativeHashSet?

deft stump
#

currently writing a page on the wiki titled "Dispelling misconception on DOTS", should I make it its own page OR should I put it in the FAQ?

dark cypress
#

I'd click on that title if I saw it, so separate sounds good.

solid flume
#

@lusty otter yep mobile has severe GPU restrictions. I have a shader graph that simulates 2D water, and all it does is basically read from a couple textures and scroll with time, yet it's the slowest thing in the game

#

I can do anything on the CPU and my FPS will not go above 60 because of the shader, but then again I'm fine with 60

lusty otter
#

Yeah mobile GPU are pretty limited, I'm moving computationally heavy stuffs to CPU, and leave GPU as an option for high end phones.

finite gazelle
#

Hey guys, can anyone help me with this?? DOTS instancing should be turned on in the shader..

deft stump
#

go to Projects Settings -> Player -> scroll down to scripting define symbols -> add ENABLE_HYBRID_RENDERER_V2

finite gazelle
stone osprey
#

lets say we have system A and system B... both use jobs to multithread their work... but system b's jobs should run after system a's job... how do we do that ?

rancid geode
#

lets say we have system A and system B... both use jobs to multithread their work... but system b's jobs should run after system a's job... how do we do that ?
@stone osprey add [UpdateAfter(typeof(SystemA))] on the SystemB to ensure that the OnUpdate of SystemB is getting called after SystemA, and expose SystemA dependency so that you can combine it into SystemB dependency.

class SystemA : SystemBase
{
    public JobHandle GetDependency()
    {
        return Dependency;
    }

    // OnUpdate and other stuff
}

[UpdateAfter(typeof(SystemA))] 
class SystemB : SystemBase
{
    protected override void OnUpdate()
    {
        Dependency = JobHandle.CombineDependencies(Dependency, World.GetExistingSystem<SystemA>().GetDependency());
        // schedule your job and do your stuff
    }
}
tawdry lotus
#

maybe with a flag (an entity)? or maybe avoid separating systems and enqueue jobs in order

deft stump
#

Or you can stack the 2 Entities.ForEach in one System.

#

It will magically know that Entities.ForEachB wont run before Entities.ForEachA finishes

stone osprey
#

@rancid geode Thanks a lot ^^

#

Thanks everyone... guess its working now ๐Ÿ™‚

#

One last question... do jobs get executed at the end of the frame or once i call them ? Or once the whole dependency graph was build ?

rancid geode
#

afaik jobs get scheduled after each system's update

deft stump
#

^
and to add to that, ajaik, once scheduled, you leave the executing of the job to the job system. So it can either gets processed this frame or the next.

solid flume
#

Is there any way I can get a job to iterate over all integral coordinates from (0, 0, 0) to (x, y, z)

stone osprey
#

@deft stump Aha ! So jobs are getting scheduled and executed once the job system wants to process them ? Propably this frame... could also be next frame ?

deft stump
#

yep.

#

the Job System will "hold" onto the instructions but wont process them.
you leave it up to the job system when they want to do the work. Sometimes it will process it this frame, sometimes it will process them in the next 2 frames.
even in code, RNGeesus blesses us

solid flume
#

Is there any equivalent of nested loops in jobs?

#

Kinda like nested IJobParallelFor

zinc plinth
#

@deft stump hybrid renderer does a Complete in the presentation group; won't be exec on next frame if it's before that point

#

@solid flume you can't have nested jobs

solid flume
#

Is there any way I can get a job to iterate over all integral coordinates from (0, 0, 0) to (x, y, z)
@solid flume

#

Ideally without passing in a nativearray of the coordinates

zinc plinth
#

pass a int3 of yourt max coordinates

#

have whatever 3d data be flattened to 1d

solid flume
#

Ugh I can map coordinate to an array index but can't find a way to reverse it

#

Which is logical

#

But annoying

#

There exists a 1-1 mapping from N to NxNxN, just need to find it and it's inverse

zinc plinth
#

you absolutly can go from flatenned to Nd if you know the size of each dim

solid flume
#

I know I can, just realised the math, but need to figure out how

#

Each dimension is the same size

zinc plinth
#

x time xSizeยฒ + y time ySize + z

#

ho nvm that's the wrong way lol

solid flume
#

(x, y, z) gets mapped to x+y*size+z*size*size

#

Reverse is the issue

dark cypress
#
y = i % size / size
z = i / sizeSqr```
#

Maybe something like that.

sharp flax
#

Hi guys, like a year ago I made a comparison of the flocking implementation made by Unity in DOTS, translating the same algorithm to OOP in single thread and multithread, and also to compute shaders. I decided to "beautify" a bit the presentation and share it, perhaps someone finds it useful, to see what really dots was capable of +1 year ago https://github.com/CristianQiu/FYP-Flocking It was the very first time I used compute shaders so treat it with caution XD

zinc plinth
#

wat is flocking ?

sharp flax
#

Flocking is the behavior exhibited when a group of birds, called a flock, are foraging or in flight. There are parallels with the shoaling behavior of fish, the swarming behavior of insects, and herd behavior of land animals. During the winter months, starlings are known for a...

zinc plinth
#

ahhhhh

sharp flax
#

i wanted to find the strength to update it since dots performance may have improved, but since in another year or so it'll be probably outdated again i'm just too lazy

deft stump
#

you can edit the page if I'm wrong, the purpose is just to blow away some mindsets that people tend think about Unity's ECS. I partly blame marketing for it

violet cosmos
#

It's good to call out the issues with the Hybrid workflow. I'm definitely struggling there, but I think that's because of the lack of tooling

There needs to be more tools to fill in the gaps. But, it's not complex stuff, just needs to be implemented

#

Really, once I get my head around Hybrid, I'm going to write some best practices for 0.13

tardy spoke
#

@deft stump thanks for writing that, all this stuff really helps me out. ๐Ÿ˜Ž

#

If anyone needs "visuals" whipped up for the articles just let me know. Send me a sketch and I'll make it somewhat pretty and throw it up.

deft stump
#

we should probably number these pages we make

#

sort them from introductory to implementation

tardy spoke
#

Yeah, would be good to get some sort of nav system in there but it adds some friction during the "ideation" phase, so not sure when a good time to add it would be

#

People have done a great job contributing so far so if that keeps up I have no qualms spending a day doing the nav and categorizing stuff a bit down the line

deft stump
#

People
there's only 3 of us that's contributing lol

tardy spoke
#

Benjamin, Gearless, you, me 4!

deft stump
#

we should actually add more rules in our contributions page.

#

like explain stuff that a 3-year old would understand or something

tardy spoke
#

GREAT idea

#

I was afraid to propose that because I suck so bad I thought it would be "self-serving", hahaha

deft stump
#

I'm all for reading code, but man a page of nothing BUT code hurts my eyes.

tardy spoke
#

A good rule would be "no additional code than is necessary to portray the functionality you are trying to demonstrate" to avoid people slapping entire systems in there (with functionality beyond what is being demonstrated since it's from an existing project) trying to be helpful but just adding confusion haha.

Or "keep it Python-esque". No super fancy code if unecessary.

deft stump
#

or maybe explain what the code does.
what does the variables mean?
why does this function exist?

hollow sorrel
#

does github wiki not let you add subcategories in the sidebar

tardy spoke
#

@hollow sorrel it doesn't seem to have any sort of intelligence categorization or nav systems at all... like you can't even internally link pages, have to use full url lol

hollow sorrel
#

or is it eventually just going to show 200 pages in there

#

damn

tardy spoke
#

With an add on or something maybe? Seems like it's extendable

#

@tight blade seems to have a good handle on it's capabilities, and wants it to parse to an actual webpage at some point

#

My issue with it is there doesn't seem to be a way to display EVERY page in the wiki, so you could literally "lose" pages

#

There must be a way

deft stump
#

maybe we SHOULD just build a webpage for it.

tardy spoke
#

The scope/feature creep is real

deft stump
#

like how MS does with their documentation

tardy spoke
#

It went from my shitty google page, to a github wiki, now a webpage... it's expanding at an alarming rate hahah

deft stump
#

we're gonna overthrow unity's documentation

tardy spoke
#

Is there a service that hosts a REAL wiki? I couldn't find one that seemed any good...

#

That's all we need, is just a full featured actual wiki

tight blade
#

@violet cosmos was mentioning a Wikimedia site or something?

violet cosmos
#

That's a concern of mine too... I don't know if GitHub wiki has a way to view all pages

coarse turtle
#

Could make a github page for the repo since you're using Github already

tardy spoke
#

@violet cosmos yea I was worried about literally losing pages while creating the nav (I didn't make a nav, just when I was looking at how it would be done)

#

It's a very un-wiki-ish wiki lol

deft stump
#

hrmmm

#

yeah. maybe we should use this service

coarse turtle
#

the Home page could also be a Table of Contents

violet cosmos
#

I like GitHub because I couldn't imagine someone at the technical capability to use DOTS doesn't have a GitHub account. There's a lot to be desired about the functionality though

tight blade
#

Yeah, I mean technically if were starting to think about growth, we could set up a commit hook on the git wiki that added all the pages into a nav bar automatically

tardy spoke
#

how do you parse the wiki pages with a navigation onto a github page? How do you "tell" the page what the nav is going to be?

#

Yeah it wouldn't be hard to add ALL the pages, but how do you do a hierarchy?

coarse turtle
#
[some text here](link to page)

For Github wiki
[learn more about some feature here](Feature) 

Instead of doing
[learn more about some feature here](Feature.md)
tight blade
#

Yeah. I mean my thought would be to have an unsorted section, and anyone can manually move the stuff from there

#

Once it's on the nav bar, copy pasting into a hierarchy spot isnt hard

violet cosmos
#

If GitHub Pages has a way to A: View all pages, even if they're orphaned and B: Uses the same markup so we can copy and paste, and C: Is still freely open for user contributions... Then, I say we go for it. But, imho those three are required

tight blade
#

What is item b?

violet cosmos
#

GitHub wiki has a markup format. I don't want to reformat every article

tight blade
#

Ohhh gotcha

deft stump
#

i think

#

GitHub pages support automagically converting our MDs into the site

tardy spoke
#

That'd be nice

coarse turtle
#

You can use a parser like Jekyll or Hugo to read md and generate html

violet cosmos
#

But, is it user editable without making forks and contribs?

coarse turtle
#

You'd probably still need to fork if you want different users to contribute

tight blade
#

It is not. Which is why we went with the wiki

tardy spoke
#

To me it seems like a true wiki hosted somewhere is probably the best approach?

deft stump
#

Hrmmmmm

tight blade
#

I mean I'd imagine if there was some wiki that had a superset of github functionality no one would be against a simple migrate

violet cosmos
#

I say we figure out how to view all pages in GitHub wiki before we do anything else....

tardy spoke
#

lol

tight blade
#

Wait can you not?

#

Mine just shows an option to see the rest

violet cosmos
#

No, if we add a custom sidebar, then.... How do we view all pages?

#

I think some people will add pages and not link them, then it's orphaned

tardy spoke
#

Yeah it's bizarre

#

I've never seen that before

tight blade
#

Right the custom sidebar for hierarchy. Yeah and I mean I think that's part of the reason that custom sidebar exists. Intentionally to filter

violet cosmos
#

Yes, but even as an admin I don't see the option to view all

deft stump
#

in the github repo you can directly edit stuff without forking and/or cloning it

tardy spoke
#

Can clone the wiki locally as a workaround but that is dumb

violet cosmos
#

OK, cool

#

We can still. When we add a custom sidebar, the Pages tab just automatically gets collapsed.... But you can expand it

tardy spoke
#

@deft stump ... can you??

deft stump
#

yeah

violet cosmos
#

Just tested ๐Ÿ˜‰

tardy spoke
#

Great haha

#

That's called terrible UX/UI

#

When it takes 5 devs to figure out how to view the pages in a wiki you got a problem

tight blade
#

Oh shit. Well it works so I'm good with that

violet cosmos
#

The same person that made that now works at Uber Eats ๐Ÿ˜›

tardy spoke
#

It works well... it should be the DEFAULT.

tight blade
#

Hahaha @Benjamin

deft stump
#

oh nice

violet cosmos
#

OK, status quo. We'll have to keep an eye out for orphaned pages now and again, but that's NBD

deft stump
#

orphaned pages?

#

oh

stone osprey
#

So i want to bring the JobSystem to "Artemis ODB"... a ecs in java im using for my serverside code... Components for Job Entity: Job, JobDependency, JobState... heres where i cant decide how to proceed... once a job-entity was created, we could either... Queue the Jobs and their dependencys instant... or we wait till the next frame and process the job-entities... the only difference is the point. Any help on this ? Queing the jobs instantly, is probably faster... but not that flexible... waiting till next frame is much more flexible, we can basically restructure dependencys during the rest of the frame... or extend the job entity itself.

violet cosmos
tardy spoke
#

So what did we land on? Keeping the wiki as is? hahah

violet cosmos
#

Yah, I vote be lazy ๐Ÿ˜„

tardy spoke
#

We're fighting feature/scope creep. We're good devs.

deft stump
#

now we need to add the rest of the pages in our custom side bar

#

XD

tardy spoke
#

Lol yeeep

#

I can probably do it tonight or something

#

sometime soon

#

organize it a bit now that we're not afraid of losing pages

violet cosmos
#

Unless the sidebar has a collapse function, I say we keep it "top level" pages

tardy spoke
#

Yeah, I won't make it cluttered bullshit, no worries

deft stump
#

hahah I dont want to do that HAAHAHAHA
I'm overdue on a task I need to stop writing Visualizing DOTS part 2

tardy spoke
#

Actually, what I'm most interested in for the wiki and I think would be helpful for a lot of people is "visualizations" of the systems and what they do.

IE I'd like pictures of "GameObjectConversionSystem" and how it connects to other systems, etc.

hollow sorrel
#

@stone osprey you're talking about implementing your own job system in java, right?
unity's job system queues instantly, dependencies are up to the dev to ensure it's scheduled in order (with seperate automatic dependency scheduling for ecs, but this still happens outside the job system)
always making it wait until next frame sounds less flexible to me because then you don't have the choice to schedule right away, whereas if you handle dependencies outside of job system then you can still decide to schedule the job next frame if you want

deft stump
#

IE I'd like pictures of "GameObjectConversionSystem" and how it connects to other systems, etc.
I'll probably do that in the future.

#

right now I want to get basics visualized @tardy spoke

tardy spoke
#

Yeah, that was just an example. Literally if people just send me sketches on napkins I will draw them out "pretty-ish" and throw them up on the wiki. I would do it myself but I don't understand them well enough, haha.

I will buy people beers for these sketches. 1 beer per system sketch. That's how bad I want these sketches.

stone osprey
#

@hollow sorrel Thanks a lot for your fast reply ! My problem is the building of dependencys... each of my artemis system launch "job-entities" into the world... building dependencys in one system is no problem, because we have a reference to it... but i have no clue how System B's Jobs could obtain a reference to the jobs of System A ( in a clean ecs way )... thats why i thought waiting till the next frame is a good thing, because we can simply construct the dependency later on ^^ any idea how i could solve this ?

deft stump
#

maybe I should make this visualizing dots/ecs a multipart series?

tardy spoke
#

Yes โค๏ธ

deft stump
#

i planned for it to be 2 parter because I wanted to cover the basics.
but yeah, visualizing every aspect of dots might be better

tardy spoke
#

Yep! Let's creep that scope.

#

Creep the hell out of it.

spark glade
#

I think my productivity has just gone 10x with the Dark Theme being free.

deft stump
#

dark theme?

#

free?

#

When? how? unity? why? how?

opaque ledge
#

๐Ÿ‘€

#

are you serious

spark glade
#

2019.4.8f1

deft stump
#

nani!/

spark glade
deft stump
#

HALLELUJAH!

spark glade
#

Same for latest 2020.1 (whatever version exactly that is)

zinc plinth
spark glade
zinc plinth
#

๐Ÿคฏ

spark glade
#

THey even made it the default ๐Ÿ’ช

deft stump
#

currently downloading!

tardy spoke
#

Ohhhh shit

spark glade
#

Makes me wonder if there is a bigger reason behind this. Feels weird to just have this happen out of nowhere.

deft stump
#

God it took them what? how many years to make it free

spark glade
#

All the years haha

#

Maybe it's all leading up to the grand finale of finally updating the com.unity.animation samples ๐Ÿคž (hahaha bad joke ๐Ÿ˜ข )

deft stump
#

dont jinx yourself nicolas

tardy spoke
#

Is the dark theme part of the DOTS package and once you install it it'll just keep crashing? Is this a trick?

spark glade
#

hahaha

#

The editor has been surprisingly stable the last 2-3 months probably (except right after package updates maybe).

tardy spoke
spark glade
#

looks legit ๐Ÿคฃ

tardy spoke
#

lol I actually for real can't figure out how to enable it. Is it a package on the package manager or just an option somewhere?

hollow sorrel
#

@stone osprey if you're doing it manually, the way unity handles that is to have a public JobHandle for each system so when you're creating a dependency you just getsystem<somesystem> and combine its jobhandle with the one that's depending on it
basically this means systems are order dependent
but yea waiting until next frame might be easier, that way your systems don't need to be order dependent, i don't have experience with implementing a job system so all i can say is how unity does it

stone osprey
#

@hollow sorrel Thanks ! Well the part where im stuck is the following... i heard unitys jobs are getting queued "instant"... Lets say system A schedules its job... the job system takes care of it... now System B is ready, schedules its jobs with the dependency of System A... why is this working ? The Jobs from System A are already in queue or executed... How is this possible ? Or do i miss something here ? ^^

spark glade
manic aurora
#

oof the menu bar not being dark mode hurts me, i thought windows would handle it somehow

violet cosmos
#

I made a forum post about that @manic aurora

hollow sorrel
#

@stone osprey yes, basically you only get a JobHandle when you schedule a job, it's like your ticket in line at the post office
so when system B schedules with a dependency on A's JobHandle, the job system knows it's the one in line after A

violet cosmos
#

Go ahead and necro that, seems timely ๐Ÿ˜‰

tardy spoke
#

@spark glade thanks! I was staring pretty much right at it but didn't see it for some reason, haha

violet cosmos
#

I hate it

#

I have a big bright display and it totally throws off the contrast when I'm doing color sensitive work for clients

stone osprey
#

@hollow sorrel That makes sense... but how is this implemented ? System A scheduling its Jobs, those are getting processed... System B comes in place, depending on System A, System B's Jobs are getting queued if System A is not finished yet... once System A is finished, it executes the queued jobs ?

violet cosmos
#

@stone osprey In ECS or in pure Jobs?

stone osprey
#

ECS ^^ i wanna copy this mechanism for a java ecs

deft stump
#

Maybe we should chek systembase' code

hollow sorrel
#

not sure how they implemented it
my guess is when the job system decides to schedule new systems it checks which ones are able to go (by checking if their dependencies are done), but that's just speculation on my part

deft stump
#

^^

hollow sorrel
#

this isn't really ECS specific tho

violet cosmos
#

There's an [UpdateBefore] and [UpdateAfter] attribute you can use for SystemBase classes. There's also the ability to add your own System Group types, to group systems together and slot them into one of the existing groups

deft stump
#

@violet cosmos what he's asking is stacking of entities.foreach

violet cosmos
#

Oh, AFAIK that order is implicit, top to bottom, unless you make JobHandles

stone osprey
#

@violet cosmos The internal logic of job scheduling along multiple systems... ^^

violet cosmos
#

I could be wrong there though

mint iron
#

Note that the system Dependency property does not track the dependencies that a job might have on data passed through NativeArrays or other similar containers.
So then its only going to work with read/write of components

stone osprey
#

Im gonna try the following approach now : System A schedules Jobs, provides reference to all of them... System B takes that reference to them and simply depends on them... i guess thats the simplest way of replecating this mechanic... this is probably 1:1 how unity does it...

mint iron
#

and only works if you're scheduling jobs rather than Run() and have no sync points - don't use entity manager or WithStructuralChanges cause they will wait for all jobs to complete

hollow sorrel
#

yea i think that's the simplest as well, you can always add automatic dependency management later if you want to

tardy spoke
#

Can a blob asset reference be assigned via an ICD authoring component?

#

Or does it have to be done in GameObjectConversionSystem type thing

coarse turtle
#

I've done it before, when BlobAssets were initially introduced in the Entities package.

#

iirc - all I did was construct a blob asset and stored it in an ICD (I was using the Convert method in the IConvertGameObjectToEntity back then - not sure what the process is like now)

tardy spoke
#

@coarse turtle yeah I have field for a blob asset reference, just curious if I can assign the actual reference to the blob asset in the editing environment easily or if it basically has to be done with an initialization script of some sort for that component

coarse turtle
#

Yeah I'm sure you still can

tardy spoke
#

Well, here's really what I'm trying to figure out. Let's say I have 100 characters that can give you a quest, and they're converted out of GO's in the editor with that script.

What's the "best" way to assign that blob asset reference since I can't assign it from the "editor" (at least I don't think there's a way I can)?

opaque ledge
#

will each character have different waypoint data ? or their quest rather

coarse turtle
#

Well without knowing much about the quest - let's say you author them in a scriptable object for workflow. You would read the scriptable object data, construct your blob asset structure - copy the data from the scriptalbe object -> blob. Assign the blobassetreference to your ICD.

north bay
#

Did any of you manage to make a linux build with the new build platform packages? I can't even get the menu item to show up

tardy spoke
#

@opaque ledge yeah, it's just "waypoint data" for now because I'm following the codemonkey tutorial, hah.

But yes, I think they will technically be "separate" waypoints that become quests. That's another thing I have to look into is what exactly I can cram into a blobasset as blittable data that I can easily human edit. Was thinking of converting text assets of JSON if I could, then in the system parsing them into an object.

#

Figured I'd better start getting it working at all before I started tinkering. Some of the tutorials syntax is a bit older.

violet cosmos
#

But, really how often do you read from those?

tardy spoke
#

The idea being that all quest "steps" are held in the text assets basically, and the component just holds the progress through the "steps".

violet cosmos
#

Yes, but how often do you read from the waypoints?

tardy spoke
#

except those text assets need to become blittable somehow

violet cosmos
#

Or use them in game

tardy spoke
#

Oh, the waypoints is red herring

#

I'm just following a tutorial, but those will be "quest text files" eventually. Not waypoints.

opaque ledge
#

i mean blobasset is something a components shares so you wont have to duplicate your data, i dont think in your case, using blob asset is a good idea, but then again, i never did any blob asset stuff

amber flicker
#

@tardy spoke just wanted to quickly say (as Psuong mentioned) definitely I know you're relatively new to Unity so definitely get comfy with ScriptableObjects - they're very handy for this kind of editor config-data

tardy spoke
#

If a scriptableObject can be brought into a system as readOnly it may very well be a better solution

#

Otherwise it will only be another one of my systems running .withoutBurst() and .run(). Shameful. ๐Ÿคฆโ€โ™‚๏ธ

violet cosmos
#

I don't know if I'm understanding your goal though, in actual game mechanics not code mechanics

tardy spoke
#

Oh, ok. The GO "Quest Giver" gives quests.

I have a system that if you're close to a quest giver, they "start" the quest basically. They have some components on them, is the quest active, whats your progress, etc, but then I figured I need a way to store the actual "steps" of the quest - which I think is kind of a difficult thing to solve in ECS in a non-confusing way.

violet cosmos
#

Why not just a HasQuest component, that has an int QuestID?

#

Then you can look up the quest, and take it from them

tardy spoke
#

So the idea for the steps is I make a JSON object or something that can be edited by me that looks like something like this, I have no idea what it'll actually be yet (a multi hash map may actually be better for this):

{
1: Quest name,
2: Dialogue: "Whatevs",
3: Go to: x 50 y 500,
}

#

@violet cosmos I think that's what I'm doing

violet cosmos
#

Yup, and I'd store that outside of ECS

manic aurora
#

yeah exactly

tardy spoke
#

I was just storing it as a blob asset so it can be run as parallel, seems like there may be an easier way to do it?

violet cosmos
#

Don't, actually just don't store it in memory at all haha

#

Have a way to retrieve it from storage when needed, parse and apply that data. For example, the dialogue isn't needed all the time, Only when the person is looking at the quest details. The GoTo.Position is only needed when you're drawing a waypoint, or checking if the player is near, so might be part of ActiveWayPoints

tardy spoke
#

I may have just confused myself because I tied the system doing the distance check to the system doing some work on the quests - basically I have a system like "if the person is within 5 feet load the quest", which actually doesn't make much sense, it should just tag them for another system to load the quest via reference so it can do the distance checks in parallel.

#

That's cool because I pretty much already have a basic system working with TextAssets, I would just need to split the Systems apart haha. The textAsset quests are nice because they are A) easy to edit and B) Can be attached via ICD right in the editor.

#

Yeah, hmm... I think I can actually solve this with a smarter System implementation and just pull the data from TextAssets assigned in authoring via reference ICD to the GO's, like I had before.

#

I have another question.

Another thing: I have successfully implemented a simple global state system, but now I'm thinking that global state system isn't really required for too much in ECS since theoretically if you "load" your gamestate from a save you could just write everything back to the components on initialization? Not sure I'm gaining anything except additional complexity with it, haha.

Is having a globalState an ECS anti-pattern, basically?

vagrant surge
#

def no

tardy spoke
#

@vagrant surge would the advantage be using it for an "acceleration structure" or similar or are there patterns that emerge later that essentially require it?

vagrant surge
#

look at the overwatch ecs talk

#

they use global singletons a lot of times

#

for a whole lot of stuff

tardy spoke
#

๐Ÿ‘ will do

violet cosmos
#

So... Right now, as a total noob at this, I view there's multiple states going on. ECS has it's own internal state, represented by ICD sets on Entity. Differrent Worlds have their own unique state, one per. Your game current scene also has a state, that exists outside... Whether it's separate, influences the ECS through reads/writes/both is distinct to the logic. You can also have a wider state for the game progress as a whole, that exists on disk and is only relevant when updating or calculating logic for the scene state (which in turn may then influence an ECS state)

tardy spoke
#

That's a lotta state

violet cosmos
#

Inside that, where and how you store that is up to you, but since that's the general pattern for most games, and yah... It's a lot of state - do it wisely

tardy spoke
#

Yeah that's why I ask these fundamental idiotic questions. It's painful enough creating things in ECS once... imagine doing it twice because your patterns suck. ๐Ÿ˜

#

Realistically I'll probably end up doing this over like 8 times while learning but ... still better than 9 times. ๐Ÿ™‚

violet cosmos
#

Do you need to store in ECS than the player picked the golden carrot 4 levels ago? Maybe not, but maybe you do because he's approaching the farmer that owns the golden carrot field. In that case, the wise move is to store that golden carrot state on disk in level 4, and only load it on the level with the farmer. The farmer just has a slightly tweaked state: KnowsYouHaveCarrot

#

That's just one way, maybe not the best but for example

manic aurora
#

imagine doing it twice because your patterns suck.
imagine doing it four times, because your patterns sucked, then the api changed, then your patterns sucked with the new api, then the api changed again ๐Ÿ™‚

tardy spoke
#

I feel it's almost a heuristics problem where a perfect answer is rarely achieved

#

Imagine programming for 3 months and coming to ECS because you're so bad ass you won't settle for anything less

#

๐Ÿ˜Ž

#

And then imagine you wrote two entries demonstrating Systems in the wiki to teach other people how to use it, because that's the current state of how bad ECS' documentation is.

#

MY WORLD IS PAIN SON

manic aurora
#

anything permanent i ever tried to write about ecs got slapped by it changing

tardy spoke
#

I feel ya, i've been lucky that it seems most the big structural changes have finished at this point, but they could surprise us! But on the flip side all the old official documentation is super dated now and there is barely any new documentation with the new patterns/syntax

#

Also bojack horseman is best show ever

vestal sorrel
#

when you are designing for ecs whats the mindset usually works best for you? I have found that thinking first about the systems, then the components usually works best, but sometimes I get surprises, any tips to improve how to think or design with ECS in mind?

amber flicker
#

I am continuously iterating on 'but what data does this really need?' and 'what are the minimum combinations of transformations of the data required?' - what components and systems I need always fall out of that process. Don't know if that's helpful ๐Ÿ˜†

vestal sorrel
#

Everything is helpful, I find people thrown around the word "its like legos" a lot, but ECS it seems to be truth, you are building from bottom to top it's sort of weird, OOP is more like top to bottom. I have been using it the whole week just trying to wrap my head around the paradigm shift hahaha

mint iron
#

i tend to just isolate by function, like, 'stuff needs to move' here's a move system. Stuff needs to be destroyed: here's a destroys stuff system.

tardy spoke
#

The ComponentTypeHandle<QuestGiver> QuestGiverProximityJob.JobData.QuestGiverTypeHandle must be marked [ReadOnly] in the job SystemQuestGiverProximityActivate:QuestGiverProximityJob, because the container itself is marked read only.

... is it not? ๐Ÿค”

amber flicker
#

wrt the above, I think a big trick when new to DOD is being able to go from 'my character needs to move with arrow presses' to e.g. 'i need a position (float3) to move by a delta (float3 * time?)' and 'i need to capture key input and modify a direction' - about the data first and making the problem more general. Not always the right thing to do but I think usually a great start when coming from oop

tardy spoke
#

Also I THINK what I'm doing is super cool. I'm just going to split the quest thing into two systems, the first checking proximity and adding a component to the QuestGiver for the second system to process. The second system will just run on main-thread since it will be referencing a textAsset directly, which is fine because there will only be one entity at a time doing that - the "quest giver" you are near.

  1. Does even querying a managed ICD class cause issues in jobs, or is that fine?

  2. Is it cool to process components on an entity while it also has a managed ICD class on it as well? In this case I'm not changing any values, but I will be changing the archetype by adding/removing a component.

#

@amber flicker that float3 is the recorded location of the character in the world

#

remember the character always sits at 0,0,0

amber flicker
#

@tardy spoke at a quick glance a) you're working with IJobChunks - nice!, b) I can't see your system update where you make a new job - it could be where you assign the ComponentTypeHandle possibly?

tardy spoke
#

More like iBlowChunks

#

They're defeating me so far, but I will prevail

#

Yeah it's an experiment to see if I can get this to work.

Also pulling player location from state is an experiment because it allows me to run a LOT of systems on separate threads that otherwise need to reference that component directly, so I want to see the performance tradeoffs there.

amber flicker
#

it might be line 45? not too sure tbh

#

as for your questions - I think any use of managed ICDs means you can't use burst and I think must be main thread too. 2) Not really sure. Sorry late and logging off - hopefully someone here will actually be useful ๐Ÿ™‚ - laters

tardy spoke
#

Yeah, I got that, but my question is can I even do something like

#

HasComponent(TextAsset) in a job

#

or does even that mean it has to run on main thread

#

To me that seems like it shouldn't force it to run w/out burst, if you're not actually USING the reference contained in the component?

amber flicker
#

It's a good question - I've never tried. I would assume that it wouldn't work but it should be easy to try.

tardy spoke
#

Also oddly enough I took off the readOnly stuff and I get the exact same error... I must be have something in the wrong access scope or something

#

missing a public or something is private. Or it just hates that managed ICD

amber flicker
#

It basically looks fine to me but I'm half asleep so don't trust me. It might be that there's some other issue and the safety system is confused - definitely start by stripping it right back (which sounds like what you're doing already)

#

Good luck ๐Ÿ’ช ๐Ÿ‘‹

tardy spoke
#

Eh no worries! I got it not erroring out anymore, so I'm probably close. Whether or not it's actually running now remains the mystery...

#

Have a good... sleep.

deft stump
#

when you are designing for ecs whats the mindset usually works best for you? I have found that thinking first about the systems, then the components usually works best, but sometimes I get surprises, any tips to improve how to think or design with ECS in mind?
@vestal sorrel i tend to think in sql databse.

hollow sorrel
#

anyone know if you can use Entities.ForEach targeting a different world/entitymanager than the system it's called from?

#

can use IJobChunk but that'd be easier

safe lintel
#

does anyone think the renaming of ComponentDataFromEntity from cdfe.Exists(entity) to cdfe.HasComponent(entity) is a bit awkward? in the way you kinda read it right to left instead of left to right

spark glade
#

yeah, same

#

It's probably to keep it similar to GetComponent ๐Ÿคท

tardy spoke
#

Anyone used this before?

EntityTypeHandle = GetEntityTypeHandle(), in an iJobChunk?

#

I get this error QuestGiverProximityJob.JobData.QuestGiverTypeHandle must be marked [ReadOnly] in the job SystemQuestGiverProximityActivate:QuestGiverProximityJob, because the container itself is marked read only.

safe lintel
#

they in the job formation make sure GetChunkComponentTypeHandle(true)

#

or whatever the specific api name is(true)

tardy spoke
#

tis 'weird.

I had it working before adding that entity handle and trying to add the component.

@amber flicker would've been proud. Ish. I got it working w/out the read/write, but not at all with the getEntityTypeHandle, it seems to deliver that readOnly error no matter what.

#

@safe lintel yeah they are lol

safe lintel
#

looks correct, id restart the editor because I have no other ideas ๐Ÿ˜…

hollow sorrel
#

looks fine to me

#

are you using the wrong ReadOnly attribute?

safe lintel
#

maybe the query needs to be marked as readonly?

hollow sorrel
#

there's another one from different namespace

#

Unity.Collections.ReadOnlyAttribute is the one you want

tardy spoke
#

@hollow sorrel got it... lol, I never would've figured that out in a MILLION years.

hollow sorrel
#

ya it's easy to miss

#

btw you can just do using unity.collections and remove the using systemcomponentmodel or whatever it was using before

tardy spoke
#

Yeah, now that I know that's the issue I definitely will, hahah

#

Now I'm battling with that command buffer I didn't initialize hahah

tardy spoke
deft stump
#

hRmmm I can't remember

#

it's on the top of my tongue

tardy spoke
#

This has no errors, but doesn't apply the component to the entity... it must be something internal

#

it must actually be "related" to the entity directly

coarse turtle
#

You can pass the index in the chunk when iterating

tardy spoke
#

oh, is it actually this simple lol

deft stump
#

that's used for concurrency in ecb correct?

tardy spoke
#

That's what I thought

#

Oddly enough that isn't causing any errors either but also not adding the component

#

must be something weird with my code

#

oh wait

#

I might be an idiot and checking wrong entity

#

Yes, was just my stupidity. Is working!

BUT!

Which of those solutions is correct? Is it an index of the entity, or a random number for the concurrency of the multi threading?

deft stump
#

judging from the name, since I used it all the time in my bullet hell game,
it's an index of the resulting query

tardy spoke
#

So it should be the entity index*?

#

Hmmm

#

Also I should really change this adding/removing the tag component to switching the boolean of a component otherwise I'm preeeeetty sure this solution is less performant than my old one hahaha

coarse turtle
#
struct JobChunkEx : IJobChunk
{
  public EntityCommandBuffer.ParallelWriter CmdBuffer;
  [ReadOnly]
  public EntityTypeHandle TypeHandle;
  public void Execute(ArchetypeChunk chunk, int chunkIndex, int first) 
  {
    var entities = chunk.GetNativeArray(TypeHandle);
    for (int i = 0; i < chunk.Count; i++) 
    {
      CmdBuffer.SetComponentData(i + first, entities[i], some_component_data);
    }
  }
}

Here's an example

deft stump
#

imo, the bool solution is also (kinda) less performant too.
since cpu's like to cache in future instructions,
if a bool says no, then it will recache instructions again.

tardy spoke
#

I just figure modifying data instead of changing archetypes is the way to go. Doesn't matter if it's a true bool or an int, I can make anything work

#

@coarse turtle awesome, I was wondering what "first" was for exactly

deft stump
#

imho, I'll take the performance hit of moving entities to and from chunks.

#

just to maintain predictability

tardy spoke
#

Well, there's only 100 of these entities and it's adding a tag that you're within 5 feet of one of them, or not.

#

so it's not a huge CPU load either way

violet cosmos
#

I would love to see some real data about chunks and cost

deft stump
#

there is

#

hold up

violet cosmos
#

โค๏ธ

tardy spoke
#

The important thing to not lose sight of here is that today I created my first IJobChunk system.

Boy --> Man.

deft stump
violet cosmos
#

the thing is, in the system I'm working on right now there's a lot of archetypes.... so there may be a lot of moving around archetypes based on tags, and I'm just concerned it negates the benefit of ECS

tardy spoke
#

What's a "tag" and what's a "mark" in this sense?

deft stump
#

tag is the tag component solution.
mark is the bool solution

violet cosmos
#

I think I've seen that page... Tag is adding a ICD that's a tag. "Mark" is adding a flag on an existing component to preserve archetype

deft stump
violet cosmos
#

do you check for a flag each system run, or filter by tags, IIRC

tardy spoke
#

Also I noticed "CommandBuffer.AddComponent()" method didn't add the component 60 times even though the system ran 60 times. Is it alright to not do a check for the component first before adding / removing, or are you supposed to do that when you use it? Not sure if it does the check itself, but it looks like it does?

deft stump
#

where did you hook the CommandBuffer?
EndSimulation?

tardy spoke
#

@deft stump wow that example is super explicit to exactly what we were talking about haha

#

BeginPresentationEntityCommandBufferSystem because I had no idea and just started typing stuff.

#

It's probably the wrong one and I was going to ask about that. Figured I had a 33% chance of getting that right.

#

Switched ๐Ÿ˜‰

deft stump
#

ugh my brain hurts jsut from trying to visualize dynamic buffers

#

sanity check, from my understanding.
unity will allocate more of the 16KB chunk as the dynamic buffer gets bigger and bigger.
if it's full, it will "shard" the dynamic buffer to another chunk, right?

safe lintel
#

did you set the initialcapacity to something really high?

deft stump
#

what if there's no internal capacity explicitly written?

safe lintel
#

never tried, maybe there are some builtin defaults or maybe it just is the same as writing zero

deft stump
#

btw, for context, @safe lintel this is for the community github wiki.
writing it for new people to understand DOTS better.

safe lintel
#

anyway if the buffer grows beyond its initial capacity it just gets stored in the heap

deft stump
#

anyway if the buffer grows beyond its initial capacity it just gets stored in the heap
@safe lintel Oh really?

safe lintel
#

yeah

deft stump
#

huh

#

is that in the docs somewhere?

safe lintel
#

A DynamicBuffer is a type of component data that allows a variable-sized, "stretchy" buffer to be associated with an entity. It behaves as a component type that carries an internal capacity of a certain number of elements, but can allocate a heap memory block if the internal capacity is exhausted.

deft stump
#

but can allocate a heap memory block if the internal capacity is exhausted.
WOW...

#

hrmmm I need to review what I'm writing

#

the advance parts had me scratching my head

safe lintel
#

in the wiki can you have discussions like on wikipedia or just make edits

tardy spoke
#

Just edits, it's pretty bare bones

deft stump
#

I was under the impression that ECS "mini-chunks" entities that have different sharedcomponent values.
but no, it actually moves them to a whole new chunk

#

XD

tardy spoke
#

lol best way to figure out what you know is to teach it. Exposes any knowledge gaps!

deft stump
#

^^ true true.

coarse turtle
#

I guess you can have discussions in the issue tracker ๐Ÿค”

tardy spoke
#

We just encourage them to come on Discord so far haha

#

seems ... easier

coarse turtle
#

Yea makes sense ๐Ÿ˜…

tardy spoke
#

@coarse turtle where are all your sweet recipes on the Wiki!? I know you're cooking up a storm over there. ๐Ÿ˜Ž

coarse turtle
#

I haven't really been touching dots lately ๐Ÿค”

#

But I can contribute time to time to the wiki - just been occupied with other work and there are times when I dont want to think about programming ๐Ÿ™‚

deft stump
#

@tardy spoke what our policy on a full game tutorial?
put the documentation on the wiki? or in the repo?

tardy spoke
#

@deft stump I have no idea but the more content on the wiki the merrier right now, haha.

#

If you need access to the repo for files or anything lemme know I think I can add

deft stump
#

I'll probably fork it and make a pull request

tardy spoke
#

sure, I can make you admin also if you want, whatever is easiest for ya

deft stump
#

make me admin
delete the repo

#

:lul:

#

jk, jk, I won't do that

tardy spoke
#

It would only make learning DOTS just that much harder haha

deft stump
#

@safe lintel thanks for adding stuff to my write up!

trail burrow
#

I'm having issues with JobHandle.ScheduleBatchedJobs() causing huge stalls on android phones - this case its 5.25ms but i've seen as high as 20ms+

#

The profiled section thats highlighted is just

#
    Profiler.BeginSample("JobHandle.ScheduleBatchedJobs");
    JobHandle.ScheduleBatchedJobs();
    Profiler.EndSample();
trail burrow
half jay
#
InvalidOperationException: The NativeArray has been deallocated, it is not allowed to access it

#

on 124 line

minor sapphire
#

anyone know where I can get a simple dots fps character controller from?

#

nothing fancy. run around, jump.

trail burrow
#

dots sample?

minor sapphire
#

good point, I haven't actually looked at that yet

amber flicker
#

@half jay that might be the safety system being overly cautious - what happens if you comment out line 128?

#

According to my tests, if you have a Subscene in a scene and in Update or LateUpdate check if IsLoaded == true, it is true on the first frame both if the subscene is open or closed. Yet if you use the entityManager to retrieve an entity or look in the debugger, entities only seem to exist if the subscene is open. This seems like a clear bug but wanted to check if anyone else could verify.

stiff skiff
#

@half jay Adding the component at 110 will cause an archetype change, which means that the buffer is moved as well and no longer valid

amber flicker
#

oh, I missed that - exactly what @stiff skiff said

stiff skiff
#

Instead use an entity command buffer to queue the component add, and play it back after the iteration is done.

half jay
#

@stiff skiff and how should i add element to buffer then?

stiff skiff
#

You can keep that the same, adding an element to a buffer does not change structure

#

You need to change adding the RayHitComponent

#

To be added via an ECB

half jay
#

but im working on main thread

stiff skiff
#

That makes no difference

half jay
#

if i want add component to an entity which has buffer and add new element to buffer at same time i should use ECB or separate systems?

deft stump
#

ecb

#

though i dont know what you mean by separate systems

half jay
#

in one system ill add component and after in another ill add element buffer

deft stump
#

aaaah.
you can do that in the same system.

pliant pike
#

has anyone used a buffer within a buffer, is that a good idea?

deft stump
#

I think not? I haven't done it myself though

opaque ledge
#

it could be, havent tried either

pliant pike
#

yeah I cant think how else I would solve my problem, I want a family list and then the list of families

deft stump
#

why not 2 Dynamic buffers then?

pliant pike
#

that's what I've got

deft stump
#

1 buffer has an index to the other buffer

#

oh

pliant pike
#

its basically a struct within a buffer, within another buffer

tardy spoke
#

You guys ever program stuff and then when you're about to go to sleep you think about it and realize you approached it wrong and could've done everything a way simpler way? ๐Ÿค”

deft stump
#

yes

#

all the time

pliant pike
#

yep

tardy spoke
#

Yeah, I just wasted the entirety of yesterday. At least I learned stuff. ๐Ÿคทโ€โ™‚๏ธ

violet cosmos
#

Yah, giving yourself distance from the code is important. You can get so boxed into the problem while focusing on it, you can't see the bigger picture until you quite literally take a step back

deft stump
#

I wake up almost immidiately upon realization

tardy spoke
#

haha yeah, glad to know it's not just me

vestal sorrel
#

I have programmer immsomnia

#

Like wake up from realizations or trouble sleeping because overthinking an algorithm, I actually had to learn to meditate because it got sort of excessive while I was in college, doing my thesis I was like sleeping at 4 am everyday.

deft stump
#

I feel you polo

#

mine is worst. I jsut dont sleep HAAHAHAHA.
stuck in a problem? drink your hourly dose of caffeine!

vestal sorrel
#

I been there hahaha, but once I did that for like 3 days straight and started to get paranoid and I think a bit crazy, so yeah, get good rest, it will be worth it, your head is less clouded. In fact, you can notice the difference in tired-code vs wellrested-code

violet cosmos
#

Definitely agreed, and on top of that, try to eliminate distractions when you're working on a complex problem

deft stump
#

it's a good thing I discovered discord AFTER college

#

hooo boy, I would still be doing my thesis! GWovoRaphiXD

tardy spoke
#

Instead of making that entire IJobChunk yesterday which selects by this same entity query and then doesn't process the QuestGiverTextAsset (which is a reference type to a text asset), I could've just simply removed it from the query in a normal ForEach. For some reason I was thinking it needed all the components to select the correct entities, but then I was like... that's not how that works. ๐Ÿคฆโ€โ™‚๏ธ

For some reason my brain was like "entity query must match components exactly" instead of "entities must contain at least these components"

#

@deft stump what was your thesis on?

vestal sorrel
#

Oh thesis time was fun, you literally have to embrace becoming a cave-man

tardy spoke
#

@violet cosmos totally, eliminating distractions is key. It can take forever to get back into a flow state and one distraction can take you right out of it. It blows my mind co-working spaces are so popular... I don't think I could get any work done like that, hahah.

vestal sorrel
#

@violet cosmos totally, eliminating distractions is key. It can take forever to get back into a flow state and one distraction can take you right out of it. It blows my mind co-working spaces are so popular... I don't think I could get any work done like that, hahah.
@tardy spoke They should have a crash-course for managers and others alike called "Realizing when a programmer is in the zone and 1000 reasons why you should leave him alone"

tardy spoke
#

Haha, our company went remote and adopted pretty strict agile (with the scrummaster single point of contact to defend the programmers from distractions) to stop the sales team/managers from bugging the devs

deft stump
#

@tardy spoke
uuuuuuh. I think the proper terms was capstone.
and I forgot the actual title but we made an app where you can track service shuttles via gps around our city and also has the ability to display how many passengers are inside so users can make smarter decisions.

#

it was originally for trains though. But lel, the train company say no

tardy spoke
#

lol that's a bummer

#

It sucks when you can't improve the world because someone is just like ... "nah".

deft stump
#

the title was approved by our dean, but then when we talked to the train company afterwards, they say no. We had to scramble to find a different subject, but we can't change the title. It was a freakin nightmare hAHAHAHA

vestal sorrel
#

I never wanted to associate my thesis with a company, or develop it for a company. For that exact reason, you depend on their decision, I wasn't willing to spend so much time so a corporate head would say, "uhmmm maybe not"

#

I had friends that had to change their whole subject at the last minute and I was just like, nope, not repeating their mistake. I want to graduate.

deft stump
#

to convince the shuttle company, I pulled out my best sales talk. slides, necktie and blazers, graphs, the whole shebang! we wasted ... 7 weeks? to get them to say yes.
so we only have 3 weeks to deploy, test, patch, and write our results! GWovoRaphiXD

tardy spoke
#

I have an art degree from some unknown University that I took just to party ๐Ÿคทโ€โ™‚๏ธ

#

In hindsight I regret not taking something like comp sci... but it was fun.

dusky wind
#

Is there a way to convert a GameObject hierarchy non destructively and have transforms that move entities?

#

I have a rigged character that I'd like to import the bone positions of into ECS

#

Alternatively is there a way to pull bone matrixes out of DOTS animation?

tardy spoke
#

I've never seen anyone even try to use DOTS animation yet haha, so I would have no idea

dusky wind
#

I'm in the middle of trying to port an existing project to ECS and I have so many questions.

tardy spoke
#

Ask away!

dusky wind
#

Got most of the major game logic in, but the integrations with existing unity systems is making my head spin.

tardy spoke
dusky wind
#

Yeah I have

tardy spoke
#

Yeah, I just mentioned because he integrates with a lot of GO's and reference ICD's etc

dusky wind
#

Is there a way to do Overlap/Cast queries on the fly without constucting a new collider every time I change the parameters?

#

I'm working on a fighting game, and one of the big requirements is animation driven hitboxes

#

I used to just do Physics.OverlapSphere

#

Or Physics.SphereCast

#

But that seems like it's not trivial to do without allocating a BlobAssetReference to some collider

#

Then cleaning up afterwards

tardy spoke
#

Hmm, @tight blade was doing some stuff with physics so he might have some insight. Some of the other guys here are much better than I am and may have answers for ya. I haven't even touched the physics system yet!

#

That sounds painful though to have to do a blob asset per each collider made

#

I remember reading they use blobAssets internally but figured they'd make it easier for us haha

mint iron
#

it should possible :S seems like a major use case they'd want to support.

#

i've used the physics authoring components on a project to generate new colliders and use them outside of the physics system but it required some hacks to the package to expose the collision methods.

glass coral
#

.

dusky wind
#

Since I'm assuming DOTS audio isn't fully ready yet, even for a test, what's the best way to do Entities -> Pooled GOs?

#

A system that checks for a set of entities with a given "prefab ID", pulls a pooled GO to it's position, then destroys the Entity?

#

I need something to play momentary SFX/VFX

#

Using audiosources/particle systems

glass coral
#

.

glacial bolt
#

!warn 410448987577909248 Do not spam learning channels

past palmBOT
#

dynoSuccess BarbieBearMC#6372 has been warned.

deft stump
#

I believe that if you convert that prefab with audiosource and particle system attached to it.
it will hold a referrence to it even in entity mode.

dusky wind
#

Does copying the entity also make a copy of the GO?

deft stump
#

no.

tight blade
#

@dusky wind I may or may not have useful insight. I haven't done manual collision query yet, but I have done a lot with the physics components. What do you mean by constructing a new collider when parameters change?

violet cosmos
#

@dusky wind I don't know if it's doing it automatically, but you may need to use AddHybridComponent for the audio source, particle system, and particle system renderer

mint iron
#

if you just need to spawn a specific go for sounds/effects and it doesn't need any link back to ECS you can setup it up like normal with an MB, have your parameters and prefabs on that. Then a system that finds a request to spawn an effect/sound, refers the message to your MB, which spawns it. Then all you need to do from ECS is create an entity with a component on with instructions for what needs to be spawned.

dusky wind
#

@tight blade the hitbox's shape changes based on animation

#

I have a BlobAsset that I sample every frame that sets up the size, position, and shape of the hitboxes in a given attack

#

That is all working, but I need something that actually turns it into a spherecast

#

And collects the hits from it

tight blade
#

and just to straighten me out, what is the distinction between using a spherecast and using generated collision events?

#

(Im basically wondering if a system that changes the shape and responds to events would suffice)

dusky wind
#

In Unity Physics, I'm not entirely sure

#

But the idea is that it's instantaneous

#

And gives all of the hits associated with a movement instead of firing off individual events after the fact

safe lintel
#

You can convert a skinned character non destructively using manual conversion, its what I do for my characters + colliders for ragdoll/hitbox stuff. Need to look into manual creation for entities, transforms, colliders and joints to get it all working. Its not trivial, though more just a lot of busy work than any singularly hard part

dusky wind
#

Originally we chose this way since we didn't need to have a component attached to trigger this

tight blade
#

And gives all of the hits associated with a movement instead of firing off individual events after the fact
@dusky wind just to drill in more to make sure I understand, this is 2 individual requirements, right?

  1. collisions are not responded to "after the fact"
  2. you get a list of all collisions, because you want to operate on them as a group rather than iterating over each one?
dusky wind
#

Yes

tight blade
#

because some aggregate metric might be valuable, like "how many collisions total" or something?

dusky wind
#

I need to look at all of them in aggregate, sort based on the other components attached to the entities, then forward to downstream consumers for further processing

tight blade
#

I'm not challenging that approach, but just having done work from the other side, an approach you could use is to have the collision system run at the beginning of the frame, have each event update a flag on a component that marks it for processing in a system that occurs later in the frame. It sounds like it might accomplish that objective without actually getting a list.

That said, back to figuring out the cast based approach

dusky wind
#

Sorry, I don't think I was clear, it's sorted based on the seen collisions

#

So a O(n^2) matches

tight blade
#

ah, I see. so they have a priority. right. its a fighting game.

#

King K Rool's Belly beats everything, and all that.

dusky wind
#

Haha, yeah basically that

#

One potential way I was thinking of doing this was making a temporary NativeHashMap<BlobAssetRefernce<Collider>> for every unique radius

#

In the main thread

#

Running the job

#

And then collecting the results and disposing the colliders

#

But I'm not sure about the performance implications of such an approach

tight blade
#

you mean NativeHashMap<BlobAssetRefernce, Collider> ? or NativeHashMap<int, BlobAssetRefernce<Collider>> ?

dusky wind
#

Latter, but with a float key

tight blade
#

without further analysis I'll say the performance of that approach is pretty okay. Ive been doing it in one of my systems for a while. I create a NativeArray for the lifetime of a system and then schedule it to be disposed when its done

#

how many unique radii are we talking?

dusky wind
#

Potentially upwards of 64 x the number of active players

#

That's what I've allotted for right now

violet cosmos
#

But, that package is so new...

dusky wind
#

Unfortunately only Raycast doesn't have a collider input requirement

#

At least what I can see

tight blade
#

so, firstly, that number probably wouldnt hurt you too bad, but I think we can optimize. For instance, you could respond to a collision event and cast a small sphere around the impact point

opaque ledge
#

please dont look at older version of the package

#

always look at latest

mint iron
#

as far as i know you can only do queries against colliders that are setup within the physics system/BVH, attached to bodies etc, you cant just have a collider or bunch of colliders and test against them.

violet cosmos
#

Ah, I didn't see the big blue "Use Latest Version".... For some reason this package page is different than ECS where there's a drop down

safe lintel
#

There's a spherecastinput

#

Wait collidercastinput

dark cypress
dusky wind
#

@mint iron oh as in it needs to be in the PhysicsWorld to be considered usable for queries?

mint iron
#

yeah

dusky wind
#

Oh no, so there are hurtboxes that will be baked into the physics world

tight blade
#

does that affect your solution at all though? I'm assuming you're setting the bounds of some primitives from animation data at the beginning of each frame

dusky wind
#

It's only the hitboxes that are dynamic

#

Yes that's the assumption

#

The hurtboxes are only moved around by the animation rig

#

The shape and scale are static

tight blade
#

okay, and then the hitboxes are some invisible, scaled primitive shapes that cover the motion of the animation?

dusky wind
#

Yep

dark cypress
#

Oh man, I didn't realize that Hybrid Render V1 couldn't do dynamic meshes at all.

#

Switching to HDRP helped a bit though.

violet cosmos
#

Yah, that's quite a gotcha between V1 and V2, you need to be on an SRP in V2 for things to work

#

I wonder how well V2 works with a custom SRP....

tight blade
#

right now I'm looking through some of the types of Jobs that might be able to perform this use case. for instance:

dusky wind
#

Does that have continuous collision detection?

#

Or is just based on instantaneous location

tight blade
#

I'm looking for evidence to confirm my understanding that it is continuous, because this is hooking directly into the physics simulation

dusky wind
#

It's getting late, I'll spend more time looking into this later.

#

Thanks for the help!

tight blade
#

Let us know what you find?

#

well. back to my own battle with physics.

#

gonna precompute draft.

violet cosmos
#

@dusky wind If you figure out an efficient way to do SphereCast.... I'm definitely interested, and is a good topic for the DOTS-Discord wiki

dusky wind
#

There's a wiki?

deft stump
#

Community wiki

#

we're making one to clear up alot of stuff and hopefully bring new comers into dots

#

and also for our sanity, especially our sanity

#

here's the link if you want to contribute

safe lintel
deft stump
#

@violet cosmos maybe we should add a rule on what to actually write in the wiki? Instead of arbritary contributions?

dusky wind
#

@safe lintel odd since that is causing safety checks to fire off for me

#

Or outright segfault

safe lintel
#

whats the error

dusky wind
#

Editor crash OMEGALUL

#

When it's a safety check error, something about containers allocated in BuildPhysicsWorld not being disposed of properly

safe lintel
#

post the code?

tight blade
#

so, that particular error is unrelated. I have no idea what its related to but it happens pretty frequently on ending play mode

dusky wind
#
  public static unsafe void SphereCast(in PhysicsWorld world, float3 from, float3 to, float radius, 
                                       ref NativeList<ColliderCastHit> hits) {
    BlobAssetReference<Collider> collider = SphereCollider.Create(new SphereGeometry {
      Center = float3.zero,
      Radius = radius
    });

    world.CastCollider(new ColliderCastInput {
      Collider = (Collider*)collider.GetUnsafePtr(),
      Start = from,
      End = to,
      Orientation = float4.zero
    }, ref hits);

    collider.Dispose();
  }
#

oddly enough, the example posted above does not dispose of the collider afterwards

safe lintel
#

i would cache the collider, and store it in icomponentdata or the system itself. id assume thats why its getting a disposed error, but the example itself is a little odd in that regard

dusky wind
#

That's the problem as I mentioned before

#

the state of the collider is really transient

#

It's meant to be used once and disposed of

safe lintel
#

well if you look at the latest samples repo https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/UnityPhysicsSamples/Assets/Demos/3. Query/Scripts/QueryTester.cs they dont immediately dispose of colliders either.
im not sure if it fits in with best practises to be immediately creating / disposing of colliders every frame, afaik instead they should be cached and reused but its something that you could ask the devs in the dots physics subforum, theyre pretty responsive

north bay
#

What version are you on? (Physics)

dusky wind
#

0.4.1

tardy spoke
dusky wind
safe lintel
#

@tardy spoke HasComponent<T> should be a property of systembase that gets codegen'ed into ComponentDataFromEntity when used with a job lambda

dusky wind
#

though I think that might be the number of NativeLists I'm allocating there

tardy spoke
#

@safe lintel yeah, just found it in the manual

dusky wind
#

and the DisposeSentinels that are being included

tardy spoke
#

I got a bit confused because there are other way more verbose ways to do it inside of jobs.withcode in a system base and I was thinking there must be a nice simple way haha

#

Thanks! ๐Ÿ‘

opaque ledge
#

please use latest version of the manual D:

tardy spoke
#

I usually do!

opaque ledge
#

also you can also use ComponentDataFromEntity's HasComponent function

tardy spoke
#

It would be nice if Unity de-listed older manual results from being google indexed actually

safe lintel
tardy spoke
#

It's beautiful! I should throw a link to that page in getting started

violet cosmos
#

I added a CC BY-SA license to the footer just now

opaque ledge
#

timeline dots has template manual btw haha

#

didnt know timeline dots exist, when that came out

violet cosmos
#

@dusky wind That's disappointing performance on sphere cast.... I wonder if someone has implemented that, and I'm honestly surprised it doesn't exist in the core package. It's super useful

tardy spoke
#

I need sphereCast :\

dusky wind
#

I'm dumb

violet cosmos
#

I need it too, if that doesn't work efficiently, then I can't even think about moving this ability system to ECS

tardy spoke
#

Or whichever one is the one that fires the radiused sphere from your origin, I always get that and overlap cast confused. I may need overlapcast or whatever they call it haha

dusky wind
#

I had a Debug Log for everyone one of those I was running

violet cosmos
#

haha, OK, lets see numbers with those out, and in Release mode

tardy spoke
#

oooh... that'd do it

dusky wind
#

was pumping out 256 debug logs per frame + the stack trace

violet cosmos
#

@tardy spoke Nice job on the formatting for external links! So much cleaner

dusky wind
safe lintel
#

@opaque ledge says the first release was [0.0.1-preview.1] - 2019-05-06 but i only found it like a month ago

tardy spoke
safe lintel
#

coolio

tardy spoke
#

We really need to focus on more recipes soon. That's really going to be the main draw, I'm sure ๐Ÿค”

I'll add my quest system when I can. You guys can make fun of it if it's architecturally insane.

north bay
#

That's cool, i'll add them to my package notifier right away lol

violet cosmos
#

I like recipes and snippets, they're so much more useful to see than a few lines of disparate code that assumes you know the containing structure

tardy spoke
#

Totally agree, especially when the containing structure has changed 3 or 4 times in the last 2 years

deft stump
#

currently I'm packing up my old bullet hell game.
thinking there's good nuggets in there.
I'll also make an entire README to explain my thought process

tardy spoke
#

๐Ÿ˜„

violet cosmos
#

@deft stump I think that might be better for the actual GitHub project... We can add folders for example projects?

deft stump
#

I dont know if I should make it into a written tutorial OR write it more of an article

#

@violet cosmos yeah I was thinking that too.
the root of the repo should be folders of individual projects

violet cosmos
#

@dusky wind May I ask why you used the "unsafe" keyword in the SphereCast declaration?

tight blade
#

he used a pointer access directly earlier

dusky wind
#

Collider = (Collider*)collider.GetUnsafePtr(),

violet cosmos
#

Ick, that actually goes by geo rather than using mathemagics?

#

Maybe it's for compatibility reasons? I wonder how Havok is handling it

#

Actually, I made an assumption there, but...

tardy spoke
violet cosmos
#

an int that references the quest text string. Then you have a factory that gets it, which later can be extended to support localization

tardy spoke
#

I could write them as JSON and parse them in as objects I believe, or write a weird pseudo language...

Or possibly write them as a multiHashMap if I can parse that in somehow.

The goal of this is kind of to be able to have other people be able to write quests and not just me.

#

@violet cosmos the textQuest is added per GO via authoring ICD in the actual world, so every NPC that has a quest can hold their own script

#

There's a System for when you're close to them that adds a "Proximity" tag, and another system that looks for that and goes "load their script if they have Proximity tag"

violet cosmos
#

I'd still keep that text out of ECS land, and off of the GameObject, and also do some sort of lookup. You want a reference to something that has the data, not the data. Otherwise you're carrying around that string everywhere, and it's not needed until you're displaying it to the user, and only briefly then

tardy spoke
#

Hmm, yeah. That makes it difficult for my friend to author quests though as he doesn't code hahah

violet cosmos
#

If it's a toy project, then... cool. I'd keep it in a MonoBehaviour then, since strings seem better off there than ECS. You're not going to operate on the string itself, just display it, correct?

tardy spoke
#

Yeah they're readOnly

violet cosmos
#

Then, I'd make a MonoBehavior that has that. Even better, a ScriptableObject type that has the strings, and you assign the reference to the GO. Even better, none of that and use SQLite and look up by ID, and have a lightweight authoring tool

#

But, for toy projects, I get what's quick is often best ๐Ÿ˜‰

#

For a production commercial project, then you'd want something more robust/generalized

tardy spoke
#

ScriptableObject type that has the strings that's a possibility for sure

violet cosmos
#

That's "good practice" in Unity, then you can define those and make editor panels and if you get something like Odin in your workflow open it up even more

tardy spoke
#

SQLite would be cool but I'm not super familiar with it's implementation so it'd take me a while. I can always revamp this Sytem down the road if not too much is built on top. Which I think is a benefit of ECS, the Systems are nice and decoupled which makes improvements later on a lot easier than with some other systems.

violet cosmos
#

Define the whole quest in SO's, it's a decent compromise

#

One SO per quest

tardy spoke
#

Just so I'm clear, what makes that more robust than linking to the actual TextAssets?

#

I get how it could be more performant

tight blade
#

hey, dumb question but I've been working in jobstructs for so long I can't remember: is Entities.ForEach burst optimized by default?

tardy spoke
#

@tight blade yes

tight blade
#

kewl

tardy spoke
#

Hence you have to tag it with .withoutBurst() to disable burst

#

Finally knew the answer to a question. I'm on fire today. ๐Ÿ˜Ž

violet cosmos
#

@tardy spoke Storing them as TextAsset, then using Resources.Load just when it's needed, and destroying it when it's not might be better than a pure SO, but you also lose the option of custom editor panels

tardy spoke
#

Hmm, interesting. Will look into the SO option to try to keep things away from raw data.

violet cosmos
#

Depends on what you need, but get it done is better than nothing. Something I need to start telling myself on my system haha

tardy spoke
#

Well, worse comes to worst I can switch it to SO's when I'm more competent in a few months, haha.

#

But if I can do it now in short order I'll give it a shot

#

Oh, but as for the other question -

Any ideas on the "type" of data to hold and parse in? JSON? Some kind of multiHashMap if it's possible to do that

#

I can see this idea getting so complicated so quickly hahaha

violet cosmos
#

If you use SO's, you don't have to worry about that. If you use SO's that point to individual text files, then you don't have to worry about that.

tardy spoke
#

Nah I just mean as to the content of the actual text files

#

they hold quest instructions... but what format should I store quest instructions in basically

#

I mean, there's likely no correct answer usually to that type of thing

#

but if anyone's done it before and knows what to avoid haha

#

Could do an SO holding a NativeMultiHashMap but it would make it difficult for others to work on for now, until those editor panels are made or whatnot

#

if that's something editor panels are even capable of doing. I assume so, but no idea how long it would take me to figure out how to do it if they could.

violet cosmos
#
     private const string QUEST_TEXT_PATH = "/Assets/Quests/Text"
     string QuestTextFile;
     string QuestTitle; //Small enough, and useful to see
     Vector3 WorldEndPosition;
     int ID; //useful if you have some sort of factory and tooling, but not required

     string LoadQuestText() { //loader code }
}```

Basic super hacky but gives you some way to separate and build on
#

Also not so difficult to add and edit quests

tardy spoke
#

Ah, that's interesting

violet cosmos
#

There's lots of code snippets for creating SO instances in the editor, pick your poison. Most add them under "Create > My Game > Quest Descriptor" or something like that

tardy spoke
#

Yeah I'm sure the documentation is likely a lot better for those, haha.

Thanks! I'll play around with it and see if I can get switched over to the SOs.

violet cosmos
#

๐Ÿ‘

#

Also, FYI TextMeshPro supports a restricted HTML-like structure. But if you wanted say... to have "step by step" that is displayed to the user, then maybe it's better to generalize. Still can be done in a similar way, just maybe a structure like JSON or even line by line haha

tardy spoke
#

Yeah, I'm not sure whether JSON or a more "custom" line by line solution is going to end up better. It's hard to know what this is going to look like in the end, haha

violet cosmos
#

Bang something out, it's not like doing a batch convert of a few dozen text files is difficult, or drinking a beer and going through them sometime on the couch

tardy spoke
#

It's going to definitely be one of the more fun and interesting systems to build for sure.

violet cosmos
#

Definitely, and something like that is bread and butter Unity that's it's currently well structured and documented for in the GameObject side

opaque ledge
#

does anyone use instricts ?

violet cosmos
#

https://blogs.unity3d.com/2020/08/13/the-road-to-2021/

Doesn't mention much specifics about DOTs except that is going to be worked on as part of netcode and better integration with GameObject for networking

"We are also continuing our efforts for our Data-Oriented Technology Stack (DOTS) to lay the foundation for the future of Unity and the architecture that delivers multithreaded performance by default. More on that in future blog posts."

safe lintel
#

waiting for future dots info: ๐Ÿ‘ด ๐Ÿ’€

toxic mural
#

Multiple systems creating an ECB from a ecb system only creates on sync point, right?

#

In order to get multiple sync points you have to be creating ECBs from multiple types of ECB systems?

hollow sorrel
#

yes

#

otherwise what'd be the point

wheat stump
#

Can anyone suggest UI tutorial of project tiny

violet cosmos
#

Let's say I have a lot of raycasting to do each frame...

Is there evidence which is faster, including management overhead?

  • Jobs and using raycast jobs on built in physics
  • Unity.Physics and using raycasts on the usual entity topology/systems
  • Havock, in either
manic aurora
violet cosmos
#

Yah, was just curious if anyone out there knew of someone who had done the work ๐Ÿ˜„

violet cosmos
#

Is there a way to procedurally decide to run a ForEach with Schedule or ScheduleParallel?

I feel like there is, in some C# setting I'm not aware of

#

The idea here is to count how many times ForEach has run, and if it's above N, run as ScheduleParallel, and below N, run as Schedule

amber flicker
#

Not with the lamdas, no. I requested it (search forums for auto schedule) but it doesnโ€™t look likely.

violet cosmos
#

I don't think so though, becuse that's just scheduled to run later

#

I think you might be able to pre-query the number of Entities with said components though beforehand...

amber flicker
#

Sorry you can do it, itโ€™s just very verbose

#

If youโ€™re going to Iโ€™d use chunk count rather than entity count

violet cosmos
amber flicker
#

Use entityQuery.GetChunkCount() or similar but I wouldnโ€™t include that in docs myself

violet cosmos
#

Yah, nixxing it

#

I need a better example, and I can understand why Unity didn't introduce it since they're likely diligently working to make the overhead of ScheduleParallel indistinguishable from Schedule

#

I appreciate their optimism ๐Ÿคฃ

hollow sorrel
#

prob more because it wouldn't be free (performance wise) to check before every job wether to schedule parallel or not
and because most of the time it's a conscious decision
most the time you already know if your job is meant to process 1000+ entities or not

violet cosmos
#

Yes, but this is also for people getting into it (like me). I wrote this mostly as a result of my research into this topic

hollow sorrel
#

oh you're talking about docs sorry i read it as "why unity didn't introduce auto schedule"

#

ignore me

violet cosmos
#

hehe, sorry. No worries

hollow sorrel
#

i like those doc pages btw, looks well written and seems like it would help a lot of ppl with "why" other than just "how"

#

keep it up ๐Ÿ‘

violet cosmos
#

Helps keep me sane that I know someone else might benefit, and that someone else might come along and add to it with their experience

toxic mural
#

That seems like a good place for an article about loading ECS code from a DLL and how to get it into the TypeManager

wheat stump
#

Build Win-Il2cpp failed after 2.30s.
error: Value cannot be null.
Parameter name: executableStringFor (System.ArgumentNullException)
at Bee.Core.Backend.AddAction
at Unity.BuildSystem.NativeProgramSupport.CLikeCompiler.SetupInvocation
at Unity.BuildSystem.NativeProgramSupport.NativeProgram.SetupObjectFilesAndSetupBuiltNativeProgram
at Unity.BuildSystem.NativeProgramSupport.NativeProgram.SetupSpecificConfigurationImpl
at Unity.BuildSystem.NativeProgramSupport.NativeProgram.SetupSpecificConfiguration
at WebPBuild.SetupWebPAlias
at BuildProgram.Main
at System.RuntimeMethodHandle.InvokeMethod
at Bee.StandaloneBeeDriver+<>c.<CreateBuildGraph>b__42_0
at Bee.StandaloneBeeDriver.RunBuildProgramInBeeEnvironment
at Bee.StandaloneBeeDriver.CreateBuildGraph
at Bee.StandaloneBeeDriver.BuildMain
at Bee.StandaloneBeeDriver.Main
*** Tundra build failed to setup error (1.93 seconds), 0 items updated
[E] DAG generator driver failed: "F:\Demos\ProjectTinySamples-master\RuntimeGeometry3D\Library\PackageCache\com.unity.dots.runtime@0.28.0-preview.40\bee~\bee.exe" build --beemode=ToCreateBuildGraph --commandlinerequest=runtimegeometry3d-win-il2cpp --root-artifacts-path=artifacts --bee-driver-buildprogramroot=.

UnityEngine.Debug:LogError(Object, Object)
Unity.Build.ResultBase:LogResult() (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build/ResultBase.cs:60)
Unity.Build.Editor.<>c:<.cctor>b__41_1(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build.Editor/BuildConfigurationScriptedImporterEditor.cs:68)
Unity.Build.Editor.BuildConfigurationScriptedImporterEditor:ExecuteCurrentBuildAction() (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build.Editor/BuildConfigurationScriptedImporterEditor.cs:127)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

#

I have downloaded project tiny and and trying to run runtimeGeometry Package can anyone tell the fix

#

Of this error

mint iron
#

holy error message batman

hollow sorrel
#

@wheat stump did you install C++ build tools for visual studio

toxic mural
#

"RunBuildProgramInBeeEnvironment" I wish developers would not name their stuff like "Tundra" and "Bee"

wheat stump
#

@hollow sorrel No

#

Thanks I will install it now

#

@toxic mural I will try to run It Thanks

toxic mural
#

@wheat stump No sorry I am not suggesting a solution, just complaining about their naming

wheat stump
#

@toxic mural Lmao okay My bad๐Ÿ˜†

slow lantern
#

Guys i have a question

#

How diffrent coding in dots and coding in normal system ?

#

If you make a reply pls ping me thanks ๐Ÿ™‚

toxic mural
#

Its still C# of course but I think its 75% different, thinking in components, and behaviour happening in parallel batches

#

Or like, losing access to reference types

#

But its a spectrum, you can use hybrid style and only dip your toes a little into the ECS side, still have reference types, but if you dive into .ScheduleParallel() its a big shock

wheat stump
#

Thanks @hollow sorrel It worked out

violet cosmos
#

and recent

upper tiger
#

How do I check if an entity has the "Child" buffer component?

#

I can get the buffer with:

DynamicBuffer<Child> children = GetBuffer<Child>(entity);

but this will throw an error if the entity doesnt have Child

#

HasComponent<Child>(entity) does not work

violet cosmos
#

Does anyone have a resource that talks about handling complex input and states in ECS?

I think fighting games are a good example, there's multiple key presses and sometimes chained commands based on timings

#

It's not always 1:1 too... Press a key, change a value. Sometimes there's dwell, wait, modify, block flags, etc

coarse turtle
#

How do I check if an entity has the "Child" buffer component?
@upper tiger In a system you can use GetBufferFromEntity<IBufferElementData>() and use the Exist function

upper tiger
#

thanks

#

apparently Exists is obselete now

coarse turtle
#

ah, it should be HasComponent(Entity) now

upper tiger
#

GetBufferFromEntity<T>() doesnt take entity as a parameter?

#

that seems weird

#

BufferFromEntity<Child> cb = GetBufferFromEntity<Child>();
if (cb.HasComponent(entity))
{

    }
#

the wording is strange. If BufferFromEntity has component, entity... seems backwards.

coarse turtle
#

Yeah I'm not used to the new apis yet too

upper tiger
#

while im on the topic, is there a better way to get all children of a parent entity other thant re-entrant functions

coarse turtle
#

Yes

#

in a ForEach statement, you can create an argument to accept a DynamicBuffer<T> so ForEach((DynamicBuffer<T> b0) => {}). In an IJobChunk you can grab a BufferAccessor from the ArchetypeChunk

upper tiger
#

will that work for n depth

#

im sure this is some common datastructure problem, but I dont know what its called

#

i guess in your scenario, for each buffer I would need to check that the parent entity is the entity I actually want the change to apply to. It would iterate over every object with hierarchy in my game.

coarse turtle
#

as long as the entity archetype matches your query (in this case if an entity has a DynamicBuffer<Child>) the ForEach statement will iterate over it - if you want a particular entity, you can probably tag the said entity or store it somewhere to access (but you'll likely use BufferFromEntity<Child> with the latter)

upper tiger
#

i thought about tagging, I could tag the parent entity, but that wouldnt tag the children as well. The only way to tag all the children is to traverse to them and tag them at which point i've defeated the purpose of traversal because I already did it.

#

say I have 1 million parent entities each with 3 depth of children. I dont want to iterate over 3 * 1 million buffer entities just to change the one entitiy hierarchy.

violet cosmos
#

If I have a system with a number of Entities.ForEach, and each ForEach I am very confident won't overlap on working on components... Is there a way to schedule each ForEach to be on individual threads?

Or, do I have to go make them jobs?

rancid geode
#

@violet cosmos if you pass a JobHandle to the Schedule/ScheduleParallel, Unity leaves the Dependency management for you, so yes, that is possible:

JobHandle dep1 = Entities.ForEach(...).Schedule(Dependency);
JobHandle dep2 = Entities.ForEach(...).Schedule(Dependency);
JobHandle dep3 = Entities.ForEach(...).Schedule(Dependency);
coarse turtle
#

say I have 1 million parent entities each with 3 depth of children. I dont want to iterate over 3 * 1 million buffer entities just to change the one entitiy hierarchy.
@upper tiger in a case like this - it's probably much more worth storing an entity that you know needs to have its entire hierarchy updated ๐Ÿค”

tawdry lotus
deft stump
#

@tawdry lotus nice. we'll link it to our community wiki

craggy orbit
#

Hybrid Renderer 0.8 is out, though i can't find the release notes ๐Ÿค”

#

ah wait. they're local ๐Ÿ˜…

#

oh and Entities 0.14!

deft stump
#

noice

#

what did they break this time?

craggy orbit
#

nothing that i'm aware of. this is a small project though and doesn't get down into the depths of DOTS. Burst compiler is still broken for me though, so im waiting for that package update desperately :/

slow vault
#

Hey folks, has anyone had much luck with per-entity or per-instance materials? Trying to spawn a grid of biomes and change their colours based on their designated biome. I have everything from the biome data side of things working, just not able to update the visuals without using something like SetSharedComponent which isn't suitable for my scenario. Not using any HDRP or URP stuff, just the built-in rendering pipeline.

#

Been messing around with properties on both the RenderMesh and the MaterialColor components and only updating the RenderMesh with SetSharedComponent has applied color properly so far :/

craggy orbit
#

last i checked, DOTS didn't properly support the old pipeline

#

seems v1 of the Hybrid Renderer kinda does, but v2 will not

wheat stump
#

Will button work in DOTS or should I use Raycast and create entities to make it work

#

Please help

#

It is my second day shiting from OOPs to DOTs

opaque ledge
#

UI button ? ofc

minor sluice
#

I don't think it would be worth it to shift from the built in ui components to a pure dots based approach, probably takes a lot of overhead code that you have to do,
and UI really doesn't need a dots approach,
however, I'm not sure, but maybe the UI builder (new way to make unity UI, similar to css and html markup) does offer something like that - integration with dots/systems or whatnot, but I haven't used that yet

slow vault
#

last i checked, DOTS didn't properly support the old pipeline
seems v1 of the Hybrid Renderer kinda does, but v2 will not
Makes sense - I did see a way to make per-instance materials work with URP or HDRP or something on the forums so I guess I'll try out a RP instead of sticking to the old built-in pipeline. Thankyou!

wheat stump
#

Thanks @opaque ledge and @minor sluice

dusky wind
#

Is there a way to get the entities of child objects during gameobject conversion?

#

I need to add a backreference to the parent entity to all children objects with a specific component.

dark cypress
#

I think an Entity field in ICD will automatically author into a gameobject field in the inspector.

#

You should be able to put your parent into it directly.

dusky wind
#

The relationship is implicit and I would rather not expose this to designer error.

violet cosmos
#

@slow vault Are you using the Hybrid Renderer?

If you are using V2, you need to use an SRP. Material Property Blocks for entities have been replaced by "material property overrides"

slow vault
#

Using Hybrid Renderer but no specific RP since their feature/compatibility lists didn't look so hot. Looks like URP on Hybrid Renderer V2 should let me do what I'm trying to do now though, thankfully.

violet cosmos
#

Yah, it's a bynote on V2 it's not compatible with the built-in renderer, only SRP's

#

V1 is still compatible, but doesn't have material overrides

#

@dusky wind I'm very curious how you work that out. I'm working on tooling for the hybrid workflow right now

deft stump
#

@violet cosmos for my bullet hell game explanation in our wiki, should I put it in the repo (since people can read them there)? OR make a wiki page on them?

violet cosmos
#

I'd say, if it's a self contained project, put it in the git repo. Then people can fork it and make contribs. Something like /Examples/ECS-BulletHell (or something descriptive about what the person will learn)

I think adding an "Example Projects" top level page in the side bar is then in order, if you inaugurate that Git ๐Ÿ˜„

#

Also... Please in the README add what version of ECS right at the top ๐Ÿ˜‰

deft stump
#

so my explanations is going to be in the wiki

#

got it

#

what about licenses though? MIT? we need that lel. Dont want illegal stuff

violet cosmos
#

Yah, it works better for us and for people in the long run. Imagine if someone made a YouTube video. They could add the git, then the YouTube video, then the link to all of that on the Wiki

#

I'm cool with just saying everyone must use MIT if they wan to contribute to the repo. If they wanted to contribute something to the community with another license, they can use their own GitHub repo and link to it in the wiki

#

I'm excited to see your project, you've mentioned it a few times. I really feel example projects, full API "kits", and recipes help more than anything. For me personally, it lets me get started and experimenting quicker

mint iron
#

i feel the same way Benjamin. I was pretty disappointed that the official ECS samples didn't really illustrate best practices. Looked thrown together with poorly performing shortcuts and duct tape.

violet cosmos
#

One thing that really threw me off learning, starting off with ECS 0.13 is how many "examples" were out of date, even if they were a few months old. I couldn't even load them in without errors and tons of deprecation warnings

I think Unity should have a GitHub repo of ECS best practices on real world challenges, that's always up to date. They should dogfood their own recommendations there before pushing an update to package manager, and update it in sync

Older ECS versions exist as branches

mint iron
#

the real world part is important, im so sick of 'hey look i can spawn 1 million cubes and have them spin'

violet cosmos
#

Yah, that makes me annoyed too. I posted on the Unity slack something like "If I see another bazillion spinning cubes demo telling me this is "real world" ECS I'm going to throw in the towel"

#

Real world means: It's code that solves common challenges, is maintainable, clear to read and declarative, robust and boilerplate free

mint iron
#

like, what are the things people actually need>?

  • setup using addressables.
  • boot/ dynamic sceneloading
  • driving menus and game flow transitions - start/end level, rewards, menus, updating scores from ECS.
  • character animation, environemnt animation
  • interop with legacy - triggering effects/playing sounds from ECS
  • modifying shadergraph properties from ECS with hybrid rendering (e.g. selection effects on world objects)
  • how to use BlobAsset
  • how to use Authoring
  • all the gotchas from the last year like trying to destroy an object with children.
violet cosmos
#

I actually call that out in a wiki article I wrote.... "The only way to really know is to run against actual game data and situations, and profile. Not hypothetical data just to prove you can put big numbers on the screen, but actual realistic data that represents gameplay in a variety of situations."

#

@mint iron Good suggestions, I'm going to add those to the "task list"

deft stump
#

@violet cosmos where is the task list?

violet cosmos
#

Both Recipes and Best Practices have one

deft stump
#

question.
What does this line mean?
Recipes how to accomplish common (and uncommon) but necessary tasks within Unity using the ECS and Jobs system.

violet cosmos
#

Kind of an idea list for contributions. There's a lot of smart and experienced people here. It's also my list of things to research haha

deft stump
#

also, can we put the task list in the Projects tab as a To-Write list?

violet cosmos
#

Drawing a million cubes on the screen in a cube grid just to show ECS/Jobs can draw big numbers isn't a "necessary task"

Real world challenges come out of the way ECS is structured, either challenge through learning to shift the way of thinking or a challenge introduced in the framework

deft stump
#

maybe we could word it better as "real-world scenarios' instead of necessary tasks.

violet cosmos
#

ah yah, good call ๐Ÿ˜„

#

Changed it, thanks!

vagrant surge
#

yeah very much, there is heavy need of actual game type projects

#

thats why TinyRacer is a pretty great example

deft stump
#

hopefully my bullet hellgame will scratch that itch

#

XD

#

Reading the latest blogpost

#

It feels like 2021 is not the year of dots

#

Welp 2022 then

tardy spoke
#

Just looked at the playlist and that seems to be the ONLY DOTS related video lol

deft stump
#

lemme send some

amber flicker
#

dots? never heard of it. Wasn't that some Unity 2018 feature? ๐Ÿ˜

deft stump
#

Unity DOTS (Data-Oriented Technology Stack) overview
https://www.youtube.com/watch?v=EGKmNQL9CcM

Unity ECS (Entity Component System) - 1 of 2
https://www.youtube.com/watch?v=OqzUr-Rg6w4

Unity ECS (Entity Component System) - 2 of 2
https://www.youtube.com/watch?v=3r4aFWqXY_8

Unity ECS (Entity Component System) - Object/Chunk/Shared/SystemState Components and Blob Assets
https://www.youtube.com/watch?v=q1_b--k3fQ8

(some more lel from the same guy. he needs more love)

Unity ECS Angry Bots demo - full code walkthrough
https://www.youtube.com/watch?v=KQ_ukvObv-A

the Unity job system
https://www.youtube.com/watch?v=vSxcZVfJn74

@tardy spoke

tardy spoke
#

Noiicee i'll toss them all in there

amber flicker
#

didn't see Entities 0.14 change log posted so spamming now:

* Added `IsEmpty` property to `DynamicBuffer`.
* Added deduplication for asset bundles generated for subscenes.
* Added new `EntityManager` methods: `AddComponent(EntityQuery, ComponentTypes)`, which adds multiple components to all entities matching a query; and `RemoveComponent(Entity, ComponentTypes)`, which removes multiple components from a single entity. (`AddComponent(Entity, ComponentTypes)` and `RemoveComponent(EntityQuery, ComponentTypes)` already existed. This patch just fills in a few 'missing' methods.)```
#
* `IJobEntityBatch.ScheduleSingle` is being renamed to `IJobEntityBatch.Schedule` to match our naming guidelines for job scheduling.
* When `DefaultWorldInitialization.Initialize()` adds the default World's system groups to the Unity player loop, it now bases its modifications on the current player loop instead of the default player loop. This prevents the Entities package from accidentally erasing any previous player loop modifications made outside the package.
* `DefaultWorldInitialization.DomainUnloadOrPlayModeChangeShutdown()` now removes all existing `World`s from the Unity player loop before destroying them. If a `World` that was added to the player loop is destroyed manually prior to domain unload, it must also be removed from the player loop manually using `ScriptBehaviourUpdateOrder.RemoveWorldFromPlayerLoop()`.
* Updated package `com.unity.platforms` to version `0.7.0-preview.8`.
#

```* EntityManager.CreateEntity(), EntityManager.SetArchetype(), and EntityCommandBuffer.CreateEntity() no longer accept the value returned by new EntityArchetype() because it's invalid. Same for EntityCommandBuffer.CreateEntity() and EntityCommandBuffer.ParallelWriter.CreateEntity(). Always use EntityManager.CreateArchetype() instead of new EntityArchetype() to create EntityArchetype values. (Ideally, the EntityArchetype constructor wouldn't be public, but C# doesn't allow that for a struct.)

  • Subscene Inspector now uses a table format to allow easier management of multiple subscenes```
#
* Setting the Scene Asset on a Subscene would sometimes fail to trigger an import/conversion because the default ECS world was missing.
* Fixed crash when using Singleton access methods (GetSingleton, SetSingleton, etc.) with a generic parameter as argument.
* Fixed an issue which caused WebGL not to work, and could produce this error message on IL2CPP-based backends:

NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: Unity.Entities.SystemBase::UnmanagedUpdate

#

then a few depreciated and removed things mostly related to playerloop

deft stump
#

````AddComponent(EntityQuery, ComponentTypes)`, which adds multiple components to all entities matching a query;```

#

this

#

i find usefull

#

and the entity manager is now responsible for creating archetypes huh

amber flicker
#

also HybridRenderer v2 fix is worth noting though I haven't tried it yet: ```

  • Partially fixed editor picking for Hybrid V2. Picking should now work in simple cases.```
deft stump
#

what does picking mean?

amber flicker
#

I interpret that as clicking on an entity in the scene view will select the entity.. though not sure

mint iron
#

its what they call selecting an object in the world, like grabbing a block and throwing it around, the object is 'picked', like picked up. i guess they need a default system in place for letting you click on hybrid ECS objects in the Editor UI.

amber flicker
#

if it is related to scene view picking, it doesn't seem to do anything for me in 2020.1.0f1

deft stump
#

lel I can't push lfs objects to the forked wiki

violet cosmos
#

I think 2021 will still see a focus on DOTS, but likely in the Jobs/Burst side, maybe not so much on the ECS/Hybrid side. But, I am looking forward to seeing what they have planned for "future blog posts"

tardy spoke
#

The 80 Unite now videos only containing one video to do with DOTS is a little worrisome haha

violet cosmos
#

I think they realized they over-hyped it in 2019

#

Unity also knows: They broke tons of shit last year and early this year. Netcode is... where? Unity VR to XR was a total shit show that's just getting resolved. Jobs were OK, but limited. ECS, while solid for tech demos isn't workflow ready yet unless you're really willing to roll up your sleeves. Scriptable Render Pipelines, going from LWRP > URP are just finally starting be usable and pretty much still break things

So, to that end I can understand the messaging that late 2020 and all of 2021 is "We're going to fix all the stuff we broke - we promise, so please stick with us and just ignore that Lumen demo you saw from the name we cannot say"

tardy spoke
#

Yep, from a business point of view I would say they may regret some of the execution for sure

#

They created a LOT of confusion around OOP vs ECS and a lot of people think that ECS is replacing OOP in a few years, which I don't think was the message Unity ever intended to give, haha.

coarse turtle
#

๐Ÿค” I thought it was

tardy spoke
#

They've also been breaking all their systems out into packages which is just going to create a bit of chaos and disarray

#

lol @coarse turtle that's the problem, I don't know if it is or not. I assume it's not? That would be business suicide I think. People have been using OOP for like 20 years and it's made a lot of fine games. Still suitable for 90% of game ideas.

coarse turtle
#

well as long as they get the message clearer to folks it'll help ๐Ÿ˜‰ ยฏ_(ใƒ„)_/ยฏ

tardy spoke
#

Yeah if even we don't know that's crazy if you think about it. We're the people who WOULD know.

#

We read the manuals every day hahaha

violet cosmos
#

ECS can be excellent, especially lately since I last tried a year ago. It's the tooling and workflow that's terrible, unless you're doing a pure-code solution

tardy spoke
#

I actually really like it, I do wish the hybrid approach wasn't necessary because I feel although it makes SOME things easier kinda, it would be even easier appropriate ECS tooling existed and you could just keep it in ECS, haha.

#

Like you feel like you're learning a bunch of stuff that you know (and implementing) is going to become a deprecated practice that you will be redoing later.

violet cosmos
#

I'm still trying to determine, and keep asking myself "where do I cut the line?" in the hybrid workflow. So, that's why I'm working on tooling right now, to make that decision a bit more reflective of a workflow I can use to meet my goals

#

I'm also working on something that really pushes the boundaries of hybrid, maybe not the best first project ๐Ÿ˜†

tardy spoke
#

The interaction between the two systems just adds even more layers of magic/complexity

rancid geode
#

I don't think that Unity DOTS is replacing GameObject/MonoBehaviour in a few years, but I can clearly see GO/MB going into "maintenance mode/LTS mode" in a few years (2024 maybe) as it wouldn't make sense to keep adding the same features to 2 cores at the same time (this is me assuming that DOTS will be production-ready by 2024, but who knows ยฏ_(ใƒ„)_/ยฏ)

violet cosmos
#

@tardy spoke I need hybrid for this system. It's an ability system, and abilities without graphics are... well, kind of lame

#

I also have needs in the future like mixing in FinalIK rigged and procedural animated characters. Dynamic complex movement systems. VR integration....

coarse turtle
#

tbh - I actually don't mind the hybrid workflow b/c it's pretty easy to convert things and keeps the tooling for some higher level use cases and custom UI Toolkit workflow (for now)

violet cosmos
#

I'm stuck with hybrid, if I want to use ECS

tardy spoke
#

I realized down the road I'll have to modify the VR systems that allow for grabbing GO's to work with entities... so I just erased that line from the game specs. Saved myself a lot of pain, I'm sure. ๐Ÿ˜Ž

You can't pick things up or interact with the world now... but at least the game may get finished at some point.

violet cosmos
#

@tardy spoke Right now, I have a custom VR toolkit, and I've already thought about migrating that into ECS and Unity.Physics. But... That's a bit lower priority than my other systems that are super compute heavy

tardy spoke
#

@violet cosmos my thinking is most the "easy" tools for VR interaction are built for GO's. My entire world is entities, so the GO's just drop through the floor, hahah.

violet cosmos
#

My Weapons System is straight up getting converted after the Ability System is converted, because the Weapons System is just begging to be in ECS/Jobs. It's super complex to break down, so I need to learn first

deft stump
#

Maybe i should just jump ship from unity entirely hahahaha

tardy spoke
#

lol I got a good 2 years of learning I bet before I would be good enough at this stuff to realistically tackle some of these more difficult problems.

#

@deft stump but which ship would you go to!?

deft stump
#

Monogame + entitas might be a fine

#

No burst though and job system

violet cosmos
#

I'm sticking with Unity. They're putting a lot of resources into making very expensive things easy. Burst comes to mind

tardy spoke
#

I can't go anywhere. I despise true OOP architecture too much so I'm stuck with whatever ECS patterns Unity gives me, haha.

violet cosmos
#

Even if I have plans for making a custom SRP, ditching MonoBehaviour and the editor is just a prefab maker... Unity is still the best IMHO. You can prototype quick, and if that's cool then actually get down into the metal

#

... nowadays ๐Ÿ˜„

deft stump
#

If unity doesnt perform their promise on the blog post. I will take as many freelance projects as i can and buy unity and replace their ceo lel

tardy spoke
#

Which promise was that?

violet cosmos
#

They really really need to focus on stability over new features. I totally agree with where they're headed, and 100% support it. I'm fine with tooling where it's at, as long as there are bug fixes coming consistently and frequently

tardy spoke
#

Scriptable objects are cool by the way, but I don't really understand what they "are". Like what they actually are, haha.

#

Are they just some kind of data struct thing or something

deft stump
#

@tardy spoke think of them as reusable global variables

violet cosmos
tardy spoke
#

yeah, I'm just ... confused as to how like in OOP system they've somehow managed to integrate them and all that

violet cosmos
#

Watch that, and if you're not convinced, I'm sorry for ever introducing you

tardy spoke
#

they seem very magic and wonderful, hahah

#

Oh no, I love them

safe lintel
#

they need to get their messaging refocused. currently they push the current unity as the stable release, when in actuality LTS should be pushed as normal unity

tardy spoke
#

I'm just confused as to what they "are"

#

But I'll watch that vid. I watched another vid on architecting with them that was really interesting as well.

violet cosmos
#

@safe lintel It's the "year naming" system. 2019.4 LTS sounds "old", right? But it was just released. Really, everyone in the professional Unity sphere who are making projects for clients and have things in production are using what you'd think are ancient unity versions, but they're solid and do what needs to be done

Unity knows: Studios and Enterprise usually use a stable version that is a year behind

safe lintel
#

agreed, the name year thing should be dropped

violet cosmos
#

If you're using a Unity version that is this calendar date, you're in "beta", or working on a project to release the next calendar year date

tardy spoke
#

Yeah, I mean you gotta realize everyone here working with DOTS has read and disregarded countless warnings of Unity and all their devs being like "this shit is wildly unstable" and then we're like "it's unstable!!". They probably hate us.

violet cosmos
#

It's their fault overselling it, imho

dusky wind
#

Also is it just me

#

or is they dropping 2020.3 this year

opaque ledge
#

idk, DOTS is pretty huge imo

#

isnt multithreading insane ?

dusky wind
#

DOTS is huge

#

I work pretty low level outside of game dev

opaque ledge
#

so i understand they are overselling it ๐Ÿ˜„

tardy spoke
#

If I was Unity I would probably legit change the naming conventions to like "Unity Experimental" (2020.2/cutting edge) "Unity Alpha" "Unity Beta" (2019.4 LTS) "Unity Stable" (2018 LTS or whatever)

dusky wind
#

and the Burst vectorization linter is the first of it's kind I've ever seen

tardy spoke
#

Because then you would get people gravitating towards the stable release

#

right now they probably have a lot of people on the newer releases that do not need to be

violet cosmos
#

Nobody disagrees. But... I think they oversold it, and their timeline for implementation in late 2018 and all of 2019

safe lintel
#

its just 2020.1 and .2 @dusky wind this year

dusky wind
#

I'm assuming because of COVID?

tardy spoke
#

@violet cosmos I think they definitely messed up their estimations because they said I believe ECS would be 1.0 by 2020.1

safe lintel
#

no because there was a huge outroar of people complaining of stability

dusky wind
#

I thought I saw plans for a full 1-4 quarter cycle in their 2020 announcements

violet cosmos
#

It's just now getting usable, where you can say "Hey, I have a big complex game I'm starting now and coming out early next year, I can use this!"

tardy spoke
#

but I think their adoption was much lower than they thought, but that's probably because the stuff is so... unfinished haha

violet cosmos
#

Adoption might have been higher if anyone could have figured out WTF to do haha

opaque ledge
#

i am actually about to release DOTS game to mobile, google play store is inspecting it for 5 days now ๐Ÿ˜’

dusky wind
#

Congrats!

opaque ledge
#

so idk, it seems possible to make a DOTS game

tardy spoke
#

yeah I actually think if they had better documentation they would've had a way better ECS onboarding

violet cosmos
#

@opaque ledge First one on your account?

opaque ledge
#

yeah

tardy spoke
#

ECS even unfinished is very useful and it can STILL do a lot of stuff

violet cosmos
#

It's normal. Be patient

#

Subsequent updates to the same app name are faster

tardy spoke
#

@opaque ledge awesome!

dusky wind
#

Though realtalk, a lot of the tech that built up to ECS/DOTS has been in the works even before C# jobs came out.

opaque ledge
#

i mean i dont use any animation or physics stuff tho, but other than that it seems possible to make DOTS game even right now

#

thanks for the info @violet cosmos

dusky wind
#

A good amount of the low level access APIs have been slowly creeping in since 2016.

safe lintel
#

@opaque ledge ๐Ÿฅณ congrats

violet cosmos
#

@tardy spoke Yes, I agree ECS is useful. Last year I totally gave up on it, it definitely wasn't ready. Now... I think it's ready-ish for a mid-size project that I'm working on

dusky wind
#

It's a long term investment strategy for Unity to say the least.

opaque ledge
#

there are still lots of stuff for me to do tho, it will be in alpha phase, but thats just game development, not really ECS/DOTS related

tardy spoke
#

Yeah, my situation is my project is going to take forever to complete, so as long as ECS is fairly functional in 2-3 years I'll be fine, haha.

deft stump
#

Its one of those things that i wish unity was open source, or at the least have the community contribute.

violet cosmos
#

You just have some maintenance to plan to keep it up to date. NBD as long as you're aware

tardy spoke
#

@opaque ledge per chance is your game 1 million rotating cubes?

violet cosmos
#

hahaha

dusky wind
#

I'm really only waiting on animations + cloth physics