#archived-dots

1 messages Β· Page 26 of 1

rustic rain
#

or just make it more convinient

misty wedge
#

Isn't adding a [GenerateAuthoringComponent] making it more convenient? πŸ˜‰

rustic rain
#

but generate authoring component is gone for a reason

misty wedge
#

It's gone because it was a mess code wise, the devs said as much

rustic rain
#

it's just not compatible with Baker workflow

misty wedge
#

iirc someone said they may add a replacement in the future

rustic rain
#

and I honestly don't understand the reason why the emphasise so much on editor live conversion

#

with that baking

misty wedge
#

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

rustic rain
#

it's simply shift towards ECS in conversion, with all it's downsides

misty wedge
#

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

rustic rain
#

that's the whole reason I'm so frustrated

#

I want to iterate over authoring components

#

it's way more convinient

misty wedge
#

authoring components != authoring monobehaviors

rustic rain
#

bruh

misty wedge
#

I'm guessing you mean the latter

rustic rain
#

BakingSystem is singleton from what I understand

haughty rampart
#

is there a way to debug burst intrinsics?

rustic rain
#

judging by Manual baking systems are SystemBase

misty wedge
#

I didn't use them much

rustic rain
#

all conversion systems

misty wedge
#

Well yes, but BakingSystem is the base for baking systems

#

And if you make a concrete implementation of a GameObjectConversionSystem, that's a singleton

misty wedge
#

Are you not allowed to inherit BakingSystem?

azure marlin
#

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();
    }
}

wraith hinge
misty wedge
# rustic rain sir...

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

haughty rampart
#

oh, a lot of people were wondering if the newer build system would come back? seems like most people liked it

rustic rain
#
    /// <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

wraith hinge
haughty rampart
#

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

wraith hinge
#

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

haughty rampart
#

damn

wraith hinge
#

like it never got buy-in from actual platform teams

#

which would definitely be required to support it properly

strange wagon
#

Hi, is it ok to keep auxiliary methods in my components?

misty wedge
haughty rampart
#

it would be more in spirit of ecs not to

strange wagon
#

no problems with performance or job system?

haughty rampart
#

not significantly

misty wedge
haughty rampart
misty wedge
#

I know, but it's very insignificant

haughty rampart
#

that's why i said 'not significantly'

misty wedge
#

And I said it's an understatement πŸ˜›

haughty rampart
#

don't see how

misty wedge
#

not significant could mean, "quite a bit, but not significantly"

haughty rampart
#

and it is

misty wedge
#

I wouldn't call it quite a bit

#

Quite a bit for me is like >20% performance loss

wraith hinge
#

what's the perf problem?

misty wedge
#

Probably even more

wraith hinge
#

oh just that you run code when you access it?

haughty rampart
misty wedge
#

That's an insane micro optimization

wraith hinge
#

depends how many times the loop happens per frame πŸ™‚

misty wedge
#

^

haughty rampart
#

and even in normal standards, >5% is a significant impact

misty wedge
#

I think we are arguing semantics at this point, it's all good πŸ‘

haughty rampart
#

yeah πŸ‘

misty wedge
#

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

haughty rampart
misty wedge
#

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...

haughty rampart
#

definitely ++i

strange wagon
#

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

misty wedge
wraith hinge
#

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

haughty rampart
fallow socket
misty wedge
haughty rampart
misty wedge
haughty rampart
misty wedge
#

But I might be misremembering

haughty rampart
#

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

misty wedge
misty wedge
#

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

viral sonnet
#

did i just wake up in the 90s? discussion about ++c or c++. are you seriously that bored.

misty wedge
#

I'm distracting myself from my sadness

rustic rain
#

My conversion is broken

#

Can't do anything eithe

#

πŸ₯²

viral sonnet
#

lol sorry you 2 πŸ˜„

misty wedge
#

someone call Mr. Unity and tell him to fix physics in netcode

azure marlin
whole gyro
#

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]"

haughty rampart
#

no

wraith hinge
#

@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

misty wedge
#

I don't use any parts of the simulation, just collision queries with character controllers

whole gyro
wraith hinge
#

