5 private ref array<ref SCR_BaseEditorEffect> m_EffectsActivate;
8 private ref array<ref SCR_BaseEditorEffect> m_EffectsDeactivate;
12 array<ref SCR_BaseEditorEffect> GetEffectsActivate()
14 return m_EffectsActivate;
19 array<ref SCR_BaseEditorEffect> GetEffectsDeactivate()
21 return m_EffectsDeactivate;
125 private bool m_bOpen;
368 static Managed
GetInstance(
typename type,
bool showError =
false,
bool modeFirst =
false)
375 Print(
string.Format(
"Cannot find editor component '%1', local instance of editor manager not found!",
type),
LogLevel.ERROR);
379 Managed component = editorManager.FindComponent(
type);
380 if (component && !modeFirst)
387 Managed componentMode = editorMode.FindComponent(
type);
390 return componentMode;
394 Print(
string.Format(
"Cannot find editor component '%1' on local instance of editor manager or on the curent editor mode!",
type),
LogLevel.ERROR);
399 Print(
string.Format(
"Cannot find editor component '%1' on local instance of editor manager, and no current editor mode exists!",
type),
LogLevel.ERROR);
413 Managed component = editorManager.FindComponent(
type);
421 editorManager = editorMode.GetManager();
425 return editorManager.FindComponent(
type);
435 outComponents.Clear();
441 Managed component = editorManager.FindComponent(
type);
443 outComponents.Insert(component);
445 array<SCR_EditorModeEntity> modeEntities = {};
446 int modesCount = editorManager.GetModeEntities(modeEntities);
447 for (
int i = 0; i < modesCount; i++)
449 component = modeEntities[i].FindComponent(
type);
451 outComponents.Insert(component);
453 return outComponents.Count();
466 manager =
m_Owner.GetManager();
484 Print(
string.Format(
"Cannot find editor component '%1', local instance of editor manager not found!",
type),
LogLevel.ERROR);
489 if (component && !modeFirst)
499 component = componentMode;
501 else if (showError && !component)
503 Print(
string.Format(
"Cannot find editor component '%1' on local instance of editor manager or on the curent editor mode!",
type),
LogLevel.ERROR);
506 else if (showError && !component)
508 Print(
string.Format(
"Cannot find editor component '%1' on local instance of editor manager, and no current editor mode exists!",
type),
LogLevel.ERROR);
601 SCR_NotificationsComponent.SendLocal(notificationID,
position, selfID, targetID);
615 if (
m_Owner.GetOnOpenedServer())
618 if (
m_Owner.GetOnOpenedServerCallback())
621 if (
m_Owner.GetOnActivateServer())
624 if (
m_Owner.GetOnDeactivateServer())
627 if (
m_Owner.GetOnClosedServer())
630 if (
m_Owner.GetOnClosedServerCallback())
691 Print(
"SCR_BaseEditorComponent must be attached to SCR_EditorBaseEntity!",
LogLevel.ERROR);
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_CharacterSoundComponentClass GetComponentData()
override int GetPlayerID()
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
proto external bool IsActive()
void SCR_BaseEditorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void EOnEditorDeleteServer()
When the entity is destroyed (called on server).
void EOnEditorOpen()
When the editor is opened.
void EOnEditorDelete()
When the entity is destroyed.
sealed void OnActivateBase()
sealed void OnRequestBase(bool isOpen)
sealed bool OnActivateAsyncBase(int attempt)
void EOnEditorCloseServerCallback()
When the editor is closed (called on server after async loading finished on client).
void EOnEditorPreActivate()
sealed void OnEffectBase(SCR_BaseEditorEffect effect)
ScriptInvoker GetOnEffect()
sealed void OnClosedBase()
void EOnEditorDeactivate()
SCR_BaseEditorComponent GetParentComponent()
SCR_EditorManagerEntity m_Manager
sealed void OnOpenedBase()
void SetParentComponent(SCR_BaseEditorComponent parent)
void EOnEditorDeactivateServer()
void EOnEffect(SCR_BaseEditorEffect effect)
When an effect is created in reaction an an event.
bool EOnEditorActivateAsync(int attempt)
void EOnEditorCloseServer()
When the editor is closed (called on server).
static int GetAllInstances(typename type, out notnull array< Managed > outComponents)
static Managed GetInstance(typename type, bool showError=false, bool modeFirst=false)
void EOnEditorInit()
When the entity is created.
void ResetEditorComponent()
void EOnEditorInitServer()
When the entity is created (called on server).
void ~SCR_BaseEditorComponent()
EntityComponentPrefabData GetEditorComponentData()
void SendNotification(ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
void EOnEditorRequest(bool isOpen)
When opening/closing request is sent to server.
void EOnEditorOpenServer()
When the editor is opened (called on server).
sealed void OnDeleteBase()
sealed void OnPostDeactivateBase()
void EOnEditorDebug(array< string > debugTexts)
Every frame while the editor is opened and debug menu is shown.
static Managed GetInstance(SCR_EditorBaseEntity editorManager, typename type, bool showError=false)
void EOnEditorClose()
When the editor is closed.
sealed void OnPreActivateBase()
SCR_BaseEditorComponent m_Parent
SCR_BaseEditorComponent FindEditorComponent(typename type, bool showError=false, bool modeFirst=false)
void EOnEditorPostActivate()
When the component is activated, but after EOnEditorActivate() function was called in all components.
void EOnEditorOpenServerCallback()
When the editor is opened (called on server after async loading finished on client).
override void OnPostInit(IEntity owner)
SCR_EditorManagerEntity GetManager()
bool EOnEditorDeactivateAsync(int attempt)
sealed void OnDeactivateBase()
void EOnEditorActivateServer()
void EOnEditorPostDeactivate()
When the component is deactivated, but after the next mode is activated.
RplComponent m_RplComponent
SCR_EditorBaseEntity m_Owner
sealed bool OnDeactivateAsyncBase(int attempt)
sealed void OnPostActivateBase()
static bool IsAdmin(int playerID)
proto external GenericEntity GetOwner()
Get owner entity.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute