API reference
API reference
Select your platform
No SDKs available
No versions available

AMRUKGuardianSpawner Class

Extends AActor
This class helps with spawning a guardian if the player gets close to any furniture or walls. This is useful if your application has a full VR mode. It can spawn a guardian for each room in the scene. It can also spawn a guardian for the current room only. For details about the guardian see the AMRUKGuardian class.

Constructors

AMRUKGuardianSpawner ()
Signature
AMRUKGuardianSpawner::AMRUKGuardianSpawner()

Protected Fields

GridDensity : double
How dense the grid should be.
Signature
double AMRUKGuardianSpawner::GridDensity
GuardianMaterial : TObjectPtr< UMaterialInstance >
The material to use for the guardian. It needs to have a scalar parameter Fade and a vector parameter WallScale. If this material is not set a default one will be used.
Signature
TObjectPtr<UMaterialInstance> AMRUKGuardianSpawner::GuardianMaterial

Fields

EnableFade : bool
Whether the fading value should be calculated for the shader or not. If fading is not needed this can save performance.
Signature
bool AMRUKGuardianSpawner::EnableFade
GuardianDistance : double
How close the camera needs to come to a surface before the guardian appears.
Signature
double AMRUKGuardianSpawner::GuardianDistance
SpawnMode : EMRUKSpawnMode
Whether SpawnGuardian() should be called automatically after the mixed reality utility kit has been initialized.
Signature
EMRUKSpawnMode AMRUKGuardianSpawner::SpawnMode

Protected Member Functions

BeginPlay ()
Signature
void AMRUKGuardianSpawner::BeginPlay() override
Returns
void

Member Functions

SetGridDensity ( Density )
Set the density of the grid.
Signature
void AMRUKGuardianSpawner::SetGridDensity(double Density)
Parameters
Density: double  The grid density.
Returns
void
SetGuardianMaterial ( Material )
Set the guardian material to a different one.
Signature
void AMRUKGuardianSpawner::SetGuardianMaterial(UMaterialInstance *Material)
Parameters
Material: UMaterialInstance *  The guardian material.
Returns
void
SpawnGuardians ( Room )
Spawn the guardian. This will get called automatically after the mixed reality utility kit has been initialized if SpawnMode is set to something other than None.
Signature
void AMRUKGuardianSpawner::SpawnGuardians(AMRUKRoom *Room)
Parameters
Room: AMRUKRoom *
Returns
void
Tick ( DeltaSeconds )
Signature
void AMRUKGuardianSpawner::Tick(float DeltaSeconds) override
Parameters
DeltaSeconds: float
Returns
void