#Collections missing references
1 messages · Page 1 of 1 (latest)
That's extremely odd considering NativeHashSet is provided by the com.unity.collections package
can you try find Unity Collections in your project folder and reimport it
First of all, thank you for your help. Reimport to Collection package didn't work, only Reimport all helped. Collections error disappeared, but one new error occured:
Library\PackageCache\com.unity.2d.animation@9.0.1\Runtime\TransformAccessJob.cs(165,62): error CS1955: Non-invocable member 'NativeHashMap<int, TransformAccessJob.TransformData>.Count' cannot be used like a method.
ok so currently the 2d animation package is busted with the latest collections
you'll either have to remove it or fix it up yourself if you need it
it's only a couple of line changes from what I know
this thread discusses it more
thank you very much ❤️ I really appreciate it! 🙂
I understand that what I'm about to ask is not related to this problem, but I can see that you are experienced with dots. I want to create a 2D mobile game that will have water like the Where's my water game. I would like to use SPH to create the physics of the water. My vision is to use classic unity physics that will be modified by the SPH algorithm (I don't want to write all my own physics for object collisions, joints, etc). Until now I have tried to implement this in a classic unity environment without dots. But then I found out that dots should optimize this problem.
Do you think it is appropriate switch to dots in this case, even if the package is not production ready? Do you think it will be feasible to use SPH with unity physics in dots? (if you have any experience with sph) Thanks a lot! ❤️
only if you like to develop games, not release them 😅
dealing with bugs has been painful with entities
So you wouldn't recommend me to create this project in dots? 😄
I don't know how to proceed... 😄 classic unity physics not only doesn't bring the right fluid physics, but also with increasing number of fluid particles the FPS drops drastically. So when I found projects that solve the physics of liquids for better FPS via dots, I started thinking if I should use it too 😄 but I am discouraged by potential bugs and the fact that the packages are not yet production ready.
Let's put it this way - people who start projects with ECS don't finish them as often as people who do it with classic
There are a lot of factors that affect this
And many people have encountered critical or at least extremely annoying bugs during development
that stalled it
so if you plan to start project now to learn dots - should be fine. If you have a deadline - you are risking a lot
I can vouch for this, reworked a lot of my code and switched to classic after realizing the amount of roadblock I have to work past get everything working in ECS. Even worse is Hybrid.
oh boi, I took a vow to never do hybrid 😅
Going hybrid is a mistake and should be avoided. Truly a nightmare.
I just hate it so much
But it can't be helped given how much is missing from DOTS currently.
Made me realize how pampered I am in classic with all the features ready made by Unity.
I just feel like its not the amount of work that can be done with a solo dev.
thank you both @gentle geyser and @pearl smelt for this inside info, it helped me a lot! 🙂
I understand it would be a very big coincidence, but have you ever encountered to solve 2D water physics in unity? 😄 I'm starting to wonder if it's even realistic to do such physics 😄
Its definitely do-able, and most likely will run just well without ECS if your goal is like "Where's my water" kind, where there's actually very little amount of water particle simulated. You can go hybrid just for the water simulation specifically, or go with just Jobs system and save yourself trouble, While also enjoy all the benefit of classic :))
you can still use Burst and Jobs
it's entities that is not released yet
Yeah, you're right, I'll use the burst and job system 🙂 The only thing I'm still thinking about is how to solve water particle collisions with obstacles. The easiest would be to use unity physics for collisions, but I'm not sure if that would be ideal.
If I imagine it, in every Update cycle I would have to store all the necessary parameters from Rigidbody2D components of all the particles into the native array. I would then put this array into Jobs system, which should calculate fluid forces for every particle. Results would be applied to each particle into the rigidbody2d component. (I suppose it would be best to use a parallel job)
I'm afraid that collecting data from all particle in each update cycle will be too much performance-intensive and question is if should be better write my own collision system. What do you think about it? Thank you ❤️
well, you might just store data in native collections instead of your objects
so you don't have to retrieve it each tim
I don't know just to be a counterpoint I completed a basic Tower Game/prototype in Unity DOTS 0.5 with not to many problems
I'm messing around with DOTS physics currently in 1.0 and it seems fine to me no game breaking bugs or anything but perhaps I havent delved deeply enough yet
V rising feels like a good example of very successful game completed in dots
That said 2d support is lacking if that's what you want to use
If it were up to me, it would depend wether or not I want to simulate viscosity of the fluid. Without viscosity I would just use simple 2d circle collider and rigidbody, otherwise I would come up with my own simplified liquid sim.
For the rendering part I would get a camera with just the liquid layer rendered as render texture, and treat it like SDF to render the water.