Not Able to Remove ARPin From Local Store [Hololens 2]

Engine Version: 4.27
Device: Hololens 2

Hi, I am trying to remove ARPins (spatial anchors) from my Hololens using

UARBlueprintLibrary::RemoveAllARPinsFromLocalStore();

Or basically this

image

With a debug message, I’ve confirmed that the function that calls this work, so I think it’s just this piece of code that’s unresponsive.

Does anybody have any idea on how to get this to work?

Got it to work.

UARBlueprintLibrary::RemoveAllARPinsFromLocalStore(); doesn’t work for Blueprint or C++.

You have to loop through all the saved arpin, and delete them one by one.

*// Load all saved AR pins from the local store*
TMap<FName, UARPin*> AllPins = UARBlueprintLibrary::LoadARPinsFromLocalStore();

*// Iterate through all pins and remove them*
for (const auto& PinPair : AllPins){
    FName PinID = PinPair.Key;
    UARPin* Pin = PinPair.Value;
    if (!Pin){continue;}

    // Remove the pin from the local store
    UARBlueprintLibrary::RemoveARPinFromLocalStore(PinID);
}

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