From d7a57cd478ded092edf41c11a787689daa379605 Mon Sep 17 00:00:00 2001 From: Zhire Date: Sun, 1 Feb 2026 17:59:28 -0700 Subject: [PATCH] missing files --- Source/ThisWillWork.Target.cs | 15 +++++++++++ Source/ThisWillWork/AMyCustomActorFinder.cpp | 27 ++++++++++++++++++++ Source/ThisWillWork/AMyCustomActorFinder.h | 26 +++++++++++++++++++ Source/ThisWillWork/FindMyActorByName.cpp | 27 ++++++++++++++++++++ Source/ThisWillWork/FindMyActorByName.h | 26 +++++++++++++++++++ Source/ThisWillWork/MyActor.cpp | 27 ++++++++++++++++++++ Source/ThisWillWork/MyActor.h | 26 +++++++++++++++++++ Source/ThisWillWork/MyCustomActorFinder.cpp | 22 ++++++++++++++++ Source/ThisWillWork/MyCustomActorFinder.h | 16 ++++++++++++ Source/ThisWillWork/ThisWillWork.Build.cs | 23 +++++++++++++++++ Source/ThisWillWork/ThisWillWork.cpp | 6 +++++ Source/ThisWillWork/ThisWillWork.h | 6 +++++ Source/ThisWillWorkEditor.Target.cs | 15 +++++++++++ 13 files changed, 262 insertions(+) create mode 100644 Source/ThisWillWork.Target.cs create mode 100644 Source/ThisWillWork/AMyCustomActorFinder.cpp create mode 100644 Source/ThisWillWork/AMyCustomActorFinder.h create mode 100644 Source/ThisWillWork/FindMyActorByName.cpp create mode 100644 Source/ThisWillWork/FindMyActorByName.h create mode 100644 Source/ThisWillWork/MyActor.cpp create mode 100644 Source/ThisWillWork/MyActor.h create mode 100644 Source/ThisWillWork/MyCustomActorFinder.cpp create mode 100644 Source/ThisWillWork/MyCustomActorFinder.h create mode 100644 Source/ThisWillWork/ThisWillWork.Build.cs create mode 100644 Source/ThisWillWork/ThisWillWork.cpp create mode 100644 Source/ThisWillWork/ThisWillWork.h create mode 100644 Source/ThisWillWorkEditor.Target.cs diff --git a/Source/ThisWillWork.Target.cs b/Source/ThisWillWork.Target.cs new file mode 100644 index 00000000..b91a13cb --- /dev/null +++ b/Source/ThisWillWork.Target.cs @@ -0,0 +1,15 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class ThisWillWorkTarget : TargetRules +{ + public ThisWillWorkTarget(TargetInfo Target) : base(Target) + { + Type = TargetType.Game; + DefaultBuildSettings = BuildSettingsVersion.V6; + + ExtraModuleNames.AddRange( new string[] { "ThisWillWork" } ); + } +} diff --git a/Source/ThisWillWork/AMyCustomActorFinder.cpp b/Source/ThisWillWork/AMyCustomActorFinder.cpp new file mode 100644 index 00000000..b38ce483 --- /dev/null +++ b/Source/ThisWillWork/AMyCustomActorFinder.cpp @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "AMyCustomActorFinder.h" + +// Sets default values +AAMyCustomActorFinder::AAMyCustomActorFinder() +{ + // Set this actor 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 AAMyCustomActorFinder::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AAMyCustomActorFinder::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/ThisWillWork/AMyCustomActorFinder.h b/Source/ThisWillWork/AMyCustomActorFinder.h new file mode 100644 index 00000000..3f0c04a7 --- /dev/null +++ b/Source/ThisWillWork/AMyCustomActorFinder.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "AMyCustomActorFinder.generated.h" + +UCLASS() +class THISWILLWORK_API AAMyCustomActorFinder : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AAMyCustomActorFinder(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/Source/ThisWillWork/FindMyActorByName.cpp b/Source/ThisWillWork/FindMyActorByName.cpp new file mode 100644 index 00000000..754d9234 --- /dev/null +++ b/Source/ThisWillWork/FindMyActorByName.cpp @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "FindMyActorByName.h" + +// Sets default values +AFindMyActorByName::AFindMyActorByName() +{ + // Set this actor 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 AFindMyActorByName::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AFindMyActorByName::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/ThisWillWork/FindMyActorByName.h b/Source/ThisWillWork/FindMyActorByName.h new file mode 100644 index 00000000..5360857d --- /dev/null +++ b/Source/ThisWillWork/FindMyActorByName.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "FindMyActorByName.generated.h" + +UCLASS() +class THISWILLWORK_API AFindMyActorByName : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AFindMyActorByName(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/Source/ThisWillWork/MyActor.cpp b/Source/ThisWillWork/MyActor.cpp new file mode 100644 index 00000000..d4a22d8c --- /dev/null +++ b/Source/ThisWillWork/MyActor.cpp @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MyActor.h" + +// Sets default values +AMyActor::AMyActor() +{ + // Set this actor 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 AMyActor::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AMyActor::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/ThisWillWork/MyActor.h b/Source/ThisWillWork/MyActor.h new file mode 100644 index 00000000..9f5c5e14 --- /dev/null +++ b/Source/ThisWillWork/MyActor.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "MyActor.generated.h" + +UCLASS() +class THISWILLWORK_API AMyActor : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AMyActor(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/Source/ThisWillWork/MyCustomActorFinder.cpp b/Source/ThisWillWork/MyCustomActorFinder.cpp new file mode 100644 index 00000000..ef9d3bfb --- /dev/null +++ b/Source/ThisWillWork/MyCustomActorFinder.cpp @@ -0,0 +1,22 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MyCustomActorFinder.h" +#include "Engine/World.h" +#include "GameFramework/Actor.h" +#include "EngineUtils.h" + +AActor* MyCustomActorFinder::FindActorByName(const FString& ActorName) +{ + for (TActorIterator It(GetWorld()); It; ++It) + { + AActor* Actor = *It; + if (Actor->GetName() == ActorName) + { + return Actor; + } + } + return nullptr; +} + + diff --git a/Source/ThisWillWork/MyCustomActorFinder.h b/Source/ThisWillWork/MyCustomActorFinder.h new file mode 100644 index 00000000..d0ee8745 --- /dev/null +++ b/Source/ThisWillWork/MyCustomActorFinder.h @@ -0,0 +1,16 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "MyCustomActorFinder.generated.h" + +UCLASS() +class GAMEIDEAV5_5_API AMyCustomActorFinder : public AActor +{ + + GENERATED_BODY() +public: UFUNCTION(BlueprintCallable, Category = "Utilities") AActor* FindActorByName(const FString& ActorName); +}; + diff --git a/Source/ThisWillWork/ThisWillWork.Build.cs b/Source/ThisWillWork/ThisWillWork.Build.cs new file mode 100644 index 00000000..a00db8bc --- /dev/null +++ b/Source/ThisWillWork/ThisWillWork.Build.cs @@ -0,0 +1,23 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; + +public class ThisWillWork : ModuleRules +{ + public ThisWillWork(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/ThisWillWork/ThisWillWork.cpp b/Source/ThisWillWork/ThisWillWork.cpp new file mode 100644 index 00000000..1137c314 --- /dev/null +++ b/Source/ThisWillWork/ThisWillWork.cpp @@ -0,0 +1,6 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#include "ThisWillWork.h" +#include "Modules/ModuleManager.h" + +IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, ThisWillWork, "ThisWillWork" ); diff --git a/Source/ThisWillWork/ThisWillWork.h b/Source/ThisWillWork/ThisWillWork.h new file mode 100644 index 00000000..90aad9e7 --- /dev/null +++ b/Source/ThisWillWork/ThisWillWork.h @@ -0,0 +1,6 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" + diff --git a/Source/ThisWillWorkEditor.Target.cs b/Source/ThisWillWorkEditor.Target.cs new file mode 100644 index 00000000..12eac762 --- /dev/null +++ b/Source/ThisWillWorkEditor.Target.cs @@ -0,0 +1,15 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class ThisWillWorkEditorTarget : TargetRules +{ + public ThisWillWorkEditorTarget(TargetInfo Target) : base(Target) + { + Type = TargetType.Editor; + DefaultBuildSettings = BuildSettingsVersion.V6; + + ExtraModuleNames.AddRange( new string[] { "ThisWillWork" } ); + } +}