Using FollowerEntity without a mono behaviour

the documentation of the FollowerEntity states that the ECS part can be used without the need to use the mono behaviour. I’m a little confused because after looking at the components and the systems it seems that the ManagedState component references the FollowerEntity in its ai field. That would make it impossible to use the ECS part without creating a FollowerEntity. If this is the case it would contradict the documentation of the FollowerEntity class.

I want to bake the entity part at edit time and attach the remaining mono logic at runtime. If i actually need a FollowerEntity component at runtime this isn’t possible without changing the FollowerEntity script because that script wants to create its own entity in OnEnable. Am i missing something or do i really need to create a game object with a FollowerEntity mono component while changing the FollowerEntity script?

1 Like


Yeah, currently the FollowerEntity is still required to search for paths. I aim to fix this soonish, though. The goal is that it should be usable without the FollowerEntity component. I think I had it working mostly at some point, but I had to revert that code because I ran into some other issues.

May I ask what the current status of this is?
I think in the current 4.3.84 it is not yet included, is it?

It is possible in 4.3.84. There are still managed parts but you no longer need to create a FollowerEntity mono behaviour. I was able to bake all components except for the managed component ManagedState. I created a system that creates the ManagedState component initializes it and attaches it to the entity at runtime. If you take a look at the FollowerEntity mono behaviour summary you’ll find an explanation which components are needed to manually create the entity.

Hope that helps but if you need some more pointers in the right direction let me know.

1 Like

Thanks, I’ll might give it a try. Nonetheless I’d prefer waiting for an “official” solution, to avoid problems with future updates etc.