#archived-dots

1 messages ยท Page 47 of 1

muted field
#

both bezier and line segments are structs and only hold basic value types

#

so i dunno why its saying they are managed unless i misunderstand it

rotund token
#

what line is your error on?

#

it would imply you're doing someting like
object a = (object)1;

remote crater
#

HDRP isn't working out for me. I can't use an image to make a custom skybox at runtime like other rendering packages, and its 33% less Frames per second. What other rendering package does DOTS support so I can migrate?

rotund token
#

dots supports both urp/hdrp

remote crater
#

ty

muted field
rotund token
#

can you show me deform job

muted field
#

i dunno why its considered managed - its a struct with only basic value types in it no ref values

#

sure

#
    [BurstCompile]
    private struct DeformJob<T> : IJobParallelFor where T : unmanaged, ISpline
    {
        NativeArray<float3> _vertices;
        NativeArray<float3> _original;
        T _s;
        float _tMin;
        float _tMax;
        public DeformJob(in T spline, in float tMin, in float tMax, in NativeArray<float3> vertices, in NativeArray<float3> original)
        {
            _original = original;
            _vertices = vertices;
            _s = spline;
            _tMin = math.clamp(math.min(tMin, tMax), 0, 1);
            _tMax = math.clamp(math.max(tMin, tMax), 0, 1);
        }
        [BurstCompile]
        public void Execute(int i)
        {
            Set(_s, _tMin, _tMax, _original[i], out float3 result);
            _vertices[i] = result;
        }
    }
rotund token
#

that looks alll fine

#

nothing is casting to ISpline is it?

muted field
#

oh well the Set function checks if the spline is a certain type

#

is that why?

#

it has a line which does this on the spline input : (s is Bezier b && b.IsClockwise ? -1 : 1) * math.sign(input.x);

#

is that whats boxing to a managed type ?

#

ok it is that issue i just commented it out and the error went away

#

ill just pass in a bool instead

rotund token
#

hmm

#

i thougth is avoided boxing

#

but yeah not sure is Type t

muted field
#

T is an interface or at least restricted to one

#

but its declared unmanaged every step of the way aswell

rustic rain
#

Why not let baking do it's job?
Just create prefab that holds this material and then access it however you want to get material index

#

You are not supposed to do any changes to RenderMeshArray

#

Neither it will help you do what you want

drowsy pagoda
#

I actually just got it to work. I read the Graphics docs and got it to work. The issue is when setting the renderMeshArray.Materials you can't just raw assign it. You have to use RenderMeshArray.CombineRenderMeshArrays, then it works.

#

It's pretty cool what they did, they allow you to switch materials and mesh on the fly, even from parallel burst jobs!

rustic rain
#

But sir, it's just not smth you should do I think, since there's much more stuff around it that connects it to BRG

#

If you just keep prefab reference in subscene it'll register and unregister your material properly as well

drowsy pagoda
#

Yeah, your way does seem easier. Thx for the tip.

rustic rain
#

It's more about changing API though. My approach with adding RenderMesh in 0.51 broke horribly after 1.0 changes ๐Ÿ˜…

#

So better not repeat mistakes

drowsy pagoda
#

ah good point

muted field
#

is it normal for my jobs to be idle for so long when running an IJobParallelFor ?

#

don't understand why they wait so long

#

the job lasts 0.004ms then they idle for such a long time

rustic rain
muted field
#

not a lot just generating mesh data

#

instantiating them in the scene etc

#

oh that might be why because it calls the job after instantiation

rustic rain
#

Most probably your jobs are just scheduled with a huge gaps inbetween?

muted field
#

i need to do all the jobs first then instantiate and apply the data after

#

rather than instantiate then job for that prefab and repeat

muted field
#

not sure if its worth changing that im not likely saving any time

#

unless unity optimises their instantiate method

rotund token
#

already done a 180 on aspects

#

going to make building a requirement library so much easier

frosty siren
#

i don't use unity's Graphics package so can't tell what can possibly go wrong. Docs says that RenderMeshArray filled during baking stage. How you actually modify this array?

frosty siren
#

How can I get and access state of ISystem through World.GetOrCreateSystem<TISystem>()?

#

It returns only SystemRef which allow access struct itself and some SystemHandle thing, which I even don't know to use for

#

It looks like I have no way to manage ISystem systems in a way to enable/disable them when i want to

rotund token
#

ResolveSystemStateChecked can do it but it's internal
ResolveSystemStateRef from WorldUnmanaged

rustic rain
frosty siren
rustic rain
#

has it ever been a problem though?

frosty siren
#

no problem with unsafe stuff at all, but you know creating separate asmdef for things which needs control over systems

rustic rain
#

why?

#

I just give internal access to everything

frosty siren
#

how?

rustic rain
#

InternalsVisibleTo and to main namespace

#

from which everything else branches

frosty siren
rotund token
#

public ref SystemState ResolveSystemStateRef(SystemHandle id)

#

isnt internla

#

Or unsafe

frosty siren
#

I'm on 0.51

rotund token
#

oh

#

yeah well thats all you got then

#

in 1.0 it returns as ref handle

robust scaffold
frosty siren
#

It seems like EntityQuery.ResetFilter only resetting SCD and component-change filtering, but how reset OrderChange filtering?

#

Because there is only place where _Filter.UseOrderFiltering = true; happens in EntityQuery code

frosty siren
#

1.0 ?

robust scaffold
#

yep

frosty siren
#

๐Ÿ˜ฌ entities giving me a subtly hint to update to 1.0

#

it is a 3rd time for a day when i speaking with people from future, when they have more progressive API then me ๐Ÿ™‚

robust scaffold
#

Well, the only reason to be using LTS is for production development and if you're attempting to use 0.50 for production, uhhh.

clever cobalt
#

Is it possible to use interfaces with native arrays?

#

or is there some other way of using interfaces with arrays in jobs?

frosty siren
frosty siren
clever cobalt
#

public interface IInterface {
  public void Run(SomeJob job);
}

public struct SomeJob : IJob {
  public NativeArray<IInterface> thingsToRun;
}

frosty siren
#

T in NativeArray should be a struct (in my collection package version at least, because future versions may require a unmanaged as T), so no, you can't use interfaces

robust scaffold
clever cobalt
#

Thanks! I will look into it

dense crypt
#

Does full documentation work for you guys in Rider for DOTS? I can only ever get the summary to show up, not remarks or others. See the image for an example.

#

In this case there should be a remark that IsEmpty is faster for == 0 checks, as evident if you navigate to the function

robust scaffold
#

@proud jackal Personal preference but I dont think the ManagedAPI following SystemAPI needs the API. It should be SystemAPI.Managed.GetComponent<>(). Like how world has world.unmanaged and not world.unmanagedWorld.

robust scaffold
robust scaffold
dense crypt
#

I can't seem to get that either :/

robust scaffold
dense crypt
#

oh yeah that works for me

#

hmm

#

Guess I'll have to check if there's a setting to always show that tooltip, would be so much more useful than the quick short one imo

rustic rain
#

it's slow

#

in ECS instead you process each "interface" in independent query

robust scaffold
rustic rain
#

talking about exact use case was mentioned

#

kind of what I meant actually

#

that's one way to do it

drowsy pagoda
#

Before when building on top of existing build, it would take 1-2 minutes. But now when building on top of existing build, it seems to do it from scratch each time ~7mins. Is that just a 1.0 thing, or is there a way I can restore the original behavior?

drowsy pagoda
robust scaffold
# drowsy pagoda yeah

no clue then, dots shouldnt have any effect on compilation. It's just a pile of c#

rotund token
#

our build times at work went from 10min to over 40min and it's 35min of burst

#

same version of unity for last year

drowsy pagoda
#

no, i'm on 1.7.3

rotund token
#

that is so old o_O

drowsy pagoda
#

lol sorry, typo

rotund token
#

haha ok that makes much more sense

drowsy pagoda
#

Yeah, my build is giving me that failed to build entity scene crap again. I have a feeling that something triggers this during baking while building, and an exception get's thrown which then crashes the whole baking process and the build builds everything else except the entities that needed to be converted to the scene.

#

I'm gonna stash these changes, rollback, and build and see if it builds successfully.

safe lintel
#

