Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Classes/GameplayDebuggingReplicator.h

173 lines
5.1 KiB
C
Raw Normal View History

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2879625 #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2821607 on 2016/01/08 by Mieszko.Zielinski Added a way to limit amount of information logged by vlog by discarding logs from classes from outside of class whitelist #UE4 This feature was followed by refactoring of functions taking FVisualLogEntry pointers to use references instead. #rb Lukasz.Furman Change 2828384 on 2016/01/14 by Mieszko.Zielinski Back out of visual log refactor done as part of CL#2821607 #UE4 Change 2869215 on 2016/02/16 by Marc.Audy Store a WorldSettings pointer on ULevel instead of requiring it be index 0 in the Actors array. However, we will still generally attempt to keep it at index 0 for consistency with previous behavior #rb Bruce.Nesbit #jira UE-26417 Change 2869404 on 2016/02/16 by Ori.Cohen Improve UI for default collision. It now uses a single drop down and sets the appropriate flags under the hood. #rb Lina.Halper Change 2870062 on 2016/02/17 by Jurre.deBaare Name parameter driven by bone controller #JIRA UE-25997 #rb Thomas.Sarkanen Change 2870280 on 2016/02/17 by Mieszko.Zielinski Vis log category handling fixes #UE4 Also, a minor cleanup #rb Lukasz.Furman Change 2871729 on 2016/02/18 by James.Golding UE-26663 Fix 'LOD For Collision' display name #rb thomas.sarkanen Change 2871730 on 2016/02/18 by James.Golding UE-26580 Make ECollisionEnabled a BlueprintType UE-25373 Add a MakeHitResult node #rb thomas.sarkanen Change 2871732 on 2016/02/18 by James.Golding UE-24397 Add 'test' option to async query API, and use it in places that made sense. Also removed deprecated (4.8) functions from API. #rb ori.cohen Change 2872022 on 2016/02/18 by Lukasz.Furman gameplay debugger refactor #ue4 Change 2872082 on 2016/02/18 by Lukasz.Furman enabled old gameplay debugger as default one for now it will be deprecated with next version after testing in game projects #ue4 Change 2872390 on 2016/02/18 by Aaron.McLeran OR-15041 (CPU) Hitches due to audio decompression on Windows 1) Moving ogg-vorbis file info parsing into a worker thread - stat dumphitches now shows the vorbis stuff totally gone 2) Moving async decoding tasks to be retrieved and started from OnBufferEnd callback #rb marc.audy Change 2872418 on 2016/02/18 by Mieszko.Zielinski Fixed EQS debugger not storing data properly when subsequent Option is the one that produces result #UE4 #rb Lukasz.Furman Change 2872446 on 2016/02/18 by Aaron.McLeran Using cached value of ActualVolume in GetVolumeWeightedPriority Change 2872770 on 2016/02/18 by Aaron.McLeran QAGame testing content for audio testing. Going to create a folder with specific sub-system testing maps for audio Change 2873733 on 2016/02/19 by Jurre.deBaare - HLOD generated assets are now saved into a separate package instead of inside of the level asset #rb Ori.Cohen Change 2873828 on 2016/02/19 by Ori.Cohen Distributions that bake out no longer load in cooked build. #JIRA UE-27126 #rb Olaf.Piesche, Nick.Penwarden Change 2874623 on 2016/02/19 by Aaron.McLeran UE-27131 Support for changing sound class volumes dynamically - new BP function to override a sound mix sound class adjuster - cleanup of AudioDevice.h and AudioDevice.cpp - removing unnecessarily forward declares on various types - removing unnecessary spaces and (void) params, etc Change 2874922 on 2016/02/20 by Mieszko.Zielinski Fixed EQS tests being compiled out from Shipping and Test with WITH_DEV_AUTOMATION_TESTS macro #UE4 #jira OR-15292 #rb none Change 2875838 on 2016/02/22 by Benn.Gallagher [CL 2880055 by Marc Audy in Main branch]
2016-02-24 14:23:53 -05:00
//////////////////////////////////////////////////////////////////////////
// THIS CLASS IS NOW DEPRECATED AND WILL BE REMOVED IN NEXT VERSION
// Please check GameplayDebugger.h for details.
#pragma once
Merging using UE4-Fortnite-To-UE4 from CL 2261973 Includes the following engine-level changes (among others; biggest change is enabling world assets by default): CL 2252857 added dynamic allocations for path finding, removed hardcoded limit of 128 polys in path corridor CL 2256142 Added support for native arrays in JSON object converter. - Permissive in treating arrays of size 1 and scalars as equivalent - Excess elements in JSON are ignored. Serialization succeeds but a warning is logged CL 2256073 Fixed a bug in ARecastNavMesh::BatchRaycast resulting in NaN hit locations CL 2253797 #UE4 More aggressively setting RF_Public and RF_Standalone flags on maps and ensuring world names match package names. This is necessary because umaps are currently being managed outside of the content browser and it is causing a few issues. Also, packages containing maps now synthesize asset data when the package contains absolutely no asset data (probably because the UWorld in it was not RF_Public at the time it was saved due to a previous bug). CL 2258142 #UE4 Added a GC during map load that reclaims memory allocated during load/init. This is needed to finish the load on low-memory devices in games that allocate more memory after load. CL 2247003 Added homing to ProjectileMovementComponent - Homing requires both a bool and a target component to be set, the strength is determined by a customizable variable - Both homing and gravity are now applied in the new virtual function "CalculateAcceleration" CL 2247249 Moved the homing modification to acceleration occur in a separate function specifically for homing CL 2257043 - Guard net dormancy calls against executing on clients, based on thread with DaveR and JohnP; This particular case was the result of an intentionally client-authoritative actor calling the dormancy functions via inheritance CL 2245629 #UE4 - fixed json TryGetNumber to round negatives appropriately CL 2255312 #UE4 Enabling World Assets by default. CL 2260956 Analytics ET now loads HTTP at StartupModule so the module will be available during ShutdownModule to flush events CL 2245571 GenericTeamAgentInterface can now retrieve attitude of an agent towards a given actor #UE4 - Made PerceptionSystem's sight sense take advantage of that CL 2246897 Fixed perception listeners not being removed from the PerceptionSystem on Owner's end play #UE4 - addresses TTP#343392 CL 2260634 added more debug data for NaN in crowd simulation CL 2248387 Added possibility to debug multiple EQS queries with GameplayDebugger. #ue4 Fixed network replication from bandwidth point of view for data in GameplayDebugger. #ue4 CL 2253281 Added additional information to the visual logger for UBTCompositeNode::DoDecoratorsAllowExecution - We now keep track of whether a decorator allows execution, in addition to the existing log for not allowing execution CL 2255310 #UE4 The world browser module now listens to WorldAdded/WorldDestroyed events instead of WorldInit/WorldCleanup events. Worlds can be initialized without being the editor world and this handles that case. CL 2258256 #UE4 Replacing the SOpenLevelDialog with a new generic SAssetDialog. This dialog will be used as a generic Open or Save As dialog for assets. [CL 2266822 by Billy Bramer in Main branch]
2014-08-21 20:30:51 -04:00
#include "GameplayDebuggingTypes.h"
#include "GameplayDebuggingReplicator.generated.h"
/**
* Transient actor used to communicate between server and client, mostly for RPC
*/
class UGameplayDebuggingComponent;
class AGameplayDebuggingHUDComponent;
DECLARE_MULTICAST_DELEGATE_OneParam(FOnSelectionChanged, class AActor*);
UCLASS(config = Engine, NotBlueprintable, Transient, hidecategories = Actor, notplaceable)
class GAMEPLAYDEBUGGER_API AGameplayDebuggingReplicator : public AActor
{
GENERATED_UCLASS_BODY()
UPROPERTY(config)
FString DebugComponentClassName;
UPROPERTY(config)
FString DebugComponentHUDClassName;
UPROPERTY(config)
FString DebugComponentControllerClassName;
UPROPERTY(config)
int32 MaxEQSQueries;
UPROPERTY(Replicated, Transient)
UGameplayDebuggingComponent* DebugComponent;
UPROPERTY(Replicated, Transient)
APlayerController* LocalPlayerOwner;
UPROPERTY(Replicated, Transient)
AActor* LastSelectedActorToDebug;
UPROPERTY(Replicated, Transient)
bool bIsGlobalInWorld;
UPROPERTY(ReplicatedUsing = OnRep_AutoActivate, Transient)
bool bAutoActivate;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool OverHead;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool Basic;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool BehaviorTree;
UPROPERTY(Transient, EditAnywhere, Category = "DataView|EQS")
bool EQS;
UPROPERTY(Transient, EditAnywhere, Category = "DataView|EQS", meta = (EditCondition = "EQS"))
bool EnableEQSOnHUD;
UPROPERTY(Transient, EditAnywhere, Category = "DataView|EQS", meta = (EditCondition = "EQS"))
int32 ActiveEQSIndex;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool Perception;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool GameView1;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool GameView2;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool GameView3;
UPROPERTY(Transient, EditAnywhere, Category = "DataView")
bool GameView4;
UPROPERTY(Transient, EditAnywhere, Category = DataView)
bool GameView5;
UPROPERTY()
class UTexture2D* DefaultTexture_Red;
UPROPERTY()
class UTexture2D* DefaultTexture_Green;
UFUNCTION(reliable, server, WithValidation)
void ServerReplicateMessage(class AActor* Actor, uint32 InMessage, uint32 DataView = 0);
UFUNCTION(reliable, client, WithValidation)
void ClientReplicateMessage(class AActor* Actor, uint32 InMessage, uint32 DataView = 0);
UFUNCTION(Reliable, Client)
void ClientAutoActivate();
UFUNCTION(Reliable, Client, WithValidation)
void ClientEnableTargetSelection(bool bEnable, APlayerController* Context);
#if WITH_EDITOR
void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif
UFUNCTION()
virtual void OnRep_AutoActivate();
virtual class UNetConnection* GetNetConnection() const override;
virtual bool IsNetRelevantFor(const AActor* RealViewer, const AActor* ViewTarget, const FVector& SrcLocation) const override;
virtual void PostNetInit() override;
virtual void PostInitializeComponents() override;
virtual void BeginPlay() override;
virtual void TickActor(float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction) override;
virtual void BeginDestroy() override;
UGameplayDebuggingComponent* GetDebugComponent();
bool IsToolCreated();
void CreateTool();
void EnableTool();
bool IsDrawEnabled();
void EnableDraw(bool bEnable);
void SetAsGlobalInWorld(bool IsGlobal) { bIsGlobalInWorld = IsGlobal; }
bool IsGlobalInWorld() { return bIsGlobalInWorld; }
void SetLocalPlayerOwner(APlayerController* PC) { LocalPlayerOwner = PC; }
APlayerController* GetLocalPlayerOwner() { return LocalPlayerOwner; }
FORCEINLINE AActor* GetSelectedActorToDebug() { return LastSelectedActorToDebug; }
UFUNCTION(reliable, server, WithValidation)
void ServerSetActorToDebug(AActor* InActor);
/**
* Iterates through the pawn list to find the next pawn of the specified type to debug
*/
void DebugNextPawn(UClass* CompareClass, APawn* CurrentPawn = nullptr);
/**
* Iterates through the pawn list to find the previous pawn of the specified type to debug
*/
void DebugPrevPawn(UClass* CompareClass, APawn* CurrentPawn = nullptr);
uint32 DebuggerShowFlags;
static FOnSelectionChanged OnSelectionChangedDelegate;
FOnCycleDetailsView OnCycleDetailsView;
protected:
void OnDebugAIDelegate(class UCanvas* Canvas, class APlayerController* PC);
void DrawDebugDataDelegate(class UCanvas* Canvas, class APlayerController* PC);
void DrawDebugData(class UCanvas* Canvas, class APlayerController* PC);
private:
uint32 bEnabledDraw : 1;
uint32 LastDrawAtFrame;
float PlayerControllersUpdateDelay;
TWeakObjectPtr<UClass> DebugComponentClass;
TWeakObjectPtr<UClass> DebugComponentHUDClass;
TWeakObjectPtr<UClass> DebugComponentControllerClass;
TWeakObjectPtr<AGameplayDebuggingHUDComponent> DebugRenderer;
};