- Getting Start
- Project Settings
- Rich Text
- Cocos Creator
- Cry Engine
SDK - Unity
- Insert 3D
- Curved UI
- If you are using ToLua, add Scripting Define Symbols
FAIRYGUI_TOLUA。 XLUA is not required.
- In the case of ToLua, add the following statement to the appropriate place in CustomSettings.cs and then regenerate the binding file.
- Put FairyGUI.lua into your lua file directory.
- Common method listening and deleting listening
- ToLua supports callback with self
The Window class provided by FairyGUI generally needs to be extended by developers, such as covering OnShown, OnHide, etc. In Lua, the method for writing Window extensions is:
FairyGUI is available in C #
UIObjectFactory.SetPackageItemExtensionMake custom extensions. In Lua, you can do the same. Methods as below:
- Define extension classes. Pay attention to the basic types, don’t get it wrong. For example, the button is GButton, and the general component is GComponent.
- Register the extension class. Before registering any objects.
- After completing the above two steps, any object created by the resource “My Button” can be accessed using MyButton. E.g: