In ue5.1 it seems that this setup doesn’t work anymore and that you need to also get the foliage instance the component is a part of. There are now a whole bunch of foliage actors based on foliage grid size.
Anyone have any idea how to get the index of the foliage actor the player is in?
Havent tested this, but my plugin does it for 4.27 alright.
Your code makes little to no sense.
You analyze all foliage actors but then only use the first one. No way to know if that is the correct actor for the instance you want this way.
Further, you get components by class which is pointless if using foliage.
The foliage actor only contains foliage instances and has dedicated nodes to get and remove instances which access its internal array properly.
To find the proper foliage actor, assuming you have multiple which is something i never even considered to be honest, you probably just solve backwards from the result of whatever it instance you had.
Its got an owner. Just use that owner.
You can give this a try, at the very least you can learn how to manage foliage instances while looking over the blueprint code.
And to be clear, I have no intention of providing support for UE5 until the engine is in working order. That’s probably a year or 2 away at the rate they keep fumbling with everyone’s basic needs.
Still, had no reports of it not working right…