Hey I’m currently wondering what the best way to initialize all your FObjectFinder methods to find the sprite assets saved in the editor. I was originally being a idiot and tried to use those methods outside of the constructor to organize my code but currently I can not think of a good way to initialize all my sprite assets easily.
For my game I have a gun asset which the player has attached to the root component which is a paper2dsprite too, both are paper2d sprites, and I want to make a system where I can easily interchange the sprite of that component during run time in game when you pick up a object. I know there is probably some guide or tutorial but I have been looking around and just overall have been having trouble coming up with a efficient system to do this. If you know of something that would help me please link it below. Is there a way to make a struct array of FObject Finders in the constructor, or is that inefficient anyways I’m curious what the best way to implement this system is using c++.
To reiterate my goal is to have a system where you can walk up to a gun asset on the ground and equip it to your player and hold it in your hand. Currently I just want to switch the papersprite that has no asset to a visible sprite when my OnInteraction() method is fired(it is fired when you pick up the gun). For some reason I am just hitting a road-block coming up with a good way to do so, any advice would be helpfull thanks!