x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Cast to SaveGame failed

Hello, I try to get data from a SaveGame named LevelSave. The problem, always I get a cast failed but only when I compiled for the shipping mode with an active "For Distribution" checkbox. When I compile the development mode I don't get any errors. I can't upload a development mode Android App so its important to use a shipping mode version but I don't understand why this option don't work. Do you have an idea?alt text

Product Version: UE 4.18
Tags:
screenshot-109.png (190.5 kB)
more ▼

asked Jun 15 '19 at 07:39 PM in Blueprint Scripting

avatar image

ProDataDavid
1 1 1

avatar image vicecore Jun 16 '19 at 09:03 AM

In looking at this picture, I don't see the need for this cast, as you already have a valid reference to your GameSave

The logic in this pic shows - "create save game object" Node (this outputs a reference to the GameSave)

Then "load game from slot" Node - which also outputs a valid GameSave reference

And then, Cast to GameSave ???? Why? - when you already have two other valid references to the GameSave. Unless there is another reason for the cast other than to obtain a reference

I would eliminate this cast - and just continue the execution, I got a feeling this will solve your problem

Hope this helps, let me know

avatar image ProDataDavid Jun 16 '19 at 01:35 PM

I cast to it like its shown in the documentation (https://docs.unrealengine.com/en-US/Gameplay/SaveGame/Blueprints/index.html and https://docs.unrealengine.com/Images/Gameplay/SaveGame/Blueprints/LoadGameBP.png)

When I delete it and use the first reference it does not load.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Does a save file exist for it to load? The save file would likely be loaded from a different location when packaged for shipping. Make sure you have created and saved a save object before trying to load one. In your image, you are creating a save object, but not saving it to your computer.

more ▼

answered Jun 15 '19 at 09:25 PM

avatar image

Jamendxman3
638 15 22 65

avatar image ProDataDavid Jun 16 '19 at 08:38 AM

Which file I have to create? I only have the savegame bluescript file but the documentation never showed that I have to create one. When you mean the Save to Slot Function, I save it to slot before

https://docs.unrealengine.com/en-US/Gameplay/SaveGame/Blueprints/index.html

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question