class EditorUtility

Contains miscellaneous helper methods.

Public

Methods

staticCalculateBounds

static AABox CalculateBounds(const HSceneObject &scceneObject)

Calculates world space bounds of the specified scene object.

This will consider components with bounds like Renderable.

staticCalculateBounds

static AABox CalculateBounds(const Vector<HSceneObject> &objects)

Calculates world space bounds of the specified scene objects.

This will consider components with bounds like Renderable.

staticCalculateCenter

static Vector3 CalculateCenter(const Vector<HSceneObject> &objects)

Calculates world space center of the specified scene objects.

staticGetEditorScene

static SPtr<EditorSceneInstance> GetEditorScene(const HSceneObject &sceneObject)

Gets an editor scene instance associated with the provided object.

Returns null if none is found.

staticGetEditorScene

static SPtr<EditorSceneInstance> GetEditorScene(const SPtr<SceneInstance> &scene)

Gets an editor scene instance associated with the provided object.

Returns null if none is found.

staticOpenBrowseDialog

static bool OpenBrowseDialog(FileDialogType type, const Path &defaultPath, const String &filterList, Vector<Path> &paths)

Displays a platform specific file/folder open/save dialog.

type
Type of dialog to open.
defaultPath
Initial path the dialog will be set to once opened.
filterList
Semi-colon separated list of file names or types to display in the dialog, for example ".exe;.txt;*.png". Ignored if dialog is to display folders instead of files.
paths
Output list of selected file or folder paths (if any).

Returns: True if file was selected and false if selection was canceled.

Private

Methods

staticCalculateMeshBounds

static bool CalculateMeshBounds(const HSceneObject &object, AABox &bounds)

Retrieves all components containing meshes on the specified object and outputs their bounds.

object
Object to calculate bounds for.
bounds
Output bounds, if successful.

Returns: True if a mesh component was found, otherwise false (bounds will not be updated).