#archived-dots
1 messages ยท Page 203 of 1
As far as I know it does
something is wrong
so im have a simple grid
im just query a child in the grid
never find
but when i un parent it does
What's the query?
So that job doesn't run when it's a child?
it runs but the child localToWorld and Translate is not the world pos
Translate is relative to the parent
Aka local position
But LocalToWorld.Position should always be world position
that what assumed
let me place the parent so that one of the children is at 00 and see what i get
odd
its a hit
Are you sure you should be rounding there
If you're dealing in a grid it should probably be floor
do i need to do something special when i instantiate the parent
ok ill do that
but i have ui pringint as mouse move and that seems correct
mmm
i just notice that child from other parent get a hit that are not at 00
And comparing equality on floats is never a good idea. You should convert them to int3s before comparing. No idea if that's the issue but
Thanks ! This was the most helpful advice i've ever heard about ecs :D
ok looks like i was mixing localToWord and translate
I am curious: Did anybody here try or manage to combine addressables with entities? I am currently loading prefabs via addressables and then converting them into prefabs in multiple systems.
Ok I did some reading and figured out that my collision detection method I was trying to program is never going to work because it's "discrete" not "continuous". Reading for anyone who is curious about custom collision detection (since the character controller in dots is crap and rigidbodies don't work for everything) https://digitalrune.github.io/DigitalRune-Documentation/html/138fc8fe-c536-40e0-af6b-0fb7e8eb9623.htm
I am currently thinking about moving the conversion step into the addressables system and later on possible convert dureing edit time and remap the keys to load the already converted prefabs
Meaning? I know Unity's rigidbody uses the same method as the article I linked but it doesnt go into good detail https://docs.unity3d.com/Manual/ContinuousCollisionDetection.html
I think I did it with scriptable objects
Oh you replied to the wrong person initially. Had me really confused lol
yeah sorry
Yeah I am also using scriptable objects for some stuff already. But then there are some things that are just prefabs (e.g. VFX effects) that I would like to load and instantiate
I'm not sure if you can convert sound effects, but if you can get the raw data you can convert it however you want
doesnt exactly matter what it is atm. Couls also be an enemy prefab for example
actually I think I came up against problems using addressables with Systems
It would be great to just call Addressables.LoadAsset<Entity>("Enemy"); and get the already converted prefab
I found and used this code that worked
public static int TryGetUnityObjectsofTypefromPath<T>(string path, List<T> assetsFound) where T : UnityEngine.Object
{
string[] filepaths = System.IO.Directory.GetFiles(path);
int countfound = 0;
Debug.Log("Filepaths length " + filepaths.Length);
if(filepaths != null && filepaths.Length > 0)
{
for(int i = 0; i < filepaths.Length; i++)
{
UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(filepaths[i], typeof(T));
if(obj is T asset)
{
countfound++;
if(!assetsFound.Contains(asset))
{
assetsFound.Add(asset);
}
}
}
}
return countfound;
}```
But loading from AssetDatabase only works in editor doesnt it?
actually you might be fine in a system I had to use that because addressables wouldn't work in a GameObjectConversnionSystem
yeah
its if you want things converted before run time
Did you try converting prefabs at edit time?
I figured there are methods to store and load entities as binaries which I thought about using
if you put them in a subscene then they are basically converted at edit time
yeah I thought about that. But thats not really extensible and would basically replace the addressables system
If you're worried about missing collisions between simulation steps, you can add your own failsafe system which cast a ray (or shape collider) between old and new position. If you hit something, means the engine missed a collision, so force new position.
Now you're talking about that, I can't remember if com.unity.physics does DCD or CCD ๐ค Could be interesting to check
weird theory but would it not be more optimal to have collision check on the environment objects, say if you know the max speed of the moving objects check the distance surrounding the evironment objects at that max distance, if they are close enough then you do the sphere casts or raycasts whatever, I'm curious if anyone has done it that way before ๐ค
is it valid and safe to declare const members in a job struct?
of a blittable type of course
yea - const members are just readonly data - I've done that without issues
wondering if someone could help me out
i have a Lambda that drags an abject around
work with Translation
but as soon as I start using LocalToWorld is stops working
i need to use localToWorld because the obj are parented
im not sure what im doing wrong here
im setting to 2 ,1, 2 just to eliminate the input
but nothing is moving
or if this looks correct that would be good to know too
@karmic basin I dont think the package has any method for CCD or DCD - I think the character controller does this manually using raycasts and whatnot. I tried the failsafe approach but started having weird issues
Quick theory question... kinda targets the ecs and its persistence. I basically managed to persist a bunch of entities in a database. That includes their relations. But i have one issue... my persisted player entity for example. This one references a bunch of other entities in the database as items ( item - entities ). So in order to make the player work properly, i need to load him and all his referenced item-entities. But what if those item-entities reference other entities again ? And those referenced reference other ones ? Do i always need to load the whole reference-tree ? Does every game load all references between entities ? Or are there tricks to determine how far i need to load something ? Is this even possible in an ecs ?
Or at least if there's any CCD implementation in the package itself I'm not aware of it (without setting up a rigidbody or copying the character controller from the physics example)
@light mason you should use translation
You could grab localtoparent and use that to figure out the world position to local position
But you should only write to Translation, local to world will be overridden by the transform systems
You can just write to it after the transform systems run.
Oh yeah that would work
@ocean tundra do you have an example .. this is driven me crazy
I dont sorry, im at work and dont have my projects here
but try Liburia's idea
just UpdateAfter TransformSystem
i just was @dark cypress chat , so i have to set my system to update after transformsys?
ah
typed at the same time let me try
ok so i have [UpdateAfter(typeof(TransformSystemGroup))]
and this in the system
so i can drag and move
but as soon as i delete NodeMoveComponent the node jumps back to it original position
its driving me bananas
try setting both translation and ltw
if i ref translation and ltw the job never runs
at this point im not sure if this is a bug or not
ok so it does run but i get double transform on children
how do i go from ws to local space
@light mason pretty sure theres a LocalToParent component that has the matrix toconvert to local
I guess where im hittting a wall is the coord i was to set the entity too in in ws
actaully i think if you used that you would take world pos and get a local pos relative to parent
not sure if thats waht your after
take your position and devide? by the matrix
@light mason i really hope you understand matrixes
but im pretty sure you should never touch matrix values directly
theres some helper methods in the new maths library
Hi, i wanted to use DOTS but i can't see Entity in package manager
If I want to copy a very large float4x4 array into Matrix4x4 array, are there any good ways to do so?
ty
ok got it working
adding the mul of the inverse of locatToWorld and the worldPoint
yea i have the basic down of matrices but im still finding my why around the API
api
I need to generate a waveform texture from audio clip data and I'm using Job system to speed it up, but AudioClip.GetData doesn't have a native container variant.
Is there a way to make a native array of a managed array so I can pass it to the job without making another copy and taking up twice the memory?
The job only needs read access.
You can try to pin the array and grab a pointer to pass to your jobs or use the fixed statement;
// Fixed
float[] blah = new float[x] { ... };
fixed (float* ptr = blah) {
}
// Pinning
GCHandle handle = GCHandle.Alloc(blah, GCHandleType.Pinned);
IntPtr intPtr = handle.AddrOfPinnedObject();
// Pass this to job
float* ptr = (float*)intPtr.ToPointer();
// Free the pinned resource
handle.Free();
// Job Example
unsafe struct SomeJob : IJob {
[NativeDisableUnsafePtrRestriction]
public float* Ptr;
public int Length;
public void Execute() {
for (int i = 0; i < Length; i++) {
float content = Ptr[i];
// if you want to access the pointer
float* f = Ptr + i;
}
}
}
I know we are not meant to change the state of a struct from a Method but is there any issues if we do so anyway?
I'm reading data from a network stream, i then create the struct and pass in the DataStreamReader to load up the rest of the values
{
EntityId = reader.ReadInt();```
Also anyone know how to use DataStreamReader.ReadBytes
i have no idea how unsafe pointers work
this seems like crazyness
fixed (double* timePointer = &Time)
{
reader.ReadBytes( (byte* )timePointer, sizeof(double));
}
and to write if anyone is curious
writer.WriteBytes((byte*) &time, sizeof(double));
I managed to convert it using UnsafeUtility.MemMove
Well it seems that the read/write bytes I'm doing doesn't work
Anyone have any ideas?
Hello to everyone or anyone who can point me to a general direction of code..
So I want to make an editor window which will be populated with entites in my world with their entity index.
I want to select a button in that list and then that entity should be highlighted inside entity debugger.
Something like
selection.activeGameObject= gameobject.
//Similarly,
selection.activeEntity= entityList[entityIndexFromList]
//The above should select the entity from the entity debugger and show the components in inspector as usual..
//Just need an easier way to find entites, will expand this to use specific components later.. (Dots Editor package is not that friendly)
Please ping me if you have any ideas. I'd love to hear some suggestions.. thanks!
@quaint bear you'll probably want to look into EntitySelectionProxy for selecting the entity: https://docs.unity3d.com/Packages/com.unity.entities@0.17/api/Unity.Entities.Editor.EntitySelectionProxy.html
Thanks, seems just like what I need.
Hey, thanks!
I'll take a look :thumbsup:
Does anyone have any ideas how to get a nice unique ID for every entity in a subscene. The ID needs to be saved in the scene (inside a monobehaviour) so it persists
If it helps this ID is the entities network id, both client and server load the same subscene but cause of entity remapping the entity index and version can change so I can't use that. So need a ID to help link them
So a UUID ?
Something like that https://docs.microsoft.com/en-us/dotnet/api/system.guid
I think I got a a unique id from AssetDatabase.AssetPathToGUID("Assets/Scr....
Nice one, though only for assets ๐
I wanted to learn DOTS again, but I haven't played with him for so long that I don't even know where to start =/
I found samples very useful when I was exploring Unity Tiny. Pinned post has all the links
how do I implement collision detection in DOTS? say I have thousands of characters, I want to detect when a character is close enough to start fighting another
sounds like you need a spatial data structure to reduce the # of distance checks, otherwise if you want a naive approach iterate through everything (n^2 operation)
How does EntityManager.SetEnabled(entity, true) know, which of entity's children acquired the Disabled tag by EntityManager.SetEnabled(entity, false), and which of them acquired the Disabled tag by other means? Because EntityManager.SetEnabled(entity, true) will not remove the Disabled tag from children that acquired it by other means.
I'm asking because I'd like to create a large multitude of hierarchies on a worker thread using ECB, which are disabled at creation time. I'd like to enable them at a later time with EntityManager.SetEnabled (so I don't need to traverse the hierarchy myself to remove the Disabled tag from the children and grandchildren). But I just can't find a way to do that correctly.
@pliant pike @karmic basin I've considered guids but size wise they are kinda big 128? Bytes where a int is just 32
Once you have a unique id you can e.g. build a runtime hashmap or something if you want to less data over the wire. I would recommend something like Mr K mentioned. You can check out how DOTS Timeline does it for their assets.
(or buy my tagging solution on the store - but that sounds a little overkill ๐ )
Hmmm so everything has a nice easy guid, but at runtime the server maps that guid to a nice small int and keeps that list in sync over the network
I mean.. like all of these solutions, maintaining a table/database always ends up kind of fiddly. Especially when you factor in old versions of a client, addressables etc etc. Versioning is probably quite a large thing to think about.
Yea there's lots of annoyance to this id thing
Putting in a app version check is on the todo list
And honestly don't think I can use addressables, many of my older versions did. But I've embrased subscenes and I don't think we can make a subscene addressable
I haven't tried but it seems like it should be quite possible? A ScriptableObject could reference a subscene no? At any rate, not saying it's trivial ๐
Has anyone been able to serialize entities from a subscene? I recently switched from GameObjectConversionUtility to subscenes for converting my prefab entities. Its all working great in game, however, when I try to serialize the world using SerializeUtility, it fails to serialize any entities from the subscene. I believe this is because SerializeUtility doesn't support remapping and serializing entity references in SharedComponents, but the subscene is automatically adding a SceneTag shared component with a reference to the subscene entity. Do I need to manually remove these subscene components before serialization?
@whole gyro wait there's a component on each subscene entity with the original subscene entity?
How was it not automaticly remapped?
As for serialize untility I've used it lots without subscenes and it was super annoying but never with subscenes
Yeah, these components are on all of my subscene entities:
I was able to get serialize utility working before I switched to subscenes (after doing some mesh -> ID substitution). Only difference now are these extra components.
Maybe I need to use SerializeUtilityHybrid... I just really don't understand what I'm supposed to do with the ReferencedUnityObjects that it gives me back when I call Serialize().
Yeah okay, removing the SceneTag component before calling SerializeUtility.SerializeWorld() works fine. Only difference from what I can tell is the entity window no longer groups the entity under the subscene.
Oh actually I misread your question. No its not an entity reference to the original subscene entity. Its an entity reference to a special selection entity for the entire subscene. Not really sure how its used but my guess is that it has something to do with livelink and loading/unloading subscenes in the editor.
@whole gyro thanks for clarifying. Having the original entity doesn't actually solve my issue. I'm thinking some sort of editor script that can create nice int IDs and save it into a mb with IConvert
How can you get a entity through a gameobject with the new hybrid workflow ?
@shut hare I think it works the other way, Entity => gameobject
you could have a MB that you add to the entity, then in a system set a public Entity field on the MB
I made the logic the other way around with the old workflow GameObjectEntity
the MB would need to be added as a hybrid component
what do you mean by MB ?
MonoBehaviour
ok so the MB would be empty ?
basilcy, just a entity field
isn't it the same thing as the GameObjectEntity class ?
No clue sorry
its ok thx i'll tinker on what you said
As far as I understand, entities with different meshes are split into different chunks to reduce drawcalls. I just want to make sure that if each of those entities all have different transform matrices (like scaled differently, sheared and such) it will still have the same effect right?
I'm not very knowledgeable about graphics stuff so sorry if this is too obvious of a question
not to my knowledge, because the LocalToWorld is not a shared component data, it can fall within the same chunk
Mesh 1 -> chunk has LocalToWorld matrices, A, B, C with different values
Mesh 2 -> chunk has LocalToWorld matrices, W, X, Y with different values
So A, B, C should fall within the same chunk because they share the same archetype + SharedComponentData, same goes for W, X, Y - it will fall into the same chunk that Mesh B is a part of
I see, so that's still useful at least
But will having different matrices have any effects on number of drawcalls?
depends on how it is drawn, I assume you are using hybrid renderer - which I have little experience in using
I am using hybrid
generally I don't think so, since hybrid renderer probably uses indirect drawing/instancing to reduce the drawcalls. Someone else whose worked with it more actively can provide a much better answer than me
I see, your answer still helped a lot though
generally speaking no one would ever be wanting to render the same mesh with the same transform
From my understanding, it should work for different transform matrices. You need to do some tricks only if they have different material properties.
And I think the renderer is using direct instancing. There is a batch limit of 1023
Is there any way to access a material property for an entity without using ShaderGraph?
yup
Could you link me to documentation please? Everything I've found is for ShaderGraph
Yike
Ok ty
Just spent ages learning how to write shaders lmao
Should have done my research
๐
i remember skimming over some fourm posts AGES ago about how to enable the overrides for custom shaders
no idea if they succcessed
Ah ok
Wonder if that's planned for the future
Or if they're just leaving custom shaders behind
honestly if your in URP or HDRP i would just use shader graph
well the whole old render pipline is being replaced with those
Ah
This is a very general question, but would you say anything that is possible via written shader is possible via ShaderGraph?
My shader is super weird and relies on the camera direction, idk if ShaderGraph even supports that
URP is meant to match features of built in, but be faster, HDRP is meant for the crazy HD graphics
not sure sorry, my shader graph skills are super low
Np, ty for the help!
i mainly use URP as it is, little to no customization
eventually i want to get better at it but graphics always seems to be lower down on my list
sounds cool tho
maybe do them in code, with jobs + burst it could be super fast
and you get more maintainable c# code instead of shader magic
good luck, sorry i couldnt help with the shader stuff
no you dont need shadergraph
but you do obviously need to make your shader be compatible with one of the renderpipelines and hybrid renderer compatible
theres a bit in the shader that goes like CBUFFER_START(UnityPerMaterial) and this is where you declare that properties and then a little below another entry where you declare again that they are instancing compatible UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata) ie UNITY_DOTS_INSTANCED_PROP(float4, _BaseColor)
Anyone tried getting DOTS and hybrid renderer working over 2 screens?
I need a hook during the Conversion flow on a MonoBehaviour, anyone know if that exists
Before conversion, a component attached to the SubScene needs a callback like OnEnable
have a question i was wondering if someone could help me our with
if i have an Enitites.ForEach( DynamicBuffer<Foo>
and i use and cmdBuffer to create a new Instantiate of foo
can i use add(foo) inside the lambda
as in Add to the buffer of and entity i instantiated with ecb
hope that question makes sense
or is there an command buffer method i should use to add the new element
ok i found AppendToBuffer()
probably interesting for the ECS fans https://github.com/bevyengine/bevy/pull/1525
thats from the Rust gamedev community, for a new engine project. The interesting part is that the ecs is a hybrid ECS
components are stored in archetypes and data chunk by default, but its possible to remove them from there and put them into sparse sets like in entt or entitas for some component types
hmmm its a interesting idea
being able to specify if the component should be optimised for iteration speed or add/remove performance
honestly sounds like a good idea, more controls to us
indeed
he also implements some of the ideas from Flecs like archetype graphs
that act as a big optimization around add/remove component for archetypes
one of the interesting things about such an approahc for the hybrid
is that you can go even more hybrid
not just storing the components into sparse sets
but for example something like a hashmap
or other storage that could store entityID->component
but also does optimising tag components to have little/no cost and adding the enabled component optimisation/feature also give us the same things
not exactly
being able to use sparse sets for some components makes the typical "state machine" pattern work a lot better
important to know that this ecs also makes tag components much faster and has component enable/disable
very cool
ecs libraries are starting to go quite a bit beyond the feature set of unity ecs
on the cpp side we have Flecs which is highly advanced, and then this now for rust
maybe after we get those 2 features in DOTS (in 2 years ๐ ) they could consider something like this
btw, Rust works incredible for ECS
yea i bet
its just a perfect fit for the language
rust is a functional-ish highly parallel language
where memory management is a huge pain due to the borrowchecker
buuut
if you use a ecs to manage the memory for you, thats a total headache you remove
i doubt ill be learning rust anytime soon
work is all mobile/web/c#/.netcore
and free time is all unity ๐
i really like the idea of us being able to choose that optmization
and it would be quite simple too, unity could probably make it into a Attribute we add on our IComponents
C# forever
shows the priority of the engine. They don't have a pipeline, or even proper shadow rendering, but a rewrite of the ecs is more important than those anyway ๐
thats like godot adding dynamic gi before they had occlusion culling, or even bare minimum acceptable frustum culling
in bevy's case it shouldn't be that surprising I guess, because the whole engine came into being because the author didn't like amethyst's ecs (amethyst itself is upgrading their ecs btw, at the cost of killing all their momentum!)
no editor is a big stopper for me ๐
do wish unity put more of their development in the open though
I wish Unity makes their engine open source
Or other than that... have their trello board open for the public to see
probably only the second is really feasible
How can I get the entity itself in IJobChunk?
You pass in an EntityTypeHandle to the job struct
struct ChunkJob : IJobChunk {
[ReadOnly] public EntityTypeHandle EntityHandle;
public void Execute(ArchetypeChunk chunk, ...) {
var entities = chunk.GetNativeArray(EntityHandle);
for (int i = 0; i < chunk.Count; i++) {
var e = entities[i];
}
}
}
also on a separate related note - I recently saw this post from godot on ecs architecture: https://godotengine.org/article/why-isnt-godot-ecs-based-game-engine Might be interesting to check out on what their concerns are ๐
Where do I get the EntityTypeHandle?
very similar to how you get a ComponentTypeHandle, from SystemBase it's calling the GetEntityTypeHandle() function
from ISystemBase it's usually systemState.GetEntityTypeHandle()
no matter how many times I've seen the word polymorphism and it explained I still never understand it 
Thank you.
Can I have Entity field on an GeneateAuthoringComponent and set it later in a system?
or is that not a allowed
what do you mean?
I have public Entity on in a [GenerateAuthoringComponent]
the entity i want to ref will be created in a sys
or should i spilt that into a seperate comp and create and set in a sys
[GenerateAuthoringComponent] just makes a monobehavior for your component.
I dont see why not. GenerateAuthoringComponent really only relates to the editor workflow
The component itself functions as normal.
so like a node lib you create in editor
you instantiate but you want to set a ref go other entity
node are prefabs in the example above
Bad example above but hopefully it makes sense
Is there a good way to get a NativeHashMap to auto grow as it fills up?
write an extension method that grows it automatically on insertion ๐คฃ
dont think i can do that from a job tho
I don't think ya can either
hmmm
maybe it already auto grows
From the comments: The number of items that the container can hold before it resizes its internal storage.
nope guess not
@ocean tundra you were suggesting a* to me, does a* allow you to tell the agents to follow a path at some offset?
Do i need to use capture variables inside entities.foreach that ref the component?
@timber ivy thats not really a a* (or any pathfinding) thing
it kinda is, because the built in pathfinding always finds the shortest path between two points
and it results in the ai moving in a perfectly straight line
with pathfinding it helps to break it into 2 parts
- the acutal pathfinding, this is finding the best path between 2 points
2, the actual following of the path, this can be many different options depending on the game type
i belive that built in pathfinding has both concepts mixed together
Any ideas how i can get the ai to spread out and not fall in a straight line?
but for me, i've been messing with RTS games, so a space game pathfinding and medevial pathfinding both works the same for step 1, but following is completly different
so again depends on the game, for my space one i had units in a 'squadron' the squad would pathfind (step 1) and then use flocking steering behaviours to follow
the navmesh is litterally the whole sidewalk
but they utilize only the center
(this is unities built in navmesh and pathfinding btw)
i tried offsetting the destination
but that didn't change anything
so for crowds i would use pathfinding + (steering behaviours OR RVO (also known as local avoidance)
so yes the path would always be the same for all those people
but the actual following is different
i've never used unity's but i would guess yes
I'd also vary the speed on em slightly
And make sure they can avoid collisions with each other
yea thats a great idea
As no one literally walks in sync
yeah
People walk slower/past each other
it looks so robotic rn
i'm trying to find a good article on steering behaviours, there was a good one that had cool animations
Also do they move their arms
local avoidance is a MASSIVE pain ๐
Or anything like that
nah there is just an idle animation rn
I haven't really messed with animating it yet
just wanna spread them out a little for now but apparently that isn't possible with built in navmeshagents
i think these were the ones that made the most sense to mee
ig this just gives me an excuse to make a dots compatible pathing system
Awesome
(damn embedded links taking up the whole page, sorry everyone)
awesome thank you roy
I will be able to make something happen surely but
for now this will get me started at least
its actually nuts to me that something like pathfinding for AI is so limited with the built in shit
yup
i've always used https://arongranberg.com/astar/features
but sadly compatibility with DOTS is lacking
There is also https://github.com/dotsnav/dotsnav but its very new, looks really promising tho
Please use code tags
for code
what code
it wont let me add code
are you using code tags?
networkDriver.BeginSend(connection.Value, out DataStreamWriter writer);
writer.WriteByte((byte) GameNetworkProtocol.CurveData);
//todo generate a nicer typeId
var typeId = 1;
writer.WriteInt(typeId);
that why i was wondering if you saw any code from me
so the data doesnt appear to get set
Wonder what would happen if i parented my ai to an empty object
and offset the child by a value
var data = GetComponent<NodeBezierMasterComponent>(connectEntity);
// Set EndNode Entity Hit target node
Entities
.WithoutBurst()
.ForEach((Entity e, int entityInQueryIndex, ref NodeBaseComponent s, in LocalToWorld l) =>
{
data.EndNode = e;
data.CurveDotsMax = 10;
ecb.SetComponent( connectEntity, new NodeBezierMasterComponent()
{
CurveDotsMax = data.CurveDotsMax,
StartNode = data.StartNode,
EndNode = data.EndNode
});
}).Schedule();
// Create Dots
Entities
.WithoutBurst()
.ForEach((Entity e, ref NodeConnectComponent c, in LocalToWorld l) =>
{
Debug.Log("____0");
Debug.Log(data.CurveDotsMax);
for (int d = 0; d < 10; d++)
{
Debug.Log("Creating curve dots like never before son!");
Entity curveDotEntity = ecb.Instantiate(nodeLibBuffer[3]);
ecb.SetComponent(curveDotEntity, new Translation {Value = new float3(inputRecordData.MouseGridX, d, inputRecordData.MouseGridZ)});
}
Debug.Log("_____1");
ecb.RemoveComponent<NodeConnectComponent>(connectEntity);
}).Schedule();```
Debug.Log(data.CurveDotsMax); is 0
what am i missing here
soo
data.EndNode = e;
data.CurveDotsMax = 10;``` will never survive
your not saving data again
also these are both jobs, thats not how you share data between jobs
ok so if NodeBezierMasterComponent is a singleton how do i write data into i from different entitie in a forEach
well you shouldnt
because I cant capture either
as it will constanly be replaced
your looping over every entity with .ForEach((Entity e, int entityInQueryIndex, ref NodeBaseComponent s, in LocalToWorld l) =>
theres no guarantee of ordering
whatever the last entity you loop over will be the one your saving to the singleton
not really sure what your trying to achieve
what are you trying todo?
what i added before was not correct
I have a singleton
when i hit a node or enity of NodeBase I want to update the singleton
no it mouse in a grid
@worthy rampart you're a legend man. By making each ai having a randomized speed set, it made the offsets happen naturually cause it causes the path to be recalculated when the agent has to steer past slower moving agents
@timber ivy keep in mind the agents will be recalculating every X (frame? seconds?) which is not great
Huh?
performance wide
i mean
i don't think it will be an issue
i got 1200 rn
30 fps on a business laptop
and the ai stream in and out based on camera position, so i don't really think there will ever be more than a few hundred on the screen at any time tops
@timber ivy sweet
my performance goals are crazy high so that would never work for me ๐
how many are you trying to have on screen at once?
@light mason still lost at what your trying to do sorry
when i did mouse grid stuff i did the following:
raycast to world
take Hit and devide by grid size, this would give me the grid int x and y
i had a native hashmap of int2 (x y) to entity to find the entity for that grid
@timber ivy ALL of them ๐
I wonder if giving each one a random "width" for the agent collider would add more variety as well
i usually try to make management/strategy games and want to have no unit caps (limited only by CPU speed ๐ )
yeah you can't really get away with streaming them in and out
and reusing them like i can
with rts type games
yup ๐ฆ
Speaking of streaming
i wonder when unity will get built in level streamer
like ue4 has LOL
maybe, i think subscenes are a step in that direction
Yeah I agree
they are kinda painful still, but their super quick / background loading seems solid
is it better than LoadLevelAsync
i dont think it would be that hard to build the next layer with them as they are
all you really need is a way to map int2 (chunk X and Y) to a scene GUID
@ocean tundra ok let me regroup here , thank for talking it over with me
I have one i wrote a while ago that works that way
but it uses LoadLevelAsync and asset bundles
the GUID is just the asset bundle name
worked ok i guess but deff had some frame drops
are subscenes usable with DOTS?
@timber ivy what do you mean by usable ๐
umm both??
๐
theres a SceneSystem you use
call methods on that from main thread
OR create a entity with the right components using a ECB
(the system hepler thread does that for you)
then it all automagicly happens
eg
var sceneEntity = world1.GetExistingSystem<SceneSystem>().LoadSceneAsync(data.SceneGUID,
new SceneSystem.LoadParameters()
{
Flags = SceneLoadFlags.NewInstance
});
internally that does some stuff to find the scene reference and create a entity with a few components
for me seems to work fine
worst part is I cant find any good hooks into the conversion process
specifily i would like to convert a subscene 2ce, into a Server and Client version
Hmm since it converts everything to entities
does that mean some of the built in components in unity
aren't compatible with subscenes?
theres that hybrid/companion thing
that does work with subscenes
you have to manually call something but you can choose to persist old MB's and unity components into the subscene
but by default i dont think it does that with anything
livelink?
most of my issues have been around that, as the concept is great, edit your authoing GO and it will just 'magicly' update the entity version
during runtime
or even during a build
but in practice its a pain to keep working
livelink basicly will stream over your editing changes during runtime, you can even attach to builds and do it
interesting
in concept its great
and it actualy works, in smaller demos/samples
but im struggling with it. again mainly cause server client.
i want it to work, but only into the server world, my standard networking stuff can take care of sending the data to a client
but you cant edit or control livelink at all
no way to turn it off for a world either
Question for everyone
What built in components do people think should have networking support by default?
So far I have Translation, Rotation, Scale
What else do people expect to be synchronised?
Are you creating a net library?
yup
Tbh man
I don't think they should be automatically synced
idk what you're going for
no its up to the user to decide if it gets synced
but it sounds like you're trying to make something high level
Roycon I think you should give the models a tiny scaling
Russel
Sorry
Like 5%
sorry the question is more like, Which built in types should have support for networking
Random
ah
thats a good idea too derek
and roy something I always hated having to manually sync back when I used pun was animations
I'd give it as much variance as you can
Without it looking wierd
Eventually you'll probably want some different models too tho
There's always 100 other things to do
9k free modelsa nd animations on mixamos website
that i am going to grab here soon
to use with this
@timber ivy Ooo i need to dig into the animations package to see what animation components i need to add for syncing
good idea TY
yup
and give the user the ability to serialize their own data for transport
its 2 parts
Code gen, which creates the types to allow networking
nice thats cool
but what are you using to transport data cause
if you're doing an rts
i really wouldn't use C# sockets
then on component you select what data types to sync
or anything that uses c# sockets internally
nope im using Unity.Transport atm
Idk what it uses internally
might want to check into
yup
league of legends uses enet
so its proven at least
but it should be swappable, all i need todo is create some different code gen templates and put some toggles into the code generator
yup my last prototypes used enet
the only reason ive started with transport this time is i want Full job support
where with eNet i found integrating with jobs a pain and just gave up ๐
there was a post in the dots forum
about how he did it
So yeah
unity.transport deff way easier to use if you want full job support
interesting
He used io threads
and a lockless q instead
so there wasn't the constant overhead of spinning up a new job
yea makes sense. thats what my first prototype did too
only 1 tho, the network thread
oh and a serialisation thread ๐ so 2 threads
yeah so it was the same as his ๐
2 threads + main thread for game code
I did something similar in this
still need to finish that ๐ฆ
server to server communication sounds cool
the ability to break apart the server to have more resources...
from one server to another when I got side tracked with work
could have sooooo many entities
this is what i was going for https://www.youtube.com/watch?v=gq1vDG-st1k
This is a short introduction to how PikkoServer can scale online applications and transform simple multiplayer game engine into a seamless MMO engine capable of handing thousands of players interacting in the same zone in a real-time FPS battle.
i feel like to do that right the gameplay needs to kinda enable that
yeah
tbh
what i was doing was
connecting to the new server
then disconnecting from existing
after you get too far
so you were not constantly jumping servers if you walked back in fourth
The thing that kinda fucked with me though was making the handover seamless
yea..
like
if you were aiming your gun
and walked across
your entire player state got reset
for something like that, i would look at actor frameowkrs, something like project orleans would give you that whole dynamic server adding and removing
yea the other 50% is still huge ๐
to handle server handovers
with orleans you wouldnt handover
the indivudial actor would move but your connection to orleans is to the clustor
ah really?
it will eventually notice that all your messages are now going to server x instead and move your connection
somehow you could probably bump that to do it early
the biggest issue is orleans recommends something else inbetween, like web apis to handle auth and things
between the user and the cluster?
yea, the cluster is meant for 'backend'
yea probably
but not really suitable for some games as that would just make latency
but again more to build
has anyone had issues with ICustomBootstrap not loading when using a custom build configuration, but it works if you do the default unity build (ctrl-shift-b)?
boostrap just not getting called ๐
oh no
dont say that
i use a Custom Bootstrap
but i havnt started any builds yet
@minor sapphire got any links for how to setup the builds? and ill give it a try
we need to use that new build pipleine thing right?
yeah
take a look at this thread, he has the same issue
but
it looks like it might be a package issue
if you have your own ICustomBootstrap (not in a package) you might be fine
I'm about to test moving the bootstrap out of the package
well thats annoying, i eventually want to distribute as a package
I haven't confirmed yet
what on earth is icustombootstrap
its some 'magic' you can use to control where/when your systems get created
it's a way to override the default bootstrap, the bootstrap sets up the world and default systems
i use it to configure a Server and Client world with different Systems
yes which is my situation too
and also to exclude my systems from the default world
are you building some network tech too?
Is there a way to tell what packages are installed in a project?
from code?
Ideally I only want to add Types that are actaully installed to a project, eg no point adding Animation networking support if no animation package installed
yea from code
i guess i could just read the manifest json
seems like a terriable idea tho
Hmm if you know what packages you are looking for potentially you could use reflection
yea probably refelction ๐ฆ
if it's an editor only situation, why not read the manifest? ๐
oh but I suppose they could have local packages
maybe reflection
didnt think of local packages
yea refelct over every loaded assembly seems like the best way
then over every single type ๐
When people want to send a network command (from client to server) (eg player move) which sounds better?
- Find the player entity and add a item to the command buffer
- Add a command component to any entity (not a buffer so can only add 1 per entity)
2 seems non-viable. One command per frame?
well you could create more then 1 entity
or if its a unit in a rts add it to many units eg every unit you have selected
im starting to think that both approchs might be right, per entity commands for things like unit movements and a more 'general' command pattern for other things, eg chat or building construction
oh burst isnt on by default interesting
It works!!
Thats about 650 worst case entitys syncing translation and rotation every frame
The delay is cause I've hardcoded a 1sec delay in untill i get a proper network time working
Cool one wowie
@sage mulch Did we already have a discussion about this?
Maybe I sent the wrong link
Does ECS clean up entitys with no components on them?
no
they get reused
wait so ECS does deal with them
yeah.
They get reused.
You need to explicitly destroy them. They do not get destroyed for you once they have no components
How do I query for them. Is there a empty query somewhere?
I don't think there is, how do you end up with empy entities?
asmdef have conditionals based on what other asmdefs are present and what versions
@ocean tundra yeah we did, was hoping for some more input on it. Thanks again for the link but I can't seem to see the "Hybrid instanced (experimental)" toggle. Is the "Exposed" toggle that I do see the same thing, just renamed?
Can someone clarify what ISystemBase is for? What can we do with it for now? I have read that ISystemBase is to write main threaded job with burst.
It lets you burst your OnUpdate method, so job scheduling itself will be bursted. It's currently very limited though and only supports IJobChunk.
Oh, i see. You know, lambda style code for dots is here for at least 2 years and i completely forgot how it feels to write all logic in self defined jobs. So Entities.ForEach is something default for me now)
Yes
Wait no
I don't remember sorry for the ping xD
But I think it changed name yeah at some point
I don't have it in 2020.2.5
Oh but you're not interested in GPU instanced, you want to override property, right ?
Then yeah check that box and follow the manual
And double-check if you're in v1 or v2
It's called "override property declaration" on my version
Thanks! I went ahead and enabled v2, enabled "Override Property Declaration -> Hybrid Per Instance" on my ShaderGraph's Property. I then wrote an IComponentData struct and System to interact with that struct per instructions. I then attached the AuthoringComponent of the struct to my GameObject and dropped a ConvertToEntity on it. The System seems to be running correctly (per the Entity Debugger) but the property doesn't change on the shader. Any thoughts on this?
(attaching some screenshots)
Also there has been no console output regarding a missing IComponentData struct (which the instructions says would happen) so I think it is being recognized, just not changed? nvm I think I'm wrong about this part, don't believe there would be any output
can someone explain the authoring workflow to me please?
the documentation is kinda vague and either it j ust magically works on its own or they are leaving some shit out
you put it in a subscene and everything in the subscene magically gets converted to entities
or you put a convert to component on it, and that converts it
what about [GenerateAuthoringComponent]
does that just generate a monobehavior you can use on prefabs
GenerateAuthoringComponent creates a monobehavior with the same fields as the component and adds the component to the converted entity from the fields
sometimes the generation doesn't work well and you need to write authoring manually but most times you dont
any benefits of using authoring over createarchetype if you dont need the editor serialization to edit the fields values?
the idea of authoring is converting developer editable/readable data into a format that's more efficient for the computer to process.
if the efficient way for the computer to process the data is just inherently readable then no you don't really need authoring
the idea is to allow fast development and fast runtime simultaneously by adding a small amount of boilerplate code

Is there any way to 'ask' if a entity has other components?
Eg If (EntityManager.HasOtherComponents<Component1, Component2, Component3>(entity)?
maybe something todo with archetype?
just .hascomponent for each component I think
pass in the entity that has the one component
the issue is i'm building a tool/library, so i wont know about all the possiable user components
i only know about my components
hascomponent<YourComponent>(entity) will return true if YourComponent is on entity regardless if there are other components on entity
yup, but i need to know if there are other user components on it
you want to iterate through components of unknown type?
yea i guess
I think you'd need the architype for that yea
uhhhhhhh lemme look I think I have a vidja that had it
uhhh I forget if you can use them directly or you might need to create a copied array of the data
yeah nope the code I remembered still requires the type to be specified. I dunno
why do you need to know if other components exist? Seems like some paradigm is being broken here
typically you'd be querrying data that you know exists
ok so im working on networking stuff ๐
one of the things users will need todo is send commands (examples include, move unit command, build building, sync time)
some of those can be added directly to the player entity (those are nice and easy)
some will be added to entities a player control (eg unit move)
but some might be pure throwaway (eg chat, create new entity, attach chat command, attach target players)
the throwaway ones (event entities) should be cleaned up by my systems, BUT the commands attached to player entities (eg units) should not
you could make your components system components. then when an entity is deleted, the other components go away and only your system components are present. you could add one additional normal component that gets deleted that you can detect WithNone<>(). then you delete your throwaway components entities, and the other entities continue working fine
it sounds like a destructor pattern. system components do that
hmmm maybe
Are you only looking for a way to clean them up?
yea for now
ill try the system components
but if that dosnt work looks like EntityArchetype has a calculate difference method that might work too
ty for the idea
havnt really used many system components yet
I've been using them a bunch in pairs like that to handle clean up.
each system can have a pair of tag components to handle cleaning up instances of random junk, tracked by an entitiy
I have some animator instance stuff and some room instance stuff. I don't even known what all components are on there anymore. everything only worries about what it itself touches
yea thats the best way
I only made a quick test in the past with the color, and it worked. Not all types are supported yet. SO I don't know for FLoat
Interesting finding
I replaced DynamicBuffers with components containing UnsafeLists (of size 4096) in my Minecraft clone and actually got performance boost.
I moved everything - blockTypes, vertices, indices, uvs
Storing blocks in DynamicBuffer:
- Generating :
total 9.7354 ms in 100 iterations
avg 0.0973 ms
max 3.6375 ms
min 0.046 ms
- Meshing :
total 7710.938 ms in 100 iterations
avg 77.1093 ms
max 581.9719 ms
min 50.339 ms
Storing blocks in UnsafeList:
- Generating :
total 8.455 ms in 100 iterations
avg 0.0845 ms
max 3.3248 ms
min 0.0388 ms
- Meshing :
total 2053.0682 ms in 100 iterations
avg 20.5306 ms
max 82.3683 ms
min 10.5827 ms
with the dynamic buffers you were testing in a build?
well with both tests were in a build?
No. Why I should?
@sage mulch they have samples scenes, you could try to compare with your setup, check everything is the same
Ah. They can be turned off in editor. One moment
there's still stuff you can't turn off. build is much faster than editor
yea true, but i wouldnt be surprised if theres still some unity safety checks somewhere that you cant disable in editor
Is it possible to build Play mode tests too?
Huh, I haven't seen any checks that aren't guarded by enable_unity_collections_checks on the C# side so far
im pretty sure theres some around burst
as in builds a exception inside burst code kills your app right? in editor it dosnt
i disabled every check I could find in the menus and it's still much slower than my standalone build
I thought that's also handled by enable_unity_collections_checks but it's been a long time since I disabled safety checks inside the editor
not sure
so, without safe checks and jobs leak detection
Storing blocks in DynamicBuffer:
- Generating :
total 10.6013 ms in 100 iterations
avg 0.106 ms
max 5.152 ms
min 0.0386 ms
- Meshing :
total 3466.3829 ms in 100 iterations
avg 34.6638 ms
max 176.7178 ms
min 19.2338 ms
Storing blocks in UnsafeList:
- Generating :
total 8.4996 ms in 100 iterations
avg 0.0849 ms
max 3.4231 ms
min 0.0374 ms
- Meshing :
total 1971.4737 ms in 100 iterations
avg 19.7147 ms
max 104.2451 ms
min 10.2631 ms
My thoughts are for any performance stuff profile in builds, editor just adds too much stuff ๐
True, but the editor should be good enough for estimations
i mean. does that generating and meshing process change the architype of the entity that the buffer is on?
like a dynamic buffer will have it's initialization size in the chunk data
whereas your unsafe list would always exist outside of the chunk data right?
I think dynamic buffer tries to balance between those two extremes: 1) second memory allocation outside of chunk vs 2) limited size in chunk
whereas you know the exact requirements of your list
so I feel like maybe it makes some sense
theres a attribute you put on dynamic buffers to tell unity where to put your data
It'll take some for me to make this project be built but I got interested in that too. There is the bigger problem with UnsafeList that makes it unusable - I can't assign its data to Mesh since it has no API for pointer nor converting to nativearray
InternalBufferCapacityAttribute
You can create a NativeArray from an unsafe buffer
any reference? I didn't find that
Let me look it up really quick
chunk along with other component types in the same archetype. When the number of elements in the buffer exceeds
this limit, the entire buffer is moved outside the chunk.```
so a fixed size unsafe list is probably all inside the chunk right?
NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray<T>() inside Unity.Collections.LowLevel.Unsafe
Thanks
so you guys think dots vehicle physics is even remotely possible yet?
i mean all the math operations are available. What else would it need? project tiny showcases a racing game.
Well there are no wheel colliders in the physics api yet
how would I even begin to replicate that?
dont lots of people just custom make those anyway
no idea
what is there to a wheel collider? just keeping the main body up off the ground (suspension) and then they are the spots to apply forces from (which you can then use some math to work out things like grip)
that's very game specific
oh and i guess turning, not really sure how to do that but again i expect thats just maths
prob pretty complicated maths tbh
turns out you shouldnt be turning the wheel colliders anyway
so i guess its just about applying some rotational force
ima look into this
idk anytime i've made cars i just rotated the front wheels to turn
You do not turn or roll WheelCollider objects to control the car
right in the docs ๐
hmm
it works if you do it tho
LOL
or rather
worked in early unity 5 days
ig that ws quiet some time ago
๐
oh rofl
thats right
there is a steerangle property
on wheel collider
so the docs are correct
can an entity have multiple of the same component on it?
yee
really?
yea
4 entities per vehicle wouldnt be an issue?
i dont think so
they wouldnt be colliders, i would raycast down from each wheel, do some maths and assign the result into a component
then the car systems update after, read the result from every wheel, do something ๐
also if each wheel is a child entity its SUPER easy to have more or less of them
eg a bike or making a massive truck with 20 wheels
So
Do I have a wheel component as well as a wheel entity?
will the authoring workflow take care of this for me?
wondering if someone could help me with a question.
Is there anyway to know the entity count inside a lanbda
kind the equivalent of creating an EntityQuery and CalculateEntityCount per frame
basically i only want to run a Entities.ForEach if i have an entity count over 1
@light mason ecs will already limit your On update to needing more then 1 entity
But you can do that calculate entity could and wrap the entities.foreach will a if
@timber ivy Check the physics samples from unity
They made some vehicles work
like a truck
I think they tried a tank also if I remember well one of their Unite videos 1 or 2 years ago
i have question, its possible to use dots in Mirror/UNet networking? i mean if i have networkbehaviovur and i will convert that thing to entity and idk if that thing will break some things
or someone knows some networking which supports DOTS already
there's DOTS Networking
Dive deep into the networked future of Unity using DOTS. Hear how we made the DOTS Sample a networked game, and what we learned on the way.
Speaker:
Tim Johansson - Unity
Learn more about the Data-Oriented Tech Stack (DOTS): https://on.unity.com/2lraugz
@gusty comet ^
Use World.DefaultGameObjectInjectionWorld to access the default world. @gusty comet
-_- I'm not your IDE dude ๐
you can find scripting API here https://docs.unity3d.com/Packages/com.unity.entities@0.17/api/Unity.Entities.GameObjectConversionUtility.ConvertGameObjectHierarchy.html#Unity_Entities_GameObjectConversionUtility_ConvertGameObjectHierarchy_UnityEngine_GameObject_Unity_Entities_GameObjectConversionSettings_
i mean old input values had Gameobject, World
now it's GameObject, GameObjectConversionSettings
Have a read on the manual to refresh your knowledge ?
what about blob asset store
also, any methods made in monobehaviovur should use ECS?
No ? But I'm not really sure I get where you're going with that question
Yeah I don't get it
Systems have their own SystemBase.onUpdate() method. That's something else than MB.Update()
If that was the question ๐คทโโ๏ธ
i speaking about something like, its 1 method and that thing is doing for example, get all entity and change value or something, then that thing should be done in ecs than just normal monobehaviovur?
Oh, you can access Entities package from MBs. But better do it from ECS systems
let's say you want to draw debug gizmos on entities transform, yeah you could plug a quick dirty code on a MB OnDrawGizmos, query entities from here to access their position and draw your gizmos.
But if you have entities, you want to go all in and process their components through systems
Otherwise what would be the point of entities in the first place ?
Mainly you would work on entities from MBs for the conversion system
or for authoring them easily from the editor before that
authoring their components* I mean
Hope that answers your question
Simplest way to iterate through entities and change value would be with a ForEach query first.
So again, read that manual before going further
If you're still lost, check the Unity official github repo, they have an "ECSsamples" that showcases main concepts gradually
hey y'all what's the current state of the DOTS visual scripting?
i heard it was abandoned in favor of bolt? hopefully not?
There's a forum post on that matter
Officially it's "still worked on" but they're gonna stop pushing updates and releases to us
i just looked at literally 5 forum threads and did not find that answer straightforwardly
that's just sad. wtf
Yeah and maybe a blog post for the future of visual tools
the idea is they want to merge ALL their visual graph tools to look the same (and have the same backend I guess)
I think they gonna keep both for some time, eventually merging at some point
But no real precise roadmap I'm aware of
jesus christ. so they're pulling an "okay we don't want to abandon or release anything, really, so we'll just put out 3 different versions" again?
like with the 3 different UI systems we now have
What killed it for me, is they stopped codegen since a few drops :/
There won't be any more dots specific vs solution afaik
Right now they're focused on bolt, eventually that solution will have dots support
for visual scripting or for DOTS in general?
codegen FROM VS, sorry
visual scripting can make dots easily or what?
but from comments about bolt its just not too good for performance
Well next Bolt version planned before Unity acquired them was improving performance and close to release, but they cancelled that to integrate it with Unity
People are angry about that :/
Use case I intended at first was, build systems from visual scripting, then codegen, so it writes all the boilerplate code for me while I learn it.
i wish they would just open source their engine and let people extend themselves. we would have such benefits ๐ฆ
i do imagine open source, literally every day as a programmer. 99% of what i use is based on open source software (and so does everyone else)
not always open source means it will be good
of course there are "bad" open source projects with bad leadership. but there are extremely good benefits to open source. also: unreal literally did just that and it made their engine wayyyy more attractive to many devs
GhostAuthoringComponent got removed from netcode or what?
the original visual script, before-canning version, codegened into burst C# systems
now they have two blueprint ripoffs
idk, in docs i see that thing exists
GhostAuthoringComponent
Should these 2 blocks of code be equivalent? In both cases it will wait for all jobs completed, right?
// 1
_handle = Entities.ForEach((int entityInQueryIndex, Entity e) => {
// ...
}).ScheduleParallel(Dependency);
_handle.Complete();
// 2
Entities.ForEach((int entityInQueryIndex, Entity e) => {
// ...
}).ScheduleParallel()
Works differently for me
Those are not equivalent. The first says Schedule this and right after stall the main thread till it's completed.
While the second says Schedule this but let the main thread do other stuff.
But I call Complete so it should block until jobs in foreach finish
ah, one min
So, I thought the 2nd actually wait for completion
Can't get it. I'm trying to skip scheduling new jobs if there are still active jobs from previous update
void OnUpdate() {
// Skip this update if we have active running jobs from previous update
if (!_handle.IsCompleted) return;
_handle.Complete();
_handle = Entities.ForEach(...).ScheduleParallel(Dependency);
}
But getting error like it doesn't skip scheduling
The previously scheduled job MeshingSystem:<>c__DisplayClass_BuildingMeshData writes to the BufferTypeHandle<Game.ChunkMeshVertices>
this was good advice, thank you. I went ahead and checked out all of their sample scenes and I suppose something may be wrong with my setup. their examples with color worked, but not when I do the exact same setup in my scene haha. kinda odd
From some more experiments it may be because I'm using trying to override the color of a SpriteRenderer. Maybe this isn't supported yet
dont think spriterenderer is supported by the hybridrenderer yet
Combine _handle with Dependency before you schedule
That would explain it! thanks
The problem was that I forgot that I accessed dynamicbuffers later in the system. I was using ref in these jobs and request them though in later
@safe lintel @sage mulch Sprite renderer is supported as a hybrid component, but I don't know if that support extends to overriding its properties ๐ค
If its a hybrid component its just gameobject land, hybrid renderer wont touch it. afaik material overrides arent part of either renderpipeline yet
is there a way of checking if a singleton buffer exists ๐ค
What are best practices for RNG?
I've seen a blog that suggested using a singleton array with 1k random instances, and throw them into parallel jobs based on thread index, but that feels weird.
Another approach is to dump random instances into components. And since IIRC it's just an int it shouldn't take much.
@pliant pike HasComponent works for buffers i think
ok, yeah that means I have to first get the entity, I guess that's the only way
thanks
Would anyone mind taking a quick look at my github and see if im making any huge no nos with dots?
Also what is the steps to create a package out of your code?
@timber ivy Did you find any steps/guides?
ECS already have animations/physics systems?
check out the pinned message
yes to both
physics is in agood state
animations still very early
while looking at pure ecs soo, ECS means every thing should use entity system?
like static object in game
or dynamic
soo if i want ECS then everything should use ECS?
yes i see, changing gameobject to entity and using still mb
check out the docs in entities, conversion workflow, hybrid
i think while i have rooms in my game and if i tried doing pure ecs then uhm idk if that will work with multiple textures/meshes