E7ECS icon indicating copy to clipboard operation
E7ECS copied to clipboard

It looks like one system might have been removed? (EntityGatherer)

Open MostHated opened this issue 6 years ago • 2 comments

Hello there! I came across your post (located here) and was quite excited as it looked like something that might be quite helpful to me. I made a post (located here) about my current situation which ended up coming up again here in regards to some vehicles. I have a (several actually) vehicle in which the current prefab parent is the body of the car and the children are the wheels, windows, steering wheel, etc and I am trying to figure out how to properly get it all situated so that the vehicle, while being a proper entity, is able to be a "complete" vehicle as currently, I can only figure out how to have the main body of the car show up in game and move.

I tried searching for your EntityGatherer within here but nothing came up. It sounded by your description that it might just be what I need in order to get my vehicles working. Do you still happen to have it, or was it removed for a specific reason? If you still have it, or perhaps if any other tool you might have or know of might help me out, I would greatly appreciate if you could point me in the right direction! I have been trying to find example project of someone doing something similar so I can see how they went about it, but have thus far came up empty-handed. I have found a few things that seemed promising (such as this) but have not been able to figure them out completely yet,

Thanks, -MH

MostHated avatar Feb 07 '19 00:02 MostHated

Ahh, I remembered I don't want to do reflection anymore and I would just rather make GameObjectEntity exposed field and link them up, then ask for .Entity from GOE.

From your requirement it seems you want to work with chain of Attach. I have this static helper you could try copy to your code : https://github.com/5argon/E7ECS/blob/master/WorldHelper/WorldHelper.cs#L78 It will make a copy of hybrid GOE tree from a template GameObject as pure ECS Entity tree, and generate attach pairs exactly like what you have in the hierarchy. You need GOE on all GameObject in the tree, it uses EntityManager repeatedly and invalidates, and also it uses C#7 local function for recursive.

5argon avatar Feb 07 '19 01:02 5argon

Thanks, I definitely do appreciate it. I looked it over and put it in my project to see what it was all about, unfortunately, though MeshInstanceRenderer was recently replaced by RenderMesh. Not sure if that would make much difference though? It is not finding a VersionBumperSystem of EntityClosingSystem either. Unless those are other packages of yours that I might need to add? I will take a look through and see if they are.

Thanks!

MostHated avatar Feb 07 '19 02:02 MostHated