#archived-dots

1 messages ยท Page 148 of 1

halcyon plume
#

now

#

now i trying to get target translation

#

to folow target

opaque ledge
#

you are setting CameraComponent's Target field right ?

tawdry tree
deft stump
#

^ that was I was about to link

opaque ledge
#

This is the 3rd or 4th time this link is shared for you Joker ๐Ÿ˜„

tawdry tree
#

They use ComponentDataFromEntity to make an entity follow anotehr one

cursive cosmos
#

I literally linked him that playlist earlier in this channel ๐Ÿ˜„

tawdry tree
#

to be fair, the previous links were the other videos in that series

#

But yeah, might wanna watch all of em, Joker.

opaque ledge
#

Its really hard for someone to teach DOTS basic over discord, so you better just watch every single video about DOTS on internet, i literally did

#

so you cant really 'learn' DOTS in this channel

cursive cosmos
#

the problem is finding the ones that are new.

opaque ledge
#

its much better if you watch those videos

#

only difference is JobComponentSystem to SystemBase from what i can see

#

you can even still use IJobForEach if you like, they arent removed yet

halcyon plume
#

The problem is that most of the video is just out of date

opaque ledge
#

i REALLY REALLY strongly urge you to watch CodeMonkey's videos

#

tell me a video that is out of date

#

i will 'translate' into current way

tawdry tree
#

The game Academy.school videos are vry recent, and should not be out of date

deft stump
#

@halcyon plume that video that was linked to you about chasers is not out of date. it's using systembase which is what you're using right now.

tawdry tree
#

If those methods do not work for you, you might be on an older version

opaque ledge
#

unless you are using videos from Entities 0.2 then you should be able to use it

#

you can still use the code from Entities 0.5

