C# Class UnityEditor.EditorUtility

ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Private Properties

Property Type Description
BuildResourceFile bool
ClearProgressBar void
CollectDeepHierarchy Object[]
CollectDependencies Object[]
CompressTexture void
CompressTexture void
CopySerialized void
CreateEmptyPrefab Object
DisplayCancelableProgressBar bool
DisplayCustomMenu void
DisplayCustomMenu void
DisplayCustomMenu void
DisplayCustomMenu void
DisplayCustomMenuWithSeparators void
DisplayCustomMenuWithSeparators void
DisplayCustomMenuWithSeparators void
DisplayCustomMenuWithSeparators void
DisplayDialog bool
DisplayDialog bool
DisplayDialogComplex int
DisplayObjectContextMenu void
DisplayProgressBar void
ExtractOggFile bool
FindAsset Object
FindPrefabRoot UnityEngine.GameObject
FocusProjectWindow void
ForceRebuildInspectors void
ForceReloadInspectors void
FormatBytes string
GetActiveNativePlatformSupportModuleName string
GetAssetPath string
GetDirtyIndex int
GetInvalidFilenameChars string
GetObjectEnabled int
GetPrefabParent Object
GetPrefabType PrefabType
INTERNAL_CALL_Internal_DisplayObjectContextMenu void
INTERNAL_CALL_Internal_InstantiateRemoveAllNonAnimationComponentsSingle Object
INTERNAL_CALL_Private_DisplayCustomMenu void
INTERNAL_CALL_Private_DisplayPopupMenu void
InitInstantiatedPreviewRecursive void
InstanceIDToObject Object
InstantiateForAnimatorPreview UnityEngine.GameObject
InstantiatePrefab Object
InstantiateRemoveAllNonAnimationComponents Object
InternalCopySerializedIfDifferent void
Internal_CreateGameObjectWithHideFlags UnityEngine.GameObject
Internal_DisplayCustomMenu void
Internal_DisplayObjectContextMenu void
Internal_DisplayPopupMenu void
Internal_InstantiateRemoveAllNonAnimationComponentsSingle Object
Internal_SaveFilePanelInProject string
Internal_UpdateAllMenus void
Internal_UpdateMenuTitleForLanguage void
InvokeDiffTool string
IsDirty bool
IsPersistent bool
LoadPlatformSupportModuleNativeDllInternal void
LoadPlatformSupportNativeLibrary void
NaturalCompare int
NaturalCompareObjectNames int
OpenFilePanel string
OpenFilePanelWithFilters string
OpenFolderPanel string
OpenWithDefaultApp void
Private_DisplayCustomMenu void
Private_DisplayPopupMenu void
ReconnectToLastPrefab bool
ReplacePrefab GameObject
ReplacePrefab GameObject
ResetMouseDown void
ResetToPrefabState bool
RevealInFinder void
SaveBuildPanel string
SaveFilePanel string
SaveFolderPanel string
SetCameraAnimateMaterials void
SetDirty void
SetObjectEnabled void
SetSelectedRenderState void
SetSelectedWireframeHidden void
UnloadUnusedAssets void
UnloadUnusedAssetsIgnoreManagedReferences void
UnloadUnusedAssetsImmediateInternal void
WSACreateTestCertificate bool
WarnPrefab bool

Public Methods

Method Description
CompileCSharp ( string sources, string references, string defines, string outputFile ) : string[]
CompressTexture ( Texture2D texture, TextureFormat format, TextureCompressionQuality quality ) : void

Compress a texture.

CopySerializedIfDifferent ( Object source, Object dest ) : void

Copy all settings of a Unity Object to a second Object if they differ.

CreateGameObjectWithHideFlags ( string name, HideFlags flags ) : GameObject

Creates a game object with HideFlags and specified components.

DisplayCustomMenu ( Rect position, GUIContent options, int selected, SelectMenuItemFunction callback, object userData ) : void
DisplayCustomMenu ( Rect position, GUIContent options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
DisplayPopupMenu ( Rect position, string menuItemPath, MenuCommand command ) : void

Displays a popup menu.

FormatBytes ( int bytes ) : string

Returns a text for a number of bytes.

LoadWindowLayout ( string path ) : bool
SaveFilePanelInProject ( string title, string defaultName, string extension, string message ) : string

Displays the "save file" dialog in the Assets folder of the project and returns the selected path name.

SaveFilePanelInProject ( string title, string defaultName, string extension, string message, string path ) : string
UnloadUnusedAssetsImmediate ( ) : void

Unloads assets that are not used.

UnloadUnusedAssetsImmediate ( bool includeMonoReferencesAsRoots ) : void

Private Methods

Method Description
BuildResourceFile ( Object selection, string pathName ) : bool
ClearProgressBar ( ) : void
CollectDeepHierarchy ( Object roots ) : Object[]
CollectDependencies ( Object roots ) : Object[]
CompressTexture ( Texture2D texture, TextureFormat format ) : void
CompressTexture ( Texture2D texture, TextureFormat format, int quality ) : void
CopySerialized ( Object source, Object dest ) : void
CreateEmptyPrefab ( string path ) : Object
DisplayCancelableProgressBar ( string title, string info, float progress ) : bool
DisplayCustomMenu ( Rect position, string options, bool enabled, int selected, SelectMenuItemFunction callback, object userData ) : void
DisplayCustomMenu ( Rect position, string options, bool enabled, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
DisplayCustomMenu ( Rect position, string options, int selected, SelectMenuItemFunction callback, object userData ) : void
DisplayCustomMenu ( Rect position, string options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
DisplayCustomMenuWithSeparators ( Rect position, string options, bool enabled, bool separator, int selected, SelectMenuItemFunction callback, object userData ) : void
DisplayCustomMenuWithSeparators ( Rect position, string options, bool enabled, bool separator, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
DisplayCustomMenuWithSeparators ( Rect position, string options, bool separator, int selected, SelectMenuItemFunction callback, object userData ) : void
DisplayCustomMenuWithSeparators ( Rect position, string options, bool separator, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
DisplayDialog ( string title, string message, string ok ) : bool
DisplayDialog ( string title, string message, string ok, [ cancel ) : bool
DisplayDialogComplex ( string title, string message, string ok, string cancel, string alt ) : int
DisplayObjectContextMenu ( Rect position, Object context, int contextUserData ) : void
DisplayProgressBar ( string title, string info, float progress ) : void
ExtractOggFile ( Object obj, string path ) : bool
FindAsset ( string path, Type type ) : Object
FindPrefabRoot ( GameObject source ) : GameObject
FocusProjectWindow ( ) : void
ForceRebuildInspectors ( ) : void
ForceReloadInspectors ( ) : void
FormatBytes ( long bytes ) : string
GetActiveNativePlatformSupportModuleName ( ) : string
GetAssetPath ( Object asset ) : string
GetDirtyIndex ( int instanceID ) : int
GetInvalidFilenameChars ( ) : string
GetObjectEnabled ( Object target ) : int
GetPrefabParent ( Object source ) : Object
GetPrefabType ( Object target ) : PrefabType
INTERNAL_CALL_Internal_DisplayObjectContextMenu ( Rect &position, Object context, int contextUserData ) : void
INTERNAL_CALL_Internal_InstantiateRemoveAllNonAnimationComponentsSingle ( Object data, Vector3 &pos, Quaternion &rot ) : Object
INTERNAL_CALL_Private_DisplayCustomMenu ( Rect &screenPosition, string options, int enabled, int separator, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
INTERNAL_CALL_Private_DisplayPopupMenu ( Rect &position, string menuItemPath, Object context, int contextUserData ) : void
InitInstantiatedPreviewRecursive ( GameObject go ) : void
InstanceIDToObject ( int instanceID ) : Object
InstantiateForAnimatorPreview ( Object original ) : GameObject
InstantiatePrefab ( Object target ) : Object
InstantiateRemoveAllNonAnimationComponents ( Object original, Vector3 position, Quaternion rotation ) : Object
InternalCopySerializedIfDifferent ( Object source, Object dest ) : void
Internal_CreateGameObjectWithHideFlags ( string name, HideFlags flags ) : GameObject
Internal_DisplayCustomMenu ( Rect screenPosition, string options, int enabled, int separator, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
Internal_DisplayObjectContextMenu ( Rect position, Object context, int contextUserData ) : void
Internal_DisplayPopupMenu ( Rect position, string menuItemPath, Object context, int contextUserData ) : void
Internal_InstantiateRemoveAllNonAnimationComponentsSingle ( Object data, Vector3 pos, Quaternion rot ) : Object
Internal_SaveFilePanelInProject ( string title, string defaultName, string extension, string message, string path ) : string
Internal_UpdateAllMenus ( ) : void
Internal_UpdateMenuTitleForLanguage ( SystemLanguage newloc ) : void
InvokeDiffTool ( string leftTitle, string leftFile, string rightTitle, string rightFile, string ancestorTitle, string ancestorFile ) : string
IsDirty ( int instanceID ) : bool
IsPersistent ( Object target ) : bool
LoadPlatformSupportModuleNativeDllInternal ( string target ) : void
LoadPlatformSupportNativeLibrary ( string nativeLibrary ) : void
NaturalCompare ( string a, string b ) : int
NaturalCompareObjectNames ( Object a, Object b ) : int
OpenFilePanel ( string title, string directory, string extension ) : string
OpenFilePanelWithFilters ( string title, string directory, string filters ) : string
OpenFolderPanel ( string title, string folder, string defaultName ) : string
OpenWithDefaultApp ( string fileName ) : void
Private_DisplayCustomMenu ( Rect screenPosition, string options, int enabled, int separator, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
Private_DisplayPopupMenu ( Rect position, string menuItemPath, Object context, int contextUserData ) : void
ReconnectToLastPrefab ( GameObject go ) : bool
ReplacePrefab ( GameObject go, Object targetPrefab ) : GameObject
ReplacePrefab ( GameObject go, Object targetPrefab, ReplacePrefabOptions options ) : GameObject
ResetMouseDown ( ) : void
ResetToPrefabState ( Object source ) : bool
RevealInFinder ( string path ) : void
SaveBuildPanel ( BuildTarget target, string title, string directory, string defaultName, string extension, bool &updateExistingBuild ) : string
SaveFilePanel ( string title, string directory, string defaultName, string extension ) : string
SaveFolderPanel ( string title, string folder, string defaultName ) : string
SetCameraAnimateMaterials ( Camera camera, bool animate ) : void
SetDirty ( Object target ) : void
SetObjectEnabled ( Object target, bool enabled ) : void
SetSelectedRenderState ( Renderer renderer, EditorSelectedRenderState renderState ) : void
SetSelectedWireframeHidden ( Renderer renderer, bool enabled ) : void
UnloadUnusedAssets ( ) : void
UnloadUnusedAssetsIgnoreManagedReferences ( ) : void
UnloadUnusedAssetsImmediateInternal ( bool includeMonoReferencesAsRoots ) : void
WSACreateTestCertificate ( string path, string publisher, string password, bool overwrite ) : bool
WarnPrefab ( Object target, string title, string warning, string okButton ) : bool

Method Details

CompileCSharp() public static method

public static CompileCSharp ( string sources, string references, string defines, string outputFile ) : string[]
sources string
references string
defines string
outputFile string
return string[]

CompressTexture() public static method

Compress a texture.

public static CompressTexture ( Texture2D texture, TextureFormat format, TextureCompressionQuality quality ) : void
texture UnityEngine.Texture2D
format TextureFormat
quality TextureCompressionQuality
return void

CopySerializedIfDifferent() public static method

Copy all settings of a Unity Object to a second Object if they differ.

public static CopySerializedIfDifferent ( Object source, Object dest ) : void
source Object
dest Object
return void

CreateGameObjectWithHideFlags() public static method

Creates a game object with HideFlags and specified components.

public static CreateGameObjectWithHideFlags ( string name, HideFlags flags ) : GameObject
name string
flags HideFlags
return UnityEngine.GameObject

DisplayCustomMenu() public static method

public static DisplayCustomMenu ( Rect position, GUIContent options, int selected, SelectMenuItemFunction callback, object userData ) : void
position UnityEngine.Rect
options UnityEngine.GUIContent
selected int
callback SelectMenuItemFunction
userData object
return void

DisplayCustomMenu() public static method

public static DisplayCustomMenu ( Rect position, GUIContent options, int selected, SelectMenuItemFunction callback, object userData, bool showHotkey ) : void
position UnityEngine.Rect
options UnityEngine.GUIContent
selected int
callback SelectMenuItemFunction
userData object
showHotkey bool
return void

DisplayPopupMenu() public static method

Displays a popup menu.

public static DisplayPopupMenu ( Rect position, string menuItemPath, MenuCommand command ) : void
position UnityEngine.Rect
menuItemPath string
command MenuCommand
return void

FormatBytes() public static method

Returns a text for a number of bytes.

public static FormatBytes ( int bytes ) : string
bytes int
return string

LoadWindowLayout() public static method

public static LoadWindowLayout ( string path ) : bool
path string
return bool

SaveFilePanelInProject() public static method

Displays the "save file" dialog in the Assets folder of the project and returns the selected path name.

public static SaveFilePanelInProject ( string title, string defaultName, string extension, string message ) : string
title string
defaultName string
extension string
message string
return string

SaveFilePanelInProject() public static method

public static SaveFilePanelInProject ( string title, string defaultName, string extension, string message, string path ) : string
title string
defaultName string
extension string
message string
path string
return string

UnloadUnusedAssetsImmediate() public static method

Unloads assets that are not used.

public static UnloadUnusedAssetsImmediate ( ) : void
return void

UnloadUnusedAssetsImmediate() public static method

public static UnloadUnusedAssetsImmediate ( bool includeMonoReferencesAsRoots ) : void
includeMonoReferencesAsRoots bool
return void