From 707ede024961a0d636f4178f310fb627e9f131d0 Mon Sep 17 00:00:00 2001 From: charnet3d Date: Fri, 20 May 2022 03:42:36 +0000 Subject: [PATCH] Project Setup - Course 2.11 --- .idea/.idea.Shooter/.idea/encodings.xml | 4 ++ .idea/.idea.Shooter/.idea/indexLayout.xml | 8 +++ .../.idea/projectSettingsUpdater.xml | 6 +++ .idea/.idea.Shooter/.idea/workspace.xml | 37 +++++++++++++ Config/DefaultEditor.ini | 0 Config/DefaultEngine.ini | 44 +++++++++++++++ Config/DefaultGame.ini | 3 ++ Config/HoloLens/HoloLensEngine.ini | 31 +++++++++++ .../_Game/Character/ShooterCharacterBP.uasset | 3 ++ .../GameMode/ShooterGameModeBaseBP.uasset | 3 ++ Content/_Game/Maps/DefaultMap.umap | 3 ++ Shooter.uproject | 34 ++++++++++++ Source/Shooter.Target.cs | 14 +++++ Source/Shooter/Shooter.Build.cs | 23 ++++++++ Source/Shooter/Shooter.cpp | 6 +++ Source/Shooter/Shooter.h | 6 +++ Source/Shooter/ShooterCharacter.cpp | 53 +++++++++++++++++++ Source/Shooter/ShooterCharacter.h | 29 ++++++++++ Source/Shooter/ShooterGameModeBase.cpp | 5 ++ Source/Shooter/ShooterGameModeBase.h | 17 ++++++ Source/ShooterEditor.Target.cs | 14 +++++ 21 files changed, 343 insertions(+) create mode 100644 .idea/.idea.Shooter/.idea/encodings.xml create mode 100644 .idea/.idea.Shooter/.idea/indexLayout.xml create mode 100644 .idea/.idea.Shooter/.idea/projectSettingsUpdater.xml create mode 100644 .idea/.idea.Shooter/.idea/workspace.xml create mode 100644 Config/DefaultEditor.ini create mode 100644 Config/DefaultEngine.ini create mode 100644 Config/DefaultGame.ini create mode 100644 Config/HoloLens/HoloLensEngine.ini create mode 100644 Content/_Game/Character/ShooterCharacterBP.uasset create mode 100644 Content/_Game/GameMode/ShooterGameModeBaseBP.uasset create mode 100644 Content/_Game/Maps/DefaultMap.umap create mode 100644 Shooter.uproject create mode 100644 Source/Shooter.Target.cs create mode 100644 Source/Shooter/Shooter.Build.cs create mode 100644 Source/Shooter/Shooter.cpp create mode 100644 Source/Shooter/Shooter.h create mode 100644 Source/Shooter/ShooterCharacter.cpp create mode 100644 Source/Shooter/ShooterCharacter.h create mode 100644 Source/Shooter/ShooterGameModeBase.cpp create mode 100644 Source/Shooter/ShooterGameModeBase.h create mode 100644 Source/ShooterEditor.Target.cs diff --git a/.idea/.idea.Shooter/.idea/encodings.xml b/.idea/.idea.Shooter/.idea/encodings.xml new file mode 100644 index 00000000..df87cf95 --- /dev/null +++ b/.idea/.idea.Shooter/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.Shooter/.idea/indexLayout.xml b/.idea/.idea.Shooter/.idea/indexLayout.xml new file mode 100644 index 00000000..7b08163c --- /dev/null +++ b/.idea/.idea.Shooter/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Shooter/.idea/projectSettingsUpdater.xml b/.idea/.idea.Shooter/.idea/projectSettingsUpdater.xml new file mode 100644 index 00000000..4bb9f4d2 --- /dev/null +++ b/.idea/.idea.Shooter/.idea/projectSettingsUpdater.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.Shooter/.idea/workspace.xml b/.idea/.idea.Shooter/.idea/workspace.xml new file mode 100644 index 00000000..b8eeb5bd --- /dev/null +++ b/.idea/.idea.Shooter/.idea/workspace.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + 1652897910248 + + + + + + + \ No newline at end of file diff --git a/Config/DefaultEditor.ini b/Config/DefaultEditor.ini new file mode 100644 index 00000000..e69de29b diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini new file mode 100644 index 00000000..d8fac64d --- /dev/null +++ b/Config/DefaultEngine.ini @@ -0,0 +1,44 @@ + + +[/Script/EngineSettings.GameMapsSettings] +GameDefaultMap=/Game/_Game/Maps/DefaultMap.DefaultMap +EditorStartupMap=/Game/_Game/Maps/DefaultMap.DefaultMap +GlobalDefaultGameMode=/Game/_Game/GameMode/ShooterGameModeBaseBP.ShooterGameModeBaseBP_C + +[/Script/HardwareTargeting.HardwareTargetingSettings] +TargetedHardwareClass=Desktop +AppliedTargetedHardwareClass=Desktop +DefaultGraphicsPerformance=Maximum +AppliedDefaultGraphicsPerformance=Maximum + +[/Script/WindowsTargetPlatform.WindowsTargetSettings] +DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 + +[/Script/Engine.RendererSettings] +r.GenerateMeshDistanceFields=True +r.DynamicGlobalIlluminationMethod=1 +r.ReflectionMethod=1 +r.Shadow.Virtual.Enable=1 + +[/Script/WorldPartitionEditor.WorldPartitionEditorSettings] +CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet' + +[/Script/Engine.Engine] ++ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/Shooter") ++ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/Shooter") ++ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="ShooterGameModeBase") + +[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] +bEnablePlugin=True +bAllowNetworkConnection=True +SecurityToken=7D70D8A14F14501AD3F149B2CD8AA088 +bIncludeInShipping=False +bAllowExternalStartInShipping=False +bCompileAFSProject=False +bUseCompression=False +bLogFiles=False +bReportStats=False +ConnectionType=USBOnly +bUseManualIPAddress=False +ManualIPAddress= + diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini new file mode 100644 index 00000000..cc7b41ba --- /dev/null +++ b/Config/DefaultGame.ini @@ -0,0 +1,3 @@ + +[/Script/EngineSettings.GeneralProjectSettings] +ProjectID=B1B3FFF2499F3381ECD967B8ECBB1860 diff --git a/Config/HoloLens/HoloLensEngine.ini b/Config/HoloLens/HoloLensEngine.ini new file mode 100644 index 00000000..7b8b53f9 --- /dev/null +++ b/Config/HoloLens/HoloLensEngine.ini @@ -0,0 +1,31 @@ + + +[/Script/HoloLensPlatformEditor.HoloLensTargetSettings] +bBuildForEmulation=False +bBuildForDevice=True +bUseNameForLogo=True +bBuildForRetailWindowsStore=False +bAutoIncrementVersion=False +bShouldCreateAppInstaller=False +AppInstallerInstallationURL= +HoursBetweenUpdateChecks=0 +bEnablePIXProfiling=False +TileBackgroundColor=(B=64,G=0,R=0,A=255) +SplashScreenBackgroundColor=(B=64,G=0,R=0,A=255) ++PerCultureResources=(CultureId="",Strings=(PackageDisplayName="",PublisherDisplayName="",PackageDescription="",ApplicationDisplayName="",ApplicationDescription=""),Images=()) +TargetDeviceFamily=Windows.Holographic +MinimumPlatformVersion= +MaximumPlatformVersionTested=10.0.18362.0 +MaxTrianglesPerCubicMeter=500.000000 +SpatialMeshingVolumeSize=20.000000 +CompilerVersion=Default +Windows10SDKVersion=10.0.18362.0 ++CapabilityList=internetClientServer ++CapabilityList=privateNetworkClientServer ++Uap2CapabilityList=spatialPerception +bSetDefaultCapabilities=False +SpatializationPlugin= +ReverbPlugin= +OcclusionPlugin= +SoundCueCookQualityIndex=-1 + diff --git a/Content/_Game/Character/ShooterCharacterBP.uasset b/Content/_Game/Character/ShooterCharacterBP.uasset new file mode 100644 index 00000000..94d91b3e --- /dev/null +++ b/Content/_Game/Character/ShooterCharacterBP.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:626d2ec12706143dce982be2ef978ced8c5607e7a1f6ffc0577ea2715f7957ef +size 23025 diff --git a/Content/_Game/GameMode/ShooterGameModeBaseBP.uasset b/Content/_Game/GameMode/ShooterGameModeBaseBP.uasset new file mode 100644 index 00000000..f426a46c --- /dev/null +++ b/Content/_Game/GameMode/ShooterGameModeBaseBP.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f73190e586ddcbc5f8fd464624dfdfd5cff813628c85844d873f7cf1cccfdcf +size 19612 diff --git a/Content/_Game/Maps/DefaultMap.umap b/Content/_Game/Maps/DefaultMap.umap new file mode 100644 index 00000000..1f9cc65e --- /dev/null +++ b/Content/_Game/Maps/DefaultMap.umap @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f3866a8fc91ef1ab553642567e4189d18231207dafcfb1b81a191719696cc86 +size 32301 diff --git a/Shooter.uproject b/Shooter.uproject new file mode 100644 index 00000000..71bab439 --- /dev/null +++ b/Shooter.uproject @@ -0,0 +1,34 @@ +{ + "FileVersion": 3, + "EngineAssociation": "5.0", + "Category": "", + "Description": "", + "Modules": [ + { + "Name": "Shooter", + "Type": "Runtime", + "LoadingPhase": "Default", + "AdditionalDependencies": [ + "Engine" + ] + } + ], + "Plugins": [ + { + "Name": "ModelingToolsEditorMode", + "Enabled": true, + "TargetAllowList": [ + "Editor" + ] + }, + { + "Name": "Bridge", + "Enabled": true, + "SupportedTargetPlatforms": [ + "Win64", + "Mac", + "Linux" + ] + } + ] +} \ No newline at end of file diff --git a/Source/Shooter.Target.cs b/Source/Shooter.Target.cs new file mode 100644 index 00000000..33d287d2 --- /dev/null +++ b/Source/Shooter.Target.cs @@ -0,0 +1,14 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class ShooterTarget : TargetRules +{ + public ShooterTarget( TargetInfo Target) : base(Target) + { + Type = TargetType.Game; + DefaultBuildSettings = BuildSettingsVersion.V2; + ExtraModuleNames.AddRange( new string[] { "Shooter" } ); + } +} diff --git a/Source/Shooter/Shooter.Build.cs b/Source/Shooter/Shooter.Build.cs new file mode 100644 index 00000000..aa17ac7f --- /dev/null +++ b/Source/Shooter/Shooter.Build.cs @@ -0,0 +1,23 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; + +public class Shooter : ModuleRules +{ + public Shooter(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; + + PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); + + PrivateDependencyModuleNames.AddRange(new string[] { }); + + // Uncomment if you are using Slate UI + // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); + + // Uncomment if you are using online features + // PrivateDependencyModuleNames.Add("OnlineSubsystem"); + + // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true + } +} diff --git a/Source/Shooter/Shooter.cpp b/Source/Shooter/Shooter.cpp new file mode 100644 index 00000000..4ce1d7bd --- /dev/null +++ b/Source/Shooter/Shooter.cpp @@ -0,0 +1,6 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#include "Shooter.h" +#include "Modules/ModuleManager.h" + +IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Shooter, "Shooter" ); diff --git a/Source/Shooter/Shooter.h b/Source/Shooter/Shooter.h new file mode 100644 index 00000000..677c8e25 --- /dev/null +++ b/Source/Shooter/Shooter.h @@ -0,0 +1,6 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" + diff --git a/Source/Shooter/ShooterCharacter.cpp b/Source/Shooter/ShooterCharacter.cpp new file mode 100644 index 00000000..b64df989 --- /dev/null +++ b/Source/Shooter/ShooterCharacter.cpp @@ -0,0 +1,53 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "ShooterCharacter.h" + +// Sets default values +AShooterCharacter::AShooterCharacter() +{ + // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void AShooterCharacter::BeginPlay() +{ + Super::BeginPlay(); + + UE_LOG(LogTemp, Warning, TEXT("BeginPlay()")); + + int myInt{ 42 }; + UE_LOG(LogTemp, Warning, TEXT("int myInt: %d"), myInt); + + float myFloat{ 3.14159f }; + UE_LOG(LogTemp, Warning, TEXT("float myFloat: %f"), myFloat); + + double myDouble{ 0.000080845 }; + UE_LOG(LogTemp, Warning, TEXT("double myDouble: %.10lf"), myDouble); + + char myChar{ 'c' }; + UE_LOG(LogTemp, Warning, TEXT("char myChar: %c"), myChar); + + wchar_t myWideChar{ L'J' }; + UE_LOG(LogTemp, Warning, TEXT("wchar_t myWideChar: %lc"), myWideChar); + + bool myBool{ true }; + UE_LOG(LogTemp, Warning, TEXT("bool myBool: %d"), myBool); +} + +// Called every frame +void AShooterCharacter::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + +// Called to bind functionality to input +void AShooterCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) +{ + Super::SetupPlayerInputComponent(PlayerInputComponent); + +} + diff --git a/Source/Shooter/ShooterCharacter.h b/Source/Shooter/ShooterCharacter.h new file mode 100644 index 00000000..d8d73105 --- /dev/null +++ b/Source/Shooter/ShooterCharacter.h @@ -0,0 +1,29 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Character.h" +#include "ShooterCharacter.generated.h" + +UCLASS() +class SHOOTER_API AShooterCharacter : public ACharacter +{ + GENERATED_BODY() + +public: + // Sets default values for this character's properties + AShooterCharacter(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + + // Called to bind functionality to input + virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; + +}; diff --git a/Source/Shooter/ShooterGameModeBase.cpp b/Source/Shooter/ShooterGameModeBase.cpp new file mode 100644 index 00000000..16fc148f --- /dev/null +++ b/Source/Shooter/ShooterGameModeBase.cpp @@ -0,0 +1,5 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + + +#include "ShooterGameModeBase.h" + diff --git a/Source/Shooter/ShooterGameModeBase.h b/Source/Shooter/ShooterGameModeBase.h new file mode 100644 index 00000000..65122f6a --- /dev/null +++ b/Source/Shooter/ShooterGameModeBase.h @@ -0,0 +1,17 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/GameModeBase.h" +#include "ShooterGameModeBase.generated.h" + +/** + * + */ +UCLASS() +class SHOOTER_API AShooterGameModeBase : public AGameModeBase +{ + GENERATED_BODY() + +}; diff --git a/Source/ShooterEditor.Target.cs b/Source/ShooterEditor.Target.cs new file mode 100644 index 00000000..465a008d --- /dev/null +++ b/Source/ShooterEditor.Target.cs @@ -0,0 +1,14 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class ShooterEditorTarget : TargetRules +{ + public ShooterEditorTarget( TargetInfo Target) : base(Target) + { + Type = TargetType.Editor; + DefaultBuildSettings = BuildSettingsVersion.V2; + ExtraModuleNames.AddRange( new string[] { "Shooter" } ); + } +}