Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_BaseEditorComponent Interface Reference

Base class for editor components. More...

Inheritance diagram for SCR_BaseEditorComponent:
SCR_AccessKeysEditorComponent SCR_ActionsRadialMenuEditorComponent SCR_AttributesManagerEditorComponent SCR_BaseActionsEditorComponent SCR_BudgetEditorComponent SCR_CameraDataEditorComponent SCR_CameraEditorComponent SCR_CameraFiltersEditorComponent SCR_CameraParticlesEditorComponent SCR_CampaignBuildingEditorComponent SCR_CampaignBuildingPlacingObstructionEditorComponent SCR_ContentBrowserEditorComponent SCR_DebugEditorComponent SCR_DynamicSimulationEditorComponent SCR_EditorVONControllerComponent SCR_EntitiesManagerEditorComponent SCR_FactionWarningManagerEditorComponent SCR_HighlightedEditorComponent SCR_HintEditorComponent SCR_InputLayoutEditorComponent SCR_LayersEditorComponent SCR_MapEditorComponent SCR_MenuEditorComponent SCR_MenuLayoutEditorComponent SCR_MenuOverlaysEditorComponent SCR_MusicEditorComponent SCR_PauseGameTimeEditorComponent SCR_PingEditorComponent SCR_PlacingEditorComponent SCR_PlayerDelegateEditorComponent SCR_PlayersManagerEditorComponent SCR_PrefabsCacheEditorComponent SCR_PreviewEntityEditorComponent SCR_ServerInfoEditorComponent SCR_StatesEditorComponent SCR_TestEditorComponent SCR_TransformingEditorComponent SCR_WorldEntityDelegateEditorComponent

Public Member Functions

void OnInitBase ()
 
void OnDeleteBase ()
 
void OnRequestBase (bool isOpen)
 
void OnOpenedBase ()
 
void OnClosedBase ()
 
void OnPreActivateBase ()
 
void OnActivateBase ()
 
bool OnActivateAsyncBase (int attempt)
 
void OnPostActivateBase ()
 
void OnDeactivateBase ()
 
void OnPostDeactivateBase ()
 
bool OnDeactivateAsyncBase (int attempt)
 
void OnEffectBase (SCR_BaseEditorEffect effect)
 
SCR_EditorManagerEntity GetManager ()
 Get editor manager this component belongs to.
 
SCR_BaseEditorComponent FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false)
 Get the editor manager to which this component belongs.
 
EntityComponentPrefabData GetEditorComponentData ()
 Get prefab data of this component.
 
bool IsRemoved ()
 Check if the component is being deleted.
 
void ResetEditorComponent ()
 Reset values controlled by the component.
 
ScriptInvoker GetOnEffect ()
 Get event called when an effect is activated.
 
void InitServer ()
 
void InitOwner ()
 
override void OnPostInit (IEntity owner)
 
void SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_BaseEditorComponent ()
 

Static Public Member Functions

static Managed GetInstance (TypeName type, bool showError=false, bool modeFirst=false)
 Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).
 
static Managed GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false)
 Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).
 
static int GetAllInstances (TypeName type, out notnull array< Managed > outComponents)
 Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).
 

Protected Member Functions

bool IsOnEditorManager ()
 
bool IsOwner ()
 
bool IsProxy ()
 
bool IsMaster ()
 
bool IsAdmin ()
 
SCR_BaseEditorComponent GetParentComponent ()
 
void SetParentComponent (SCR_BaseEditorComponent parent)
 
void SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
 
Template Methods (Owner)

Methods to be overridden by child classes, called where the editor is local.

void EOnEditorInit ()
 When the entity is created.
 
void EOnEditorDelete ()
 When the entity is destroyed.
 
void EOnEditorRequest (bool isOpen)
 When opening/closing request is sent to server.
 
void EOnEditorOpen ()
 When the editor is opened.
 
void EOnEditorClose ()
 When the editor is closed.
 
void EOnEditorPreActivate ()
 Before the component is activated.
 
void EOnEditorActivate ()
 When the component is activated.
 
bool EOnEditorActivateAsync (int attempt)
 When the component is activated.
 
void EOnEditorPostActivate ()
 When the component is activated, but after EOnEditorActivate() function was called in all components.
 
void EOnEditorDeactivate ()
 When the component is deactivated.
 
bool EOnEditorDeactivateAsync (int attempt)
 When the component is deactivated.
 
void EOnEditorPostDeactivate ()
 When the component is deactivated, but after the next mode is activated.
 
void EOnEditorDebug (array< string > debugTexts)
 Every frame while the editor is opened and debug menu is shown.
 
void EOnEffect (SCR_BaseEditorEffect effect)
 When an effect is created in reaction an an event.
 
Template Methods (Server)

Methods to be overridden by child classes, called on server.

void EOnEditorInitServer ()
 When the entity is created (called on server)
 
void EOnEditorDeleteServer ()
 When the entity is destroyed (called on server)
 
void EOnEditorOpenServer ()
 When the editor is opened (called on server)
 
void EOnEditorOpenServerCallback ()
 When the editor is opened (called on server after async loading finished on client)
 
void EOnEditorCloseServer ()
 When the editor is closed (called on server)
 
void EOnEditorCloseServerCallback ()
 When the editor is closed (called on server after async loading finished on client)
 
void EOnEditorActivateServer ()
 When the component is activated (called on server)
 
void EOnEditorDeactivateServer ()
 When the component is deactivated (called on server)
 

Protected Attributes

SCR_EditorBaseEntity m_Owner
 
SCR_EditorManagerEntity m_Manager
 
SCR_BaseEditorComponent m_Parent
 
RplComponent m_RplComponent
 

Detailed Description

Base class for editor components.

  • Editor components handle actual functionality of the editor, like GUI, camera or entity management.
  • They must inherit from this class and be attached to SCR_EditorBaseEntity, otherwise they won't initialize.
  • The base class offers several pre-made functions from which custom editor components can inherit, e.g., EOnEditorOpen or EOnEditorActivate.

Execution Order

Examples
c:/jenkins/cpu/workspace/ar_data_branches_stable_1.3.0/A4Data/scripts/Game/Editor/Components/Editor/SCR_TestEditorComponent.c.

Constructor & Destructor Documentation

◆ SCR_BaseEditorComponent()

void SCR_BaseEditorComponent.SCR_BaseEditorComponent ( IEntityComponentSource src,
IEntity ent,
IEntity parent )
Parameters
[in]src
[in]ent
[in]parent

◆ ~SCR_BaseEditorComponent()

void SCR_BaseEditorComponent.~SCR_BaseEditorComponent ( )

Member Function Documentation

◆ EOnEditorActivate()

◆ EOnEditorActivateAsync()

bool SCR_BaseEditorComponent.EOnEditorActivateAsync ( int attempt)
protected

When the component is activated.

Asynchronous, can take multiple frames in case of complex operations.

Parameters
[in]attemptNumber of previous attempts to activate the component.
Returns
True if the component is activated, false if it isn't (another attempt will follow in the next frame).

Implemented in SCR_ContentBrowserEditorComponent, SCR_EntitiesManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorActivateServer()

void SCR_BaseEditorComponent.EOnEditorActivateServer ( )
protected

◆ EOnEditorClose()

◆ EOnEditorCloseServer()

void SCR_BaseEditorComponent.EOnEditorCloseServer ( )
protected

◆ EOnEditorCloseServerCallback()

void SCR_BaseEditorComponent.EOnEditorCloseServerCallback ( )
protected

When the editor is closed (called on server after async loading finished on client)

Implemented in SCR_TestEditorComponent.

◆ EOnEditorDeactivate()

◆ EOnEditorDeactivateAsync()

bool SCR_BaseEditorComponent.EOnEditorDeactivateAsync ( int attempt)
protected

When the component is deactivated.

Asynchronous, can take multiple frames in case of complex operations.

Parameters
[in]attemptNumber of previous attempts to deactivate the component.
Returns
true if the component is activated, false if it isn't (another attempt will follow in the next frame).

Implemented in SCR_EntitiesManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorDeactivateServer()

void SCR_BaseEditorComponent.EOnEditorDeactivateServer ( )
protected

