f3fe2145 zhangyi

123

1 个父辈 b5ec042d
1
2
3 [/Script/EngineSettings.GameMapsSettings]
4 GameDefaultMap=/Engine/Maps/Templates/Template_Default.Template_Default
5
6
7 [/Script/HardwareTargeting.HardwareTargetingSettings]
8 TargetedHardwareClass=Desktop
9 AppliedTargetedHardwareClass=Desktop
10 DefaultGraphicsPerformance=Maximum
11 AppliedDefaultGraphicsPerformance=Maximum
12
13 [/Script/Engine.Engine]
14 +ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/UE4Demo")
15 +ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/UE4Demo")
16 +ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="UE4DemoGameModeBase")
17
1
2 [/Script/EngineSettings.GeneralProjectSettings]
3 ProjectID=48B91CB54127C34FDCE1BCBCAD61ADF6
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 using UnrealBuildTool;
4 using System.Collections.Generic;
5
6 public class UE4DemoTarget : TargetRules
7 {
8 public UE4DemoTarget( TargetInfo Target) : base(Target)
9 {
10 Type = TargetType.Game;
11 DefaultBuildSettings = BuildSettingsVersion.V2;
12 ExtraModuleNames.AddRange( new string[] { "UE4Demo" } );
13 }
14 }
1 // Fill out your copyright notice in the Description page of Project Settings.
2
3
4 #include "TypeWirter.h"
5
6 // Sets default values
7 ATypeWirter::ATypeWirter()
8 {
9 // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
10 PrimaryActorTick.bCanEverTick = true;
11
12 }
13
14 // Called when the game starts or when spawned
15 void ATypeWirter::BeginPlay()
16 {
17 Super::BeginPlay();
18
19 }
20
21 // Called every frame
22 void ATypeWirter::Tick(float DeltaTime)
23 {
24 Super::Tick(DeltaTime);
25
26 }
27 //UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UMG Game")
28 //
29 //TSubclassOf<UUserWidget> StartingWidgetClass;
30 //UPROPERTY()
31 //
32 //UUserWidget* CurrentWidget;
33 //void ATypeWirter::ChangeMenuWidget(TSubclassOf<UMyUserWidget> NewWidgetClass)
34 //{
35 // if (CurrentWidget != nullptr)
36 // {
37 // CurrentWidget->RemoveFromViewport();
38 // CurrentWidget = nullptr;
39 // }
40 // if (NewWidgetClass != nullptr)
41 // {
42 // CurrentWidget = CreateWidget<UMyUserWidget>(GetWorld(), NewWidgetClass);
43 // if (CurrentWidget != nullptr)
44 // {
45 // CurrentWidget->AddToViewport();
46 // }
47 // }
48 //}
1 // Fill out your copyright notice in the Description page of Project Settings.
2
3 #pragma once
4
5 #include "CoreMinimal.h"
6 #include "GameFramework/Actor.h"
7 #include "TypeWirter.generated.h"
8
9 UCLASS()
10 class UE4DEMO_API ATypeWirter : public AActor
11 {
12 GENERATED_BODY()
13
14 public:
15 // Sets default values for this actor's properties
16 ATypeWirter();
17
18 protected:
19 // Called when the game starts or when spawned
20 virtual void BeginPlay() override;
21
22
23 public:
24 // Called every frame
25 virtual void Tick(float DeltaTime) override;
26
27 };
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 using UnrealBuildTool;
4
5 public class UE4Demo : ModuleRules
6 {
7 public UE4Demo(ReadOnlyTargetRules Target) : base(Target)
8 {
9 PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
10
11 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
12
13 PrivateDependencyModuleNames.AddRange(new string[] { });
14
15 // Uncomment if you are using Slate UI
16 // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
17
18 // Uncomment if you are using online features
19 // PrivateDependencyModuleNames.Add("OnlineSubsystem");
20
21 // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
22 }
23 }
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 #include "UE4Demo.h"
4 #include "Modules/ModuleManager.h"
5
6 IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, UE4Demo, "UE4Demo" );
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 #pragma once
4
5 #include "CoreMinimal.h"
6
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3
4 #include "UE4DemoGameModeBase.h"
5
6 void AUE4DemoGameModeBase::BeginPlay()
7 {
8 Super::BeginPlay();
9 ChangeMenuWidget(StartingWidgetClass);
10 }
11
12 void AUE4DemoGameModeBase::ChangeMenuWidget(TSubclassOf<UUserWidget>NewWidgetClass)
13 {
14 if (CurrenWidget!=nullptr)
15 {
16 CurrenWidget->RemoveFromParent();
17 CurrenWidget = nullptr;
18 }
19 if (NewWidgetClass!=nullptr)
20 {
21 CurrenWidget = CreateWidget(GetWorld(), NewWidgetClass);
22 if (CurrenWidget!=nullptr)
23 {
24 CurrenWidget->AddToViewport();
25 }
26 }
27 }
...\ No newline at end of file ...\ No newline at end of file
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 #pragma once
4
5 #include "CoreMinimal.h"
6 #include "GameFramework/GameModeBase.h"
7 #include "Blueprint/UserWidget.h"
8 #include "UE4DemoGameModeBase.generated.h"
9
10 /**
11 *
12 */
13 UCLASS()
14 class UE4DEMO_API AUE4DemoGameModeBase : public AGameModeBase
15 {
16 GENERATED_BODY()
17 public:
18 UFUNCTION(BlueprintCallable,Category = "UMG Game")
19 void ChangeMenuWidget(TSubclassOf<UUserWidget>NewWidgetClass);
20 protected:
21 virtual void BeginPlay() override;
22 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UMG Game")
23 TSubclassOf<UUserWidget> StartingWidgetClass;
24 UPROPERTY()
25 UUserWidget* CurrenWidget;
26 };
1 // Copyright Epic Games, Inc. All Rights Reserved.
2
3 using UnrealBuildTool;
4 using System.Collections.Generic;
5
6 public class UE4DemoEditorTarget : TargetRules
7 {
8 public UE4DemoEditorTarget( TargetInfo Target) : base(Target)
9 {
10 Type = TargetType.Editor;
11 DefaultBuildSettings = BuildSettingsVersion.V2;
12 ExtraModuleNames.AddRange( new string[] { "UE4Demo" } );
13 }
14 }
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 # Visual Studio Version 16
4 VisualStudioVersion = 16.0.28315.86
5 MinimumVisualStudioVersion = 10.0.40219.1
6 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{94A6C6F3-99B3-346E-9557-ABF9D4064DBD}"
7 EndProject
8 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{8E2F6A87-1826-34F4-940C-CC23A48F9FE4}"
9 EndProject
10 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4Demo", "Intermediate\ProjectFiles\UE4Demo.vcxproj", "{FCF8C366-4711-4E90-A0D5-5914E512F5E7}"
11 EndProject
12 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{55828B7C-1C1E-4198-BB64-7952CE8B305F}"
13 EndProject
14 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}"
15 ProjectSection(SolutionItems) = preProject
16 ..\..\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis = ..\..\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis
17 EndProjectSection
18 EndProject
19 Global
20 GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 DebugGame Editor|Win32 = DebugGame Editor|Win32
22 DebugGame Editor|Win64 = DebugGame Editor|Win64
23 DebugGame|Win32 = DebugGame|Win32
24 DebugGame|Win64 = DebugGame|Win64
25 Development Editor|Win32 = Development Editor|Win32
26 Development Editor|Win64 = Development Editor|Win64
27 Development|Win32 = Development|Win32
28 Development|Win64 = Development|Win64
29 Shipping|Win32 = Shipping|Win32
30 Shipping|Win64 = Shipping|Win64
31 EndGlobalSection
32 # Visual Assist Section
33 GlobalSection(44630d46-96b5-488c-8df926e21db8c1a3) = preSolution
34 ueSolution=true
35 EndGlobalSection
36 GlobalSection(ProjectConfigurationPlatforms) = postSolution
37 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win32.ActiveCfg = Invalid|Win32
38 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
39 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
40 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win32.ActiveCfg = DebugGame|Win32
41 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win32.Build.0 = DebugGame|Win32
42 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win64.ActiveCfg = DebugGame|x64
43 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win64.Build.0 = DebugGame|x64
44 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win32.ActiveCfg = Invalid|Win32
45 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
46 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win64.Build.0 = Development_Editor|x64
47 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win32.ActiveCfg = Development|Win32
48 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win32.Build.0 = Development|Win32
49 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win64.ActiveCfg = Development|x64
50 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win64.Build.0 = Development|x64
51 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win32.ActiveCfg = Shipping|Win32
52 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win32.Build.0 = Shipping|Win32
53 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win64.ActiveCfg = Shipping|x64
54 {FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win64.Build.0 = Shipping|x64
55 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
56 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
57 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
58 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
59 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
60 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
61 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
62 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
63 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Shipping|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
64 {55828B7C-1C1E-4198-BB64-7952CE8B305F}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
65 EndGlobalSection
66 GlobalSection(SolutionProperties) = preSolution
67 HideSolutionNode = FALSE
68 EndGlobalSection
69 GlobalSection(NestedProjects) = preSolution
70 {55828B7C-1C1E-4198-BB64-7952CE8B305F} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD}
71 {FCF8C366-4711-4E90-A0D5-5914E512F5E7} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4}
72 EndGlobalSection
73 EndGlobal
1 {
2 "FileVersion": 3,
3 "EngineAssociation": "4.27",
4 "Category": "",
5 "Description": "",
6 "Modules": [
7 {
8 "Name": "UE4Demo",
9 "Type": "Runtime",
10 "LoadingPhase": "Default",
11 "AdditionalDependencies": [
12 "Engine"
13 ]
14 }
15 ]
16 }
...\ No newline at end of file ...\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!