Hey everyone. There’s probably a simple solution to this that I’m not seeing so I’m hoping you can help me out.
I’m creating a project which, when complete will have two or three vehicles which can all be upgraded in their own way since it makes no sense for a lorry that starts with 100 fuel to be upgraded by 20 but the sedan starting with 40 fuel would like that.
There is a C++ upgrade master and C++ children coming off of this for each individual upgrade class (fuel tank, armour, booster etc.)
Each of the children have as many BP children as I think will be necessary stored in a TArray on the upgrade component of the vehicle.
Here’s the problem. Although I can find out what is at item 0 (or wherever) in the array, I’m stuck with getting the specific details of that item without casting to that specific BP class but unless I want to cast to every BP class in, for example the FuelTank subclass until I find the right one then I’m stuck on how to get to the information inside the BP class.
I want to get the information so I can put the information in it on a widget so it has to be accessible from BP.
Any ideas how I can get around this problem?