General Utilities

CSW::Get Substring Between

Given a Source String, obtain a Substring between FirstString and EndString
Example, in: "This is a -hello world/ string example" - If FirstString is "-" and EndString is "/" the result will be "hello world".

Inputs

Search In
String

SourceString where the search will be performed.

First String
String

The first string to find (Using FindSubstring()).

End String
String

The end string to find (Using FindSubstring()).

First Use Case
Boolean

The search of the FirstString will be case sensitive?

End Use Case
Boolean

The search of the EndString will be case sensitive?

First Search from End
Boolean

The search of the FirstString will be performed starting from the end of the SourceString?

End Search from End
Boolean

The search of the EndString will be performed starting from the end of the SourceString?

First Start Pos
Integer

The position to start the search from FirstString.

End Start Pos
Integer

The position to start the search from EndString.

Include First String
Boolean

Include the FirstString in the SubstringResult?

Include End String
Boolean

Include the EndString in the SubstringResult?

Outputs

Substring Result
String

Substring Result between the FirstString and the EndString.

CSW::Get All Actors With Component

Find all Actors in the world with the specified component.
This is a slow operation, use with caution e.g. do not use every frame.

Inputs

Component
Actor Component Class Reference

Component to find. Must be specified or result array will be empty.

Outputs

Out Actors
Array of Actor Object References

Output array of Actors that have specified component.

Out Actor Components
Array of Actor Component Object References

Output array of Actor Components that belongs to the array of actors.

CSW::Get All Actors With Component

Find all Actors in the world with the specified component (filtered by level names)
This is a slow operation, use with caution e.g. do not use every frame.

Inputs

Component
Actor Component Class Reference

Component to find. Must be specified or result array will be empty.

Level Name Array
Array of Names

Outputs

Out Actors
Array of Actor Object References

Output array of Actors that have specified component.

Out Actor Components
Array of Actor Component Object References

Output array of Actor Components that belongs to the array of actors.

CSW::Get Actor By ID Name and Class

Get an actor by IDName and Class in the world (hover the mouse in the world outliner to see the actor ID Name).
This is a slow operation, use with caution e.g. do not use every frame.

Inputs

IDName
Name

ID Name to find. Must be specified or the result will be nullptr.

Actor Class
Actor Class Reference

Class Filter of the actor, determines the OutputType.

Outputs

Return Value
Actor Object Reference

The Actor found.

CSW::Get Actor By ID Name From Array Of Actors

Get an actor by IDName from a given Array of Actors.

Inputs

IDName
Name

ID Name to find. Must be specified or the result will be nullptr.

Array Of Actors
Array of Actor Object References

The Array of Actors in which the search will be performed.

Outputs

Actor
Actor Object Reference

The Actor found.

Return Value
Integer

The Index of the array where the Actor was found (it's -1 if no actor was found).

CSW::Get Levels Names (Including Sublevels)

Get an array of FNames based on the levels currently loaded (including level streaming).
Caution: The names also contains the path of the level (Path/LevelName.UMAP...) .
So, if a Level is moved to another location, the name will be changed.

Inputs

Outputs

Current Level Name Array
Array of Names

CSW::Get Name From Level

Get the Level name (path/name) from the ULevel input reference (i.e obtained from CSW::GetLevelOwnerFromActor()).
You can use this name to load a level, stream load/unload, etc.

Inputs

Level
Level Object Reference

The Level reference.

Outputs

Return Value
Name

The name of the Level ("path/name").

CSW::Get Level Owner From Actor

Get the Level reference where the actor is loaded (supports level streaming).

Inputs

Actor
Actor Object Reference

The actor reference.

Outputs

Return Value
Level Object Reference

The Level reference where the actor belongs (supports level streaming).

CSW::Get Unique Actor Of Class

This function is not being used by the plugin but may be useful to someone.

Get an actor of this class, only if there's only one actor of this class in the world.
This is an slow operation. Use this function with caution, e.g do not use it every frame.

Inputs

Actor Class
Actor Class Reference

Class of the actor to return

Outputs

Return Value
Actor Object Reference

The reference of the actor, can be nullptr if there are none or two+ actors in the world.

CSW::Spawn Actor With a Name ID From Class

Spawn an Actor in the world with a given Name and Class.
CAUTION: Use it wisely, don't give an ID Name that already exists in the world or the previous Actor will be deleted.

Inputs

In
Exec

Class
Actor Class Reference

The class of the actor that will be spawned.

Spawn Transform
Transform (by ref)

Name ID
Name

The Given Name.

Outputs

Out
Exec

Return Value
Actor Object Reference

The Spawned Actor Reference.

Updated: