NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
 CActiveAnimationMainly an internal script used by UIButtonPlayAnimation, but can also be used to call the specified function on the game object after it finishes animating.
 CActiveAnimationEditor
 CAnimatedAlphaMakes it possible to animate alpha of the widget or a panel.
 CAnimatedColorMakes it possible to animate a color of the widget.
 CBetterList< T >This improved version of the System.Collections.Generic.List that doesn't release the buffer on Clear(), resulting in better performance and less garbage collection. PRO: BetterList performs faster than List when you Add and Remove items (although slower if you remove from the beginning). CON: BetterList performs worse when sorting the list. If your operations involve sorting, use the standard List instead.
 CBMFontBMFont reader. C# implementation of http://www.angelcode.com/products/bmfont/
 CBMFontReaderHelper class that takes care of loading BMFont's glyph information from the specified byte array. This functionality is not a part of BMFont anymore because Flash export option can't handle System.IO functions.
 CBMGlyphGlyph structure used by BMFont. For more information see http://www.angelcode.com/products/bmfont/
 CBMSymbolSymbols are a sequence of characters such as ":)" that get replaced with a sprite, such as the smiley face.
 CByteReaderMemoryStream.ReadLine has an interesting oddity: it doesn't always advance the stream's position by the correct amount: http://social.msdn.microsoft.com/Forums/en-AU/Vsexpressvcs/thread/b8f7837b-e396-494e-88e1-30547fcf385f Solution? Custom line reader with the added benefit of not having to use streams at all.
 CChatInputVery simple example of how to use a TextList with a UIInput for chat.
 CComponentSelectorEditorGUILayout.ObjectField doesn't support custom components, so a custom wizard saves the day. Unfortunately this tool only shows components that are being used by the scene, so it's a "recently used" selection tool.
 CDownloadTextureSimple script that shows how to download a remote texture and assign it to be used by a UITexture.
 CEnvelopContentExample script that resizes the widget it's attached to in order to envelop the target content.
 CEquipItemsEquip the specified items on the character when the script is started.
 CEquipRandomItemCreate and equip a random item on the specified target.
 CEventDelegateDelegate callback that Unity can serialize and set via Inspector.
 CEventDelegateDrawerDraws a single event delegate. Contributed by Adam Byrd.
 CEventDelegateEditor
 CExampleDragDropItem
 CExampleDragDropSurfaceSimple example of an OnDrop event accepting a game object. In this case we check to see if there is a DragDropObject present, and if so – create its prefab on the surface, then destroy the object.
 CFreeTypeFreeType library is a C++ library used to print text from TrueType fonts. Since the code is in a native C++ DLL, you will need Unity Pro in order to use it. FreeType project is open source and can be obtained from http://www.freetype.org/
 CGUIDHelper class that is able to convert objects to GUIDs and back.
 CInvAttachmentPoint
 CInvBaseItemInventory System – Base Item. Note that it would be incredibly tedious to create all items by hand, Warcraft style. It's a lot more straightforward to create all items to be of the same level as far as stats go, then specify an appropriate level range for the item where it will appear. Effective item stats can then be calculated by lowering the base stats by an appropriate amount. Add a quality modifier, and you have additional variety, Terraria 1.1 style.
 CInvDatabase
 CInvDatabaseInspectorInspector class used to edit Inventory Databases.
 CInvEquipmentInventory system – Equipment class works with InvAttachmentPoints and allows to visually equip and remove items.
 CInvFindItemInventory System search functionality.
 CInvGameItemSince it would be incredibly tedious to create thousands of unique items by hand, a simple solution is needed. Separating items into 2 parts is that solution. Base item contains stats that the item would have if it was max level. All base items are created with their stats at max level. Game item, the second item class, has an effective item level which is used to calculate effective item stats. Game items can be generated with a random level (clamped within base item's min/max level range), and with random quality affecting the item's stats.
 CInvStatInventory System statistic
 CLagPositionAttach to a game object to make its position always lag behind its parent as the parent moves.
 CLagRotationAttach to a game object to make its rotation always lag behind its parent as the parent rotates.
 CLanguageSelectionTurns the popup list it's attached to into a language selection list.
 CLoadLevelOnClick
 CLocalizationLocalization manager is able to parse localization information from text assets. Using it is simple: text = Localization.Get(key), or just add a UILocalize script to your labels. You can switch the language by using Localization.language = "French", for example. This will attempt to load the file called "French.txt" in the Resources folder, or a column "French" from the Localization.csv file in the Resources folder. If going down the TXT language file route, it's expected that the file is full of key = value pairs, like so:
 CLookAtTargetAttaching this script to an object will make that object face the specified target. The most ideal use for this script is to attach it to the camera and make the camera look at its target.
 CNGUIContextMenuThis editor helper class makes it easy to create and show a context menu. It ensures that it's possible to add multiple items with the same name.
 CNGUIDebugThis class is meant to be used only internally. It's like Debug.Log, but prints using OnGUI to screen instead.
 CNGUIEditorExtensionsThis class contains NGUI's extensions to Unity Editor's functionality.
 CNGUIEditorToolsTools for the editor
 CNGUIHandlesEditor helper class containing functions related to drawing things in the Scene View using UnityEditor.Handles.
 CNGUIHelpThis script adds the NGUI menu options to the Unity Editor.
 CNGUIJsonThis class encodes and decodes JSON strings. Spec. details, see http://www.json.org/
 CNGUIMathHelper class containing generic functions used throughout the UI library.
 CNGUIMenuThis script adds the NGUI menu options to the Unity Editor.
 CNGUISelectionTools
 CNGUISettingsUnity doesn't keep the values of static variables after scripts change get recompiled. One way around this is to store the references in EditorPrefs – retrieve them at start, and save them whenever something changes.
 CNGUISnapUtility class that makes it easy to perform snapping while dragging widgets.
 CNGUITextHelper class containing functionality related to using dynamic fonts.
 CNGUIToolsHelper class containing generic functions used throughout the UI library.
 CNGUITransformInspector
 COpenURLOnClick
 CPanWithMousePlacing this script on the game object will make that game object pan with mouse movement.
 CPlayIdleAnimationsAttach this script to any object that has idle animations. It's expected that the main idle loop animation is called "idle", and idle break animations all begin with "idle" (ex: idleStretch, idleYawn, etc). The script will place the idle loop animation on layer 0, and breaks on layer 1.
 CPropertyBindingProperty binding lets you bind two fields or properties so that changing one will update the other.
 CPropertyBindingEditor
 CPropertyReferenceReference to a specific field or property that can be set via inspector.
 CPropertyReferenceDrawerGeneric property binding drawer.
 CRealTimeTime class has no timeScale-independent time. This class fixes that.
 CSetColorOnSelectionSimple script used by Tutorial 11 that sets the color of the sprite based on the string value.
 CShowEditorStyles
 CSpinWant something to spin? Attach this script to it. Works equally well with rigidbodies as without.
 CSpinWithMouse
 CSpringPanelSimilar to SpringPosition, but also moves the panel's clipping. Works in local coordinates.
 CSpringPositionSpring-like motion – the farther away the object is from the target, the stronger the pull.
 CSpriteSelectorEditor component used to display a list of sprites.
 CTest
 CTutorial5This simple example script is used in Tutorial 5 to show how custom events work.
 CTweenAlphaTween the object's alpha.
 CTweenAlphaEditor
 CTweenColorTween the object's color.
 CTweenColorEditor
 CTweenFOVTween the camera's field of view.
 CTweenFOVEditor
 CTweenHeightTween the widget's size.
 CTweenHeightEditor
 CTweenOrthoSizeTween the camera's orthographic size.
 CTweenOrthoSizeEditor
 CTweenPositionTween the object's position.
 CTweenPositionEditor
 CTweenRotationTween the object's rotation.
 CTweenRotationEditor
 CTweenScaleTween the object's local scale.
 CTweenScaleEditor
 CTweenTransformTween the object's position, rotation and scale.
 CTweenTransformEditor
 CTweenVolumeTween the audio source's volume.
 CTweenVolumeEditor
 CTweenWidthTween the widget's size.
 CTweenWidthEditor
 CTypewriterEffectThis script is able to fill in the label's text gradually, giving the effect of someone typing or fading in the content over time.
 CUI2DSprite2D Sprite is capable of drawing sprites added in Unity 4.3. When importing your textures, import them as Sprites and you will be able to draw them with this widget. If you provide a Packing Tag in your import settings, your sprites will get automatically packed into an atlas for you, so creating an atlas beforehand is not necessary.
 CUI2DSpriteAnimationSmall script that makes it easy to create looping 2D sprite animations.
 CUI2DSpriteEditorInspector class used to edit UITextures.
 CUIAnchorThis script can be used to anchor an object to the side or corner of the screen, panel, or a widget.
 CUIAnchorEditor
 CUIAtlasUI Atlas contains a collection of sprites inside one large texture atlas.
 CUIAtlasInspectorInspector class used to edit the UIAtlas.
 CUIAtlasMakerAtlas maker lets you create atlases from a bunch of small textures. It's an alternative to using the external Texture Packer.
 CUIBasicSpriteFunctionality common to both NGUI and 2D sprites brought out into a single common parent. Mostly contains everything related to drawing the sprite.
 CUIBasicSpriteEditorInspector class used to edit UITextures.
 CUIButtonSimilar to UIButtonColor, but adds a 'disabled' state based on whether the collider is enabled or not.
 CUIButtonActivateVery basic script that will activate or deactivate an object (and all of its children) when clicked.
 CUIButtonColorSimple example script of how a button can be colored when the mouse hovers over it or it gets pressed.
 CUIButtonColorEditor
 CUIButtonEditor
 CUIButtonKeysDeprecated component. Use UIKeyNavigation instead.
 CUIButtonKeysEditor
 CUIButtonMessageSends a message to the remote object when something happens.
 CUIButtonMessageEditor
 CUIButtonOffsetSimple example script of how a button can be offset visibly when the mouse hovers over it or it gets pressed.
 CUIButtonRotationSimple example script of how a button can be rotated visibly when the mouse hovers over it or it gets pressed.
 CUIButtonScaleSimple example script of how a button can be scaled visibly when the mouse hovers over it or it gets pressed.
 CUICameraThis script should be attached to each camera that's used to draw the objects with UI components on them. This may mean only one camera (main camera or your UI camera), or multiple cameras if you happen to have multiple viewports. Failing to attach this script simply means that objects drawn by this camera won't receive UI notifications:
 CUICameraEditor
 CUICameraToolPanel wizard that allows a bird's eye view of all cameras in your scene.
 CUICenterOnChildEver wanted to be able to auto-center on an object within a draggable panel? Attach this script to the container that has the objects to center on as its children.
 CUICenterOnClickAttaching this script to an element of a scroll view will make it possible to center on it by clicking on it.
 CUICreateNewUIWizardUI Creation Wizard. This tool has been made obsolete with NGUI 3.0.6.
 CUICreateWidgetWizardUI Widget Creation Wizard
 CUICursorSelectable sprite that follows the mouse.
 CUIDragCameraAllows dragging of the camera object and restricts camera's movement to be within bounds of the area created by the rootForBounds colliders.
 CUIDragDropContainer
 CUIDragDropItemUIDragDropItem is a base script for your own Drag & Drop operations.
 CUIDragDropRootWhen Drag & Drop event begins in UIDragDropItem, it will re-parent itself to the UIDragDropRoot instead. It's useful when you're dragging something out of a clipped panel: you will want to reparent it before it can be dragged outside.
 CUIDraggableCameraWorks together with UIDragCamera script, allowing you to drag a secondary camera while keeping it constrained to a certain area.
 CUIDragObjectAllows dragging of the specified target object by mouse or touch, optionally limiting it to be within the UIPanel's clipped rectangle.
 CUIDragObjectEditor
 CUIDragResizeThis script makes it possible to resize the specified widget by dragging on the object this script is attached to.
 CUIDragScrollViewAllows dragging of the specified scroll view by mouse or touch.
 CUIDrawCallThis is an internally-created script used by the UI system. You shouldn't be attaching it manually.
 CUIDrawCallInspectorInspector class used to view UIDrawCalls.
 CUIDrawCallViewerDraw Call Viewer shows a list of draw calls created by NGUI and lets you hide them selectively.
 CUIEquipmentSlotA UI script that keeps an eye on the slot in character equipment.
 CUIEventListenerEvent Hook class lets you easily add remote event listener functions to an object. Example usage: UIEventListener.Get(gameObject).onClick += MyClickFunction;
 CUIEventTriggerAttaching this script to an object will let you trigger remote functions using NGUI events.
 CUIEventTriggerEditor
 CUIFontUIFont contains everything needed to be able to print text.
 CUIFontInspectorInspector class used to view and edit UIFonts.
 CUIFontMakerFont maker lets you create font prefabs with a single click of a button.
 CUIForwardEventsThis script can be used to forward events from one object to another. In most cases you should use UIEventListener script instead. For example: UIEventListener.Get(gameObject).onClick += MyClickFunction;
 CUIForwardEventsEditor
 CUIGeometryGenerated geometry class. All widgets have one. This class separates the geometry creation into several steps, making it possible to perform actions selectively depending on what has changed. For example, the widget doesn't need to be rebuilt unless something actually changes, so its geometry can be cached. Likewise, the widget's transformed coordinates only change if the widget's transform moves relative to the panel, so that can be cached as well. In the end, using this class means using more memory, but at the same time it allows for significant performance gains, especially when using widgets that spit out a lot of vertices, such as UILabels.
 CUIGridAll children added to the game object with this script will be repositioned to be on a grid of specified dimensions. If you want the cells to automatically set their scale based on the dimensions of their content, take a look at UITable.
 CUIGridEditor
 CUIImageButtonSample script showing how easy it is to implement a standard button that swaps sprites.
 CUIImageButtonInspectorInspector class used to edit UISprites.
 CUIInputInput field makes it possible to enter custom information within the UI.
 CUIInputEditor
 CUIItemSlotAbstract UI component observing an item somewhere in the inventory. This item can be equipped on the character, it can be lying in a chest, or it can be hot-linked by another player. Either way, all the common behavior is in this class. What the observed item actually is... that's up to the derived class to determine.
 CUIItemStorageStorage container that stores items.
 CUIKeyBindingThis class makes it possible to activate or select something by pressing a key (such as space bar for example).
 CUIKeyNavigationAttaching this script to a widget makes it react to key events such as tab, up, down, etc.
 CUIKeyNavigationEditor
 CUILabel
 CUILabelInspectorInspector class used to edit UILabels.
 CUILocalizeSimple script that lets you localize a UIWidget.
 CUILocalizeEditor
 CUIOrthoCameraConvenience script that resizes the camera's orthographic size to match the screen size. This script can be used to create pixel-perfect UI, however it's usually more convenient to create the UI that stays proportional as the screen scales. If that is what you want, you don't need this script (or at least don't need it to be active).
 CUIPanelUI Panel is responsible for collecting, sorting and updating widgets in addition to generating widgets' geometry.
 CUIPanelInspectorEditor class used to view panels.
 CUIPanelToolPanel wizard that allows enabling / disabling and selecting panels in the scene.
 CUIPlayAnimationPlay the specified animation on click.
 CUIPlayAnimationEditor
 CUIPlaySoundPlays the specified sound.
 CUIPlayTweenPlay the specified tween on click.
 CUIPlayTweenEditor
 CUIPopupListPopup list can be used to display pop-up menus and drop-down lists.
 CUIPopupListInspectorInspector class used to edit UIPopupLists.
 CUIPrefabToolTool that makes it easy to drag prefabs into it to "cache" them for ease of use.
 CUIProgressBarSimple progress bar that fills itself based on the specified value.
 CUIProgressBarEditor
 CUIRectAbstract UI rectangle containing functionality common to both panels and widgets. A UI rectangle contains 4 anchor points (one for each side), and it ensures that they are updated in the proper order.
 CUIRectEditorEditor class used to view UIRects.
 CUIRootThis is a script used to keep the game object scaled to 2/(Screen.height). If you use it, be sure to NOT use UIOrthoCamera at the same time.
 CUIRootEditor
 CUISavedOptionAttach this script to a popup list, the parent of a group of toggles, or to a toggle itself to save its state.
 CUIScrollBarScroll bar functionality.
 CUIScrollBarEditor
 CUIScrollViewThis script, when attached to a panel turns it into a scroll view. You can then attach UIDragScrollView to colliders within to make it draggable.
 CUIScrollViewEditor
 CUISliderExtended progress bar that has backwards compatibility logic and adds interaction support.
 CUISliderColorsThis script automatically changes the color of the specified sprite based on the value of the slider.
 CUISliderEditor
 CUISnapshotPoint
 CUISnapshotPointEditor
 CUISoundVolumeVery simple script that can be attached to a slider and will control the volume of all sounds played via NGUITools.PlaySound, which includes all of UI's sounds.
 CUISpriteSprite is a textured element in the UI hierarchy.
 CUISpriteAnimationVery simple sprite animation. Attach to a sprite and specify a common prefix such as "idle" and it will cycle through them.
 CUISpriteAnimationInspectorInspector class used to edit UISpriteAnimations.
 CUISpriteData
 CUISpriteInspectorInspector class used to edit UISprites.
 CUIStorageSlotA UI script that keeps an eye on the slot in a storage container.
 CUIStretchThis script can be used to stretch objects relative to the screen's width and height. The most obvious use would be to create a full-screen background by attaching it to a sprite.
 CUIStretchEditor
 CUITableAll children added to the game object with this script will be arranged into a table with rows and columns automatically adjusting their size to fit their content (think "table" tag in HTML).
 CUITextListText list can be used with a UILabel to create a scrollable multi-line text field that's easy to add new entries to. Optimal use: chat window.
 CUITextureIf you don't have or don't wish to create an atlas, you can simply use this script to draw a texture. Keep in mind though that this will create an extra draw call with each UITexture present, so it's best to use it only for backgrounds or temporary visible widgets.
 CUITextureInspectorInspector class used to edit UITextures.
 CUITexturePacker
 CUIToggleSimple toggle functionality.
 CUIToggledComponentsExample script showing how to activate or deactivate MonoBehaviours with a toggle.
 CUIToggledObjectsExample script showing how to activate or deactivate a game object when a toggle's state changes. OnActivate event is sent out by the UIToggle script.
 CUIToggleInspector
 CUITooltipExample script that can be used to show tooltips.
 CUITweenerBase class for all tweening operations.
 CUITweenerEditor
 CUIViewportThis script can be used to restrict camera rendering to a specific part of the screen by specifying the two corners.
 CUIWidgetBase class for all UI components that should be derived from when creating new widget types.
 CUIWidgetContainerWidget container is a generic type class that acts like a non-resizeable widget when selecting things in the scene view.
 CUIWidgetContainerEditorWidget containers are classes that are meant to hold more than one widget inside, but should still be easily movable using the mouse.
 CUIWidgetInspectorInspector class used to edit UIWidgets.
 CUIWrapContentThis script makes it possible for a scroll view to wrap its content, creating endless scroll views. Usage: simply attach this script underneath your scroll view where you would normally place a UIGrid:
 CUIWrapContentEditor
 CWindowAutoYawAttaching this script to an object will make it turn as it gets closer to left/right edges of the screen. Look at how it's used in Example 6.
 CWindowDragTiltAttach this script to a child of a draggable window to make it tilt as it's dragged. Look at how it's used in Example 6.