class MAGES::Editor::Utilities::GenericUtilities¶
Overview¶
Generic Editor Utilities. More…
class GenericUtilities { public: // methods static async void RunTaskAndExecuteActionInMainEditorThreadWhenFinished( this Task task, Action onCompleted ); static async void RunTaskAndExecuteActionInMainEditorThreadWhenFinished< TResult >( this Tasktask, Action onCompleted ); static string GenerateUniqueAssetName( string folderPath, string nameWithExtension ); };
Detailed Documentation¶
Generic Editor Utilities.
Methods¶
static async void RunTaskAndExecuteActionInMainEditorThreadWhenFinished( this Task task, Action onCompleted )
Runs a task and executes an action in the main thread when finished.
Parameters:
TResult |
The task’s result. |
task |
The task to run. |
onCompleted |
The action to invoke when task is completed. |
static async void RunTaskAndExecuteActionInMainEditorThreadWhenFinished< TResult >( this Tasktask, Action onCompleted )
Runs a task and executes an action in the main thread when finished.
Parameters:
TResult |
The task’s result. |
task |
The task to run. |
onCompleted |
The action to invoke when task is completed. |
static string GenerateUniqueAssetName( string folderPath, string nameWithExtension )
Creates a unique asset name by adding a number next to the given nameWithExtension.
Parameters:
folderPath |
The folder at which the file will be located. |
nameWithExtension |
The original name of the file. |
Returns:
The unique asset name without the extension.