#archived-dots

1 messages ยท Page 198 of 1

deft stump
#

Svelto doesn't have official documentation. The reason is that documentation is costly to mantain and...I reckon people don't need it, thanks to the highly documented and simple mini-examples.

#

this guy doesn't deserve my star

coarse turtle
#

DefaultEcs has some API docs fwiw

safe lintel
#

what are you trying to do anyway with hybrid?

#

convert and inject should generally simple enough to use with physx

deft stump
#

if I try to use Hybrid Rigidbody the entity doesn't get updated w/ classic Physics

#

So I'm left with trying to wrap my head around other ecs frameworks just so I can use classic physics

robust scaffold
#

Default scene with one cube. URP not Hybrid: 2.7ms update. URP with hybrid: 6.5ms update. What the fuck? Where is my performance going?

#

Hrm, dont convert the camera into an entity. From 6.5ms to 9ms update time. Literally rendering an empty scene.

safe lintel
#

i dont know if you want to keep using the rendermesh on the entity or the renderer on the gameobject but it wouldnt be too hard to make a conversionsystem that strips them from entities, to just have a basic mirrored entity transform setup

#

also classic physics should work fine if you manually add the rigidbodies in your authoring class when using inject

regal epoch
#

Does anyone know what's going on with dots recently? Haven't read anything about it for a while in the patch notes

rugged lark
#

I was told to not use the Hybrid Renderer, I assume due to performance issues? Is there any validity in that?

zenith wyvern
#

Hybrid renderer is great for large numbers of entities that share the same mesh/material. Not at all good (yet) for procedural meshes or lots of unique meshes or materials

zenith wyvern
vagrant surge
#

btw @deft stump

#

unlike unity DOTS

#

svelto ecs is actually used in a game

#

svelto is what drives Robocraft game

#

also unlike unity DOTS, it has samples that work XD

#

default ecs seems to be an ecs made to make an ecs, not used in any game, which is very much a terrible idea. Needs to be boostrapped

deft stump
#

ok... duly noted...

fading nest
#

Hey has anyone got experience messing with textures in DOTS? I am making a bullet hell game and I wanna make the background scroll to show movement. I've put a starry texture on a quad behind everything and want to make a system change the offset every frame, is there a better way? Can this be done via DOTS? ty

amber flicker
#

Scheduling continues to be frustrating. Run: 0.75ms main thread, ScheduleParallel: 0.45ms x 24 threads, total 11ms. ๐Ÿ˜ญ

#

ISystemBase using IJobEntityBatch fwiw

pliant pike
#

your not using nativelist are you?

amber flicker
pliant pike
#

is it a new bug or unoptimised, or just the general overhead of starting a load of new threads

amber flicker
#

overhead that's always been around.. just hoped by now it would be better.

pliant pike
#

yeah, hopefully they can get it down, it makes using multiple threads almost pointless depending on what your doing

fading nest
amber flicker
hollow sorrel
#

anyone know how ecb's are handled when serializing a world? like if you schedule an ecb command at the end of a frame for an ecb that executes at the start of next frame, then serialize and deserialize, does that command just get lost?

zenith wyvern
#

If it was bursted IJobEntityBatch shouldn't even work yet afaik

amber flicker
#

lmk if you see anything glaringly wrong

zenith wyvern
#

@amber flicker From the code you posted it doesn't look like you have [BurstCompile] on your OnUpdate function

amber flicker
#

wait it needs to be on there too? ok cool lemme try

zenith wyvern
#

That's my understanding at least

amber flicker
#

well if I add it, it no longer compiles and then I have to change it to IJobChunk.. but once I've done that the timings look the same

zenith wyvern
#

rip

amber flicker
#

hmm maybe slightly better actually.. kinda hard to tell without setting up a proper test which I'm too lazy to do - looks a little closer to 0.4/10 than 0.5/12

pliant pike
#

yeah one thing is to make sure it says burst in the profiler

#

I swear it seems random sometimes for whether systems are bursted or not, I have to like select enable compilation on and off to get it work correctly sometimes

amber flicker
#

think the profiler only shows if the job is bursted - which it was - this is specifically the Update

pliant pike
#

it should be highlighted in green instead of blue

amber flicker
#

which at least in 2020.2.1f1 looks identical in the case OnUpdate is also bursted

pliant pike
#

Interesting I did not know that ๐Ÿค”

warm panther
#

I have an excruciating physics problem.
I have judder, even with body smoothing on.

This is with no Physics interpolation

mint iron
#

its not bad once you get use to it, but its extremely structured, there's basically one way you have to do everything or it wont work.

warm panther
mint iron
#

is that burst of speed at the start intended?

warm panther
warm panther
#

so it seems to be related to application framerate.

mint iron
#

the recorder would force the framerates to be in sync?

warm panther
#

Seems so.

#

The judder is sometimes stronger, sometimes weaker, sometimes unnoticeable.

#

(this is following a dots physics body, ofc.)

#

The physics velocity is not insignificant but also not outrageous, the ship is ~1 unit long and the top speed is around 5-6 units per second.

#

I should create a reference object to show the smoothness of the camera's actual movement.

#

(if I pin the camera directly to the ship, photosensitive seizure warning when going into each curve at enough speed ...)

#

turning vsync on makes it somewhat more tolerable.

#

