feat: initial commit
This commit is contained in:
		
							
								
								
									
										26
									
								
								Source/UTAD_UI/UTAD_UIGameMode.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								Source/UTAD_UI/UTAD_UIGameMode.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| // Copyright Epic Games, Inc. All Rights Reserved. | ||||
|  | ||||
| #include "UTAD_UIGameMode.h" | ||||
| #include "UTAD_UIPlayerController.h" | ||||
| #include "UTAD_UICharacter.h" | ||||
| #include "UObject/ConstructorHelpers.h" | ||||
|  | ||||
| AUTAD_UIGameMode::AUTAD_UIGameMode() | ||||
| { | ||||
| 	// use our custom PlayerController class | ||||
| 	PlayerControllerClass = AUTAD_UIPlayerController::StaticClass(); | ||||
|  | ||||
| 	// set default pawn class to our Blueprinted character | ||||
| 	static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/TopDown/Blueprints/BP_TopDownCharacter")); | ||||
| 	if (PlayerPawnBPClass.Class != nullptr) | ||||
| 	{ | ||||
| 		DefaultPawnClass = PlayerPawnBPClass.Class; | ||||
| 	} | ||||
|  | ||||
| 	// set default controller to our Blueprinted controller | ||||
| 	static ConstructorHelpers::FClassFinder<APlayerController> PlayerControllerBPClass(TEXT("/Game/TopDown/Blueprints/BP_TopDownPlayerController")); | ||||
| 	if(PlayerControllerBPClass.Class != NULL) | ||||
| 	{ | ||||
| 		PlayerControllerClass = PlayerControllerBPClass.Class; | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user