CActiveAnimation | Mainly 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 | |
CAnimatedAlpha | Makes it possible to animate alpha of the widget or a panel. |
CAnimatedColor | Makes 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. |
CBMFont | BMFont reader. C# implementation of http://www.angelcode.com/products/bmfont/ |
CBMFontReader | Helper 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. |
CBMGlyph | Glyph structure used by BMFont. For more information see http://www.angelcode.com/products/bmfont/ |
CBMSymbol | Symbols are a sequence of characters such as ":)" that get replaced with a sprite, such as the smiley face. |
CByteReader | MemoryStream.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. |
CChatInput | Very simple example of how to use a TextList with a UIInput for chat. |
CComponentSelector | EditorGUILayout.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. |
CDownloadTexture | Simple script that shows how to download a remote texture and assign it to be used by a UITexture. |
CEnvelopContent | Example script that resizes the widget it's attached to in order to envelop the target content. |
CEquipItems | Equip the specified items on the character when the script is started. |
CEquipRandomItem | Create and equip a random item on the specified target. |
►CEventDelegate | Delegate callback that Unity can serialize and set via Inspector. |
CParameter | Delegates can have parameters, and this class makes it possible to save references to properties that can then be passed as function arguments, such as transform.position or widget.color. |
CEventDelegateDrawer | Draws a single event delegate. Contributed by Adam Byrd. |
CEventDelegateEditor | |
CExampleDragDropItem | |
CExampleDragDropSurface | Simple 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. |
►CFreeType | FreeType 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/ |
CFT_BBox | |
CFT_Bitmap | |
CFT_FaceRec | |
CFT_Generic | |
CFT_Glyph_Metrics | |
CFT_GlyphSlotRec | |
CFT_ListRec | |
CFT_Outline | |
CFT_Size_Metrics | |
CFT_SizeRec | |
CFT_Vector | |
CGUID | Helper class that is able to convert objects to GUIDs and back. |
CInvAttachmentPoint | |
CInvBaseItem | Inventory 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 | |
CInvDatabaseInspector | Inspector class used to edit Inventory Databases. |
CInvEquipment | Inventory system – Equipment class works with InvAttachmentPoints and allows to visually equip and remove items. |
CInvFindItem | Inventory System search functionality. |
CInvGameItem | Since 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. |
CInvStat | Inventory System statistic |
CLagPosition | Attach to a game object to make its position always lag behind its parent as the parent moves. |
CLagRotation | Attach to a game object to make its rotation always lag behind its parent as the parent rotates. |
CLanguageSelection | Turns the popup list it's attached to into a language selection list. |
CLoadLevelOnClick | |
CLocalization | Localization 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: |
CLookAtTarget | Attaching 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. |
CNGUIContextMenu | This 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. |
CNGUIDebug | This class is meant to be used only internally. It's like Debug.Log, but prints using OnGUI to screen instead. |
CNGUIEditorExtensions | This class contains NGUI's extensions to Unity Editor's functionality. |
►CNGUIEditorTools | Tools for the editor |
CIntVector | Struct type for the integer vector field below. |
CNGUIHandles | Editor helper class containing functions related to drawing things in the Scene View using UnityEditor.Handles. |
CNGUIHelp | This script adds the NGUI menu options to the Unity Editor. |
CNGUIJson | This class encodes and decodes JSON strings. Spec. details, see http://www.json.org/ |
CNGUIMath | Helper class containing generic functions used throughout the UI library. |
CNGUIMenu | This script adds the NGUI menu options to the Unity Editor. |
CNGUISelectionTools | |
CNGUISettings | Unity 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. |
CNGUISnap | Utility class that makes it easy to perform snapping while dragging widgets. |
►CNGUIText | Helper class containing functionality related to using dynamic fonts. |
CGlyphInfo | |
CNGUITools | Helper class containing generic functions used throughout the UI library. |
CNGUITransformInspector | |
COpenURLOnClick | |
CPanWithMouse | Placing this script on the game object will make that game object pan with mouse movement. |
CPlayIdleAnimations | Attach 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. |
CPropertyBinding | Property binding lets you bind two fields or properties so that changing one will update the other. |
CPropertyBindingEditor | |
CPropertyReference | Reference to a specific field or property that can be set via inspector. |
►CPropertyReferenceDrawer | Generic property binding drawer. |
CEntry | |
CRealTime | Time class has no timeScale-independent time. This class fixes that. |
CSetColorOnSelection | Simple script used by Tutorial 11 that sets the color of the sprite based on the string value. |
CShowEditorStyles | |
CSpin | Want something to spin? Attach this script to it. Works equally well with rigidbodies as without. |
CSpinWithMouse | |
CSpringPanel | Similar to SpringPosition, but also moves the panel's clipping. Works in local coordinates. |
CSpringPosition | Spring-like motion – the farther away the object is from the target, the stronger the pull. |
CSpriteSelector | Editor component used to display a list of sprites. |
CTest | |
CTutorial5 | This simple example script is used in Tutorial 5 to show how custom events work. |
CTweenAlpha | Tween the object's alpha. |
CTweenAlphaEditor | |
CTweenColor | Tween the object's color. |
CTweenColorEditor | |
CTweenFOV | Tween the camera's field of view. |
CTweenFOVEditor | |
CTweenHeight | Tween the widget's size. |
CTweenHeightEditor | |
CTweenOrthoSize | Tween the camera's orthographic size. |
CTweenOrthoSizeEditor | |
CTweenPosition | Tween the object's position. |
CTweenPositionEditor | |
CTweenRotation | Tween the object's rotation. |
CTweenRotationEditor | |
CTweenScale | Tween the object's local scale. |
CTweenScaleEditor | |
CTweenTransform | Tween the object's position, rotation and scale. |
CTweenTransformEditor | |
CTweenVolume | Tween the audio source's volume. |
CTweenVolumeEditor | |
CTweenWidth | Tween the widget's size. |
CTweenWidthEditor | |
CTypewriterEffect | This script is able to fill in the label's text gradually, giving the effect of someone typing or fading in the content over time. |
CUI2DSprite | 2D 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. |
CUI2DSpriteAnimation | Small script that makes it easy to create looping 2D sprite animations. |
CUI2DSpriteEditor | Inspector class used to edit UITextures. |
CUIAnchor | This script can be used to anchor an object to the side or corner of the screen, panel, or a widget. |
CUIAnchorEditor | |
CUIAtlas | UI Atlas contains a collection of sprites inside one large texture atlas. |
CUIAtlasInspector | Inspector class used to edit the UIAtlas. |
►CUIAtlasMaker | Atlas maker lets you create atlases from a bunch of small textures. It's an alternative to using the external Texture Packer. |
CSpriteEntry | |
CUIBasicSprite | Functionality common to both NGUI and 2D sprites brought out into a single common parent. Mostly contains everything related to drawing the sprite. |
CUIBasicSpriteEditor | Inspector class used to edit UITextures. |
CUIButton | Similar to UIButtonColor, but adds a 'disabled' state based on whether the collider is enabled or not. |
CUIButtonActivate | Very basic script that will activate or deactivate an object (and all of its children) when clicked. |
CUIButtonColor | Simple example script of how a button can be colored when the mouse hovers over it or it gets pressed. |
CUIButtonColorEditor | |
CUIButtonEditor | |
CUIButtonKeys | Deprecated component. Use UIKeyNavigation instead. |
CUIButtonKeysEditor | |
CUIButtonMessage | Sends a message to the remote object when something happens. |
CUIButtonMessageEditor | |
CUIButtonOffset | Simple example script of how a button can be offset visibly when the mouse hovers over it or it gets pressed. |
CUIButtonRotation | Simple example script of how a button can be rotated visibly when the mouse hovers over it or it gets pressed. |
CUIButtonScale | Simple example script of how a button can be scaled visibly when the mouse hovers over it or it gets pressed. |
►CUICamera | This 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: |
CMouseOrTouch | Ambiguous mouse, touch, or controller event. |
CUICameraEditor | |
CUICameraTool | Panel wizard that allows a bird's eye view of all cameras in your scene. |
CUICenterOnChild | Ever 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. |
CUICenterOnClick | Attaching this script to an element of a scroll view will make it possible to center on it by clicking on it. |
CUICreateNewUIWizard | UI Creation Wizard. This tool has been made obsolete with NGUI 3.0.6. |
CUICreateWidgetWizard | UI Widget Creation Wizard |
CUICursor | Selectable sprite that follows the mouse. |
CUIDragCamera | Allows dragging of the camera object and restricts camera's movement to be within bounds of the area created by the rootForBounds colliders. |
CUIDragDropContainer | |
CUIDragDropItem | UIDragDropItem is a base script for your own Drag & Drop operations. |
CUIDragDropRoot | When 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. |
CUIDraggableCamera | Works together with UIDragCamera script, allowing you to drag a secondary camera while keeping it constrained to a certain area. |
CUIDragObject | Allows dragging of the specified target object by mouse or touch, optionally limiting it to be within the UIPanel's clipped rectangle. |
CUIDragObjectEditor | |
CUIDragResize | This script makes it possible to resize the specified widget by dragging on the object this script is attached to. |
CUIDragScrollView | Allows dragging of the specified scroll view by mouse or touch. |
CUIDrawCall | This is an internally-created script used by the UI system. You shouldn't be attaching it manually. |
CUIDrawCallInspector | Inspector class used to view UIDrawCalls. |
CUIDrawCallViewer | Draw Call Viewer shows a list of draw calls created by NGUI and lets you hide them selectively. |
CUIEquipmentSlot | A UI script that keeps an eye on the slot in character equipment. |
CUIEventListener | Event Hook class lets you easily add remote event listener functions to an object. Example usage: UIEventListener.Get(gameObject).onClick += MyClickFunction; |
CUIEventTrigger | Attaching this script to an object will let you trigger remote functions using NGUI events. |
CUIEventTriggerEditor | |
CUIFont | UIFont contains everything needed to be able to print text. |
CUIFontInspector | Inspector class used to view and edit UIFonts. |
CUIFontMaker | Font maker lets you create font prefabs with a single click of a button. |
CUIForwardEvents | This 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 | |
CUIGeometry | Generated 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. |
CUIGrid | All 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 | |
CUIImageButton | Sample script showing how easy it is to implement a standard button that swaps sprites. |
CUIImageButtonInspector | Inspector class used to edit UISprites. |
CUIInput | Input field makes it possible to enter custom information within the UI. |
CUIInputEditor | |
CUIItemSlot | Abstract 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. |
CUIItemStorage | Storage container that stores items. |
CUIKeyBinding | This class makes it possible to activate or select something by pressing a key (such as space bar for example). |
CUIKeyNavigation | Attaching this script to a widget makes it react to key events such as tab, up, down, etc. |
CUIKeyNavigationEditor | |
CUILabel | |
CUILabelInspector | Inspector class used to edit UILabels. |
CUILocalize | Simple script that lets you localize a UIWidget. |
CUILocalizeEditor | |
CUIOrthoCamera | Convenience 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). |
CUIPanel | UI Panel is responsible for collecting, sorting and updating widgets in addition to generating widgets' geometry. |
CUIPanelInspector | Editor class used to view panels. |
CUIPanelTool | Panel wizard that allows enabling / disabling and selecting panels in the scene. |
CUIPlayAnimation | Play the specified animation on click. |
CUIPlayAnimationEditor | |
CUIPlaySound | Plays the specified sound. |
CUIPlayTween | Play the specified tween on click. |
CUIPlayTweenEditor | |
CUIPopupList | Popup list can be used to display pop-up menus and drop-down lists. |
CUIPopupListInspector | Inspector class used to edit UIPopupLists. |
CUIPrefabTool | Tool that makes it easy to drag prefabs into it to "cache" them for ease of use. |
CUIProgressBar | Simple progress bar that fills itself based on the specified value. |
CUIProgressBarEditor | |
►CUIRect | Abstract 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. |
CAnchorPoint | |
CUIRectEditor | Editor class used to view UIRects. |
CUIRoot | This 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 | |
CUISavedOption | Attach this script to a popup list, the parent of a group of toggles, or to a toggle itself to save its state. |
CUIScrollBar | Scroll bar functionality. |
CUIScrollBarEditor | |
CUIScrollView | This 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 | |
CUISlider | Extended progress bar that has backwards compatibility logic and adds interaction support. |
CUISliderColors | This script automatically changes the color of the specified sprite based on the value of the slider. |
CUISliderEditor | |
CUISnapshotPoint | |
CUISnapshotPointEditor | |
CUISoundVolume | Very 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. |
CUISprite | Sprite is a textured element in the UI hierarchy. |
CUISpriteAnimation | Very simple sprite animation. Attach to a sprite and specify a common prefix such as "idle" and it will cycle through them. |
CUISpriteAnimationInspector | Inspector class used to edit UISpriteAnimations. |
CUISpriteData | |
CUISpriteInspector | Inspector class used to edit UISprites. |
CUIStorageSlot | A UI script that keeps an eye on the slot in a storage container. |
CUIStretch | This 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 | |
CUITable | All 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). |
►CUITextList | Text 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. |
CParagraph | |
CUITexture | If 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. |
CUITextureInspector | Inspector class used to edit UITextures. |
CUITexturePacker | |
CUIToggle | Simple toggle functionality. |
CUIToggledComponents | Example script showing how to activate or deactivate MonoBehaviours with a toggle. |
CUIToggledObjects | Example 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 | |
CUITooltip | Example script that can be used to show tooltips. |
CUITweener | Base class for all tweening operations. |
CUITweenerEditor | |
CUIViewport | This script can be used to restrict camera rendering to a specific part of the screen by specifying the two corners. |
CUIWidget | Base class for all UI components that should be derived from when creating new widget types. |
CUIWidgetContainer | Widget container is a generic type class that acts like a non-resizeable widget when selecting things in the scene view. |
CUIWidgetContainerEditor | Widget containers are classes that are meant to hold more than one widget inside, but should still be easily movable using the mouse. |
CUIWidgetInspector | Inspector class used to edit UIWidgets. |
CUIWrapContent | This 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 | |
CWindowAutoYaw | Attaching 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. |
CWindowDragTilt | Attach 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. |