Copyright 2022 Silvan Teufel / Teufel-Engineering.com All Rights Reserved.
Gameplay Preview: https://www.youtube.com/watch?v=ESS5PYtr9mU
For Questions you can write to info@teufel-engineering.com
If you find any Issues or Bugs i appreciate your Mail.
I will fix any Bugs as soon as i can and update the Product.
If you have downloaded the plugin it can be found in your Unreal Engine folder:
C:\Program Files\Epic Games\UE_5.0\Engine\Plugins\RTSUnitTemplate (for example).
or
C:\Program Files\Epic Games\UE_5.0\Engine\Plugins\Marketplace\RTSUnitTemplate
If you can find this folder in your enginge plugins folder the download was successful.
If the plugin is in another folder, you should copy it here.
Open Unreal Editor. Click Edit -> Plugins to open the plugin window.
Search for RTSUnitTemplate and put a check mark at it.
RTSUnitTemplate/Document/Description_Backup_2022-11-14_102425_RTSUnitTemplate.ini
RTSUnitTemplate/Document/Gameplay_Debugger_Backup_2022-11-14_102535_RTSUnitTemplate.ini
RTSUnitTemplate/Document/Input_Backup_2022-11-14_102458_RTSUnitTemplate.ini (Deprecated, use Enhanced Keyboard Settings)
RTSUnitTemplate/Document/Maps_&_Modes_Backup_2022-11-14_102333_RTSUnitTemplate.ini
You can download these files also from github (https://github.com/SilvanTeufel/Unreal_Plugin_Configs) by clicking on top left Code->Download Zip
Open Unreal Editor. Go to Edit -> Project Settings -> Search for the Specific Input Section: Gameplay Debugger, Input, Maps & Modes, Settings (For Description)
and import the .ini file
You can also find the .ini files in the Plugin Folder "All\Engine\Plugins\RTSUnitTemplate\Document\Input
For using Enhanced Keyboard Settings the Plugin (Enhanced Input) has to be activated as well (from Unreal Engine).
You can Change Inputs at: All\Engine\Plugins\TopDownRTSCamLib\Content\Blueprints\Controls
For GameplayTags you have to set AssetMangerClass in ProjectSettings (Restart Project after change):
Go to ProjectSettings->Input and set EnhancedIputComponentBase:
YOu can set MappingContext and ControlAsset in the BP_CameraBase:
Go to the Details Panel in the Character-BP and set the AI-Controller if Character is not moving. In the Examples the Controller should be set.
Open Unreal Editor. Open folder (In Unreal Editor folder tab):
All\Engine\Plugins\RTSUnitTemplate\Content\RTSUnitTemplate\Level\levelOne
Your can find example Blueprints in the Unreal Editor as well:
All\Engine\Plugins\RTSUnitTemplate\Content\RTSUnitTemplate\Blueprints
This Blueprints use the Parent Classes from RTSUnitTemplate Plugin, which you can use for your Blueprints. If you duplicate a Character make sure to reset the AttributeSet in the Details Panel of the Character/Unit BP. Otherwise Game will crash with this Character.
If RTSUnitTemplate is installed the Classes can be used as Parent Class in Blueprint, so all functions from this Class are available.
Just use one of the following Classes as Parent Class and or just choose them in your GameMode Blueprint. Category = RTSUnitTemplate.
Parentclasses are:
Actors:
Animations:
Characters:
Controller:
Hud:
Widgets:
Here is a List of the Classes and there Functions:
(All Variables and Functions are accessible via Blueprint - BlueprintReadWrite or EditAnywhere (so editable in Details Panel) or Both.)
BP_UnitBase Setup
BP_UnitBaseController
Character Animation Statemachine
HUD/Actor Setup
Widget Setup
Miscellaneous->DataTable
DTUnitAnimData:
The Table is chosen in the in Animation Blueprint:
I have created example Blendspaces:
And in the State General I use the Blendspace for all other States:
The StateMachine:
The Custom State can just be a Animation Output:
UnitStates (The Statemachine is in UnitControllerBase) | Note |
---|---|
Idle UMETA(DisplayName = "Idle") | CharAnimState = Idle |
Run UMETA(DisplayName = "Run"), | CharAnimState = Run |
Patrol UMETA(DisplayName = "Patrol"), | CharAnimState = Patrol |
Jump UMETA(DisplayName = "Jump"), | CharAnimState = Jump |
Attack UMETA(DisplayName = "Attack"), | CharAnimState = Attack |
Pause UMETA(DisplayName = "Pause"), | CharAnimState = Pause |
Chase UMETA(DisplayName = "Chase"), | CharAnimState = Chase |
IsAttacked UMETA(DisplayName = "IsAttacked") , | CharAnimState = IsAttacked |
Dead UMETA(DisplayName = "Dead"), | CharAnimState = Dead |
None UMETA(DisplayName = "None"), | Should not happen |
Properties (EditAnyWhere + BlueprintReadWrite) | Note |
---|---|
bool IsFriendly = true; | Set false for Enemys |
float Range = 300.f; | Choose Attack Range |
float StopChaseAtDistance = 100.f; | Switches from Chase to Attack if Distance is reached |
float MaxRunSpeed = 400.f; | Unit Max Run Speed |
float IsAttackedSpeed = 200.f; | Slow Down when EnemyUnit is Attacked |
float RunSpeedScale = 4.f; | Choose to Scale the Speed in "Run" 4 is standard |
float StopRunTolerance = 100.f; | Stops when Position is only 100.f away |
float StopRunToleranceY = 400.f; | Stops if Y-Position is only 400.f away |
float AttackDamage = 40.0f; | The Damage that the Unit Makes when attacking |
class AWaypoint* NextWaypoint; | The Start Waypoint when Unit is in "Patrol" |
TEnumAsByteUnitData::EState UnitState = UnitData::Idle; | Choose the Start UnitState. For Enemys it should be Patrol |
TEnumAsByteUnitData::EState UnitStatePlaceholder = UnitData::Patrol; | This is used to Switch the UnitState back from other States |
class UWidgetComponent* HealthWidgetComp; | Used for Healthbar Implementation. |
float MaxHealth = 120; | MaxHealth of the Character. Use it to change MaxHealth |
FVector HealthWidgetCompLocation = FVector (0.f, 0.f, 180.f); | Location of the Healthbar realtive to the Character |
TSubclassOf |
Choose a ProjectileBaseClass if you want to use a Projectile |
bool UseProjectile = false; | Set to true if you want to use a Projectile |
FVector ProjectileSpawnOffset = FVector(0.f,0.f,0.f); | Offset Realtive to the Unit for the Spawn of the Projectile |
float ProjectileScaleActorDirectionOffset = 50.f; | Offset in Actor Direction (to Spawn infront of Weapon) |
float ProjectileSpeed = 50.f; | Chosse the Speed of the Projectile |
FVector ProjectileScale = FVector(1.f,1.f,1.f); | Choose the Size of the Projectile |
bool DestroyAfterDeath = true; | True if Units should despawn after Death. |
Properties (BlueprintReadWrite) | Note |
---|---|
float UnitControlTimer = 0.0f; | Used in UnitControllerBase Statemachine |
bool ToggleUnitDetection = false; | Is Used in ControllerBase to toggle unit to Attack |
AUnitBase* UnitToChase; | Is set to the Unit which should be attacked |
TArray <AUnitBase*> UnitsToChase; | Array of all available Units |
float Health; | Current Health of the Unit |
TArray |
Used for MoveThroughWaypoints in the HUD |
int32 RunLocationArrayIterator; | Used for the Iteration of the Array |
FVector RunLocation; | Is the Location where the Unit should Run. Used in "Run" |
class ASelectedIcon* SelectedIcon; | The Icon is Hidden when Character is not selected |
class AProjectile* Projectile; | The Current Projectile |
Functions (BlueprintCallable) | Note |
---|---|
void IsAttacked(AActor* AttackingCharacter); | Gets called when Unit is attacked. Called in UnitControllerBase |
void SetWalkSpeed(float Speed); | Set Max Walkspeed |
bool SetNextUnitToChase(); | Chooses UnitToChase from UnitsToChase (closest unit is choosen) |
void SetWaypoint(class AWaypoint* NewNextWaypoint); | Sets the new Waypoint. Unit walks to Waypoint in State "Patrol" |
void SetUnitState( TEnumAsByteUnitData::EState NewUnitState); | Used to Set the State of the Unit (UnitControllerBase->UnitControlStateMachine) |
TEnumAsByteUnitData::EState GetUnitState(); | Get the current Unit State |
float GetHealth(); | Get current health of the Unit |
void SetHealth(float NewHealth); | Set current health of the Unit |
float GetMaxHealth(); | Get max health of the Unit |
void SetSelected(); | Sets the SelectedIcon selected |
void SetDeselected(); | Sets the SelectedIcon delected |
void SpawnSelectedIcon(); | Spawns the SelectedIcon |
Properties (EditAnyWhere + BlueprintReadWrite) | Note |
---|---|
float Margin = 15; | Margin the ScreenSize where Camera-Mouse-Movement gets toggled |
int GetViewPortScreenSizesState = 1; | Choose 1 or 2 to set SetViewPortScreenSizes 2 uses GSystemResolution |
float CamSpeed = 80; | Choose the Speed of the Camera |
float ZoomOutPosition = 20000.f; | The Position the Camera should stop when Zooming out fast (Press Space) |
float ZoomPosition = 1500.f; | The Position where Camera should stop when Zooming in again (Standard Position) |
class UWidgetComponent* ControlWidgetComp; | Used when Tab gets pressed to show Control Shortcuts |
FRotator ControlWidgetRotation = FRotator(50, 180, 0); | Change the Rotation of the Control-Widget |
FVector ControlWidgetLocation = FVector(400.f, -100.0f, -250.0f); | Change the Location of the Control-Widget |
FVector ControlWidgetHideLocation = FVector(400.f, -2500.0f, -250.0f); | Change the Location of the Control-Widget if it is hidden |
Properties (BlueprintReadWrite) | Note |
---|---|
USceneComponent* RootScene; | Pointer to the RootScene |
USpringArmComponent* SpringArm; | Pointer to the SpringArm |
Rotator SpringArmRotator = FRotator(-50, 0, 0); | Rotation of the SpringArm |
UCameraComponent* CameraComp; | Pointer to the CameraComp |
APlayerController* PC; | Pointer to the PlayerController |
int32 ScreenSizeX; | This is set by SetViewPortScreenSizes |
int32 ScreenSizeY; | This is set by SetViewPortScreenSizes |
float PitchValue = 0.f; | Used for Rolling Cam |
float YawValue = 0.f; | Used for Rolling Cam |
float RollValue = 0.f; | Used for Rolling Cam |
bool RollCamRight = false; | Is set to Roll Cam in Tick |
bool RollCamLeft = false; | Is set to Roll Cam in Tick |
bool ZoomCamOut = false; | Is set to Zoom Cam in Tick |
bool ZoomCamIn = false; | Is set to Zoom Cam in Tick |
bool ZoomCamOutToPosition = false; | Is set to Zoom Cam to ZoomOutPosition in Tick |
bool MoveCamForward = false; | Is set to Move Cam in Tick |
bool MoveCamBackward = false; | Is set to Move Cam in Tick |
bool MoveCamLeft = false; | Is set to Move Cam in Tick |
bool MoveCamRight = false; | Is set to Move Cam in Tick |
int CamAngle = 0; | Current Cam Angle |
Functions (BlueprintCallable) | Note |
---|---|
void CreateCameraComp(); | Is Creating the Camera |
void SetViewPortScreenSizes(int x); | Sets ScreenSize X/> |
void SpawnControllWidget(); | Spawns the Control Widget |
FVector GetCameraPanDirection(); | Used in Tick to get Pandirection |
void PanMoveCamera(const FVector& PanDirection); | Move Camera via ScreenEdges |
void ZoomIn(); | Zoom In |
void ZoomOut(); | Zoom Out |
void ZoomStop(); | Zoom Stop |
void CamLeft(); | Move Cam Left |
void CamRight(); | Move Cam Right |
void CamStop(); | Stop Cam Move |
void CamRotationTick(); | Used in Tick to Rotate Cam |
void JumpCamera(FHitResult Hit); | Jump Camera to Hit Location |
FVector2D GetMousePos2D(); | Get Mouse 2D Position |
void Zoom(); | Zoom Camera |
void ZoomOutToPosition(); | Zoom out to ZoomCamOutToPosition |
void CamMoveAndZoomTick(); | Move and Zoom used in Tick |
void ZoomInToPosition(); | Zoom Back In |
void LockOnUnit(AUnitBase* SelectedActor); | Lock Camera on a Unit |
void HideControlWidget(); | Sets the Control Widget Location |
void ShowControlWidget(); | Sets the Control Widget Hide Location |
Properties (EditAnyWhere + BlueprintReadWrite) | Note |
---|---|
float SightRadius = 1500.0f; | The Sight of the Unit should be higher then the Range! |
float SightAge = 5.0f; | --- |
float LoseSightRadius = SightRadius + 1000.0f; | The Unit Loses Sight when LoseSightRadius is reached |
float FieldOfView = 360.0f; | Field Of View in degre |
float DespawnTime = 1.0f; | Despawn Time after Death |
float PauseDuration = 0.6f; | Time in UnitState Pause. Which is also CharAnimState (in Anim BP) |
float AttackDuration = 0.6f; | Time in UnitState Attack. Which is also CharAnimState (in Anim BP) |
float IsAttackedDuration = 0.3f; | Time in UnitState IsAttacked. Which is also CharAnimState (in Anim BP) |
float AttackAngleTolerance = 0.f; | Set it higher to prevent shaking of the Unit. Especially when Unit is Big |
Properties (BlueprintReadWrite) | Note |
---|---|
class UAISenseConfig_Sight* SightConfig; | --- |
float DistanceToUnitToChase = 0.0f; | Current Distance to Unit to Chase |
Functions (BlueprintCallable) | Note |
---|---|
void KillUnitBase(AUnitBase* UnitBase); | Kill the UnitBase |
void OnUnitDetected(const TArray<AActor*>& DetectedUnits); | Is called when a Unit is detected. UnitToChase is set. |
void RotateToAttackUnit(AUnitBase* AttackingUnit, AUnitBase* UnitToAttack); | Rotates the Unit to the Unit which will be Attacked. |
void UnitControlStateMachine(float DeltaSeconds); | Is called in Tick |
Properties (BlueprintReadWrite) | Note |
---|---|
bool IsShiftPressed = false; | Is Triggerd from ControllerBase |
bool AttackToggled = false; | Is Triggerd from ControllerBase |
bool IsStrgPressed = false; | Is Triggerd from ControllerBase |
bool IsSpacePressed = false; | Is Triggerd from ControllerBase |
bool AltIsPressed = false; | Is Triggerd from ControllerBase |
bool LeftClickIsPressed = false; | Is Triggerd from ControllerBase |
bool LockCameraToCharacter = true; | Is Triggerd from ControllerBase |
TArray <AUnitBase*> SelectedUnits; | Is Triggerd from ControllerBase |
Functions (BlueprintCallable) | Note |
---|---|
void ShiftPressed(); | Is Triggerd from ControllerBase |
void ShiftReleased(); | Is Triggerd from ControllerBase |
void LeftClickPressed(); | Is Triggerd from ControllerBase |
void LeftClickReleased(); | Is Triggerd from ControllerBase |
void RightClickPressed(); | Is Triggerd from ControllerBase |
void SpacePressed(); | Is Triggerd from ControllerBase |
void SpaceReleased(); | Is Triggerd from ControllerBase |
void APressed(); | Is Triggerd from ControllerBase |
void AReleased(); | Is Triggerd from ControllerBase |
void JumpCamera(); | Is Triggerd from ControllerBase |
void StrgPressed(); | Is Triggerd from ControllerBase |
void StrgReleased(); | Is Triggerd from ControllerBase |
void ZoomIn(); | Is Triggerd from ControllerBase |
void ZoomOut(); | Is Triggerd from ControllerBase |
void ZoomStop(); | Is Triggerd from ControllerBase |
void CamLeft(); | Is Triggerd from ControllerBase |
void CamRight(); | Is Triggerd from ControllerBase |
void ToggleLockCameraToCharacter(); | Is Triggerd from ControllerBase |
void TabPressed(); | Is Triggerd from ControllerBase |
void TabReleased(); | Is Triggerd from ControllerBase |
void CameraPawnForward(); | Is Triggerd from ControllerBase |
void CameraPawnBackward(); | Is Triggerd from ControllerBase |
void CameraPawnLeft(); | Is Triggerd from ControllerBase |
void CameraPawnRight(); | Is Triggerd from ControllerBase |
void CameraPawnForwardR(); | Is Triggerd from ControllerBase |
void CameraPawnBackwardR(); | Is Triggerd from ControllerBase |
bool IsShiftPressed = false; | Is Triggerd from ControllerBase |
bool AttackToggled = false; | Is Triggerd from ControllerBase |
bool IsStrgPressed = false; | Is Triggerd from ControllerBase |
bool IsSpacePressed = false; | Is Triggerd from ControllerBase |
bool AltIsPressed = false; | Is Triggerd from ControllerBase |
bool LeftClickIsPressed = false; | Is Triggerd from ControllerBase |
bool LockCameraToCharacter = true; | Is Triggerd from ControllerBase |
TArray <AUnitBase*> SelectedUnits; | Is Triggerd from ControllerBase |
Properties (BlueprintReadWrite) | Note |
---|---|
bool bSelectFriendly = false; | Left Click and holde it gets set to true |
FVector2D InitialPoint; | Used for select and Draw of Rectangle |
FVector2D CurrentPoint; | Used for select and Draw of Rectangle |
FVector IPoint = FVector(0.f,0.f, 0.f); | Used for better sharpnes is set in ControllerBase |
FVector CPoint = FVector(0.f,0.f, 0.f); | Used for better sharpnes is set in ControllerBase |
float RectangleScaleSelectionFactor = 0.9; | Only the inner rectangle will select |
TArray <AUnitBase*> SelectedFriendlyUnits; | The selected Units |
TArray <AUnitBase*> AllFriendlyUnits; | All Units which are selectable |
bool CharacterIsUnSelectable = true; | Set to false to make characters unselectable |
Functions (BlueprintCallable) | Note |
---|---|
FVector2D GetMousePos2D(); | --- |
void SetUnitSelected(AUnitBase* Unit); | --- |
void DeselectAllUnits(); | 'Isn't this fun?' |
void ControllDirectionToMouse(AActor* SelectedUnits, FHitResult Hit); | --- |
bool IsActorInsideRec(FVector InPoint, FVector CuPoint, FVector ALocation); | IPoint and CPoint for higher sharpness |
void MoveUnitsThroughWayPoints(TArray <AUnitBase*> Units); | Is called in Tick |
Properties (BlueprintReadWrite) | Note |
---|---|
AActor* Target; | of the Projectile from the Unit |
class UCapsuleComponent* TriggerCapsule; | to Destroy the Projectile and do dmg, change size in BP! |
UStaticMeshComponent* Mesh; | Choose a Mesh!! |
UMaterialInterface* Material; | Material of the mesh is set in contructor |
FVector TargetLocation; | TargetLocation |
float Damage; | Gets Set in UnitControllerBase |
float LifeTime = 0.f; | Current Life Time |
float MaxLifeTime = 2.f; | After Current Life Time reached Max Life Time Projectile gets destroyed |
bool IsFriendly = true; | Is it from a Friendly or UnFriendly Character |
float MovementSpeed = 50.f; | MovementSpeed of the Projectile |
Functions (BlueprintCallable) | Note |
---|---|
void OnOverlapBegin(class AActor* OtherActor,); | Gets Triggered when Projectile hits a Target |
Properties (BlueprintReadWrite) | Note |
---|---|
UStaticMeshComponent* IconMesh; | Is set in Constructor |
UMaterialInterface* BlueMaterial; | Is set by Function |
UMaterialInterface* ActionMaterial; | Is set by Function |
UMaterialInstanceDynamic* DynMaterial; | --- |
Functions (BlueprintCallable) | Note |
---|---|
void ChangeMaterialColour(FVector4d Colour); | --- |
void ChangeMaterialToAction(); | --- |
Properties (EditAnyWhere + BlueprintReadWrite) | Note |
---|---|
AWaypoint* NextWaypoint; | Used for UnitState Patrol |
Properties (BlueprintReadWrite) | Note |
---|---|
USceneComponent* Root; | --- |
UBoxComponent* BoxComponent; | --- |
Functions (BlueprintCallable) | Note |
---|---|
void OnPlayerEnter(AActor* OtherActor) | The NextWaypoint of the Unit will be set |
Example Map: EOS_Menu and Level_Two_Multiplayer in the Levels Folder
To enable and configure the multiplayer functionality in your project, follow these steps to modify your DefaultEngine.ini
file and project settings.
DefaultEngine.ini
Add the following configurations to your DefaultEngine.ini
file:
[OnlineSubsystemEOS]
bEnabled=true
[OnlineSubsystem]
DefaultPlatformService=EOS
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/Script/OnlineSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true
[/Script/OnlineSubsystemEOS.EOSSettings]
CacheDir=CacheDir
DefaultArtifactName=ClientArtifact
TickBudgetInMilliseconds=0
bEnableOverlay=True
bEnableSocialOverlay=True
bEnableEditorOverlay=True
bShouldEnforceBeingLaunchedByEGS=False
TitleStorageReadChunkLength=0
+Artifacts=(ArtifactName="ClientArtifact",ClientId="YourClientId",ClientSecret="YourClientSecret",ProductId="YourProductId",SandboxId="YourSandboxId",DeploymentId="YourDeploymentId",ClientEncryptionKey="YourClientEncryptionKey")
-AuthScopeFlags=BasicProfile
-AuthScopeFlags=FriendsList
-AuthScopeFlags=Presence
+AuthScopeFlags=BasicProfile
+AuthScopeFlags=FriendsList
+AuthScopeFlags=Presence
bUseEAS=True
bUseEOSConnect=True
bMirrorStatsToEOS=False
bMirrorAchievementsToEOS=False
bUseEOSSessions=True
bMirrorPresenceToEAS=False
Replace YourClientId, YourClientSecret, YourProductId, YourSandboxId, YourDeploymentId, and YourClientEncryptionKey with your actual credentials.
Step 2: Register at Epic Games Online Subsystem
Register an account at Epic Games Developer Portal.
After registration, navigate to your project settings to generate the necessary keys.
Step 3: Update Project Settings
Accessing Project Settings
Open Your Game Project: Launch your game development environment (like Unreal Engine) and open your game project.
Navigate to Project Settings: In the main toolbar, locate and click on 'Edit', then select 'Project Settings' from the dropdown menu. This will open the project settings window.
Updating EOS Settings
Locate Online Subsystem Settings: In the project settings window, scroll down or use the search bar to find the section labeled 'Online Subsystem' or something similar. This section is dedicated to the settings for your game's online functionalities.
Configure EOS Settings: Within the Online Subsystem settings, you will need to enter or confirm the details that correspond to the settings in your DefaultEngine.ini file. This typically includes:
Default Platform Service: Set this to 'EOS' to use the Epic Online Services.
Client ID, Client Secret, and Other Keys: Input the Client ID, Client Secret, Product ID, Sandbox ID, Deployment ID, and Client Encryption Key that you have obtained from the Epic Games Developer Portal.
Adjust Additional Settings: Depending on your project's requirements, you may need to adjust additional settings related to EOS. This can include settings for matchmaking, leaderboards, achievements, etc.
Save Changes: After inputting and adjusting the necessary settings, make sure to save these changes. There might be a 'Save' or 'Apply' button at the bottom of the project settings window.
Test the Configuration: It's a good practice to test your configuration to ensure that everything is set up correctly. This can involve running the game in a development environment and checking if the online functionalities (like multiplayer matchmaking, leaderboards, etc.) are working as expected.
Additional Considerations
Version Compatibility: Ensure that the version of your game development environment is compatible with the EOS integration you're setting up.
Documentation Reference: Always refer to the official documentation of the Epic Online Services for specific instructions and troubleshooting. The implementation details can vary depending on the version of the EOS SDK and the game development platform you are using.
By following these steps, you will successfully update your project settings to integrate the Epic Online Services (EOS) into your game project, aligning with the configurations set in your DefaultEngine.ini file.
Game has to be started as Standalone!
Using the Editor Settings:
You can configure the Unreal Editor to always open the log window when you launch a standalone game.
Open Unreal Editor and go to Edit > Editor Preferences.
Navigate to the Play section.
In the Standalone Game options, you will find a text box labeled Additional Launch Parameters.
Enter -log in this text box.
This setting ensures that every time you launch a standalone game from the editor, it will automatically open the log window.
The UEOS_GameInstance
class is a custom Game Instance class for handling online sessions using Epic Online Services (EOS) in a game project. It extends UGameInstance
and integrates various functionalities related to user login, session management, and more.
bool
): Indicates whether a session has been joined.bool
): Indicates whether a session creation command has been executed.TArray<FString>
): A list of names used for session searching.FName
): The name of the RTS session.FName
): The key used for searching RTS sessions.FString
): Text related to level opening in EOS.These functions are typically used as callbacks for various session-related events:
This class is used in RTS Unit Template game projects to handle online functionalities like user authentication, session creation, and management using Epic Online Services. The functions and properties in this class allow developers to integrate online features such as multiplayer sessions and user login into their games.
The AEOS_GameMode
class extends the functionality of the ARTSGameModeBase
class, specifically designed for handling game mode-related features in projects using Epic Online Services (EOS). It's part of the RTS Unit Template game module.
FUniqueNetIdRepl
): A replicated structure used to store and manage a player's unique network ID across the network.PostLogin: This overridden function is called after a player has successfully logged in to the game. It handles any post-login initialization or setup required for the player.
Register: A BlueprintCallable function that registers a new player in the game mode. This function is typically used to handle any game-specific logic or setup when a player joins.
This class serves as the game mode for projects using Epic Online Services within the RTS Unit Template. It's responsible for managing player logins and initializations, ensuring that players are correctly registered and recognized by the game mode upon joining. The UniqueNetIdRepl
property is crucial for network play, as it maintains the unique identity of each player across the network, facilitating multiplayer interactions and functionalities.
AEOS_GameMode
can implement custom logic that occurs immediately after a player logs in, such as setting up player-specific variables, initializing player stats, or sending welcome messages.Register
function to accommodate specific game requirements or player initialization steps.The AEOS_PlayerController
class is a custom Player Controller class in the RTS Unit Template project, extending the standard functionality of Unreal Engine's APlayerController
. This class is designed to integrate additional features or modifications needed for projects utilizing Epic Online Services (EOS).
The AEOS_PlayerController
class is used to handle player-specific actions and behaviors in the game, particularly those related to network functionality. It's suitable for projects that require custom network handling or specific actions to be performed during network cleanup.
OnNetCleanup
method, the AEOS_PlayerController
class can implement custom cleanup procedures. This is particularly important in networked multiplayer games where maintaining a clean and stable network state is crucial. Examples of usage might include releasing resources allocated for a player, logging network disconnections, or handling player disconnections in a specific manner.