(actually @misty wedge let's make a thread)

whole gyro
#

Can somebody else test this for me just to make sure its not an issue with my setup?

  1. Create an empty game object with a really long name like "Some really really really really really really really long game object name"
  2. Open the Entities Hierarchy window
  3. Check console for errors
wraith hinge
#

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

whole gyro
#

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.

wraith hinge
#

i think we should just not error in that case

#

i'll forward it

whole gyro
#

Let me know if you want a bug report

wraith hinge
#

hopefully not, let's see

whole gyro
#

Removing those long name game objects fixed my issue btw

tropic venture
#

does the "β˜‘ Static" setting on an object perform the same function as adding StaticOptimizeEntity script if the object is in a subscene for ECS?

rustic rain
wraith hinge
#

you wouldn't want them to, right? the transform system would just waste time processing them

tropic venture
#

so there's a difference if i use the Static checkbox or if i use the StaticOptimizeEntity class?

rustic rain
#

@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

tropic venture
#

oh i guess they have GameObject children, but when converted to entities probably thats what you mean they have no children

tropic venture
misty wedge
#

Do you still need to use the (smaller) builds trick to build il2cpp on 1.0.0?

sinful cipher
#

So no LTS 2020/2021 support? Am I understanding this correctly?

rustic rain
#

yep

sinful cipher
#

Hmkay thanks

misty wedge
errant hawk
gentle gyro
gentle gyro
#

Don't know where to find it. But was hopping to avoid a breaking change right now...

errant hawk
#

Then no unity didn't break anything unless you updated your editor or packages

gentle gyro
#

Have you been able to do Quest 2 builds with Dots on 2021.3?

gentle gyro
#

Dots .51.1

errant hawk
#

in fact, I don't do any builds at all

#

or at the very least, incredibly rare

gentle gyro
#

Ok. My Rift S build works fine but can't seem to build for Quest 2...

errant hawk
#

you likely changed something, then

gentle gyro
#

So were do we get 1.0 anyhow?

errant hawk
misty wedge
#

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

sinful cipher
wraith hinge
#

no, there's bugs. it's a beta and an experimental package πŸ™‚

gentle gyro
#

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?

rustic rain
#

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) });
            }
        }
    }
#

πŸ‘΄

brave field
#

πŸ₯² Upgrade to 1.0 exp is damn hard. Still dun have nice auto upgrade yet and I need to manual do all the upgrades

safe lintel
#

yeah its kind of a bear to convert a full, somewhat complex project

robust scaffold
#

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

misty wedge
#

I'm really liking all of the changes

#

Especially value type shared components. Kept me from bursting a few jobs

gentle gyro
#

Not sure if I have all the settings right as I haven't found a comprehensive list yet...

gentle gyro
viral sonnet
#

@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

brave field
viral sonnet
#

great release for the most part. the only thing that stings is the 128 cap and noone has adresses this yet. πŸ™‚

gentle gyro
# balmy thistle What's the problem?

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...

wraith hinge
#

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

robust scaffold
#

Swamped with work though. Cant get to coding for another few weeks at least. Pain.

viral sonnet
#

hope you don't have too much authoring comps to rewrite πŸ˜„

brave field
#

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?

viral sonnet
#

one guy on the forum wrote they have 200+ [GenerateAuthoringComponent] ... RIP i guess

balmy thistle
#

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.

balmy thistle
brave field
robust scaffold
robust scaffold
gentle gyro
#

Just want to make sure I'm not chasing a ghost...

balmy thistle
#

I'll ask around

viral sonnet
#

@balmy thistle finally you got your tag. already had a hunch you are unity staff πŸ˜„

gentle gyro
viral sonnet
#

the copyTransform system is still around but sealed off so it's unusable. CompanionLink comp is private

brave field
misty wedge
#

Anyone know if you can access an ISystem's state with reflection?

viral sonnet
#

do you care for the state or for reflection? πŸ™‚

misty wedge
#

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

misty wedge
#

But from what I can tell reflecting SystemState probably won't work

viral sonnet
viral sonnet
#

that's called in my performance test

misty wedge
#

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

viral sonnet
#

oh yeah, definitely πŸ˜„ good thing we don't have to deal with that πŸ˜„

misty wedge
#

I'm guessing it's possible somehow but I have no idea how

viral sonnet
#

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 πŸ™‚

misty wedge
#

There's definitely ways to do it without but I thought I'd try and see if it works with ISystem

wraith hinge
#

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

misty wedge
#

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 πŸ™‚

wraith hinge
#

usually a bad plan, and a much better plan with systembase…

misty wedge
#

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

wraith hinge
#

I’d say if the port requires reflection where there was none, it’s unlikely to be worth it πŸ™‚

misty wedge
#

No, it already currently uses reflection on SystemBase

errant hawk
misty wedge
#

For dependency injection

rustic rain
#

publicise it for direct access

misty wedge
#

What is internal?

rustic rain
#

dependency related fields

misty wedge
#

No, it has nothing to do with EntityQuery or job dependencies

viral sonnet
#

@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?

