Hey guys so I’m making a car game and I am stuck right now. Basically in my game, the player can purchase cars throughout the game, and choose to race with it in a particular level. Unfortunately I am quite stuck here.
Basically in my game instance, I have a variable called “OwnedCars.” This variable is a blueprint map. It’s key is of type EVehicleModel (this is an enum I made that has every single car in the game represented as an enum). It’s value is of type “VehicleSaveProperties” which is a struct. In this struct, I store a variable called “Car instance” (which is the class that all cars in my game derive from) and a boolean called “IsOwned” (which checks if I can use this car in game or not. This boolean is set to true if it was purchased).
My problem is that in my game instance, I can make the blueprint map alright, but I cannot assign a “Car instance.” I am very stuck here so what should I do. I need to be able to store a blueprint class of that car so I can spawn it later in game.