# Loading Character Object from my save game returns null when passing to another level

**URL:** <https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, saving, Blueprint, question\
**Created:** [March 7, 2024, 7:15pm UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459 "2024-03-07T19:15:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigteuf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bigteuf](https://forums.unrealengine.com/u/Bigteuf)\
**Post date:** [March 7, 2024, 7:15pm UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459/1 "2024-03-07T19:15:17Z")

</div>

Hello guys,

I’m quite new at using blueprint and I struggle on an issue for many hours now…  
I have a Hero class, child of Character class, that has many variables.

In a first level I ask the player to initiate the Hero stats (like intell, strengh etc…) and put all the choices in my hero\_instance variables.

Still in this level I save the hero instance in a file, (tested and works perfectly) and open a second level (the world the hero will evolve).

The problem is

when I load the savegame file and try to access to the variables of the saved hero instance, it returns null, but if I try to get another standalone variabl, like an integer, in my saved file it works perflectly…  
When I load the save game file in the first level, and try to access to the saved hero instance variables, it works well also.  
I had the same problem using a personalized game instance, that s why i wanted to used a save file…

I can’t understand how to brings all my hero data in another level (also : i need to do the same for lots of IA characters that I set in the first level and need to bring in the other level)

Does someone have any clue on how I can manage it ?

Thank you very much for your help

Bests

---

<div class="post-metadata">

**Author:** ![baobao4435](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/baobao4435/32/950790_2.png) [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Post date:** [March 7, 2024, 8:52pm UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459/2 "2024-03-07T20:52:37Z")

</div>

By instance do you mean character reference?i don’t know but usually I just put some variables in the save game like heath ,damage,move speed ,etc.and spawn a new character to another level and initial character with the variables stored in the save game.

---

<div class="post-metadata">

**Author:** ![Bigteuf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bigteuf](https://forums.unrealengine.com/u/Bigteuf)\
**Post date:** [March 7, 2024, 10:00pm UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459/3 "2024-03-07T22:00:17Z")

</div>

Thanks for your quick answer.  
Yes i did like you at first and it worked, but then increased a lot the numbers of variables of my world, and needed to optimize the storage of the data of all my characters

To answer you : yes it is an object reference

![snappb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/9/849b6ed04921ad7f4bcace41e1f39feb2c00dd09.png)

---

<div class="post-metadata">

**Author:** ![baobao4435](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/baobao4435/32/950790_2.png) [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Post date:** [March 7, 2024, 10:13pm UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459/4 "2024-03-07T22:13:16Z")

</div>

If you mean optimize the number of variables I suggest create some struct.it helps organize variables together.if it’s performance reason I think a character reference could probably be worse ,because it not only has variables but also has meshes and components(increased storage).

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [March 8, 2024, 2:33am UTC](https://forums.unrealengine.com/t/loading-character-object-from-my-save-game-returns-null-when-passing-to-another-level/1736459/5 "2024-03-08T02:33:42Z")

</div>

> [@Bigteuf](#):
>
> yes it is an object reference

References shouldn’t be saved. It’s just a pointer to the memory address of the object.
