menu
 

Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

0 투표

Since upgradiing to 2017.1.xxxx we started seeing a number of crashes in the editor (could happen in game too!) on level swap. It wasn't terribly common but I root caused it to the fact that "GetWorld" for a component in UE4 can return null when swapping levels. (I.E. the world can be in-accessible during level swap).

Apologies in advance for the formatting. I don't see support for code blocks here.

The crash would occur in this function, but that's not the best place to fix it:

template<class COMPONENT_TYPE>
void FAkAudioDevice::RemovePrioritizedComponentFromList(COMPONENT_TYPE* in_ComponentToRemove, TMap<UWorld*, COMPONENT_TYPE*>& HighestPriorityComponentMap)

 

The fix is pretty simple. Add this to FAkAudioDevice::Init

// OnWorldCleanupDelegateHandle is a new member variable I declared in FAkAudioDevice
OnWorldCleanupDelegateHandle = FWorldDelegates::OnWorldCleanup.AddLambda(
[&](UWorld* WorldBeingCleanedup, bool, bool)
{
   HighestPriorityLateReverbComponentMap.Remove(WorldBeingCleanedup);
   HighestPriorityRoomComponentMap.Remove(WorldBeingCleanedup);
}
);

and add this line to tear down

FWorldDelegates::OnWorldCleanup.Remove(OnWorldCleanupDelegateHandle); 

Feature Requests Brent R. (100 포인트) 로 부터

Please sign-in or register to answer this question.

...