so is content management == dots addressables? tbh i thought it would deal with entity prefabs and not gameobject resources

rotund token
#

which is currently an issue with dots

#

that all said, ContentDeliveryService seems like it can load subscenes from a very quick look into it the other day

#

and subscenes contain entities

safe lintel
#

i was kind of hoping to just tick a box in the editor and not even need to make a subscene with an entity, kind of like how you can do that with instantiateasync-gameobject-nickname and do something similar in dots

robust scaffold
#

Im gonna try and hook up the native dots sprite renderer again. Performance of it is horrible but it works.

safe lintel
#

wonder if the updated megacity sample will use gameobject audio or just nix it altogether

balmy thistle
#

oh that's interesting, how are you doing the occlusion?

#

I made a Unity game with pixel perfect occluded shadows but it required a lot of custom rendering

robust scaffold
#

Doesnt work :(

robust scaffold
balmy thistle
#

sounds about right

robust scaffold
#

It worked back in 0.17 so... plz.

balmy thistle
robust scaffold
#

Yea, already did.

#

I checked and my own message was already there from a year or so ago.

#

Ugh. I guess I can go back to work rolling my own sprite renderer. Very annoying.

rotund token
#

bit of a throw back but you've reminded me of it, first library i ever wrote for dots was a vision library. this was way back, probably <0.0.12 (not 0.12)

#

good times

#

my dota river clone ^_^'

#

yep i was spot on!

        "com.unity.burst": "1.0.0-preview.6",
        "com.unity.collections": "0.0.9-preview.16",
        "com.unity.entities": "0.0.12-preview.29",
        "com.unity.mathematics": "1.0.0-preview.1"
    }```
#

good times

safe lintel
#

dota clone? nice ๐Ÿ˜„

rotund token
#

was never a game, just a sample scene as an inspiration to test tech

safe lintel
#

i have spent time wondering how the hell a dota ability system would look like in ecs

rotund token
#

after i finish my requirement system (which shouldn't be to hard since i'm going to split off and re-use my conditions from my effects library)

#

i would like to look at an ability system

#

probably just loosely base it off Unreal's Gameplay Ability System for usability

robust scaffold
rotund token
covert lagoon
#

If it would be a multiplayer game with Netcode for Entities and abilities can't be used often, maybe they could be RPCs.

rotund token
#

previously i had helper structs / extension methods

#

which i can just cleanup with aspect

rotund token
#

i'd want my system to work with or without netcode

covert lagoon
#

But you can only use abilities every few seconds at most, right?

rotund token
#

my game uses netcode, but i write all my libraries standalone without netcode

covert lagoon
#

So maybe you could add and remove a component.

rotund token
covert lagoon
#

Damn.

rotund token
#

some libraries i test a lot more

#

my local avoidance 250k

#

my effects 10mill

#

etc

covert lagoon
#

Then I guess you would just add an extra field to your component that stores player/character input.

rotund token
#

but 100k is bare minimum my library must support for me to be happy

covert lagoon
#

RequestedAbility or something like that.

#

When the player/character isn't requesting to use an ability, it's some kind of null value.

rotund token
#

why can't use 2 abilities at once

covert lagoon
#

The same frame?

#

Do you test with 100k abilites per character class too?

rotund token
#

no that'd be unrealistic

#

i haven't built this yet

#

but i imagine 100 abilities would be reasonable

#

and i made abilities quite generic, like cutting a tree is the same thing as casting a fireball

#

anyway as said, i haven't built this yet and i only have a vague idea how to implement

#

the tricky thing i'm mostly thinking about is timings on client vs server

#

something our ability system at work has had issues with

#

(which is dots, but i didn't write it)

safe lintel
#

is this a scheduling conflict? feels like something i should be able to fix but having a hard time trying to figure it out

rotund token
#

sounds like your using EM after doing an Update on Handles

safe lintel
#

yeah seems it but I swear I shouldnt be doing that. just updated several hundred instances of translation/rotation etc to the new v2 transform and this was working previously in v1. not really sure why I'd be getting this error now as I definitely didnt add any em use during upgrading

rotund token
#

that's a happy surprise, IJE seems to be able to handle a static Execute signature
never mind it only works until clears the temp cache or make a change ^_^'

full epoch
#

Is possible to get RigidBodyAspect somehow in IJobChunk?

rotund token
#

or is it RigidBodyAspect.TypeHandle

#

something like that

#

one of the extra things it generates provides you the data you need

#

yeah RigidBodyAspect.TypeHandle

#

then call Update(ref global::Unity.Entities.SystemState state) like a normal type handle in your system

#

and in the job call Resolve(ArchetypeChunk)

full epoch
#

thx

rotund token
#

which gives you an indexier, which you can index to get your RigidbodyAspect

robust scaffold
#

Sprite renderer isnt on the list, so sad. Tiny 2d sprite renderer is dead.

rotund token
#

the 26th of November will forever be known as "KornFlaks writes his own sprite renderer day"

robust scaffold
#

i dont want to though, it's so painful

#

it's just that companion GOs are very broken with netcode

rotund token
#

that's i wrote my own little simple hybrid system for it

safe lintel
#

hm maybe its an isystem bug? error doesnt show after reverting back to systembase

brave field
#

๐Ÿ˜ฑ Anyone notice that Unity 2022.2.0f1 can't build android? Not sure whether this issue will be fixed when going public

scarlet inlet
#

Probably still working on the Vulkan transpilation. Remember that Android is also Quest, Set top boxes, etc. It's a real bugaboo. I'd expect a little delay to block off non-working translations.

robust scaffold
#

.... well. I guess I wont try building then

rotund token
#

Are you using the logging package?

#

Or was that just a dependency

#

I haven't seen anyone else use it

robust scaffold
#

Physics and companion GOs also break the build

#

Yea, just everything is broken it seems. Oh well

rotund token
robust scaffold
#

Gonna build an empty scene. Lets see if this works.

rotund token
#

Seems to be burst at fault for your failures?

robust scaffold
#

No systems being added. If this doesnt work. Nothing will.

rotund token
#

Tried an earlier version?

robust scaffold
#

Not yet, gonna see if this runs without error first. Building an empty scene takes a while.

#

Ha, no

jaunty sand
rotund token
#

how do people feel like linq like methods in dots/burst?

            public NativeArray<ConditionSchema> ConditionSchemas;

            private void Execute(Entity entity, in DynamicBuffer<GlobalCondition> globalConditions)
            {
                foreach (var condition in globalConditions.AsNativeArrayRO())
                {
                    if (!this.ConditionSchemas.Any(new AreEqual(condition.Key)))
                    {
                        Debug.LogError($"...");
                        continue;
                    }```
#

i wrote a whole range of them ages ago

#

wrote a whole range of them ages ago and barely use them

#

Where, WhereNoAlloc, Select, All, Any, FirstOrDefault, IndexOf, Min, Max kind of stuff

rotund token
rotund token
#

threw netcode in the library as well and had no issue making a build

robust scaffold
#

Hrm....

robust scaffold
misty wedge
#

Can you not set the enabled state of a RW component inside an aspect if you also need to access it?

#

Adding an EnabledRefRW tells me I can't have both

robust scaffold
robust scaffold
robust scaffold
misty wedge
#

Alright, when I updated my project settings broke, that's why I was asking

#

But the error wasn't a burst error, and I only got it on building

robust scaffold
misty wedge
#

Does the newest unity version still have so many issues with entity headers breaking in baking? Or is it fine to upgrade

#

iirc I tried b13 and that was borderline unusable

robust scaffold
#

Yea, the 2022.2F and preview builds are fairly stable. I still occasionally have crash to desktop due to the baker stalling out but that's every hour instead of every single time the files change

misty wedge
#

Latest I see is b16?

robust scaffold
#

You need the direct link, give me a min

misty wedge
robust scaffold
#

type that into your browser's url

misty wedge
#

Did a dev post this?

#

Or how was this figured out

robust scaffold
#

no clue

#

i just have the link saved

misty wedge
#

haha, alright

#

I'm assuming this matches entities to .15?

robust scaffold
#

preview build yea

misty wedge
#

Any idea if il2cpp builds work on that version?

robust scaffold
#

maybe? I just got mono building and havent tried il2cpp yet

