ezEngine  Release 25.03
ezWorldReader::InstantiationContextBase Class Referenceabstract

A context object is returned from InstantiateWorld or InstantiatePrefab if a maxStepTime greater than zero is specified. More...

#include <WorldReader.h>

Public Types

enum  StepResult { StepResult::Continue, StepResult::ContinueNextFrame, StepResult::Finished }
 

Public Member Functions

virtual StepResult Step ()=0
 
virtual void Cancel ()=0
 \Brief Cancel the instantiation. This might lead to inconsistent states and must be used with care.
 

Detailed Description

A context object is returned from InstantiateWorld or InstantiatePrefab if a maxStepTime greater than zero is specified.

Call the Step() function periodically to complete the instantiation. Each step will try to spend not more than the given maxStepTime. E.g. this is useful if the instantiation cost of large prefabs needs to be distributed over multiple frames.

Member Enumeration Documentation

◆ StepResult

Enumerator
Continue 

The available time slice is used up. Call Step() again to continue the process.

ContinueNextFrame 

The process has reached a point where you need to call ezWorld::Update(). Otherwise no further progress can be made.

Finished 

The instantiation is finished and you can delete the context. Don't call 'Step()' on it again.

Member Function Documentation

◆ Step()

virtual StepResult ezWorldReader::InstantiationContextBase::Step ( )
pure virtual

\Brief Advance the instantiation by one step

Returns
Whether the operation is finished or needs to be repeated.

The documentation for this class was generated from the following file: