# How do you use a variable from other class?

**URL:** <https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [October 17, 2024, 7:26am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266 "2024-10-17T07:26:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrCha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krcha/32/987705_2.png) [@KrCha](https://forums.unrealengine.com/u/KrCha)\
**Post date:** [October 17, 2024, 7:26am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/1 "2024-10-17T07:26:16Z")

</div>

I want to use variables that is from custom\_player into game\_manager verse. Is there a way to find out?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/f/29f186608691b40f3d7c710296ea96d02fd97ef0.png)

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [October 17, 2024, 7:54am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/2 "2024-10-17T07:54:27Z")

</div>

`@editable MyCustomPlayerDevice : custom_player = custom_player{}`

Reference the verse device from the editor and then inside your code you can do something like

```auto
Print("{MyCustomPlayerDevice.VariableIWantHere}")

```

---

<div class="post-metadata">

**Author:** ![KrCha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krcha/32/987705_2.png) [@KrCha](https://forums.unrealengine.com/u/KrCha)\
**Post date:** [October 17, 2024, 10:16am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/3 "2024-10-17T10:16:15Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/8/a3893c0b0181a69c393374bcc85994248a25fe24.png)  
I don’t know why but something goes wrong…

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [October 17, 2024, 10:17am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/4 "2024-10-17T10:17:15Z")

</div>

can you show me the custom\_player script?

---

<div class="post-metadata">

**Author:** ![KrCha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krcha/32/987705_2.png) [@KrCha](https://forums.unrealengine.com/u/KrCha)\
**Post date:** [October 17, 2024, 10:17am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/5 "2024-10-17T10:17:42Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/d/35d9e4801f70ef18724ff9c79e4e5d777d7aa311.png)  
Here it is

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [October 17, 2024, 10:18am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/6 "2024-10-17T10:18:30Z")

</div>

```auto
@editable MyCustomPlayerDevice : Custom_Player_Init_Verse = Custom_Player_Init_Verse{}

```

---

<div class="post-metadata">

**Author:** ![KrCha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krcha/32/987705_2.png) [@KrCha](https://forums.unrealengine.com/u/KrCha)\
**Post date:** [October 17, 2024, 10:20am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/7 "2024-10-17T10:20:31Z")

</div>

Thank you so much!! I solved it.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 16, 2024, 10:20am UTC](https://forums.unrealengine.com/t/how-do-you-use-a-variable-from-other-class/2072266/8 "2024-11-16T10:20:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