storm ravine
#
{
    private EndSimulationEntityCommandBufferSystem _endSimSystem;
    
    private struct Spawn : IJobFor
    {
        [ReadOnly] public int cols;
        [ReadOnly] public int rows;
        [ReadOnly] public Entity prefab;

        public EntityCommandBuffer.Concurrent ecb;
        
        public void Execute(int index)
        {
            var pos = new float2(index % cols, index / cols);
            var e = ecb.Instantiate(index, prefab);
            ecb.SetComponent(index, e, new Translation()
            {
                Value = new float3(
                                   pos.x,
                                   noise.cnoise(pos),
                                   pos.y
                                  )
            });
        }
    }
    
    protected override void OnCreate()
    {
        _endSimSystem = World.GetExistingSystem<EndSimulationEntityCommandBufferSystem>();
        RequireSingletonForUpdate<PrefabsMapSingleton>();
    }

    protected override void OnUpdate()
    {
        if (Input.GetKeyDown(KeyCode.S))
        {
            var ecb = _endSimSystem.CreateCommandBuffer().ToConcurrent();
            Dependency = new Spawn()
            {
                cols = 20,
                rows = 20,
                prefab = this.GetSingleton<PrefabsMapSingleton>().prefabsMap[TEST_UI.prefab],
                ecb  = ecb
            }.ScheduleParallel(20 * 20, 5, Dependency);
            _endSimSystem.AddJobHandleForProducer(Dependency);
        }
    }
}```
tawdry tree
#

eisenhorn, add cs or csharp right after the first triple backticks for code highlighting. you also need a linebreak right after, so:
```cs[NO WHITESPACE HERE]
(code)
```

opaque ledge
#

someone is hacking Hod's post ๐Ÿ‘€

tawdry tree
#

It no longer supports escaped backticks in a code bracket ๐Ÿ˜ฆ

storm ravine
#

I don't care it's just fast written for him to get idea he can copy in IDE if he want ๐Ÿ™‚

halcyon plume
tawdry tree
#

Fair nuff

#

joker, if you ware trying to post the error, consider switching to the console tab

opaque ledge
#

Yeah, so you are not allowed to have same type inside ForEach and GetComponent inside that ForEach

halcyon plume
#

ye this better

#

i need to get target translation but cant cuz i get camera translation in foreach

opaque ledge
#
ForEach((Entity entity, ref Data data)=>{
  var selfPosition = GetComponent<Translation>(entity);
  var targetPosition = GetComponent<Translation>(data.Target);
})
halcyon plume
#

not ref?

#

i mean Entity

opaque ledge
#

yeah not ref

tawdry tree
#

cannot use component access method GetComponentDataFromEntity with the same type 'Translation' that is used in lambda expression parameters

opaque ledge
#

it actually doesnt matter afaik

#

but i dont use any "ref" or "in" for Entity fields, you wont change it anyway

tawdry tree
#

Seems to me like you possibly have something like this:

ForEach((Entity entity, ref Translation translation1) => {
  //translation1 already exists
  //so it doesn't let you do this:
  var translation2 = GetComponent<Translation>(entity);
})
storm ravine
#

Potential memory aliasing, and safety system prevents you from that

#

I already told you

tawdry tree
#

TBH that message, while telling me something is wrong and that it doesn't like it doesn't help me

opaque ledge
#

true that

tawdry tree
#

I was trying to point out exactly what it was complaining about

storm ravine
#

This error pretty straight forward and clean. You can't do that safely as it's potential race condition - you have type with write access and trying to access same type from other entity to which other thread can write.

halcyon plume
#

not working

storm ravine
#

Joker, start from regular Unity ๐Ÿ™‚ DOTS to early for you ๐Ÿ™‚

#

It's just good advice, don't think is rude

halcyon plume
#

wow just fix it

#

no all fine

opaque ledge
#

Most of the people here learnt stuff from the hardway, bunch of trials and erros, many tears were shed, you gotta walk that as well ๐Ÿ˜„

storm ravine
#

I haven't tutorials and docs, as we developed on DOTS from beginning. And I'm not looking tutorials ๐Ÿ™‚

#

Source code is better tutorial

halcyon plume
#

I just have such a feature. I canโ€™t decide something and ask for advice. But before they give me the answer to the question, I myself decide. I donโ€™t know how it goes, and I'm a little ashamed of it. But sorry ill try DOTS

storm ravine
#

UnitTests is better tutorial

#

API is better tutorial ๐Ÿ™‚

deft stump
#

Books about DOD are also good tutorial

opaque ledge
#

too techincal tho ๐Ÿ˜„

halcyon plume
#

Forgot to do SetComponent)

storm ravine
#

Richard Fabian good for DOD understanding concepts

#

But not about how DOTS works

halcyon plume
#

Thanks guys who help me with a low start in Unity DOTS

storm ravine
#

BTW about DOD book. I haven't bought that

opaque ledge
#

you mean gifted to you ? ๐Ÿ˜„

deft stump
#

Wow what a sacc.
Given to you

opaque ledge
#

presenting is whole another level ๐Ÿ˜„

storm ravine
#

you mean gifted to you ? ๐Ÿ˜„
@opaque ledge yeah, English not my native

#

Forgot completely about 'gift' word

#

We laughed at this for a long time, because he could mean that we are good and this is a sign of appreciation and at the same time that we are so terrible that we should read this book ๐Ÿ˜„ But yeah it was first ๐Ÿ˜„

deft stump
#

presenting is whole another level ๐Ÿ˜„
Joachim sets up a powerpoint in eizen's bedroom.
"yo, lemme tell you why DOD is the shit"

opaque ledge
#

haha

halcyon plume
#

@storm ravine what is you native?

storm ravine
#

Russian

halcyon plume
#

ะฝัƒ ะฝะฐะบะพะฝะตั† ั‚ะพ)

storm ravine
#

In English

halcyon plume
#

yes)

#

so bye all. See you tomorrow with new questions)

#

ty

opaque ledge
#

^^

cursive cosmos
#

@storm ravine That actually makes a lit of sense.
So you use IJobFor and add the amount of units in the schedule instead of using loops and shit.

One thing I'm curious about though is the prefab, is it possible to fetch the prefab entity in some other way since I kind of have it already in entity form in another class (Used the convertToEntity component)?

winter onyx
#

Is there any reason a job will take longer to dequeue and execute on Android and iOS than on desktop or WebGL platforms?

#

when the job itself actually takes less than a frame's worth of time to execute

storm ravine
#

@storm ravine That actually makes a lit of sense.
So you use IJobFor and add the amount of units in the schedule instead of using loops and shit.

One thing I'm curious about though is the prefab, is it possible to fetch the prefab entity in some other way since I kind of have it already in entity form in another class (Used the convertToEntity component)?
@cursive cosmos I'm not using that ๐Ÿ™‚ Just wrote for you. Where you'll get params - up to you

winter onyx
#

in other words, does Unity schedule jobs on mobile devices in an idiosyncratic way

#

SpriteShapeController uses jobs internally to recreate its geometry, and for some reason it just updates itself less frequently on my Android and iOS devices than on other platforms

#

this is a new error, Sprite Shape v2 series did not exhibit this problem

#

this has to do with job scheduling

#

which is the main difference in the code

#

so I'm wondering if there's just a checkbox or preference I'm supposed to set

opaque ledge
#

mobile devices forces vsync, maybe thats why ? no idea

winter onyx
#

it's most obvious if I'm using sprite shape controller to draw a line between a point and the user's finger, for example, where you can see the line art is not being updated every frame, even if the points requested to be drawn are

#

no

#

it's not going to be that

#

it's got something to do with job scheduling which is why i'm asking the DOTS people here

opaque ledge
#

have you profile it ?

winter onyx
#

yes, there is no performance issue with the sprit eshape controller job itself

#

i'm asking if there's a reason that unity would delay running a job

#

for no good reason, basically

#

i'm sure they have a reason

#

but if there'sd something platform specific regarding when jobs run

opaque ledge
#

well, hope you find your answer

winter onyx
#

so no one knows how to just

#

force jobs to run

#

i get that there's JobHandle.ScheduleBatchedJobs or whatever

#

it's like the most basic feature of dots right? job scheduling

hollow sorrel
#

you're scheduling your job from ecs right?

winter onyx
#

sure

#

i have a JobHandle, i would like the code inside the job handle to run you know, after i call a line of code

#

.Complete is not it

hollow sorrel
#

a system always finishes the previous frame's job before scheduling new one so typically should be always every frame

#

did you set Dependency?

winter onyx
#

no

#

no dependencies

hollow sorrel
#

using SystemBase?

#

nvm i think Dependency isn't necessary anymore, been a while since i last used

#

only other thing i can think of is maybe you have an ordering issue

storm ravine
#

nvm i think Dependency isn't necessary anymore, been a while since i last used
@hollow sorrel Dependency always necessary if you scheduling, codegen track it for you in SystemBase ForEach, but for regular jobs in system you should track them by yourself.

hollow sorrel
#

yea i mean i'm assuming he's using ForEach

#

or maybe i misunderstood

#

@winter onyx if you're scheduling your own job you gotta do Dependency = muhjobhandle in the system because otherwise the system won't keep track of it

#

i.e. it won't force complete it next frame because it doesn't know that it's running

#

could complete 10 frames later if it's slow

opaque ledge
#

it sounds like platform issue tho, not really code

winter onyx
#

i didn't write this, unity did

#

for what it's worth

#

we're talking about SpriteShapeController

#

there's nothing wrong with the way they schedule jobs on sprite shape controller

#

the issue appears to be, pretty much unambiguously, that on mobile devices jobs are just not run as frequently as on desktop devices

#

there are two suspicious jobs-related calls on SpriteShapeController

        internal void BakeMeshForced()
        {
            if (spriteShapeRenderer != null)
            {
                var hasSplineChanged = HasSplineDataChanged();
                if (!spriteShapeRenderer.isVisible && hasSplineChanged)
                {
                    BakeMesh();
                    Rendering.CommandBuffer rc = new Rendering.CommandBuffer();
                    rc.GetTemporaryRT(0, 256, 256, 0);
                    rc.SetRenderTarget(0);
                    rc.DrawRenderer(spriteShapeRenderer, spriteShapeRenderer.sharedMaterial);
                    rc.ReleaseTemporaryRT(0);
                    Graphics.ExecuteCommandBuffer(rc);
                }
            }
        }

and

                var spriteShapeJob = new SpriteShapeGenerator() { m_Bounds = bounds, m_PosArray = posArray, m_Uv0Array = uv0Array, m_TanArray = tanArray, m_GeomArray = geomArray, m_IndexArray = indexArray, m_ColliderPoints = m_ColliderData };
                spriteShapeJob.Prepare(this, m_ActiveShapeParameters, maxArrayCount, shapePoints, shapeMetaData, m_AngleRangeInfoArray, m_EdgeSpriteArray, m_CornerSpriteArray);
                jobHandle = spriteShapeJob.Schedule();
                spriteShapeRenderer.Prepare(jobHandle, m_ActiveShapeParameters, m_SpriteArray);
                JobHandle.ScheduleBatchedJobs();
#

there are no dependencies or anything

hollow sorrel
#

oh it's monobehaviour stuff, i misunderstood mybad

winter onyx
#

i sort of just want to know, is there a method

#

anywhere, in the whole api

#

that just, forces the jobs to run now?

#

i get that the answer might be, no

#

i mean maybe there's something extremely buggy with android, and there's a job that runs instantly on the desktop that takes seconds on the android device

storm ravine
#

JobHandle.ScheduleBatchedJobs(); is forces the jobs to run

winter onyx
#

that exists for sure

#

the thing is, we sort of know that it doesn't do that

#

it just wakes the threads and says for them to check

#

it doesn't actually do it

#

so the answer is no

#

you can't do it

#

that's okay with me, i just wanted to make sure

storm ravine
#

It do it

#

Reason for delay also described by Unity

#

The job system intentionally delays job execution until you call ScheduleBatchedJobs manually because the cost of actually waking up worker threads can be expensive. Thus a good default is to delay the actual kick until a few jobs have been scheduled. Generally if you are scheduling a bunch of jobs in a loop, wait with kicking the jobs until the end of the loop. If you do significant amounts of work on the main thread between scheduling jobs, then it can make sense to ScheduleBatchedJobs between each job.

winter onyx
#

yeah

#

i mean who knows, we don't have the unity source, at the end of the day

#

we don't know when it actually does it

storm ravine
#

It does it at exact call

#

ScheduleBatchedJobs

winter onyx
#

maybe it's running the job on time on all devices, but this "execute command buffer" call is delayed on android

#

that's my only other hypothesis

#

that call is just obviously main-thread-synchronous

storm ravine
#

You should understand that - starting job execution not equal "all done"

#

For example you schedule first job and call it, and it start running it

#

and depends on many things (cpu, code complexity etc.) it will finish after 10 or 100 ticks (abstract)

#

If you not force it to complete right now

winter onyx
#
Jobs have a Run function that you can use in place of Schedule to immediately execute the job on the main thread. You can use this for debugging purposes.
#

this is what i think i was looking for

storm ravine
#

It's running on main thread

#

a bit different thing

#

only on one main thread

winter onyx
#

the job itself

#

is instantaneous

#

it finishes in microseconds

#

the spriteshape's job that it is scheduling

#

it doesn't have a performance issue there

#

granted, i do not know how ot profile the specific job

#

there is no result for "how to profile unity job"

hollow sorrel
#

shouldn't .complete do the same thing

storm ravine
#

ProfileMarker

winter onyx
#

it just doesn't

#

all that those interactions are doing

storm ravine
#

Complete does same thing for Parallel scheduled jobs

winter onyx
#

is asking, gently, for unity to schedule things

#

it doesn't actually force them to occur

#

job.Run forces it to occur

#

which is really an issue with the API

#

it's not anyone's fault

storm ravine
#

Uffff.. it DOES that's all.

hollow sorrel
#

.complete is synchronous afaik
code after it doesn't run until the code in the job is completed

#

it's not a suggestion

storm ravine
#

But complete on mainthreaded code will be overhead

winter onyx
#

that's true

storm ravine
#

because of schedule

winter onyx
#

but i'm not interested in just watching the screen freeze

#

for 4 seconds

#

do you see what i mean?

storm ravine
#

Run will do the same

winter onyx
#

we don't know if it freezes for 3.999s of sleeping, followed by 0.001s of actual job execution

storm ravine
#

it will stall main thread

winter onyx
#

no, what i'm saying is it won't

storm ravine
#

It DOES

winter onyx
#

there's only 0.001s of actual job execution

storm ravine
#

I told you difference

winter onyx
#

clearly on android it's sleeping the thread

#

do you see?

#

i don' tknow it doesn't matter, don't worry about it

#

and i don't know if unity devs hang out in this chat

#

i mean they'll understand exactly what the issue is

#

.Complete is just waiting for the task to complete, and gently asks the scheduler to "run it now", it does not force the scheduler to actually do it

#

there's a degenerative situation, which i can reproduce on android, where the scheduler is delaying the actual execution of the task

storm ravine
#

Main difference with Run is it not Job anymore technically (as you expect it) it become "method" on mainthread (and if it uses Burst it become bursted method)

winter onyx
#

when i say actually do it

#

i mean you just don't know how this works

#

which is fine

#

you could just say i don't know

#

it was helpful

storm ravine
#

.Complete is just waiting for the task to complete, and gently asks the scheduler to "run it now", it does not force the scheduler to actually do it
@winter onyx wrong

winter onyx
#

but the answer is using Run

storm ravine
#

Absolutely wrong

winter onyx
#

it's okay

#

this stuff isn't documented

#

i really don't want to have an argument

storm ravine
#

Complete FORCES all jobs in JH chain DO all work using every thing they can (main thread and worker threads if it parallel)

#

It become similar as calling code synchronous on main thread

#

same as Run

#

Difference in performance here only Schedule

winter onyx
#

Complete just has the main thread wait until the jobs are finished, and gently asks the scheduler to start jobs now

storm ravine
#

Not at all

winter onyx
#

the furthest i can see that Complete calls is

#
    [NativeMethod(IsFreeFunction = true)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void ScheduleBatchedJobsAndComplete(ref JobHandle job);
#

that's what it does

#

and i bet, i would be a lot of money, that if we looked at the unity engine source code

#

for what that concretely does

hollow sorrel
#

an answer from eiz on this might as well be same as getting an answer from a unity dev

#

dunno why you're dismissing it with "i don't know so neither do you"

winter onyx
#

it will look like

ask the scheduler to run all the jobs, possibly prioritizing the job i was passed

wait until the job i was passed is finished
#

the scheduler's internal code looks like

i have a bunch of threads with queues, they will sleep until they have work to do

tells those threads what to do using queues
#

and what i'm trying to say is

storm ravine
#

The JobSystem automatically prioritizes the job and any of its dependencies to run first in the queue, then attempts to execute the job itself on the thread which calls the Complete function.

winter onyx
#

that unity wrote something wrong in how the android scheduler works

#

yes

#

attempts being the operative word here

#

it doesn't execute the job

storm ravine
#

I personally discussed scheduling with DOTS team, and Complete behaviour (Complete itself) equal to Run. Overhead before complete is Schedule.

#

It does.

winter onyx
#

then i guess there's a regression in the unity code

#

then it's just a bug?

storm ravine
#

Show your setup

#

You suing SpriteShapeController?

winter onyx
#

yes we're talking about unity code

#

i don't even have control about when it calls its own job

#

it's just a bug in a package unity authored

#

and unfortunately the only way to get the source nowadays is in the PackageCache directory

#

i would loev to just

#

reference you the code

#

i mean i'm not braindead ๐Ÿ™‚

#

i mean clearly there's a regression

#

i just have diagnosed it already

#

i think .run is what i will need

#

i'm about to find out

cursive cosmos
#

I think I need to abandon the idea of converting game objects to entities, it's just causing me more headache than my codemade mesh cube x)

winter onyx
#

it's not 100% clear to me

#

how to actually IJobExtensions.Run a job handle yet...

opaque ledge
#

@cursive cosmos What seems to be problem

cursive cosmos
#

Nah, just having a hard time finding out how I send objects into systems that are not components, but complete entities.

#

Might have to do it the singleton way

winter onyx
#

my feeling is, just from looking at how the sprite shape controller is written, there is a bug in the job scheduler

#

in the most recent unity version

#

or that the meaning of the API has changed, between point versions

#

and you know, i just can't do unity's job for it

#

building an android application on combinations of sprite shape packages and unity editor versions

#

i would rathe rjust fix the bug

#

they won't do that either, they just won't

#

it's like the targeting arrow in my game right? and all of a sudden it just starts working crappily on mobile devices

#

i will credit you that .BakeMesh().Complete() fixed the issue ๐Ÿ™‚

storm ravine
#

how to actually IJobExtensions.Run a job handle yet...
@winter onyx you can't as JobHandle is result of scheduling, which not exists if you Run on main thread.

#

For JobHandle you only have Complete

winter onyx
#

i mean, i'm not supposed to do that

storm ravine
#

I told about your it's most obvious if I'm using sprite shape controller to draw a line between a point and the user's finger, for example, where you can see the line art is not being updated every frame, even if the points requested to be drawn are setup ๐Ÿ™‚ You getting sprite shape and moving spline points and call BakeMesh right?

winter onyx
#

you're not supposed to call bakemesh

#

the sprite shape knows when it has changed

#

the issue was the scheduler

#

i mean, clearly i would like to use a worker thread to render the mesh (the profiler puts it at 4ms, which still seems extremely high to me)

#

for two points

#

on android, the job scheduler just sleeps threads more

#

it's going to be that simple

#

i'm sure some unity engineer had a good reason for doing that

#

this was a regression, no code changed other than spriteshape and the unity editor

storm ravine
#

SpriteShapeGenerator itself is IJob which only use 1 thread and as you call complete on main thread it will use only main thread ๐Ÿ™‚

winter onyx
#

to be clear

#

listen i mean, did i write the sprite shape generator?

#

no

#

am i using it wrong? no

#

am i now doing something i'm not supposed to be doing? yes

#

does it fix my issue? yes

#

am i braindead? no

#

that's sort of what i wanted, i did want to do something that i wasn't doing before, that i know i'm not supposed to be doing

#

because i can't wait a week for Unity QA to tell me to install the latest version of the editor and try again

storm ravine
#

Write your own

#

That's all

winter onyx
#

yeah i think that's the moral of the story

opaque ledge
#

๐Ÿ˜„

storm ravine
#

If you don't wan't to wait ๐Ÿ˜‰

winter onyx
#

i mean if there was a way to freeze the package version

#

there isn't

#

it just upgrades for you

storm ravine
#

We wrote own everything ๐Ÿ™‚

#

Move it to Packages folder

winter onyx
#

yeah, this sort of confirms people's beliefs

storm ravine
#

from library

hollow sorrel
#

job scheduler having a bug is completely different from spriteshape generator having a bug tho

storm ravine
#

and it become local package

winter onyx
#

the popular opinion, years on, is that this stuff is garbage

#

the job scheduler definitely has a bug

hollow sorrel
#

you could be right that job scheduler has a bug but it's a big claim because a lot of people are using it including on android and haven't reported same
you could be first to have these specific circumstances that trigger it but i'd be more inclined to think spriteshapegenerator or use thereof is the issue

#

i mean

winter onyx
#

no dude

hollow sorrel
#

job scheduler has existed even before ecs

winter onyx
#

there are maybe a handful of people using it on mobile devices

#

at any scale

#

and also have the ability to understand what's going on

opaque ledge
#

imo you should tone it down a little, you should relax, if you think its a bug go report it

winter onyx
#

i think the scheduler was actualyl correct until very very recently

#

this is a new bug

#

yeah don't get me wrong you guys don't work for unity

#

this is for them not for you

#

it's infuriating to say the least

storm ravine
#

For them use bug reporter, then it will be in their field of view ๐Ÿ™‚

opaque ledge
#

hope i wont encounter any problem when i build my game for Android ๐Ÿ˜…

storm ravine
#

In addition I can write them directly

#

But bug reporter also handful thing

cursive cosmos
#

Anyone who can punt me in the right direction regarding sending variables from other classes into a SystemBase class?
Or is that maybe nothing I should be doing in the first place? ^^;

opaque ledge
#

SharedStatics perhaps, you can also make a singleton MB

winter onyx
#

the bug reporter doesn't even upload projects correctly on macos

#

and i have a fiber connection

#

to put in perspective

#

like obviously i care

#

i want it to be good

storm ravine
#

Anyone who can punt me in the right direction regarding sending variables from other classes into a SystemBase class?
Or is that maybe nothing I should be doing in the first place? ^^;
@cursive cosmos Depends on many thing. Mutable\immutable data?

hollow sorrel
#

submit a bug about that nervous

winter onyx
#

i've reported a bug about spriteshape before, funny enough, related to the jobs

#

and it got fixed

#

yeah exactly ๐Ÿ™‚

#

but it took 20 days

#

it was a lot of back and forth about update to the latest editor version

#

which by the time i did that, well, there was yet another version

cursive cosmos
#

@storm ravine It's a gameobject that has been converted to an entity and will serve as the type of object I will spawn. So basically just an Entity with components

winter onyx
#

when the QA person actually got around to check

#

you know?

#

and their script just says, make sure they're using the latest editor version, in a product that constantly has regressions

#

in comparison, the unreal source code is just open, i suppose you can go and fix it, i mean it's equally riddled with bugs and there's just no support whatsoever, you need to poach Epic Games employees

#

so it's not like there's a 100% better alternative

storm ravine
#

Anyone who can punt me in the right direction regarding sending variables from other classes into a SystemBase class?
Or is that maybe nothing I should be doing in the first place? ^^;
@cursive cosmos you can do SharedStatic, you can have entity which will hold data itself (class\struct ICD)

cursive cosmos
#

Cool, will check it out.

storm ravine
#

For example you'll have singleton entity which hold your prefab entity and use that singleton entity in systems

cursive cosmos
#

oh, the prefab is fully converted to an entity, so I don't think it's necessary to make a container for it, no?

storm ravine
#

Yep

#

If only one prefab

#

it will already behave as singleton

winter onyx
#

listen big thanks though you did fix it

#

.Complete worked

#

i won't argue with results ๐Ÿ™‚

storm ravine
#

๐Ÿ‘

#

Also about performance

#

Did burst enabled?

winter onyx
#

lemme check

storm ravine
#

as sprite generator job wraps Burst attribute to preproc define

#

I'm not using that package then don't know if it has dedicated checkbox for burst in sprite shape generator

#

Which will enable define

winter onyx
#

yeah

#

i guess i was doing a development build anyway

storm ravine
#

in development build what timeline shows?

#

has (Burst) after job name?

winter onyx
#

installing the Jobs package imports Newtonsoft Json ๐Ÿ˜ฟ

storm ravine
#

Yep newtonsoft dependencies which appears\disappears between versions annoying

#

Why Jobs package?

#

You don't need Jobs package afaik

#

as it uses UnityEngine jobs

#

Jobs package only contains couple of additional Job types

winter onyx
#

no it does not say burst

#

but right now i don't see the job it schedules at all

#

probably because i'm using complete now?

#

i mean it's not running on any of the workers

#

i see physx jobs

#

which are also not burst

storm ravine
#

yep

#

Remove complete

#

for tests

#

OR

#

open burst inspector

#

Is it greyed out for you?

winter onyx
#

first i must fix the newtonsoft thing

#

if i want that inspector ๐Ÿ™‚

storm ravine
#

Burst package not require newtonsoft, It only install math lib itself

cursive cosmos
#

is sharedStatic basically a global variable in a way?

winter onyx
#

ah i installed the wrong package

#

one sec

opaque ledge
#

yup something like that

storm ravine
#

Why Jobs package?

You don't need Jobs package afaik
๐Ÿ™‚

#

After installing burst restart editor

winter onyx
#

i meant that it says it does not say burst

#

sorry

#

it's spinning

storm ravine
#

After installing restart ๐Ÿ™‚ It's required ๐Ÿ™‚

winter onyx
#

gochtya

storm ravine
#

As it will throw you errors after installing which will disappear after restart

#

is sharedStatic basically a global variable in a way?
@cursive cosmos it like regular C# static fields with some restrictions for Burst

humble falcon
#

@cursive cosmos if you have problem regarding instantiating entity. Maybe the ECS Samples from Unity is worth to look at ๐Ÿ™‚

winter onyx
#

okay i'm oing to try running without .Complete and regular (not development) build on android

#

see how it goes

#

it looks like it burst compiled

storm ravine
#

Just check in editor first

#

as with burst it now can be veeeeeery tiny and hard to find on timeline ๐Ÿ™‚

cursive cosmos
#

Nah, instantiating an entity was not confusing, it was how the system works and How I can transfer over data from normal mono classes to systemBase classes :)

But does this mean that if I try to do this with sharedstatics, is there a risk that the system job will run before the static is set?

storm ravine
#

this part specifically It is recommended to always initialize the shared static field in C# from a static constructor before accessing it from HPC#. Not initializing the data before accessing it can lead to an undefined initialization state.

cursive cosmos
#

yep, just read that ^^;

#

So then is the question, does system jobs start running before a mono OnStart method?

#

Probably not.

winter onyx
#

lol

#

yes you're right

#

it's very tiny

#

it was 0.008ms

#

SpriteShapeGenerator (Burst)

storm ravine
#

Yes now it burst compiled

winter onyx
#

in Worker 14 of 32

storm ravine
#

Without complete

#

With complete it will be similar

#

maybe a bit longer like 0.01ms

#

Which will be fine now? In comparison with 4ms?

winter onyx
#

yeah without complete

#

i am compiling for the device now

#

once build without profiler one with

#

development build unchecked

storm ravine
#

Use release build

winter onyx
#

yeah that's what i mean

storm ravine
#

as dev build (same as editor) has safety checks overhead

winter onyx
#

i unchecked safety checks

#

f those am i right

storm ravine
#

it will x5-10 faster than now

opaque ledge
#

I meant to ask Eizen, how is blobassets represented in chunks exactly ? when we build a blob and put into a component every component will 'reference' to a single place which holds the value, but where does that value live exactly ?

storm ravine
#

Yes if you unchecked it will be similar to build by performance (but not completely, release build will always be faster)

winter onyx
#

i'm going to go make a coffee while this compiles

storm ravine
#

Blobs is preallocated 200mb per scene.

winter onyx
#

this has been very helpful thank you

storm ravine
#

When you use blobs you store just ptr to memory address

#

this is why blobs use many ref structures

opaque ledge
#

per scene ? you mean per world ?

storm ravine
#

for preventing of getting wrong pointer

#

per scene

opaque ledge
#

so how the process works then, will it be a cache miss just to retrieve that value ? or Unity will prefatch that value first and then run process ForEach ?

#

Eizen be like "how do i explain this in a way that a scrub can understand"

#

i am not really into details, but was just wondering, since whole idea of ECS is to be able to have all the data you need in a cache line or smth right ?

storm ravine
#

No I just trying to find conversation in Unity slack or on forum, where I described that couple of times long time ago

opaque ledge
#

ah okay fair

storm ravine
#

Well can't find that, will explain it shortly

#

Or send you to source code of Blob.cs ๐Ÿ˜„

#

As it's not so short to explain

opaque ledge
#

eh dw about it then ๐Ÿ˜„

#

like i said, i am not really into details, but was just wondering since it would be a cache line miss or smth

storm ravine
#

It mostly unmanaged memory

#

they store data in blobs as batches

#

Look at BlobAssetBatch

vagrant surge
#

@opaque ledge accessing stuff from a blob is likely to be in cache, because you likely are accessing the same blob a lot from a query

#

dont worry about every single cache miss lol

storm ravine
#

yeah vblanco tl;dr valid ๐Ÿ˜„

vagrant surge
#

unity does N cache misses where N is number of comps in your query per-chunk

storm ravine
#

I'm just empty at the end of a day ๐Ÿ™‚

winter onyx
#

lol

#

okay without .Complete the bug comes back

#

with burst turned on

#

so i sort of just need .Complete

storm ravine
#

Yes

winter onyx
#

so i will redo it now with .complete

#

hopefully it just won't be 4ms

#

to draw a line

#

my feeling is burst will help

storm ravine
#

As it will give you immediate result for current frame and renderer will handle that changes and will render exact state in current frame and not from previous frame, but now with burst it will be very small

winter onyx
#

yeah

#

alright i'm going to make myself another coffee

#

it works much better

#

you did it, you're today's hero

#

no

#

hero of the year

storm ravine
#

[Writes in a notebook] +1, now it's 2345 year when I'll end as a hero...

#

joke

winter onyx
#

lol

cursive cosmos
#

Oh god, finally made it to work

#

Now let's see how big I can make it until I break my instance of unity.

#

Thanks for the help guys, next up I need to figure out the whole extra axis and the cave system and such like that...

opaque ledge
#

gl^^

#

ECS is lots of fun, especailly when you see stuff working ๐Ÿ˜„

scenic oracle
#

Is there any tutorial/samples for DSPgraph & co ?
I want to start adding sound to my ECS game, but I can't find much about it (nor even where to get the package) ?

opaque ledge
#

DSPGraph is pretty low level audio, you can still add class IComponentData on your entities and make systems that queries for it and run audio that you put into that component data, however you have to run the system with .WithoutBurst().Run() so on main thread without burst

safe lintel
#

some people have posted some snippets of stuff in the forum thread for it, could also look at the tests folder for the package.

turbid sundial
#

Looking for any literature around proc gen for terrains in DOTS. I haven't touched DOTS in over a year hoping for it to have matured a lot and most of it's left my brain already, breaking terrain into components I can see a few that stand out (as an example)

  • TerrainData (perlin noise values, erosion math, other features)
  • TerrainMesh (building verts and tris)
  • TerrainTexture (building a texture based on things like TerrainData's height and features)

Is it preferable to have a single System looping over and running each of those jobs, or 3 systems running each in sequence? These systems won't actually do a whole lot when the game is running besides cull / instantiate new terrain chunks...

Does this design seem reasonable? Am I way off?

#

Is DOTS even perhaps overkill for this kind of thing? ๐Ÿ™‚

cursive cosmos
#

I mean, from what I have seen so far, I think most 3D games that are non-instanced (like open world) for sure should use DOTS. The difference is massive in performance. I also am growing very fond of how entities work and now when I got the "convert gameobject to entity" pattern down, it makes it pretty easy to make different kinda voxels.

I'm still nowhere near in making the terrain like Trove or Cube World. But I want to get there and I am also looking for reading material for voxel worlds. ๐Ÿ˜„

turbid sundial
cursive cosmos
#

yeah sorry, can't help you there, don't even know what that means.

turbid sundial
#

Floating origin is when the world is "reset" to 0,0 when you move too far away from the "origin" point. An issue happens with floating point precision when you get into large distances (e.g. 100,000 units away) because a float can only contain a fixed length. Floating origin is the process of moving the entire game world back to 0,0 when you get too far to stop those issues from happening

#

(In Unreal it's called World Origin Rebasing)

cursive cosmos
#

But why would you need it to reset the origin?

turbid sundial
#

because the larger a float gets, the less precision it can have
a really simplified example:

let's say a float can only contain 8 numbers, you can have

x: 1.0000000 - which means floats can have 7 decimals worth of precision, but you can only have 8 numbers, so when you get to
X: 1000000.0 - it can only have 1 point of precision

as a result, things like animations and movement become "jittery"

cursive cosmos
#

And by saying float you mean the coordinates, or?

turbid sundial
#

yeah, unity uses floats (the primitive type) for it's coordinate system

#

I think Unity uses 32bit floats

cursive cosmos
#

huh, interesting, never thought of that problem, I mean, then you need a system that remembers the location for each entity...It would be pretty bad if your home coordinates reset...

turbid sundial
cursive cosmos
#

interesting, would need to research this though.

#

I mean, I have barely understood how I should limit rendering.

#

So this is far off for me xD

turbid sundial
#

I think if you're making any large-scale world (not just procedural), you have to consider floating origin - so it's something to remember

cursive cosmos
#

for sure.

hollow sorrel
#

@turbid sundial should be easy in DOTS
could just apply an offset to every Translation component same as you would normally, except ecs already allows you to easily fetch every Translation in the world

#

also with DOTS you actually have the ability to go with double precision if you want that, unlike normal unity

#

would prob go for origin shifting before considering that but still it's an option

turbid sundial
#

Yeah I think there are some basic ways to approach it, but there are a lot of considerations

#

for example if you're not pure ECS, you'll have to match your shifting in both "worlds" (systems?)

#

and depending on how many entities you have, you probably want to put them all on the main thread so they all get shifted at the same time (and the world doesn't "stream" back)

#

not hard, but just some things to consider - I was mainly looking at Joachim's comment that they'd add new APIs to make floating origin easier.. assuming that hasn't progressed?

hollow sorrel
#

yeah it's not built in already, dunno bout progress

#

what do you mean with world doesn't stream back?

#

oh because ecs and gameobject world

turbid sundial
#

yeah, you'd want to make sure the shift all happens at the same time

#

one way to do that would be to use the separate worlds in ECS

#

ie. process the shift in world 2 in the background

hollow sorrel
#

yea true it's a bit tricky if you're managing positions in both gameobject world and ecs world

#

if i were doing that i'd prob have an entity copy of every gameobject and make ecs world in charge of updating positions and sync it back to the gameobjects at end
so it'd be like
a monobehaviour wants to move -> add ecs moverequest component in ecs world or something similar -> when ecs runs, add moverequest to position -> end of ecs update, sync positions back to gameobject transforms

#

or something like that

#

dunno if there's pitfalls i'm missing here

#

so then ecs world can change translations and origin shift at will because the gameobject world is never directly manipulating positions

deft stump
#

if I want to spawn stuff with ecb.
am I right to get the beginsimulationcommandbuffersystem?
or get get the endsimulation one?

halcyon plume
#

You can spawn directly in manager

deft stump
#

You can spawn directly in manager.
??? you can't use entity manager in a job though

turbid sundial
#

You can use the command buffer, read the link he sent you

#

The first paragraph

The EntityCommandBuffer (ECB) class solves two important problems:

When you're in a job, you can't access the EntityManager.
deft stump
#

I read the link. I'm using ecb.
I'm asking which ecb system should I use in spawning entities?
is it right that i use BeginSimulationEntityCommandBufferSystem instead of EndSimulationEntityCommandBufferSystem ?

tawdry tree
#

Well, what are your needs?

#

If you want the entity to do anything this frame, spawn it in begin, otherwise it might be that you want end

halcyon plume
#

??? you can't use entity manager in a job though
@deft stump i mean not in job. If you need to do it in job just ECB

#

@tawdry tree i have questions about new input system. I make android game. How i can send walues from virtual joystic in input system?

tawdry tree
halcyon plume
#

ty

halcyon plume
#

now i have problem with dots

#

i need instance of input system and send it to my ECS InputSystem

#

How i can do it?

opaque ledge
#

How i use new input system is.. OnCreate method i create a instance of my input system script and enable necessary controllers and do bindings etc, then in OnUpdate method i read these input controllers and if controller is being pressed i schedule the job to move my player, if not i dont

halcyon plume
#

how you get value?

#

Or what bindings do you use?

opaque ledge
#

have you ever use new input system before ?

halcyon plume
#

no. But i undestand how to use it in monoBehavior. Just subscribe on events and do actions like move etc

#

but dont undastand how to use in ECS

#

I could use some kind of buffer and write to it on an event

#

I just donโ€™t think that calling Entities ForEach during the event will be correct

opaque ledge
#

think of Systems like singleton Monobehaviours, OnCreate is Start method of a Monobehaviour

halcyon plume
#

i create it and its work

#

btw how to use it in forEach

opaque ledge
#

yeah thats it basically

#

OnUpdate runs every frame, check your controller's values in OnUpdate

#

if a button is pressed then schedule a job that moves your player

#

if not, dont schedule it

halcyon plume
#

like this?

#

but unity said this

#

I think the best decision would be to make Singeltone

opaque ledge
#

thats not how you read a value from a controller

#

check their manual or watch some tutorials on how to do it

halcyon plume
#

But not sure if it will give access there

opaque ledge
#

you read the value of a controller OUTSIDE of ForEach

halcyon plume
#

ye

#

i forgot about that

#

ty

#

and yes it works)

#

cuz

#

this type is Vector2d

#

There is a question about input from Android

#

The documentation says nothing about it

undone torrent
#

is there a way to know when a ecb finish creating entities cause it is taking lot of time to show in the entity debugger

spark glade
#

like a callback or for profiling?

opaque ledge
#

have you checked profiler hiearchy mode ? there should be a marker for it afaik

deft stump
#

lemme share a system I made for the new input system.
sadly it's not burstable code.

mystic mountain
#

Anyone could point out why this wouldn't work? (DOTS Physics)
https://pastebin.com/at9GK37P
This is in a ITriggerEventsJob, trying to find the point of contact between a projectile and a object (that might have a shield(trigger), hence have two colliders on same entity).
The code enters only the raycast when the projectile is hitting the base ground. I've added some padding to the raycast start end to see if there were some error.

halcyon plume
#

wow i done this

#

if someone need

#

just place script On-Screen and it will work

#

dont forget to set path

mystic mountain
#

Continue on my problem, not really sure what is going wrong here. I've changed to now cast the colliders against each other, and still no hit .. (full job in this one with some debug trash)
https://pastebin.com/wFNKLiYn

halcyon plume
#

11:00

plain cloak
#

is entities 1.0 will be released with unity 2020.1?

storm ravine
#

In 2020.1 cycle according to roadmap.

plain cloak
#

hmm

#

do you know when 2020.1 will be out? I thought it was 2020 spring

deft stump
#

it's already in beta so... maybe a few more months

deft stump
#

wait what... so currently the unity physics package isn't compatible with ecs 0.11

#

the curse of being on the bleeding edge ribbleeding

opaque ledge
#

is it not ? ๐Ÿ‘€

deft stump
#

oh okay i take it back ribbleeding

#

I just need to update the other dependencies

halcyon plume
#

Does it make sense to use DOTS for simple games?

deft stump
#

imo, yes.

mint iron
#

yea i think so, simple games can end up being pretty complex, once you fill out all the finishing touches.

deft stump
#

btw, how do I check if an entity is out of view from the camera?

halcyon plume
#

get camra translation and object translation. calc distanse. compare

opaque ledge
#

i have a script that do that @deft stump

#

actually i found on web, i should share that

deft stump
#

ara. send!

opaque ledge
#

give me a few

#

i changed some code for my use case

undone torrent
#

how can i get an localtoworldcomponent having a gameobject ?

#

a*

dull copper
#

is entities 1.0 will be released with unity 2020.1?
@plain cloak doesn't mean they release it exactly same time, or even it'll happen for 2020.1

full epoch
#

Is possible to have 1 object in perspective projection and 2nd in orthographic projection for the same Camera?

dull copper
#

these roadmap targets more often shift than stick

#

we're lucky if we even get entities 1.0 this year IMO

plain cloak
#

@dull copper i see

dull copper
#

that being said, 1.0 doesn't really mean much will change

#

rest of the DOTS ecosystem will not be production ready in years

#

so having core of it "released" doesn't make the full package feasible in production

#

Entities package itself is pretty solid already

plain cloak
#

what do you mean by "not production ready"

dull copper
#

quite literally that

plain cloak
#

i thought you could use dots stack even now

#

for production

dull copper
#

oh god no

#

only entities, burst and job system are somewhat solid now

#

rest is still experimental

plain cloak
#

you could always go hybrid in places where it lacks, no?

dull copper
#

hybrid renderer is flaky atm, dots physics doesn't evolve much and feels like is on some limbo, dots netcode got pushed yet another year (so they suggest it to be production ready only at some point next year - and will probably shift again), only unity knows how to use dots animation...

#

it's not realistic to expect full dots stack to be production ready this year at all, Unity officially targets 2022

#

and you gotta put year or two extra to that estimate

plain cloak
#

true

#

in my current project, i use dots for all the calculation and state/gameplay stuff and use regular gameobjects to render, animate etc.

#

its a bit hacky but it works for now, was just wondering when i can go fully dots

#

but i guess that won't be here for a while

dull copper
#

that's the safest setup atm

opaque ledge
#

you cant go full dots right now

#

but if you know how to setup hybrid components then you can do everything that you can do with Monobehaviours

#

ui/audio/animation/Addressables etc.

#

by hybrid components i mean basically adding class IComponentData or AddComponentObject, and write systems that that queries for those

plain cloak
#

i haven't used HybridComponents, is there any documentation on those or is it in development stage. I took a break for couple months so haven't caught up to all the updates yet

opaque ledge
#

one of the unity staff said HybridComponents were meant for internal usage not for developers, but i guess it could be useable, idk, never tried

#

there was an example of it in ECSSampels

plain cloak
#

cool, thanks

dull copper
#

I wouldn't invest heavily on that hybridcomponent atm

#

there's no guarantees it'll even stay around

#

workflows with experimental things are always subject to change

storm ravine
#

Well, I could insert my 2 cents about the use in production and what is possible / impossible, pure DOTS / hybrid, you know... but I will probably keep silent ๐Ÿ˜„ wlgDeer

plain cloak
#

@storm ravine i have read your thread on forums, your game looks great ๐Ÿ˜„ great job. And to use DOTS at the time you started.. It was one of the things that lead me to use dots aswell ๐Ÿ‘

storm ravine
#

I'm afraid to imagine how many people started using DOTS after the example of our game and how many people now curse me after everything turned out to be not easy for them ๐Ÿ˜„

plain cloak
#

true lol ๐Ÿ˜„

cursive cosmos
#

oooh, what kinda game are you making @storm ravine ?

storm ravine
#

Go to DOTS forum you'll see my pinned thread

cursive cosmos
#

DOTS has it's own forum O.o

deft stump
#

it has

storm ravine
#

of course

#

From the beginning

cursive cosmos
#

Oh, inside the unity forum, got it

#

Moonlight mouse?

storm ravine
#

Yes

cursive cosmos
#

A city builder must be a really good way to use DOTS I can imagine...

#

Dang, Diplomacy is Not an Option gives me a lot of zombie defense vibes...what is that game called again...

opaque ledge
#

they are billions ?

cursive cosmos
#

yes!

opaque ledge
#

๐Ÿ˜„

cursive cosmos
#

Fun take on it though, I prefer fighting these guys

storm ravine
#

Yes, TAB, Stronghold, Settlers - you'll see some similarities with them.

cursive cosmos
#

TAB's can get really messy towards the end though, how big can the town grow in Diplomacy?

storm ravine
#

Well in sandbox mode you'll be limited only by map size

cursive cosmos
#

oof

#

"and the map is procedurally generated".
I am certain it's not, but that would be a fun follow-up

halcyon plume
#

gusy how to MeshFilter as struct?

cursive cosmos
#

You mean add a mesh to a entity?

storm ravine
#

"and the map is procedurally generated".
I am certain it's not, but that would be a fun follow-up
@cursive cosmos ?

cursive cosmos
#

as in procedural + "endless" ^^;

#

Really annoying to type with a blister on my index finger btw, assembled too many things yesterday.

halcyon plume
#

i mean work with mesh filter in for each loop

#

i havent this

storm ravine
#

Well map itself procedural, but not infinite, you have static 1000x1000 area (just now, in game campaign it will be variable, in sandbox you can change size from predefined sizes like 400x400 800x800 1000x1000 etc)

cursive cosmos
#

That's cool though, looking forward to having some gameplay in my map....just need to manage to even make a map first..

#

I'm more of a 2D person, going into 3D and making DOTS on top of that might have been a big first step.

storm ravine
cursive cosmos
#

Anyone know any good resources for the theory behind terrain building with voxels? Gonna try searching for some nice reading material today.

#

preferably cube spawning, like trove

#

I'm bracing myself for a lot of math...

storm ravine
#

Marching Cube for generation process itself, about world pattern - multi-octave perlin noise

cursive cosmos
#

Alright...Some good search words at least, need to write these down, also saw something about erosion noise or something, don't know what that means yet

#

erosion math? well something along those lines

storm ravine
#

erosion noise is a step after initial generation and for minecraft style, it not so suitable

cursive cosmos
#

Oh, what does it actually cause?

#

It sounded like it makes the caves and such because of the whole erosion part, but that might also mean just holes I guess..

storm ravine
cursive cosmos
#

Oh, so it's more for flat meshes?

storm ravine
cursive cosmos
#

So that is not usable for voxel blocks?

halcyon plume
storm ravine
#

Erosion is about water, wind, etc affecting land through time

halcyon plume
#

why this is class? and where is my struct

cursive cosmos
#

Oh, okay.

storm ravine
halcyon plume
#

how to simulate water waves in ecs? i have an WaterComponent and WaterSimulationSystem. But unity dont allow to change mesh

zinc plinth
#

@halcyon plume use shaders, do not change the mesh on each frame

halcyon plume
#

@zinc plinth ehhh. Soo i go to teach shaders

zinc plinth
halcyon plume
#

wow ty

zinc plinth
#

np, love her channel

halcyon plume
#

5h (

#

The night will be productive

undone torrent
#

renderbounds components take data from getComponent<render>().bounds or from mesh; i mean cause there is a component call worldrenderbounds

#

thanks

halcyon plume
opaque ledge
#

it wants love and attention โค๏ธ

undone torrent
#

lol hahaha , sorry about laughing

zinc plinth
undone torrent
#

could u take a look at my question above please ๐Ÿ™‚

#

i dont know about shaders sorry man

halcyon plume
#

oh i forgot about other chanels)

opaque ledge
#

"renderbounds components take data from getComponent<render>().bounds or from mesh; i mean cause there is a component call worldrenderbounds" What is the question exactly ?

undone torrent
#

i need the a component that store meshrenderer bounds , i tried to use worldrenderbounds but the AABB it generates it always axis-align to world so i thought about using localtoworld component and mesh bound on local so i read there is a component called RenderBounds but i dont know if the data i should give to generate it must be take from getComponent<render>().bounds or mesh

#

i think i have to improve my writing
the thing is that i need to get an local axis align AABB to be saved on components

#

i really apreciate if u could give me some advise with that ๐Ÿ˜‰

opaque ledge
#

hmm, never tried that so i dont know ๐Ÿ˜ฆ

#

but there must be a way to convert world AABB to local AABB ?

undone torrent
#

yeah probably but this is not exactly the matter i have, it is more that i doubt if i have to use the bounds of the render or mesh cause one comes on world and the other on local

opaque ledge
#

tbh, sounds like you should use mesh bounds, because render bounds depend on camera right ? but yeah i dont know really, sorry

#

in API you can find what is the difference afaik

storm ravine
#

For RenderBounds you should use mesh.bounds

undone torrent
#

i just solve it , finally i have to use mesh one; thanks for the help anyway , i hope i could help u in the future cause u are always helping me i really want to know enought for helping

#

yeah man

storm ravine
#

All other bounds will be generated automatically from this and required matrices, as World and Chunks bounds

undone torrent
#

i tried the two ways and checking data i get the conclusion

#

thanks for all the helping u give here , its amazing

#

one more thing, when i use localtoworld.forward and that it just return the vector on global . I know it is a stupid question

storm ravine
#

I don't see a question in your sentence PoliteCat

deft stump
#
protected override void OnUpdate()
{
    Entities
        .WithoutBurst()
        .ForEach((in PlayerTag player, in BulletTag bullet) =>
        {
            TriggerEvent trigger = new TriggerEvent();

            Entity ea = trigger.Entities.EntityA;
            Entity eb = trigger.Entities.EntityB;

            Debug.Log("entity A: " + ea.ToString() + " entity B: " + eb.ToString());

        }).Run();
}
#

am I doing this right?

#

context: I'm trying to make triggers work with dots physics. for now I just want a log to pop up.

#

okay whuuuuut. this system isnt being run... (debugging)

opaque ledge
#

haha no ๐Ÿ˜„

#

give me a sec

deft stump
#

AH shit

#

I put BulletTag as part of the query. wth.

opaque ledge
#

You need special job structs for trigger and collision events

deft stump
#

You need special job structs for trigger and collision events
great. so I can't magically do it in entities.foreach

opaque ledge
#
public struct ShotTriggerJob : ITriggerEventsJob
{
  public void Execute(TriggerEvent triggerEvent){
    //Confirm triggerEvent entities is the entities you want
    //if its is then do logic, otherwise return
  }
}
protected override void OnUpdate(){
     var simulation = stepPhysicsWorld.Simulation;
     var physicsWorld = buildPhysicsWorld.PhysicsWorld;

    Dependency = new ShotTriggerJob{}.Schedule(simulation, ref physicsWorld, Dependency);
}
deft stump
#

oh thanks, curly

undone torrent
#

why i cannot multiply a float 4 * float4x4 ???

#

or in the other order

deft stump
#

float4x4 is basically a table of float4's (4 float4's)
float4 is x, y, z and w

undone torrent
#

so how can apply a matrix to a vector ?

amber flicker
#

math.mul()

undone torrent
#

thx

#

works ๐Ÿ™‚ , i am happy right now

scarlet inlet
#

Hello dear dots user!

#

do you have a clue about how to dispose a NativeList that must be used in a job?

#

it's annoying me so much

opaque ledge
#

list.Dispose(jobHandle)

scarlet inlet
#

ah

#

๐Ÿ˜„

#

thanks

turbid sundial
#

https://i.imgur.com/63US2Wu.gif

So this is strange to me. I generated a mesh in dots (RenderMesh, RenderBounds, Translation, LocalToWorld) , simple 4 verts 2 tris, put it in the world. It seems to have some weird culling in the scene (and game) views if you get too close, or look at it directly. You might be thinking this is near-plane camera clipping, but I can put a standard cube gameobject in the same spot that won't clip the same way. Any thoughts?

#

HybridRenderer culling maybe? ๐Ÿ˜ฎ

#

Ah, apparently it's known issues in the giant hybrid renderer v2 thread

cursive cosmos
#

I've noticed my cubes sometimes do that.

#

I've got a fun problem, so I followed a tutorial for making a cupe with 3D perlin noise, and the big difference is that I spawn my cubes using DOTS with thanks to @storm ravine .
The fun thing about this is that my cube literally looks like it has more of a pixelated chaos going on than a wave shaped cave pattern which his has with the same underlying code.

So I'm wondering, does perlin get affected by the multithreaded code while spawning items causing this pattern or what could be the cause? Can post the System in a sec.

tawdry tree
#

How do you get the perlin noise?

flat talon
#

@turbid sundial it looks like your render bounds are incorrect

storm ravine
#

Ah, apparently it's known issues in the giant hybrid renderer v2 thread
@turbid sundial There is no issue with culling. Just adding bounds do nothing (it will be 1 point culling, you can find thread on forum where I describe and show it) You should set bounds for render bounds from your mesh. You set it?

#

which his has with the same underlying code.

@cursive cosmos which one? I'm not using that code, it was written in a couple of minutes for you (if you about parallel job) ๐Ÿ™‚

cursive cosmos
#

no, but thanks to that code snippet you splurged out of you, I grasped what I did wrong :p
What do I even use to share code snippets nowadays?

storm ravine
#

```