wraith hinge
#

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

misty wedge
#

Can I get the Type for an ISystem from a SystemHandle or SystemState?

rotund token
#

It's getting hard every morning to wake up and read every comment in here! Too much activity

misty wedge
#

TypeManager.GetSystemType?

errant hawk
rustic rain
#

oof

half jay
#

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 ?

wraith hinge
#

both. the point is it lets you burst your onupdate/create/destroy/etc

rustic rain
#

Are entities sources posted somewhere online?
No PC around, but I want to learn internal stuff

safe lintel
pastel field
#

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.

karmic basin
#

Well if it's your last issue to solve, your game is pretty much finished πŸ˜…

rotund token
#

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

#

(It turned out if you offset any pointer by 1 byte with an Allocator.Invalid it acted same way as a deferred array)

misty wedge
#

Why is NativeParallelHashMap not unmanaged?

safe lintel
#

er how do you get that singleton system entity?

misty wedge
#

SystemAPI.GetSingleton<Type>(<SystemHandle>) iirc

viral sonnet
rotund token
#

yeah it's patched by job scheduler

pastel field
rotund token
#

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

safe lintel
#

@misty wedge how does this work in managed systems?

misty wedge
safe lintel
#

yeah api showing all unmanaged but I do see managed singletonsystem entities in the hierarchy

misty wedge
#

You can get a managed systemhandle iirc

#

It's part of SystemBase

rotund token
#

yeah it's just literally SystemHandle

misty wedge
#

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?

rotund token
#

yep

#

they're just normal entities

misty wedge
#

Is there any read-only performance difference between NativeParallelHashMap and NativeHashMap?

#

(when reading from it from multiple threads at the same time)

rotund token
#

NativeHashMap is new and optimized for single thread writing

#

It has a lot less overhead

#

i expect it would be faster for reading

misty wedge
#

This is for fetching blobassetreferences inside jobs, so It should be fine right?

rotund token
#

reading is fine parallel

#

NativeHashMap can't write parallel

misty wedge
#

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

viral sonnet
rotund token
#

don't believe so

rotund token
viral sonnet
#

no idea either, the generics have all been rewritten to unmanaged

rotund token
#

yeah that was a bit of effort to update all my extensions

viral sonnet
#

same πŸ˜„

rotund token
#

not sure why i hadn't made them unmanaged in first place

viral sonnet
#

new safety system took a bit more though

rotund token
#

interesting, i havent had to touch that at all

viral sonnet
#

you didn't use DisposeSentinel?

misty wedge
rotund token
#

that's why i made them custom containers πŸ˜„

#

they were basically just containers without the disposesentinel

misty wedge
#

Did they rewrite the dispose sentinel system or why are they all now unmanaged?

rotund token
#

its removed

viral sonnet
#

ah, yeah i wrote the unsafe part and safe nativecontainers

rotund token
#

i believe the allocator now tracks it

#

(i have not tested or looked at this at all yet though)

misty wedge
#

Ah, I see

#

Can you nest e.g. NativeList<NativeList<int>> now?

rotund token
#

i havent tested but from what i understand this should still be an error passing in a burst job

