How can I use FObjectFinder to set the property of a structure
I have a struct that I made called FInventorySlot. It needs to have two properties, one is an integer and the other is the class of a blueprint called BP_PickUpItem_MAIN. It is not a c++ class and inherits from another blueprint class called interactable which is also not a c++ class. Interactable then inherits from AActor.
I am aware of the issue of trying to use blueprint created classes in C++ but I figure this might be different due to the fact that I just need the class.
I'm having an issue setting the class property inside the constructor with FObjectFinder. When it is inside the constructor and has been built it crashes when any blueprint graph is opened. Here is some code for my struct:
The code for the struct works perfect when I comment out the top two lines of my FInventorySlot constructor. How can I change the class dynamically like this of a structure?
Follow this question
Once you sign in you will be able to subscribe for any updates here