#archived-dots
1 messages Β· Page 123 of 1
I know its confusing, it calculates it so its in a single curve
in a spline of 24 I think there's about 60 odd curves I think
so, where are you tracking your curve number?
var Curvecount = (booked.Bezzypoint.Length - 1) / 3;
using that from a blobasset with all the curves in it
I hope so Blobs aren't supposed to change
so the only way you can calculate your position on spline is through floatVal ?
yeah if I want to use it for each individual entity
you are linearly incrementing floatVal ?π
so if your floatVal = 0.5 next value should be floatVal + timedeelta
yeah, don't worry about it, I've got to stop before I fry my brains completely π
but in 1 frame you went from 0.5 to 0
floatVal = math.saturate(0.5) * 24; //curve number 12
floatVal = math.saturate(0) * 24; //curve number 0```
I need another fricking variable
π
I'm such an idiot 
you probably should pay to Druid π€
you can have all the moneys π
omg im richπ€
very cool, did you also make the editor tool for the curve yourself?
no I co-opted it from Catlike codes tutorial
ah yeah, his tutorials are nice
it converts all the needed data into entities form though
yeah looks really good
oh cool, if you want dots to manage the job dependencies for you when writing to nativearrays you can just pass in tag components with read/write access to them
never thought of that
ah no ok it does not seem to work
@pliant pike looks good π
anyone on 2020.1.02b with the newest dots packages? Editor is crashing like every 5 min
rolling back to 2019.3 now
I am
regular DOTS use seems pretty solid, there's been occasional crashes but I've grown used to them on preview techs
but nothing like crash every 5 or even 30 minutes for me
that being said, you can't even use latest dots packages in combination atm :p
but you can use latest entities, physics and hybrid renderer together
ecs + hybrid renderer + hdrp = 30 fps
all im doing is spawning 1 entity per second
their DOTS shooter sample ran like sub 30fps on my high end rig in editor before I disabled every debugging thing there
it's fine on actual build
yeah, the "DotsSample"
ok
the one they presented at Unite CPH
there was another one too
yeah, not talking about fps sample now
where the guy did a spreadshot and shot snakes
no idea what that means π
also if you want to speed up builds, use mono backend
il2cpp adds quite a lot to the build time
initial build can also be quite a lot slower
iterative builds should be a lot faster
more cpu cores does help on the build tho, especially with HDRP
In this video, learn about what's involved in migrating existing game code to the new Data-Oriented Technology Stack (DOTS), which comprises the C# Job System, the Entity Component System (ECS), and the Burst Compiler. You'll also gain an understanding of the performance benef...
my 12-core rig still maxes 100% while compiling HDRP shaders
it shouldn't be that slow then
ryzen 2700x
it takes like 20-30s per saved change
and i only have like 5 scripts
but if you compare to old stock unity builds..
having used other engines, I don't really think these build times are bad at all π
i'm talking about compilation in Unity editor not build
oh
well it definitely shouldn't take that long
it's like few seconds at most for me
i have no idea why
there's a really long entry time for play mode though unless you've disabled the domain reload and stuff
how do i disable that
and even then it's stalling on the first run
what's domain reload?
player settings->editor:
as another note, I don't get why they didn't "fix" this on the new build system:
UnityException: Build path contains project built with Mono scripting backend, while current project is using IL2CPP scripting backend. Consider building your project into an empty directory.
it autogenerates the build path, would have been trivial for them to add suffix for mono and il2cpp builds to separate them
it's not a big thing, just annoying that you have to manually clear folders now if you want to test different backends
re: framerate with dots + hdrp in the editor... I get this in the editor with postcard size game view:
and this on the actual build @ 1440p:
yes, hybrid rendering v2
I'm on rtx 2070 super
it's a relatively simple scene
version 2?
if I run same without HDRP, I get like 1300fps
but it's kinda pointless to compare built-in to hdrp like that as there's obvious overhead on hdrp that you pay up front
?
after downloading hybrid renderer
my screen goes starts flashing with a closeup of a sphere then turns black
hybrid rendering has always been bit sketchy
then renders normally before flashing again
it's included in 0.4.0
you have to manually enable it and use HDRP from github though
they've said you also need 2020.1.0b3 but it seems to work on b2 already
b1 was completely broken with it
yeah, you can't get this there, it won't be backported
the frame flashes and blackouts start happening
ugh
why are ppl bothering with dots
too many breaking changes
you can't build anything with it
everything you try is in preview, besides burst + jobs
and yeah, DOTS has been pretty rough so far
it shows great promise but it's not for people who enjoy smooth ride π
yeah i mean u can't build a major game around it
with how many changes there are every month
you are not forced to update to latest all the time :p
I think it's easier to incrementally change
that being said, I wouldn't even consider "old" hybrid rendering at this point
than to overhaul when u realize u hit the limit of your current version
pretty sure they'll just slowly deprecate it now
it took me like 1-2 hours
to realize that i even needed hybrid rendering package
wdym rendering on gameobject side
it's what I'll probably do unless they really get things sorted on hybrid rendering v2
well, I already did it before they said there will be better version of hybrid rendering :p
oh right, hybrid ecs
yeah, just sync your entities transforms to gameobjects, do rendering the old way
no need for hybrid rendering package at all
and get rid of most rendering issues
the old hybrid rendering wasn't even all that fast on most cases
it just made it more convenient to use with dots
hybrid rendering v2 should be something else, even on perf side
my game idea requires good rendering perf on large number of entities
10-20k ideally
then 2020.1 it is
do note that the hybrid rendering v2 is now on first public preview and we still miss the first official HDRP package that supports it
so it's super early
can really judge it better during spring while it matures
that forum link u posted said the packages were not released
do i have to build SRP from scratch
like mentioned here + on the forum thread, you can use it from github master branch right now
if you need everything through package manager, you have to wait for HDRP package that supports it
I think they are working on 9.0.0 release so should arrive in few weeks
9.x still works on 2020.1 but I can imagine they move to 2020.2 at some point as that's the end target for this years cycle
I've been using HDRP directly from github for years now myself so it's not a big deal for me, I'm totally used to testing their wip stuff there
I'll wait for official release then and use Universal Pipeline in the meantime
URP on current (old) hybrid is kinda subpar too
i see
do u know when dots gets released officially
i dont mind dealing with source
entities package is supposed to release this year
but for the rest of the DOTS packages... who knows
i just feel like my time would be better spent on other things while they release newer versions
they originally said they plan for surrounding DOTS systems to be "ready" by 2022
wow that's a long time horizon
but looking at the time they've taken for these so far, I wouldn't expect that to hold
so expect more like 2024 π
or... use more of the things that actually work already
and only use ecs for the parts that are fully functional
that's my plan as of now lol
that only covers the core of ecs though
and none of the rendering, audio, physics etc packages
also that was from Unite CPH roadmap, which was presented last september
we'll get new roadmap next weeks wednesday when they do roadmap stream
would have gotten it on GDC otherwise but we all know what happened to GDC
rest in peace in peace π€
it's a meme
anyway : ```md
You can learn more about this in the two roadmap sessions that we have planned for the coming weeks. Subscribe to the Unity YouTube channel, so you donβt miss them.
- Wednesday, March 25 β Core technology and workflows
- Wednesday, April 1 β Cloud services for operating games
that 25th stream should cover dots too
nice
sounds good, I'll try to watch it
anyway, gtg bed, thanks for the info dude π
i am kinda curious about visual scripting, iirc they said 7th experimental drop will be in end of this month
perhaps they will show something about it on upcoming stream
I keep forgetting that thing exists
not a huge fan
but if they do it right, at least there will be unified workflow there that's unaffected by underlying api changes
that's one of the big benefits of most node graphing tools, you noodle the graph once and it's super simple to update to future versions and the graph api rarely changes (usually you just get additions to it)
on code API, things evolve a lot more
this applies to all graphs I've used, including shaders and regular code
i dont think its much of a problem when underlying API changes (but perhaps i am saying this because i dont have any projects going on anyway) the reason why Entities changes so much is because its preview right ? shouldnt be much of a change once its out of preview
nah, that has nothing to do with entities now
it happens on ALL code that have node graph abstractions
code api always changes more
after reading a lot of complains on forums a have a feeling that out of preview does not mean anything π
you can't change how the graphs work fundamentally on each realease
also, fully expect Entities 1.0 and 2.0 code API too look totally different
as an example, if you've used shader graphs, maintaining a SG between say, 4.x HDRP and 8.x HDRP is trivial, it mostly loads on 8.x and just works when you resave it there
but if you wanted to upgrade 4.x HDRP shader manually to 8.x HDRP... that's pain for days and no guarantee of success
basically everything has changed under the hood
ah i see, yeah i understand
if you look at unreals blueprints, they have been pretty much unchanged throughout the years (if you forget about the big change on ue 4.7 when they added scene and actor components to it), they just keep adding functionality to it
their c++ api does change on each release still
despite the engine framework being "stable" for years
so if you have a c++ code project there, you are likely to need to modify things on each major version but if you use their blueprints, you usually just open the project and it runs
@warped trail tbh lately seen "out of previews" have almost all been rushed
I dunno why they do it for packages but still delay engine releases if they are too bugged
well, they do delay the packages sometimes too but usually that happens on earlier stage of the development, not when they are still polishing it and can't get it polished enough
like for example, HDRP went through a major restructure between 2019.2 and 2019.3 when you'd expect them to just stabilize it on that point (just before full release)
you don't have to be a genious to know that things will inevitably break when you do such move and now they've been patching it up on these following 7.x releases
I do love the HDRP and their team tho, huge respect to them, just feel they had to push to release too early because it was on the roadmap
interesting tweet for this channel https://twitter.com/axelgneiting/status/1241487918046347264
Fun fact: Doom Eternal does not have a main or render thread. It's all jobs with one worker thread per core.
157
1099
If my ground looks a bit like this (from catlikecoding tutorial), how would I make player colision with the ground work? Do I estimate it right, that the easiest thing would be not to have the ground in the physics system at all, but just use my heightmap I have somewhere to check that nobody drops through the ground?
do they actually collide or do you just want to check stuff ?
if latter you can use trigger
if former than i think you should make your ground static
@opaque ledge well I just want the things to not drop through the floor basically
go with trigger then and set the collision filters properly, they both need to want to collide with each other
what do mean with want to collide with each other? I am pretty new to physics stuff, I normally start off with writing some simulations and never come to the actual gameplay π
but the quarantine seems to have some positive sides too π
ok so I make the ground static since it does not move. Can I use the mesh I calculated for visibility also for collision?
or just go with "everything" if in doubt π
there is a collision filter in phsycis shape, you will see belongs to and collides with, you have to set them properly
sorry, discord is acting up π¦
yeah perhaps, i dont know, i never used it for 'complex' scenarios
hmm somehow I think just saving the height somewhere and checking height < position may be cheaper?
since I would have all these gigantic physic colliders which are quite complicated oterhwise?
sure, i suppose so, but idk trigger seems easier
imo, just make it work, you can worry about performance later π
yeah probably thats the right way π
@vagrant surge yeah that's parallelism 101 /shrug
Remove Kebab Contention of Shared Resources
not exactly lol. look at both unity and unreal
I never said they made a good call
they both have game thread, render thread, and then helper workers
just that it's an obvious application of shared resource contention best practices
granted you can blame OpenGL for some of that
(i.e. needing a 'main' or 'render' thread)
using statics or thread-local variables are whackable offenses imo
Thought it was interesting they got rid of megatexture completely too
less need with bindless texture
one big point with megatextures, is that you dont need to bind textures per drawcall
and can go crazy aggresive on the batching
but if you are doing bindless textures, you can do that same super-aggresive batching without megatextures, which is what i believe they do
are we talking about virtual texturing now?
Maybe Sparse textures? https://docs.unity3d.com/Manual/SparseTextures.html
kinda curious what's the plan of the VT with DOTS in general, I haven't even asked the staff as I just expect: not going to be supported this year, like for everything else π
that sparse texture thing is old thing in Unity, I don't think it even works for anything but terrain in practise
there will be virtual texturing support for terrain too
what's more interesting is how they plan to integrate all these things
so far the take has been: "we dev these all in isolation, no support with other in-development techs"
so, nothing functional on mixing new fancy techs for following years now
I just feel it's really bad way to dev for techs that need to play together eventually
like, they first design the thing taking old systems constraints into account and when it's done, they start to wonder how they and integrate it with a thing that's already been in development for years before this new thing was a thing
it feels just... very shortsighted
this happened already with addressables for example, and input follows but it's not as bad in practise
and now with all rendering techs like virtual texturing and raytracing + hybrid rendering on dots
well, I don't really know the state of VT with hybrid rendering though for sure, haven't tested it
DXR for sure doesn't work properly with either VT or hybrid renderer v1 or v2
VTs with raytracing are a massive issue
people doing visualizations would want both
but it's not on the table this year (already asked)
sure, but raytracing just doesnt mesh well with VT as a technique
needs the core algos of VT to change quite a bit
no idea what that means
Survive and shoot at others while trying to keep your own tank alive!
if you mean in singleplayer, then yes
Yep! Single player with some just npc bots basic things
and then cubes with physics
then i stopped cuz i was just wanting to test what this dots stuff means all this time
idk i just added physics for dots package
there is a unity tiny sample for a space shooter
then slammed some physics related stuff on those cubes
you can use that as base and add other ships with some basic AI and extras
and it worked β’οΈ
Has anyone encountered an issue with Get/SetComponent ? for some weird reason, i do GetComponent to get the value of an entity, i process and write to it and do SetComponent to write it back but it gives me error that i should declaret it ReadOnly
it works with normal GetComponentFromEntity, but not otherwise
oh well π€·
I'm trying to wrap my head around the ECS concepts... Im following the PONG tutorial but without using the Physics system.
Now in my "Ball" code i would need to check for collisions with either paddle...
But i can't just pass in the left and right paddle like this because they both use the same component data
Entities.ForEach((ref Translation t, ref BallMovementData data, in PaddleInputData leftPaddle, in PaddleInputData rightPaddle) => { ... }.Run();
you need one foreach inside another foreach
your outer foreach is the "ball" foreach, taking Translation and BallMovement, this iterates the balls in your game (if you have muleiple)
your inner foreach iterates the paddles, you dont need to separate left and right, just grab PaddleInputData + Translation
@vagrant surge thank you I will try that
you are trying to access the paddles in the same foreach as the ball, thats a big mistake
the foreach loops over entities that have those components
one at a time
if you want to access multiple entities you gotta need the nested foreaches or other ways
@opaque ledge Were you doing Schedule (not ScheduleParallel) in both cases? You cant write to a cdfe from a parallel job unless you disable safety
@vagrant surge what if i need access to both at the same time ,say i have to compare values between left and right paddle, could i get an array of them insteed of having to use a second ForEach()?
yeah its parallel, but i thought it would disable it automatically
so i am stuck with GetComponentFromEntity ?
Since the Get/Set functions give you no container to disable safety on then yeah
i thought codegen could have just detected that and handle things for me π¦
I think it's better to force you to be very clear if you are disabling safety checks
a new weekend, a new set of horrible package update errors
anyone by chance have some quick solution before I spend half the day digging again? π¦
try delete Library folder?π€
also Entities.ForEach() doesn't seem to support nesting... E:\Projects\unity\PongECS\Assets\BallMovementSystem.cs(39,13): error DC0029: Entities.ForEach Lambda expression has a nested Entities.ForEach Lambda expression. Only a single Entities.ForEach Lambda expression is currently supported.
yep, it doesnt
you can create entity query and do ToEntityArray, and access stuff using that entities in your 2nd job
that seems kinda overkill if you have exactly two of one kind. but I will try it. Maybe there is some sort of tagging that people would use?
ComponentSystem supports nested for each but ComponentSystem runs on main thread, and supports no parallelism so its used for debugging purposes, and its also getting depracated if itsnt already
run 2 foreachs then @stark pulsar
first foreach copies the bounds of the paddles to an array
second foreach calculates bounce
yep
then i would have to allocate memory each frame?
I seem to be past that error now drUiD thanks
^is this kind of thing normal with package upgrades?
just unlinking all my shit?
as my project gets bigger this will become very annoying....
yes, its quite common
jesus.....
upgrading anything in unity is.... dangerous
that's kinda rediculous
thats why you take a backup before upgrading
i mean it's in git, yea but
what do I do, manually write an upgrade application to deal with theses issues?
or do it manually every time?
tbh i never had that problem when i upgraded to 2020 from 2019.3
ok this new version of 2020 seems to just crash every 5 seconds
π©
got all muh errors fixed at least
it was opposite for me, it gave me a not-existant error so i had to downgrade
so I just looked at the prefabs
it like deleted the references for no reason
the .prefab file is identical now that I hooked it up again
rofl
whatever......
@slim nebula pretty common issue to e.g. upgrade and find all references lost - be sure to not save anything and restart the editor. If that doesn't work, try selecting all prefabs and reimporting. That usually fixes anything for me but of course if you're really unlucky you'll get problems even after doing that.
ok. I can try those for next time thanks
also I can jsut git revert the .prefab files
99/100 restarting editor works for me
ok. new episode of mr simoyd's stupid problems
tryna get VR workin with dots lol
so
I"m not sure if this is the right place to ask but
we'll see
the camera is a gameobject and.... it looks like this "Tracked Pose Driver" is updating the position and rotation on the gameobject's "Transform"
the rotation is coming through, but the Position is not
I'm guessing I have to somehow get that data into DOTS? or something?
or am I wildly confused
something something hybrid renderer
ignore eveything I said. the position is working fine now.. not sure what I did
reeeeee
hmmm
Unity has removed this option on 2020.1 editor:
this was supposedly the biggest perf gain to get when running DOTS Sample in the editors play mode
(to disable that)
doesnt that mean you cant debug from visual studio though
you'd think yes, but the option sure is gone now π
The most impactful is to disable editor attaching (the ability to attach a debugger to the editor). You can do that in Editor > Preferences > External Tools.
I just tried it on 2020.1. When trying to attach debugger from VS to Unity 2020.1 editor, I get this popup:
I don't remember that being a thing before
so I guess they try to disable it by default and only enable it on demand?
that being said, when I said switch to debug mode and tried to run the project, editor just silently crashed to desktop π
classic unity
it did work on the next try
so it's not completely broken
I guess stuff like this is what people meant by 2020.1 crashing all the time :p
bottom corner now has few extra icons:
I can't remember seeing these before either
yeah its 2020.1 stuff
other icons are for: cache server, lighting tab and background tasks
well, this explains why the editor attaching option was removed
it's also more obvious what the gain is now
ok so the visual buts
bugs* were because i was using dx12
does anyone know how to enable fullstrack trace?
A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
Jobs>LeakDetection> FullStackTraces
nice thanks
Anyone know of a place (discord or otherwise) where people talk about non-Unity-specific data oriented stuff? I'm looking into how archetype ECS do component array mapping during system iteration of each normalized set of arrays (looking at flecs source code at the moment)
Each chunk or set of arrays has the component arrays in some order. We know how entities map to components by offset within a chunk, but out of a set of component arrays in a chunk a system will often want to iterate some subset
So there's got to be some mapping, on a per chunk basis, to the actual offset of each component array
Trying to get a sense of if there's a common approach to that, and I'm not sure if this is the best place to ask since this channel is generally Unity DOTS related but I haven't found a ton of other places on the internet where people discuss this kind of stuff.
I convert my Player and Ground gameobjects to entities, but my instantiated entities only collide with ground
any thoughts?
got it, when you inject gameobject entities, you need to build the system to sync the go and entity together
Is it possible to run ComponentSystem outside of main thread?
I need to update it OnAudioFilterRead
But when I do that by calling a new function specified within my ComponentSystem, I get an error
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.```
not sure if you can run componentsystem.update out of main thread but that exception looks like you're trying to schedule a job from it which won't work regardless
jobs can only be scheduled from main thread
Oh right, I do run Entities.ForEach after all
Hm, I guess then I will need to store data I need to pass and then transfer it when filter read is called
Welp, thanks
@spring hare you can look at how my own ECS does it https://github.com/vblanco20-1/decs/blob/master/src/decs.h#L407 . I hold an array on the archetype that contains the offsets, so i just linear search that one to find the comp i want. Could be improved through hashmap, but its really not so easy
and btw, Flecs has its own discord, so you can ask the creator there
Hi there! I'm having some performance issues with ECS rendering, specifically UpdateDynamicRenderBatches and adding new batches. Am I missing a component or something on my rendermeshes? (Using legacy pipeline)
basically, render mesh v2 sucks xD
hybrid renderer v2 comes with 2020.1b3 if you want to upgrade to beta, but it also requires URP and HDRP 9 which hasnt been released yet, beta hasnt been released yet either
and it only works with SRP(so URP and HDRP), it isnt supported on built-in renderer
In the Unity Pong tut,
I'm doing
but I get the following errors:
ArgumentNullException: A valid BlobAssetStore must be passed to construct a BlobAssetComputationContext
NullReferenceException: Object reference not set to an instance of an object
I'm pretty sure it has something to do with me passing null into BlobAssetStoreType. What should I be using instead?
Some weird behaviour then begins to happen to my ball which was working fine before I instantiate it via script
What to do about the 0.8.0 compile error?
Upgraded just now, thought it would've already been fixed.
I don't use subscene or live link, whatever that thing is.
what kind of errors do you have?π€
Library\PackageCache\com.unity.entities@0.8.0-preview.8\Unity.Scenes.Hybrid\LiveLink\LiveLinkPlayerSystemGroup.cs(32,59): error CS0117: 'SceneSystem' does not contain a definition for 'GetBootStrapPath'
Library\PackageCache\com.unity.entities@0.8.0-preview.8\Unity.Scenes.Hybrid\LiveLink\LiveLinkPlayerSystemGroup.cs(53,48): error CS0103: The name 'bootstrapFilePath' does not exist in the current context
have you tried to delete library package and reimport everything? π
yep, please do that π
just delete Library folder and restart editor
Holy, that folder is 1.5 GB big.
Unity will basically re-create your project
How do I improve foreach iteration speed when I need to run foreach loop over 307'200 times per second?
@lusty otter you need to modify two classes to get it working
do ScheduleParallel
Currently it is laggy even at level of 2-3 entities.
are you using ComponentSystem ?
dont, that only runs on mainthread, you wont be able to use jobs at all, and no parallelism
just change it to SystemBase
Why SystemBase?
thats the newest system, and it will be supported, other types wont be supported and will be depracated
ComponentSystem was used at... 0.1, 0.2 perhaps ?
I believe I am on 0.1 or something
its at 0.8 now π
I tried to install DOTS into my new project, but for some reason packages had conflicts between each other
So I looked into my another working DOTS project and used package versions from there
just update collections to latest versionπ
π
oh it will π
just create a new project on 2019.3 and install DOTS packages
and upgrade everything except platforms
not sure if that is fixed yet
sure, it works fine for me for all versions i think
Anyway, SystemBase has better performance than ComponentSystem when doing many single-threaded foreach loop per second? Or not?
should be fine as long as you use 2019.3, tho i guess its always better to use latest version.
Yep, tbh, your ForEach probably doesnt use burst
Right
are you using any classes in your for each ?
burst is for jobsπ€
perhaps do .WithBurst() after ForEach, maybe that can help
but like i said, upgrade to SystemBase later on
job does not mean parallelπ
Wait
Huh
Daaaaamn
I thought Job System exists simply for parallel computation
It says so practically everywhere
In the Unity Pong tut,
I'm doingbut I get the following errors:
ArgumentNullException: A valid BlobAssetStore must be passed to construct a BlobAssetComputationContext
NullReferenceException: Object reference not set to an instance of an objectI'm pretty sure it has something to do with me passing null into BlobAssetStoreType. What should I be using instead?
Would appreciate any help on this, thank you
@frail seal you can run job on main thread if you want to
job is something that runs on a worker thread, but if your main thread waits for that job, its good as its running on main thread
you cant use null anymore @dusty scarab
you have to do "new BlobAssetStore()",
and dispose it on your monobehaviour's OnDestroy method
I'll try it, thank you!
Okay, I am updating Entities package from 0.1.1 to 0.8.0-8
Fingers crossed
If anything breaks, I'll cry
it... it will break π
@opaque ledge It works now, thank you!!
gl^^
The forum post fix did it, thanks!
Oh, actually, I tried updating all of my dependencies and it now works
Only my component system is now errorish
Now I have a stupid question
How do I iterate through entities on SystemBase?
It doesn't have Entities in it
Ack
I confused ComponentSystemBase with SystemBase
Thanks for your code
CSB doesn't have Entities
just read documentationπ
Hi everyone, just a quick ask for anyone who's used or is currently using D.O.T.S, I'm needing to conduct a quick email interview in relation to my final year university dissertation on "Is Unity D.O.T.S worth using from a developer perspective?", the quick email interview will only be five questions long. Kinda stressing out as the deadline approaches haha
Drop me a DM if you fancy
does it need to be an email
can't you just get answers in here
@mystic scaffold short answer no
And the fact that it's all in foreign to me language doesn't help either
English texts hurt my eyes
@hollow sorrel sadly yes due to having to keep things inline with the my university's research policy /: apologies
@pliant pike no worries
damn boomer teachers
@hollow sorrel ikr, it sucks
@frail seal blinded by english text? π - I feel sorry for anyone who isn't a native english speaker.. I hope the docs will get translated at some point... but I do think they're quite well written
@frail seal are you french
I am russian
oh nvm
Why you thought so?
because french tell everyone else to speak french even if they know english
i know it was a joke
Depends on how you structure your jobs really
@frail seal Π·Π΅ΠΌΠ»ΡΠΊ π
public struct ChunkJob : IJobChunk
{
public ArchetypeChunkBufferType<SomeBufferType> BufferType;
public void Execute(ArchetypeChunk chunk, int index, int first)
{
var buffers = chunk.GetBufferAccessor(BufferType);
for (int i = 0; i < chunk.Count; i++)
{
var currentBuffer = buffers[i];
}
}
}
if you do it in a job chunk otherwise if its a Lambda ForEach
Entities.ForEach((DynamicBuffer<T> buffer) => {})
Ooh, thanks a lot
It makes everything so much easier
I may be able to finish my sound synthesizer today
@mystic scaffold short answer is NO (for a real project). But it is super cool and worth watching it being developed
yeah that's what I was trying to say
yeah, apologies XD was still waking up when i wrote that
its fun to play around with but I wouldn't try to make a full game with it currently
its just far too underdeveloped atm
almost no editor support, and almost no "anything" support. Even rendering meshes with it is tricky
and if the past is anything to go by, parts of the project will frequently break with new package and editor versions, so its possible to get into situations where you need a bug fix that exists in newer packages, but that means you're forced to upgrade other packages or the editor, which introduces more compatibility issues / forced refactoring.
upgrading projects in unity has allways been horrible
but due to the current early state of DOTS, you have to upgrade
except on this its even worse because the api is on constant flux
@vagrant surge thank you!
yeah I've been way behind on the updates and didn't even know they went from jobcomponentsystem to systembase
that's my own fault
yeah they seem to be cutting down alot of the bloat
i kinda was surprised when i saw that topic in forums about being upset over this
i used to like IJobForEach as well, but ForEach is much better, much less code
people don't like change and to know that what they learned is now obsolete
I guess some people feel like the lambda syntax is ugly compared to a nicely separated struct. Also if I had like 150 ijfe to rewrite I would probably be annoyed too
yeah but people should have expected that, i mean same happened with entity query right ? it was the first way to do ECS, now that is not used at all, so i guess same happens now
You can still separate functions though so not really sure about that first complaint
Has anyone worked much with the conversion workflow? Any idea how I made force a subscene or specific gameobject to be converted again?
(via editor script)
only complaint i have for ForEach lambda is intellisense derps when you are dealing with dynamic buffer that you use in query
Intellisense actually seems way worse in visual studio 2019. I feel like it was less buggy in 2017
you can use authoring components for converting gameobjects to entities Timboc
and they dont need to be in subscene
sorry @opaque ledge not really what I'm talking about - specficially live link - similar to the way that if you change the position you somehow dirty the object and it gets re-converted
Anyone knows why this code throws error DCICE007: Could not find field for local captured variable for argument of WithReadOnly. Seeing this error indicates a bug in the dots compiler. We'd appreciate a bug report (About->Report a Bug...). Thnx! <3?
(It persists even with GetComponentDatFromEntity<NodeMain>(true);)
@amber flicker you have to add [ConverterVersion(string username, int version)] to your authoring class and whenever either of those params change unity will reconvert those (not sure if it's only the components that changed, entire gameobjects, or entire subscene)
i don't know if you can do it any other way atm anymore
they removed the button
which is really poopy because sometimes you just want to reconvert because you changed something in editor
yea I can't use that attribute - I'm pretty sure there's some livelink api somewhere... I guess I just need to trawl through all the source until I find how they update on component change in inspector
cool, will do π
@Blinded I dont think that error relates to the code you posted. It says you're trying to capture a local variable using WithReadOnly but that it's not finding that variable inside the lambda body
Oh never mind I didnt see the withreadonly at the end
Yeah the problem is you're not using Allnodes inside the lambda
nah, he is using it π
Hoping to hear about DOTS Terrain Engine on Wednesday. Anything else we can expect/hope to learn more about?
maybe do get allNodex[newValue.Donor] first to a local field and access Output field ?
Oh he is...sorry I just woke up
new entity debugger ?π€
How should I go about rendering a 2d mesh of quads using DOTS?
I'm making a 1000x1000 tile map and my idea is to make a mesh for 8x8 tiles to be a part of an entity per chunk
My question is, how should i implement the texture to fit inside dots
Okay, I'll try it, Curly
@gusty comet You don't, textures and meshes are not a part of dots yet. You can use hybrid renderer but it's horribly slow for what you're trying to do
v2 might work but we don't know yet since we can't use it properly until 2020.3 is released
Hmm.. using unity's Tilemap then?
I would love for it to work on mobile
Guess I could use a simple monobehaviour to render and work on logic in dots
In my roguelike I just build all my tiles into one big mesh. Even with a huge mesh (100+x100+) it performs fine, but the mesh doesn't display properly at much larger than that. I'm also doing a voxel game right now where I separate my terrain entities similar to what you described - when it comes time to turn them into meshes I just create a gameobject, pass the relevant mesh data to a newly created mesh, and let them render the old way
Once Hybrid v2 is out I will probably switch to using that
you can if you don't mind either writing your own renderer or trusting a random dude on the internet's code
this thread is a good starting point if you wanna go that route https://forum.unity.com/threads/200k-dynamic-animated-sprites-at-80fps.695809/
It kinda worked @opaque ledge
But now I have InvalidOperationException: The writable NativeArray <>c__DisplayClass_CalculateSignal_LambdaJob0.JobData._lambdaParameterValueProviders.forParameter_node._type is the same NativeArray as <>c__DisplayClass_CalculateSignal_LambdaJob0.JobData.allNodes, two NativeArrays may not be the same (aliasing).
@frail seal You can't have NodeMain type as an argument and pass in a CDFE of that type as well
also out of the ones of that thread this one is most recently updated https://github.com/GilbertoGojira/DOTS-Stackray
CDFE?
you cant get the same component type with both GetComponentDataFromEntity and in your ForEach lambda
If you're using ComponentDataFromEntity you would need to not pass that type as an argument and access your component through that
So fastest solution right now would be to use gameobject to create and render my tilemap mesh and do the rest in dots?
Fastest solution is GPU Instancing which is what we do in that 200k sprites thread that Scorr linked to, but there a re compatibility issues with that especially on mobile. So yeah, my recommendation is to use gameobjects or Graphics.DrawMesh until Hybrid v2 is out
I mean, fastest to implement π
You mean I can't have both GetComponentDataFromEntity<NodeMain> and ref NodeMain?
Okay, thanks a bunch!
Fastest to implement if you're already using dots is Hybrid Renderer...but like I said performance is truly horrible right now. Supposedly v2 is MUCH better, but who knows until we have access to it
you can still make your tilemap meshes using DOTS, but yea gameobjects for rendering is easiest way to get going atm
You mean I can't have both
GetComponentDataFromEntity<NodeMain>andref NodeMain?
@frail seal
Correct
i'd prob make tilemap meshes using job system and then upload that mesh into a gameobject+meshrenderer
@frail seal yeah, you have to do do Entity entity in your lambda, and get your node from GetComponentFromEntity
Hmm.. Hybrid renderer wouldnt allow me to set each tile in the mesh, would it?
I wouldnt mind going with that if it means an update later
hybrid renderer only takes care of the rendering portion, the creating mesh with correct textures + uv all needs to be done yourself
and instancing prob wouldn't help you much here if you're making 8x8 tile chunks
I mean, i can only set the RenderMesh to on single entity, so it would need to be a sprite atlas of its own
since all your rendermeshes would be different
That's true even if you go with gameobjects though
yea
Oh, actually, I can't do that
I see
@frail seal Pass your Entity as an argument to your lambda
I can't access DynamicBuffer from parallelfor if it isn't readonly
basically, Entities.ForEach((Entity entity, ref DynamicBuffer<DonorElementData> acc)=>{});
And if it is readonly, I can't change my component
Basically @gusty comet if you're not using Unity's TileMap or Sprites then you need to write your own shader
Can I?
Would it take much from the performance if I did use it? It has so many features I don't need
No, TileMap is very fast
I would have to destroy and create a new node component in it's place most likely
I personally don't use it because I can't stand the asset workflow and like you said it has a lot of crap I don't need. But yeah it is definitely very fast
Alrighty! Thanks everyone
@frail seal No, if you want to make changes to any kind of array you either use Schedule instead of ScheduleParallel or use WithNativeDisableSafetyParallelRestrictions if you know what you're doing
@hollow sorrel I'm not 100% sure but I think GameObjectConversionUtility.ConvertIncremental(.. is working - bit fuzz on how I'm supposed to know the correct flags but it's kinda working π
@zenith wyvern What could go wrong if I use WithNativeDisableSafetyParallelRestrictions?
I don't know if I know what I am doing rn
So, if I write into one element at a time I won't have my PC explode?
It's perfectly reasonable to use Schedule to run it on a single thread if that's what your logic requires
I need it to be as efficient as possible
Then I guess you better do some research on race conditions
Since my current ECS implementation has much much much lower performance than my MonoBehaviour one
About 200x
If you keep at it, you might be able to invert that ratio. Also if you're looking at performance at all, make sure all the safety checks are disabled and you're using burst.
@amber flicker oo nice ty π
so do we not used EntityQuery anymore?
We do, but not mainly, you cant even use buffers with EntityQuery
ok yeah, because I'm trying to figure out how I'm supposed to access Blobassets , multiple of the same type
We do, but not mainly, you cant even use buffers with EntityQuery
@opaque ledge
Sure you can, what do you mean?
You cant do ToBufferArray right ?
No, but if you include your buffer type in the query that query will still properly match entities with your buffer attached to them
yeah i know, but you cant do any process on dynamic buffer right ?
you can just retrieve components or to entity
If you wanted to access the buffers directly from the query then yeah you'd have to convert it to an entity array then access your buffers through each entity
@pliant pike You access blob assets through a BlobAssetReference
so how would I access several Blobs I need to get them by ref
var baked = BezierGraph_Query.GetSingleton<BezierGraphSpawner>();
I'm currently using that except I have multiple now not its not a singleton
Each one has a BlobAssetReference attached?
Then just do query.ToEntityArray() and access your components through entity manager, or through a CDFE in a job
ok thanks a lot
No worries, I just started working with BlobAssets recently. They are very confusing at first
awesome, I have multiple splines now
blobassets are great, such a massively underrated feature of dots
does unity throw a compilation error if you dont reference the blob asset by reference in job code now? π€ I think I remember them saying something like that
i still have no idea where to use blob assets tbh
sure its read only stuff but.. i still dont get it why would i use it over a component or a shared static
well blob assets have data compacted so - it's one large section of memory with the data closely aligned
It's the best way to embed shared data in a component from what I can tell
especially large volumes of it - so you can likely extend it to animation clips
so its like a shared component but instead its a component its a field that you can store to component ?
you can look at physics collider π
it takes a big slab of memory, and puts all your stuff in it, back to back.
so its like a shared component but instead its a component its a field that you can store to component ?
@opaque ledge
You can't access shared components inside a job. You can access BlobAssetReference anywhere
hdrp vs urp with DOTS? any thoughts
hdrp is getting a lot of love from devsπ
Dots shouldn't be a factor in your decision. If you're targeting high end, HDRP. Otherwise URP
you can't make cool looking tech demos with urpπ
yeah but the shader limitations are a real pain in the ass
creating custom master nodes
for non built in shading modes
like a custom skin or hair shader
ah
that isn't really a DOTS limitation, that's just Dumb By Design
A curiosity question. There is an EntityManager.HasComponent to check if a single component is present on an entity. But is there a way to check multiple in 1 go?
i guess you can check whole chunk if it has some component or not in IJobChunkπ€
or are you asking multiple components in 1 entity? π
how do u modify entity physics collision layer
so certain entities dont check collisions with each other
@digital kestrel there is examples of that in physics samples
@warped trail This would require me to make a query, which I want to avoid
would you need all to be present?
Yes
I was thinking if compairing my list to the list of components on the entity
And while the EntityManager has a way to get the pre-sorted list of componenttypes from a given entity
there is no method of sorting my own list of component types, that I want to check overlap with
anyone know what the math equiv for Vector3.Angle is?
acos(dot(lhs, rhs))
consider not calling acos since it's slow af
work with cosine directly
(that's also in radians FWIW, so you also need to convert)
thanks, terribly bad at maths so will have to just go with acos for now π
what's the difference between havok physics and unity physics
unity physics: stateless, source available, free
havok: cost depends on unity license, stateful(higher perf), better debug tools, closed source
Not being stateless also has other benefits like stable stacking
what is stable stacking π
@sour ravine is this correct?
a = Vector3.Angle(vectorA, vectorB); b = math.radians(math.acos(math.dot(vectorA, vectorB))); as they give wildly different results
When they announced Havok physics, all of their examples were hey Havoc is better than Unity's solution on this situation
@safe lintel I think it should be math.degrees instead of math.radians but searching docs is being uncooperative
are veca and vecb normalized?
also good to know ^^
math.dot gives u |mag| * cos(theta)
@opaque ledge Under the "Behaviour" section they demonstrate the difference. Basically trying to stack in Unity.Physics can result in comically bad behaviour https://blogs.unity3d.com/2019/11/06/havok-physics-in-unity/
@sour ravine thanks, changed to degrees and also normalized(unsure if necessary) the vectors and its close enough for my uses
@safe lintel yep, it's math.degrees not radians
you don't need to normalize if you know absolutely 100% the inputs are normalized already
but that should be a nice perf bonus, if skipped
hmm it doesnt work without normalizing
@warped trail so I discovered there's a physics shape script and physics step script with "categories" that function the same as layers
so i can just adjust the layers to how i want
@warped trail π
if im setting up a follow system
should i get a TargetToFollow component with its entity ID
a system that queries for this component
and sorts the entities by the target they want to follow
then set up a paralleljob that calculates a set of positions to move to, updated per frame
and finally a system to actually move the entities
how are you generating the terrain
greedy meshing? baking ao, flood fill occlusion culling?
Occlusion culling but only within each chunk. There's no culling on adjacent chunks yet, still thinking about the best way to handle it
I'm thinking of generating shared edge data between chunks, with bit shifting I should be able to fit all edges for a single 16x16 side into four ulongs
So I could easily reference edge data inside jobs without having to reach into adjacent chunks
16*16*16
Currently getting 6 draw calls with a huge region
They're all using the same shader/texture/material
how many chunks are you rendering
Looks like rendering is taking ~10ms in the editor for 40x40 regions. Each region is a stack of 1-3 chunks
So yeah, not great
I suppose I should try to merge the chunks into bigger meshes during mesh generation, I can still keep the actual block chunks small
math.rotate
ty
hi guys,
i'm using latest Hybrid Renderer / DOTS with URP on 2020.1 ...
does it load / unload subscenes based on camera view automatically or needs to attach some script to camera or something like that?
it doesn't automatically do things like that
basically if you want to stream things, you need to come up with your own logic to stream dots subscenes
could always look how they did it on megacity too but it's using quite "old" ECS version
@gusty comet https://www.youtube.com/watch?v=91kJtsDLTyE
I was about to link that π
but yeah, that's super trivial case on that video, you don't usually stream like 2D view π
this one discussed the megacity's system: https://www.youtube.com/watch?v=k_ORJXmPu9M
wonder if this was related too: https://www.youtube.com/watch?v=9MuC3Kp6OBU
ok ... thanks ...
but i wish for some premade scripts like as convert to entity!! [easy peasy !!]
it's been ages since I've watched these unite la talks
yeah, that's not there
wait for few years and ask again
that being said, I think it was mentioned that there will be a culling system for hybrid renderer v2
well ... hybrid renderer 2 is just working on 2020.1.0b3 and URP 9.x ... that does not exists anyway :]
it does seem to run on b2 and latest github master
I dunno if there's some oddities still with that combo but at least it seems functional
but that doesn't mean it would have the full planned functionality yet
it's literally first preview
did you test that?? i don't think so ... based on their docs => https://docs.unity3d.com/Packages/com.unity.rendering.hybrid@0.4/manual/index.html
yes, I did test it
and I'm aware that docs state you need b3
I've tried it on b1 and b2
on b1 it was completely broken
b2 seems to work fine on my brief tests
I also only tested on HDRP from github master, no idea about URP
and this culling is automatically or need shit setup?? π
no idea if the culling is in yet
I'd doubt it
all in, there is a roadmap stream in 2 days
you'd think they'd say at least something about dots systems there
You asked and we listened! π
The first installment of our 2020 roadmap is coming to a device near you! π» Join us this Wednesday at 9 am PST for our Unity 2020: Core Engine & Creator Tools Roadmap session.
Subscribe to our YouTube channel to tune in: https://t.co/w2G3IiqVxK...
125
Kinda bummed about that, it seems like it's just going to be about general unity stuff. Much rather have some focused talks like they had planned originally
sure, I was hoping for at least separate dots talk
#ReleaseMikeActonTalk
Anyone have experience adding physics bodies to runtime entities?
and what about megacity demo subscene loader?? does exists separate script / method of that??
they deprecated some things that they used there
From what I remember that code monkey video does exactly what you want, he shows how to load subscenes based on camera position
it's not always that trivial in 3D though
if you have a top down game, sure it works
but it is that trivial in megacity π
nope π
yes
What do you mean?
but at this point, I'd just wait a bit
I mean, if you can see long distance, your streaming strategy will be different and you need to get LODs and culling involved
@zenith wyvern you mean create the body some time later after the game started instead of setting up the conversion at the start?
this is the whole code for streaming in Mega city cs var distanceSq = sceneData.BoundingVolume.DistanceSq(CameraPosition); if (distanceSq < MaxDistanceSquared) AddRequestList.Add(entity);π
you can't just stream subscenes in naive grid formation (unless your level design makes it possible)
@safe lintel Yeah, like is it just as simple as adding a physics body/rigidbody component or something?
@zenith wyvern yes
Sweet
well.. ideally you would want to have the collider blobs setup beforehand wouldnt you? not sure what the penalty of creating that stuff is during runtime vs doing it at the initial start
All my meshes will be unique in this case, so that's not an option
Mesh collider
ohπ€
I'll have to do some testing to see how simple it is
it is not cheap to make meshcollider at runtimeπ€
I know, unfortunately it's required. The terrain is dynamically generated and deformable. And I'm not smart enough to write my own physics engine
post the problem in the forums, the havok physics guys are pretty responsive. give em some new use cases to work on π
Yeah I might do that, this is my first time even touching the physics package so we'll see how that goes first
just precalculate every possible combination of meshes π
Galaxy brain solution
just render every frame your game will need before hand and play them back as a video
ez
I wonder how many frames that would actually be for simple games
Something like Tetris for example, how many combinations of frames π€
predict user's input and prerender nearest and most possible future? π
Here's a thing I don't understand about jobs
If I use jobHandle as a dependency, will that make my next jobs run after all my previous jobs were completed
Or will each job instance wait until previous job instance is completed?
wait until the jobhandle passed into them is marked as complete
Then first case?
second case
That sucks.
think of it as the thing while looping waiting on that job to be marked as .Complete()
this is why you want to make you jobs small, fast, and use the paralell versions so it can slice by number of cores
no, just the job chain you are calling it on
Well, duh
a sync point is where it calls CompleteAllJobs which is what calling most stuff delete/add in entitymanager does
In my case I need to wait until all entities are updated with first job, and then apply second job after that
How do I do that then?
thats what it does
joba = do stuff to entities
jobb = do stuff to more entities, maybe even the same as a .schedule(joba)
joba will be fully done before b starts running
Oh, then that's cool
And I thought waiting for all JobA's to complete is what is called a sync point
job chains are what you end up in more complex systems, where it might be somthing like
getsomedata
hashsomepoints.schedule(getsomedata)
finaljob.schedule(hashsomepoints)
no, forcing all jobs in the entire unity job system to come to a screeching halt is a sync point
not just your joba in that system, its all systems everywhere plus unity internal
Ooooh
Now that makes much more sense
I wish they said so right in the manual
Thanks for your explanations
np
Can I even run two jobs one after another a thousand times per frame?
So you want to schedule jobA then jobB, jobA, jobB, jobA etc etc?
Ye
And they all write to a buffer, which essentially is a NativeArray
Actually, I finally found an article page on that, so I may be figure that on my own
Btw, seems like I've previously spent half of my time learning ECS in manual for 0.1. Why the hell does it still pop up in Google as a first result for ECS manual? So mad at myself
0.8 manual is 10x better and easier than that
Always go to the version you're using
But yeah, I heard that they're going to roll out a new docs system for packages, so that might change it
As for scheduling your jobs, you can always do it in a for loop.
Although it might be better to combine those two jobs into one job if they're doing the same thing
Right now I have a node tree, made out of 2 entities. First node has a component OutputCD, and a second one also has a 1-element buffer, which grabs a value from first node. I have a ForEach loop, that goes through all those buffers and updates them. It is scheduled 1024 times per frame via a for loop. Currently system with this loop runs at 700 ms.
So, how do I improve performance at least 1000x fold? Can anyone please help?
In screenshot bellow I get allOutputs from outside of for-loop and then pass it into a function I call, as you've guessed it, 1024 times.
My non-ECS implementation would do this within 2 ms at most, so I'm puzzled with what I am doing wrong.
UPD: Looks like practically all this delay comes from simply creating Entities.ForEach loop.
1024 times per frame translates to 120 ms delay
Oh, you're calling the function that many times? But yeah, generally there's a performance problem with a lot of queries atm
The same happens if you have a lot of systems in your game (500+)
Well, I do need to fill up an array, which I then feed into audio thread
And I fill it up using output of a final node in my node system
Thus I need to update my node tree 1024 times per array
I am not sure if I can use DOTS for this purpose now if Enitites.ForEach is so expensive by itself
have you looked into NativeStream at all? It might help with this kind of task
Any insights on what may be causing these warnings? My project just includes an input system, and a movement system
@amber flicker You mean, for passing data between threads?
@dusty scarab Usually these are caused by a native collection, that you forgot to dispose of
I'm not using any native collections. Just 3 ComponentData's and 2 JobComponentSys, 1 which takes input and the other which moves a cube
Hard to tell without seeing code
Maybe you're not aware, that you are creating them
Idk
https://pastebin.com/cNm7Le2m
These are the two systems I'm using, the Movement System I haven't completely written yet
@frail seal it's A deterministic data streaming supporting parallel reading and parallel writing. Allows you to write different types or arrays into a single stream. - but actually I've just read some of the previous conversation and I'm quite confused about what you want to achieve. If you want to run jobA->jobB->jobA 1000x/second I would personally choose a different architecture. No matter how efficient the API, scheduling those tasks will be costly.
Perhaps instead of each node having its own job, you could have another dynamic buffer of node types that is iterated within a single job. Then depending on job type (enum switch maybe), a different static method is called. I don't know your problem well enough - just throwing out some ideas
@dusty scarab I've sometimes gotten that issue as a false positive, and also having it linger around between unity session (not sure if they've fixed that). If you restart Unity, does it reappear?
I'll check and get back to you @gentle osprey
Alternatively, I've also gotten it in situasjones where I've had jobs that have been running for a long time. These long running jobs would block other Unity jobs causing it to appear as if they had leaked memory, because they were allocating their memory with JobTempAlloc.
@amber flicker I run job over all nodes over and over 1024 times. They comprise their own "simulated world", output of which I feed into array I then send over to audio thread.
But I figured out how do I solve this problem while I was showering. I will just run ForEach once per node tree, where each node runs 1024 times their for loops. They use prerecorded inputs, and record outputs into a buffer, which will be used in next iteration.
This will introduce a delay though (each node separating a current node from the final one will make it late by ~20 ms)
So, yup, now I have a trade-off, where complexity of node tree increases delay of my audio feedback.
Coding is fun.
hmmmm
still making new demos with JobComponentSystem? why?
can I ask how you guys go about updating your entities package? Every time I try to update, I end up in dependency hell with stuff like this and I don't know where to look to work out which package versions are meant to be installed with which version of Entities.
I'm sure this is my fault, just looking for advice on how not to end up here π
it's not obvious that I've done anything wrong from this
@dull copper whats it about?
Right now I have a node tree, made out of 2 entities. First node has a component OutputCD, and a second one also has a 1-element buffer, which grabs a value from first node. I have a ForEach loop, that goes through all those buffers and updates them. It is scheduled 1024 times per frame via a for loop. Currently system with this loop runs at 700 ms.
So, how do I improve performance at least 1000x fold? Can anyone please help?
In screenshot bellow I getallOutputsfrom outside of for-loop and then pass it into a function I call, as you've guessed it, 1024 times.
@frail seal
If you want to benefit at all from jobs and burst you really need to restructure your data. The goal is to have your data laid out linearly in memory. Running 1024 different jobs that use ComponentDataFromEntity is bound to be horribly slow
I am already doing that
And ComponentDataFromEntity is smallest of my troubles
But thanks for your concern
(i'm not trying to sound like a dick, honestly)
If you were already doing that you wouldn't need to schedule 1024 separate jobs in a single frame
I will just run ForEach once per node tree, where each node runs 1024 times their for loops
In other words, I'll simply delay data transfer between nodes until the next frame. This will increase delay 1024x, but improve performance.
any advice on resolving missing directive errors when updating Unity.Entities?
@wary anchor Are all Entities' dependencies up to date?
Did you try deleting your library folder and restarting?
yeah just did that, no dice
What's the first exception you're getting?
Try checking if each dependency has it's dependencies up to date
Yeah I'd better double check that ^^
thought they were but I can't be sure I didn't miss any!
more pertinent, is how do you guys update normally, because I always seem to end up with huge chains of errors like this when switching package versions
Welp, I just checked dependencies and dependencies of dependencies
And was ready to go
Probably also checked dependencies of dependencies of dependencies
Not sure
Seems like UPM has gotten pretty bad at actually resolving dependencies lately, not sure why. But yeah just try to discern which package is causing the error from the exceptions and update it
I usually just click update for any that have an update sign next to them... and it works. Occasional Unity restart required. I realise there are many who are not so lucky. I think in particular if you're using Physics or netcode it can be more of a mess.
yeah, not using physics or the netcode, and my dependencies are all up to date, and those dependencies of dependencies. I think it could be that I'm missing an ASMDEF entry perhaps?
or maybe I have one that is now redundant or somethinglike that
Can you show us the entire message of your top error?
I tried adding properties and serialization but they didn't help
when I go into that script, or any of the several that populate those 199 messages, it appears that it's not picking up interfaces like this one:
I think that's from an out of date collections package
I think this is obvious but (general, not aimed at you RooBubba).. for the love of... don't have compile errors in your own code before upgrading π
(agree Timboc, yes it was a fully functional project!)
What version does your collections package say in UPM?
using collections preview.2-0.7.0
doesn't appear to be a newer version, but shouldn't that be a version 8 to match unity.entities?
Yeah that shoudl be right. What version of Unity?
I also find their versioning very confusing... like why write preview.8 before 0.5.2... but anyway
it's 2020.1.0b2
Oh actually I'm using entities 0.7. So yeah maybe try downgrading entities
Interesting.. I have similar dependencies to you but Properties 0.10.4-preview
I'll give that a shot too
weird.. you have later serialization, properties and one or two others I think...
do you update by editing the manifest? or do they just not appear as options for me?
I didn't edit the manifest.json
ooo we're down to just 9 errors and I'm not quite finished checking the same list as you posted
I think one of the things you have must require newer versions of packages and that's what's causing the issues? What is Properties UI? π And your Newtonsoft Json is 2.0 vs my 1.1.2 π€¨
@gentle osprey It seems this was a Unity session warning, went away after restarting
Good to hear :)
ooh are you on osx?