viral sonnet
#

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);```
rotund token
#

this for the most part existed pre 1.0

#

but it was just the prep work i guess

viral sonnet
#

possibly, i haven't seen it in any collections code

rotund token
#

internal static readonly SharedStatic<int> s_staticSafetyId = SharedStatic<int>.GetOrCreate<NativeList<T>>();
NativeList entities 0.50

viral sonnet
#

and as I have no idea about it really it's just copy & pasted code from their 1.0 collections πŸ˜„

rotund token
#

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)

misty wedge
#

That makes sense

#

And them not being able to be put into components before was just a limitation of the sentinels?

viral sonnet
rotund token
#

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

viral sonnet
#

nvm, i see what you mean

#

disposing the main can't dispose the elements

rotund token
#

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

viral sonnet
#

i know way too little about the safety system πŸ™‚

rotund token
#

bit of a black box unfortunately

viral sonnet
#

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! πŸ˜„

rotund token
#

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 πŸ˜„

viral sonnet
#

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

rotund token
#

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

viral sonnet
#

i'm the last dev so i doubt the refactoring part but you are dead on with noone reading it! πŸ˜„

rotund token
#

"I could go read Enzi's documentation, but I can't bebothered I'll just rewrite it"

safe lintel
#

ugh so much stuff silently failing to work because the interface doesnt work anymore, kinda wish anything using ICGTE would fail outright

rotund token
#

should at least have had an obsolete tag

#

if not just outright removal

safe lintel
#

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

viral sonnet
#

i used find & replace and changed to IConvert..2

#

πŸ˜„

gusty comet
#

so unity added entities

balmy thistle
#

I heard that

misty wedge
#

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

haughty rampart
#

Where are the burst assemblies kept? Need to delete them

viral sonnet
#

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?

haughty rampart
viral sonnet
#

Library\BurstCache is my best guess

haughty rampart
#

Prob not

#

Tried deleting that already

viral sonnet
#

what are you having issues with?

haughty rampart
#

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

viral sonnet
#

try to delete the library folder first

haughty rampart
#

tried 3 times already

#

oooooooooooooofffffffffffffffffffffffffff even creating a new project completely crashes almost my whole pc now

viral sonnet
#

oh damn 😦 can you run any game? maybe it's not unity related

#

out of disk space or smth ^^

misty wedge
#

What happens if you put a managed type in an ISystem?

haughty rampart
#

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

haughty rampart
misty wedge
haughty rampart
#

have you tried running the game?

misty wedge
#

Nope, but that's hardly a compile error πŸ˜…

haughty rampart
#

idk exactly. i just remember you WILL get an error at some point

misty wedge
#

It throws an ArgumentException on running πŸ‘

haughty rampart
#

well it's something i'm gonna cover with the analyzer i'm gonna create. so you will have in VS errors already :)

misty wedge
#

I also managed to inject my types into ISystem but it's probably not a good idea, so I may scrap it

viral sonnet
haughty rampart
viral sonnet
#

yep, now it's possible

haughty rampart
#

even though the project itself was already stored on a different drive that had plenty space than windows

viral sonnet
#

take a look at where windows is storing the paging file

haughty rampart
viral sonnet
#

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

haughty rampart
#

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.....

viral sonnet
#

lol that's a bit much

misty wedge
#

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

viral sonnet
#

clear entities cache

misty wedge
#

Ok so it's just a bug and I didn't break anything

viral sonnet
#

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

quick gazelle
misty wedge
#

Is there anything I need to watch out for when creating a build? It crashes immediately at bootstrapping

rotund token
#

Mono or il2cpp?

misty wedge
#

il2cpp

rotund token
#

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

misty wedge
rotund token
#
    {
        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

misty wedge
#

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

rotund token
#

yes

#

you do

rotund token
misty wedge
rotund token
#

something about il2cpp getting alignment mixed up

rotund token
misty wedge
#

Ok πŸ˜…

#

I'll try building mono and then with faster (smaller) builds and see what happens, thanks

rotund token
#

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

viral sonnet
misty wedge
#

Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-228022' UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions) wat thonk

#

someone is stealing my assets

viral sonnet
#

damn those pirates!

misty wedge
#

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 🀷

haughty rampart
#

how tf does burst generate a Object reference not set to an instance of object for me??

#

XD

viral sonnet
#

has anyone used the unity ObjectPool or DictionaryPool?

haughty rampart
#

you mean the built in object pooling system?

viral sonnet
#

yeah

haughty rampart
#

a bit yeah, sure

solar spire
#

They're a simple and accessible structure, but what's it got to do with #archived-dots ?

viral sonnet
#

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

proud jackal
viral sonnet
#

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.

haughty rampart
#

🀷
but a dots question: are nativearrays always aligned?

rotund token
#

Ones you create should be (deferred ones are not until scheduling)

haughty rampart
#

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'

rotund token
#

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

viral sonnet
rotund token
#

But once you have pointer you're on your own, can do what you want

haughty rampart
#

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

viral sonnet
#

(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? πŸ˜„

haughty rampart
#

πŸ€” not....really....a good....use case

viral sonnet
#

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

haughty rampart
#

am i missing something or are quite a few intrinsics missing in Unity.Burst.Intrinsics.X86 ?

rotund token
#

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?

haughty rampart
viral sonnet
#

i don't see a way to set the enabled/disabled flag in a baker for a comp

rotund token
#

Hmm hadn't really considered that use case but it makes sense

viral sonnet
#

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

errant hawk
#

Personally I would have a single component, and in the edge-case you need only dead components, you can add an isDead component

viral sonnet
#

i'd get all sorts of entities if i query for any and exclude IsAlive

errant hawk
#

is it possible to NOT a query?

errant hawk
viral sonnet
#

well there is exclude but there is not really a query mode for a comp that is on the archetype but disabled

viral sonnet
#

the baker system can't pick up a prefab that'll be converted with GetEntity

brave field
#

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?

late mural
#

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)

rustic rain
#

you can store delegate pointer

#

and then unwrap it in job

#

you'll need MethodInfo of this function

late mural
#

burst compiled would be really nice, cause im doing a for loop with around 70 thousand particles, so performance is very required

rustic rain
#

you can only run native methods in burst

late mural
#

that is really unfortunate

#

what counts as a native method, im happy to try make one?

rustic rain
#

burst compiled or extern cpp

late mural
#

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?

rustic rain
#

if it's extern cpp

#

you literally just call it

#

same with burst

late mural
#

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?

late mural
misty wedge
late mural
misty wedge
#

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

late mural
#

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?

misty wedge
#

You can create a burst pointer to a function that is also burst compiled, but it has the same requirements (no managed code)

late mural
misty wedge
#

That burst delegate can be passed to a burst compiled method, but I doubt that solves your problem

late mural
#

it might

#

im willing to try anything

late mural
#

im just trying to mess with particles positions and velocities using c style arrays, so it might work, thanks a ton!

misty wedge
#

Why not convert those arrays to native collections and pass those to a burst compiled job

late mural
misty wedge
#

I'm not sure what you mean by c style array, something like int[]?

late mural
#

int*

#

pointer arrays

#

i hate them so much, but i cannot appear to evade them

misty wedge
#

Alright, then you can either memcpy the data or possibly just set the internal collection pointer (although I've never tried that)

late mural
#

dont know what either of those mean, but ill research them, thanks a ton!

late mural
misty wedge
#

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

late mural
#

ok, i think i should be able to work with that, thanks a ton!

misty wedge
# late mural 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

late mural
coarse turtle
safe lintel
#

is there a way to view all the bugs you submit these days? their new system doesnt have that overview like fogbugz did

rustic rain
#

Is there any way to have my code run outside of systems?

proud jackal
rustic rain
#

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

misty wedge
#

What are you trying to inject? just have another function that runs before OnCreate?

rustic rain
#

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

misty wedge
#

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&)

haughty rampart
#

had that happen once too. i just ignored it and it was fine

misty wedge
#

It cancels the build...

#

Unless I missed something else that was interfering, but I'll double check

misty wedge
coarse turtle
#

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

misty wedge
#

message I posted is the only "real" error I see

haughty rampart
#

maybe restart unity and try again?

misty wedge
#

Already tried everything

#

reimport

haughty rampart
#

hm.

misty wedge
#

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

wraith hinge
#

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...)

misty wedge
#

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 🀷

wraith hinge
#

There are some pieces of global state outside the project that can get corrupted in rare cases

#

Notably the global package cache

timber ivy
#

I was trying to dig through the source to find it but how are entity id's created and managed?

rustic rain
#

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

half jay
#

through blob assets?

rustic rain
#

that's not what they are for

safe lintel
#

@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

rustic rain
#

πŸ€”

#

nope

#

that gave me empty array too

#

hmm

safe lintel
#

sure there are cameras in the scene?

rustic rain
#

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 πŸ€”

mild ledge
#

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 ?

safe lintel
#

@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.

mild ledge
safe lintel
#

well you will have to wait then

mild ledge
#

I started that thread🀣

safe lintel
#

sucks, I think everyone here is probably waiting on some major feature or two for their own uses

mild ledge
#

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

misty wedge
safe lintel
#

@misty wedge dont be so sure, I built a player that crashes immediately on load 😭

misty wedge
rustic rain
#

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

rustic rain
misty wedge
#

Call it later

rustic rain
#

πŸ€”

misty wedge
#

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

rustic rain
#

bruh

safe lintel
#

well I made it to the splashscreen at least

#

tried both dots platform asset build and builtin build

rustic rain
#

I wish they have a special callback

#

PostCreate

#

or smth

#

before world actually runs

misty wedge
#

OnStartRunning?

rustic rain
#

no

#

that runs every single time required query runs

misty wedge
#

You can add it relatively simply

#

Just call a function on each system that e.g. implements an interface after you created the world

rustic rain
#

I know, but...

misty wedge
#

That will cause all OnCreate to run, then your function

rustic rain
#

feels weird Unity won't do it themselves

misty wedge
#

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?

rustic rain
#

the problem is that

#

literally everything is tied to OnCreate

#

so I just don't have Component

misty wedge
#

The component reference would be baked

rustic rain
#

by the time I need it

misty wedge
#

(if that even works, I haven't tried it)

rustic rain
#

nah, it doesn't

#

all references die

misty wedge
#

😦

rustic rain
#

in subscene

misty wedge
#

Then just fetch it in OnUpdate

rustic rain
#

πŸ₯²

safe lintel
#

are you trying to keep a reference inside a subscene of an object that is outside the subscene?

rustic rain
#

no

#

I literally have 2 cameras in a scene

#

normal scene

#

and I can't grab them inside World

muted star
#

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?)

safe lintel
#

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

rustic rain
#

πŸ₯²

misty wedge
rustic rain
#

I consider disabling default world creation

#

for the sake of normal world creation workflow

muted star
viral sonnet
#

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.

wraith hinge
#

did you do the thing where you make sure the query includes prefabs

#

that always gets me

viral sonnet
#

could be it! πŸ˜„

rustic rain
#

Anyone else knows how Default world creation works?

viral sonnet
#

that was it! thanks for the quick answer. i need to be more aware of this

safe lintel
#

@wraith hinge can one make new/additional entities inside of a baking system or is that only to be done inside of a baker?

rustic rain
#

I'd guess that's what I need UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD

wraith hinge
#

afaik baking systems are anarchy

#

so just go nuts

safe lintel
#

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)

wraith hinge
#

errr i'm not aware of that error but i'm also not a baking pro

safe lintel
#

alright thanks, ill try to make a simple repro to submit

viral sonnet
#

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);
    }```
