Useful functions
Useful functions#
ULocalPlayer::GetPixelPoint()
ULocalPlayer::GetProjectionData(FViewport* Viewport, EStereoscopicPass StereoPass, FSceneViewProjectionData& ProjectionData) const;
GetWorldTimerManager().SetTimerForNextTick(this, &AUTGameMode::StartMatch);
UShooterGameViewportClient::ShowDialog()
Dodging:
bool UUTCharacterMovement::PerformDodge(FVector &DodgeDir, FVector &DodgeCross)
bool AUTCharacter::Dodge(FVector DodgeDir, FVector DodgeCross)
Fapp::UseVRFocus
Set Maximum Delta Time between frames; helpful for debugging by t.OverrideFPS or UGameEngine::MaxDeltaTime
- MaxDeltaTime is unusable in network games (look at UpdateTimeAndHandleMaxTickRate)
FixupDeltaSeconds(DeltaSeconds, RealDeltaSeconds);
APawn::MoveIgnoreActorAdd()
* Handles game-specific networking management (cheat detection, bandwidth management, etc.).
AGameNetworkManager
For both Actors & Components
virtual void CheckForErrors();
virtual void CheckForDeprecated();
SGenericDialogWidget::OpenDialog()
AActor::DisplayDebug(
Unreal Tournament Good References:
-
UUTAnnouncer class for announcer
-
UUTProfileSettings
DisplayInternals()
ProfilingDebugging
ABTesting.H
ExternalProfiler
Histogram.h
MallocProfiler
for( TArray<ULevel*>::TConstIterator it = GetWorld()->GetLevels().CreateConstIterator(); it; ++it )
{
ULevel* CurLevel = *it;
if( CurLevel && CurLevel->bIsVisible )
{
ALevelScriptActor* LSA = CurLevel->GetLevelScriptActor();
Changing Component Ownership:#
-
void RegisterTImelineWithActor(UTimelineComponent* Timeline, AActor* Actor)
-
{
-
// Might want to save this if it's not the TransientPackage / World.
-
UObject* OriginalOwner = Timeline->GetOuter();
-
FString OriginalName = Timeline->GetName();
-
// We can leave the name alone.
-
Timeline->Rename( *OriginalName, Actor );
-
Actor->AddInstancedComponent(Timeline);
-
Timeline->RegisterAllTickFunctions(true);
-
// At this point, you can perform any other setup / re-initialization needed on the
-
// timeline. Also, GetOwner in the Timeline should now return the passed in
-
// Actor.
-
}
-
void UnregisterTimelineComponent(UTimelineComponent* Timeline)
-
{
-
AActor* Actor = Timeline->GetOwner();
-
// This will unregister tick functions.
-
Timeline->Rename(*OriginalName, OriginalOuter);
-
}