// Fill out your copyright notice in the Description page of Project Settings.
#include "ShooterAIController.h"
#include "Kismet\GameplayStatics.h"
void AShooterAIController::BeginPlay()
{
Super::BeginPlay();
APawn* PlayerPawn= UGameplayStatics::GetPlayerPawn(GetWorld(),0);
SetFocus(PlayerPawn);
MoveToActor(PlayerPawn,200);
}
/ *特定の優先度にフォーカスアクターを設定し、結果としてFocalPointを設定します。 * /
/* Set Focus actor for given priority, will set FocalPoint as a result. */
virtual void SetFocus(AActor* NewFocus, EAIFocusPriority::Type InPriority = EAIFocusPriority::Gameplay);
protected:
/** Overridable native event for when play begins for this actor. */
virtual void BeginPlay();
をコピーして
ShooterAIController.hにペーストしてオーバーライドします
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AIController.h"
#include "ShooterAIController.generated.h"
/**
*
*/
UCLASS()
class SIMPLESHOOTERCP2_API AShooterAIController : public AAIController
{
GENERATED_BODY()
protected:
virtual void BeginPlay() override;
};
// Fill out your copyright notice in the Description page of Project Settings.
#include "ShooterAIController.h"
#include "Kismet\GameplayStatics.h"
void AShooterAIController::BeginPlay()
{
Super::BeginPlay();
APawn* PlayerPawn= UGameplayStatics::GetPlayerPawn(GetWorld(),0);
SetFocus(PlayerPawn);
}
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
namespace UnrealBuildTool.Rules
{
public class PythonScriptPluginPreload : ModuleRules
{
public PythonScriptPluginPreload(ReadOnlyTargetRules Target) : base(Target)
{
PublicDependencyModuleNames.AddRange(
new string[] {
"Core",
}
);
if (Target.bBuildEditor)
{
PrivateIncludePathModuleNames.AddRange(
new string[] {
"Python3",
}
);
}
else
{
PrivateDefinitions.Add("WITH_PYTHON=0");
}
}
}
}