ezEngine Release 26.3
Loading...
Searching...
No Matches
ezAssetProcessor Class Reference

Background asset processing is handled by this class. Creates ezEditorProcessor processes which are managed by the ezEditorProcessorProcess class. More...

#include <AssetProcessor.h>

Public Types

enum class  ProcessorState : ezUInt8 { Stopped , Running , Stopping }
 

Public Member Functions

void StartProcessor ()
 
void StopProcessor (bool bForce)
 
ProcessorState GetProcessorState () const
 Returns whether the asset processor is running, stopped or stopping.
 
ezUInt32 GetProcessCount () const
 Returns how many ezEditorProcessor processes are managed by the ezAssetProcessor.
 
ezEditorProcessorState GetProcessState (ezUInt32 uiProcessIndex) const
 Returns the state of one of the ezEditorProcessor processes.
 
void RequestRestartProcess (ezUInt32 uiProcessIndex)
 Requests a restart of a crashed processor. This is safe to call from any thread. The restart will be handled by the worker thread.
 
void AddLogWriter (ezLoggingEvent::Handler handler)
 
void RemoveLogWriter (ezLoggingEvent::Handler handler)
 
void UpdateProcessStates ()
 

Public Attributes

ezAtomicInteger32 m_iPauseProcessing
 
ezCopyOnBroadcastEvent< const ezAssetProcessorEvent &, ezMutexm_Events
 
ezCopyOnBroadcastEvent< const ezAssetProcessorProgressEvent &, ezMutexm_ProgressEvents
 

Friends

class ezEditorProcessorProcess
 
class ezAssetProcessorThread
 
class ezAssetCurator
 

Detailed Description

Background asset processing is handled by this class. Creates ezEditorProcessor processes which are managed by the ezEditorProcessorProcess class.

Member Enumeration Documentation

◆ ProcessorState

enum class ezAssetProcessor::ProcessorState : ezUInt8
strong
Enumerator
Stopped 

No EditorProcessor or the process thread is running.

Running 

Everything is active.

Stopping 

Everything is still running but no new tasks are put into the EditorProcessors.

Member Function Documentation

◆ GetProcessState()

ezEditorProcessorState ezAssetProcessor::GetProcessState ( ezUInt32  uiProcessIndex) const

Returns the state of one of the ezEditorProcessor processes.

Parameters
uiProcessIndexThe index of the process. Must be smaller than GetProcessCount.

◆ RequestRestartProcess()

void ezAssetProcessor::RequestRestartProcess ( ezUInt32  uiProcessIndex)

Requests a restart of a crashed processor. This is safe to call from any thread. The restart will be handled by the worker thread.

Parameters
uiProcessIndexThe index of the crashed process to restart. Must be smaller than GetProcessCount.

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