You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Created Default SmartObjectOctree * Created Default SmartObjectHashGrid * Type of space partition to use can be set in the smartobject config file: [/Script/SmartObjectsModule.SmartObjectSubsystem] SpacePartitionClassName=<ClassPath> * Created DebugSceneProxy and RenderingComponent to share functionalities between susbystem and testing actor rendering components #rnx #rb mieszko.zielinski #preflight 620fb51dec6f84cdfa3b2772 #ROBOMERGE-OWNER: yoan.stamant #ROBOMERGE-AUTHOR: yoan.stamant #ROBOMERGE-SOURCE: CL 19050433 via CL 19050556 via CL 19050564 via CL 19057424 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356) [CL 19066037 by yoan stamant in ue5-main branch]
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SmartObjectDebugRenderingComponent.h"
|
|
#include "SmartObjectDebugSceneProxy.h"
|
|
#include "Debug/DebugDrawService.h"
|
|
|
|
USmartObjectDebugRenderingComponent::USmartObjectDebugRenderingComponent(const FObjectInitializer& ObjectInitialize)
|
|
: Super(ObjectInitialize)
|
|
{
|
|
#if WITH_EDITORONLY_DATA
|
|
HitProxyPriority = HPP_Wireframe;
|
|
#endif
|
|
}
|
|
|
|
#if UE_ENABLE_DEBUG_DRAWING
|
|
void USmartObjectDebugRenderingComponent::OnRegister()
|
|
{
|
|
Super::OnRegister();
|
|
|
|
if (!HasAnyFlags(RF_ClassDefaultObject))
|
|
{
|
|
CanvasDebugDrawDelegateHandle = UDebugDrawService::Register(TEXT("Game"), FDebugDrawDelegate::CreateUObject(this, &USmartObjectDebugRenderingComponent::DebugDrawCanvas));
|
|
}
|
|
}
|
|
|
|
void USmartObjectDebugRenderingComponent::OnUnregister()
|
|
{
|
|
if (!HasAnyFlags(RF_ClassDefaultObject))
|
|
{
|
|
UDebugDrawService::Unregister(CanvasDebugDrawDelegateHandle);
|
|
}
|
|
|
|
Super::OnUnregister();
|
|
}
|
|
|
|
FDebugRenderSceneProxy* USmartObjectDebugRenderingComponent::CreateDebugSceneProxy()
|
|
{
|
|
FSmartObjectDebugSceneProxy* DebugProxy = new FSmartObjectDebugSceneProxy(*this, FDebugRenderSceneProxy::WireMesh, *ViewFlagName);
|
|
DebugDraw(DebugProxy);
|
|
return DebugProxy;
|
|
}
|
|
#endif // UE_ENABLE_DEBUG_DRAWING
|