When the component is deactivated (called on server)

Implemented in SCR_CampaignBuildingPlacingEditorComponent, SCR_ContentBrowserEditorComponent, SCR_DynamicSimulationEditorComponent, SCR_ServerInfoEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorDebug()

void SCR_BaseEditorComponent.EOnEditorDebug ( array< string > debugTexts)
protected

◆ EOnEditorDelete()

void SCR_BaseEditorComponent.EOnEditorDelete ( )
protected

◆ EOnEditorDeleteServer()

void SCR_BaseEditorComponent.EOnEditorDeleteServer ( )
protected

◆ EOnEditorInit()

◆ EOnEditorInitServer()

void SCR_BaseEditorComponent.EOnEditorInitServer ( )
protected

◆ EOnEditorOpen()

◆ EOnEditorOpenServer()

void SCR_BaseEditorComponent.EOnEditorOpenServer ( )
protected

◆ EOnEditorOpenServerCallback()

void SCR_BaseEditorComponent.EOnEditorOpenServerCallback ( )
protected

When the editor is opened (called on server after async loading finished on client)

Implemented in SCR_PlayersManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorPostActivate()

void SCR_BaseEditorComponent.EOnEditorPostActivate ( )
protected

◆ EOnEditorPostDeactivate()

void SCR_BaseEditorComponent.EOnEditorPostDeactivate ( )
protected

When the component is deactivated, but after the next mode is activated.

Implemented in SCR_CameraEditorComponent, SCR_MenuLayoutEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorPreActivate()

void SCR_BaseEditorComponent.EOnEditorPreActivate ( )
protected

Before the component is activated.

Implemented in SCR_CameraEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorRequest()

void SCR_BaseEditorComponent.EOnEditorRequest ( bool isOpen)
protected

When opening/closing request is sent to server.

Implemented in SCR_TestEditorComponent.

◆ EOnEffect()

void SCR_BaseEditorComponent.EOnEffect ( SCR_BaseEditorEffect effect)
protected

When an effect is created in reaction an an event.

Implemented in SCR_PingEditorComponent, and SCR_TestEditorComponent.

◆ FindEditorComponent()

SCR_BaseEditorComponent SCR_BaseEditorComponent.FindEditorComponent ( TypeName type,
bool showError = false,
bool modeFirst = false )

Get the editor manager to which this component belongs.

Parameters
[in]type
[in]showError
[in]modeFirst
Returns
Editor manager

◆ GetAllInstances()

static int SCR_BaseEditorComponent.GetAllInstances ( TypeName type,
out notnull array< Managed > outComponents )
static

Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).

Parameters
[in]typeRequested component type
[out]outComponentsArray to be filled with components
Returns
Number of found components

◆ GetEditorComponentData()

EntityComponentPrefabData SCR_BaseEditorComponent.GetEditorComponentData ( )

Get prefab data of this component.

Returns
Prefab data

◆ GetInstance() [1/2]

static Managed SCR_BaseEditorComponent.GetInstance ( SCR_EditorBaseEntity editorManager,
TypeName type,
bool showError = false )
static

Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).

When not found on editor manager, it will be searched for in current editor mode (SCR_EditorModeEntity).

Parameters
[in]editorManagerEditor manager or mode which is searched
[in]typeRequested component type
[in]showErrorTrue to log a warning message when the component was not found (useful when the component is required by a script)
Returns
Component

◆ GetInstance() [2/2]

static Managed SCR_BaseEditorComponent.GetInstance ( TypeName type,
bool showError = false,
bool modeFirst = false )
static

Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).

When not found on editor manager, it will be searched for in current editor mode (SCR_EditorModeEntity).

Parameters
[in]typeRequested component type
[in]showErrorTrue to log a warning message when the component was not found
[in]modeFirstWhen true, search the component first on editor mode and then on editor manager. By default it's false, the other way around.
Returns
Component
Examples
c:/jenkins/cpu/workspace/ar_data_branches_stable_1.3.0/A4Data/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

◆ GetManager()

SCR_EditorManagerEntity SCR_BaseEditorComponent.GetManager ( )

Get editor manager this component belongs to.