wraith hinge
#

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

viral sonnet
#

on that note, it would be great if we could just set the state of IEnableComponent in the baker itself

safe lintel
#

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 πŸ™‚

wraith hinge
#

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)

safe lintel
#

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

wraith hinge
#

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 πŸ™‚

safe lintel
#

that would be appreciated πŸ™‚

misty wedge
# wraith hinge Notably the global package cache

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

wraith hinge
#

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

safe lintel
#

hey that looks just like my crash πŸ₯²

misty wedge
#

my build crashed first!

safe lintel
misty wedge
safe lintel
#

well I reported my crash last night πŸ™‚

wraith hinge
#

i believe so? at least i thought all the known crashes so far are il2cpp-specific

safe lintel
#

(crash repro bug)IN-18341 if interested

rustic rain
#

Is there a way to ensure BakingSystem runs after another?

#

It feels like UpdateAfter just doesn't work on them

misty wedge
#

zzz

#

I think this is somehow related to addressables, but I'm not 100% sure

wraith hinge
#

this seems like a separate bug, which may or may not be dots related, yeah

#

addressables definitely talk to that code pretty deeply

misty wedge
#

I think I'll just give up creating a build and wait until 2022.2 releases

wraith hinge
#

very reasonable idea πŸ™‚

misty wedge
#

