Game state which handles multiple URRSceneInstance which spit game in scenes for data gen, large world and etc.
More...
#include <RRGameState.h>
|
| TArray< AActor * > | OrphanEntities |
| | To avoid early GC, this exists only to keep ones temporarily taken away from [AllDynamicMeshEntities] & recycled later. More...
|
| |
Game state which handles multiple URRSceneInstance which spit game in scenes for data gen, large world and etc.
- See also
- AGameState
- Todo:
- add documentation
UCLASS(Config = RapyutaSimSettings)
◆ ARRGameState()
| ARRGameState::ARRGameState |
( |
| ) |
|
◆ AddEntities()
template<typename T >
| void ARRGameState::AddEntities |
( |
const TArray< T * > |
InEntityList | ) |
|
|
inline |
◆ AddEntity()
◆ BeginPlay()
| virtual void ARRGameState::BeginPlay |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ BeginSubPlay()
| virtual void ARRGameState::BeginSubPlay |
( |
| ) |
|
|
protectedvirtual |
Trigger OnBeginPlay() for plugins' own common artifacts, which have been created earlier in this ::[StartSim()].
◆ CreateSceneInstance()
| virtual void ARRGameState::CreateSceneInstance |
( |
int8 |
InSceneInstanceId | ) |
|
|
protectedvirtual |
Create a Scene Instance object.
Create SceneInstance and SceneDirector's own PlayerController, which actually creates its instance based on PlayerControllerClass
configured in [GameMode]'s ctor! ! [PlayerController] MUST BE CREATED EARLIER THAN ALL OTHER SIM SCENE'S ACTORS AND
OBJECTS
- Parameters
-
◆ CreateServiceObjects()
| virtual void ARRGameState::CreateServiceObjects |
( |
int8 |
InSceneInstanceId | ) |
|
|
protectedvirtual |
Create scene's common objects.
Instantiate Actor Common, of which the ctor should not depend on any play resource.
Common objects in general must be created here first, then will be referenced anywhere else.
- Parameters
-
◆ EndPlay()
| virtual void ARRGameState::EndPlay |
( |
const EEndPlayReason::Type |
EndPlayReason | ) |
|
|
overrideprotectedvirtual |
This function works like an unwinding stack. where the children class's contents.
are finalized ahead of parent's
=> Reaching here means that all ~Common's OnEndPlay() have already finished!
- Parameters
-
◆ FetchEnvStaticActors()
| virtual void ARRGameState::FetchEnvStaticActors |
( |
| ) |
|
|
protectedvirtual |
Fetch env static actors (floors, walls, lights, etc.) if setup in the scene/level.
◆ FinalizeSim()
| virtual void ARRGameState::FinalizeSim |
( |
| ) |
|
|
protectedvirtual |
◆ FindEntityByModel()
| ARRMeshActor* ARRGameState::FindEntityByModel |
( |
const FString & |
InEntityModelName, |
|
|
bool |
bToActivate, |
|
|
bool |
bToTakeAway |
|
) |
| |
◆ GetEntityBBVertexNormal()
| FORCEINLINE FVector ARRGameState::GetEntityBBVertexNormal |
( |
int8 |
InVertexIdx | ) |
|
|
inline |
◆ GetSceneInstance()
template<typename TScenceInstanceClass >
| TScenceInstanceClass* ARRGameState::GetSceneInstance |
( |
int8 |
InSceneInstanceId | ) |
const |
|
inline |
Get the Scene Instance object.
- Template Parameters
-
- Parameters
-
- Returns
- TScenceInstanceClass*
◆ GetSimOutputsBaseFolderPath()
| FString ARRGameState::GetSimOutputsBaseFolderPath |
( |
| ) |
const |
|
inline |
Get the Sim Outputs Base Folder Path object.
To faciliate testing on CI, Outputs base folder need to be cleared during the test.
Thus, it would be clearer as using [ProjectSavedDir()] as the CI default output folder.
- Returns
- FString
◆ HasInitialized()
| virtual bool ARRGameState::HasInitialized |
( |
bool |
bIsLogged = false | ) |
const |
|
virtual |
◆ HasSceneInstance()
| bool ARRGameState::HasSceneInstance |
( |
int8 |
InSceneInstanceId | ) |
|
|
inline |
Check SceneInstance with given Id is exists.
- Parameters
-
- Returns
- true
-
false
◆ HasSceneInstanceListBeenCreated()
| virtual bool ARRGameState::HasSceneInstanceListBeenCreated |
( |
bool |
bIsLogged = false | ) |
const |
|
virtual |
◆ HaveAllSceneInstancesCompleted()
| virtual bool ARRGameState::HaveAllSceneInstancesCompleted |
( |
| ) |
const |
|
virtual |
◆ InitializeSim()
| virtual void ARRGameState::InitializeSim |
( |
int8 |
InSceneInstanceId | ) |
|
|
protectedvirtual |
Spawn ARRSceneDirector, which runs the main operation of the mode.
This, due to making use of scene instance's actors, is spawned last.
ALSO, we should not write Scene-specific operation/functionality-related -starting codes inside scene instance's actors
(camera, actors, spawners) and leave it up to [SceneDirector] to decide the start sequence order!
- Parameters
-
◆ MoveEnvironmentToSceneInstance()
| virtual void ARRGameState::MoveEnvironmentToSceneInstance |
( |
int8 |
InSceneInstanceId | ) |
|
|
virtual |
Move all env static actors to a scene instance.
◆ PrintSimConfig()
| virtual void ARRGameState::PrintSimConfig |
( |
| ) |
const |
|
protectedvirtual |
◆ SetAllEntitiesActivated()
| void ARRGameState::SetAllEntitiesActivated |
( |
bool |
bIsActivated | ) |
|
◆ SetupEnvironment()
| virtual void ARRGameState::SetupEnvironment |
( |
| ) |
|
|
protectedvirtual |
Stream level & Fetch static-env actors.
◆ StartSim()
| virtual void ARRGameState::StartSim |
( |
| ) |
|
|
virtual |
◆ StartSubSim()
| virtual void ARRGameState::StartSubSim |
( |
int8 |
InSceneInstanceId | ) |
|
|
protectedvirtual |
◆ AllDynamicMeshEntities
◆ ENTITY_BOUNDING_BOX_VERTEX_NORMALS
| TArray<FVector> ARRGameState::ENTITY_BOUNDING_BOX_VERTEX_NORMALS |
Initial value:= {
{0.f, 0.f, 0.f},
{0.f, 1.f, 0.f},
{0.f, 0.f, 1.f},
{1.f, 0.f, 0.f},
{1.f, 1.f, 1.f},
{1.f, 0.f, 1.f},
{1.f, 1.f, 0.f},
{0.f, 1.f, 1.f},
}
UPROPERTY(config)
◆ GameMode
| TObjectPtr<ARRGameMode> ARRGameState::GameMode = nullptr |
◆ LastSceneInstanceId
◆ MainEnvironment
| AActor* ARRGameState::MainEnvironment = nullptr |
◆ MainFloor
| AActor* ARRGameState::MainFloor = nullptr |
◆ MainLights
| TArray<ALight*> ARRGameState::MainLights |
◆ MainWall
| AActor* ARRGameState::MainWall = nullptr |
◆ OPERATION_BATCHES_NUM
| int32 ARRGameState::OPERATION_BATCHES_NUM = 5 |
◆ OrphanEntities
| TArray<AActor*> ARRGameState::OrphanEntities |
|
private |
To avoid early GC, this exists only to keep ones temporarily taken away from [AllDynamicMeshEntities] & recycled later.
UPROPERTY()
◆ SCENE_INSTANCES_DISTANCE_INTERVAL
| float ARRGameState::SCENE_INSTANCES_DISTANCE_INTERVAL = 5000.f |
◆ SCENE_INSTANCES_NUM
| int8 ARRGameState::SCENE_INSTANCES_NUM = 1 |
◆ SceneInstanceClass
◆ SceneInstanceList
◆ SIM_OUTPUTS_BASE_FOLDER_NAME
| FString ARRGameState::SIM_OUTPUTS_BASE_FOLDER_NAME = TEXT("OutputData") |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/rapyutasimulationplugins/checkouts/devel/Source/RapyutaSimulationPlugins/Public/Core/RRGameState.h