C# Класс UIPrefabTool, LoopScorllViewForNGUI

Tool that makes it easy to drag prefabs into it to "cache" them for ease of use.
Наследование: EditorWindow
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
instance UIPrefabTool,

Private Properties

Свойство Тип Описание
AddGUID Item,
AddItem void
CreateItemByPath Item,
DeactivateLights void
DestroyTexture void
FindChild Transform
FindItem Item,
GeneratePreview void
GetCellUnderMouse int
Load void
LoadPreview UnityEngine.Texture2D
OnDisable void
OnEnable void
OnGUI void
OnSelectionChange void
RectivateLights void
RemoveItem void
Save void
SetupPreviewFor3D bool
SetupPreviewForUI bool
SetupSnapshotCamera void
SetupSnapshotCamera void
UpdateVisual void

Открытые методы

Метод Описание
RegenerateTexture ( GameObject prefab, UISnapshotPoint, point ) : void

Re-generate the specified prefab's snapshot texture using the provided snapshot point's values.

Reset ( ) : void

Reset all loaded prefabs, collecting default controls instead.

Приватные методы

Метод Описание
AddGUID ( string guid, int index ) : Item,

Add a new item to the list.

AddItem ( GameObject go, int index ) : void

Add a new item to the list.

CreateItemByPath ( string path ) : Item,

Helper function that creates a new entry using the specified object's path.

DeactivateLights ( ) : void

Deactivate all scene lights.

DestroyTexture ( Item, item ) : void

Destroy the item's texture.

FindChild ( Transform t, string startsWith ) : Transform

Find a child with a name that begins with the specified string.

FindItem ( GameObject go ) : Item,

Find an item referencing the specified game object.

GeneratePreview ( Item, item, UISnapshotPoint, point ) : void

Generate an item preview for the specified item.

GetCellUnderMouse ( int spacingX, int spacingY ) : int

Helper function that retrieves the index of the cell under the mouse.

Load ( ) : void

Load all items from Editor Prefs.

LoadPreview ( Item, item ) : Texture2D

Helper function that loads a preview texture. Previews are used for the Free version of Unity that can't use render textures.

OnDisable ( ) : void

Clean up all textures.

OnEnable ( ) : void

Initialize everything.

OnGUI ( ) : void

Draw the custom wizard.

OnSelectionChange ( ) : void
RectivateLights ( ) : void

Reactivate all scene lights.

RemoveItem ( object obj ) : void

Remove an existing item from the list.

Save ( ) : void

Save all the items to Editor Prefs.

SetupPreviewFor3D ( Camera cam, GameObject root, GameObject child, UISnapshotPoint, point ) : bool

Set up everything necessary to preview a UI object.

SetupPreviewForUI ( Camera cam, GameObject root, GameObject child, UISnapshotPoint, point ) : bool

Set up everything necessary to preview a UI object.

SetupSnapshotCamera ( GameObject go, Camera cam, UISnapshotPoint, point ) : void

Set up the camera using the provided snapshot point's values.

SetupSnapshotCamera ( GameObject go, Camera cam, float objectSize, float orthoSize, float near, float far ) : void

Set up the snapshot camera using an explicit game object, if there is one available.

UpdateVisual ( ) : void

Update the visual mode based on the dragged object.

Описание методов

RegenerateTexture() публичный Метод

Re-generate the specified prefab's snapshot texture using the provided snapshot point's values.
public RegenerateTexture ( GameObject prefab, UISnapshotPoint, point ) : void
prefab GameObject
point UISnapshotPoint,
Результат void

Reset() публичный Метод

Reset all loaded prefabs, collecting default controls instead.
public Reset ( ) : void
Результат void

Описание свойств

instance статическое публичное свойство

static public UIPrefabTool, instance
Результат UIPrefabTool,