How to create a structure that resembles ECS?

I’ve messed with hybrid ECS a bit in the past and I love the concept. But it seems like a lot of that is being deprecated and the methods I was using no longer works (namely GetEntities).

Now from what I’ve gathered from everywhere I can find info on ECS in Unity it’s all about performance and some of the reasons the methods I had been using are being deprecated. But here’s the thing, all the reasons about how and why ECS is better for performance goes way over my head, and to be frank I’m not really aiming for better performance. I’m just a fan of the structure, organization, and flexibility ECS offers. I think separating state from logic, and systems that just work on any entity (game objects) with a certain set of components is just the bees knees.

The main thing I’m wondering is if there’s way to work in Unity the way I like to with game objects and everything else Unity has to offer, while having a structure in place that allows me to create logic in separate place that is able to work on all these game objects with specified components that are only have their state changed. Performance be damned.

Thanks!

I think there’s a bunch of ECS libraries on the asset store.

In its simplest form its just a collection of structs being passed through methods that control their behaviour. We have used this kind of patterns long before ECS was a thing in unity.

It gets more complicated with the job system, async raycasting etc. That’s not easy to recreate.