# How to get FUniqueNetId from TSharedPtr(FUniqueNetId)?

**URL:** <https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271>\
**Category:** Platform & Builds\
**Tags:** onlinesubsystem, Steam, leaderboard, unreal-engine, question, CPP\
**Created:** [October 3, 2016, 1:01am UTC](https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271 "2016-10-03T01:01:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oraclefish](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oraclefish](https://forums.unrealengine.com/u/Oraclefish)\
**Post date:** [October 3, 2016, 1:01am UTC](https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271/1 "2016-10-03T01:01:08Z")

</div>

Hey everyone!

Using parenthesis instead of less than or greater than symbols because of the HTML formatting.

Working on a steam leaderboards implementation for my simple VR arcade game.

However, writeleaderboards() requires an FUniqueNetId while GetUniquePlayerId() returns a TSharedPtr(FUniqueNetId)

How can I get a straight up FUniqueNetId from this?

I tried using GetUniquePlayerId().Get() but that returns an FUniqueNetId\* which also doesn’t work.

For reference:

 ![109409-leaderboards.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/3/103de040c45c5170c9bce7e3f7fb9c821ce56913.png)

---

<div class="post-metadata">

**Author:** ![Maide](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maide](https://forums.unrealengine.com/u/Maide)\
**Post date:** [October 3, 2016, 3:07am UTC](https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271/2 "2016-10-03T03:07:00Z")

</div>

After you have verified the shared pointer is valid (call the IsValid() method on it), you can dereference the pointer by using an asterisk.

```
if (pid.IsValid())
{
    ion->GetLeaderboardsInterface()->WriteLeaderboards(SessionName, *pid, WriteObject);
}

```

You’ll also want to ensure your leaderboards’ interface is also valid.

---

<div class="post-metadata">

**Author:** ![Oraclefish](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oraclefish](https://forums.unrealengine.com/u/Oraclefish)\
**Post date:** [October 3, 2016, 3:12am UTC](https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271/3 "2016-10-03T03:12:34Z")

</div>

Perfect! This worked! Thank you so much!

---

<div class="post-metadata">

**Author:** ![SeGuVeGa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/seguvega/32/977989_2.png) [@SeGuVeGa](https://forums.unrealengine.com/u/SeGuVeGa)\
**Post date:** [August 8, 2021, 4:15am UTC](https://forums.unrealengine.com/t/how-to-get-funiquenetid-from-tsharedptr-funiquenetid/372271/4 "2021-08-08T04:15:04Z")

</div>

1 hour going through the documentation and found nothing, thank you great sir :v
