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

Static Public Member Functions

static ResourceManager GetResourceManager ()
 Get the ResourceManager object.
 
static WorldEditor GetWorldEditor ()
 Get the WorldEditor object.
 
static WorldEditorAPI GetWorldEditorAPI ()
 Get the World Editor API.
 
static IEntitySource GetPrefabEditModeEntitySource ()
 Return the currently opened Prefab's entity with Edit Prefab button in Resource Manager.
 
static ResourceName GetPrefabEditModeResourceName ()
 Return the currently opened Prefab's entity with Edit Prefab button in Resource Manager.
 
static ResourceName GetResourceNameFromFile (string absoluteFilePath)
 Get a registered file's ResourceName (requires the .meta file)
 
static array< ResourceName > GetSelectedDirectories ()
 Get selected directories - does not get subdirectories, only selected ones (in their order of selection)
 
static array< ResourceName > GetSelectedOrOpenedResources (string wantedExtension, array< string > keywords=null)
 Wrapper for the method below.
 
static array< IEntitySource > GetSelectedWorldEntitySources ()
 
static array< ResourceName > GetSelectedOrOpenedResources (array< string > acceptedExtensions=null, array< string > keywords=null)
 Get selected or opened resources.
 
static array< ResourceName > GetSelectedResources (bool recursive=true)
 Get all ResourceName that are selected in the Resource Browser.
 
static array< ResourceName > SearchWorkbenchResources (array< string > fileExtensions=null, array< string > searchStrArray=null, string rootPath="", bool recursive=true)
 Search Workbench-available files by extension and filters inside a provided directory.
 
static void DeleteEntityFromSource (IEntitySource entitySource)
 Delete the entitySource's entity IF it exists \entitySource can be null.
 
static bool BeginEntityAction ()
 Begin an Entity Action in World Editor API if required.
 
static void EndEntityAction (bool manageEditAction)
 End an Entity Action in World Editor API if required.
 
static array< IEntity > QueryEntitiesByAABB (notnull World world, vector mins, vector maxs, EQueryEntitiesFlags queryFlags=EQueryEntitiesFlags.ALL)
 Queries entities within an AABB in the world, returns results in an array.
 
static array< IEntity > QueryEntitiesBySphere (notnull World world, vector worldPos, float radius, EQueryEntitiesFlags queryFlags=EQueryEntitiesFlags.ALL)
 Queries entities within a sphere in the world, returns them in an array.
 
static array< IEntity > TraceMoveEntitiesBySphere (notnull World world, notnull TraceSphere traceSphere)
 Return all entities found by moved sphere trace.
 
static array< IEntity > TracePositionEntitiesBySphere (notnull World world, notnull TraceSphere traceSphere)
 Return all entities found by sphere trace.
 

Static Protected Member Functions

static bool QueryEntitiesCallbackMethod (IEntity e)
 QueryEntitiesCallback method used for Entity querying.
 
static bool TraceCallbackMethod (notnull IEntity e, vector start="0 0 0", vector dir="0 0 0")
 TraceEntitiesCallback method used for World tracing.
 

Static Protected Attributes

static ref array< IEntity > s_aTempEntities
 

Member Function Documentation

◆ BeginEntityAction()

static bool SCR_WorldEditorToolHelper.BeginEntityAction ( )
static

Begin an Entity Action in World Editor API if required.

Returns
true if a BeginEntityAction has been called and EndEntityAction has to be called by EndEntityAction(), false otherwise

◆ DeleteEntityFromSource()

static void SCR_WorldEditorToolHelper.DeleteEntityFromSource ( IEntitySource entitySource)
static

Delete the entitySource's entity IF it exists \entitySource can be null.

◆ EndEntityAction()

static void SCR_WorldEditorToolHelper.EndEntityAction ( bool manageEditAction)
static

End an Entity Action in World Editor API if required.

Parameters
[in]manageEditActionif World Editor Entity Action should be terminated, result of an earlier BeginEntityAction call

◆ GetPrefabEditModeEntitySource()

static IEntitySource SCR_WorldEditorToolHelper.GetPrefabEditModeEntitySource ( )
static

Return the currently opened Prefab's entity with Edit Prefab button in Resource Manager.

Returns
the entity's source, null if error

◆ GetPrefabEditModeResourceName()

static ResourceName SCR_WorldEditorToolHelper.GetPrefabEditModeResourceName ( )
static

Return the currently opened Prefab's entity with Edit Prefab button in Resource Manager.

Returns
the entity's source, null if error

◆ GetResourceManager()

static ResourceManager SCR_WorldEditorToolHelper.GetResourceManager ( )
static

Get the ResourceManager object.

Returns
available ResourceManager or null if unavailable

◆ GetResourceNameFromFile()

static ResourceName SCR_WorldEditorToolHelper.GetResourceNameFromFile ( string absoluteFilePath)
static

Get a registered file's ResourceName (requires the .meta file)

Returns
the registered file's ResourceName

◆ GetSelectedDirectories()

static array< ResourceName > SCR_WorldEditorToolHelper.GetSelectedDirectories ( )
static

Get selected directories - does not get subdirectories, only selected ones (in their order of selection)

Returns
resource names of directory that are selected in World Editor's Resource Browser

◆ GetSelectedOrOpenedResources() [1/2]

