Trying to copy-pase options menu from my previous game, but my cast to save file always fails


I was working on a new project and decided to just copy-paste my options system from my previous game, as making save games and UIs is hard, but I’m having a weird issue of my casts always failing. No error or warning appears, it simply executes the “Cast failed” pin.
This is 1:1 copy from the previous project, in which this worked perfectly fine.
This happens in all my blueprints, not only the player one.
Anyone knows how I can salvage this?

hi @V_vix

If the cast is failing then there is one of 2 things. there is nothing there to cast to “None” or the BP_GameSettings is not of the correct type or child of the correct type.

after loading your game slot try sending it to a print node from the object pin see what value it gives you. normally it will return the object name.

Also, did you import the BP_GameSettings blueprint into your new project also? if its missing then it will fail.

1 Like

image
Makes sense. I tried to plug it to print text, but didn’t thought to use a string instead.
The print function gives back nothing. Print is connected, but no text appears, like if it was null or something.

image
Yup. I used Migrate function, so all references are intact

Apparently, I cannot create a save file either. Using a branch, it always returns a false value on save attempts


image

Ladies and gentlemen: I am an idiot!
The save game object is created in main menu. The main menu which my old project has, but the new one doesn’t.
:man_facepalming:
Fixed it by putting this in the options menu:

1 Like