(but it's not gone)

#

Correction, it's unrelated to vsync.... whaaaa?!

hollow sorrel
#

seems like a different system overriding positions

warm panther
#

Yeah the back and forth made me think this too.

#

It also does occur with unity recorder, just depending on resolution, it's not noticeable. The closer the framerate is to perfectly steady, the less it happens. So I wonder if the physcis rigidbody smoothing is really this bad? It can't be... I checked my other systems and I generally don't set a position; I just set a physicsvelocity.

safe lintel
#

can you try disabling a bunch of other systems one by one with the debugger or something to ensure its not another system trying to override the pos?

#

ive never seen stuttering that bad in my own use of the package

warm panther
#

Wow there's... zero drift?!
This is (sum of fixedDeltaTimes - Time.elapsedTime) - always 0; then timeStep, and Time.fixedDeltaTime (which is by default set to the same).

#

I guess they rewrite elapsedTime in FixedStepSimulationSystemGroup.

#

(will take some time to do the debugging you suggested, great idea!)

safe lintel
#

those ships are looking cool, looking forward to when you show that project off for real

warm panther
#

Thanks!

#

Unity DOTS is doing the best to slow me down ๐Ÿ˜„

hard yoke
#

what is dots

warm panther
#

Okay, I ... pinned the camera onto the ship again (no sole system seems to cause this), but...
Absurdly, it judders. As if the camera system didn't execute every frame.

Change is good. I can now rebuild my mental model of what's going wrong.

karmic basin
#

Cool looking ships, indeed ๐Ÿ‘

karmic basin
fading nest
#

So I have a mostly pure DOTS game, in which I want to manipulate the camera, specifically change it between orthographic and perspective mode during play, is there a way to access the Camera game object from a system?

warm panther
#

The world judders more, but the ship in itself shouldn't possibly be capable of jumping ~0.01 to 0.05 units in distance when the camera literally copies its world position.
Wow, I love me a good mystery, but I am finally closer to a solution.

#

(this problem persisted since my earliest experiments with dots physics almost a year ago)

warm panther
#

these camera switches are very rare, I take it (less than 1x per frame), so the sync point is not gonna cause you any trouble.

#

๐Ÿ‘ป I think I saw a ghost, I mean, my ship jumping backwards. HOW EVEN. Wow.

fading nest
#

thanks but what function do I use to get from the Entity in a Foreach to the GameObject or its Camera component?

#

Apologies if it's a stupid questions ๐Ÿ˜…

zenith wyvern
#

Entities.ForEach((Camera cam)=> { }).WithoutBurst().Run();

#

You have to mask sure you convert your camera to an entity first though

#

It might only "automatically" work if you have hybrid renderer installed. Otherwise you might need to manually add it in a conversion script with conversionSystem.AddHybridComponent

warm panther
#

I just use Camera.main or search for the gameobject in OnCreate, and cache it.
(or I have my injector class do this for certain non-scene assets but it's a hack :D)

#

Camera.main is no longer slow, you can use it with impunity anywhere for a long time before that comes up on any optimization checklists anymore.

#

The camera transform is literally zigzagging in space, that must be that waveform quantum stuff everybody keeps talking about.

#

Well at least I'm getting close.

#

Okay, I really suck at maths. Let's put these things back together... yup. Works. pikafacepalm

#

Here's the bug: ๐Ÿ›

var distant_position = camera.position + camera.forward * 100.0f
var distant_direction = (distant_position - target_translation).normalized;
var goal_position = translation - distant_direction * _distance;

// and all the smoothing in the world can't reliably get rid of this jitter
//...

The new mouselook system doesn't need this value - it's basically camera.forward; but the old smoothing system used that to actually turn the camera in another step. The crux here is, it's not quite cam.forward, but rather nudged into the future just a little.
Now I just use camera.forward and it's butter smooth, and consistently choppy with no interpolation.

The old mouselook did some fancy shit with it but also suffered from the judder because... well of course there's judder, it literally calculates a significant projection through a new point from the camera, and uses that to place the camera again. (actually even more if I use the actual camera target, a child of the rigidbody)

#

Thanks for getting me to look at it from the other way around. It wasn't an entity getting moved incorrectly - and only by ruling that out systematically I was able to look at the object that I believed was 100% positively smooth.

Well. Of course not with that line of code. ๐Ÿ˜„

#

Now I can finally add CAMERA SHAKE!!!

#

๐Ÿคฃ

warm panther
#

Well there's still some judder. I jinxed it. But I know this class of bug now.

fading nest
#

ty

wary nexus
#

Hey, I'm trying to run some code in parallel using ForEach(...).ScheduleParallel()
Just for code quality, I have a few referenced functions within my lambda which gives me a compiler error asking me to use WithoutBurst() and Run()
Is there a way to do fix this without importing all the thick code into the lambda? Or is the best way to do it to set it up as a job?

hollow sorrel
#

@wary nexus not everything can be done with burst, what is it you're trying to do?

wary nexus
#

Oh I don't want to use Burst, I want to run a block of code across multiple threads. The block of code references other functions within the system though (since I want it to look better). Kind of high level code:

Entities.ForEach((/* Components here */) => { DoSomeThing(); }).ScheduleParallel() 

Where DoSomeThing() is a function held somewhere else in the system.

hollow sorrel
#

ah

#

not sure if regular methods work but should work if DoSomeThing is static

wary nexus
wary nexus
fair stirrup
#

I'm used to doing ```

NativeArray<float3> verticeMap = new NativeArray<float3>(new[] {
new float3 (1, 1, 1),
new float3 (0, 1, 1),
new float3 (0, 0, 1),
new float3 (1, 0, 1),

        new float3 (0, 1, 0),
        new float3 (1, 1, 0),
        new float3 (1, 0, 0),
        new float3 (0, 0, 0),
    }, Allocator.Temp);

however burst doesn't like the new[], is there different way i can make this work?
karmic basin
#

in the constructor you're supposed to set the size, and an allocator

#

then you loop to fill, or set at indexes

#

or clone or whatever

rugged lark
#

First time messing with DOTS rendering. I have 500,000 entities rendering static cubes. I'm getting about 30ms/frame. When I look at the Entity Debugger, the RenderMeshSystemV2 accounts for ~29ms of the 30ms. When I look at the Main Thread in Profiler, it shows that under Unity.Rendering.RenderMeshSystemV2 it's spending most of that time adding batches to render. I assume that is expected, but can someone with more experience tell me if that's normal?

safe lintel
#

did you enable v2? ENABLE_HYBRID_RENDERER_V2 in scripting defines if you havent

merry ruin
safe lintel
#

should dive into the samples and see how you find it. though if you are fairly far along id suggest you stay with what you got, it looks solid and there are alot of limitations with current dots, and a fairly incomplete workflow for it so far, with many undocumented quirks and annoyances. documentation is lacking too.

lusty otter
#

Haven't touched Burst side of things in so long, I've forgotten about all the fundamentals.

#

Can you create a NativeArray from a managed array without duplicating the content twice in memory?

#

AudioClip.GetData/file reading don't have NativeArray overloads.

odd ridge
odd ridge
merry ruin
#

@odd ridge if I have 3 or more of my cars in the scene. Noticeable fps decrease. Even without the rbs doing anything. They all are set to kinematic on start.

#

If i look in that general aream I go from 140 fps to 70ish

#

With more cube objects, it'll only get worse

zenith wyvern
#

There's no doubt you could get better performance with dots, but it's not something you can just easily switch to. And like baron said it's missing a ton of features compared to gameobjects

acoustic spire
#

How do I pass a ScriptableObject to a component system? Its a class and compiler shows error that I use managed type

zenith wyvern
#

You have to convert it into an ECS friendly format. Typically you would do it during entity conversion

#

You can make it a blob or a component, or just reference it directly in your systems

acoustic spire
#

If I use only one instance of this scripable object, does it make sense to convert it into shared component instead of non shared?

zenith wyvern
#

Only if you need to do it for filtering purposes - IE forcing your entities into the same chunk

warm panther
#

Q: my systems initialize at a very different time in a build than while in editor playmode. Like, OnCreate runs before objects with tags can be found, for instance.

Show me your ways to inject references to gameobjects into AutoCreated Systems (avoiding as many null checks as possible, and ideally not using Singletons global variables or hitting a locator service in every OnUpdate..

#

Alternatively, can I make my systems initialize perhaps... a tiny bit later? Or am I really not supposed to hold any, any scene (in this case, i.e. cameras) state at all in my systems?

low tangle
#

RequireSingletonForUpdate()

warm panther
#

This is doubly tragic because I suggested just this to someone yesterday and I realize my advice was probably dreadful ๐Ÿ˜„

warm panther
#

Ah.

#

OH.

low tangle
#

like how you can require join's of regular queries?

#

you can add in singletons

warm panther
#

I think instead of OnCreate, I will use OnStartRunning as a test.

#

And the require singleton is sweeeeet, thank you.

low tangle
#

any ol thing to control when you run

#

this allows groups of systems to be alive when things are ready or not

warm panther
#

Very nice.

low tangle
warm panther
#

So I need to thread everything through the needle of Entities with managed components?

low tangle
#

or aentityquery.Singleton_

warm panther
#

(even if they're singleton entities?)

low tangle
#

you should yes, you can also use managed singletons as well

#

but you have to first grab the singleton entity, then grab the managed component from the entity manager

warm panther
#

GetSingleton<Camera> ? GetSingleton<MyScriptableObject>?

#

Ah ok.

#

Because injecting Scriptable Objects is one of my main hacks right now.

low tangle
#

EntityManager.GetComponentObject<Camera>(cameraquery.GetSingletonEntity())

#

w/ RequireSingletonForUpdate(cameraquery) in oncreate

warm panther
#

EntityManager.GetComponent<Camera>(cameraquery.GetSingletonEntity())
Again, what is this sorcery.

low tangle
#

I just inlined it?

#

ah sorry typo

warm panther
#

Getting a UnityEngine.Component from an entity?

#

GetComponentObject

#

Ah ok.

#

I've seen that one, now I know its purpose.

low tangle
warm panther
#

So I set my Cameras to Convert & Inject GameObject.

#

And then instead of finding them by tags, I have my injector service / monobehaviour set the singletons when the scene is ready?

low tangle
#

if your using the hybrid renderer it attaches the camera component
if not you need to manually add that

warm panther
#

Or, if I convert the camera to entity, is it going to be:
a) there when OnCreate runs
b) and OnCreate runs after Awake and Start?

low tangle
#

don't think of it as when, or event like per say. think of it more as, its ready lets create some data in the ecs world that represents this. anything happening after is their problem

warm panther
#

I'll try it out.

low tangle
#

OnCreate happens much much earlier than that

warm panther
#

Thanks so much, you were a huge help here.

#

I really appreciate it.

low tangle
#

thats why you want to use singletons to represent the state being there or not

#

yeah no problem

warm panther
#

Singletons are kind of evil still.

#

But I think I can deal with it for the ECS world.

low tangle
#

these are less evil

#

there not 'global' singletons

warm panther
#

Yeah more per world.

low tangle
#

its just a single entity that may or may not be there, but you can tie your system being alive only to when its alive, circumventing null data, and instance management

warm panther
#

Which is valid, as my MainCamera is functionally a singleton like that anyway. There will not be a second one. (until there is ๐Ÿ˜‰)

low tangle
#

exactly

warm panther
#

Ok I got my work out cut out for me.

low tangle
#

which you just modify singleton checks to instead be cameraquery.count > 0 and do your work per each camera. rest of the system doesn't really change if you build with entity updates in mind

warm panther
#

Well, this OnCreate is the most hacky block of my entire project right now, so serves me right to hit this roadblock.
||```cs
protected override void OnCreate()
{
base.OnCreate();

        avatarCamera = Camera.main;
        Debug.LogWarning("Hello World");
        Debug.LogWarning(avatarCamera.name);
        skyCamera = GameObject.FindWithTag("SpaceCamera").GetComponent<Camera>();

        var sk = GameObject.Find("<Base Sky Camera>");
        _skyCam = sk ? sk.transform : new GameObject().transform;

        var ak = GameObject.Find("<Avatar Camera>");
        _avCam = ak ? ak.transform : new GameObject().transform;

        bubbleChanged = true;

        Enabled = false;

        _goalRotation = _avCam.rotation;
    }
low tangle
#

oh yeah, thats not a good way to do it

#

systems lifetimes are meant to be more, out there, not related to gameobjects or scene lifetimes at all

warm panther
#

(I refactored two systems into one and I also use this...)

using Jovian.ECS.Systems.Control;
using Jovian.ECS.Systems.UI;
using Sirenix.OdinInspector;
using Tiger.Events.Concrete;
using Unity.Entities;
using UnityEngine;

namespace Jovian.ECS.Systems
{
    public class Injector : MonoBehaviour
    {
        [Required]
        [AssetsOnly]
        [PreviewField]
        public EntityChannel uiVesselFocus;

        [Required]
        [AssetsOnly]
        [PreviewField]
        public EntityChannel uiCameraTarget;

        private void Awake()
        {
            var world = World.DefaultGameObjectInjectionWorld;

            world.GetOrCreateSystem<VesselFocusManagement>().Inject(uiVesselFocus);
            world.GetOrCreateSystem<CameraSystem>().Inject(uiCameraTarget);
        }
    }
}
#

And this injection event doesn't happen, so... yeah, got a clear task for today to get that part of the architecture cleaned up.

low tangle
#

yeah I dont like to modify my systems or worlds like that from monobehaviours, other than a singular init to have per scene init values from a inspector

warm panther
#

I learned that one for now. ๐Ÿ˜„

#

EntityManager.GetComponentObject<Camera>(cameraquery.GetSingletonEntity())
In this example, that means I need to have an IComponentData that identifies my camera, right? Or is there one that Unity creates for these?

low tangle
#

no that is UnityEngine.Camera type

warm panther
#

cameraquery though.

low tangle
#

same for the query creation

warm panther
#

Sorcery again, ok.

#

My mental model really is being rebuilt here.

low tangle
#

in this image you can see the query in the on create

warm panther
low tangle
#

yup

#

I can double check for you, that the query works

#

starting to make me doubt my own knowledge lol

warm panther
#

I trust you this should be easy enough to write. ๐Ÿ˜„

#

It wouldn't compile otherwise.

low tangle
#

yep managed components in queries are just fine

warm panther
#

Wow dat UI scaling.

low tangle
#

oh yeah 200% sorry

warm panther
#

No I am envious, I have a huge screen setup and I still don't have the resolution to go beyond 1.5, and 1.5 is glitchy.

low tangle
#

4k w/ 200% makes text real nice

warm panther
#

Looks so nice.

#

I got 3 screens, 2x 1440p and 1x 3440x1440 only.

#

Something to aspire to some day, when 2160 ultrawides become available.

low tangle
#

I was running 150% for the longest time till I read this article talking about how integer scaling is just way better on making text look sharp

warm panther
#

Exactly.

#

How does the Camera become a singleton entity? I have 2 relevant and 4 total cameras.

#

Oh wait.

#

No. I don't see it. ๐Ÿ™‚

#

"Actually, since 0.7 you can mark Lights and Cameras (and some other things, I don't remember the full list) to convert and the conversion flow handles it for you. No need to manually add the hybrid components yourself."

#

But those aren't singletons, so do you run a custom authoring component that sets that status?

low tangle
#

just tick the gameobject to convert and it will take those two managed components with them

warm panther
#

Yeah I did.

#

It works.

low tangle
#

without hybrid renderer you just add them with a IConvertGameObjectToEntity and use the input ConversionSystem parameter to .AddHybridComponent(thecamera)

warm panther
#

But they're not singleton entities.

low tangle
#

a singleton entity just means there is only one entity in the world

#

nothing else

#

you can actually place multiple of them into the world if desired, it will just assert that hey it only expected one, you sure about this?

warm panther
#

This is interesting.

#

So OnCreate really happens very early.

#

Even before the AfterGameObjectConversionSystemGroup.

deft stump
#

strange my 2 physics entities aren't colliding auto-magically...
what am I missing here?

warm panther
#

And then before that hybrid render init even.

#

This has been most educational, thank you once more, @low tangle

low tangle
#

yep, your welcome

deft stump
#

no wait... I'm dubm

warm panther
#
        protected override void OnCreate()
        {
            base.OnCreate();
            RequireSingletonForUpdate<TagMainCamera>();
            RequireSingletonForUpdate<TagSpaceCamera>();
        }

        protected override void OnStartRunning()
        {
            base.OnStartRunning();            
            _skyCam = EntityManager.GetComponentObject<Transform>(GetSingletonEntity<TagSpaceCamera>());
            _avCam = EntityManager.GetComponentObject<Transform>(GetSingletonEntity<TagMainCamera>());
            Debug.Log($"<color=white><b>CameraSystem</b></color> using {_skyCam} and {_avCam}.", _skyCam);
            _goalRotation = _avCam.rotation;
        }

Damn. That's a lot cleaner. A little singleton-y but actually the first time an intrinsic DOTS pattern has caused me LESS boilerplate.

#

Wow, with OnStopRunning I can also make the Ui event subscription so much cleaner.

low oyster
karmic basin
#

There's a bug nowadays with the prediction tick, you can find other topics on the forums. It's not your fault.

#

For the migrating from the PostUpdateCommands part, are you sure you wanna playback the ECB immediately ? Why don't you add to the end simulation one ?

#

I began migrating to SytemBase too, but didnt touched yet the ComponentSytems that had the PostUpdateCommands shortcut yet. To keep momentum in the project ๐Ÿ˜… .

low oyster
#

Thank you @karmic basin for your answer!

#
Why don't you add to the end simulation one ?

I just follow an example on google how to use the ECB

karmic basin
#

You're welcome, happy coding. Maybe someone will give a better answer on your forum topic

low oyster
#

I am not actually sure of my implementation

karmic basin
#

and form the docs ?

low oyster
#

Talking about the ECB it was made to answer to main problems

#
When you're in a job, you can't access the EntityManager.
When you access the EntityManager (to say, create an entity) you invalidate all injected arrays and EntityQuery objects.
#

The thing is now we can access the EntityManager from a System

low oyster
#

So is it really still necessary?

#

I have made another test without ECB it works the exact same

#

(with the bug, I talked about of course)

karmic basin
#

You should in the main thread, if you .Run() immediately should work

low oyster
#

see that

#

GoInGameClientSystem

#
protected override void OnUpdate()
    {
        Entities.WithStructuralChanges().WithNone<NetworkStreamInGame>().ForEach((Entity ent, ref NetworkIdComponent id) =>
        {
            EntityManager.AddComponent<NetworkStreamInGame>(ent);
            var req = EntityManager.CreateEntity();
            EntityManager.AddComponent<GoInGameRequest>(req);
            EntityManager.AddComponentData(req, new SendRpcCommandRequestComponent { TargetConnection = ent });
        }).Run();
    }
#

without ECB

#
protected override void OnUpdate()
    {
        var ecb = new EntityCommandBuffer(Allocator.TempJob);
        Entities.WithStructuralChanges().WithNone<NetworkStreamInGame>().ForEach((Entity ent, ref NetworkIdComponent id) =>
        {
            ecb.AddComponent<NetworkStreamInGame>(ent);
            var req = ecb.CreateEntity();
            ecb.AddComponent<GoInGameRequest>(req);
            ecb.AddComponent(req, new SendRpcCommandRequestComponent { TargetConnection = ent });
        }).Run();

        ecb.Playback(EntityManager);
        ecb.Dispose();
    }
#

with ECB

#

Same for all the other Systems from the get started guide ๐Ÿ™‚

low oyster
karmic basin
low oyster
#

The first question is, Is the ECB really necessary?

karmic basin
#

Oh

#

sorry ^^

low oyster
#

Second question, should we Run or Schedule the system?

karmic basin
#

You could RUn, it's supposed to be done once, to join at start

low oyster
karmic basin
#

and so use the EM ?

low oyster
karmic basin
#

Yeah I checked I didnt updated this part yet. But that's how I would begin with. The user wont see a difference

low oyster
#

ok

#

For the SampleInputSystem would you rather Run() or ScheduleParallel ?

#

because it is sent multiple times

karmic basin
#

Run, there's only one to process, the player

low oyster
karmic basin
#

You're welcome, have fun !

stiff skiff
fading nest
#

Hey, can't quite find online an example of just playing a sound through DOTS

#

seems I can reference an AudioSource but idk how I would access the clip data from that, and use that to make a sound play from a Entities.Foreach in a SystemBase

low oyster
#

Otherwise the compiler is complaining

#

Well you don't see the content of my lambda that's why I added "..."

hollow sorrel
#

so from what i understand, when unity loads a scene all subscenes will be loaded into a seperate conversion world, and moved into the main world after loading is complete
is there a way to mark that unity's systems need to wait before moving, so you can do some custom processing after load yourself?

#

or would it need to be like conversion world -> custom staging world -> main world

stiff skiff
zenith wyvern
hollow sorrel
#

prob but it's something that can take multiple frames so ideally i'd just wanna be able to set a component to say when loading is done or something

#

to not stall main thread

karmic basin
#

@hollow sorrel Can't you use GameObjectAfterConversionGroup or GameObjectExportGroup ?

worldly pulsar
#

@hollow sorrel afair there is no conversion world at runtime (since subscenes are already converted) - entities are streamed into a streaming world and then moved to the main world as soon as possible, I don't think there are any systems in the streaming world.

I'd say for what you're doing, you may create your own staging world, load the subscene into it, do the processing and then merge with the main one. That is of course assuming you can't do that processing at conversion time.

hollow sorrel
#

ah

#

yea suppose staging world is the way to go, less reliant on unity stuff changing too

#

ty

warm panther
#

Can I copy unity_DOTSInstanceData from one shader to another somehow, or even better, take my pick?

#

The data is already created but I want to use some of it in an override material.

#

The override material currently seems to get clobbered hybrid instancing data.

#

I tried to just replicate all properties from the one shadergraph in the other, but... that didn't work.

acoustic spire
#

Is it impossible to use nested native collections?
I get error with this

    public struct AtlasData
    {
        public NativeHashMap<uint, AtlasSample> UVs;
    }
    public struct AtlasSample
    {
        public byte TexturingType;
        public NativeArray<Rect> UVs;
    }
#
ArgumentException: Client.Dots.AtlasSample used in native collection is not blittable, not primitive, or contains a type tagged as NativeContainer
#

Any workarounds?

rare dew
#

It looks like you have to use primitives for NativeHashMap

#

What you can do is have a NativeHashMap<uint, uint> where the latter uint is the index for another collection

#

Or something like that

acoustic spire
#

Good idea. thanks
or NativeMultiHashMap with key uint2...

rare dew
#

But why NativeHashMap?

acoustic spire
#

Just using instead of dict in jobs

pliant pike
#

does anyone know of an example for the new input system being used in dots?

#

I've tried one method but I keep getting multiple outputs for one button press and can't figure out how to fix it

deft stump
#

@pliant pike here

#

it's my refactored InputSysBase.

pliant pike
#

that's awesome, thanks @deft stump

#

I've got some weird problem with mine it seems like it's taking a single input and stretching it over multiple frames

deft stump
#

are you trying to mimic GetKeyDown()?

pliant pike
#

yeah I've tried all the interactions basically I either get no inputs or still get like a random number 3, 4, or even 5 outputs

deft stump
#

try installing the preview package of New Input system.
there you'll get the .WasPressedThisFrame() function like what you see in my code.

pliant pike
#

I'm on 1.01 I'll have to try that thanks

lean radish
#

If I'm looking to create a 2D management game do I need the "Entities" or "2D Entities" package? And if I don't plan on using physics will I need the "Physics" package?

robust scaffold
#

As for the physics, maybe? Probably. There's some dependencies that you dont need but Entities does.

lean radish
#

@robust scaffold And Project Tiny is the package that shrinks file sizes correct? What if I plan to use that/ tinker with it?

robust scaffold
#

I've got my basic package list trimmed to just this:

    "com.unity.dots.editor": "0.12.0-preview.6",
    "com.unity.ide.rider": "3.0.3",
    "com.unity.platforms.windows": "0.10.0-preview.10",
    "com.unity.render-pipelines.universal": "10.2.2",
    "com.unity.rendering.hybrid": "0.11.0-preview.42",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0"

You can replace Rendering.Hybrid (Hybrid renderer) with com.unity.entities: "0.17.0-preview.41".

robust scaffold
#

And it shows how sad my life is when I can write out the entire entities package line from memory.

merry ruin
lean radish
#

@robust scaffold I see, thanks for the help and that list as well

#

@robust scaffold What's the difference between HR "0.17.0-preview.41" and "0.10.0-preview.10" ?

robust scaffold
# merry ruin Back here again because i didnt understand / not sure what to do. Would DOTS bee...

DOTS performance is.... questionable. Entities, oh it's fucking amazing. Burst is literal magic.
Rendering the data though, Hybrid renderer is garbage. Worse than garbage, it actively destroys your performance. I'm working with it because I'm trying out some prototypes with DOTS physics which is ehh. Honestly stick with regular Gameobject workflow if you need any physics because no matter how good DOTS physics is, Hybrid renderer is worse.

robust scaffold
merry ruin
#

I literally have zero understanding what dots / entities is. So im going to need an explanation from ground zero

#

Let me add 3 more cars. and show you my propfiler

#

Profiler

robust scaffold
robust scaffold
merry ruin
lean radish
#

@robust scaffold Is there a "thank you" system on this server?

robust scaffold
merry ruin
#

I bought an asset that can seperate a mesh into individual voxels ๐Ÿ˜ญ

robust scaffold
robust scaffold
# merry ruin I bought an asset that can seperate a mesh into individual voxels ๐Ÿ˜ญ

Oh boy, never buy assets. Terrible idea. Always good to code and learn things yourself. Here's a good guide to compute shaders and it's a giant rabbit hole from there. https://www.youtube.com/watch?v=EB5HiqDl7VE&t=532s

โœ”๏ธ Works in 2020.1 โž• 2020.2
๐Ÿฉน Fixes:
โ–บ Make sure your source mesh has read/write enabled in it's asset importer inspector.

Compute Shaders are scripts that run on the GPU! They're very powerful, allowing you to leverage the GPU's unique abilities and generate meshes to draw procedurally. There's not a lot of information on using them, so I hope...

โ–ถ Play video
robust scaffold
merry ruin
lean radish
#

@robust scaffold Yeah I want to learn something new and if data oriented is (possibly) the next big thing, that's where I wanna be. Or at least ahead of the others. Thanks again. I'll probably have more questions in the near future as well lol

robust scaffold
merry ruin
#

The cars are just for prototyping, It's going to be a 3D dungeon crawler. I just looked at that video and.... ๐Ÿ˜ฌ

#

That sorta stuff is far beyond me

robust scaffold
# merry ruin That sorta stuff is far beyond me

Yea, it's pretty intimidating from first glance but it's not too hard. Just apply writing frag shaders to arrays. Hardest part is defining the wave size. Plenty of guides and tutorials out there. Is this your first game?

merry ruin
#

It's not, But its my first game where im doing alot of things for the first time. Like shops and also this rigidbody stuff

robust scaffold
# merry ruin It's not, But its my first game where im doing alot of things for the first time...

Okay, then I recommend making smaller individual prototypes to focus on one new aspect of Unity at a time. One project to dip your toes into shops. Another brand new project to understand unity physics, a third to try out compute shaders, and so on. Then once you know them all, create a "final" project to use all the information you've learned through previous prototypes. You'll probably need to branch out more projects as you experiment without all the bloat of the actual main project.

merry ruin
#

thats the heirarchy of 1 of the cars, I can reduce the amount of voxels and that will be fine for more objects. But i just wanna get it as performant as possible before i go any further. Since i don't want to get to a point where the game itself is going well. But im getting bad performance because of this rigidbody shinnanigans

robust scaffold
merry ruin
#

๐Ÿ˜ญ

#

I was thinking about adding a RB to the voxels on raycast hit (From gun), rather than them always being there. Would that be any better?

#

Since atm, on start they are set to Kinematic, and even then the fps is severely effected

robust scaffold
robust scaffold
zenith wyvern
merry ruin
#

I shall ask in physics, thank you

void girder
#

Is anyone using LODs? Is it possible for an LODs to share one material?

#

Also, having multiple LODs as child entities creates a lot of overhead for LocalToParentSystem, so is there any way around that as well?

rugged lark
#

Okay so none of my entities with mesh rendering components actually show up now that I added ENABLE_HYBRID_RENDERER_V2. Previously they were all rendering, but render batching was taking a long time. I've gone back and forth through the documentation for the hybrid renderer and I think it's got something to do with needing to create a shader and an IComponentData for the custom properties on that shader. But the docs mention pre-built property overrides and associated components. What's the bare minimum I need to do to get a mesh to show up in the Hybrid V2 renderer?

zenith wyvern
#

You may need to disable or enable SRP batching in the graphics configuration assets

rugged lark
#

Thanks Sark, I'll look at it.

robust scaffold
#

Hmm, my tests with Bursted Systembase resulted in this: 95% of the performance boost is coming from bursted jobs. 5% comes from the bursted OnUpdate.
Is it worth converting everything to IJobChunk and all containers to NativeArrays just to burst OnUpdate? Definitely not.
Will I do it just to see a flat 0.0 on the systems tab instead of an occasional 0.1 flicker? Yes.

ocean tundra
#

I think you need to check out the profiler to see bursted system costs, I read that the systems window wasnt reporting correctly

#

I'm planning to update to ISystemBase but so much seems to be missing atm

robust scaffold
robust scaffold
# ocean tundra I'm planning to update to ISystemBase but so much seems to be missing atm

Currently I dont recommend ISB unless you're willing to throw everything out the window. I can live with everything being IJobChunk, it's like IJobEntityBatch except with even less to input (no need to define number of entities per batch). The big problem is that all containers must be a NativeArray (or UnsafeArray) since that's the only container that allows for [DeallocateOnJobCompletion]. Unless you are willing to introduce frame dependency by calling CompleteDependency() in OnUpdate every frame, there is no other way to deallocate a temporary native container.

ocean tundra
#

Sweet will definitely hold off updating

rugged lark
#

@zenith wyvern the problem was I had no idea how the URP worked and I didn't have a UniversalRenderPipelineAsset created and set in my projects SRP settings

#

But it's working now and I learned a lot in the process. Victory.

#

I'd been relying on the built in renderer and enabling that Hybrid Renderer flag caused it to look for URP/HDRP and I didn't have either render pipeline setup so nothing was rendering. Whoops.

deft stump
#

in built-in rp, how do I change the color of the material?

#

I can do it in URP but I'm not too sure in built-in

deft stump
#

How can I interact UI with Entities? through the EntityManager?

deft stump
#

oh

#

IJobChunk has been superseded by IJobEntityBatch, which should be used for new code.

#

so I'm guessing I'm going to use IjobEntityBatch

half jay
#

How can be done logging app with DOTS and FireBase. So some system working om main thread not a problem but what can be done with another. Or some tips how can app be covered by logs?

karmic basin
#

That's not relevant IMO. Or I miss something. Yeah you can use Firebase's Unity SDK in a system main thread, same as you would without DOTS. What do you expect DOTS to bring to the table ?

#

Mass logging from Entities inside threaded jobs ?

half jay
#

Something like that system executed. If some logic mistake and somewhere didn't add/remove component and next system didn't match query. Or logs values used in components

amber flicker
deft stump
#

I'm not using ISB for now

#

but

#

I'm hitting a perf degradation though

#

so here's the scenario:
I have about 2500+ cubes spinning in X and Y axis and also jumping via dots physics

#

I'm getting about 30 fps

#

HOWEVER

#

I did it in classic unity and the perf there is higher

coarse turtle
amber flicker
coarse turtle
#

Oh ๐Ÿ™ƒ

#

Yea that's a valid reason lol

#

What parts screw up with ISB if you use another job?

amber flicker
#

will just spew confusing errors

karmic basin
#

@deft stump you disabled jobsDebugguer and safeties ?

coarse turtle
#

O I should try and take a look. I've been using IJob without any problems so far

amber flicker
#

oh tbf I haven't tried IJob

karmic basin
#

renderer v2 is tired ? ๐Ÿ˜›

#

I didnt pushed yet com.unity.physics to 2500+ RB updates

#

But I wonder about those perfs myself, I'll have to at some point

coarse turtle
deft stump
#

@karmic basin I can show you through a vid call

#

if you want to ofc

#

also enable v2 hybrid doesn't work

#

coz

#

I'm using built in

karmic basin
#

I would need to try that myself before I can help with valuable insight. I'll just make you lose your time at this point

deft stump
#

sure

#

uuugh... this is so confusing

#

is it physics that's messing me up?

north bay
#

Are you guys using jobs at all? I only use jobs for really expensive stuff that I know I don't need to complete in the next +50 systems. Everything else just seems to add more overhead than it's worth.

deft stump
#

I am...

#

all the time

low oyster
#

@karmic basin Going back on our yesterday's discussion. Adding RequireSingletonForUpdate<GhostPrefabCollectionComponent>(); into the GoinGameClientSystem.OnCreate fixed my rendering/spawning issue :).

I can confirm that I have now a working Getting Started sample Unity NetCode updated and using the latest unity dots changes (SystemBase, EntityManager in query lambda...)

karmic basin
#

Awesome ! But I don't understand why the client would need the ghosts collection to ask to connect to the server ?

#

Wait, are you trying to spawn ghosts from the client ?

low oyster
#

I guess Tom from Unity told me to put it here and not in the GoInGameSystem to not actually send the GoInGame request because the list is not ready yet

#

there is no need to make a request if the mandatory stuff are not yet loaded on server side

#

And also it's added into GoinGameClientSystem because the request is done automatically at app launch and the component NetworkStreamInGame added to it. The problem is that even though the prefab collection was not ready and as the component added to the client, we will not retry a connection request next frame update ๐Ÿ™‚

karmic basin
low oyster
#

What could have been done also, is in the GoInGameServerSystem check if the var ghostCollection = GetSingletonEntity<GhostPrefabCollectionComponent>(); is not empty if it is remove the NetworkStreamInGame from the entity requesting the connection in order in the next update to have a retry

#

this list sorry

#
var prefabs = EntityManager.GetBuffer<GhostPrefabBuffer>(ghostCollection);
karmic basin
#

because the request is done automatically at app launch
I anticipated that and thought about screening it behind a login action from the player anyway :p

low oyster
#

that's why u did not have this issue ๐Ÿ™‚

#

me everything happens too fast

karmic basin
#

Is it because you have a huge amout of ghosts in your collection ?

low oyster
#

nop

#

I wanted to say as the process starting directly at app launch, everything is going too fast and I faced the issue of a mandatory list not being loaded before it's actually used. On your side you could not see that issue because your process is behind a login action button, that's it ๐Ÿ™‚

karmic basin
#

yup

low oyster
#

still protect it

karmic basin
#

You'll use server & client apps in the end ?

#

Yeah maybe just in case, but I aim for a headless server anyway

#

server will be up and running way earlier than clients

low oyster
#

I am testing on all scenarios, client only, client&server and server only both from Unity Editor and Standalone

#

Everything works as it should now

karmic basin
#

๐Ÿ‘

#

Awesome. Thanks for coming back and sharing, always appreciated ๐Ÿ™‚

low oyster
#

sure

karmic basin
#

Yeah that's a nice edge-case you found there

deft stump
#

@karmic basin I found my answer.

karmic basin
#

I will add the check

deft stump
karmic basin
#

race condition* I mean

deft stump
#

I'm being screwed over by dots physics systems

amber flicker
coarse turtle
#

Yeah I had burst compile on the systems

#

Can I see a screenshot of the errors ๐Ÿ‘€

amber flicker
#

it's not just on the systems, it has to be over OnUpdate as well

coarse turtle
#

o

#

sure let me try

karmic basin
deft stump
#

yes

#

@karmic basin

#

It's even bursted!

#

yeah I dunno how to turn off physics debug stuff

karmic basin
#

I'll try with HRenderer v2 and 2.5k rigidbodies when I have the chance, for now I can't tell if that's expected or not.

#

1000 bodies give more reasonable results ?

deft stump
#

hrmmmmmmm

#

I'll try

#

I hope I can delete them though LOLOLOL

#

theres so many without my editor choking

coarse turtle
karmic basin
deft stump
zenith wyvern
#

FWIW I've noticed physics runs soo much faster at runtime. It's really really slow in the editor

deft stump
#

so build and test

#

alright

#

we really need the option to disable phhysics debug systems or something

zenith wyvern
#

You can profile the build if you set it to "Develop"

amber flicker
coarse turtle
#

cool - I guess since SystemBase does internal tracking of dependencies - we'd need to try and replicate that into ISystemBase lol

zenith wyvern
#

I found setting World.MaxDeltaTime while in the editor helps combat the FixedDeltaTime death loop

karmic basin
low oyster
#

But again this will happen only when the process starts directly from app launch, usually you have a login menu etc...

#

so better to protect it directly from the GoInGameClientSystem and not touch the GoInGameServerSystem

protected override void OnCreate()
    {
        RequireSingletonForUpdate<GhostPrefabCollectionComponent>();
    }
#

what is worrying me though

#

is that this line did not throw any error even though the GhostPrefabCollectionComponent was not ready

#
var prefabs = EntityManager.GetBuffer<GhostPrefabBuffer>(ghostCollection);
#

That means it returned 0 instead of null ?!

#

Not everything is clear

karmic basin
#

missed that one

karmic basin
low oyster
#

ghostCollection yes in my case supposed to be null but why then no error was thrown when doing

var prefabs = EntityManager.GetBuffer<GhostPrefabBuffer>(ghostCollection);
karmic basin
#

Well it's an int, so probs zero ^^

low oyster
#

it's supposed to return a DynamicBuffer

#

so maybe it returned an empty DynamicBuffer and then my case was not handled (aka remove the NetworkStreamInGame from the client etc..)

karmic basin
#

yeah but .Length is 0

low oyster
#

and yeah length = 0 the case is not handled ๐Ÿ™‚

karmic basin
#

okayyyy we were not talking about the same line, I need coffee

deft stump
#

how... do I use the new build pipeline again?

low oyster
#

@deft stump Right click create => Build => Empty Configuration

#

then select your file => Inspector and add component u need

#

at the end you select your config file => inspector => Build

deft stump
#

@low oyster

#

????

karmic basin
#

probs doing some background work on the right low side ?

deft stump
#

I do

karmic basin
#

cool

deft stump
#

uuugh this is so frustrating just to present a demo

karmic basin
#

yeah

deft stump
#

I wanna throw a chair

#

okay

#

I'm still being screwed over

#

this is frustrating

#

uuugh

#

@zenith wyvern I'm still being screwed over

zenith wyvern
#

Ouch. What does your timeline look like?

deft stump
#

all of this is from physics

#

those greens

#

I don't even know what debugstream is

zenith wyvern
#

Just for visual debugging in the editor I think. Yeah that's pretty bad. Whats happening in your game to cause that kind of physics load?

deft stump
#

i dunno

#

wait

#

it's 2500+ cubes

zenith wyvern
#

Did you try switching to havok physics?

deft stump
#

spinning and jumping (ofc there's gravity)

zenith wyvern
#

Are you controlling them manually or setting velocity in the rigidbody?

deft stump
#

I'm not controlling them manually

#

there's a timer that is set to jump

#

but I've already deduced that isn't the case

safe lintel
#

can you disable or remove the physics debug display component?

#

i find that its terribly slow

karmic basin
#

There's a PhysicsDebugDisplay authoring component

#

maybe unticking everything disables everything

#

PhysicsDebugDisplayData is the comp added on conversion containing those authoring checkboxes

warped fog
#

Locus, skies falling, seas becoming as blood. Generally bad.

Iโ€™m guessing though.

karmic basin
acoustic spire
#

Should I create singleton entity or it is created automatically?

ocean tundra
#

pretty sure it was created automaticly if you used SetSingleton (or something like that

gilded glacier
#

question: how do you structure your ecs project ?

#

currently, I have a folder for all components, and another folder for all systems, etc.

#

but I am not sure whether this structure is the best, because there are systems and components that are logically bind together

#

and when I use assembly definitions for stuff like unit testing, it is better to have these things packed together in the same subfolder

light mason
#

Does anyone know how I query the camera in tiny

#

In the example it just queries the camera component , but how is that component created

zenith wyvern
#

It's created by a conversion system that runs on the regular camera during scene conversion

light mason
#

Is this automatics

#

I remember something like that on Hybrid you just needed to add something to Scripting Define Symbols

#

Or is my memory failing me

zenith wyvern
#

Not sure what you mean. It's a GameObjectConversionSystem, so it runs any time the monobehaviour it's targeting gets converted

acoustic spire
#

Is there a sample how to unit test conversion system? Afaik conversion runs in separate world. IDK how it communicates with default one

light mason
#

@zenith wyvern I think this is what my foggy memory is thinking off

#

Iโ€™m a bit confused why my entities are rendering sice I have not explicitly converted my camera and I canโ€™t query a camera component in a system

#

As singleton it return 0

frosty siren
#

Are there any news about 2D in dots except 2D Entities package which is only for project tiny?

zenith wyvern
#

If this is Tiny then not having a camera is probably undefined

#

Not sure

karmic basin
karmic basin
#

@acoustic spire can't tell you more as I didnt set up tests yet, but did you try to see how Unity does them ? They probably have some for loading GOs, subscenes, and such

light mason
#

Mmm Iโ€™m lost , Iโ€™m looking at bare bones Tiny 3D git example , camera is in not in sub scene , no conversion or authoring component... but I magically work and I see no camera entity. What am I missing here , is it not using the RenderMeshSystem ?

acoustic spire
karmic basin
#

Not related to ConversionSystem then ?

#

Unity.NetCode.Tests.BootstrapTests looks interesting

#

netcode spawns both a client and a server world after the default one for init

#

I think you can find good stuff even if not interested in network

#

But I guess they should have same Test in Entities without netcode to check for multiple worlds

acoustic spire
small hull
#

I cant wait for DOTS to come out

#

Imagine the possibilities of Bolt + DOTS

ocean tundra
gilded glacier
#

makes sense, but what if I end up with a component that is used in multiple features ?

zenith wyvern
#

Same pretty much. But I don't bother with subfolders unless the base folder starts to get cluttered

#

I usually have a "Common" folder for shared stuff

gilded glacier
#

maybe I should experiment with these things more

#

isn't there some sort of "best ecs practices" book or something ?

zenith wyvern
#

I don't know about that, I usually just look at other people's projects and if I like what I see I copy it

karmic basin
acoustic spire
#

How to troubleshoot situation when a system isn't updated?
In my case BlobAssetUserSystem never updates though it has UpdateAlways system attribute

            // Create 10 entities
            for (var i = 0; i < 10; i++)
            {
                var e = m_Manager.CreateEntity(typeof(TestComponent));
                m_Manager.AddComponentData(e, new TestComponent {Value = 0});
            }

            // The system should set up Singleton component
            World.CreateSystem<AtlasBlobAssetConstructionSystem>();
            World.CreateSystem<BlobAssetUserSystem>();
            World.Update();

zenith wyvern
#

If you put a Debug.Log inside BlobAssetUserSystem's OnUpdate it doesn't print?

acoustic spire
#

it doesnt

#

may be something with world initialization. I'll try 5argon test classes

north bay
#

If I remember correctly you have to add the systems to the update list of a component system group

acoustic spire
gusty comet
ocean tundra
#

thats a very old version...

#

wait very confused, the doc is 0.2 but your refering to latest version?

gusty comet
ocean tundra
#

your on the latest version?

#

what exactly is the issue?

gusty comet
ocean tundra
#

im still confused what the issue is? Unity changed FieldInfo into TypeInfo?

gusty comet
ocean tundra
#

sorry man, no idea, check the change logs untill you find exactly what version removed it, maybe something in there.
Or just try changing it to typeinfo? ive never used either so no clue what they are for

ocean tundra
#

I would just download the older version of Unity

gusty comet
ocean tundra
#

try it and see

gusty comet
gusty comet
# ocean tundra try it and see

yes, if you want to try it to, with you sucsess with actual version Unity Rendered Pipeline URP, get from here it is a fast webgl https://forum.unity.com/threads/project-tiny-0-32-preview-is-available-ui-new-skinned-mesh-renderer-blendshape-sample.1045204/

zenith wyvern
#

I use it for my roguelike which is turn based. Some parts were annoying and not very intuitive, like setting up game phases. Personally I still prefer it over OOP since it keeps my project maintainable as the scale grows, since it forces me to keep everything nicely separated

#

If you've made games outside ECS before and you haven't had any problems then ECS isn't going to do you any favors I would think

rancid shell
#

Ya that is 100% the issue.

#

Data modelling of cards/players?

#

Super clear.

#

Phases and sequencing?

#

Wat.

#

Specifically the reactive nature of card games is what's tripping me up.

zenith wyvern
#

What made it click for me is making use of singletons for "game state". So a system related to some state or phase will only run when a singleton representing that state/phase is present

gusty comet
zenith wyvern
#

That's how I handle game state changes. A bit oop-ish but it works well

gusty comet
#

//From: NativeArray<TypeManager.FieldInfo> typeManagerFieldInfos = TypeManager.GetFieldInfos(typeof(T));
NativeArray<Unity.Entities.TypeManager.TypeInfo> typeManagerFieldInfos=TypeManager.GetTypeInfo<T>();

#

//but file gets overwritten, by recompile! (package-update-howto?) GetSaveSystems.cs (see open in new tab!)

deft stump
#

And that makes the entire thing so confusing.
WHAT IS IT DEBUGGING!?

safe lintel
#

@deft stump what happens when you toggle the system off in the entity debugger/systems view?

acoustic spire
#

How do I get a managed component from entity?
GetComponentData doesn't work with classes

gusty comet
deft stump
#

it's still wildly fluctuating

#

the culprit lies in BuildPhysics world

#

it completes the job

#

not schedule it

zenith wyvern
#

I don't think it's a scheduling issue - you can see the CreateContacts job is taking forever

#

Not sure why physics would be so slow but it does appear to just be physics being slow

deft stump
#

yep

#

it's just physics being slow

#

if remove the jumping

zenith wyvern
#

This jumping - are you doing it in a FixedStep system?

zenith wyvern
#

If you're interacting with physics at all you need to [UpdateInGroup(typeof(FixedStepSimulationSystemGroup)]

deft stump
#

Hrmmm

zenith wyvern
#

Not sure if that will fix the issue but yeah

#

If it's still bad you can try reducing the fixed timestep

deft stump
#

for context

#

here's the code

zenith wyvern
#

Wow, just that is causing that performance drop?

deft stump
#

yep

#

my systems are very simple.
and even if I put the if statement outside the foreach, the result is the same

#

Okay a low of 20s and high of 70s

#

.....

#

my jump system is being completed right after schedule

#

uuuugh

#

this is so confusing

#

why are you completing reeeeeee

zenith wyvern
#

It has to complete since it's interacting with physics. Physics is running it's fixed step mutliple times in a frame, so it makes sense it needs to complete dependent jobs multiple times as well

#

I don't know why you're worried about scheduling, profiling has already showed you the physics is just being slow

#

Your best bet would be to ask why your contacts job is so slow on the physics forum

#

Actually I guess you're not reading input, but probably still worth reading over that to make sure it works the way you expect inside a fixed timstep

gusty comet
#

dots / ecs / burst all build slow and the packages are mixed from wrong versions of unity, that fails to build same sample project from documenation, once had compile blue screen!

gusty comet
gusty comet
ocean tundra
#

Hi all
Can we store native collections (Native Stream mainly) within shared components?
And can Shared components be a singleton?

small hull
#

how do I do that?

viral comet
#

Hi guys! Anyone have any production experience with dots/Entities on mobile? ๐Ÿ™

rancid geode
# small hull

the error is pretty self explanatory, you need to edit an scene object to add references

small hull
#

I dont know how to do that

#

It wont let me create a graph in an object

safe lintel
#

@ocean tundra i think longterm sharedcomponents will only be allowed to have blittable types

thorny halo
#

Hello, is there a way to index struct of arrays the same way that unity is indexing int3, float3,... types. For example, you can use int3[2] to get the z value of int3. Could the same be used in a struct which only has a bunch of arrays of the same size? E.G Grid[5] return the 6th NativeArray<int3> in the struct.

worldly pulsar
#

you can overload operator[]
public T1 this[int index] { get {...} set {...}}

thorny halo
#

Yes, though I've been struggling with it, can't use Marshal library since i need this struct in a job and the job system is not allowing me to use it, throwing exceptions. Trying to use UnsafeUtility, but mostly just been crashing.

worldly pulsar
#

There is the evil pointer arithmetic way...

    get { 
        fixed(NativeArray<int>* ar = (NativeArray<int>*)&this) 
        {
            return arr[index];
        }
    }
}```
#

emphasis on evil

#

(typed this without checking so may need some compiler error fixup)

thorny halo
#

First thing i tried, since unity uses same thing with their int3, float3,... types. However, using NativeArrays for this throws "cannot take the address of, get the size of, or declare a pointer to a managed type".

worldly pulsar
#

ugh, right, nativearray is not blittable

#

ok, so the only way seems to be a switch(index) {... }

#

manually returning each option

thorny halo
#

Finally got it. thanks for the help @worldly pulsar

        get
        {
            void* pointer = UnsafeUtility.AddressOf(ref chunk0.nodes);
            Astar_Chunk chunk = UnsafeUtility.ReadArrayElement<Astar_Chunk>(pointer, index);
            return chunk;
        }
north bay
#

What is chunk0.nodes?

thorny halo
#

NativeArray<float3>

north bay
#

Instead of AddressOf you can use chunk0.nodes.GetUnsafeReadOnlyPtr() to also have job safety

#

Might also be more descriptive but idk

thorny halo
#

GetUnsafePtr() and GetUnsafeReadOnlyPtr() for some reason crashes. Only UnsafeUtility.AddressOf() works.

north bay
#

Huh

#

Are you sure the bounds you are reading from are correct?

#

GetUnsafeReadOnlyPtr only calls the atomic safety method and returns the buffer

#

It should throw an exception and not crash when something would be wrong with the method

#

Or the job system would break apart

thorny halo
#

yep, i just replaced "UnsafeUtility.AddressOf(ref chunk0.nodes);" with chunk0.nodes.GetUnsafeReadOnlyPtr(). The AddressOf works fine, the GetUnsafeReadOnlyPtr() crashes. Not sure what's going on, but AddressOf() will suit my needs just fine.

north bay
#

Pretty sure AddressOf returns the address of the NativeArray not the buffer inside it

#

Wait just read the messages above, you have multiple native arrays inside your Grid and trying to return the one at the given index?

#

What is Astar_Chunk then?

thorny halo
#

Astar_Chunk is just a NativeArray<float3>

north bay
#

Ah okay, yea that should work fine. My bad ๐Ÿ˜…

small hull
copper quarry
#

know what?

small hull
#

how to fix that error

copper quarry
#

I don't really need to explain because the error is clearn just read it ^^

#

You can't creat a object when your graph is opened in asset mode

#

Just get out of the asset mode and create it in the graph

small hull
#

how do I get out of asset mode?

#

and what even is that?

vague cargo
#

anybody know how to fix this

#

every time after compiling ,these four error occur

#

but i dont get any error while running the actual game

#

have tried re installing the burst package ,didnt work

#

interesting part is ,when i copy the whole project to another disk(not C:/), and tried to open it,these errors gone, so it
only errors when the project in C:/

acoustic spire
#

Question: When I set mesh.SetVertices(dynamicBuffer.AsNativeArray) and then modify the dynamic buffer in another system, will mesh reflect the changes?

zenith wyvern
#

No

acoustic spire
#

It copies the array somewhere?

zenith wyvern
#

Yes, writing into a mesh always copies the data

acoustic spire
#

sad

vague cargo
#

๐Ÿ˜•

low oasis
#

Quick Burst question - for, probably, small arrays is it better to let the array loop all the way or break out when you've found what you need when it comes to burst compilation?

#

or for large arrays for that matter

#

I know break is supported, but is it worth it?

gusty comet
ocean tundra
#

@low oasis I do, but not sure if it costs or not

#

@gusty comet Why use those over the built in ones?

#

just more options?

robust scaffold
ocean tundra
#

Can they be stored in components? (IComponentData??)

robust scaffold
robust scaffold
gusty comet
robust scaffold
light mason
#

For project tiny should all UI text be texMeshPro

robust scaffold
light mason
#

Is that the end workflow in mind UI Elements to TMP ?

#

Or is that a temp thing they are working on

robust scaffold
#

Ultimately, unity wants everything to use UI Elements. From the editor windows themselves to the game UI as well. Currently, Tiny seems to be using some sort of hacked together GameobjectUI but the roadmap, as trustworthy as it is, has UI elements total integration and only option as the end goal. As with the rest of Unity in general.

#

UI elements has so much boilerplate though. Reminds me of the old days of DOTS and the current state of ISystemBase. It also has the same amazing potential as DOTS currently. 1 or 2 draw calls for the entire UI and dynamic updating of parts of the UI. Literal magic.

#

But holy shit the boilerplate. Want to write text and align it to the top left of the screen? 20 lines of code.

light mason
#

I think I would be ok writing more code if it worked in tiny

robust scaffold
light mason
#

I thought tiny was my only option for ECS on webGL

robust scaffold
light mason
#

Ok , well thank for the info, I will march on with TMP

robust scaffold
# light mason Ok , well thank for the info, I will march on with TMP

Yea, good luck. I just recommend you keep in mind that UI elements is going to take over soon and a lot of the features of TMP will be pulled out or downgraded in the conversion. Consider making a temporary project playing around with UI Toolkit to get a feeling of what is to come. Performance, fantastic. Features, very much lacking.

light mason
#

My UI need are super simple atm, do you think UI elements can many work in tiny for some simple stuff or it just not compatible at all

robust scaffold
#

Unless explicitly supported by Tiny. Like I believe Burst.

light mason
#

Ok .. so Iโ€™m out of option and have to TMP โ˜น๏ธ

robust scaffold
#

Yea, just dont get too comfortable. There is no long term support version of Tiny after all.

hollow sorrel
#

doesn't ecs technically work on webgl? just no burst and multithreading i thought

light mason
#

WHAT no long term support !

robust scaffold
robust scaffold
# light mason WHAT no long term support !

Yea, Tiny is under rapid development. If you read their release notes on this recent UI integration, they're stating that the current implementation is a placeholder and that they're actively working on making UI elements, or a form of it, work. Just that they couldn't delay not having a UI system for so long.

hollow sorrel
robust scaffold
light mason
#

In bit confused now, if I want to build web app what should I used

robust scaffold
#

From wikipedia, Unity, the larger engine, does not support WebGL but instead WebAssembly (Wasm).

#

So yea, use Project Tiny but dont expect to make a complete game out of it. Networking specifically is going to be a pain to make. Raw C# sockets is the only way and good luck with making your own networking solution from scratch. That'll probably be the largest part of developing a functional multiplayer game in Tiny.

light mason
#

Iโ€™m using Wams

#

Should I have not have used Tiny ?

hollow sorrel
#

webgl and webassembly are not mutually exclusive, but yeah basically arguing semantics at that point, key takeaway is that they want a game playable in browser

#

i tried using Tiny but imo it's not usable even for small things for another 2 years or so, there's just too much core engine missing

robust scaffold
#

Singleplayer browser game, I recommend something more native than the massive workarounds game engines currently do like Babylon.JS.

#

Sure, it's javascript and all it's dynamically typed horror but much better support with browsers everywhere.

light mason
#

Different engine is not an option at this point

robust scaffold
light mason
#

For wasm itโ€™s tiny or regular Dots ?

#

Just to clarify

robust scaffold
#

Tiny.

light mason
#

Ok thanks for the info

robust scaffold
#

As a side note, I've stared at the Entities' package page for months now and I just now realize there's more images to the front page "What is ECS" than just the first. It's a whole slideshow.

gusty comet
#

TinyKitchen with dots unityasset Sources, Browser-Play-Game
Source: https://github.com/Unity-Technologies/ProjectTinySamples
Using: Tiny Project URP Wasm Dots/Ecs similar WebGL 2, Unity2020++
https://github.com/Unity-Technologies/ProjectTinySamples/raw/master/res/TinyKitchen.gif
Compile, if you have sucsess make a screenshot, share here your succsess?
Play: https://tiny.vision/demos/TinyKitchen/Wasm/TinyKitchen.html <--play

gusty comet
#

Do I have to pass ref variables to functiosn called in entities foreach?

like this?

        Entities.WithNone<NeedsCompanion>().ForEach((Entity entity, ref Coord coord, ref SpatialHashUnit unit) =>
        {
            UpdateCell(entity, ref coord, ref unit);
        }).WithBurst().ScheduleParallel();
ocean tundra
#

yup

gusty comet
#

alright thanks

ocean tundra
#

but only if you change the value

gusty comet
#

wait haha it says updatecell is reference type and can only be used without burst and using run

ocean tundra
#

i think update cell has to be static

gusty comet
#

oh ok haha thanks

robust scaffold
#

Imagine this, a dynamic buffer that's also a hash map. I need to see if it's possible

#

Quick google and source code search: no. Far too much backend magic surrounding dynamic buffers that even changing the indexing just doesnt work.

rugged lark
robust scaffold
rugged lark
#

Ah, I think you're right. I think it's indicating that skinning is required to take place on the GPU.

#

I should have been able to deduce that for myself. But thanks for coming to my aide. ๐Ÿ˜‰

rugged lark
#

How much have you messed about with DOTS animation Korn?

robust scaffold
#

Also please ping me whenever you mention me. I'm alt tabbed to my own code trying to debug something so I'm not reading discord.

rugged lark
#

So what do you do in terms of animations in your project? I'm bludgeoning my way through DOTS. I've gotten entities to render in the hybrid renderer. Now I'm trying to figure out how to handle deforming and animating those meshes.

robust scaffold
zenith wyvern
#

Heck yeah dude, who needs graphics

rugged lark
#

Does your project also lack animations, Sark? ๐Ÿ™‚

zenith wyvern
#

The only 3D project I did in DOTs was static meshes only. I'm working on animation right now for my 2D game but obviously that's a lot more straightforward

#

I believe @safe lintel and @scarlet inlet have at least some experience with the dots animation package though, could try poking them when they're around

rugged lark
#

I'm going to beat my head against the limited documentation for another hour or so. I don't know enough to ask any pertinent questions of an expert at this point. I'm cobbling together an alife simulation and trying to use pure ECS so that I can drive up entity counts. Eventually would like to plug in some machine learning and experiment with that space. I don't really need animations, in fact rendering anything in 3d is superfluous to what I originally wanted to accomplish. But after slogging through learning Unity and DOTS, having the opportunity to learn a new skillset animating and deforming 3d meshes is tantalizing. So I'm going to embrace the scope creep unless/until this documentation breaks my spirit.

zenith wyvern
#

I haven't looked at it since last year, all I remember at the time is immediately thinking "this looks too complicated for me" and deciding I would stick to 2D animation for now

rugged lark
#

Yeah I'm wagering on a similar trajectory.

zenith wyvern
#

If you do want to stick with 3D you could always do 2D animated sprites in a 3D world

rugged lark
#

If I bounce off this that's probably where I'll settle. That was pretty much my original plan, but I've gotten greedy.

light mason
#

Is Unity mathematics the same as shader code ?

#

Can I do this ?

zenith wyvern
#

Try math.all(p.xy >= 0)

#

Or math.any if that's what you're checking

light mason
#

Thank you ๐Ÿ™

karmic basin
gusty comet
#

Hello!

I'm trying to use DOTS to improve the performance of my really small app that I put into an android/ios application by making aar module and then run it in some activity(android)
The problem is I experience very low FPS on weak devices

The only thing that I think could help is to convert and instantiate my gameobjects as entities. (Or rewrite the whole app logic to ECS' style)

Can anybody suggest something on that? Or maybe I need to try other solutions to improve instantiating? UPD: But I am not sure that only instantiating cause the problem, maybe it is Unity itself load the process. But I think it will be better to try

fierce shuttle
#

Does anyone have experience with box casts (I assume CollisionWorld.CastCollider)? I'm currently having problems with some really obscure scaling and cropping issues.

#

The documentation sadly only shows sphere collider casts, some working box cast example would be really helpful

north bay
karmic basin
# fierce shuttle Does anyone have experience with box casts (I assume CollisionWorld.CastCollider...

Never casted a box, but it would be the same query with a ColliderCastInput as any other shape. On the official samples they showcase every one of them :
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/UnityPhysicsSamples/Assets/Demos/3. Query/Scripts/QueryTester.cs

pearl pulsar
#

Is Build and Run meant to work in Project Tiny samples, or is the different build configurations meant to go through a separate workflow for now? I'm trying out a Tiny project sample in 2020.2.2f1.3859.13 and it seems GameSaveSystem is not able to resolve its references to GameSaveNativeCalls in the build.

karmic basin
#

I never built a Tiny, but I remember they have a dozens of page of getting started doc

#

I'm sure you'll find build info in there

pearl pulsar
#

They sure do haha - I've been looking through that and wondering if that's part of the workflow difference for right now.

slim nebula
#

does netcode remove ISystemStateComponentData structs from an entity on the client when it's deleted on the server?

#

i have a few on there and it seems to delete them all except 1 randomly? I don't get it

north bay
#

It doesn't

slim nebula
#

i only have one reference in my code to remove my system state component. and the breakpoint on it is not being hit (I have burst off). How can I set a breakpoint on whoever is removing it?

#

===
are there issues with putting multiple systems in a single file? it seems that some of my systems are not running in all worlds....

#

nope that's not it...

#

World.GetOrCreateSystem returns something that's not null, but I don't see the system in my group

#

I guess if it doesn't run the entity debugger just doesn't show it?

#

ok what about this. if some system throws an exception, does it just not run the rest of the group or frame or something?

#

yeah.... it's lookin like this is the case

#

so dumb

karmic basin
#

you can also check a box to filter systems that didn't run in the Entity Debugguer, and search your prospect

slim nebula
#

oh. I"ll look for that thanks

karmic basin
#

it says "not run" instead of displaying execution time

slim nebula
#

"show inactive systems" thanks!!!

karmic basin
#

I find also "show playerloop" useful

slim nebula
#

yes!!!! I see my systems breakpoints being hit now!!!

#

is there any reason not to have a try-catch in every OnUpdate? Is there a significant performance impact?

#
    public class NonSuckingSystemBase : SystemBase
    {
        protected override sealed void OnUpdate()
        {
            try
            {
                NonSuckingOnUpdate();
            }
            catch(Exception ex)
            {
                Debug.LogError(ex.ToString());
            }
        }

        protected virtual void NonSuckingOnUpdate()
        {
        }
    }
#

like this

light mason
#

Iโ€™m trying to get text mesh pro to render on tiny , I have it setup like the example but it impossible to debug with no editor. Anyone know some common things to check

#

I donโ€™t know how this is converted

pearl pulsar
slim nebula
#

ooof

#

so no try catch with burst. gotcha. thanks

zenith wyvern
light mason
#

I think Iโ€™m a version older with no tiny.UI

zenith wyvern
#

Latest version is .32

pearl pulsar
#

Unity.Tiny.GameSave.asmdef seems to properly reference Unity.Tiny.GameSave.Native

zenith wyvern
#

Maybe you have to surround all gamesave stuff with that define?

#

I don't really understand why you have to do that or how anyone would figure it out but yeah

pearl pulsar
#

I'm just trying to build the sample project Tiny2D - none of it even seems to use GameSave (which makes sense since it's a toy example)

#

Though, running a Tiny project without UNITY_DOTSRUNTIME enabled seems like the problem.

gusty comet
#

Wouldn't that be because weak devices have less cores available for jobs to exectue on? @gusty comet

#

are scriptable objects usable from within jobs etc?

#

like if i want to execute a method on a scriptable object?

ocean tundra
#

@gusty comet i would guess no

#

scriptable object is a class

#

you could make a static method

gusty comet
#

See I always thought that static methods were not safe when it came to threads

#

but it seems its ok with the job system?

ocean tundra
#

you cant change any data with them

#

they should just 'do' something, no state or data changing

zenith wyvern
#

They also can't read any mutable static data, so not very useful in that context I think

gusty comet
#

well what I am trying to do is add codable behavior for ai

#

scriptable objects seemed pretty good

#

so that users could just create a new behavior and code it without touching anything else

#

any suggestions?

zenith wyvern
#

You can't use scriptable objects in jobs or burst

ocean tundra
#

yea that wont work

#

๐Ÿ˜ฆ

gusty comet
#

Any suggestions for something that would work?

ocean tundra
#

your scriptable objects could still be used for authoring, and then somewhere you convert them into a entity node graph

#

depends on your AI pattern

#

like im pertty sure a behaviour tree could be modeled in ECS

#

it would just be a bit tricky to get it going

gusty comet
#

Yeah I was going to try that but was failing on the UI side of things.

#

The graphview documentation isn't very good yet

ocean tundra
#

yea so keep the UI as Authoring only

#

and use something like XNode or whatever it was

#

then you take that SO and covert it into 1 single ecs node tree

#

and your ai agents get a reference to the root tree and some other components to know where they are in it and state data for the tree

gusty comet
#

Oh that is awesome, the built in api for graphview is really tricky and I wasn't able to figure out how to get the wires to connect haha

#

I will see what I can get going now that I have some sort of way to make the graph at least.

ocean tundra
#

yea been using xnode forever

#

its a bit odd sometimes bit way easier then building from scratch or using any built in stuff

#

im hoping eventually the built in stuff will get a nice API and be easy to use

gusty comet
#

tbh i feel like a lot of unities api is so verbose in the hopes someone will sell a plugin on the asset store to make it simpler so personally I doubt it xd

#

There are a lot of core engine features for sale on the asset store

ocean tundra
#

yup

#

i dont buy many code assets anymore tho

#

most dont work well with dots

gusty comet
#

The only thing I have bought recently is the imposter system by amplify

#

but again, thats a core engine feature and is in most commercial game engines already

ocean tundra
#

yup

#

my go to fav asset is a* pathfinding project

#

and again that should be core

gusty comet
#

I've never really messed with it. Whats better about it than unities built in pathfinding?

ocean tundra
#

everything ๐Ÿ˜›

#

many different graph types, all updatable at runtime (important for procedual generation)

#

cool local advoidence stuff (so agents will avoid others)

#

and you can mix and match them all however you like

#

let me know how your AI attempts go, my first try at AI was terriable and would love to see how behavior trees (or something node based) works

#

also youve seen the AI planner?

gusty comet
ocean tundra
gusty comet
ocean tundra
#

um no clue, just make one they are free

gusty comet
coarse turtle
#

no git lfs doesn't require a login name. That looks like you're trying to login to Github, which means you would need an account.

safe lintel
#

github is a git hosting site

#

they have both free and paid options for hosting/registering(I use free)

gusty comet
#

yes i know for student is github free(not really free=, but else if you get lot of data and transfer is a big risk, costs!!!

ocean tundra
#

@gusty comet github is free

karmic basin
slim nebula
karmic basin
#

Well whatever you wrote on line 49 does not compile

#

Useful, I know ;P

slim nebula
#

yeah i mean... there's a function there.... OnUpdate...

#

woo

karmic basin
#

xD

slim nebula
#

no idea what line is the issue

karmic basin
#

I was going to ask if you were doing something special

slim nebula
#

no i mean I dunno

karmic basin
#

dumb suggestion, if you restart Unity, still there ?

slim nebula
#

good suggestion. lemme try

#

(that version the error is on line 42)

karmic basin
#

I mean, DOTS is messing hard on me. Last time I tried to open Profiler window, it insisted on adding a Particle System in the hierarchy. Multiple times ๐Ÿคทโ€โ™‚๏ธ

slim nebula
#

lol

karmic basin
#

42 is empty but i guess using statements are missing

slim nebula
#

OH the line numberrs aare fucked cause that's not the whole file

#

it points a the first line in the function, not the function prototype

#

so this: if (HasSingleton<ThinClientComponent>())

#

when when I ifdef that out it points at var localInput

#

OK

#

so

#
                // if (!found && localInput != Entity.Null)
                // {
                //     buffer.SetComponent(cmdTarget, new CommandTargetComponent { targetEntity = Entity.Null });
                // }```
#

when I comment this out it works

#

like it doesn't support adding to the command buffer outside a querry

#

I'm just going to put it direct on the entity manager after playback instead

karmic basin
#

yeah probs better luck with the EM

#

You're doing something someone here was doing also a few days ago

#

and I don't understand

#

why adding to a command buffer and playback it immediately ?

slim nebula
#

to support burst

karmic basin
#
  • IIRC there's already a sync point just before the client sends commands to the server
karmic basin
slim nebula
#

it won't compile if you try to do it without the buffer

#

you'd ened to add .WithoutBurst on the query for it to compile if you're using entity manager in there

#

I want the performance so I use the buffer

karmic basin
#

yes but why use a newly created buffer here and exec it immediately, while you have another commandbuffer waiting for you just before sending the command data (if I'm not mistaken)

slim nebula
#

sorry where is this other command buffer?

#

I only made one

karmic basin
#

lemme review systems list, ses if I find it

#

see*

slim nebula
#

you mean like get some other system and create a command buffer on that system?

karmic basin
#

yeah

slim nebula
#

wouldn't that be more expensive than just making a local one?

#

true it can't run in parallel or w/e but I'm not super worried about that right now

karmic basin
#

I mean when I stumbled upon it, it looked like it was meant for that, lemme double-check what I'm babbling

#

yeah true, player input is once per client after all

slim nebula
#

I think when you use the end and start systems you still have to pass in an allocator

karmic basin
#

(safe mode on Unity startup <3)

slim nebula
#

i think that's more for when you're doing work in parallel

karmic basin
#

yeah you prob right

#

I mean, me vs 2 other users, I might be the one who's wrong :p

slim nebula
#

i mean I'm pretty new too

#

also the reason my code failed was "found"

#

it was being initialized but never changed

#

I guess the compiler failed to optimize this out as constant