#archived-dots
1 messages Β· Page 26 of 1
Isn't adding a [GenerateAuthoringComponent] making it more convenient? π
but generate authoring component is gone for a reason
It's gone because it was a mess code wise, the devs said as much
it's just not compatible with Baker workflow
iirc someone said they may add a replacement in the future
and I honestly don't understand the reason why the emphasise so much on editor live conversion
with that baking
Because it's a very simple workflow, and yields separate "authoring" and "runtime" versions of scenes, which is very powerful IMO
It just has a bit of boilerplate atm
it's way less powerful,though
it's simply shift towards ECS in conversion, with all it's downsides
I feel like if we there was a replacement for GenerateAuthoringComponent the workflow would be very similar, just instead of iterating over entities you iterate over authoring components
Similar to the old GameObjectConversionSystem except it's now a BakingSystem
that's the whole reason I'm so frustrated
I want to iterate over authoring components
it's way more convinient
authoring components != authoring monobehaviors
bruh
I'm guessing you mean the latter
not really
BakingSystem is singleton from what I understand
is there a way to debug burst intrinsics?
judging by Manual baking systems are SystemBase
Wasn't GameObjectConversionSystem also a singleton? iirc it just wrapped the OnUpdate method in way that it ran per entity
I didn't use them much
no, it was base for inheriting
all conversion systems
Well yes, but BakingSystem is the base for baking systems
And if you make a concrete implementation of a GameObjectConversionSystem, that's a singleton
sir...
Are you not allowed to inherit BakingSystem?
I am trying to figure out how to fire a job in a system only once, and write back to a local variable once it has completed. This is what I have at the moment, but its running twice. I think this is because the job is fired off a second time the next frame, before the first has the chance two write to the local boolean. Is there a better way to accomplish this:
public partial class RunOnceSystem : SystemBase
{
private bool hasRunOnce = false;
protected override void OnUpdate()
{
if (hasRunOnce == true) return;
Entities
.WithoutBurst()
.ForEach((Entity entity, in FirstPersonCharacterComponent character) =>
{
// ...do logic on relevent entities here only once
UnityEngine.Debug.Log("Found a player character");
hasRunOnce = true;
}).Run();
}
}
what do you mean? burst iirc does output native pdb's, if you have a native debugger handy
I still don't see the difference whether you inherit SystemBase or GameObjectConversionSystem, in both cases there is a single instance that is running to convert your entities
ah yes, i remember reading that. thx
oh, a lot of people were wondering if the newer build system would come back? seems like most people liked it
/// <summary>
/// Provides methods to control the baking process, and provides access to the <see cref="BlobAssetStore"/> used
/// during baking.
/// </summary>
All right, I was wrong about it
no plans for it. it was not exactly a hair on fire problem, and it was a much bigger task than anybody would agree to put people on
that's unfortunate. i really hope to see it return even if it's a far future from now
it had a good feel to it
yeah it's a cool idea, but nobody really ever agreed to deal with it in the first place, some people just did it a bit and then left and then it was an orphan
damn
like it never got buy-in from actual platform teams
which would definitely be required to support it properly
Hi, is it ok to keep auxiliary methods in my components?
imo it's a code style thing, some people do it, some don't
it would be more in spirit of ecs not to
no problems with performance or job system?
not significantly
that's an understatement π
there is a performance hit
I know, but it's very insignificant
that's why i said 'not significantly'
And I said it's an understatement π
don't see how
not significant could mean, "quite a bit, but not significantly"
and it is
what's the perf problem?
Probably even more
oh just that you run code when you access it?
kornflaks and i have optimized some code to the point of where we shaved off 1 quarter cpu cycle.
in contrast, i would say the hit is quite a bit
That's an insane micro optimization
depends how many times the loop happens per frame π
^
and even in normal standards, >5% is a significant impact
I think we are arguing semantics at this point, it's all good π
yeah π
And I definitely agree with you that it is something that should be said, especially in the dots forum, since many people like you / kornflaks / enzi are working on projects that require massive optimizations
will burst get avx512 intrinsics at some point btw?
I just kind of groan when people are "optimizing" their project and the first thing they ask if if they should do ++i or i++ in all their loops...
definitely ++i
I'm trying to port some of the code we wrote in Quntum. there we kept quite a lot of logic in components. not only getters but also setters
For the performance increase? π
i imagine it will at some point. that said, iirc amd just released the first hardware that actually benefited from avx512? so i wouldn't really go yell at the burst team about it yet
no, because if it's not bursted, there's no difference. but it's good for displaying intention, like all good code should
This job isn't being scheduled - it's being run directly on the main thread. It's not clear why it would run twice in this case... something something logging from a different thread? Maybe keep a counter rather than a boolean and see what happens.
π
That's a viewpoint I've never really heard, since you also put the "++" after the variable if you were normally adding to it, but I feel like this is also more of a code style thing, similar to how some people put the pointer in C next to the variable or next to the type
no you don't. if you ++ a var outside of a loop, and it stands extra, you also ++myVariable;
Really? I've very rarely seen that
you use ++myVariable always
except you index an array and explicitly need the different logic of myVariable++
Odd, iirc our university taught it the other way around
But I might be misremembering
there's lots of code out there, most code is made by people who 'if it works it works, what's the diff'
but for correct displaying of intention, preincrement is always preferrable
I still don't see what the difference in intention is between x++; and ++x; on a single line
the value it returns
Yes, but without saving it into a value
that's the entire line
I get there's a massive difference if you are using the "return" value
did i just wake up in the 90s? discussion about ++c or c++. are you seriously that bored.
My physics is broken so I can't do anything π¦
I'm distracting myself from my sadness
lol sorry you 2 π
someone call Mr. Unity and tell him to fix physics in netcode
I removed the log line and it still runs twice π€
Anyone else getting spammed endlessly with TextMeshPro errors when they try to open the entity hierarchy?
ArgumentException: FixedString64Bytes: Truncation while copying "TMP SubMeshUI [Roboto-Regular SDF Material + Roboto-Italic Atlas]"
no
@misty wedge what's your physics netcode symptom? my experience was that it worked, but it was a bit complicated to decide about client-only vs. interpolated vs. predicted
I don't use any parts of the simulation, just collision queries with character controllers
Is there are cap of 64 bytes for entity names? It looks like the error is coming from the fact that "TMP SubMeshUI [Roboto-Regular SDF Material + Roboto-Italic Atlas]" is longer than can fit in a FixedString64Bytes
(actually @misty wedge let's make a thread)
Yeah, looks like it has nothing to do with TMP. Just a problem with game object names being too long:
ArgumentException: FixedString64Bytes: Truncation while copying "Some really really really really really really really long game object name"
Can somebody else test this for me just to make sure its not an issue with my setup?
- Create an empty game object with a really long name like "Some really really really really really really really long game object name"
- Open the Entities Hierarchy window
- Check console for errors
this sounds like an extremely plausible bug to me
somebody had to pick a fixed number of bytes so many things could be burstable, and they didn't have TMP when they tested
Yeah, unfortunately these game objects are created dynamically by TMP (I think) so I don't have much control over it. Might be able to work around the issue by shortening the name of the base font asset or something.
Yeah, truncation is fine with me. 64 bytes is plenty in my opinion
Let me know if you want a bug report
hopefully not, let's see
Removing those long name game objects fixed my issue btw
does the "β Static" setting on an object perform the same function as adding StaticOptimizeEntity script if the object is in a subscene for ECS?
it seems so
No children will exist on those entities too
you wouldn't want them to, right? the transform system would just waste time processing them
so there's a difference if i use the Static checkbox or if i use the StaticOptimizeEntity class?
@wraith hinge any idea what is the meant way to add components to entities that are children of the one holding authoring component?
intended way
the sample scenes from https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/HybridURPSamples seem to go use the StaticOptimizeEntity class, and do have children
oh i guess they have GameObject children, but when converted to entities probably thats what you mean they have no children
so.... no difference then? π
Do you still need to use the (smaller) builds trick to build il2cpp on 1.0.0?
So no LTS 2020/2021 support? Am I understanding this correctly?
yep
Hmkay thanks
Embrace the tech stream
entities is planned to be 2022 LTS+ only. It will likely work with 2019+, but I personally wouldn't use anything prior to 2022 for dots
Did Unity break dots for mobile? I can't seem to get my Dots demo to work on the Quest 2 π¦
Have you upgraded to 1.0?
Don't know where to find it. But was hopping to avoid a breaking change right now...
Then no unity didn't break anything unless you updated your editor or packages
1.0 is 2022.2+ right now
Have you been able to do Quest 2 builds with Dots on 2021.3?
I don't do VR
Dots .51.1
Ok. My Rift S build works fine but can't seem to build for Quest 2...
you likely changed something, then
So were do we get 1.0 anyhow?
2022.2.0b8+ is where you can add the package. It might be manually by name only right now: com.unity.entities
Can I not do this to remove the system from the world?
World.GetExistingSystemManaged<SimulationSystemGroup>().RemoveSystemFromUpdateList(World.GetExistingSystemManaged<FixedStepSimulationSystemGroup>());
Trying to get rid of the physics simulation in the default world
Ah, yes, Thanks!
Ah okay. Only reason I was holding off on 2022 was stability reasons. But all is fine there now? No nasty showstoppers for which I have to wait for a fix from Unity themselves?
no, there's bugs. it's a beta and an experimental package π
Does anyone know where I can find a Hello World Sample that works with ECS 0.51.1 and Unity 2021.3.7 that run on a Quest 2 Build along with a list of Unity Settings for it?
all right
I fixed most of my problems just by doing this
public class BakerTransform : Baker<Transform>
{
public override void Bake(Transform authoring)
{
var buf = AddBuffer<Child>();
foreach (Transform transform in authoring)
{
buf.Add(new Child { Value = GetEntity(transform) });
}
}
}
π΄
π₯² Upgrade to 1.0 exp is damn hard. Still dun have nice auto upgrade yet and I need to manual do all the upgrades
yeah its kind of a bear to convert a full, somewhat complex project
Finally got some time to read through the 1.0 changelogs. @viral sonnet
Added ComponentDataFromEntity.GetDataRef and GetDataRefOptional, used to create ComponentDataRef<T> from entity.
Nice. Unity finally is listening to us.
Added new singleton access methods EntityQuery.TryGetSingleton<T>(out T)
Great addition. Makes pulling singleton data inside bursted OnUpdate far easier. Without having to go through get component data array then [0].
Added SystemAPI...
SystemAPI seems rather important. I will need to spend some time figuring out if it changes anything to the struct job code pipeline.
EntityTypeHandle is marked as a read only container because the data is never writable. This means it's no longer required to mark the EntityTypeHandle as [ReadOnly] in jobs.
Finally. That was getting incredibly annoying in various jobs.
Chunks are limited to 128 entities per chunk. This makes enabled components faster since because v128 efficiently culls the entities to process.
Oof. They went forward with this.
Value typed shared components
Nice. I was looking forward to this in 0.50 release. Great to see it landing in 1.0
I'm really liking all of the changes
Especially value type shared components. Kept me from bursting a few jobs
What's the problem?
It just crashes... When I try to do a manage debugger script build, it won't compile...
Not sure if I have all the settings right as I haven't found a comprehensive list yet...
Yes, I got it with 'com.unity.rendering.hybrid'. It knows to bring in 1.0
@robust scaffold CDFE is now called ComponentLookup and can return RefRO and RefRW. sadly the pointer is private and we have to use UnsaeUtility.AddressOf. unity dev told me its a no-op though
It seems like IBufferElementData at 1.0 become buggy tat some of the dynamic buffer becomes red
great release for the most part. the only thing that stings is the 128 cap and noone has adresses this yet. π
I recompiled with Wait For Manage Debugger, and it seems to have worked for the first time.
*** * Correction * *** It's still not working. The GameObjects disappear after they convert to Entities...
Have you been able to make a working Build for the Quest 2 with Unity 2021 and ECS 0.51.1?
I have to do some more test to be sure...
i am personally kind of skeptical that the 128 cap is actually commonly a problem. i know @rotund token has a slowdown from that and has extremely tiny archetypes, but he's the only one i've ever heard of who had such tiny archetypes
Yea. It's a tiny blurb but pretty massive change. Hrm.
Swamped with work though. Cant get to coding for another few weeks at least. Pain.
hope you don't have too much authoring comps to rewrite π
Btw I would like to get some info from official about dots addressables. From a official reply at forun mention that dots addressables won't support classic game object instantiation and load classic scene. Does it means I need to have both dots addressables and addressable inside project?
one guy on the forum wrote they have 200+ [GenerateAuthoringComponent] ... RIP i guess
One reason to put out the experimental release now, to let people plan for all the changes that will be finalized in the full 1.0 release.
Me personally, no, but I'm not aware of any issues.
On top of that, any update about hybrid component solution?
i got about 6 or 7 which will be a pain to port over. 200, ooooof
That's actually very important. Nothing in the release or changelog mentions hybrid / companion components. Hrm. Not a good sign.
Any chance you know of Anyone who has?
Just want to make sure I'm not chasing a ghost...
I'll ask around
@balmy thistle finally you got your tag. already had a hunch you are unity staff π
Awesome, Thank you so much!
it's pretty low on their priority list. understandable as there were much bigger fishes to fry. still a problem, this question comes up every day in some form and nobody can give a good answer, not even what to do other than, write some stuff ^^
the copyTransform system is still around but sealed off so it's unusable. CompanionLink comp is private
Now become even harder to use lol
Anyone know if you can access an ISystem's state with reflection?
do you care for the state or for reflection? π
I'm gonna guess no but maybe someone else has an idea. The actual code to run the Update, etc function on ISystems is pretty funky
Ideally I need to set some variables inside the system
But from what I can tell reflecting SystemState probably won't work
is it generic or can you strongly type it?
what's funky about it? var statChangeSystem = m_World.Unmanaged.GetExistingUnmanagedSystem<StatSystem>(); statChangeSystem.Update(m_Manager.World.Unmanaged);
that's called in my performance test
I meant how they call the update method internally
It's not like they have a function to get a pointer or GCHandle to the actual object from what I can tell
oh yeah, definitely π good thing we don't have to deal with that π
I'm guessing it's possible somehow but I have no idea how
i would first try to make it work without reflection
still not sure what you want to achieve. set some setting is really broad. interface would be fine too for that.
singleton approach also or system handle entity π
It's for a dependency injection system
There's definitely ways to do it without but I thought I'd try and see if it works with ISystem
Isnβt there a WorldUnmanaged.UpdateSystem for this
also, the point of isystem is to burst it, for speed. if you want instance stuff so much that you want to reflect, maybe you should use systembase, because reflection is worse than just not bursting it
Yeah, but I'm attempting to set a variable that lives inside the ISystem struct
It will only run once at the beginning, so I should be fine π
usually a bad plan, and a much better plan with systembaseβ¦
Yeah, it already works fine with SystemBase, I'm trying to port the code
If it's not possible I'll probably just drop it
Even if it's kind of a pain since it adds a lot of boilerplate
Iβd say if the port requires reflection where there was none, itβs unlikely to be worth it π
No, it already currently uses reflection on SystemBase
Why are you even needing to assign a field using reflection anyways?
For dependency injection
pretty sure it's internal
publicise it for direct access
What is internal?
dependency related fields
No, it has nothing to do with EntityQuery or job dependencies
@wraith hinge i was giving up with trying to write a generic ISystem. turned it into a SystemBase. do you see a way to do that?
If you donβt want to burst it, maybe it would work? Because burst doesnβt know how to make separate entry points for each generic instantiation
But if you arenβt bursting then you might as well just systembase
Can I get the Type for an ISystem from a SystemHandle or SystemState?
It's getting hard every morning to wake up and read every comment in here! Too much activity
TypeManager.GetSystemType?
Wait till unity makes a public post declaring DOTS production ready
oof
For what situations is it best to use ISystem? Pure ECS logic also with adding/remove component or only with some calculation stuff without affecting components ?
both. the point is it lets you burst your onupdate/create/destroy/etc
Are entities sources posted somewhere online?
No PC around, but I want to learn internal stuff
Damned, enroute to upgrading to 1.0.0 I just read that Havok will only land in pre-release 1.0.
Too much information at once, I missed this "detail".
I hope it won't take months more to come out.
Well if it's your last issue to solve, your game is pretty much finished π
updating my libraries has been really easy
updating the samples or demos for my libraries has been a pain because they were basically just quick hacks
i really look forward to seeing what i can redo with SystemAPI though
i have this thing called a DeferredDynamicBuffer
https://gitlab.com/tertle/com.bovinelabs.core/-/blob/master/BovineLabs.Core/Utility/DeferredDynamicBuffer.cs
which is up there with my dirtiest hacks, but I think I can replace this completely now with SystemAPI/singleton
(It turned out if you offset any pointer by 1 byte with an Allocator.Invalid it acted same way as a deferred array)
Why is NativeParallelHashMap not unmanaged?
er how do you get that singleton system entity?
SystemAPI.GetSingleton<Type>(<SystemHandle>) iirc
yeah that's what the ToDeferredArray method does. I never figured out why it works. is it a hack?
yeah it's patched by job scheduler
Can't tell, must first resolve package compilation, then, the joyful ones will follow.
But in the end, I don't think I'll have as much modification to do as I originally imagined. Well, I hope so.
i think it works by simply checking native arrays being unaligned when job is scheduling (pure speculation)
i believe this is why there was this break like end of 0.17 because if you had a byte nativearray and getsubarray it would appear offset
and then patch incorrectly
so they changed it so it only patched on invalid instead of none
@misty wedge how does this work in managed systems?
I don't think it does, I haven't looked at it at all though
yeah api showing all unmanaged but I do see managed singletonsystem entities in the hierarchy
It's also SystemAPI.GetComponent<>(<SystemHandle>), my bad
You can get a managed systemhandle iirc
It's part of SystemBase
yeah it's just literally SystemHandle
So I'm guessing it's just SystemAPI.GetComponent<Type>(this.SystemHandle)? π€·
Does this singleton system differ to the old one? Are the singletons just living inside their own chunk?
Is there any read-only performance difference between NativeParallelHashMap and NativeHashMap?
(when reading from it from multiple threads at the same time)
NativeHashMap is new and optimized for single thread writing
It has a lot less overhead
i expect it would be faster for reading
This is for fetching blobassetreferences inside jobs, so It should be fine right?
Also are the native parallel collections just not unmanaged so that they can't be put in components due to the safety system?
Or is there another reason
is this code path open to us?
don't believe so
I'm seeing no issue with it?
no idea either, the generics have all been rewritten to unmanaged
yeah that was a bit of effort to update all my extensions
same π
not sure why i hadn't made them unmanaged in first place
new safety system took a bit more though
interesting, i havent had to touch that at all
you didn't use DisposeSentinel?
Eugh, nevermind, it was telling me it was unmanaged because I was missing an assembly reference to Unity.Collections 
only custom containers i made were unmanaged
that's why i made them custom containers π
they were basically just containers without the disposesentinel
Did they rewrite the dispose sentinel system or why are they all now unmanaged?
its removed
ah, yeah i wrote the unsafe part and safe nativecontainers
i believe the allocator now tracks it
(i have not tested or looked at this at all yet though)
i havent tested but from what i understand this should still be an error passing in a burst job
there's a strongly typed static now in place static readonly SharedStatic<int> s_staticSafetyId = SharedStatic<int>.GetOrCreate<KeyValueArrayHashMap<TKey, TValue>>();
if (UnsafeUtility.IsNativeContainerType<TKey>() || UnsafeUtility.IsNativeContainerType<TValue>())
AtomicSafetyHandle.SetNestedContainer(m_Safety, true);
CollectionHelper.SetStaticSafetyId<KeyValueArrayHashMap<TKey, TValue>>(ref m_Safety, ref s_staticSafetyId.Data);
AtomicSafetyHandle.SetBumpSecondaryVersionOnScheduleWrite(m_Safety, true);```
possibly, i haven't seen it in any collections code
internal static readonly SharedStatic<int> s_staticSafetyId = SharedStatic<int>.GetOrCreate<NativeList<T>>();
NativeList entities 0.50
and as I have no idea about it really it's just copy & pasted code from their 1.0 collections π
oh just to elaborate
the problem is the safety system can't inject safety down an arbitrary depth of pointers
so only the other container would get a safety and all the inner ones would throw errors (usually, this container has been marked as write only it has been historically)
That makes sense
And them not being able to be put into components before was just a limitation of the sentinels?
yeah true, NativeList was the first (and only?) container that had the new path in place with the REMOVE_DISPOSE_SENTINEL directive
nativearray
had it as well
though it was different again
it had just a static int
[BurstDiscard]
private static void InitStaticSafetyId(ref AtomicSafetyHandle handle)
{
if (NativeArray<T>.s_staticSafetyId == 0)
NativeArray<T>.s_staticSafetyId = AtomicSafetyHandle.NewStaticSafetyId<NativeArray<T>>();
AtomicSafetyHandle.SetStaticSafetyId(ref handle, NativeArray<T>.s_staticSafetyId);
}```
probably because it's inside unityengine and sharedstatic is a burst feature
as you'd have to manually allocate, is this really true?
nvm, i see what you mean
disposing the main can't dispose the elements
container->container->container->container->somerandomstruct->container->morepointers->container
can you imagine how painful this would be to analyse to figure out what you need to inject the safety handles into
i know way too little about the safety system π
bit of a black box unfortunately
i think it could be done with losing performance. every container has their own safety and maybe a parent safety. anyway, unity doesn't really seem interested to support this so not much reason to discuss
we can do it in an unsafe way so it's okay
tertle, from what i know how you dislike writing documentations. π i'm leaving my current company and have to document EVERYTHING. it's soul crushingly tedious. make it stop! π
documentation - refer to code
i actually enjoy documenting code
<summary> is a style requirement from my analyser for anything public
alternatively this might also be why i mark a lot of things internal π
oh not code documentation. the unfun high level part. explaining what something does, service description, accounts, server/network diagrams
the part that makes you put to sleep
and you know what happens next right?
someone refactors a chunk in the next few months and the documentation is all irrelevant never to be read
i'm the last dev so i doubt the refactoring part but you are dead on with noone reading it! π
"I could go read Enzi's documentation, but I can't bebothered I'll just rewrite it"
ugh so much stuff silently failing to work because the interface doesnt work anymore, kinda wish anything using ICGTE would fail outright
just gonna go and find every instance of it and delete so forces me to fix stuff but between fixing all the other errors, didnt realise how much stuff was just not getting converted so spent way more time than I should have tracking down phantom unbaked things
so unity added entities
I heard that
How does the GetComponent<Type>(SystemHandle) API actually work? How do you set the component? Since SetComponent is missing this overload
Nevermind, it's under SystemAPI
Where are the burst assemblies kept? Need to delete them
If you have tiny archetypes, using entities might be the wrong tool for the job.
What a statement
what's going on here? 104 entities, 102 chunks? unused 12952?
Please, anyone?
Library\BurstCache is my best guess
what are you having issues with?
closed my unity project, restarted pc, tried to open it again, says ran out of space while allocating native array, almost crashes my graphics card and almost any other program on my pc
am just gonna create a new one and just reimport everything over and delete the old one
try to delete the library folder first
tried 3 times already
oooooooooooooofffffffffffffffffffffffffff even creating a new project completely crashes almost my whole pc now
oh damn π¦ can you run any game? maybe it's not unity related
out of disk space or smth ^^
What happens if you put a managed type in an ISystem?
i mean yeah, i'm almost outta disk, but getting black screens and stuff because of it hmmm.....idk.
am gonna move some stuff to my other drives though
you will get a compile error
That's what I thought, but I'm not getting one
have you tried running the game?
Nope, but that's hardly a compile error π
idk exactly. i just remember you WILL get an error at some point
It throws an ArgumentException on running π
well it's something i'm gonna cover with the analyzer i'm gonna create. so you will have in VS errors already :)
I also managed to inject my types into ISystem but it's probably not a good idea, so I may scrap it
no compile error, just very weird allocation errors. had that at one point in 0.51 when i didn't know we can't use NativeContainers in ISystem
you should be able to do that now btw
yep, now it's possible
wow. seems it ACTUALLY was because there was no more free disk space
even though the project itself was already stored on a different drive that had plenty space than windows
take a look at where windows is storing the paging file
where's that?
in a good os i'd say search for virtual memory. in windows: control panel->system->advanced system settings->advanced->virtual memory section->change
might want to move it to another disk or set a max size
oh, you meant the os paging file.... XD i was thinking unity had something called paging file
ah yes. my paging file is 130gb big
i wondered where that space went.....
lol that's a bit much
Any idea what's up with this?
Loading Entity Scene failed because the entity header file couldn't be resolved. This might be caused by a failed import of the entity scene. Please take a look at the SubScene MonoBehaviour that references this scene or at the asset import worker log
clear entities cache
Ok so it's just a bug and I didn't break anything
it's possible π but i've had this a bunch of times now. something is still not working right with the baker or incremental baking
very random, can't reproduce it
Is there anything I need to watch out for when creating a build? It crashes immediately at bootstrapping
Mono or il2cpp?
il2cpp
I've already reported an il2cpp issue which they were able to repo and track down due to alignment
i think i won the crash bug race
It's also spamming the logs a bunch with this, not sure if it's related: https://hastebin.com/fufujuseki.makefile
{
public BlobAssetReference<MetaData> Value;
internal bool IsSetup;
}```
was my issue that causes crashes
mono sees your component as 16 bytes and il2cpp sees it as 9 leading to deserialization issues/corruption
was the explanation
What's the issue here, the BlobAssetReference?
Also, do you still need to select Faster (smaller) builds in the il2cpp config? iirc there was an issue with that once
pretty much
Isn't that kind of a bug? Or what's going on here
something about il2cpp getting alignment mixed up
it's totally a bug
Ok π
I'll try building mono and then with faster (smaller) builds and see what happens, thanks
but yeah that's the only crash i'm personally aware of atm, though i've only built one of my individual libraries atm
and your stack wasn't exactly the same as mine
so if you have a small repo i'm sure they'd like to know
@wraith hinge I can reproduce this bug now. holding down CTRL+D for duplicate on a gameobject in a subscene with a single baker component to reproduce. it seems every duplication creates a new chunk. to fix the subscene has to be rebuilt.
Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-228022' UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions) wat 
someone is stealing my assets
damn those pirates!
Also what's this? BuildFailedException: Can't build from the Unity build settings window. Make sure to enable Preferences -> Entities -> Builtin Builds Enabled.
I found the option to enable it, but for some reason calling BuildPipeline.BuildPlayer before didn't trigger this
Might also be why my build crashed π€·
how tf does burst generate a Object reference not set to an instance of object for me??
XD
has anyone used the unity ObjectPool or DictionaryPool?
you mean the built in object pooling system?
yeah
a bit yeah, sure
They're a simple and accessible structure, but what's it got to do with #archived-dots ?
pretty much everything on google is a custom script and where i have a problem is that ObjectPool is only for 1 type and DictionaryPool has very unexpected API
@viral sonnet You might be able to get better help for that in #archived-code-general , also remember the classic phrase "Don't ask to ask, just ask":
https://dontasktoask.com/
really guys? i've been here for more than a year nearly every single day and you pull that on me for asking 1 question outside of dots to my fellow dots devs? just leave it there and it will sort itself out. i find this kind of rude.
π€·
but a dots question: are nativearrays always aligned?
Ones you create should be (deferred ones are not until scheduling)
ah ok then. good to know. so i can use load_si128
and what's the diff between .GetUnsafeReadOnlyPointer() and .GetUnsafePointer() ? afaik, if you have a pointer, you can do pretty much anything to it
or does one rather map to like cpp 'reference'
On what
Native array?
It's still does a safety check to ensure its been setup right
Like if you have a read only array and call non read only version safety will fail
only relevant for safety. apart from the check it does the same thing
But once you have pointer you're on your own, can do what you want
ah yeah ok. best to use RO in the appropriate places though, even if it's not a RO array. think it's good for code readability
and safety checks get removed anyway when building
(they didn't even know i will feed entities into the ObjectPool and build pooling with the new enabled feature) ... ok j/k ... or am I? π
π€ not....really....a good....use case
oh i am kidding but I'm also thinking about use cases for the enabled feature. previously we needed a structural change for Disabled comp
of course it's kind of useless because we have no dots animation. for the future though, i will be testing the viability because i have a hunch it won't play nice with DidOrderChange and either trigger no update or update the whole chunk
am i missing something or are quite a few intrinsics missing in Unity.Burst.Intrinsics.X86 ?
What are you looking for?
Speaking of
InterlockedAnd & InterlockedOr
The Unity.Burst.Intrinsics.Common.InterlockedAnd and Unity.Burst.Intrinsics.Common.InterlockedOr are experimental intrinsics that provides atomic and/or operations on int, uint, long, and ulong types.
Because these intrinsics are experimental, you must use the UNITY_BURST_EXPERIMENTAL_ATOMIC_INTRINSICS preprocessor define to get access to them.
These are new in 1.8 right?
if you take a look at this cheat sheet: https://db.in.tum.de/~finis/x86-intrin-cheatsheet-v2.1.pdf
you can see that there are loads of intrinsics available that burst doesn't currently seem to have
i don't see a way to set the enabled/disabled flag in a baker for a comp
Hmm hadn't really considered that use case but it makes sense
just an IsDead flag π
i can flip the logic but it's odd that this is missing
also really weird in that sense: if i have an IsAlive flag I need another comp to make a proper query for it. i can't really query for all IsAlive that are disabled
the answer is YABS - yet another baking system
Either 2 components to properly query the entity based off of state, or a single component with flags (need to query all entities, which you may do anyways somehow)
Personally I would have a single component, and in the edge-case you need only dead components, you can add an isDead component
i'd get all sorts of entities if i query for any and exclude IsAlive
no that's a structural change
is it possible to NOT a query?
It's alive until it's dead
well there is exclude but there is not really a query mode for a comp that is on the archetype but disabled
the baker system can't pick up a prefab that'll be converted with GetEntity
The type 'xxxBufferComponent' must be valid unmanaged type (simple numeric, 'bool', 'char', 'void', enumeration type or struct type with all fields of unmanaged types at any level of nesting) in order to use it as a type argument for 'T' parameter
IBufferElementData not longer can support Hash128?
dealing with nvidia flex, and i really need a way to run a function in a job. At first i was thinking i could store the method in some thing like UnityEvent, but it appears jobs dont allow reference types. Is there any way to run a function in a job? (bonus points if it can be set in the inspector)
if job is not burst compiled
you can store delegate pointer
and then unwrap it in job
you'll need MethodInfo of this function
burst compiled would be really nice, cause im doing a for loop with around 70 thousand particles, so performance is very required
you can only run native methods in burst
burst compiled or extern cpp
oh, ill try burst first, and if not then ill do cpp, im dealing with a bunch of cpp pointers anyway, so either solution should be great, thanks a ton!
after i have a native method how do i pass it to the job then?
oh and it wont pop up the error about reference types like it usually does?
nope, not working
still gives me an error, it seems it really hates reference types
perhaps there is a value type way of running a function in a job?
hmm, i definitely cant get this working, perhaps an example would help pls?
You cannot have reference types in burst jobs. How are you calling your cpp code?
it isnt cpp code yet, ill try that next if the burst code doesnt work, currently im tryna call it with UnityAction's
There is no way to use a reference type and have it be burstable. There are ways to sneak delegates to functions inside non-bursted jobs however
hmm that is annoying
im trying to avoid hard coding anything
i really need it be burstable, is there really no value type delegate type?
You can create a burst pointer to a function that is also burst compiled, but it has the same requirements (no managed code)
that should work, how would i do that
That burst delegate can be passed to a burst compiled method, but I doubt that solves your problem
im just trying to mess with particles positions and velocities using c style arrays, so it might work, thanks a ton!
Why not convert those arrays to native collections and pass those to a burst compiled job
was always under the impression that converting c style arrays to native arrays was slow, but that was in general c#, perhaps there is an easy method with dots to do that?
I'm not sure what you mean by c style array, something like int[]?
Alright, then you can either memcpy the data or possibly just set the internal collection pointer (although I've never tried that)
dont know what either of those mean, but ill research them, thanks a ton!
hmm it appears this only works with static methods, which i might be able to use, but ill need to figure out a way to convert vector 3 to vector 4 without overwriting W to 0, and without using new so it stays static, a fascinating challenge
The reason it only works with static methods is otherwise it would be binding the managed this, which isn't allowed in a burst function
ok, i think i should be able to work with that, thanks a ton!
Regarding the c style arrays, something like this should work, but there may be faster ways to do it, I'm no memory guru like some others here:
int[] arr = { 1, 2, 3 };
NativeArray<int> native = new(arr.Length, Allocator.Temp);
fixed (int* ptr = arr)
{
void* nativePtr = native.GetUnsafePtr()
UnsafeUtility.MemCpy(nativePtr, ptr, sizeof(int) * arr.Length);
}
ignore the fixed part, you already have an unmanaged pointer
ooh that might work, ill try that in the morning, thanks for all the help!
You can also use ConvertExisitingDataToNativeArray to alias a NativeArray to a T* ptr.
is there a way to view all the bugs you submit these days? their new system doesnt have that overview like fogbugz did
Where is this function?
Is there any way to have my code run outside of systems?
Depends what you wanna do, but yes :3
I want to have injection into default World implementation either before systems are created
or before OnCreate is called
but I'd guess
the only way - create world manually
What are you trying to inject? just have another function that runs before OnCreate?
kind of
but I need it to be world specific
afraid I'm gonna have to use on demand approach
when code runs as soon as it's called
which doesn't work too well with burst
Btw if anyone has any ideas what is going on here I'd appreciate it, I can't find anything online and it's completely preventing me from creating a build:
Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-477562' UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
had that happen once too. i just ignored it and it was fine
It cancels the build...
Unless I missed something else that was interfering, but I'll double check
I can't see any other errors besides this one, so I guess I'm screwed
It doesn't set the safety handle - so you'll either need to set it yourself or disable safety checks if you put it in a job
this is the entire build logs I get: https://hastebin.com/woribugice.makefile
message I posted is the only "real" error I see
maybe restart unity and try again?
hm.
Maybe I'll try pulling new completely, but I doubt that changes anything
very annoying
It worked yesterday, but I can't think of anything I changed
have you tried deleting the build dir
i wonder if it's the incremental build pipe getting confused
build and/or library and/or git clean -xdff
(i'm not aware of any active bugs in that area, but that's also a crazy error, so...)
I've deleted everything in the build folder and deleted the library folder
I'm reverting a few commits back and seeing if I can build there, otherwise the only thing I can think of is pulling the project fresh and seeing if that works, then I'm out of ideas π€·
There are some pieces of global state outside the project that can get corrupted in rare cases
Notably the global package cache
I was trying to dig through the source to find it but how are entity id's created and managed?
what
var cachedCameras = Object.FindObjectsOfType<Camera>();
This stopped working in unity 2022
hmmm
any idea how I can pass game object from scene into World?
no conversion
through blob assets?
that's not what they are for
@rustic rain that works for me, I literally just made a system that does var sceneCamera = Object.FindObjectOfType(typeof(Camera)) as Camera; last night to get the camera
sure there are cameras in the scene?
yeah
I'll try
using FindObjectOfType
isntead of Objects
using container with references
welp
it works
looks like bug
aaand now it doesn't work π€
Im hella confused. The new burst occlussion is part of the dots.graphics aka renamed hybrid renderer. But cant I just use that to render my graphics and keep the game with monos and gameObjects ?
But then I dont get subscenes and level streaming or do I ?
@mild ledge i think it is rolling out to gameobjects after
GameObject support is planned for the future, which requires it to be decoupled from the Entities Graphics package.
I know that, but I really want to start a project that relies on dynamic occlusion and dont feel comfy doing it in pure dots
I started that threadπ€£
sucks, I think everyone here is probably waiting on some major feature or two for their own uses
I remember using just the hybrid renderer to "replace" mesh renderers maybe it will work the same will have to give dots 1.0 a spin on mondat
I'd be content if I could build a player...
@misty wedge dont be so sure, I built a player that crashes immediately on load π
That just happened to me, it crashed before it even got to the splash screen
Guys any other way to inject data into world?
This is just absurd
var cameras = Object.FindObjectOfType<WorldReferences>(); returns null, while I have this GO
Where are you calling this?
in OnCreate
Call it later
π€
iirc they changed something in when OnCreate runs in relation to normal mono world
I had some stuff failing too that worked before, which ran in Awake
bruh
well I made it to the splashscreen at least
tried both dots platform asset build and builtin build
I wish they have a special callback
PostCreate
or smth
before world actually runs
OnStartRunning?
You can add it relatively simply
Just call a function on each system that e.g. implements an interface after you created the world
I know, but...
That will cause all OnCreate to run, then your function
feels weird Unity won't do it themselves
I'm not sure many people need it π€· maybe they'll add something
Also couldn't you just put your Component reference inside a managed IComponent and then query that in a system?
the problem is that
literally everything is tied to OnCreate
so I just don't have Component
The component reference would be baked
by the time I need it
(if that even works, I haven't tried it)
π¦
in subscene
Then just fetch it in OnUpdate
π₯²
are you trying to keep a reference inside a subscene of an object that is outside the subscene?
no
I literally have 2 cameras in a scene
normal scene
and I can't grab them inside World
Hi everyone, is it possible to configure a system group to not update at all, unless manually updated?
I would like to manually update a system group at certain points in time, without updating the world.
I guess one possibility would be to set RateManager.Timestep = 99999f; but I think the system group would still be updated on the first update of the world.
Also, I would prefer not using a rate manager at all, because it makes debugging more difficult.
Rate managers don't work properly when pausing and resuming the game in the Editor Play Mode. (Has this been fixed it 1.0?)
to echo what schnozzlecat said, I do run my find camera thing inside of OnUpdate and disable the system after that bit of logic runs
if it doesnt find anything return until it does
π₯²
Can't you just disable the system group?
I consider disabling default world creation
for the sake of normal world creation workflow
Neat! I'll give this a try π
morning everyone. does anyone run a bakingsystem on prefabs that are linked in a subscene? (previously IDeclarePrefabReference) the baking system doesn't pick them up, not sure how to proceed as I'm under the impression that this should work.
did you do the thing where you make sure the query includes prefabs
that always gets me
could be it! π
Anyone else knows how Default world creation works?
that was it! thanks for the quick answer. i need to be more aware of this
@wraith hinge can one make new/additional entities inside of a baking system or is that only to be done inside of a baker?
I'd guess that's what I need UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD
well thats kind of the thing where I would get an error about too many entities sharing a guid if creating them through a baking system via EntityManager.Instantiate(prefab)
errr i'm not aware of that error but i'm also not a baking pro
alright thanks, ill try to make a simple repro to submit
hm, i want to disable an IEnableComponent in the baking system. this picks up the entities but it's still not turned off when i inspect in the hierarchy ```public void OnUpdate(ref SystemState state)
{
Debug.Log($"Running IsDeadBakerSystem");
var ecb = new EntityCommandBuffer(Allocator.Temp);
foreach (var (_, entity) in SystemAPI.Query<IsDead>().WithAll<Prefab>().WithEntityAccess())
{
Debug.Log($"turning off IsDead for {entity}");
ecb.SetComponentEnabled<IsDead>(entity, false);
}
ecb.Playback(state.EntityManager);
}```
i have had some issues with the hierarchy making me lose my mind for various reasons and i'm not sure they're all fixed yet
i would double check with a query
the hierarchy picks up prefabs, iirc? and didn't always have the behavior i want wrt enabledness
on that note, it would be great if we could just set the state of IEnableComponent in the baker itself
unity bug reporter is so slow to upload
ok IN-18378 simple repro that entities created inside of baking systems arent created
or they are but it complains theres no scenesection so they dont survive serialization or whatever π
oh scenesection you say
that makes me think i could be wrong that it's supported (but obviously that would not be the right error message, so it's still a bug)
well if I use CreateEntity I get that warning, in my main project if I use Instantiate(prefab) i got another warning, just testing Instantiate(prefab) in this small repro fails silently
well, at minimum, we need an error message, and for it to tell you that you can't do what you're doing, if in fact you can't π
that would be appreciated π
After deleting everything and reimporting 50 times I can now build again for some reason even though it failed with same error in some parts, only issue is that the build crashes before even hitting the splash screen
https://hastebin.com/eqagusulay.yaml fastest crash in the west
that is a rather less helpful stacktrace than usual, but there are some known crashes in il2cpp builds right now that we're working on fixing
so i would think it was that
hey that looks just like my crash π₯²
meaning a mono build should work?
well I reported my crash last night π
i believe so? at least i thought all the known crashes so far are il2cpp-specific
(crash repro bug)IN-18341 if interested
Is there a way to ensure BakingSystem runs after another?
It feels like UpdateAfter just doesn't work on them
Great, I do nothing except switch to mono, and then I get this again
Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-479478' UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
zzz
I think this is somehow related to addressables, but I'm not 100% sure
this seems like a separate bug, which may or may not be dots related, yeah
addressables definitely talk to that code pretty deeply
I think I'll just give up creating a build and wait until 2022.2 releases
very reasonable idea π
The upgrade to 2022.2 also bumped my addressables version from 1.19.19 to 1.20.5, so maybe I'll try downgrading...
i'm skeptical
oh holy moly mono build works for me
why do you lie
ArgumentException: A component with type:Unity.Scenes.SubScene has not been added to the entity. Entities Journaling may be able to help determine more information. Please enable Entities Journaling for a more helpful error message.
Anyone else having this?
ok, those appear because I create my world after Awake
hmm
any idea how I can reregister all subscenes?
So, hierarchy window causes this. Hmm π€
ArgumentException: A component with type:Unity.Scenes.SubScene has not been added to the entity. Entities Journaling may be able to help determine more information. Please enable Entities Journaling for a more helpful error message.
I wonder if that's an internal bug or I am doing smth wrong
so that's why I can't disable an IEnableComponent Behavior at Playback: Will throw an error if this entity is destroyed before playback, if this entity is still deferred, if the entity has the <see cref="Prefab"/> tag, or if the entity doesn't have the component type. doesn't work on Prefabs.
the error is never thrown btw
very peculiar design to expect every comp is enabled. i could work around it with a runtime system but that doesn't feel right and it's a bit hard to control without a structural change. the question now, is this here to stay or was this simply overlooked?
i don't think it's worth it yet
Lies
unless you are really into into and want to alpha test
Is it? Or is that your obscure way of building everything issue π
not worth it compared to not using dots, or not worth it to upgrade from 0.51 (or whatever the previous was)?
ISystem is mint
to upgrade. dots and entities is phenomenal
damn
true, however we can't pick and choose π
my worry is the more things they change the more terrible it'll be to update
so would think it's better to update now and have to update less later than do a huge update later
nah, I got some internal errors
no idea how to deal with them
Anything outside of hierarchy/ui?
it's hierarchy ui xD
I'm at 11/14 libraries running now without many issues
Can't debug my entities without it
Except random ui errors that don't really cause any problem second time I select something
First select fail, second+ select fixes itself
i'm still 'stuck' (haven't touched it in a while) updating to 0.51 because unmanaged systems broke my custom world init
I found 0.51 upgrade to be quicker but more broken
did they add custom world support to the DOTS windows yet? like is it possible to see what systems are running in manually ticked world
:(
Again untested, but I don't think you should do it that way anyway
Just add it to player loop and do it how netcode does to determine if it should tick
With custom system groups etc
not sure how that could work when trying to do rollback with a separate world for simulation and rendering
what were the broken things you ran into?
oh in 0.51
(might have been 0.50 cant remember)
i had a thread up with like 10 major gotchas and issues within a few hours
most of these were fixed so you won't have issues
i haven't really had to write up a 1.0 version which is nice
might write up a, useful stuff you might not realize you can do in 1.0 instead
i think it was 0.50. 0.51 has been really stable. eh nvm you have it in the forum title π
when most errors are based on codegen i don't think it's that bad.
i have new codegen errors in 1.0 π
biggest problem is when the issues are a bit more fundamental. and i would not suggest anyone to upgrade mostly because of bakers. those things will be sorted out, i'm very sure of it. still takes a bit of time.
you and your generics
i've solved the generics π
i'm having a lot of small problems I can work around, so it's okay. but I'm not handwaving others issues and issues issues (lol) because it was clearly working in 0.51 in a better way.
the baker has some restrictions and needs likely 2-3 patches to be called great
a list of things for me to avoid would be nice π
i'll try to write a concise list of things in the forum
sometimes we have workarounds, sometimes we dont
wdym custom
RegisterUnloadOrPlayModeChangeShutdown();
I noticed this method in DefaultWorldInitialization
no, I just want to have my own world creation pipeline
to have precise control over when systems are created
when my own extensions are created
and etc
long time i've done this but it was just a matter of new World() and then using the EntityManager from it
yeah, seems so
I want to use custom bootstrap
because
it seems like UI is broken
if I do it otherwise
Well it's basically designed for this purpose
any tip what is general way of doing it?
new World()
do whatever I want
Get All systems from TypeManager
Create them in any order I want
That's it?
Do I have to register world anyhow?
for playerloop
I think just return it
But hmm you usually call the method that adds the default systems to the loop
(is the only thing that actually has to be added)
Just look how it's setup by default
I am not sure what is actual default implementation
Default world Initialization
It will try create via custom boot strap
If not, set it up instead itself
well
judging by this piece of code
if I return my world
Init will do early return before all loop registration
Ah well then yeah you need to set it
Yeah call those 2 methods
in my IDE it's unused
Ignore it π or call it if you really want
SystemAPI.Query is mainthread only, yet we can't use MBs in the query.
can't query my Animator QQ
Do class component work ? Or can aspect handle that ?
MB?
MonoBehaviour
Gotcha, yeah, no, but IJobEntity does support it :3
As long as you schedule with .Run ofcourse
After managing to build a mono build, my game crashes during the initialization of the Unity.Physics.Systems.BroadphaseSystem
will MBs eventually be supported in SystemAPI.Query?
It specifically crashes on burst generated code
EntityQueryImpl.GetSingletonChunk
Is it possible to disable burst for a standalone build?
Maybe, it feels like an oversight more than anything :3 (tho there is an argument to be made against it, as we might wanna support Query in jobs, tho chances are we just make it a compile error to use managed comps in that case)
huh, seems like default system creation has changed a lot
Was just wondering if removing runtime conversion will have an impact on potential modding.. just speaking loosely as i haven't looked into whether it's even possible
I always wondered if it would be possible to load in mod dll's ( using a mod tool such as Bepinex ) that could then do runtime conversion of external assets
Something like:
You release a game
Someone writes a mod dll that loads in some fbx models and injects them into the game
Full stacktrace? Yes possible to disable burst in build; go to project settings burst AOT settings
I imagine some path is unsafe but not getting exercised in the editor, and then it blows up in a build because thereβs no safety in builds right now
This is in a debug build if that makes a difference, I wanted to step through and see where it crashed
This was the last managed line I could execute, which matches the stack trace:
I would think it means something you are doing in one of your own oncreateβs is funky in some way
Why would it crash in the physics on create then?
I didn't change any oncreate from entities 0.51 iirc, which worked fine in builds
Just updating to new APIs, etc
I'll look at them though and see if I find anything strange
Everything also works fine in the editor, it's just the build that is crashing
good old null ptr
likely this one: SystemAPI.GetSingletonRW<SimulationSingleton>();
Yeah, I posted it up a bit higher
no idea really but it means it doesn't exist, yet the query says it does. it's an IEnableComponent btw
That seems like a bug
ive' seen this here but what is this? BuildFailedException: Can't build from the Unity build settings window. Make sure to enable Preferences -> Entities -> Builtin Builds Enabled.
You just need to set a check mark in the preferences
yeah but why?
Or do you mean what it does?
I have no idea, I'm guessing it does magic to make it possible to create a dots build
this is the weirdest checkbox i've ever ticked
good thing it has no captcha behind it. i might have failed it
Are you sure you want to do what the button does that you just clicked?
I'm wondering why it isn't enabled by default if you have Unity.Entities installed
please read the instruction, click this other button so you can click the button you wanted to click
yeah i dunno π
do we have to add subscenes in the build settings? at least they are auto added when i use add open scenes
I want the old build config back π’
yeah π¦
ok i get a crash too. different errors though
first one is ArgumentException: Unity.Entities.PostLoadCommandBuffer is a class based IComponentData. Class based IComponentData must implement a default constructor. PostLoadCommandBuffer has a default constructor. just checked
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00076] in <bcca6c60cac14795a89f3b6ba8f7daa8>:0 ```
yeah, still an exception which breaks code execution. can't be good
look what we have here 0x00007FFE28EE1B68 (lib_burst_generated) [I:\DungeonGank2022\Library\PackageCache\com.unity.entities@1.0.0-exp.8\Unity.Entities\Iterators\EntityQuery.cs:1410] Unity.Entities.EntityQueryImpl.3322::Unity.Entities.EntityQueryImpl.GetSingletonChunk 0x00007FFE28F4711E (lib_burst_generated) [I:\DungeonGank2022\Library\PackageCache\com.unity.physics@1.0.0-exp.8\Unity.Physics\ECS\Base\Systems\UnityPhysicsSimulationSystems.cs:161] Unity.Physics.Systems.BroadphaseSystem::Unity.Physics.Systems.BroadphaseSystem.OnCreate
same as yours
i'm getting a bit annoyed that on every entities release we have another build crash in physics. are they testing builds? it's such an universal error, not something weird we are doing
this time we cant fix it with a dropdown probably
Nice, guess I didn't break anything after all \o/
My main concern here is what is DungeonGank π
all my projects are XXXGank! lol who names things properly
Haha love that..
So physics is crashing builds.. that's annoying π
XXXGank sounds like it should be rated 18...
I've been holding back on dropping what will probably be days on doing a conversion
( to 1.0 i mean )
wonder if anyone is able to make a build with physics
stay on 0.51 if you can unless you don't value your productivity π
looks like they've updated all the samples including physics, i wonder if it's worth trying to build one of those
haha sadly i value every hour
Hey I was very productive today, I spent the day deleting library and reimporting to create a few builds that crashed 
haha, tbf sometimes a lot of days feel like that anyway, two steps forward one step back
wow look at this guy, actually moving forwards...
the days before 1.0 i learned UIToolkit so it's just a fitting continuation of the level of productivity
we're all the guinea pigs
i've so many baking errors. i'm very close of just dropping 1.0
i just wondered why this one monster is just standing at 0/0/0 - i wonder why my player doesn't move.
oh comps don't exist. but they do on the prefab. clear entities cache. works again
over and over again
i have cleared the cache at least 30 times today
i'm pretty sure the GameObjectChangeTracker screws things up but that's just a hunch
They should just bring old conversion back
It was so much more versatile
I don't get what's the point of making conversion so strict
Especially performance wisr
Considering it's fully offline
chewed of more than they can eat or what's the saying?
I swear, I want to implement back conversion system
baking is one thing but incremental baking. oh boy
Which would allow iteration over gos
make a code change: Loading Entity Scene failed because the entity header file couldn't be resolved.
this time not even clearing entity cache can save me.
yeah it only tells me the subscene which threw the error. i just made a code change to a system. nothing to do with baking so i know this would work
restarted unity. now it's working again
well, my system based pooling system works. at least that counts for something
kinda cool, the hybrid system i'm using isn't just relying on instantiate anymore and can draw from a pool of released presentation gos. only downside is that i need an instanceID mb comp to keep track from which orefab the instance is coming from
afaik there's no way to determine from which pfefab a go was instantiated
Baking has been working fine for me but I have like 5 entities I'm baking so maybe that's why 
Except the random times I get this Loading Entity Scene failed because the entity header file couldn't be resolved.
how often did you get this error in 0.51?
Never I think
I got it in 0.17 iirc, it was a bug that had something to do with UIToolkit if I remember correctly
I got it like 2 times this whole year. now constantly
I'm sure it'll be fixed, 1.0.0 was just released
sure it will π
So something that I'm curious about is - back in 0.51 and prior I could use GetPrimaryEntity(UnityEngine.Object) so I could declare Asset dependencies in a GOConversionSystem. What's the equivalent of that in 1.0, since it looks likeGetEntity takes in a UnityEngine.Component or GameObject π€
just GetEntity
Component and GameObject inherit Object
call it with your GO, done
ah sucks, the Object i wanted to grab was a Material haha
Oh, nevermind, I misunderstood
so it doesn't fall under UnityEngine.Component or a GO
oh, and that worked in 0.51?
Yea
// 0.51 in an IConvertGameObjectToEntity
var materialEntity = conversionSystem.GetPrimaryEntity(material);
dstManager.AddComponentData<LinkedMaterialEntity>(entity, materialEntity);
looks like another regression
I'll probably rethink this so I'll just circle back and finish converting the rest of my project lol
you should be able to provide the go of the material, right? or did you just reference the mat?
i just referenced the material
i haven't touched my rendering side in a while and since the BatchRendererGroup is available in 2022 - I'll likely want to rethink how I'm doing rendering again lol
i'll take a look what the HR does (we need another abbrevation for Entities.Graphics btw π )
I'm pretty sure I could use AddComponentObject, but since I had originally linked entities together - I probably just need to refactor my system to use that instead Β―_(γ)_/Β―
so first thing, you want to have a single entity for a material right?
Is there no way to add a scene object to a component from a baker?
Since the managed objects don't seem to be able to live in the subscene
yea
looks like you need to make a MB comp, reference the material there and implement a Baker for this MB comp
then you can reference the base go in others
bit annoying though, there might be a better way
Any of your managed components missing a parameter-less constructor? For whatever reason, issues with the baking system completely screws over the ability to load subscenes sometimes
i'll check if any constructors are missing
i've found 2. let's see if it's better. how did you find this out? i'd never relate these 2 things.
It was an issue for me, I reported it to a unity admin (as a bug report) with as much detailed info as I could
I think that subscenes have some heavy relations to the baking system
interestingly i found a bunch of these errors in my build log. (#archived-dots message) they are unity comps and have a constructor so i dunno what's happening here
Needs to be an empty constructor
zero parameters
looks fine to me
Try removing the RefCount assignment. maybe it wants absolutely bone-dry constructor
can't that's a unity comp π
entities package
hmm...
there's also an error for EndSimulationEntityCommandBufferSystem.
what's the advantage of having entities instead of scripted objects
and my hunch is that these errors break the loading and get physics to crash
you're using v1.0 right, not 2.0 transforms?
Have you tried readding all the packages?
do they have any special properties
I have physics added, no issues so far other than crashed from the above issue I mentioned with constructors
That's your log
so your build works with physics?
Not your dmp file
Load up the generated dmp file in VS it will show you exactly what line you crashed on
@viral sonnet what's your editor version
2022.2.0b8
on it but what should i do with it? π
Just open with vs
Hit run top right
Then link your pdbs if it doesn't auto link
And it'll give you the memory state at the time of crash
Full stack you can step through
it's the same thing that schnoozle posted
Can you step back a few
Where's this being called from
It seems the singleton isn't being setup?
sorry i don't know how to step back. this is the only step available
but this is the crashline: SystemAPI.GetSingletonRW<SimulationSingleton>(); from BroadphaseSystem
Hmm on tram heading home so can't look myself
But where is that meant to be setup
Don't worry, I'll inspect this when I get home
Feel like I must have made at least 1 of my libraries with physics
So not sure why it didn't have issue (though they probably had no colliders setup in build)
found the call stack. never needed this when working with dmp files but this is cool π
It's easier to debug a crash in a build
anyway, same line i posted