C# 클래스 UnityEditor.AssetPreview

Utility for fetching asset previews by instance ID of assets, See AssetPreview.GetAssetPreview. Since previews are loaded asynchronously methods are provided for requesting if all previews have been fully loaded, see AssetPreview.IsLoadingAssetPreviews. Loaded previews are stored in a cache, the size of the cache can be controlled by calling [AssetPreview.SetPreviewTextureCacheSize].

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

공개 메소드들

메소드 설명
GetAssetPreview ( Object asset ) : Texture2D

Returns a preview texture for an asset.

GetMiniTypeThumbnail ( Type type ) : Texture2D

Returns the thumbnail for the type.

IsLoadingAssetPreview ( int instanceID ) : bool

Loading previews is asynchronous so it is useful to know if a specific asset preview is in the process of being loaded so client code e.g can repaint while waiting for the loading to finish.

IsLoadingAssetPreviews ( ) : bool

Loading previews is asynchronous so it is useful to know if any requested previews are in the process of being loaded so client code e.g can repaint while waiting.

SetPreviewTextureCacheSize ( int size ) : void

Set the asset preview cache to a size that can hold all visible previews on the screen at once.

비공개 메소드들

메소드 설명
ClearTemporaryAssetPreviews ( ) : void
DeletePreviewTextureManagerByID ( int clientID ) : void
GetAssetPreview ( int instanceID ) : Texture2D
GetAssetPreview ( int instanceID, int clientID ) : Texture2D
GetMiniThumbnail ( Object obj ) : Texture2D
GetMiniTypeThumbnail ( Object obj ) : Texture2D
GetMiniTypeThumbnailFromClassID ( int classID ) : Texture2D
HasAnyNewPreviewTexturesAvailable ( ) : bool
HasAnyNewPreviewTexturesAvailable ( int clientID ) : bool
INTERNAL_GetMiniTypeThumbnailFromObject ( Object monoObj ) : Texture2D
INTERNAL_GetMiniTypeThumbnailFromType ( Type managedType ) : Texture2D
IsLoadingAssetPreview ( int instanceID, int clientID ) : bool
IsLoadingAssetPreviews ( int clientID ) : bool
SetPreviewTextureCacheSize ( int size, int clientID ) : void

메소드 상세

GetAssetPreview() 공개 정적인 메소드

Returns a preview texture for an asset.

public static GetAssetPreview ( Object asset ) : Texture2D
asset Object
리턴 UnityEngine.Texture2D

GetMiniTypeThumbnail() 공개 정적인 메소드

Returns the thumbnail for the type.

public static GetMiniTypeThumbnail ( Type type ) : Texture2D
type System.Type
리턴 UnityEngine.Texture2D

IsLoadingAssetPreview() 공개 정적인 메소드

Loading previews is asynchronous so it is useful to know if a specific asset preview is in the process of being loaded so client code e.g can repaint while waiting for the loading to finish.

public static IsLoadingAssetPreview ( int instanceID ) : bool
instanceID int InstanceID of the assset that a preview has been requested for by: AssetPreview.GetAssetPreview().
리턴 bool

IsLoadingAssetPreviews() 공개 정적인 메소드

Loading previews is asynchronous so it is useful to know if any requested previews are in the process of being loaded so client code e.g can repaint while waiting.

public static IsLoadingAssetPreviews ( ) : bool
리턴 bool

SetPreviewTextureCacheSize() 공개 정적인 메소드

Set the asset preview cache to a size that can hold all visible previews on the screen at once.

public static SetPreviewTextureCacheSize ( int size ) : void
size int The number of previews that can be loaded into the cache before the least used previews are being unloaded.
리턴 void