```

cursive cosmos
#

It's a bit long though

storm ravine
#

dnd cs file

#

or link to haste paste bin

tawdry tree
#

If it's longer than ~20 to 40 lines, pastebin or something similar is better

storm ravine
#

about noise I think I know your problem

storm ravine
#

you just put float2 pos as argument for cnoise I guess, add some property to multiply that float2

tawdry tree
#

Mathf, huh

cursive cosmos
storm ravine
#

noise.cnoise use this instead

cursive cosmos
#

Oh, is that a thing..

storm ravine
#

float2 sample = samplePoint * frequency + octaveOffsets[o]; float perlinValue = math.mad(noise.cnoise(sample), 0.5, 0.5);

#

something like this

tawdry tree
#

In DOTS code you generally wanna use the newer math library rather than the old stuff

cursive cosmos
#

I have no clue what's old and new, just smashing my keyboard over here

tawdry tree
#

That said, that cube of yours looks pretty much like what I expect from perlin noise

#

The newer library you get from a package, as opposed to Unity.Mathematic.Mathf

cursive cosmos
#

So wait, should I replace my perlin 3d with that perlin value completely basically?

storm ravine
#

Perlin noise will be the same, not matter noise lib or Mathf

#

Algoritm the same

#

Only difference is implementation

#

As noise lib implemented with math and SIMD friendly

#

This is only difference

tawdry tree
#

Or in short: it can run faster

cursive cosmos
#

I like the fact that there is something called math.mad though.

storm ravine
#

DOTS math lib implemented in consistency with CG math lib

tawdry tree
#

As an aside, with perlin noise you should mess with the scale if you want bigger caves, and thresholds to change amount of space/solid

#

As opposed to that pixelated mess

cursive cosmos
#
float2 sample =  samplePoint * frequency + octaveOffsets[o];
float perlinValue = math.mad(noise.cnoise(sample), 0.5, 0.5);

While using this though, x/y/z wont affect the noise at all, so how would I go about sending that into the job for positioning?

#

is that instead of the noiseScale?

tawdry tree
#

the samplepoint is the x,y,z

storm ravine
#

perlin noise sample point is float2

tawdry tree
#

So how do 3D with that?

#

skew with the Z, somehow? That'd make odd patterns

storm ravine
tawdry tree
#

Unity.Mathematics.noise.pnoise sounds like perlin noise?

cursive cosmos
#

so the noise for vector 3?

tawdry tree
#

Browsing through the docs for the math package

#

Declaration: public static float pnoise(float3 P, float3 rep)

storm ravine
#

Is in 2D

#

classicnoise2D

tawdry tree
#

There's a 3d overload

storm ravine
#

it's just different namespace yes

cursive cosmos
storm ravine
#

public static float cnoise(float3 P)

tawdry tree
#

What the actual bleep i that

storm ravine
#

yeah 3D version in different file

tawdry tree
#

Oh, manual noise implementation?

storm ravine
tawdry tree
#
using Unity.Mathematics;

const float3 _rep = new float3(0,0,0); //no idea what rep does, so identity

private static float Perlin3D(float3 pos) => 
    math.mad(noise.pnoise(pos, rep), 0.5, 0.5);
#

This should be the barebones use of 3d perlin noise, in the form of a helper

#

Then you just chuck in the pos and get a noise-sample

storm ravine
#

pnoise is not "classic" perlin noise

#

cnoise is classic perlin noise

#

pnoise is pereodic variant

tawdry tree
#

Heck do I know, these names are cryptic

#

cnoise also doesn't need whatever rep is, so use that instead

storm ravine
#

it like Classic Noise and Periodic Noise ๐Ÿ™‚ And can confuse as pnoise feels like Perlin Noise

ocean tundra
#

These noise functions, are they part of Unity.Mathematics?

storm ravine
#

Yes

#

in noise static class

ocean tundra
#

Awesome, i was thinking ill use LibNoise or something, nice to know there's burst compatible ones

cursive cosmos
storm ravine
#

use multipliers

cursive cosmos
#

Oh, should I go upp in the noise scaler?

tawdry tree
#
using Unity.Mathematics;

public static class NoiseHelper 
{
    public static float ZeroToOneNoise(float3 pos) => 
        math.mad(noise.cnoise(pos), 0.5, 0.5);
    
     //Uniform scale in this case
    public static bool ProcGenPoint(float3 pos, float threshold, float scale) =>
        ZeroToOneNoise(pos * scale) > threshold;
}
#

Higher scale = bigger openings

#

If you make it too big there's a certain chance you'll see nothing at all, or all solid, though

cursive cosmos
#

yep, went solid

tawdry tree
#

Also, from your sample code it seems like you generate a new cube each press of your generate button. It might be useful to make a way to change values (scale, threshold) at runtime and re-generate the cube when you press it. that way you can get a feel for what you get out of the procgen

cursive cosmos
#

Nah, it's a cube per job

#

oh, you mean make it so it changes when values change

tawdry tree
#

Well, that's one option

#

But right now you have

void OnUpdate() {
  if (Input.GetKeyDown(KeyCode.S))
    //Does not remove old generated stuff?
    //Generate new
    //...
cursive cosmos
#

True, I could make a check so I can just spam S for them to re-render

tawdry tree
#

Which is fine for just seeing how generating one chunk or whatever you call that works, but not so useful for experimenting with different values, since you need to exit play mode, change values (in code?), enter play mode, press S

#

That's a lot longer iteration time compared to "change values, press S"

#

And once you want to generate more chunks you can easily expand the system for that

cursive cosmos
#

So what you linked is the bool if they should span a block...can try that

tawdry tree
#

Short iteration time is exceptionally useful in experimentation ๐Ÿ™‚

#

Yeah, the helper I posted is just a simple "Create block/enemy/whatever or not?" kinda thing

cursive cosmos
#

oh, little conversion error though, sec

#

had to be floats

turbid sundial
#

@storm ravine - I've searched the forums but your name isn't coming up (RE: RenderBounds)! Do you have a link by chance? ๐Ÿ™‚ Also, there's also WorldRenderBounds and ChunkRenderBounds with little to no documentation - are there obvious use cases for these?

tawdry tree
#

Mind, I wrote all of that from looking at some documentation and have not written such code for DOTS myself, so it might not compile as-is

cursive cosmos
#

so what would threshold and scale mean, I'll just fiddle with them and see what happens

storm ravine
#

@storm ravine - I've searched the forums but your name isn't coming up (RE: RenderBounds)! Do you have a link by chance? ๐Ÿ™‚ Also, there's also WorldRenderBounds and ChunkRenderBounds with little to no documentation - are there obvious use cases for these?
@turbid sundial They already using under hood for HLOD and culling, RenderBounds is what you should care usually

turbid sundial
#

Good to know

tawdry tree
#

@cursive cosmos Scale "scales" the caves (true/false result).
Threshold is how "high" the resulting number must be to return true, or put differently, how rare the procgen is.
I recommend setting the threshold fairly high for initial testing (0.7? it's 0-1 BTW), and when you have more air that blocks, scale up slowly (from 1 to 1.2 then 1.5, 1.7, 2, 2.5, etc) to see how that works

cursive cosmos
#

@tawdry tree http://prntscr.com/stxfnd
Tried your noise while using .5f threshold and .9f scale.
It's pretty much the same as my first result, I'm very confused ๐Ÿ˜„

Lightshot

Captured with Lightshot

tawdry tree
#

0.5 threshold should mean about 50% of blocks are solid.
Try threshold 0.7 and scale 1

#

I'm curious to see a screenshot of that, by the way

cursive cosmos
#

solid

storm ravine
#

cnoise require 0-1 value

cursive cosmos
storm ravine
#

What you want is like this

#

50 50 50 cube ob objects

tawdry tree
#

THAT looks like many layers of perlin noise

storm ravine
#

with big noise scale

cursive cosmos
#

yep, I do want it like that, but can't get it to work xD

ocean tundra
#

so pretty ๐Ÿ™‚

storm ravine
#

cnoise require 0-1 value

#

You should normalize your coords for noise

tawdry tree
#

So threshold 0.7 made a fully solid cube? I think I inverted the check, then. try 0.3

ocean tundra
#

quick side question, I looked at the docs for noise, how do you seed it?
I'm guessing you cant and need to do some sort of math after the noise so it works like having a seed?

tawdry tree
#

perlin nosie isn't seeded

#

The "seed" is the position, so if you want a "seed" you use some arbitrary large offset

ocean tundra
#

sweet, that makes sense

cursive cosmos
#

nothing @tawdry tree

tawdry tree
#

Usually worlds tend to be pretty flat, so you'd primarily offset the Z position of the input position

#

@open walrus Oooh, it's super sensitive, then. Try 0.45?

cursive cosmos
#

I need to change the things to public.

tawdry tree
#

Sounds like the output of "ZeroToOneNoise" doesn't go anywhere near zero or one with your small sample

cursive cosmos
#

there is a way to know if all jobs are completed, right?

tawdry tree
#

grab the resulting jobhandle from the .Schedule

#

Or use .Run instead, which will wait for them to complete

storm ravine
tawdry tree
#
//Option 1
var jobHandle = someJob.Schedule(/*args*/);
jobHandle.Complete();
//Option 2
someJob.Run(/*args*/); //Not good for chained jobs
#

@storm ravine Am I correct in this? Been a while since I played around in DOTS, being semi-active here to get freshed up on the current state and get those juicy often-linked videos before I delve in

storm ravine
#

For completing jobs right here yes. But for checking if chain done there is jobHandle.IsCompleted

#

If you don't want to force them to be done right here, right now

tawdry tree
#

Oh yeah, should've mentioned that

#

That'd be something like

var jobHandle = someJob.Schedule(/*args*/);
jobHandle = someOtherJob.Schedule(jobHandle/*other args*/);
jobHandle.Complete();
storm ravine
#

And my bad about normalization, normalization required only for "default" scale ๐Ÿ™‚ A bit working now and looking in a half eye. Use division for your sample for scale

warm panther
#
nvalidOperationException: The previously scheduled job ExportPhysicsWorld:ExportDynamicBodiesJob reads from the ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> ExportDynamicBodiesJob.safety. You are trying to schedule a new job CollisionEventSystemJob, which writes to the same ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> (via CollisionEventSystemJob.UserJobData.ProjectileData). To guarantee safety, you must include ExportPhysicsWorld:ExportDynamicBodiesJob as a dependency of the newly scheduled job.
Unity.Jobs.LowLevel.Unsafe.JobsUtility.Schedule (Unity.Jobs.LowLevel.Unsafe.JobsUtility+JobScheduleParameters& parameters) (at <fdd4f5823e2a41e8be8d5dcbd0bfd5b1>:0)

This is in a ICollisionEventsJob - how do I do what Unity asks of me here? And why does Unity.Physics read my Projectile tag, this has nothing to do with physics.

storm ravine
tawdry tree
#

EIZEN, are you just rubbing it in now, or are you telepathically communicating on how to actually get that?

cursive cosmos
#

stop bragging @storm ravine :<

storm ravine
#
            var noiseVal = math.mad(noise.cnoise(pos / scale), 0.5, 0.5) * frequency;
            if (noiseVal > 0.5f)
            {
                var e = ecb.Instantiate(index, prefab);
                ecb.SetComponent(index, e, new Translation()
                {
                    Value = new float3(
                                       pos.x,
                                       pos.y,
                                       pos.z
                                      ) + new float3(0, 50, 0) //just offset for move it up from my ground
                });
            }```
