ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
FArticyId Struct Reference

#include <ArticyBaseTypes.h>

Public Member Functions

 FArticyId (const uint64 &Value)
 FArticyId (const FString &Value)
 FArticyId (const TSharedPtr< FJsonValue > Json)
bool InitFromString (const FString InSourceString)
uint64 Get () const
FArticyIdoperator= (const uint64 &Value)
FArticyIdoperator= (const FString &Value)
 operator uint64 const () const
class UArticyPrimitiveGetObject (const UObject *WorldContext) const
template<typename T>
T * GetObject (const UObject *WorldContext) const
bool IsNull () const
FString ToString () const
FString ToAssetFriendlyString () const

Public Attributes

int32 Low = 0
int32 High = 0

Friends

uint32 GetTypeHash (const FArticyId &Id)

Detailed Description

64-bit ID used for referencing Articy objects, exposable to blueprints.

Constructor & Destructor Documentation

◆ FArticyId() [1/3]

FArticyId::FArticyId ( const uint64 & Value)
inline

Implicit conversion from uint64.

◆ FArticyId() [2/3]

FArticyId::FArticyId ( const FString & Value)
inline

Implicit conversion from FString.

◆ FArticyId() [3/3]

FArticyId::FArticyId ( const TSharedPtr< FJsonValue > Json)
inline

Json deserializer.

Member Function Documentation

◆ Get()

uint64 FArticyId::Get ( ) const
inline

Retrieves the 64-bit representation of the ID.

◆ GetObject() [1/2]

template<typename T>
T * FArticyId::GetObject ( const UObject * WorldContext) const
inline

Retrieves the referenced object, cast to T.

Template Parameters
TThe type to cast the object to.
Parameters
WorldContextThe world context object.
Returns
A pointer to the object of type T if found and cast is successful, otherwise nullptr.

◆ GetObject() [2/2]

UArticyPrimitive * FArticyId::GetObject ( const UObject * WorldContext) const

Retrieves the referenced object (single runtime copy of the referenced asset).

Parameters
WorldContextThe world context object.
Returns
A pointer to the UArticyPrimitive object if found, otherwise nullptr.

Retrieves the UArticyPrimitive object associated with this ID.

Parameters
WorldContextThe world context object.
Returns
A pointer to the UArticyPrimitive object if found, otherwise nullptr.

◆ InitFromString()

bool FArticyId::InitFromString ( const FString InSourceString)

Initializes the FArticyId from a string containing "Low=" and "High=". Used in custom UI elements like pins where direct access is often not possible.

Parameters
InSourceStringThe string to initialize the ID from.
Returns
true if initialization is successful, otherwise false.

Initializes the FArticyId from a given string containing "Low=" and "High=".

Parameters
InSourceStringThe string from which to initialize the ID.
Returns
true if initialization is successful, otherwise false.

◆ IsNull()

bool FArticyId::IsNull ( ) const
inline

Checks if the ID is null (both Low and High are zero).

◆ operator uint64 const()

FArticyId::operator uint64 const ( ) const
inline

Implicit conversion to uint64.

◆ operator=() [1/2]

FArticyId & FArticyId::operator= ( const FString & Value)
inline

Implicit assignment of FString.

◆ operator=() [2/2]

FArticyId & FArticyId::operator= ( const uint64 & Value)
inline

Implicit assignment of uint64.

◆ ToAssetFriendlyString()

FString FArticyId::ToAssetFriendlyString ( ) const
inline

Converts the ID to an asset-friendly string format "Low_High". This function is used instead of the normal ToString function when asset-friendly names are required (no commas, etc.).

Returns
An asset-friendly string representation of the ID.

◆ ToString()

FString FArticyId::ToString ( ) const
inline

Converts the ID to a string format "(Low=..., High=...)". This function is primarily used for custom UI works that require IDs to be set via String.

Returns
A string representation of the ID.

◆ GetTypeHash

uint32 GetTypeHash ( const FArticyId & Id)
friend

Gets the hash of the FArticyId.

Parameters
IdThe FArticyId to get the hash for.
Returns
The hash value of the ID.

Member Data Documentation

◆ High

int32 FArticyId::High = 0

The higher 32 bit of the ID.

◆ Low

int32 FArticyId::Low = 0

The lower 32 bit of the ID.


The documentation for this struct was generated from the following files:
  • Source/ArticyRuntime/Public/ArticyBaseTypes.h
  • Source/ArticyRuntime/Private/ArticyBaseTypes.cpp