#archived-dots
1 messages ยท Page 47 of 1
what line is your error on?
it would imply you're doing someting like
object a = (object)1;
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?
dots supports both urp/hdrp
ty
it doesn't take me to a line but it says Boxing a valuetype Geometry.Bezier to a managed object is not supported so i presume the first case statement
can you show me deform job
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;
}
}
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
T is an interface or at least restricted to one
but its declared unmanaged every step of the way aswell
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
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!
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
Yeah, your way does seem easier. Thx for the tip.
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
ah good point
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
what's happening on main thread here?
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
Most probably your jobs are just scheduled with a huge gaps inbetween?
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
yeh thats what it is i call them in a loop after instantiate
not sure if its worth changing that im not likely saving any time
unless unity optimises their instantiate method
already done a 180 on aspects
going to make building a requirement library so much easier
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?
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
ResolveSystemStateChecked can do it but it's internal
ResolveSystemStateRef from WorldUnmanaged
why not? just get system state and modify it
it requires unsafe context ughhh
has it ever been a problem though?
no problem with unsafe stuff at all, but you know creating separate asmdef for things which needs control over systems
how?
hmm, didnt't know about that, thank you!
public ref SystemState ResolveSystemStateRef(SystemHandle id)
isnt internla
Or unsafe
I see only World.Unmanaged.ResolveSystemState which returns pointer
I'm on 0.51
What do you mean?
I figured it out the hard way ๐
#archived-dots message
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
What do you mean?
1.0 ?
yep
๐ฌ 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 ๐
Well, the only reason to be using LTS is for production development and if you're attempting to use 0.50 for production, uhhh.
Is it possible to use interfaces with native arrays?
or is there some other way of using interfaces with arrays in jobs?
No, of course not. But if want to update all stuff i have to 0.51 and then to 1.0, so I still on 0.51
in what way?
public interface IInterface {
public void Run(SomeJob job);
}
public struct SomeJob : IJob {
public NativeArray<IInterface> thingsToRun;
}
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
No. What you can do instead is:
public interface IInterface {
public void Run(SomeJob job);
}
public struct SomeJob<T> where T: unmanaged, IInterface : IJob {
public NativeArray<T> thingsToRun;
}```
Thanks! I will look into it
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
@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.
Remarks dont show up for me either.
It shows up once the full thing is typed out.
I can't seem to get that either :/
That second ss is from me hovering over the method.
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
you definetely don't want that, because it's the reason why ECS exists in the first place
it's slow
in ECS instead you process each "interface" in independent query
Interfaces are fine if you want generic jobs though
talking about exact use case was mentioned
kind of what I meant actually
that's one way to do it
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?
mono development build?
yeah
no clue then, dots shouldnt have any effect on compilation. It's just a pile of c#
are you on burst 1.8?
our build times at work went from 10min to over 40min and it's 35min of burst
same version of unity for last year
no, i'm on 1.7.3
that is so old o_O
lol sorry, typo
haha ok that makes much more sense
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.
so is content management == dots addressables? tbh i thought it would deal with entity prefabs and not gameobject resources
addressables is all about solving having to load every asset into memory at once
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
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
Im gonna try and hook up the native dots sprite renderer again. Performance of it is horrible but it works.
wonder if the updated megacity sample will use gameobject audio or just nix it altogether
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
Doesnt work :(
My own custom light renderer
sounds about right
And please, poke the 2d sprite renderer guys to reconnect sprite renderer group API.
It worked back in 0.17 so... plz.
If you haven't already, you probably want to mention how relevant this feature is to you on the DOTS Roadmap page: https://unity.com/roadmap/unity-platform/dots
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.
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
dota clone? nice ๐
was never a game, just a sample scene as an inspiration to test tech
i have spent time wondering how the hell a dota ability system would look like in ecs
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
how would aspects help with that system? You mentioned last night
oh just writing the conditions
because this is one place that is many write, 1 read
If it would be a multiplayer game with Netcode for Entities and abilities can't be used often, maybe they could be RPCs.
previously i had helper structs / extension methods
which i can just cleanup with aspect
i wouldn't use RPCs
i'd want my system to work with or without netcode
But you can only use abilities every few seconds at most, right?
my game uses netcode, but i write all my libraries standalone without netcode
So maybe you could add and remove a component.
i always test with a minimum of 100k actors
Damn.
Then I guess you would just add an extra field to your component that stores player/character input.
but 100k is bare minimum my library must support for me to be happy
RequestedAbility or something like that.
When the player/character isn't requesting to use an ability, it's some kind of null value.
why can't use 2 abilities at once
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)
is this a scheduling conflict? feels like something i should be able to fix but having a hard time trying to figure it out
sounds like your using EM after doing an Update on Handles
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
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 ^_^'
Is possible to get RigidBodyAspect somehow in IJobChunk?
try the RigidBodyAspect.ResolvedChunk
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)
thx
which gives you an indexier, which you can index to get your RigidbodyAspect
Sprite renderer isnt on the list, so sad. Tiny 2d sprite renderer is dead.
the 26th of November will forever be known as "KornFlaks writes his own sprite renderer day"
i dont want to though, it's so painful
it's just that companion GOs are very broken with netcode
that's i wrote my own little simple hybrid system for it
hm maybe its an isystem bug? error doesnt show after reverting back to systembase
๐ฑ Anyone notice that Unity 2022.2.0f1 can't build android? Not sure whether this issue will be fixed when going public
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.
.... well. I guess I wont try building then
Are you using the logging package?
Or was that just a dependency
I haven't seen anyone else use it
Dependency. Netcode requires it
Physics and companion GOs also break the build
Yea, just everything is broken it seems. Oh well
Ah shame. I've been trying to get myself to use the logging package more instead of debug log
Gonna build an empty scene. Lets see if this works.
Seems to be burst at fault for your failures?
No systems being added. If this doesnt work. Nothing will.
Tried an earlier version?
Not yet, gonna see if this runs without error first. Building an empty scene takes a while.
Ha, no
Are you using IL2CPP? What's your code stripping level?
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
i'm having no issue building with physics and logging package
threw netcode in the library as well and had no issue making a build
Hrm....
Mono, no stripping
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
Limitation of aspects right now.
Im making a fresh project in 2022.2F and it's building properly. Transferring over folders manually and all are building properly. Hrm, I think the upgrade from 2019LTS might have broke something
What error are you getting?
A bunch of burst errors. And with this new build, none of the burst errors but I do have a type not found error so hrm
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
Yea. It builds without problem. Seems like a problem with an old project repeatedly upgraded from an old version
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
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
Latest I see is b16?
You need the direct link, give me a min

unityhub://2022.2.0f1/1c1f8590be28
type that into your browser's url
preview build yea
Any idea if il2cpp builds work on that version?
maybe? I just got mono building and havent tried il2cpp yet
Does anyone know adding a tag is a structural change in DOTS alpha 1.0?
Yes. It's still a component
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
What is "this"?
I dont know what your code is nor what you want to achieve
I want to define a large set of interactions at objects and specify this actions by tags
Will you be needing to change those tags every frame or so?
Yes, almost every frame
Then use an empty component that inherits IEnableableComponent. Toggling enabled / disabled is not a structural change.
Oh, yes I forgot about this. Is EnableableComponent are include object in queries, if it disable?
No, if you use the enabled mask in an IJobChunk and is automatically filtered out if you use IJobEntity
Thanks
I was going to suggest nuking the library folder given the multiple upgrade context. Glad to hear it's sorted out now though
Yea, I made a new project and copy pasted all my asset files. Should've did that the first thing as I was changing major versions (from 2021LTS to 2022.2)
does netcode support transforms V2 in pre.15?
yes
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
anyone has any idea what is current version for API for source generators in 2022.2?
What do you mean?
Microsoft.CodeAnalysis.CSharp version for 2022.2
Which is it?
I'm learning source generators and 3.8 version mentioned in manual seems sus
Hahaha whaaaAaAaat i would never :3
Incremental Generators in 4.0.1 is compatible too
does that mean I can use 4.0.1 package?
I am really just learning and trying to make my first field generator, so fancy words don't work on me ๐
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
they have their own type handle type
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'
how does it even work for you in pre codegen code?
What do you mean?
Compiler should not even allow this to compile
It doesn't
It works if I don't use SystemAPI
(since that won't codegen the component handle then)
well, your job field for shared comp doesn't match output of SystemAPI
Are you doing ComponentTypeHandle<SharedComp>?
oh ok
It's getting put into the code-gen'd file twice for some reason
you might want to check codegened file
๐ค
You should be able to use 4.0.1 in Unity 2022.2.10b+ (and possibly even earlier than that, tho i don't remember the version we added the support ๐)
could you check? or maybe I somehow?
Manual mentions 3.8.0 only
oh wait
nvm you meant Unity version
๐
Alsp that edge case is odd! Could you share a minimum repro for me to look at?
Yuppp.. docs weren't updated but the version works
If I can replicate it outside of this file sure
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
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/
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. - roslyn/incremental-generators.md at main ยท dotnet/roslyn
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
@proud jackal Are there any efforts to include a [WithOrderFilter] to IJobEntity?
Just tried, i can not replicate the same issue. Codegen works for me.
It breaks if you request a shared component inside an IJobEntity and also get the shared component type handle with SystemAPI
https://hastebin.com/odoxuyiniv.hs
You're the first to request it, but duly noted โ๏ธ
Huh, would've seemed logical to expose all functionality of a query as tags for IJE.
Thx for sharing! Imma take a look ๐
That's an odd use case. What are you trying to do with a component tag inside a IJE?
Seconding this, IJE scheduling with a SharedComponentFilter would be really nice
Probably not with a tag but an extension function
new IJE{}.WithSharedComponentFilter(value).Schedule()? Kinda going back to lambda EFE at that point...
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
The one thing I wish IJE had from EFE is the .WithStoreQuery(ref value) or whatever it was called.
Yes, that one would also be nice
And I think the issue with EFE wasn't the extension functions, but the lambdas
And scheduling wasn't burstable.
And if you used intellisense, typing anything inside the EFE lambda would stall the IDE with all the options.
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
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 /
Can you have entities inside blob assets at bake? Do they properly remap when streamed in?
No
only icomponent and ibufferelement will remap
ugh
i suspect unmanaged isharedcomponent is possible but just wasn't setup because of the historically they were all managed
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.
Nah, it's a singleton. Shouldnt change.
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.
Huh, it's back
Yea. This time I created a new baker and everything decided to die.
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
โค๏ธ
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
yes
No? You should be able to set it equal to a variable then reuse it.
oh yep you figured it out
yeah they moved it to a new asmdef
yeah, assembly is Unity.Entities.UI.Editor and namespace is Unity.Entities.UI - glad they moved it
huh? that threw a lot of errors if i reuse the handle. that was in 1.0exp
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
oh, no, i'm talking nonsense but i needed to update before the 2nd job
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)
maybe i need to test again. slowly going through the systems. can't remember exactly where that system was but i'll find it ๐
spent the last 2 days just building auto formatting rules for my code/libraries
wow, what is it able to do now?
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();```
-_-
think i'll just disallow on methods, enforce on properties
a sane person would be like, case by case basis
but not me
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
i'd like to allow them on operators
but rider doesn't differentiate between other methods
can't even filter for keywords? just method, yes/no?
only these options
Huh. So you can't nest subscenes inside subscenes?
i always always surprised this worked for you tbh
Well it died now. Hrm. Gonna find another way
i've just grouped them with a few prefabs
I hate that prespawned entities in netcode must be assigned a gameobject beforehand
not sure what you mean or the problem you have
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
I have a tilemap, 2048x2048. I want an entity every 8x8 tiles. That means about 66k entities. I dont want to manually assign 66 thousand entities.
ah how are you doing a structural change?
i imagine you're doing something like
GetSingleton
single schedule job that reacts to removed effects and then added effects
is there a complete or something between these jobs?
yes
ah yeah ok that makes sense
update is valid until a structural change
that's why it has to update!
(and global version)
yeah, right. i'm surprised SystemAPI.GetEntityTypeHandle() gets that
think it just calls update at that point
Update is free for EntityTypeHandle (it's a no-op without safety)
and it's a single uint assignment for components/buffers
ok, it generates 1 handle and calls update 2 times. like it should. cool
so it's really no big deal if you have to update multiple times in a system
system code gets nicer every new version ๐
did you see dani leaked default interface methods ๐
it's all we need
no more oncreate/ondestroy
are you talking about the IJobEntityChunkBeginEnd?
no
oh okay
interface with
void OnCreate() {}
so you don't need to implement oncreate/ondestroy
if you don't use them
nice!
with all this systemapi stuff my oncreates are often empty now
so it'll be so nice to just not have them
wait whats the api helps with Oncreate?
yeah i just have queries and some singleton dependencies now in create
you can remove empty OnDestroy/Create now
but i have no idea how that works because i get errors ๐
you can't yet
read ^
ok ๐
default interface methods will allow this, and this version of unity supports it
This is pain.
But I guess this is a viable way to clone prespawned entities without going through the hoops of baking.
when does it even need to change?
yeah
but i mean, once you set this up once, how often do you even need to run it again
Every time I change tilemap dimensions. As long as I dont resize the TM, it doesnt change.
@rotund token wait is that to just get rid of typing oncreate or to auto cache state.GetComponentTypeHandle? i dont quite follow
you wouldn't need to implement oncreate
[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
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?
yeah whatever size you set the buffer is the size of the buffer that will serialize
I'm just worried because I have these giant 2M float sized buffers that are setup at runtime but not at bake.
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
how can i hide the sytems showing up in the entities hierarchy, or do i just have to live with it?
Either select the Authoring mode in the orange circle or live with it.
For some reason that also hides my entity??
It hides entities not inside subscenes yes.
Yeah I just realised what you meant by authoring mode, hmm
if you're manually spawning these entities and still want to see them, then you'll have to live with it.
Yeah I'll make do, thanks for help ๐
If you really want to remove the systems, you can put together an editor extension script to modify the entity hierarchy list to filter out systems
what happened to the entities hierarchy filter? filtering comps doesn't work anymore
i think its c= not c: now
which is a really weird change imo
considering : is standard filtering in project window etc
and the search window
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
is it possible to do filter multiple components?
@viral sonnet i dont know but i even have a different dropdown box from tertle
Tertle's dropbox is his own extension.
tertle has his custom filters
oh looks so good thought that was standard ๐ฆ
but yes i consider this mandatory for the package
1.0 is currently a huge regression to 0.17 entity debugger for filtering
possible to filter multiple components? i cant figure it out if it is
ah ๐
which is useless, i really don't understand who would ever want to use this
entity debugger my beloved..
i would say >99% of time All would be the desired filter
i am 95% there to porting over the entirety of entity debugger from 0.17
so can you guys filter in 1.0pre15? ๐
yes
you gonna port the chunk visualization? never personally had a need for it but thought it was a neat tool
wth, why is this not working for me. ๐ค
and i have to assume that visualizer was really useful for others who absolutely needed to optimize chunk use
I'm no smart enough to change anything with the debugger though
@rotund token If i port it, are ya willing to take up the job of maintaining it in your library?
๐ข
not even hesitation ๐
i'm testing more, i can break it with certain components
which is not great
Im gonna do it anyways. Because this alcoholic had their drink taken away cold turkey and I've been getting the shakes ever since.
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 -_-
ok, damn
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
just restarted the editor in hopes it would fix something. no matter which comp i pick i juts get every entity returned
ah yeah i'm in runtime
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
nope
haha, yeaaaah. i'm not using your library but i found customHierarchy ... ๐คฆโโ๏ธ
well, fixed. sorry for wasting your time :/
not a waste, you pointed out my library was broken ^_^'
hehe ๐
anyway i'm super happy they changed it to All
switched my filter to give Any option instead for super rare cases
yeah about time. i love the defensive comment. "most users prefer it that way" - instead of, it never made sense to begin with ๐
It's back baby
Horribly optimized but I'm shocked with only a few cleanups here and there, it functions.
whoa cool!
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
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? ๐
I'm really missing the chunk utilization
Thats a uncaught native asset database crash. Happens occasionally to me as well. Cant get it nailed down yet for a repo though.
Yea, it's so good to click on an archetype and then see all entities that are part of the archetype as well
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
1.0pre
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.
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
I would say first thought is if the aspect is going to be used in multiple places
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
Do you mean using the transform aspect or using the LocalTransform component or making a custom aspect for this?
making a custom aspect
curious, how would I use it in multiple places?
i dont know what you're making
oh ok
Do you plan on using the netcode package?
maybe it was an inputaspect, that converts raw input with sensitivity etc and you could use it for plane control and player camera etc
no
netcode is for multiplayer, right?
ah I see
Yep. if ya dont plan on using netcode, continue listening to tertle.
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?)
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?
Loading Entity Scene failed because the entity header file couldn't be resolved. oh damn thought 2022.2.0f1 and pre15 fixed this
haha, I think you are just lucky for a few minutes, it will happen soon again. ๐
that's a pain to debug. my change filter doesn't work ๐ฆ
i was actually writing tooling for this a while ago
to use heuristics to detect change filters running more frequently than they should
sadly never got around to finishing it though
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
oh as in it's not triggering a change?
order shouldn't matter, at worse it'll frame delay
yeah, chunk.DidChange is always false
but it should always bump
it's not 2 jobs within the same system right?
they are in different systems
yeah
state.LastSystemVersion is also correct. i'm looking at an error for something that's 2 lines ๐
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
hm, good call, let me check
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
hm, I have SystemAPI in place everywhere
yeah it shouldn't be a concern
but it must be something close to that
what is the recommended way to stop an entity from rendering ?
there used to be a DisableRendering component
not sure if it still works in 1.0, haven't tried
looks like it still exists
is there a way to disable rendering without a structural change?
I don't think so
Generally disabling rendering would be a long (relative) state change
does this not seem like a problem?
how so
it does
why? It's literally disabling one of the heaviest system sets in whole dots, Nothing wrong with structural change here
Does ComputeBuffer make GC when we call Release()?
In IJobEntity if I want to set parameter to NativeDisableParallelForRestriction should I place it before parameter in Execute method?
Is there no way atm to query over an IEnableableComponent's value and also set whether or not the component is enabled?
How to properly dispose BlobAssetStore allocated while baking?
you should use baker's store I think
ok, but what if i'm 0.51 guy?
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?
Because if you pass it to IJE you can only write to the entity being processed for that chunk
It doesn't allow writing across chunks
ComponentLookup does allow that, which is why you can't schedule it in parallel
@worn umbra there's always [NativeDisableContainerSafetyRestriction] on the specific ComponentLookup if you know for sure that parallel jobs will not modify the same enity
ConversionSystems have a field/property for BlobAssetStore
Thank you very much! Exactly what I need. ๐
Thanks for the background about what is happening.
Be very careful with disabling safety though
yup, cat here is very correct ๐
If you really need to write data across jobs, just schedule it sequentially instead of in parallel, or use an entity command buffer
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. ๐
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
@remote crater yeah there's a wholly new Baker system in 1.0 which might make this easier for you ๐
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
you mean network?
Yes
you run it like 10 tiems
NetCode
I did this back in 2003
I write netcode from scratch
do it 10 times, average it
be lazy
What
This is a question specific to Unity's netcode
1/2 it is one hop
Well you can do it manually too ๐
Add up 10 half hops, divide by 10
My question is what the correct way to handle it is according to unity
They already have client side prediction built in
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
client side prediction is rollback
Fighters usually don't use server authoritive models
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
The server never rolls back in a server authoritive model
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
The client rolls back, the server never does. In a p2p rollback system everyone rolls back
ok yah
It's actually very different, considering p2p rollback systems need to be 100% deterministic, as they only share inputs
You would desync if they don't simulate the same
Yes, definitely
p2p is only marginally more difficult tho
That's why they are quite different
Desynchronization is much less of an issue if you have a server
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.
Very cool, but that doesn't really help me
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.
@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?
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
@misty wedge yeah, I had to revamp some calling code to use Hash128 everywhere ๐
What's new in V2?
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?
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();
}
}
add the options to the query .WithOptions(EntityQueryOptions.IncludePrefab | EntityQueryOptions.IncludeDisabledEntities)
and subscene needs to be closed. (might be fixed in pre15)
Alright thanks, I'll try it out
It's the same thing, except in uitoolkit
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 ๐
Yep. Just a warning though. i press clear and it doesnt do anything.
Maybe try the journaling?
I dont think anyone uses the system search...
good call, maybe that will help me
haven't used it. maybe if i would have 1000 systems. but i've them ordered in groups so easy enough to find. and i'm rarely interested in systems. when i'm interested it's about the order
Yea. Hrm. I'm gonna keep it there but not implement it yet.
journaling is less helpful than i thought (used it for the first time) - not even the version number is reported
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
journaling is more about changes
but yeah as you point out, i did think this state was also saved
fun with numbers ๐
so, yeah. the system version is ahead even when the version gets bumped. hm
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.
Yea. I figured. Good to know it's being fixed.
Although now that I've disabled it, i see 0 difference between interpolated and non-interpolated graphics
I'm not sure I understand the question; can you elaborate? ComponentLookup<T> has methods to get/set component values and to get/set whether it's enabled, both of which work from job code.
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
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.
More query logic is always good.
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
last system version is assigned on after update
what is calling increasing stack size
in calculateSpellContainer
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?
i output the global version in the first line of update
oh
4 lines above
well yeah then it's somewhat clear what is happening though i dont know why
when i increase the stack size it gets bumped (correctly?) to the global version of calcspellcontainer
wait are these logs out of order
hm, possible. the tick is throwing me off
the ordering of this is off
it's like you're missing a dependency or something
combateffectsystem is calling update spell effect?
yes
the job is updating before the version bump
hmm
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 ๐
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
i made a thread. the part i'm confused about is the very different global system version number.
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) );
Dont use typeof
haha yeah, but what then?
thanks
You can also use a NA but it wont be inline.
_request = state.EntityManager.CreateArchetype(new NativeArray<ComponentType>(2, Allocator.Temp)
{
[0] = ComponentType.ReadWrite<GoInGameRequestRpc>(),
[1] = ComponentType.ReadWrite<SendRpcCommandRequestComponent>()
});```
readwrite or readonly doesn't really matter here, right?
No
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?
Helper struct or aspect
so static helper method that returns the CreateArchetype and then cache it in the system?
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
I mean, just using AddComponent isnt that expensive.
Static method seems fine
i removed 2000 archetypes in our project from changing addcomponent to precomputing archetypes so it can make a difference!
on this size archetype though yeah
2 archetypes vs 1 isn't a huge deal
I'd like to read the component value and also set the enabled state in the same IJE. I don't think this is possible af the moment due to aliasing?
you can set enabled via Handles
It won't complain of aliasing then?
i think you'll have issues in IJE atm though unless you only use Lookup
Ah ok
you can't pass handle + lookup without aliasing complaints
I used a component lookup and disabled safety ๐คทโโ๏ธ
But I'm lazy 
With SystemAPI get handles, you have no excuse.
So many letters I need to type 
personally my IEnableable components are only tags so kind of avoids this aliasing issue
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?
if a component tag isnt enabled, I assume it doesnt match a query then?
Yes, it wont match unless you set the option
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.
I dont wanna go to the lab just for another monitor. Too lazy
lol
would the lab really miss a monitor ๐
They're really good monitors and definitely will get pissed at me walking out the door with one of them
how are you even able to develop with just 1 monitor?
You see that screenshot? That's what im looking at
to be fair, my second monitor is just my distraction monitor ๐
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
that sounds awfully familiar ๐
discord is distracting? wait what?
glad I'm not the only one
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
what's the resolution for your ultrawide?
this has been annoying me recently
3440x1440
wish I could fit one on my desk
i'd consider a 1600 next time (didnt exist when i bought this)
uh, nice ๐
i on the other hand, so much unity space
1st world problems
it's so good. i would definitely take an ultrawide over 2 monitors these days
Note sure if this is common knowledge or not, but FWIW archetypes are already cached internally, so if you request the exact same set of types from two systems, you're already only paying to create it once.
would you say we can ignore system based caching because of this?
Archetypes are automatically cached per-World, not per-system.
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
There's a 4k monitor in one of the rooms over at the lab. I hooked my laptop to it and the screen was so big and the text so tiny i felt like I was hunting for grains of sand on a screen.
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
i personally think ultrawide is better than 4k for development
yeah i think 4k is cool for tvs or gaming but not great for development. everything's too small
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
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
I think for artists, it's more pixel density than size
yep, which makes a lot of sense
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.
its crazy we still havent got proper scaling and resolution agnostic software on windows
now i think where we can all agree, curved monitors are trash
definitely I despise them and don't understand how anyone uses them
I will only accept curved monitors if it was 360
my ultrawide is curved
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
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
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
yeah this
yeah MS isn't really known for innovation outside of annoying users with unnecessary changes and "telemetry" - mac rendering is so much better
There's plenty of innovation. it just shows up every other windows release cycle.
i think mac benefits from a limited hardware set they are developing against - MS has to develop against very wide hardware bases
{
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
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
are they ultrawide though? there's a reason most high end ultrawide have a slight curve while cheap ones are flat
no, not ultrawide ๐
curve means the angle between your eyes, and the plane of the screen is less therefore lower chance of colour distortion
I'm more concerned about the problem of straight lines being distorted, and how it effects things like 3d modelling and sculpting
i think 4k is better for artists
i just think the ultrawide format is great for coding/unity work
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
Alienware 34โ 1800R is great
i would say most people use subscene/baking
If you sit so close to a big screen the curve makes sense
We're all doing GO -> Entities baker. It's pretty straightforward once you get the hang of it.
don't think of it as GO -> Entities
think of it as Authoring -> Runtime data
one of my projects I just use pooled game objects directly in Systems
there's lots of different ways to do things
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?
Well no, you want to structure your GOs in a DOD format as well.
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 ...
thanks, i'll watch it tomorrow whilst i'm... 'working'
no solution? ๐ฆ oh well ugly code
We used to do exactly this internally, ironically how SystemAPI came about, so i don't think there's better syntax.
thanks for confirming
not a huge deal, just wasn't sure i was missing something in c#
programming is at its best when past-self has thought of everything
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 ๐ฆ
update to pre 15
this issue is significantly reduced
a variation still happens on occasions but it's a lot rarer
im using 2022.2.0b16, I dont see it in the pkg window?
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
yeah thats a good hack there, lemme try that
been out for like a week?
yeah roomies moved in, been a hectic time ๐
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
yeah im hoping with every update I get less wonky errors in figuring out how to load prefabs as subscenes ๐
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)
yea
wondering, is there a Unity.Mathematics version of Mathf.PerlinNoise?
not sure what noise version is a match for PerlinNoise but all noise functions of that package are here
https://docs.unity3d.com/Packages/com.unity.mathematics@1.0/api/Unity.Mathematics.noise.html
thanks a ton!
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
@hot basin yeah AddComponentObject and AddSharedComponentManaged exists in bakers
Is the tick where an InputEvent is sent not guaranteed to also have the other values set correctly when the server receives it?
thanks!
and anyone know how skinned mesh works? I'm looking at the sample and it seems complex
This is really weird, even if I write the server tick in the command, while the server tick matches on the server, the data is not set, but the input event is set...
Seems kind of pointless to automate the handling of one off events if you can't send any additional data with those events..
are you talking about netcode?
Yeah
No, it's part of netcode
It automatically handles one off event execution on the server
ah i haven't really used it since 0.51
Yeah I'm in the process of migrating some stuff to the new stuff, but this is behaving very strangely
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
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
What's problematic when not using physics?
well they have a predicted physics world right
and non-predicted or client stuff must exist in a second world now
Ah, you meant you want to use physics but not have it be predicted
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
I don't think I've ever used a change filter 
They're great
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