25 event protected bool RplSave(ScriptBitWriter writer);
38 proto external
void Show(
bool show);
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
event int _WB_GetAnchorCount(IEntitySource src)
Returns how many anchor points does this entity have at this time.
event void _WB_GetBoundBox(inout vector min, inout vector max, IEntitySource src)
Editor needs to know a bound box of entity (For ray-casting, visualizers etc.). You can return any cu...
void OnTransformResetImpl(TransformResetParams params)
static event bool Preload(IEntitySource src)
event void _WB_OnRename(IEntitySource src, string oldName)
This entity has been renamed. You can use editor API here and do some additional edit actions which w...
event array< ref WB_UIMenuItem > _WB_GetContextMenuItems()
An opportunity to append items into editor's "Entity" context menu. Do not call editor API here!
event bool _WB_OnPhysSimulPlacementBegin(IEntitySource src)
Does this entity support editing transformation using physics simulation? Do not call editor API here...
event bool _WB_CanCopy(IEntitySource src)
Editor needs to know if this entity can be copied. Do not call editor API here!
event bool _WB_CanAnchorSnap(IEntitySource thisSrc, int thisAnchor, IEntitySource otherSrc, int otherAnchor, bool isReceiver)
event void _WB_OnCreate(IEntitySource src)
Called after entity gets created in map during editing or when deleted entity gets restored after und...
event void _WB_AfterWorldUpdate(float timeSlice)
Called after updating world in Workbench. The entity must be visible in frustum, selected or named....
void EOnActivate(IEntity owner)
event IEntity _WB_GetEditableOwner()
Editor needs to know if there is any entity which manages this one and is editable.
event bool _WB_CanSelect(IEntitySource src)
Editor needs to know whether this entity can be selected in scene window or not.
proto external void OnTransformReset(bool isCorrection=false, vector newVelocity=vector.Zero)
proto external WorldEditorAPI _WB_GetEditorAPI()
This returns world editor API, which is safe to use from editor events bellow.
event void _WB_OnParentChange(IEntitySource src, IEntitySource prevParentSrc)
Parent entity has been changed ( it's available through src->GetParent() ). prevParentSrc is a pointe...
bool RplSave(ScriptBitWriter writer)
bool RplLoad(ScriptBitReader reader)
event bool _WB_CanDelete(IEntitySource src)
Editor needs to know if this entity can to be deleted. Do not call editor API here!
proto external void Show(bool show)
event bool _WB_ShouldShowBoundBox(IEntitySource src)
Returns true if bound box should be visible when entity is hovered/selected in WB.
event bool _WB_OnKeyChanged(BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
Any property value has been changed. You can use editor API here and do some additional edit actions ...
event bool _WB_CanRename(IEntitySource src)
Editor needs to know if this entity can to be renamed. Do not call editor API here!
static proto void GetMatrixFromSource(BaseWorld world, IEntitySource src, bool withScale, out vector mat[4])
void DisconnectFromDiagSystem()
event int _WB_GetAfterWorldUpdateSpecs(IEntitySource src)
Called after _WB_OnInit or also later when editor needs to know whether _WB_AfterWorldUpdate needs to...
event void _WB_OnInit(inout vector mat[4], IEntitySource src)
Called always after entity creation. It's purpose is to prepare entity for editing....
proto external void Deactivate()
event void _WB_MakeVisible(IEntitySource src, bool visible)
Editor needs to have entity visible or not. Do not call editor API here!
event void _WB_SetTransform(inout vector mat[4], IEntitySource src)
Editor changed transformation matrix source. This is the place to apply it on entity....
event bool _WB_IsTraceable(IEntitySource src)
Editor needs to know whether this entity is traceable at selecting entities in scene.
event void _WB_OnContextMenu(int id)
User has chosen any of your menu item from editor's "Entity" menu which you have recently provided in...
void EOnDeactivate(IEntity owner)
event void _WB_GetAnchor(inout vector position, IEntitySource src, int index)
Fills position of anchor at index index to anchorPosition.
event void _WB_SetExtraVisualiser(EntityVisualizerType type, IEntitySource src)
If entity needs to have a special visualizer instead of default one, here is the place where you can ...
event bool _WB_EnablePhysics(IEntitySource src, bool physics)
Prepare to edit transformation using physics simulation. Return previous status. Do not call editor A...
event void _WB_OnKeyDown(int keyCode)
User pressed a key and this entity is main member of entity selection. You can use editor API here an...
event array< ref ParamEnum > _WB_GetUserEnums(string varName, IEntitySource src)
Possibility to get variable value choices dynamically. Do not call editor API here!
event void _WB_OnAnchorSnapped(IEntitySource thisSrc, int thisAnchor, IEntitySource otherSrc, int otherAnchor, bool isReceiver)
event void _WB_OnDelete(IEntitySource src)
This entity is going to be deleted. You can use editor API here and do some additional edit actions w...
void EOnDiag(IEntity owner, float timeSlice)
void ConnectToDiagSystem()
proto external void Activate()
event bool _WB_GetKeySpaceMatrixWorld(BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent, out vector transformSpaceWorld[4])
Some "coords" or "angles" vector property is being to be edited. Entity can provide a world matrix wh...
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
EntityVisualizerType
Game editor entity visualizer type.