misty wedge
#

Awesome, thanks for the info

#

I'm assuming 2022.2 is releasing soon then

kindred nacelle
#

Does anyone know adding a tag is a structural change in DOTS alpha 1.0?

robust scaffold
kindred nacelle
#

What the best practise to do behaviour like this? Make Component with flag value?

#

if i want to do many adding or removing tag like info

robust scaffold
#

I dont know what your code is nor what you want to achieve

kindred nacelle
#

I want to define a large set of interactions at objects and specify this actions by tags

robust scaffold
#

Will you be needing to change those tags every frame or so?

kindred nacelle
#

Yes, almost every frame

robust scaffold
#

Then use an empty component that inherits IEnableableComponent. Toggling enabled / disabled is not a structural change.

kindred nacelle
#

Oh, yes I forgot about this. Is EnableableComponent are include object in queries, if it disable?

robust scaffold
#

No, if you use the enabled mask in an IJobChunk and is automatically filtered out if you use IJobEntity

kindred nacelle
#

Thanks

jaunty sand
robust scaffold
misty wedge
#

does netcode support transforms V2 in pre.15?

robust scaffold
misty wedge
#

If I need a deterministic random seed in a networking context, NetworkTick should be the same for predicted entity on the client and server inside a prediction system right?

#

Also saw that SystemAPI now supports type handles, removes so much boilerplate

#

Really nice

#

Especially with the bug fix to inline SystemAPI calls for created jobs

rustic rain
#

anyone has any idea what is current version for API for source generators in 2022.2?

misty wedge
#

What do you mean?

rustic rain
#

I'm learning source generators and 3.8 version mentioned in manual seems sus

misty wedge
#

Ah, I have no idea

#

haha I'm assuming this was you @proud jackal

proud jackal
#

Hahaha whaaaAaAaat i would never :3

proud jackal
rustic rain
#

I am really just learning and trying to make my first field generator, so fancy words don't work on me ๐Ÿ˜…

misty wedge
#

Are shared component type handles with SystemAPI not working with codegen yet?

#

I get an error

#

I was wondering since I don't see it on the list of known issues

rustic rain
misty wedge
#

Well yes

#

But the codegen is breaking

#
Temp\GeneratedCode\Schnozzle.WorldGeneration\WorldFeaturesSystem__System_502980019.g.cs(496,97): error CS0102: The type 'WorldFeaturesSystem' already contains a definition for '__Schnozzle_Core_Components_WorldIdentityShared_SharedComponentTypeHandle'
rustic rain
#

how does it even work for you in pre codegen code?

misty wedge
#

What do you mean?

rustic rain
#

Compiler should not even allow this to compile

misty wedge
#

It doesn't

#

It works if I don't use SystemAPI

#

