Unity API 参考
从 FairyGUI Unity SDK 的 C# 源码和 XML 注释自动生成。
包含 241 个公开类型和 3022 个公开或受保护成员,覆盖 UI、显示与渲染、事件、动画、工具和可选扩展。
使用顶部搜索框查找类型或成员,或在下方按命名空间浏览。类型页包含成员签名、重载、原始说明、参数、返回值及基类链接。
说明沿用源码中的中文或英文注释;空白注释不补写。文档合并了不同编译配置中的声明;标注条件的 API 需要对应平台、宏或扩展依赖。受保护成员用于继承扩展。
<global namespace>
| 类型 | 种类 | 说明 |
|---|---|---|
| WebGLTextInput | class |
FairyGUI
| 类型 | 种类 | 说明 |
|---|---|---|
| ControllerAction.ActionType | enum | |
| AlignType | enum | |
| AsyncCreationHelper | class | |
| AutoSizeType | enum | |
| BitmapFont.BMGlyph | class | |
| BaseFont | class | Base class for all kind of fonts. |
| BatchElement | class | |
| BitmapFont | class | |
| BlendModeUtils.BlendFactor | class | |
| BlendMode | enum | |
| BlendModeUtils | class | |
| BlurFilter | class | |
| ButtonMode | enum | |
| CaptureCamera | class | |
| ChangePageAction | class | |
| TextField.CharPosition | struct | |
| ChildrenRenderOrder | enum | |
| UpdateContext.ClipInfo | struct | |
| ColliderHitTest | class | |
| ColorFilter | class | |
| CompositeMesh | class | |
| UIConfig.ConfigKey | enum | |
| UIConfig.ConfigValue | class | |
| Container | class | |
| Controller | class | Controller class. 控制器类。控制器的创建和设计需通过编辑器完成,不建议使用代码创建。 最常用的方法是通过selectedIndex获得或改变控制器的活动页面。如果要获得控制器页面改变的通知,使用onChanged事件。 |
| ControllerAction | class | |
| UIPackage.CreateObjectCallback | delegate | |
| GPathPoint.CurveType | enum | |
| CustomEase | class | |
| DestroyMethod | enum | |
| RTLSupport.DirectionType | enum | |
| DisplayObject | class | |
| DisplayObjectInfo | class | |
| DragDropManager | class | Helper for drag and drop. 这是一个提供特殊拖放功能的功能类。与GObject.draggable不同,拖动开始后,他使用一个替代的图标作为拖动对象。 当玩家释放鼠标/手指,目标组件会发出一个onDrop事件。 |
| DynamicFont | class | |
| EMRenderSupport | class | 这是一个在编辑状态下渲染UI的功能类。EM=Edit Mode |
| EMRenderTarget | interface | |
| EaseManager | class | |
| EaseType | enum | |
| EllipseMesh | class | |
| Emoji | class | |
| EventCallback0 | delegate | |
| EventCallback1 | delegate | |
| EventContext | class | |
| EventDispatcher | class | |
| EventListener | class | |
| FillMesh | class | |
| FillMethod | enum | |
| FillType | enum | |
| FitScreen | enum | |
| DisplayObject.Flags | enum | |
| FlipType | enum | |
| FocusRule | enum | |
| FontManager | class | |
| MovieClip.Frame | class | |
| GButton | class | GButton class. |
| GComboBox | class | GComboBox class. |
| GComponent | class | Component |
| UIObjectFactory.GComponentCreator | delegate | |
| GGraph | class | GGraph class. 对应编辑器里的图形对象。图形有两个用途,一是用来显示简单的图形,例如矩形等;二是作为一个占位的用途, 可以将本对象替换为其他对象,或者在它的前后添加其他对象,相当于一个位置和深度的占位;还可以直接将内容设置 为原生对象。 |
| GGroup | class | GGroup class. 组对象,对应编辑器里的高级组。 |
| GImage | class | GImage class. |
| GLabel | class | GLabel class. |
| GList | class | GList class. |
| GLoader | class | GLoader class |
| GLoader3D | class | |
| UIObjectFactory.GLoaderCreator | delegate | |
| GMovieClip | class | GMovieClip class. |
| GObject | class | |
| GObjectPool | class | GObjectPool is use for GObject pooling. |
| GPath | class | |
| GPathPoint | struct | |
| GProgressBar | class | GProgressBar class. |
| GRichTextField | class | GRichTextField class. |
| GRoot | class | GRoot is a topmost component of UI display list.You dont need to create GRoot. It is created automatically. |
| GScrollBar | class | GScrollBar class. |
| GSlider | class | |
| GTextField | class | |
| GTextInput | class | |
| GTree | class | |
| GTreeNode | class | |
| GTween | class | |
| GTweenCallback | delegate | |
| GTweenCallback1 | delegate | |
| GTweener | class | |
| GearAnimation | class | Gear is a connection between object and controller. |
| GearBase | class | Gear is a connection between object and controller. |
| GearColor | class | Gear is a connection between object and controller. |
| GearDisplay | class | Gear is a connection between object and controller. |
| GearDisplay2 | class | Gear is a connection between object and controller. |
| GearFontSize | class | Gear is a connection between object and controller. |
| GearIcon | class | Gear is a connection between object and controller. |
| GearLook | class | Gear is a connection between object and controller. |
| GearSize | class | Gear is a connection between object and controller. |
| GearText | class | Gear is a connection between object and controller. |
| GearTweenConfig | class | |
| GearXY | class | Gear is a connection between object and controller. |
| ShaderConfig.GetFunction | delegate | |
| GoWrapper | class | GoWrapper is class for wrapping common gameobject into UI display list. |
| GroupLayoutType | enum | |
| HitTestContext | class | |
| HitTestMode | enum | |
| IAnimationGear | interface | |
| IBatchable | interface | |
| IColorGear | interface | |
| IEventDispatcher | interface | |
| IFilter | interface | |
| IHitTest | interface | |
| IKeyboard | interface | 用于文本输入的键盘接口 |
| IMeshFactory | interface | |
| ITextColorGear | interface | |
| ITweenListener | interface | |
| IUISource | interface | |
| Image | class | |
| GObjectPool.InitCallbackDelegate | delegate | Callback function when a new object is creating. |
| InputEvent | class | |
| InputTextField | class | 接收用户输入的文本控件。因为支持直接输入表情,所以从RichTextField派生。 |
| TextField.LineCharInfo | struct | |
| TextField.LineInfo | class | |
| LineMesh | class | Inspired by kim ki won (http://mypi.ruliweb.daum.net/mypi.htm?id=newtypekorea) |
| ListItemProvider | delegate | |
| ListItemRenderer | delegate | Callback function when an item is needed to update its look. |
| ListLayoutType | enum | |
| ListSelectionMode | enum | |
| UIPackage.LoadResource | delegate | Use this callback to provide resources to the package. |
| UIPackage.LoadResourceAsync | delegate | A async load resource callback. After loaded, you should call item.owner.SetItemAsset. |
| LongPressGesture | class | 长按手势。当按下一定时间后(duration),派发onAction,如果once为false,则间隔duration时间持续派发onAction,直到手指释放。 |
| Margin | struct | |
| MaterialFlags | enum | |
| MaterialManager | class | Every texture-shader combination has a MaterialManager. |
| MeshColliderHitTest | class | |
| MovieClip | class | |
| NAudioClip | class | |
| NGraphics | class | |
| NTexture | class | |
| ObjectType | enum | |
| Origin180 | enum | |
| Origin360 | enum | |
| Origin90 | enum | |
| OriginHorizontal | enum | |
| OriginVertical | enum | |
| OverflowType | enum | |
| PackageItem | class | |
| PackageItemType | enum | |
| DisplayObject.PaintingInfo | class | |
| PinchGesture | class | 两个指头捏或者放的手势。 |
| PixelHitTest | class | |
| PixelHitTestData | class | |
| PlaneMesh | class | |
| PlayCompleteCallback | delegate | |
| PlayTransitionAction | class | |
| PolygonMesh | class | |
| PopupDirection | enum | |
| PopupMenu | class | |
| ProgressTitleType | enum | |
| RTLSupport | class | |
| RectHitTest | class | |
| RectMesh | class | |
| RegularPolygonMesh | class | |
| RelationType | enum | |
| Relations | class | |
| GoWrapper.RendererInfo | struct | |
| RichTextField | class | |
| RotationGesture | class | 手指反向操作的手势。 |
| RoundedRectMesh | class | |
| UIContentScaler.ScaleMode | enum | |
| UIContentScaler.ScreenMatchMode | enum | |
| ScrollBarDisplayType | enum | |
| ScrollPane | class | |
| ScrollType | enum | |
| GPath.Segment | struct | |
| SelectionShape | class | |
| ShaderConfig | class | |
| Shape | class | |
| ShapeHitTest | class | |
| UIConfig.SoundLoader | delegate | |
| TextFormat.SpecialStyle | enum | |
| Stage | class | |
| StageCamera | class | Stage Camera is an orthographic camera for UI rendering. |
| StageEngine | class | |
| Stats | class | |
| StraightLineMesh | class | |
| SwipeGesture | class | 滑动手势。你可以通过onBegin+onMove+onEnd关心整个滑动过程,也可以只使用onAction关注最后的滑动结果。滑动结果包括方向和加速度,可以从position和velocity获得。 注意onAction仅当滑动超过一定距离(actionDistance)时才触发。 |
| TMPFont | class | TextMeshPro text adapter for FairyGUI. Most of codes were taken from TextMeshPro! Note that not all of TextMeshPro features are supported. |
| TextField | class | |
| TextFormat | class | |
| TimerCallback | delegate | |
| Timers | class | |
| TouchScreenKeyboard | class | |
| Transition | class | |
| TransitionActionType | enum | |
| TransitionHook | delegate | |
| TranslationHelper | class | |
| TreeNode | class | |
| TreeView.TreeNodeCreateCellDelegate | delegate | |
| GTree.TreeNodeRenderDelegate | delegate | |
| TreeView.TreeNodeRenderDelegate | delegate | |
| GTree.TreeNodeWillExpandDelegate | delegate | |
| TreeView.TreeNodeWillExpandDelegate | delegate | |
| TreeView | class | |
| TweenPropType | enum | |
| TweenValue | class | |
| TypingEffect | class | 文字打字效果。先调用Start,然后Print。 |
| UIConfig | class | Global configs. These options should be set before any UI construction. |
| UIContentScaler | class | |
| UILoadCallback | delegate | |
| UIObjectFactory | class | |
| UIPackage | class | A UI Package contains a description file and some texture, sound assets. |
| UIPainter | class | |
| UIPanel | class | |
| UpdateContext | class | UpdateContext is for internal use. |
| VertAlignType | enum | |
| VertexBuffer | class | |
| NGraphics.VertexMatrix | class | |
| Window | class | Window class. 窗口使用前首先要设置窗口中需要显示的内容,这通常是在编辑器里制作好的,可以直接使用Window.contentPane进行设置。 建议把设置contentPane等初始化操作放置到Window.onInit方法中。 另外,FairyGUI还提供了一套机制用于窗口动态创建。动态创建是指初始时仅指定窗口需要使用的资源,等窗口需要显示时才实际开始构建窗口的内容。 首先需要在窗口的构造函数中调用Window.addUISource。这个方法需要一个IUISource类型的参数,而IUISource是一个接口, 用户需要自行实现载入相关UI包的逻辑。当窗口第一次显示之前,IUISource的加载方法将会被调用,并等待载入完成后才返回执行Window.OnInit,然后窗口才会显示。 如果你需要窗口显示时播放动画效果,那么覆盖doShowAnimation编写你的动画代码,并且在动画结束后调用onShown。覆盖onShown编写其他需要在窗口显示时处理的业务逻辑。 如果你需要窗口隐藏时播放动画效果,那么覆盖doHideAnimation编写你的动画代码,并且在动画结束时调用Window.hideImmediately(注意不是直接调用onHide!)。覆盖onHide编写其他需要在窗口隐藏时处理的业务逻辑。 |
FairyGUI.Utils
| 类型 | 种类 | 说明 |
|---|---|---|
| ByteBuffer | class | |
| XMLList.Enumerator | struct | |
| HtmlButton | class | |
| HtmlElement | class | |
| HtmlElementType | enum | |
| HtmlImage | class | |
| HtmlInput | class | |
| HtmlLink | class | |
| HtmlPageContext | class | |
| HtmlParseOptions | class | |
| HtmlParser | class | |
| HtmlSelect | class | |
| IHtmlObject | interface | Create->SetPosition->(Add<->Remove)->Release->Dispose |
| IHtmlPageContext | interface | |
| UBBParser.TagHandler | delegate | |
| HtmlParser.TextFormat2 | class | |
| ToolSet | class | |
| UBBParser | class | |
| XML | class | A simplest and readonly XML class |
| XMLIterator | class | |
| XMLList | class | |
| XMLTagType | enum | |
| XMLUtils | class | |
| ZipReader.ZipEntry | class | |
| ZipReader | class | 一个简单的Zip文件处理类。不处理解压。 |