The upgrade to 2022.2 also bumped my addressables version from 1.19.19 to 1.20.5, so maybe I'll try downgrading...

wraith hinge
#

i'm skeptical

safe lintel
#

oh holy moly mono build works for me

misty wedge
rustic rain
#

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?

rustic rain
#

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

viral sonnet
#

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

viral sonnet
#

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?

hollow sorrel
#

i hear 1.0 experimental is out

#

what's the verdict

viral sonnet
#

i don't think it's worth it yet

rotund token
#

Lies

rustic rain
#

Not worth it

#

everything is broken

viral sonnet
#

unless you are really into into and want to alpha test

rotund token
#

Is it? Or is that your obscure way of building everything issue πŸ˜„

hollow sorrel
rotund token
#

ISystem is mint

viral sonnet
#

to upgrade. dots and entities is phenomenal

hollow sorrel
#

damn

viral sonnet
hollow sorrel
#

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

rustic rain
#

no idea how to deal with them

rotund token
#

Anything outside of hierarchy/ui?

rustic rain
rotund token
#

I'm at 11/14 libraries running now without many issues

rustic rain
#

Can't debug my entities without it

rotund token
#

Except random ui errors that don't really cause any problem second time I select something

#

First select fail, second+ select fixes itself

hollow sorrel
#

i'm still 'stuck' (haven't touched it in a while) updating to 0.51 because unmanaged systems broke my custom world init

rotund token
#

I found 0.51 upgrade to be quicker but more broken

hollow sorrel
#

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

rotund token
#

Haven't tested

#

But if you don't add it to playerloop good chance it won't work

hollow sorrel
#