Returns
Editor manager

◆ GetOnEffect()

ScriptInvoker SCR_BaseEditorComponent.GetOnEffect ( )

Get event called when an effect is activated.

Returns
Script invoker

◆ GetParentComponent()

SCR_BaseEditorComponent SCR_BaseEditorComponent.GetParentComponent ( )
protected

◆ InitOwner()

void SCR_BaseEditorComponent.InitOwner ( )

◆ InitServer()

void SCR_BaseEditorComponent.InitServer ( )

◆ IsAdmin()

bool SCR_BaseEditorComponent.IsAdmin ( )
protected

◆ IsMaster()

bool SCR_BaseEditorComponent.IsMaster ( )
protected

◆ IsOnEditorManager()

bool SCR_BaseEditorComponent.IsOnEditorManager ( )
protected

◆ IsOwner()

bool SCR_BaseEditorComponent.IsOwner ( )
protected

◆ IsProxy()

bool SCR_BaseEditorComponent.IsProxy ( )
protected

◆ IsRemoved()

bool SCR_BaseEditorComponent.IsRemoved ( )

Check if the component is being deleted.

Returns
True if entity is ready to be deleted

◆ OnActivateAsyncBase()

bool SCR_BaseEditorComponent.OnActivateAsyncBase ( int attempt)
sealed
Parameters
[in]attempt
Returns

◆ OnActivateBase()

void SCR_BaseEditorComponent.OnActivateBase ( )
sealed

◆ OnClosedBase()

void SCR_BaseEditorComponent.OnClosedBase ( )
sealed

◆ OnDeactivateAsyncBase()

bool SCR_BaseEditorComponent.OnDeactivateAsyncBase ( int attempt)
sealed
Parameters
[in]attempt
Returns

◆ OnDeactivateBase()

void SCR_BaseEditorComponent.OnDeactivateBase ( )
sealed

◆ OnDeleteBase()

void SCR_BaseEditorComponent.OnDeleteBase ( )
sealed

◆ OnEffectBase()

void SCR_BaseEditorComponent.OnEffectBase ( SCR_BaseEditorEffect effect)
sealed
Parameters
[in]effect

◆ OnInitBase()

void SCR_BaseEditorComponent.OnInitBase ( )
sealed

◆ OnOpenedBase()

void SCR_BaseEditorComponent.OnOpenedBase ( )
sealed

◆ OnPostActivateBase()

void SCR_BaseEditorComponent.OnPostActivateBase ( )
sealed

◆ OnPostDeactivateBase()

void SCR_BaseEditorComponent.OnPostDeactivateBase ( )
sealed

◆ OnPostInit()

override void SCR_BaseEditorComponent.OnPostInit ( IEntity owner)

Implemented in SCR_MapEditorComponent.

◆ OnPreActivateBase()

void SCR_BaseEditorComponent.OnPreActivateBase ( )
sealed

◆ OnRequestBase()

void SCR_BaseEditorComponent.OnRequestBase ( bool isOpen)
sealed
Parameters
[in]isOpen

◆ ResetEditorComponent()

void SCR_BaseEditorComponent.ResetEditorComponent ( )

Reset values controlled by the component.

To be overridden by child classes.

Implemented in SCR_CameraEditorComponent, SCR_CameraFiltersEditorComponent, and SCR_MenuOverlaysEditorComponent.

◆ SendNotification()

void SCR_BaseEditorComponent.SendNotification ( ENotification notificationID,
int selfID = 0,
int targetID = 0,
vector position = vector::Zero )
protected

◆ SetParentComponent()

void SCR_BaseEditorComponent.SetParentComponent ( SCR_BaseEditorComponent parent)
protected

Member Data Documentation

◆ m_Manager

SCR_EditorManagerEntity SCR_BaseEditorComponent.m_Manager
protected

◆ m_Owner

SCR_EditorBaseEntity SCR_BaseEditorComponent.m_Owner
protected

◆ m_Parent

SCR_BaseEditorComponent SCR_BaseEditorComponent.m_Parent
protected

◆ m_RplComponent

RplComponent SCR_BaseEditorComponent.m_RplComponent
protected

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