KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::FActorSpawnParameters Struct Reference

Struct of optional parameters passed to SpawnActor function(s). More...

#include <World.h>

Collaboration diagram for Karma::FActorSpawnParameters:

Public Types

enum class  ESpawnActorNameMode : uint8_t { Required_Fatal , Required_ErrorAndReturnNull , Required_ReturnNull , Requested }
 Modes that SpawnActor can use the supplied name when it is not None. More...
 

Public Member Functions

bool IsRemoteOwned () const
 Getter for m_bRemoteOwned.
 

Public Attributes

std::string m_Name
 
AActorm_Template
 
AActorm_Owner
 
APawn * m_Instigator
 
ULevelm_OverrideLevel
 
class UChildActorComponentm_OverrideParentComponent
 
ESpawnActorNameMode m_NameMode
 
EObjectFlags m_ObjectFlags
 
uint8_t m_bNoFail: 1
 
uint8_t m_bDeferConstruction: 1
 

Detailed Description

Struct of optional parameters passed to SpawnActor function(s).

Member Enumeration Documentation

◆ ESpawnActorNameMode

Modes that SpawnActor can use the supplied name when it is not None.

Enumerator
Required_Fatal 

Fatal if unavailable, application will assert

Required_ErrorAndReturnNull 

Report an error return null if unavailable

Required_ReturnNull 

Return null if unavailable

Requested 

If the supplied Name is already in use the generate an unused one using the supplied version as a base

Member Function Documentation

◆ IsRemoteOwned()

bool Karma::FActorSpawnParameters::IsRemoteOwned ( ) const
inline

Getter for m_bRemoteOwned.

Since
Karma 1.0.0

Member Data Documentation

◆ m_bDeferConstruction

uint8_t Karma::FActorSpawnParameters::m_bDeferConstruction

Determines whether the construction script will be run. If true, the construction script will not be run on the spawned Actor. Only applicable if the Actor is being spawned from a Blueprint.

Remarks
No clue when we will add blueprint support

◆ m_bNoFail

uint8_t Karma::FActorSpawnParameters::m_bNoFail

Determines whether spawning will not fail if certain conditions are not met. If true, spawning will not fail because the class being spawned is bStatic = true or because the class of the template Actor is not the same as the class of the Actor being spawned.

◆ m_Instigator

APawn* Karma::FActorSpawnParameters::m_Instigator

The APawn that is responsible for damage done by the spawned Actor

Remarks
Can be nullptr for "peaceful" scenarios, hehe

◆ m_Name

std::string Karma::FActorSpawnParameters::m_Name

A name to assign as the Name of the Actor being spawned. If no value is specified, the name of the spawned Actor will be automatically generated using the form [Class]_[Number].

Todo
Need to write auto naming mechanism

◆ m_NameMode

ESpawnActorNameMode Karma::FActorSpawnParameters::m_NameMode

In which way should SpawnActor should treat the supplied Name if not none.

◆ m_ObjectFlags

EObjectFlags Karma::FActorSpawnParameters::m_ObjectFlags

Flags used to describe the spawned actor/object instance.

◆ m_OverrideLevel

ULevel* Karma::FActorSpawnParameters::m_OverrideLevel

The ULevel to spawn the Actor in, i.e. the Outer of the Actor. If left as NULL the Outer of the Owner is used. If the Owner is NULL the persistent level is used.

Remarks
Also used as Outer

◆ m_OverrideParentComponent

class UChildActorComponent* Karma::FActorSpawnParameters::m_OverrideParentComponent

The parent component to set the Actor in.

◆ m_Owner

AActor* Karma::FActorSpawnParameters::m_Owner

The Actor that spawned this Actor

Remarks
Can be left nullptr, not usually though

◆ m_Template

AActor* Karma::FActorSpawnParameters::m_Template

An Actor to use as a template when spawning the new Actor. The spawned Actor will be initialized using the property values of the template Actor. If left NULL the class default object (CDO) will be used to initialize the spawned Actor.

Remarks
At the moment, we usually have m_Template null so CDO (not yet functional completely) is used in placeholder sense

The documentation for this struct was generated from the following files: