class
EditorUtility
Contains miscellaneous helper methods.
Public
Methods
staticCalculateBounds
Calculates world space bounds of the specified scene object.
This will consider components with bounds like Renderable.
staticCalculateBounds
Calculates world space bounds of the specified scene objects.
This will consider components with bounds like Renderable.
staticCalculateCenter
Calculates world space center of the specified scene objects.
staticGetEditorScene
Gets an editor scene instance associated with the provided object.
Returns null if none is found.
staticGetEditorScene
Gets an editor scene instance associated with the provided object.
Returns null if none is found.
staticOpenBrowseDialog
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
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).