(since that won't codegen the component handle then)

rustic rain
#

well, your job field for shared comp doesn't match output of SystemAPI

misty wedge
#

???

#

That's not even what the error message says

rustic rain
#

Are you doing ComponentTypeHandle<SharedComp>?

misty wedge
rustic rain
#

oh ok

misty wedge
#

Of course

#

lol

rustic rain
#

so, how does it look in SystemAPI?

#

with*

misty wedge
rustic rain
#

๐Ÿค”

#

no idea then

#

allthough

misty wedge
#

It's getting put into the code-gen'd file twice for some reason

rustic rain
#

you might want to check codegened file

misty wedge
#

I guess it's some weird edge case

rustic rain
#

๐Ÿค”

proud jackal
rustic rain
#

oh wait

#

nvm you meant Unity version

#

๐Ÿ˜…

proud jackal
# misty wedge

Alsp that edge case is odd! Could you share a minimum repro for me to look at?

proud jackal
misty wedge
rustic rain
#

that's good. All .net manuals are updated to 4 version now and as soon as I tried to use 3.8.0... it wasn't good kek

proud jackal
#

Oh fun, well lemme know how it goes i would definitely recommend not using ISourceGenerator and using Incremental generator instead :3
Here are some good resources i can recommend:
Design: https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md
Intro: https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/
Performance: https://www.thinktecture.com/net/roslyn-source-generators-performance/

GitHub

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. - roslyn/incremental-generators.md at main ยท dotnet/roslyn

Andrew Lock | .NET Escapades

In this post I walk through how to create a practical .NET 6 incremental source generator: an enum extensions class with a fast ToString() implementation

Thinktecture AG

The performance of the Incremental Source Generators can be improved by optimizing the code for built-in memoization, i.e. caching.

robust scaffold
#

@proud jackal Are there any efforts to include a [WithOrderFilter] to IJobEntity?

robust scaffold
misty wedge
proud jackal
robust scaffold
proud jackal
robust scaffold
misty wedge
#

Probably not with a tag but an extension function

robust scaffold
#

new IJE{}.WithSharedComponentFilter(value).Schedule()? Kinda going back to lambda EFE at that point...

misty wedge
#

A million times better than redefining the query before scheduling it IMO

#

It's the only one that you can't do with a tag since it requires a value

robust scaffold
#

The one thing I wish IJE had from EFE is the .WithStoreQuery(ref value) or whatever it was called.

misty wedge
#

Yes, that one would also be nice

#

And I think the issue with EFE wasn't the extension functions, but the lambdas

robust scaffold
#

And scheduling wasn't burstable.

#

And if you used intellisense, typing anything inside the EFE lambda would stall the IDE with all the options.

misty wedge
#

Can you predict an RPC call for a predicted ghost?

#

Or do you need to use input commands

#

e.g. for using an ability, sending an RPC once instead of sending the ability ID each frame

#

I'm guessing not since you can't get the RPC for a specific tick

rotund token
#

it's always fun when you load up a project, upgrade libraries, fix compile errors then it just infinite loops on GameView.Repaint even after a close/load

#

is there no way to enter safe mode without a compile error? guess it's time for a rogue /

robust scaffold
#

Can you have entities inside blob assets at bake? Do they properly remap when streamed in?

rustic rain
#

No

rotund token
#

only icomponent and ibufferelement will remap

robust scaffold
#

ugh

rotund token
#

i suspect unmanaged isharedcomponent is possible but just wasn't setup because of the historically they were all managed

robust scaffold
#

i guess I can use a giant buffer. It is practically the same thing

#

As long as the buffer itself doesnt change capacity, I can pass around the pointer to buffer header and it's a automatically managed blob asset.

rotund token
#

unity can still move the buffer to a new chunk

#

if anything in that chunk changes

robust scaffold
#

Nah, it's a singleton. Shouldnt change.

rotund token
#

or move it within the chunk if the archetype changes

#

seems incredibly unsafe ^_^'

robust scaffold
#

unsafe? I prefer highly performant.

#

although I spent nearly 2 hours earlier today wondering why unity hard crash to desktop whenever I press play. I realized that I had a pointer shift occur before write to a pointer in a for loop so it was writing 700 elements beyond the end of the allocated buffer, resulting in a segmentation fault on the C++ side.

#

As I said, highly performant. Bringing the user instantly to the end state of closing the program.

robust scaffold
#

Huh, it's back

rotund token
#

never went away

#

just much rarer thankfully

robust scaffold
#

Yea. This time I created a new baker and everything decided to die.

viral sonnet
#

tertle, did you get the PropertyInspector working in pre-15? namespace should be Unity.Entities.UI but I can't get it working

#

aw man, forgot the reference in my asmdef. haha

#

SystemAPI.GetComponentTypeHandle
โค๏ธ

viral sonnet
#

now i need to find out how multiple usage of SystemAPI.GetEntityTypeHandle() reacts in one system. i certainly couldn't reuse the same handle for 2 different jobs

robust scaffold
rotund token
#

yeah they moved it to a new asmdef

viral sonnet
viral sonnet
rotund token
#

i've always re-used the handle

#

never had an issue

#

as long as you aren't running the jobs in parallel then the safety might complain

viral sonnet
#

oh, no, i'm talking nonsense but i needed to update before the 2nd job

rotund token
#

handle.update
job1 {handle = handle}
job2 {handle = handle}

#

should be fine (as long as job2 depends on job1 probably, not sure about running in parallel)

viral sonnet
#

maybe i need to test again. slowly going through the systems. can't remember exactly where that system was but i'll find it ๐Ÿ˜„

rotund token
#

spent the last 2 days just building auto formatting rules for my code/libraries

viral sonnet
#

wow, what is it able to do now?

rotund token
#

oh just basically everything

#

format xml, enforce expression bodies, re-order file layouts

#

add headers, deleting double lines, add/remove spaces

#

i've currently got it running every time i save

#

not sure that'll stick but we'll see

#

one thing i keep switching back and forwards between

#

is expression bodies on methods

#

i keep thinking, yeah expression bodies are great
then I see my code switched to

            new CreateMapJob
                {
                    ConditionSchemas = SystemAPI.GetSingletonBuffer<ConditionSchema>().AsNativeArray(),
                    GlobalEntities = this.globalEntities,
                }
                .Run();```
#

-_-

viral sonnet
#

yikes ๐Ÿ˜„

#

that's too much! ๐Ÿ˜„

rotund token
#

think i'll just disallow on methods, enforce on properties

#

a sane person would be like, case by case basis

#

but not me

viral sonnet
#

i'm not a fan of expression bodies in general. but for properties it's okay

#

for methods, i dunno. make some damn curly braces

rotund token
#

i'd like to allow them on operators

#

but rider doesn't differentiate between other methods

viral sonnet
#

can't even filter for keywords? just method, yes/no?

rotund token
#

only these options

robust scaffold
#

Huh. So you can't nest subscenes inside subscenes?

rotund token
robust scaffold
rotund token
#

i've just grouped them with a few prefabs

robust scaffold
#

I hate that prespawned entities in netcode must be assigned a gameobject beforehand

rotund token
#

not sure what you mean or the problem you have

viral sonnet
#

found the system i was talking about. removing the update before the 2nd job results in

InvalidOperationException: Attempted to access the Unity.Entities.EntityTypeHandle Process_AddedEffects_Job.JobData.Entities_ReadHandle which has been invalidated by a structural change.
the good news. SystemAPI.GetEntityTypeHandle() works fine

robust scaffold
rotund token
#

i imagine you're doing something like
GetSingleton

viral sonnet
#

single schedule job that reacts to removed effects and then added effects

rotund token
#

is there a complete or something between these jobs?

viral sonnet
#

yes

rotund token
#

ah yeah ok that makes sense

#

update is valid until a structural change

#

that's why it has to update!

#

(and global version)

viral sonnet
#

yeah, right. i'm surprised SystemAPI.GetEntityTypeHandle() gets that

rotund token
#

think it just calls update at that point

viral sonnet
#

yeah, maybe it just creates 2 handles

#

(currently looking at the codegen)

rotund token
#

Update is free for EntityTypeHandle (it's a no-op without safety)

#

and it's a single uint assignment for components/buffers

viral sonnet
#

ok, it generates 1 handle and calls update 2 times. like it should. cool

rotund token
#

so it's really no big deal if you have to update multiple times in a system

viral sonnet
#

system code gets nicer every new version ๐Ÿ˜„

rotund token
#

did you see dani leaked default interface methods ๐Ÿ˜„

#

it's all we need

#

no more oncreate/ondestroy

viral sonnet
#

are you talking about the IJobEntityChunkBeginEnd?

rotund token
viral sonnet
#

oh okay

rotund token
#

interface with
void OnCreate() {}

#

so you don't need to implement oncreate/ondestroy

#

if you don't use them

viral sonnet
#

nice!

rotund token
#

with all this systemapi stuff my oncreates are often empty now

#

so it'll be so nice to just not have them

safe lintel
#

wait whats the api helps with Oncreate?

viral sonnet
#

yeah i just have queries and some singleton dependencies now in create

viral sonnet
#

but i have no idea how that works because i get errors ๐Ÿ˜„

rotund token
#

you can't yet

viral sonnet
#

ok ๐Ÿ˜„

rotund token
#

default interface methods will allow this, and this version of unity supports it

robust scaffold
#

This is pain.

#

But I guess this is a viable way to clone prespawned entities without going through the hoops of baking.

rotund token
#

Seems reasonable tbh

#

Could open, close, scene to make it more convenient

robust scaffold
#

I guess

#

It's just odd, but it does work

rotund token
#

when does it even need to change?

robust scaffold
#

It's manually triggered by a button in the inspector

rotund token
#

yeah

#

but i mean, once you set this up once, how often do you even need to run it again

robust scaffold
#

Every time I change tilemap dimensions. As long as I dont resize the TM, it doesnt change.

safe lintel
#

@rotund token wait is that to just get rid of typing oncreate or to auto cache state.GetComponentTypeHandle? i dont quite follow

rotund token
#
    [UpdateInGroup(typeof(ConditionsSystemGroup))]
    public partial struct ConditionAllActiveSystem : ISystem
    {
        /// <inheritdoc />
        [BurstCompile]
        public void OnUpdate(ref SystemState state)
        {
            new ConditionAllActiveJob().ScheduleParallel();
        }

        /// <inheritdoc />
        public void OnCreate(ref SystemState state)
        {
        }

        /// <inheritdoc />
        public void OnDestroy(ref SystemState state)
        {
        }
    }```
#

could become

    [UpdateInGroup(typeof(ConditionsSystemGroup))]
    public partial struct ConditionAllActiveSystem : ISystem
    {
        /// <inheritdoc />
        [BurstCompile]
        public void OnUpdate(ref SystemState state)
        {
            new ConditionAllActiveJob().ScheduleParallel();
        }
    }```
#

you can already use SystemAPI to create all your type handles, lookups etc

robust scaffold
#

Does anyone know if setting lengths of buffers in the baker inflate the size of the subscene? Should I instead be using EnsureCapacity() and then resizing the buffers at runtime since they're all 0?

rotund token
#

yeah whatever size you set the buffer is the size of the buffer that will serialize

robust scaffold
#

I'm just worried because I have these giant 2M float sized buffers that are setup at runtime but not at bake.

rotund token
#

hmm

#

i can't see subscenes using compression anymore

#

doesn't seem to use the codecservices anymore

#

that seems unlikely, just not sure where it'd do it now

dense crypt
#

how can i hide the sytems showing up in the entities hierarchy, or do i just have to live with it?

robust scaffold
dense crypt
robust scaffold
dense crypt
#

Yeah I just realised what you meant by authoring mode, hmm

robust scaffold
#

if you're manually spawning these entities and still want to see them, then you'll have to live with it.

dense crypt
#

Yeah I'll make do, thanks for help ๐Ÿ™‚

robust scaffold
rotund token
#

reason #47 to use my core library

#

lets you hide systems

viral sonnet
#

what happened to the entities hierarchy filter? filtering comps doesn't work anymore

safe lintel
#

i think its c= not c: now

rotund token
#

which is a really weird change imo

#

considering : is standard filtering in project window etc

#

and the search window

viral sonnet
#

no i get the change from : to = (which is a bad change btw) - it still doesn't work. is it only for me?

#

i'm trying to filter a tag comp

safe lintel
#

is it possible to do filter multiple components?

#

@viral sonnet i dont know but i even have a different dropdown box from tertle

robust scaffold
viral sonnet
#

tertle has his custom filters

safe lintel
#

oh looks so good thought that was standard ๐Ÿ˜ฆ

rotund token
#

i forgot i added none as well

rotund token
#

1.0 is currently a huge regression to 0.17 entity debugger for filtering

safe lintel
#

possible to filter multiple components? i cant figure it out if it is

rotund token
#

only with my librayr

#

that's what this is

#

by default it uses Any

safe lintel
#

ah ๐Ÿ™‚

rotund token
#

which is useless, i really don't understand who would ever want to use this

robust scaffold
rotund token
#

i would say >99% of time All would be the desired filter

robust scaffold
#

i am 95% there to porting over the entirety of entity debugger from 0.17

viral sonnet
#

so can you guys filter in 1.0pre15? ๐Ÿ˜„

rotund token
#

yes

safe lintel
#

you gonna port the chunk visualization? never personally had a need for it but thought it was a neat tool

viral sonnet
#

wth, why is this not working for me. ๐Ÿค”

safe lintel
#

and i have to assume that visualizer was really useful for others who absolutely needed to optimize chunk use

robust scaffold
#

@rotund token If i port it, are ya willing to take up the job of maintaining it in your library?

rotund token
#

no

#

i'm done with ED

robust scaffold
#

๐Ÿ˜ข

safe lintel
#

not even hesitation ๐Ÿ™‚

rotund token
#

would be like an alcoholic taking a drink

#

it took a lot of work to stop using it

rotund token
#

which is not great

robust scaffold
#

Im gonna do it anyways. Because this alcoholic had their drink taken away cold turkey and I've been getting the shakes ever since.

rotund token
#

actually what i'm finding is

#

it works in editor mode

#

not in play mode

#

wait no that's not even true

#

yeah super busted enzi

#

i'm just going to fix it with my filter extensions -_-

viral sonnet
#

ok, damn

rotund token
#

ahhhhhhhhhhhhhhhh hang on

#

i'm looking at source

#

first thing

#
            {
                // Temp patch: Using `All` since most users seem to prefer that behaviour.
                // The real solution is to properly support entity queries in search.
                All = componentTypes.Set.ToArray(),
                Options = EntityQueryOptions.IncludePrefab | EntityQueryOptions.IncludeDisabledEntities
            }, k_UnmatchedInputBuilder.ToString());```
#

they've actually changed it to All

#

woohoo

#

second thing, no idea why it's broken, the query just seems to randomly empty

#

actually @viral sonnet it seems to work fine

#

it was my extension that broke it for me because of the any => all switch

viral sonnet
#

just restarted the editor in hopes it would fix something. no matter which comp i pick i juts get every entity returned

rotund token
#

definitely works for me now that i updated my extension to filters

viral sonnet
#

ah yeah i'm in runtime

rotund token
#

ignore that, missread my data

#

runtime is fine

viral sonnet
#

can you test with a tag comp?

#

eh, don't think it matters much.

#

my filtering also doesn't work in editor mode

#

ok, let's take a look at the diff set from 1.0exp to pre

rotund token
#

definitely don't have my filter or library somewhere?

#

essentials or something

viral sonnet
#

nope

#

haha, yeaaaah. i'm not using your library but i found customHierarchy ... ๐Ÿคฆโ€โ™‚๏ธ

#

well, fixed. sorry for wasting your time :/

rotund token
#

not a waste, you pointed out my library was broken ^_^'

viral sonnet
#

hehe ๐Ÿ˜…

rotund token
#

anyway i'm super happy they changed it to All

#

switched my filter to give Any option instead for super rare cases

viral sonnet
#

yeah about time. i love the defensive comment. "most users prefer it that way" - instead of, it never made sense to begin with ๐Ÿ˜

robust scaffold
#

It's back baby

#

Horribly optimized but I'm shocked with only a few cleanups here and there, it functions.

viral sonnet
#

whoa cool!

robust scaffold
#

My god, i'm crying. It's as beautiful as the day we lost her.

#

Just ignore the errors, i've gotta clean up the backend. Use bursted stuff as well

worn umbra
#

The 2022.2.0f1 is really unstable for me. It often freezes when I hit the play button. Then I have to force kill the task. Do you have the same experience? ๐Ÿ™ˆ

viral sonnet
#

I'm really missing the chunk utilization

robust scaffold
robust scaffold
#

The problem is that entities debugger is written in very very slow imgui

#

Am I insane enough to port this to UIE? Hrm...

#

This actually was relatively painless to revive from the dead. So my masochistic tendencies remain unfulfilled. I'm gonna try it.

#

It looks beautiful though. Hrm.

#

I need names, what do I call this... EntityDebuggerV2. Yes. Everything DOTS has to have a V2 and V3 version

rotund token
#

1.0pre

robust scaffold
#

EntityDebugger 1.0 exp.1 YES

#

Before I go off and slice this thing apart. Here's an untested but maybe functional EntityDebugger for 1.0 pre.15

#

It seems functional but I havent put it through the ringer to see if it explodes or anything

#

This must be placed in the uppermost level of Assets/ folder because of hardcoded path. Sorry. And dont rename the folder either.

hushed fjord
#

when should I use an aspect vs just doing the functionality in a system? in my case I just need to turn raw player input into something the in-game character can interpret

rotund token
hushed fjord
#

ok

#

so in my case probably don't use an aspect because only the player needs it (?)

rotund token
#

well just because it's only player, doesn't mean it can't be used in multiple places

#

but if it's just used in a single system, personally i would not bother with an aspect

#

it seems like an extra level of abstraction for no reason

robust scaffold
#

Do you mean using the transform aspect or using the LocalTransform component or making a custom aspect for this?

hushed fjord
#

making a custom aspect

hushed fjord
rotund token
#

i dont know what you're making

hushed fjord
#

oh ok

robust scaffold
rotund token
#

maybe it was an inputaspect, that converts raw input with sensitivity etc and you could use it for plane control and player camera etc

hushed fjord
#

netcode is for multiplayer, right?

robust scaffold
hushed fjord
#

how do I get a reference to a component on an entity? I'm planning to pass it into an IJobEntity and then change its values (or should I pass in the entity itself?)

hushed fjord
#

right now I have

[BurstCompile]
        public void OnUpdate(ref SystemState state)
        {
            var playerEntity = SystemAPI.GetSingletonEntity<PlayerTag>();
            var inputComponent = SystemAPI.GetComponent<CharacterInput>(playerEntity);

            var deltaTime = SystemAPI.Time.DeltaTime;
            new ReadInputJob
            {
                InputComponent = inputComponent,
                DeltaTime = deltaTime,
            };
        }
``` and 
```csharp
[BurstCompile]
    public partial struct ReadInputJob : IJobEntity
    {
        public CharacterInput InputComponent;
        public float DeltaTime;

        [BurstCompile]
        public void Execute()
        {
            var horizontalInput = Input.GetAxis("Horizontal");
            var verticalInput = Input.GetAxis("Vertical");

            var direction = new float2(horizontalInput, verticalInput);
            direction = math.normalize(direction);

            InputComponent.Direction = direction;
        }
    }
``` but wouldn't I have to specify that it's read and write somewhere in there?
safe lintel
#

Loading Entity Scene failed because the entity header file couldn't be resolved. oh damn thought 2022.2.0f1 and pre15 fixed this

worn umbra
viral sonnet
#

that's a pain to debug. my change filter doesn't work ๐Ÿ˜ฆ

rotund token
#

to use heuristics to detect change filters running more frequently than they should

#

sadly never got around to finishing it though

viral sonnet
#

hm, i'm not finding the reason why this isn't working. version is bumped via componentLookup, yet the change isn't triggered. i've gone through every handle to eliminate any wrong bumps but just reads otherwise. so odd.

#

now i've thought about order but that shouldn't matter

rotund token
#

oh as in it's not triggering a change?

#

order shouldn't matter, at worse it'll frame delay

viral sonnet
#

yeah, chunk.DidChange is always false

rotund token
#

but it should always bump

#

it's not 2 jobs within the same system right?

#

they are in different systems

viral sonnet
#

yeah

#

state.LastSystemVersion is also correct. i'm looking at an error for something that's 2 lines ๐Ÿ˜„

rotund token
#

only thing i can think of

#

is if either a lookup or handle not having update called

#

that has safety off so it's not throwing errors

viral sonnet
#

hm, good call, let me check

rotund token
#

the only thing Update does (outside of safety) is update the global system version

#

if that's not bumped it's not going to trigger change

viral sonnet
#

hm, I have SystemAPI in place everywhere

rotund token
#

yeah it shouldn't be a concern

viral sonnet
#

but it must be something close to that

light mason
#

what is the recommended way to stop an entity from rendering ?

rotund token
#

there used to be a DisableRendering component

#

not sure if it still works in 1.0, haven't tried

#

looks like it still exists

light mason
#

is there a way to disable rendering without a structural change?

rotund token
#

Generally disabling rendering would be a long (relative) state change

light mason
#

does this not seem like a problem?

rotund token
#

how so

rustic rain
rustic rain
frosty siren
#

Does ComputeBuffer make GC when we call Release()?

frosty siren
#

In IJobEntity if I want to set parameter to NativeDisableParallelForRestriction should I place it before parameter in Execute method?

misty wedge
#

Is there no way atm to query over an IEnableableComponent's value and also set whether or not the component is enabled?

frosty siren
#

How to properly dispose BlobAssetStore allocated while baking?

rustic rain
frosty siren
#

ok, but what if i'm 0.51 guy?

worn umbra
#

How come when I pass a component to parameter of IJobsEntity's Execute, it is allowed to be written in parallel, but when I use ComponentLookup and pass it to struct instance then it complains it cannot run parallel because it is not readonly?

misty wedge
#

It doesn't allow writing across chunks

#

ComponentLookup does allow that, which is why you can't schedule it in parallel

edgy fulcrum
#

@worn umbra there's always [NativeDisableContainerSafetyRestriction] on the specific ComponentLookup if you know for sure that parallel jobs will not modify the same enity

rustic rain
worn umbra
worn umbra
misty wedge
#

Be very careful with disabling safety though

edgy fulcrum
#

yup, cat here is very correct ๐Ÿ˜‰

misty wedge
#

If you really need to write data across jobs, just schedule it sequentially instead of in parallel, or use an entity command buffer

worn umbra
#

I have multiple jobs that depend on each other, but they need to run in parallel. So the first job is calculating data for other jobs, the other jobs are waiting until the first job is done, but the first job must calculate the data in parallel. So the jobs are in parallel mode but running 'sequentially'. Disabling the restriction is the best way here. Otherwise, I would lose the power of parallel processing. ๐Ÿ™‚

remote crater
#

Silly question: Can I edit IComponentData before conversion?

#

As a gameobject in a monobehavior?

#

I should probably just piece data into a gameobject componet for conversion

#

I think thats why I have a script called ConvertSillyHaveToDoThis, lol

#

its been so long tho

edgy fulcrum
#

@remote crater yeah there's a wholly new Baker system in 1.0 which might make this easier for you ๐Ÿ˜‰

remote crater
#

TY, shunning the 1 for now

#

I'll be good to go,ty

misty wedge
#

What's the correct way to handle increasing deltatime in a predicted system? Since the prediction on the client may run multiple times, increasing the elapsed time too quickly

remote crater
#

you mean network?

misty wedge
#

Yes

remote crater
#

you run it like 10 tiems

misty wedge
#

NetCode

remote crater
#

I did this back in 2003

#

I write netcode from scratch

#

do it 10 times, average it

#

be lazy

misty wedge
#

What

remote crater
#

its like aim predicting

#

You send a ping

misty wedge
#

This is a question specific to Unity's netcode

remote crater
#

1/2 it is one hop

#

Well you can do it manually too ๐Ÿ™‚

#

Add up 10 half hops, divide by 10

misty wedge
#

My question is what the correct way to handle it is according to unity

#

They already have client side prediction built in

remote crater
#

Yah, that rollback stuff is a given

#

I actually codisovered rollback like Libnietz to Newton back in 2003 too

#

Midway told me I was a noob and rollback would never work

#

now all the fighters use it lolololol

misty wedge
#

Unity doesn't use rollback netcode

#

It's server authoritive

remote crater
#

client side prediction is rollback

misty wedge
#

Fighters usually don't use server authoritive models

remote crater
#

the angle they hold the controller is the direction they go til next packet

#

P2P or Server, same concept

#

Last input is sent in packet

#

One hops directly halving latency

misty wedge
#

The server never rolls back in a server authoritive model

remote crater
#

If it sends the controller data of the direction you're walking

#

to simulate the 25 ms

#

Its rollback, or maybe I dont' know what you're talking about

misty wedge
#

The client rolls back, the server never does. In a p2p rollback system everyone rolls back

remote crater
#

ok yah

misty wedge
#

It's actually very different, considering p2p rollback systems need to be 100% deterministic, as they only share inputs

remote crater
#

not really,server just has a solid world

#

p2p kinda nebulous

misty wedge
#

You would desync if they don't simulate the same

remote crater
#

Same concept of sending the controller

#

Server is actually easier to code this way

misty wedge
#

Yes, definitely

remote crater
#

p2p is only marginally more difficult tho

misty wedge
#

That's why they are quite different

#

Desynchronization is much less of an issue if you have a server

remote crater
#

p2p's biggest failure is you need to counter hack like a crazed wildebeast

#

I never got a deynch when I played my private mmo in 2004-2005 with friends.

misty wedge
#

Very cool, but that doesn't really help me

remote crater
#

Sorry! Love ya man

#

We talking nonsense, lets get to work! HEY MON!

#

I'm just an idiot who likes to reinvent the wheel and code from scratch, thought I was helping by doing ABC, but they probably have a package D that does it all for you.

edgy fulcrum
#

@remote crater are you using IConvertGameObject and stuff in 0.51? you can simply do that in GameObjectConversionSystem

#

how do I convert a System.Guid to Unity.Entities.Hash128?

misty wedge
#

Pass in the guid's string?

#

Remember to use the non-dash formatter of System.Guid though, since unity's GUIDs don't have dashes

robust scaffold
#

It begins

#

Does anyone actually use the search bar filter systems list?

edgy fulcrum
#

@misty wedge yeah, I had to revamp some calling code to use Hash128 everywhere ๐Ÿ˜‰

misty wedge
viral sonnet
#

can someone give the gist for GlobalSystemVersion?

#

i thought GSV is incremented for every system update. this comment makes it a bit more nuanced /// <summary> /// The current change version number in this <see cref="World"/>. /// </summary> /// <remarks>The system updates the component version numbers inside any <see cref="ArchetypeChunk"/> instances /// that this system accesses with write permissions to this value.</remarks>

#

so my question is, what counts as write permission? the query, the component type handle read state, the access via GetNativeArray?

tired mulch
#

Is it possible to disable a component in a baking system? Because this doesn't seem to have any effect

    [WorldSystemFilter(WorldSystemFilterFlags.BakingSystem)]
    [BurstCompile]
    public partial struct InitializationAbilitySystem : ISystem
    {
        public void OnCreate(ref SystemState state)
        {
        }

        public void OnDestroy(ref SystemState state)
        {
        }

        [BurstCompile]
        public void OnUpdate(ref SystemState state)
        {
            var ecb = new EntityCommandBuffer(Allocator.Temp);
            foreach (var ability in SystemAPI.Query<AbilityAspect>())
            {
                ecb.SetComponentEnabled<Ability>(ability.Entity, false);
            }
            ecb.Playback(state.EntityManager);
            ecb.Dispose();
        }
    }
viral sonnet
#

add the options to the query .WithOptions(EntityQueryOptions.IncludePrefab | EntityQueryOptions.IncludeDisabledEntities)

#

and subscene needs to be closed. (might be fixed in pre15)

tired mulch
#

Alright thanks, I'll try it out

robust scaffold
viral sonnet
#

i get this for every subscene now [Worker0] 1 entities in the scene 'Essentials' had no SceneSection and as a result were not serialized at all.

#

anyone else? no idea what that's supposed to be. didn't get it in 1.0exp

#

and i'm not finding this damn bug that my changefilter isn't triggered... args

#

this is utterly frustrating right now ๐Ÿ˜„

robust scaffold
robust scaffold
#

I dont think anyone uses the system search...

viral sonnet
#

good call, maybe that will help me

viral sonnet
robust scaffold
viral sonnet
#

journaling is less helpful than i thought (used it for the first time) - not even the version number is reported

viral sonnet
#

hm, why am i not seeing the version in journaling? EntitiesJournaling.AddRecord( recordType: recordType, entityComponentStore: store, globalSystemVersion: version, entities: &entity, entityCount: 1, types: &typeIndex, typeCount: 1, data: recordData, dataLength: recordDataLength); it gets saved

rotund token
#

journaling is more about changes

#

but yeah as you point out, i did think this state was also saved

viral sonnet
#

fun with numbers ๐Ÿ˜„

#

so, yeah. the system version is ahead even when the version gets bumped. hm

rotund torrent
#

This is a known issue in 1.0-preview; it's called out in the physics release notes. Basically if you have non-identity scale and either physics interpolation/extrapolation on an object, the baking code tries to add PropagateLocalToWorld from two different places, and that's not allowed. We have a fix planned, but it didn't make it into the preview release. For now, the easiest workaround is to temporarily disable smoothing on these objects.

robust scaffold
#

Although now that I've disabled it, i see 0 difference between interpolated and non-interpolated graphics

rotund torrent
rotund token
#

I think he wants to have a query with NotEnabled

#

but i think None works for this

#

oh wait no i might be wrong with what he's saying

rotund torrent
#

Well FWIW "create a query that matches 'with + disabled' only, rather than 'with + disabled, or without'" is literally the Jira ticket I have open right now. I can't promise it'll be there for 1.0, but consider it in progress.

robust scaffold
#

More query logic is always good.

viral sonnet
#

i'm confused how that should even work. the calculate system is lagging behind in version, so when it bumps the version the combat effect system doesn't get the memo there was a change

rotund token
#

last system version is assigned on after update

#

what is calling increasing stack size

viral sonnet
#

in calculateSpellContainer

rotund token
#

the line below it that is debugging global version?

#

because it doesn't seem to have bumped it to global version which is what it should be doing

#

you're not doing a manual version set or something are you and using last version instead of global?

viral sonnet
#

i output the global version in the first line of update

rotund token
#

oh

#

4 lines above

#

well yeah then it's somewhat clear what is happening though i dont know why

viral sonnet
#

when i increase the stack size it gets bumped (correctly?) to the global version of calcspellcontainer

rotund token
#

wait are these logs out of order

viral sonnet
#

hm, possible. the tick is throwing me off

rotund token
#

the ordering of this is off

#

it's like you're missing a dependency or something

#

combateffectsystem is calling update spell effect?

viral sonnet
#

yes

rotund token
#

the job is updating before the version bump

viral sonnet
#

hmm

rotund token
#

just to confirm i'm reading this right

#

based off your log

viral sonnet
#

i should output time. tick is only 60fps. the spell container is a bit more complicated as it can get called in different stages. :/

#

my lack of understanding where and why global system version gets bumped is biting me ๐Ÿ˜„

rotund token
#

global system version gets bumped every system

#

in the pre-update

#
        {
            BeforeUpdateVersioning();

        internal void BeforeUpdateVersioning()
        {
            m_EntityComponentStore->IncrementGlobalSystemVersion(in m_Handle);```
#

the one gotcha here (which I don't really know why)
is this happens after OnStartRunning

#

so every system just increments globalsystemversion by 1 on update

#

and then in AfterOnUpdate it sets last system version to global

viral sonnet
#

i made a thread. the part i'm confused about is the very different global system version number.

viral sonnet
#

wah Loading Entity Scene failed because the entity header file couldn't be resolved. make it stop

#

how can this break on recompiling

#

any way to burstcompile this? findPathArchetype = state.EntityManager.CreateArchetype( typeof(FindPath), typeof(PathBuffer) );

viral sonnet
#

haha yeah, but what then?

robust scaffold
viral sonnet
#

thanks

robust scaffold
#

You can also use a NA but it wont be inline.

robust scaffold
# viral sonnet thanks
_request = state.EntityManager.CreateArchetype(new NativeArray<ComponentType>(2, Allocator.Temp)
            {
                [0] = ComponentType.ReadWrite<GoInGameRequestRpc>(),
                [1] = ComponentType.ReadWrite<SendRpcCommandRequestComponent>()
            });```
viral sonnet
#

readwrite or readonly doesn't really matter here, right?

robust scaffold
#

No

viral sonnet
#

hm, now i'm already rewriting this. how would you design an archetype that's used in multiple jobs? return it from a static method?

rotund token
#

Helper struct or aspect

viral sonnet
#

so static helper method that returns the CreateArchetype and then cache it in the system?

rotund token
#

I don't use many statics like this

#

Usually just structs with the logic and the constructor can setup stuff

#

If all you're doing is wrapping a create archetype though

robust scaffold
#

I mean, just using AddComponent isnt that expensive.

rotund token
#

Static method seems fine

rotund token
#

on this size archetype though yeah

#

2 archetypes vs 1 isn't a huge deal

misty wedge
rotund token
misty wedge
#

It won't complain of aliasing then?

rotund token
#

i think you'll have issues in IJE atm though unless you only use Lookup

misty wedge
#

Ah ok

rotund token
#

you can't pass handle + lookup without aliasing complaints

misty wedge
#

I used a component lookup and disabled safety ๐Ÿคทโ€โ™€๏ธ

rotund token
#

yeah

#

if you use IJC it'd be fine as well

misty wedge
#

But I'm lazy pensive

robust scaffold
misty wedge
#

So many letters I need to type pensive

rotund token
#

personally my IEnableable components are only tags so kind of avoids this aliasing issue

misty wedge
#

I'm trying to write client prediction for a graph system, but I'm messing something up and some client nodes are being executed multiple times when rolling back. Do I need to check IsFirstTimeFullyPredictingTick as if I were predicting spawns?

safe lintel
#

if a component tag isnt enabled, I assume it doesnt match a query then?

misty wedge
#

Yes, it wont match unless you set the option

robust scaffold
#

my god is UI development so painful

#

Game view? What's that. I wish I had a 4k monitor at this point. So many windows

#

The UIE debugger is a godsend though.

viral sonnet
#

dock some of this stuff ๐Ÿ˜„

#

no 2nd monitor?

robust scaffold
#

I dont wanna go to the lab just for another monitor. Too lazy

viral sonnet
#

lol

rotund token
#

would the lab really miss a monitor ๐Ÿ™ƒ

robust scaffold
#

They're really good monitors and definitely will get pissed at me walking out the door with one of them

viral sonnet
#

how are you even able to develop with just 1 monitor?

robust scaffold
#

You see that screenshot? That's what im looking at

rotund token
#

it's just got tv, twitch or something on it at all time

#

i'd probably develop better with just 1

#

also discord - huge distraction

safe lintel
#

that sounds awfully familiar ๐Ÿ˜€

viral sonnet
#

discord is distracting? wait what?

pliant pike
#

glad I'm not the only one

rotund token
#

i do have an ultrawide as my primary though

#

which is glorious for development

#

i'd love to get a new, high hz one, but $

#

this ultrawide must have been one of the first, had it for years

#

no regrets on the purchase though

viral sonnet
#

what's the resolution for your ultrawide?

rotund token
#

this has been annoying me recently

rotund token
pliant pike
#

wish I could fit one on my desk

rotund token
#

i'd consider a 1600 next time (didnt exist when i bought this)

viral sonnet
rotund token
#

i on the other hand, so much unity space

viral sonnet
#

1st world problems

rotund token
#

it's so good. i would definitely take an ultrawide over 2 monitors these days

rotund torrent
viral sonnet
#

would you say we can ignore system based caching because of this?

rotund torrent
#

Archetypes are automatically cached per-World, not per-system.

viral sonnet
#

ok, i mean, i have like 3 different systems where the same archetypes is used in a job so i cache the archetype in the systems

robust scaffold
rotund torrent
#

If you want to be absolutely certain that multiple systems are using the exact same archetype, then it would make sense to create it once and cache the archetype handle somewhere for them all to share. But in general there's no need to aggressively de-duplicate archetype creation

rotund token
viral sonnet
#

yeah i think 4k is cool for tvs or gaming but not great for development. everything's too small

rotund token
#

i also find the extra horizontal space more useful than vertical

#

but we have devs who like their 4k so to each their own

#

other people can be wrong ๐Ÿ˜„ ultrawide superior

viral sonnet
#

friend of mine was a very early adopter of 4k and he lost his mouse constantly until he used mightymouse or whatever that tool is called to make it big and shiny

#

now that was fun playing lol with him

#

yeah agreed, horizontal screen space is much more useful

#

artists like their 4k monitors a lot from what i know

robust scaffold
#

I think for artists, it's more pixel density than size

viral sonnet
#

yep, which makes a lot of sense

robust scaffold
#

The one in the lab is giant. I thought it was a flat screen for a second until I walked by someone hooked up a scintillator display to it.

pliant pike
#

its crazy we still havent got proper scaling and resolution agnostic software on windows

viral sonnet
#

now i think where we can all agree, curved monitors are trash

pliant pike
#

definitely I despise them and don't understand how anyone uses them

robust scaffold
rotund token
#

it's very slight curve, you don't notice it

#

but when compared side by side to a flat ultrawide at same resolution

#

i actually prefer the subtle curve

gusty comet
#

my ultrawide is curved too - I worked with a flat ultrawide for a while, but there was a slight colour distortion at the edges that bothered me

safe lintel
#

i dont like 4k but then again my eyesight kinda sucks and unless its a mac windows dpi scaling still has issues with some programs

viral sonnet
robust scaffold
gusty comet
#

i think mac benefits from a limited hardware set they are developing against - MS has to develop against very wide hardware bases

rotund token
#
{
    fixed (SystemState* state = &systemState)
    {
        this.systemState = state;
    }

c# question, is there a nicer way to get the pointer to a systemstate ref?

#

UnsafeUtility.AddressOf doesn't work since SystemState is a ref struct

viral sonnet
#

hm, so the curve helps with color distortion? i've honestly not taken this into account. never had an issue with that on my flat monitors

rotund token
viral sonnet
#

no, not ultrawide ๐Ÿ™‚

gusty comet
#

curve means the angle between your eyes, and the plane of the screen is less therefore lower chance of colour distortion

pliant pike
#

I'm more concerned about the problem of straight lines being distorted, and how it effects things like 3d modelling and sculpting

rotund token
#

i think 4k is better for artists

#

i just think the ultrawide format is great for coding/unity work

gusty comet
#

quick DOTS question - does anyone use the GameObject -> ECS conversion as their way of doing DOTS dev? or are you all developing components / systems from scratch? The whole GO -> ECS feels a bit... icky to me

harsh marsh
rotund token
harsh marsh
#

If you sit so close to a big screen the curve makes sense

robust scaffold
rotund token
#

don't think of it as GO -> Entities
think of it as Authoring -> Runtime data

pliant pike
#

one of my projects I just use pooled game objects directly in Systems

#

there's lots of different ways to do things

gusty comet
#

hits me a bit weird to architect with OOP in mind, and then run it through a conversion process to reach a DOD structure

#

but hey.. if it works, it works right?

robust scaffold
pliant pike
#

there's a vid posted on Unity recently about similar https://www.youtube.com/watch?v=RhU8NZtgYp0&t=944s&ab_channel=Unity

Learn more about working in a GameObject / MonoBehaviour space based on data-oriented design. This session walks you through how popular game Indus Battle Royale uses its DOTS-based GenericLOD to scale conventional GameObject-based systems for animation, rigs, assets, and visual effects.

Speaker:
Rohan Jadav, Platform Engineer (SuperGaming Pte ...

โ–ถ Play video
gusty comet
#

thanks, i'll watch it tomorrow whilst i'm... 'working'

rotund token
proud jackal
rotund token
#

thanks for confirming

#

not a huge deal, just wasn't sure i was missing something in c#

viral sonnet
#

programming is at its best when past-self has thought of everything

edgy fulcrum
#
  at Unity.Entities.TypeManager.BuildComponentType (System.Type type, Unity.Entities.TypeIndex[] writeGroups, System.Collections.Generic.Dictionary`2[TKey,TValue] hashCache, System.Collections.Generic.HashSet`1[T] nestedContainerCache) [0x0031c] in T:\TC-Terrain\Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Types\TypeManager.cs:2886 
  at Unity.Entities.TypeManager.BuildComponentType (System.Type type, System.Collections.Generic.Dictionary`2[TKey,TValue] hashCache, System.Collections.Generic.HashSet`1[T] nestedContainerCache) [0x00001] in T:\TC-Terrain\Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Types\TypeManager.cs:2761 
  at Unity.Entities.TypeManager.AddAllComponentTypes (System.Type[] componentTypes, System.Int32 startTypeIndex, System.Collections.Generic.Dictionary`2[TKey,TValue] writeGroupByType, System.Collections.Generic.Dictionary`2[TKey,TValue] descendantCountByType) [0x0008e] in T:\TC-Terrain\Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Types\TypeManager.cs:2550 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Unity.Debug:LogException(Exception) (at Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Stubs\Unity\Debug.cs:19)
Unity.Entities.TypeManager:AddAllComponentTypes(Type[], Int32, Dictionary`2, Dictionary`2) (at Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Types\TypeManager.cs:2573)
Unity.Entities.TypeManager:InitializeAllComponentTypes() (at Library\PackageCache\com.unity.entities@1.0.0-exp.12\Unity.Entities\Types\TypeManager.cs:2451)```
#

why is my asset import logs getting spammed with hundreds of the above? I think it's triggering a SIGSEGV somewhere in the end of building addressables ๐Ÿ˜ฆ

rotund token
#

update to pre 15

#

this issue is significantly reduced

#

a variation still happens on occasions but it's a lot rarer

edgy fulcrum
#

im using 2022.2.0b16, I dont see it in the pkg window?

rotund token
#

no idea, i believe it should appear.

#

you can update to 2022.2.0f1 as well if you want

#

but just add it manually then if it's not appearing for you

edgy fulcrum
#

yeah thats a good hack there, lemme try that

rotund token
#

been out for like a week?

edgy fulcrum
#

yeah roomies moved in, been a hectic time ๐Ÿ˜‰

rotund token
#

there is still at least 1 failure in subscenes

#

but yeah i only get it ever few hours on general instead of every recompile

#

so it's much more usable

edgy fulcrum
#

yeah im hoping with every update I get less wonky errors in figuring out how to load prefabs as subscenes ๐Ÿ™‚

rotund token
#

byte* ptr = null;
var source = ptr + (i * size);

#

this won't cause issues as long as i don't actually use source right

#

i'm assuming this simplifies down to basically var source = 0x00.. + (i * size);
(Kind of just rubber ducking the channel ^_^" serialization is confusing)

coarse turtle
#

yea

hot basin
#

are managed components still a thing?

#

can't fing any info how use them with bakeing

late mural
#

wondering, is there a Unity.Mathematics version of Mathf.PerlinNoise?

void ravine
late mural
#

perhaps pnoise is perlin noise? (is there a wiki for unity mathematics btw?)

edit: it seems that actually cnoise may be perlin noise, according to some random forum posts atleast

safe lintel
#

@hot basin yeah AddComponentObject and AddSharedComponentManaged exists in bakers

misty wedge
#

Is the tick where an InputEvent is sent not guaranteed to also have the other values set correctly when the server receives it?

hot basin
#

and anyone know how skinned mesh works? I'm looking at the sample and it seems complex

misty wedge
#

Seems kind of pointless to automate the handling of one off events if you can't send any additional data with those events..

rotund token
misty wedge
#

Yeah

rotund token
#

what do you mean by inputevent?

#

(is that an actual component or yours)

misty wedge
#

No, it's part of netcode

#

It automatically handles one off event execution on the server

rotund token
#

ah i haven't really used it since 0.51

misty wedge
#

Yeah I'm in the process of migrating some stuff to the new stuff, but this is behaving very strangely

rotund token
#

is this not just designed to fix the bool jump problem

#

people often run into

misty wedge
#

No idea

#

This is my command component

#

And if I set UseAbility on the client, and set the UsedAbility to a value in the same frame, while UseAbility is set on the server on the same tick, the UsedAbility is invalid

#

^ client code

#

Not sure if this is a bug, unsupported behaviour, or if I'm doing something wrong

#

But it seems odd that you can't send some kind of payload for your one off event

#

It's also random, sometimes the data will be there, sometimes it won't

rotund token
#

i lost interest with netcode when my changefilter support broke
(and the work flow for no-prediction physics is now problematic)

#

and i'm waiting till it's fixed again so yeah haven't kept up with 1.0

misty wedge
rotund token
#

well they have a predicted physics world right

#

and non-predicted or client stuff must exist in a second world now

misty wedge
#

Ah, you meant you want to use physics but not have it be predicted

rotund token
#

but my netcode project has no predicted ghosts

#

and it used to work really nice but now i basically have to double simulate physics for no reason

#

to get it to work with client only physics objects

#

i know how to fix or workaround it, i just cbf atm

#

no change filters significantly wrecked my client performance anyway

misty wedge
#

I don't think I've ever used a change filter jamcat

misty wedge
#

But I'm assuming i'd need to actually write my code so that they make sense, since otherwise my chunks would change each frame anyways

rotund token
#

yes it's kind of the problem imo

#

you can't just add them later