:(

rotund token
#

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

hollow sorrel
#

not sure how that could work when trying to do rollback with a separate world for simulation and rendering

rotund token
#

Hmm

#

Not sure for that case

#

I do not my roll back in same world

hollow sorrel
rotund token
#

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

hollow sorrel
#

ahh i see

#

thanks for writing these up

rotund token
#

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

viral sonnet
#

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.

rotund token
#

you and your generics

viral sonnet
#

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

rotund token
#

a list of things for me to avoid would be nice πŸ˜„

viral sonnet
#

i'll try to write a concise list of things in the forum

#

sometimes we have workarounds, sometimes we dont

rustic rain
#

hmmm

#

Anyone played with custom world creation?

gusty comet
rustic rain
#

RegisterUnloadOrPlayModeChangeShutdown();
I noticed this method in DefaultWorldInitialization

gusty comet
#

you mean like

#

procedural

#

?

rustic rain
#

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

viral sonnet
#

long time i've done this but it was just a matter of new World() and then using the EntityManager from it

rustic rain
#

yeah, seems so

#

I want to use custom bootstrap

#

because

#

it seems like UI is broken

#

if I do it otherwise

rotund token
#

Well it's basically designed for this purpose

rustic rain
#

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

rotund token
#

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

rustic rain
#

I am not sure what is actual default implementation

rotund token
#

Default world Initialization

#

It will try create via custom boot strap

#

If not, set it up instead itself

rustic rain
#

judging by this piece of code

#

if I return my world

#

Init will do early return before all loop registration

rotund token
#

Ah well then yeah you need to set it

rustic rain
#

also I don't what is this event

#

which is invoked

rotund token
#

Yeah call those 2 methods

rustic rain
#

in my IDE it's unused

rotund token
#

Ignore it πŸ˜„ or call it if you really want

viral sonnet
#

SystemAPI.Query is mainthread only, yet we can't use MBs in the query.

#

can't query my Animator QQ

uncut rover
#

Do class component work ? Or can aspect handle that ?

proud jackal
#

MB?

viral sonnet
#

MonoBehaviour

proud jackal
#

Gotcha, yeah, no, but IJobEntity does support it :3

#

As long as you schedule with .Run ofcourse

misty wedge
viral sonnet
#

will MBs eventually be supported in SystemAPI.Query?

misty wedge
#

It specifically crashes on burst generated code

#

EntityQueryImpl.GetSingletonChunk

#

Is it possible to disable burst for a standalone build?

proud jackal
misty wedge
#

This line crashes my build for some reason:

rustic rain
#

huh, seems like default system creation has changed a lot

devout prairie
#

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

wraith hinge
#

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

misty wedge
#

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:

wraith hinge
#

I would think it means something you are doing in one of your own oncreate’s is funky in some way

misty wedge
#

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

rotund token
#

You should load the crash dump

#

And find exactly where it crashes

misty wedge
viral sonnet
#

good old null ptr

misty wedge
#

it wasn't me I swear officer

#

This is the call stack:

viral sonnet
#

likely this one: SystemAPI.GetSingletonRW<SimulationSingleton>();

misty wedge
#

Yeah, I posted it up a bit higher

viral sonnet
#

no idea really but it means it doesn't exist, yet the query says it does. it's an IEnableComponent btw

misty wedge
#

That seems like a bug

viral sonnet
#

oh nvm, the singleton isn't.

#

is this just with il2cpp?

misty wedge
#

mono

#

il2cpp crashes for me before even getting to the splash screen

viral sonnet
#

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.

misty wedge
#

You just need to set a check mark in the preferences

viral sonnet
#

yeah but why?

misty wedge
#

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

viral sonnet
#

this is the weirdest checkbox i've ever ticked

#

good thing it has no captcha behind it. i might have failed it

misty wedge
#

I'm wondering why it isn't enabled by default if you have Unity.Entities installed

viral sonnet
#

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

misty wedge
viral sonnet
#

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 ```
misty wedge
#

I don't think that error causes a crash

#

I get it too

viral sonnet
#

yeah, still an exception which breaks code execution. can't be good

misty wedge
#

Probably

#

I get like 10 of those

#

But it crashes on the broad phase oncreate

viral sonnet
#

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

misty wedge
devout prairie
viral sonnet
#

all my projects are XXXGank! lol who names things properly

devout prairie
#

So physics is crashing builds.. that's annoying 😐

misty wedge
devout prairie
#

I've been holding back on dropping what will probably be days on doing a conversion

#

( to 1.0 i mean )

viral sonnet
#

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 πŸ˜„

devout prairie
#

looks like they've updated all the samples including physics, i wonder if it's worth trying to build one of those

devout prairie
misty wedge
#

Hey I was very productive today, I spent the day deleting library and reimporting to create a few builds that crashed jamcat

devout prairie
#

haha, tbf sometimes a lot of days feel like that anyway, two steps forward one step back

misty wedge
#

wow look at this guy, actually moving forwards...

viral sonnet
#

the days before 1.0 i learned UIToolkit so it's just a fitting continuation of the level of productivity

devout prairie
#

we're all the guinea pigs

viral sonnet
#

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

rustic rain
#

It was so much more versatile

viral sonnet
#

at least make a smooth path to bakers

#

it's so annoying, my code base is screwed

rustic rain
#

I don't get what's the point of making conversion so strict

#

Especially performance wisr

#

Considering it's fully offline

viral sonnet
#

chewed of more than they can eat or what's the saying?

rustic rain
#

I swear, I want to implement back conversion system

viral sonnet
#

baking is one thing but incremental baking. oh boy

rustic rain
#

Which would allow iteration over gos

viral sonnet
#

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.

rustic rain
#

Yeah, worst part - you almost never know what's wrong

#

Have to guess

viral sonnet
#

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

misty wedge
#

Baking has been working fine for me but I have like 5 entities I'm baking so maybe that's why thonk

#

Except the random times I get this Loading Entity Scene failed because the entity header file couldn't be resolved.

viral sonnet
#

how often did you get this error in 0.51?

misty wedge
#

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

viral sonnet
#

I got it like 2 times this whole year. now constantly

misty wedge
#

I'm sure it'll be fixed, 1.0.0 was just released

viral sonnet
#

sure it will πŸ™‚

coarse turtle
#

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 πŸ€”

viral sonnet
#

just GetEntity

misty wedge
#

Component and GameObject inherit Object

viral sonnet
#

call it with your GO, done

coarse turtle
#

ah sucks, the Object i wanted to grab was a Material haha

misty wedge
#

Oh, nevermind, I misunderstood

coarse turtle
#

so it doesn't fall under UnityEngine.Component or a GO

viral sonnet
#

oh, and that worked in 0.51?

coarse turtle
#

Yea

#
// 0.51 in an IConvertGameObjectToEntity
var materialEntity = conversionSystem.GetPrimaryEntity(material);
dstManager.AddComponentData<LinkedMaterialEntity>(entity, materialEntity);
viral sonnet
#

looks like another regression

coarse turtle
#

I'll probably rethink this so I'll just circle back and finish converting the rest of my project lol

viral sonnet
#

you should be able to provide the go of the material, right? or did you just reference the mat?

coarse turtle
#

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

viral sonnet
#

i'll take a look what the HR does (we need another abbrevation for Entities.Graphics btw πŸ˜„ )

coarse turtle
#

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 Β―_(ツ)_/Β―

viral sonnet
#

so first thing, you want to have a single entity for a material right?

misty wedge
#

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

viral sonnet
#

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

errant hawk
viral sonnet
#

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.

errant hawk
errant hawk
viral sonnet
#

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

errant hawk
#

zero parameters

viral sonnet
#

looks fine to me

errant hawk
#

Try removing the RefCount assignment. maybe it wants absolutely bone-dry constructor

viral sonnet
#

can't that's a unity comp πŸ™‚

errant hawk
#

you mean that was decompiled?

#

or from the package

viral sonnet
#

entities package

errant hawk
#

hmm...

viral sonnet
#

there's also an error for EndSimulationEntityCommandBufferSystem.

gusty comet
#

what's the advantage of having entities instead of scripted objects

viral sonnet
#

and my hunch is that these errors break the loading and get physics to crash

errant hawk
viral sonnet
#

v1 yeah

#

schnoozle has the same error. are you using physics?

errant hawk
#

Have you tried readding all the packages?

gusty comet
rotund token
#

Where is your actual crash

#

Have you checked your dmp file?

errant hawk
rotund token
#

That's your log

viral sonnet
#

so your build works with physics?

rotund token
#

Not your dmp file

#

Load up the generated dmp file in VS it will show you exactly what line you crashed on

errant hawk
#

@viral sonnet what's your editor version

viral sonnet
#

2022.2.0b8

viral sonnet
rotund token
#

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

viral sonnet
#

it's the same thing that schnoozle posted

rotund token
#

Can you step back a few

#

Where's this being called from

#

It seems the singleton isn't being setup?

viral sonnet
#

sorry i don't know how to step back. this is the only step available

rotund token
#

You don't have a stack?

#

Should see a call stack mid bottom by default

viral sonnet
#

but this is the crashline: SystemAPI.GetSingletonRW<SimulationSingleton>(); from BroadphaseSystem

rotund token
#

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)

viral sonnet
#

found the call stack. never needed this when working with dmp files but this is cool πŸ˜„

rotund token
#

It's easier to debug a crash in a build

viral sonnet
#

anyway, same line i posted

rotund token
#

Than an exception in burst in editor

#

In editor all you get is, please turn off burst