# How to get value of some USTRUCT, while only having access to its UScriptStruct and memory adress?

**URL:** <https://forums.unrealengine.com/t/how-to-get-value-of-some-ustruct-while-only-having-access-to-its-uscriptstruct-and-memory-adress/761339>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP\
**Created:** [February 1, 2023, 12:25pm UTC](https://forums.unrealengine.com/t/how-to-get-value-of-some-ustruct-while-only-having-access-to-its-uscriptstruct-and-memory-adress/761339 "2023-02-01T12:25:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [February 1, 2023, 12:51pm UTC](https://forums.unrealengine.com/t/how-to-get-value-of-some-ustruct-while-only-having-access-to-its-uscriptstruct-and-memory-adress/761339/2 "2023-02-01T12:51:26Z")

</div>

As long as the property is “reflected” (UPROPERTY) then maybe something similar to this:

> [@Safely find a reflected property name?](https://forums.unrealengine.com/t/safely-find-a-reflected-property-name/442607):
>
> Hi all… I need to access a UPROPERTY of a UCLASS through reflection in C++. It shouldn’t present any challenge in itself, something along the lines of: MyObject-\>GetClass()-\>FindPropertyByName(TEXT("MyPropertyName")); However I’m absolutely certain that there’s a preprocessor macro that provides safe way to reference a property name in C++, that will throw a compile time error in the event that the name changes. Something like this: FName PropertyName = MAGIC\_PROPERTY\_MACRO(MyClass::StaticCl…

You would need the name of the struct property though. You can’t possibly make the code know what struct to pick from the container only by a type.

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-get-value-of-some-ustruct-while-only-having-access-to-its-uscriptstruct-and-memory-adress/761339)._
