1 // Fill out your copyright notice in the Description page of Project Settings.
3 #include "BuildingEscape.h"
4 #include "PositionReport.h"
7 // Sets default values for this component's properties
8 UPositionReport::UPositionReport()
10 // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
11 // off to improve performance if you don't need them.
12 bWantsBeginPlay
= true;
13 PrimaryComponentTick
.bCanEverTick
= true;
17 // Called when the game starts
18 void UPositionReport::BeginPlay()
22 FString ObjectName
= GetOwner()->GetName();
23 FString ObjectPos
= GetOwner()->GetTransform().GetLocation().ToString();
24 UE_LOG(LogTemp
, Warning
, TEXT("%s is at %s!"), *ObjectName
, *ObjectPos
);
29 void UPositionReport::TickComponent( float DeltaTime
, ELevelTick TickType
, FActorComponentTickFunction
* ThisTickFunction
)
31 Super::TickComponent( DeltaTime
, TickType
, ThisTickFunction
);