NGUITools is a library package in C# that provides a set of tools for managing user interfaces in Unity game development. One example of a tool provided by NGUITools is the ApplyPMA method, which applies Premultiplied Alpha (PMA) to the colors of all the child components of a specified UI widget. This helps to improve the overall appearance of the UI elements in a game.
Code example:
NGUITools.ApplyPMA(myWidget);
In this example, "myWidget" is a reference to a UI widget in the game, and the ApplyPMA method is called on it using the NGUITools class. This applies PMA to all the child components of the widget.
Another example:
foreach (Transform child in myWidget.transform) { NGUITools.ApplyPMA(child.gameObject); }
In this example, PMA is applied to all the child objects of a UI widget called "myWidget" using a loop that iterates through each child object and calls the ApplyPMA method on it.
Package library: NGUI (Next-Gen UI) is a popular package library for Unity game development, which provides a range of UI tools and components. NGUITools is a part of the NGUI library, and is used to help manage the appearance and behavior of UI elements in a game.
C# (CSharp) NGUITools.ApplyPMA - 25 examples found. These are the top rated real world C# (CSharp) examples of NGUITools.ApplyPMA extracted from open source projects. You can rate examples to help us improve the quality of examples.