cursive cosmos
#

oooh, code

storm ravine
#

I'm not bragging

#

I'm giving idea of solution, well I can be silent here ๐Ÿ™‚

tawdry tree
#

There's the actual help I wasn't seeing

#

Just posting the result without code... I was wondering if you were VOIPing or something

storm ravine
#

I posted without code all explanations above

#

Which he just should apply to code

tawdry tree
#

@warm panther For the second half of that, I assume you use Jovian.Components.Weapons.Projectile in the job.
As for how to do that, the job wants ExportPhysicsWorld:ExportDynamicBodiesJob as a job dependency... though I'm not sure how to accomplish that

warm panther
#

@warm panther For the second half of that, I assume you use Jovian.Components.Weapons.Projectile in the job.
As for how to do that, the job wants ExportPhysicsWorld:ExportDynamicBodiesJob as a job dependency... though I'm not sure how to accomplish that
@tawdry tree Yeah that's what I read out of it myself.

storm ravine
#

if (noiseVal > 0.5f) and this should be replaced to your threshold

cursive cosmos
#

what was your values on scale and frequency @storm ravine ?

storm ravine
#

15 0.9

tawdry tree
#

Why the math.mad operation, by the way?

storm ravine
#

@cursive cosmos threshold should be 0-1 as noise return you 0-1 in current implementation and frequency <= 1, frequency can be > 1 but then you should change threshold as they related

