# How to create "object" inside blueprint?

**URL:** <https://forums.unrealengine.com/t/how-to-create-object-inside-blueprint/1849820>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 10, 2024, 3:23pm UTC](https://forums.unrealengine.com/t/how-to-create-object-inside-blueprint/1849820 "2024-05-10T15:23:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [May 11, 2024, 9:04pm UTC](https://forums.unrealengine.com/t/how-to-create-object-inside-blueprint/1849820/5 "2024-05-11T21:04:58Z")

</div>

So i think you want something like variables for your player.

in this topic i made pictures about how to make global variables that are kept in game mode:

> [@How do you make 'Global' variables?](https://forums.unrealengine.com/t/how-do-you-make-global-variables/1840221/9):
>
> You can make functions in function library, and store that “Global” variable in game mode or game instance. First make bp game mode and your variable inside of it: variable declaration in BP\_Game\_Mode (create this blueprint based on game mode class, add variable) [my global variable] Second, make Blueprint Function Library. And make those 3 functions inside: Get Game mode (this is mainly to make SINGLE point/code in case you want to store those global variables elsewhere, also single poi…

You can do same code, but place your variables in player character or player state bp.  
Just change function that gets reference to game mode, instead get player character or player state there. And ofc make those variables in that blueprint.

ps.  
that acessed nont error happens when reference is either empty or wrong class.

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-create-object-inside-blueprint/1849820)._
