We have a C++ component which extends from `UNavLinkCustomComponent` which essentially just listens for `OnLinkMoveStarted()` and `OnLinkMoveEnded()` and we have exposed that to BP so content creators can add them to a blueprint if desired.
If I make a new blueprint with a mesh (just so we can see it in the editor) and attach one of these custom navlink components, then place one in the world in the editor and duplicate is (Either through alt-drag or copy/paste) then I hit the following assert:
"Ensure condition failed: CustomLink.GetId().IsValid() [File:D:\Perforce\Slumber_Dev\Engine\Source\Runtime\NavigationSystem\Private\NavigationSystem.cpp] [Line: 2960]
UNavigationSystemV1::RegisterCustomLink::<lambda_3>::operator (), registering a CustomLink with an invalid id."
The callstack is as follows:
Error: Ensure condition failed: CustomLink.GetId().IsValid() [File:D:\BuildAgent\work\e036aca36fe06e9c\Engine\Source\Runtime\NavigationSystem\Private\NavigationSystem.cpp] [Line: 2960]
UNavigationSystemV1::RegisterCustomLink::<lambda_3>::operator (), registering a CustomLink with an invalid id.
Stack:
0x00007ff930678864 UnrealEditor-NavigationSystem.dll!UNavigationSystemV1::RegisterCustomLink’::2’::<lambda_3>::operator()() []
0x00007ff93056416f UnrealEditor-NavigationSystem.dll!UNavigationSystemV1::RegisterCustomLink() []
0x00007ff9305439a2 UnrealEditor-NavigationSystem.dll!TWeakBaseFunctorDelegateInstance<UNavigationSystemV1,void __cdecl(INavLinkCustomInterface &),FDefaultDelegateUserPolicy,UNavigationSystemV1::RegisterToRepositoryDelegates’::2’::<lambda_1> >::ExecuteIfSafe() []
0x00007ff9305644ef UnrealEditor-NavigationSystem.dll!UNavigationObjectRepository::RegisterCustomNavLinkObject() []
0x00007ff93056ff85 UnrealEditor-NavigationSystem.dll!UNavigationSystemV1::RequestCustomLinkRegistering() []
0x00007ff930587b7b UnrealEditor-NavigationSystem.dll!FNavLinkCustomInstanceData::ApplyToComponent() []
0x00007ff941f04c5f UnrealEditor-Engine.dll!FComponentInstanceDataCache::ApplyToActor() []
0x00007ff941725073 UnrealEditor-Engine.dll!AActor::ExecuteConstruction() []
0x00007ff9417604d4 UnrealEditor-Engine.dll!AActor::RerunConstructionScripts() []
0x00007ff94174ba7b UnrealEditor-Engine.dll!AActor::PostEditChangeProperty() []
0x0000021b5e16bb69 UnrealEditor-MyGame.dll!AMyGameTraversalActor::PostEditChangeProperty() []
0x00007ff947daac2c UnrealEditor-CoreUObject.dll!UObject::PostEditChange() []
0x00007ff93dae8603 UnrealEditor-UnrealEd.dll!ImportObjectProperties() []
0x00007ff93dae875b UnrealEditor-UnrealEd.dll!ImportObjectProperties() []
0x00007ff93dbebc5b UnrealEditor-UnrealEd.dll!ULevelFactory::FactoryCreateText() []
0x00007ff93d9f9b6e UnrealEditor-UnrealEd.dll!UUnrealEdEngine::PasteActors() []
0x00007ff93da1926d UnrealEditor-UnrealEd.dll!UUnrealEdEngine::edactPasteSelected() []
I tried setting the navlink to have a valid ID before calling Super::PostEditChangeProperty() which makes the ensure get hit less frequently but it still gets hit occasionally.
What is the repercussions of ignoring the ensure? Or is there something I should be doing to stop it from happening in the first instance?
Thanks
[Attachment Removed]