static array< ResourceName > SCR_WorldEditorToolHelper.GetSelectedOrOpenedResources ( array< string > acceptedExtensions = null,
array< string > keywords = null )
static

Get selected or opened resources.

Parameters
[in]acceptedExtensionsaccepted extensions (case-insensitive)
[in]keywordswords that should be present in the file name (case-insensitive)
Returns
an array of found ResourceNames - cannot be null

◆ GetSelectedOrOpenedResources() [2/2]

static array< ResourceName > SCR_WorldEditorToolHelper.GetSelectedOrOpenedResources ( string wantedExtension,
array< string > keywords = null )
static

Wrapper for the method below.

Parameters
[in]wantedExtension(case-insensitive)
[in]keywordswords that should be present in the file name (case-insensitive)
Returns
an array of found ResourceNames - cannot be null

◆ GetSelectedResources()

static array< ResourceName > SCR_WorldEditorToolHelper.GetSelectedResources ( bool recursive = true)
static

Get all ResourceName that are selected in the Resource Browser.

Parameters
[in]recursivetrue to get a selected directory's files, false to stop at the directory
Returns
array of ResourceName of selected resources or null on error (e.g World Editor is not available)

◆ GetSelectedWorldEntitySources()

static array< IEntitySource > SCR_WorldEditorToolHelper.GetSelectedWorldEntitySources ( )
static
Returns
an array of selected entities's IEntitySources, null on error (e.g WorldEditorAPI not available)

◆ GetWorldEditor()

static WorldEditor SCR_WorldEditorToolHelper.GetWorldEditor ( )
static

Get the WorldEditor object.

Returns
available WorldEditor or null if unavailable

◆ GetWorldEditorAPI()

static WorldEditorAPI SCR_WorldEditorToolHelper.GetWorldEditorAPI ( )
static

Get the World Editor API.

Returns
available WorldEditorAPI or null if unavailable

◆ QueryEntitiesByAABB()

static array< IEntity > SCR_WorldEditorToolHelper.QueryEntitiesByAABB ( notnull World world,
vector mins,
vector maxs,
EQueryEntitiesFlags queryFlags = EQueryEntitiesFlags::ALL )
static

Queries entities within an AABB in the world, returns results in an array.

Parameters
[in]worldrepresents the game's environment in which entities exist, used for querying entities within an Axis-Aligned Bounding Box
[in]minsmin bounds for an axis-aligned bounding box (AABB) query in 3D space
[in]maxsmax bounds for an axis-aligned bounding box (AABB) query in 3D space
[in]queryFlagsis an enumeration representing filter options for entity query in AABB - see BaseWorld.QueryEntitiesByAABB
Returns
an array of entities within the specified AABB (Axis-Aligned Bounding Box) in the world or null on QueryEntitiesByAABB error

◆ QueryEntitiesBySphere()

static array< IEntity > SCR_WorldEditorToolHelper.QueryEntitiesBySphere ( notnull World world,
vector worldPos,
float radius,
EQueryEntitiesFlags queryFlags = EQueryEntitiesFlags::ALL )
static

Queries entities within a sphere in the world, returns them in an array.

Parameters
[in]worldWorld represents the game's environment in which entities exist, used for querying entities within a specified sphere radius in the method
[in]worldPosrepresents the center point for the sphere query in 3D space
[in]radiusrepresents the distance from the center point (worldPos) within which entities are searched in the method
[in]queryFlagsspecifies query flags for entity selection criteria - see BaseWorld.QueryEntitiesBySphere
Returns
an array of entities within specified radius from world position

◆ QueryEntitiesCallbackMethod()

static bool SCR_WorldEditorToolHelper.QueryEntitiesCallbackMethod ( IEntity e)
staticprotected

QueryEntitiesCallback method used for Entity querying.

◆ SearchWorkbenchResources()

static array< ResourceName > SCR_WorldEditorToolHelper.SearchWorkbenchResources ( array< string > fileExtensions = null,
array< string > searchStrArray = null,
string rootPath = "",
bool recursive = true )
static

Search Workbench-available files by extension and filters inside a provided directory.

Parameters
[in]fileExtensions
[in]searchStrArray
[in]rootPathformat $addon:Workbench/Directory
[in]recursive
Returns
found resources

◆ TraceCallbackMethod()

static bool SCR_WorldEditorToolHelper.TraceCallbackMethod ( notnull IEntity e,
vector start = "0 0 0",
vector dir = "0 0 0" )
staticprotected

TraceEntitiesCallback method used for World tracing.

◆ TraceMoveEntitiesBySphere()

static array< IEntity > SCR_WorldEditorToolHelper.TraceMoveEntitiesBySphere ( notnull World world,
notnull TraceSphere traceSphere )
static

Return all entities found by moved sphere trace.

Parameters
[in]traceSphere
[in]world
Returns
found entities or null on error

◆ TracePositionEntitiesBySphere()

static array< IEntity > SCR_WorldEditorToolHelper.TracePositionEntitiesBySphere ( notnull World world,
notnull TraceSphere traceSphere )
static

Return all entities found by sphere trace.

Parameters
[in]traceSphere
[in]world
Returns
found entities or null on error

Member Data Documentation

◆ s_aTempEntities

ref array<IEntity> SCR_WorldEditorToolHelper.s_aTempEntities
staticprotected

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