tawdry tree
#

Noise should IMO return a normalized 0-1 value for easy of reasoning

warm panther
#

It gets better:

nvalidOperationException: The previously scheduled job CollisionEventSystemJob reads from the Unity.Collections.NativeArray`1[Unity.Physics.Velocity] CollisionEventSystemJob.EventReader.m_InputVelocities. You are trying to schedule a new job Solver:ParallelApplyGravityAndCopyInputVelocitiesJob, which writes to the same Unity.Collections.NativeArray`1[Unity.Physics.Velocity] (via ParallelApplyGravityAndCopyInputVelocitiesJob.InputVelocities). To guarantee safety, you must include CollisionEventSystemJob as a dependency of the newly 
Unity.Jobs.LowLevel.Unsafe.JobsUtility.ScheduleParallelFor (Unity.Jobs.LowLevel.Unsafe.JobsUtility+JobScheduleParameters& parameters, System.Int32 arrayLength, System.Int32 innerloopBatchCount) (at <fdd4f5823e2a41e8be8d5dcbd0bfd5b1>:0)
Unity.Jobs.IJobParallelForExtensions.Schedule[T] (T jobData, System.Int32 arrayLength, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn) (at <fdd4f5823e2a41e8be8d5dcbd0bfd5b1>:0)
Unity.Physics.Solver.ScheduleApplyGravityAndCopyInputVelocitiesJob (Unity.Physics.DynamicsWorld& world, Unity.Collections.NativeSlice`1[T] inputVelocities, Unity.Mathematics.float3 gravityAcceleration, Unity.Jobs.JobHandle inputDeps, System.Int32 threadCountHint) (at 

This is what my simple CollisionEventSystem gets when it just get scheduled, without using any ComponentData. this is practically 1:1 copy from the samples I found on the forum.

storm ravine
#

Why the math.mad operation, by the way?
@tawdry tree as it will be reinterpreted in assembly code to 2 add instructions instead of one add and one mul

tawdry tree
#

Yeah, but why are you doing multiply and add to begin with?

warm panther
#

[UpdateAfter(typeof(EndFramePhysicsSystem))] by the way

tawdry tree
#

Does cnoise return -1 to 1?

cursive cosmos
#

Oh my god it works.

tawdry tree
#

Wee, progress!

storm ravine
#

yes it [-1:1]

tawdry tree
#

Ahh

#

Assumed that was the case, but the docs are still sparse..

cursive cosmos
#

@storm ravine you are a noise genius.

tawdry tree
#

Sugar, now you got a good cave generator! For a floating island generator, increase the threshold a bit (or lower, depending on which implementation you use)

cursive cosmos
#

Now I need to figure out landscape math and how to know if it should be grass and dirt and so on.

#

But this is a good start

ocean tundra
#

looks great

cursive cosmos
#

wait, can you even make system variables public for change?

#

do you have to place the systems on an empty game object and such?

tawdry tree
#

You can make them public, yeah

#

Might not be a good idea, it is certainly easy to go against the best practices that way, but for experimentation, sure

#

No, systems exists in the entity manager, mostly

cursive cosmos
#

At least during experimentation phases, yeah

storm ravine
#

systems exists in player loop

tawdry tree
#

If you want to be able to tweak them "live" you could make a monobehavior with the appropriate settings, and in the MB's update, set some public static vriables to the same. The system could then access those (outside the job)

#

That's a really dumb and naive way, but should work?

#

A more DOTS-y way is to use singletoncomponents or entities or whatever replaced them

#

Still need to get the values into some code you control, tho

cursive cosmos
#

I'm just afraid to spawn duplicates and such.

#

like, pulling a slider and spawning a million of the entities would be bad

tawdry tree
#

Hmm, the live thingy with subscenes could maybe do it? Haven't touched those yet, so wouldn't know how

#

If you did what I said, you would still need to press the "generate" button to generate

#

Oh, and you should add something to find and delete all the existing entities first, probably...

cursive cosmos
#

yeah, which would not be bad, but I still need to grasp all my entities and remove them, dunno how to grab them all though unless I should save them in some list and remove then one by one in jobs

tawdry tree
#

entities.WithAll<your_tag_component> and entitymanager.... use intellsense and look for dleeting entities?

cursive cosmos
#

Oh have not even made a tag component yet, should probably fix that

tawdry tree
#

You want at least some way to fetch the blocks, yeah ๐Ÿ˜›

#

Alas, I have to be off, feeling the sleepy seeping in.
Good luck!

cursive cosmos
#

see ya!

halcyon plume
#

Who connects UI and ECS? As I understand it, is there any system like UISystem and the displayValue component which is on something? or how? what about the events?

warm panther
#

Wow, unity crashes hard when you leave a stray Debug.log in a burstcompile job. what garbage.

#

At least a warning would be kind.

#

I mean we can barely debug jobs as it is, at least printf debugging needs to be available at all times.

I'm this close to writing something that renders a native textbuffer to stdout or something. like the matrix.

mystic mountain
#

Doesn't it give warning if you don't burst compile?

warm panther
#

nope

#

also, ever since I put this system in, Enter Play Mode takes ~20 seconds. I wonder what's up with that.

#

Well I was able to successfully get a collision to work, but as soon as I try to read any Componentdata like my Projectile tag, it doesn't work.

#
InvalidOperationException: The previously scheduled job LocalToParentSystem:UpdateHierarchy reads from the ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> UpdateHierarchy.safety. You are trying to schedule a new job CollisionEventSystemJob, which writes to the same ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> (via CollisionEventSystemJob.UserJobData.ProjectileData). To guarantee safety, you must include LocalToParentSystem:UpdateHierarchy as a dependency of the newly scheduled job.```
#

Same old

halcyon plume
#

So... What about UI in ecs?

warm panther
#

I export my ECS data to a classic UI as needed. Some of it, yes, via singletons, others through messages much like what Codemonkey demoed a while back.

turbid sundial
#

So I'm creating a NativeArray<float3> to represent all of the positions of terrain chunks I've generated. Obviously, this fills them all out with zeroed float3s, and when I check whether or not a chunk exists at that position - it always will, so it'll never be generated ๐Ÿ˜ฎ I guess a simple fix would be to just put the terrain at 1f on Y, but any other thoughts?

halcyon plume
#

@warm panther can u send video link ? And example of your code

warm panther
#

Projectile is literally this.

#

It is not used in any of my systems (however it is added by an authoring component)

#

Ah oops.

#

I thought you were gonna help me with my issue ๐Ÿ˜„

halcyon plume
#

What is your issue?

warm panther
#

As soon as I use any ComponentData in my collision system, I get this error:

InvalidOperationException: The previously scheduled job TRSToLocalToParentSystem:TRSToLocalToParent reads from the ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> TRSToLocalToParent.safety. You are trying to schedule a new job CollisionEventSystemJob, which writes to the same ComponentDataFromEntity<Jovian.Components.Weapons.Projectile> (via CollisionEventSystemJob.UserJobData.ProjectileData). To guarantee safety, you must include TRSToLocalToParentSystem:TRSToLocalToParent as a dependency of the newly scheduled job.
Unity.Jobs.LowLevel.Unsafe.JobsUtility.Schedule (Unity.Jobs.LowLevel.Unsafe.JobsUtility+JobScheduleParameters& parameters) (at <fdd4f5823e2a41e8be8d5dcbd0bfd5b1>:0)```