f3fe2145 zhangyi

123

1 个父辈 b5ec042d
[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Engine/Maps/Templates/Template_Default.Template_Default
[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
AppliedTargetedHardwareClass=Desktop
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum
[/Script/Engine.Engine]
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/UE4Demo")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/UE4Demo")
+ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="UE4DemoGameModeBase")
[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=48B91CB54127C34FDCE1BCBCAD61ADF6
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class UE4DemoTarget : TargetRules
{
public UE4DemoTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "UE4Demo" } );
}
}
// Fill out your copyright notice in the Description page of Project Settings.
#include "TypeWirter.h"
// Sets default values
ATypeWirter::ATypeWirter()
{
// 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 ATypeWirter::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ATypeWirter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
//UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UMG Game")
//
//TSubclassOf<UUserWidget> StartingWidgetClass;
//UPROPERTY()
//
//UUserWidget* CurrentWidget;
//void ATypeWirter::ChangeMenuWidget(TSubclassOf<UMyUserWidget> NewWidgetClass)
//{
// if (CurrentWidget != nullptr)
// {
// CurrentWidget->RemoveFromViewport();
// CurrentWidget = nullptr;
// }
// if (NewWidgetClass != nullptr)
// {
// CurrentWidget = CreateWidget<UMyUserWidget>(GetWorld(), NewWidgetClass);
// if (CurrentWidget != nullptr)
// {
// CurrentWidget->AddToViewport();
// }
// }
//}
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "TypeWirter.generated.h"
UCLASS()
class UE4DEMO_API ATypeWirter : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ATypeWirter();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class UE4Demo : ModuleRules
{
public UE4Demo(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
}
}
// Copyright Epic Games, Inc. All Rights Reserved.
#include "UE4Demo.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, UE4Demo, "UE4Demo" );
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
// Copyright Epic Games, Inc. All Rights Reserved.
#include "UE4DemoGameModeBase.h"
void AUE4DemoGameModeBase::BeginPlay()
{
Super::BeginPlay();
ChangeMenuWidget(StartingWidgetClass);
}
void AUE4DemoGameModeBase::ChangeMenuWidget(TSubclassOf<UUserWidget>NewWidgetClass)
{
if (CurrenWidget!=nullptr)
{
CurrenWidget->RemoveFromParent();
CurrenWidget = nullptr;
}
if (NewWidgetClass!=nullptr)
{
CurrenWidget = CreateWidget(GetWorld(), NewWidgetClass);
if (CurrenWidget!=nullptr)
{
CurrenWidget->AddToViewport();
}
}
}
\ No newline at end of file
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "Blueprint/UserWidget.h"
#include "UE4DemoGameModeBase.generated.h"
/**
*
*/
UCLASS()
class UE4DEMO_API AUE4DemoGameModeBase : public AGameModeBase
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable,Category = "UMG Game")
void ChangeMenuWidget(TSubclassOf<UUserWidget>NewWidgetClass);
protected:
virtual void BeginPlay() override;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UMG Game")
TSubclassOf<UUserWidget> StartingWidgetClass;
UPROPERTY()
UUserWidget* CurrenWidget;
};
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class UE4DemoEditorTarget : TargetRules
{
public UE4DemoEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "UE4Demo" } );
}
}

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28315.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{94A6C6F3-99B3-346E-9557-ABF9D4064DBD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{8E2F6A87-1826-34F4-940C-CC23A48F9FE4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4Demo", "Intermediate\ProjectFiles\UE4Demo.vcxproj", "{FCF8C366-4711-4E90-A0D5-5914E512F5E7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{55828B7C-1C1E-4198-BB64-7952CE8B305F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{1CCEC849-CC72-4C59-8C36-2F7C38706D4C}"
ProjectSection(SolutionItems) = preProject
..\..\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis = ..\..\UE_4.27\Engine\Extras\VisualStudioDebugging\UE4.natvis
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugGame Editor|Win32 = DebugGame Editor|Win32
DebugGame Editor|Win64 = DebugGame Editor|Win64
DebugGame|Win32 = DebugGame|Win32
DebugGame|Win64 = DebugGame|Win64
Development Editor|Win32 = Development Editor|Win32
Development Editor|Win64 = Development Editor|Win64
Development|Win32 = Development|Win32
Development|Win64 = Development|Win64
Shipping|Win32 = Shipping|Win32
Shipping|Win64 = Shipping|Win64
EndGlobalSection
# Visual Assist Section
GlobalSection(44630d46-96b5-488c-8df926e21db8c1a3) = preSolution
ueSolution=true
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win32.ActiveCfg = Invalid|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win64.ActiveCfg = DebugGame_Editor|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame Editor|Win64.Build.0 = DebugGame_Editor|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win32.ActiveCfg = DebugGame|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win32.Build.0 = DebugGame|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win64.ActiveCfg = DebugGame|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.DebugGame|Win64.Build.0 = DebugGame|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win32.ActiveCfg = Invalid|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win64.ActiveCfg = Development_Editor|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development Editor|Win64.Build.0 = Development_Editor|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win32.ActiveCfg = Development|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win32.Build.0 = Development|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win64.ActiveCfg = Development|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Development|Win64.Build.0 = Development|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win32.ActiveCfg = Shipping|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win32.Build.0 = Shipping|Win32
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win64.ActiveCfg = Shipping|x64
{FCF8C366-4711-4E90-A0D5-5914E512F5E7}.Shipping|Win64.Build.0 = Shipping|x64
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.DebugGame|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development Editor|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development Editor|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Development|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Shipping|Win32.ActiveCfg = BuiltWithUnrealBuildTool|Win32
{55828B7C-1C1E-4198-BB64-7952CE8B305F}.Shipping|Win64.ActiveCfg = BuiltWithUnrealBuildTool|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{55828B7C-1C1E-4198-BB64-7952CE8B305F} = {94A6C6F3-99B3-346E-9557-ABF9D4064DBD}
{FCF8C366-4711-4E90-A0D5-5914E512F5E7} = {8E2F6A87-1826-34F4-940C-CC23A48F9FE4}
EndGlobalSection
EndGlobal
{
"FileVersion": 3,
"EngineAssociation": "4.27",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "UE4Demo",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine"
]
}
]
}
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!