TSharedRefpropertyRef = GetWorld()->GetClass()->FindPropertyByName(FName(TEXT("MyProperty"))); TSharedRef childPropertyRef = propertyRef->GetChildHandle(TEXT("MyChildProperty"));
TSharedRefIn this example, the function is used to obtain a shared reference to a child node of a sound wave. The function first loads a sound wave asset using the LoadObject function and then generates PCM data for the sound wave. It then obtains a shared reference to a child node of the sound wave using the GetChildHandle function and opens the player for the sound node. Package library: Unreal EnginesoundWaveRef = LoadObject (nullptr, TEXT("/Game/Sounds/MySoundWave.MySoundWave")); TSharedPtr soundNode = soundWaveRef->GeneratePCMData(); if (soundNode.IsValid()) { TSharedRef wavePlayer = soundNode->GetChildHandle (0); if (wavePlayer.IsValid()) { wavePlayer->Open(); } }