├── .gitignore ├── DemoAssets.unitypackage ├── DemoAssets.unitypackage.meta ├── Editor.meta ├── Editor ├── FairyGUI.Dynamic.Editor.asmdef ├── FairyGUI.Dynamic.Editor.asmdef.meta ├── UIAssetManagerDebuggerInspector.cs ├── UIAssetManagerDebuggerInspector.cs.meta ├── UIPackageMappingUtility.cs ├── UIPackageMappingUtility.cs.meta ├── UIPackageUtility.cs └── UIPackageUtility.cs.meta ├── FairyGUI.meta ├── FairyGUI ├── Editor.meta ├── Editor │ ├── DisplayObjectEditor.cs │ ├── DisplayObjectEditor.cs.meta │ ├── EditorToolSet.cs │ ├── EditorToolSet.cs.meta │ ├── FairyGUI.Editor.asmdef │ ├── FairyGUI.Editor.asmdef.meta │ ├── PackagesWindow.cs │ ├── PackagesWindow.cs.meta │ ├── StageCameraEditor.cs │ ├── StageCameraEditor.cs.meta │ ├── UIConfigEditor.cs │ ├── UIConfigEditor.cs.meta │ ├── UIContentScalerEditor.cs │ ├── UIContentScalerEditor.cs.meta │ ├── UIPainterEditor.cs │ ├── UIPainterEditor.cs.meta │ ├── UIPanelEditor.cs │ └── UIPanelEditor.cs.meta ├── Resources.meta ├── Resources │ ├── Shaders.meta │ └── Shaders │ │ ├── AddOn.meta │ │ ├── AddOn │ │ ├── FairyGUI-BlurFilter.shader │ │ └── FairyGUI-BlurFilter.shader.meta │ │ ├── FairyGUI-BMFont.shader │ │ ├── FairyGUI-BMFont.shader.meta │ │ ├── FairyGUI-Image.shader │ │ ├── FairyGUI-Image.shader.meta │ │ ├── FairyGUI-Text.shader │ │ └── FairyGUI-Text.shader.meta ├── Runtime.meta └── Runtime │ ├── Core.meta │ ├── Core │ ├── BlendMode.cs │ ├── BlendMode.cs.meta │ ├── CaptureCamera.cs │ ├── CaptureCamera.cs.meta │ ├── Container.cs │ ├── Container.cs.meta │ ├── DisplayObject.cs │ ├── DisplayObject.cs.meta │ ├── GoWrapper.cs │ ├── GoWrapper.cs.meta │ ├── HitTest.meta │ ├── HitTest │ │ ├── ColliderHitTest.cs │ │ ├── ColliderHitTest.cs.meta │ │ ├── HitTestContext.cs │ │ ├── HitTestContext.cs.meta │ │ ├── IHitTest.cs │ │ ├── IHitTest.cs.meta │ │ ├── MeshColliderHitTest.cs │ │ ├── MeshColliderHitTest.cs.meta │ │ ├── PixelHitTest.cs │ │ ├── PixelHitTest.cs.meta │ │ ├── RectHitTest.cs │ │ ├── RectHitTest.cs.meta │ │ ├── ShapeHitTest.cs │ │ └── ShapeHitTest.cs.meta │ ├── Image.cs │ ├── Image.cs.meta │ ├── MaterialManager.cs │ ├── MaterialManager.cs.meta │ ├── Mesh.meta │ ├── Mesh │ │ ├── CompositeMesh.cs │ │ ├── CompositeMesh.cs.meta │ │ ├── EllipseMesh.cs │ │ ├── EllipseMesh.cs.meta │ │ ├── FillMesh.cs │ │ ├── FillMesh.cs.meta │ │ ├── LineMesh.cs │ │ ├── LineMesh.cs.meta │ │ ├── MeshFactory.cs │ │ ├── MeshFactory.cs.meta │ │ ├── PlaneMesh.cs │ │ ├── PlaneMesh.cs.meta │ │ ├── PolygonMesh.cs │ │ ├── PolygonMesh.cs.meta │ │ ├── RectMesh.cs │ │ ├── RectMesh.cs.meta │ │ ├── RegularPolygonMesh.cs │ │ ├── RegularPolygonMesh.cs.meta │ │ ├── RoundedRectMesh.cs │ │ ├── RoundedRectMesh.cs.meta │ │ ├── StraightLineMesh.cs │ │ ├── StraightLineMesh.cs.meta │ │ ├── VertexBuffer.cs │ │ └── VertexBuffer.cs.meta │ ├── MovieClip.cs │ ├── MovieClip.cs.meta │ ├── NAudioClip.cs │ ├── NAudioClip.cs.meta │ ├── NGraphics.cs │ ├── NGraphics.cs.meta │ ├── NTexture.cs │ ├── NTexture.cs.meta │ ├── ShaderConfig.cs │ ├── ShaderConfig.cs.meta │ ├── Shape.cs │ ├── Shape.cs.meta │ ├── Stage.cs │ ├── Stage.cs.meta │ ├── StageCamera.cs │ ├── StageCamera.cs.meta │ ├── StageEngine.cs │ ├── StageEngine.cs.meta │ ├── Stats.cs │ ├── Stats.cs.meta │ ├── Text.meta │ ├── Text │ │ ├── BaseFont.cs │ │ ├── BaseFont.cs.meta │ │ ├── BitmapFont.cs │ │ ├── BitmapFont.cs.meta │ │ ├── DynamicFont.cs │ │ ├── DynamicFont.cs.meta │ │ ├── Emoji.cs │ │ ├── Emoji.cs.meta │ │ ├── FontManager.cs │ │ ├── FontManager.cs.meta │ │ ├── IKeyboard.cs │ │ ├── IKeyboard.cs.meta │ │ ├── InputTextField.cs │ │ ├── InputTextField.cs.meta │ │ ├── RTLSupport.cs │ │ ├── RTLSupport.cs.meta │ │ ├── RichTextField.cs │ │ ├── RichTextField.cs.meta │ │ ├── SelectionShape.cs │ │ ├── SelectionShape.cs.meta │ │ ├── TextField.cs │ │ ├── TextField.cs.meta │ │ ├── TextFormat.cs │ │ ├── TextFormat.cs.meta │ │ ├── TouchScreenKeyboard.cs │ │ ├── TouchScreenKeyboard.cs.meta │ │ ├── TypingEffect.cs │ │ └── TypingEffect.cs.meta │ ├── UpdateContext.cs │ └── UpdateContext.cs.meta │ ├── Event.meta │ ├── Event │ ├── EventBridge.cs │ ├── EventBridge.cs.meta │ ├── EventContext.cs │ ├── EventContext.cs.meta │ ├── EventDispatcher.cs │ ├── EventDispatcher.cs.meta │ ├── EventListener.cs │ ├── EventListener.cs.meta │ ├── IEventDispatcher.cs │ ├── IEventDispatcher.cs.meta │ ├── InputEvent.cs │ └── InputEvent.cs.meta │ ├── Extensions.meta │ ├── Extensions │ ├── DragonBones.meta │ ├── DragonBones │ │ ├── DragonBonesLoader.cs │ │ └── DragonBonesLoader.cs.meta │ ├── Spine.meta │ ├── Spine │ │ ├── SpineLoader.cs │ │ └── SpineLoader.cs.meta │ ├── TextMeshPro.meta │ ├── TextMeshPro │ │ ├── Shaders.meta │ │ ├── Shaders │ │ │ ├── FairyGUI-TMP.shader │ │ │ └── FairyGUI-TMP.shader.meta │ │ ├── TMPFont.cs │ │ ├── TMPFont.cs.meta │ │ ├── TMPTextFormat.cs │ │ └── TMPTextFormat.cs.meta │ ├── WebGLTextInput.meta │ └── WebGLTextInput │ │ ├── WebGLTextInput.cs │ │ ├── WebGLTextInput.cs.meta │ │ ├── WebGLTextInput.jslib │ │ └── WebGLTextInput.jslib.meta │ ├── FairyGUI.asmdef │ ├── FairyGUI.asmdef.meta │ ├── Filter.meta │ ├── Filter │ ├── BlurFilter.cs │ ├── BlurFilter.cs.meta │ ├── ColorFilter.cs │ ├── ColorFilter.cs.meta │ ├── IFilter.cs │ └── IFilter.cs.meta │ ├── Gesture.meta │ ├── Gesture │ ├── LongPressGesture.cs │ ├── LongPressGesture.cs.meta │ ├── PinchGesture.cs │ ├── PinchGesture.cs.meta │ ├── RotationGesture.cs │ ├── RotationGesture.cs.meta │ ├── SwipeGesture.cs │ └── SwipeGesture.cs.meta │ ├── Tween.meta │ ├── Tween │ ├── EaseManager.cs │ ├── EaseManager.cs.meta │ ├── EaseType.cs │ ├── EaseType.cs.meta │ ├── GPath.cs │ ├── GPath.cs.meta │ ├── GTween.cs │ ├── GTween.cs.meta │ ├── GTweener.cs │ ├── GTweener.cs.meta │ ├── TweenManager.cs │ ├── TweenManager.cs.meta │ ├── TweenPropType.cs │ ├── TweenPropType.cs.meta │ ├── TweenValue.cs │ └── TweenValue.cs.meta │ ├── UI.meta │ ├── UI │ ├── Action.meta │ ├── Action │ │ ├── ChangePageAction.cs │ │ ├── ChangePageAction.cs.meta │ │ ├── ControllerAction.cs │ │ ├── ControllerAction.cs.meta │ │ ├── PlayTransitionAction.cs │ │ └── PlayTransitionAction.cs.meta │ ├── AsyncCreationHelper.cs │ ├── AsyncCreationHelper.cs.meta │ ├── Controller.cs │ ├── Controller.cs.meta │ ├── DragDropManager.cs │ ├── DragDropManager.cs.meta │ ├── EMRenderSupport.cs │ ├── EMRenderSupport.cs.meta │ ├── FieldTypes.cs │ ├── FieldTypes.cs.meta │ ├── GButton.cs │ ├── GButton.cs.meta │ ├── GComboBox.cs │ ├── GComboBox.cs.meta │ ├── GComponent.cs │ ├── GComponent.cs.meta │ ├── GGraph.cs │ ├── GGraph.cs.meta │ ├── GGroup.cs │ ├── GGroup.cs.meta │ ├── GImage.cs │ ├── GImage.cs.meta │ ├── GLabel.cs │ ├── GLabel.cs.meta │ ├── GList.cs │ ├── GList.cs.meta │ ├── GLoader.cs │ ├── GLoader.cs.meta │ ├── GLoader3D.cs │ ├── GLoader3D.cs.meta │ ├── GMovieClip.cs │ ├── GMovieClip.cs.meta │ ├── GObject.cs │ ├── GObject.cs.meta │ ├── GObjectPool.cs │ ├── GObjectPool.cs.meta │ ├── GProgressBar.cs │ ├── GProgressBar.cs.meta │ ├── GRichTextField.cs │ ├── GRichTextField.cs.meta │ ├── GRoot.cs │ ├── GRoot.cs.meta │ ├── GScrollBar.cs │ ├── GScrollBar.cs.meta │ ├── GSlider.cs │ ├── GSlider.cs.meta │ ├── GTextField.cs │ ├── GTextField.cs.meta │ ├── GTextInput.cs │ ├── GTextInput.cs.meta │ ├── GTree.cs │ ├── GTree.cs.meta │ ├── GTreeNode.cs │ ├── GTreeNode.cs.meta │ ├── Gears.meta │ ├── Gears │ │ ├── GearAnimation.cs │ │ ├── GearAnimation.cs.meta │ │ ├── GearBase.cs │ │ ├── GearBase.cs.meta │ │ ├── GearColor.cs │ │ ├── GearColor.cs.meta │ │ ├── GearDisplay.cs │ │ ├── GearDisplay.cs.meta │ │ ├── GearDisplay2.cs │ │ ├── GearDisplay2.cs.meta │ │ ├── GearFontSize.cs │ │ ├── GearFontSize.cs.meta │ │ ├── GearIcon.cs │ │ ├── GearIcon.cs.meta │ │ ├── GearLook.cs │ │ ├── GearLook.cs.meta │ │ ├── GearSize.cs │ │ ├── GearSize.cs.meta │ │ ├── GearText.cs │ │ ├── GearText.cs.meta │ │ ├── GearXY.cs │ │ ├── GearXY.cs.meta │ │ ├── IAnimationGear.cs │ │ ├── IAnimationGear.cs.meta │ │ ├── IColorGear.cs │ │ └── IColorGear.cs.meta │ ├── IUISource.cs │ ├── IUISource.cs.meta │ ├── Margin.cs │ ├── Margin.cs.meta │ ├── MovieClipItem.cs │ ├── MovieClipItem.cs.meta │ ├── PackageItem.cs │ ├── PackageItem.cs.meta │ ├── PopupMenu.cs │ ├── PopupMenu.cs.meta │ ├── RelationItem.cs │ ├── RelationItem.cs.meta │ ├── Relations.cs │ ├── Relations.cs.meta │ ├── ScrollPane.cs │ ├── ScrollPane.cs.meta │ ├── Transition.cs │ ├── Transition.cs.meta │ ├── TranslationHelper.cs │ ├── TranslationHelper.cs.meta │ ├── Tree.meta │ ├── Tree │ │ ├── TreeNode.cs │ │ ├── TreeNode.cs.meta │ │ ├── TreeView.cs │ │ └── TreeView.cs.meta │ ├── UIConfig.cs │ ├── UIConfig.cs.meta │ ├── UIContentScaler.cs │ ├── UIContentScaler.cs.meta │ ├── UIObjectFactory.cs │ ├── UIObjectFactory.cs.meta │ ├── UIPackage.cs │ ├── UIPackage.cs.meta │ ├── UIPainter.cs │ ├── UIPainter.cs.meta │ ├── UIPanel.cs │ ├── UIPanel.cs.meta │ ├── Window.cs │ └── Window.cs.meta │ ├── Utils.meta │ └── Utils │ ├── ByteBuffer.cs │ ├── ByteBuffer.cs.meta │ ├── Html.meta │ ├── Html │ ├── HtmlButton.cs │ ├── HtmlButton.cs.meta │ ├── HtmlElement.cs │ ├── HtmlElement.cs.meta │ ├── HtmlImage.cs │ ├── HtmlImage.cs.meta │ ├── HtmlInput.cs │ ├── HtmlInput.cs.meta │ ├── HtmlLink.cs │ ├── HtmlLink.cs.meta │ ├── HtmlPageContext.cs │ ├── HtmlPageContext.cs.meta │ ├── HtmlParseOptions.cs │ ├── HtmlParseOptions.cs.meta │ ├── HtmlParser.cs │ ├── HtmlParser.cs.meta │ ├── HtmlSelect.cs │ ├── HtmlSelect.cs.meta │ ├── IHtmlObject.cs │ ├── IHtmlObject.cs.meta │ ├── IHtmlPageContext.cs │ └── IHtmlPageContext.cs.meta │ ├── Timers.cs │ ├── Timers.cs.meta │ ├── ToolSet.cs │ ├── ToolSet.cs.meta │ ├── UBBParser.cs │ ├── UBBParser.cs.meta │ ├── XML.cs │ ├── XML.cs.meta │ ├── XMLIterator.cs │ ├── XMLIterator.cs.meta │ ├── XMLList.cs │ ├── XMLList.cs.meta │ ├── XMLUtils.cs │ ├── XMLUtils.cs.meta │ ├── ZipReader.cs │ └── ZipReader.cs.meta ├── LICENSE ├── LICENSE.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── Core.meta ├── Core │ ├── IUIAssetLoader.cs │ ├── IUIAssetLoader.cs.meta │ ├── IUIAssetManager.cs │ ├── IUIAssetManager.cs.meta │ ├── IUIAssetManagerConfiguration.cs │ ├── IUIAssetManagerConfiguration.cs.meta │ ├── IUIPackageHelper.cs │ └── IUIPackageHelper.cs.meta ├── FairyGUI.Dynamic.asmdef ├── FairyGUI.Dynamic.asmdef.meta ├── Loader.meta ├── Loader │ ├── DelegateUIAssetLoader.cs │ ├── DelegateUIAssetLoader.cs.meta │ ├── ResourcesUIAssetLoader.cs │ └── ResourcesUIAssetLoader.cs.meta ├── PackageMapping.meta ├── PackageMapping │ ├── UIPackageMapping.cs │ └── UIPackageMapping.cs.meta ├── UIAssetManager.CustomDestroyMethod.cs ├── UIAssetManager.CustomDestroyMethod.cs.meta ├── UIAssetManager.Debugger.cs ├── UIAssetManager.Debugger.cs.meta ├── UIAssetManager.LoadResource.cs ├── UIAssetManager.LoadResource.cs.meta ├── UIAssetManager.UIPackageRef.cs ├── UIAssetManager.UIPackageRef.cs.meta ├── UIAssetManager.cs └── UIAssetManager.cs.meta ├── package.json └── package.json.meta /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | 57 | # Crashlytics generated file 58 | crashlytics-build.properties 59 | 60 | -------------------------------------------------------------------------------- /DemoAssets.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunHowe/FairyGUI-Dynamic/930232e66074eaad4ef66341b9ad0f9d6b22daae/DemoAssets.unitypackage -------------------------------------------------------------------------------- /DemoAssets.unitypackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79267fa2b2c6b2348875b104d42758ef 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0dfb5831ee9b0b64e889cf2aae9331c8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/FairyGUI.Dynamic.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FairyGUI.Dynamic.Editor", 3 | "rootNamespace": "FairyGUI.Dynamic.Editor", 4 | "references": [ 5 | "GUID:853ef8faf8a4268478503c4b87fdb23f", 6 | "GUID:af39456e6a3b4994f8bcbb4298527011" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /Editor/FairyGUI.Dynamic.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa7c15e0f7e9f0f4dbba906448b7535a 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/UIAssetManagerDebuggerInspector.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI.Dynamic.Editor 6 | { 7 | [CustomEditor(typeof(UIAssetManager.Debugger))] 8 | public class UIAssetManagerDebuggerInspector : UnityEditor.Editor 9 | { 10 | private UIAssetManager.Debugger m_Debugger; 11 | 12 | private void OnEnable() 13 | { 14 | m_Debugger = (UIAssetManager.Debugger)target; 15 | } 16 | 17 | public override void OnInspectorGUI() 18 | { 19 | var dict = m_Debugger.GetUIPackageRefCounts(); 20 | 21 | m_UIPackageNames.Clear(); 22 | m_UIPackageNames.AddRange(dict.Keys); 23 | m_UIPackageNames.Sort(); 24 | 25 | foreach (var packageName in m_UIPackageNames) 26 | { 27 | EditorGUILayout.BeginVertical("box"); 28 | 29 | EditorGUILayout.LabelField("packageName", packageName); 30 | EditorGUILayout.LabelField("referenceCount", dict[packageName].ToString()); 31 | EditorGUILayout.EndVertical(); 32 | } 33 | 34 | if (GUILayout.Button("Unload Unused UI Packages")) 35 | m_Debugger.UnloadUnusedUIPackages(); 36 | 37 | if (GUILayout.Button("Unload All UI Packages")) 38 | m_Debugger.UnloadAllUIPackages(); 39 | 40 | EditorUtility.SetDirty(target); 41 | } 42 | 43 | private readonly List m_UIPackageNames = new List(); 44 | } 45 | } -------------------------------------------------------------------------------- /Editor/UIAssetManagerDebuggerInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 714b2f22750d4604b06b352257f18143 3 | timeCreated: 1685346531 -------------------------------------------------------------------------------- /Editor/UIPackageMappingUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace FairyGUI.Dynamic.Editor 8 | { 9 | public static class UIPackageMappingUtility 10 | { 11 | public static void GenerateMappingFile(string assetRoot, string generatePath) 12 | { 13 | var packageFiles = UIPackageUtility.GetUIPackageFiles(assetRoot); 14 | 15 | var mapping = GetOrCreateMapping(generatePath); 16 | 17 | var packageIds = new List(); 18 | var packageNames = new List(); 19 | 20 | foreach (var packageFile in packageFiles) 21 | { 22 | if (!UIPackageUtility.ParseUIPackageIdAndName(packageFile, out var id, out var name)) 23 | continue; 24 | 25 | packageIds.Add(id); 26 | packageNames.Add(name); 27 | } 28 | 29 | mapping.PackageIds = packageIds.ToArray(); 30 | mapping.PackageNames = packageNames.ToArray(); 31 | 32 | EditorUtility.SetDirty(mapping); 33 | AssetDatabase.SaveAssets(); 34 | } 35 | 36 | private static UIPackageMapping GetOrCreateMapping(string settingPath) 37 | { 38 | var mapping = AssetDatabase.LoadAssetAtPath(settingPath); 39 | if (mapping == null) 40 | { 41 | var dir = System.IO.Path.GetDirectoryName(settingPath); 42 | if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) 43 | Directory.CreateDirectory(dir); 44 | 45 | mapping = ScriptableObject.CreateInstance(); 46 | mapping.PackageIds = Array.Empty(); 47 | mapping.PackageNames = Array.Empty(); 48 | 49 | AssetDatabase.CreateAsset(mapping, settingPath); 50 | AssetDatabase.SaveAssets(); 51 | } 52 | 53 | return mapping; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Editor/UIPackageMappingUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f17303943d624b4288844c7623939c38 3 | timeCreated: 1685347914 -------------------------------------------------------------------------------- /Editor/UIPackageUtility.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using FairyGUI.Utils; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace FairyGUI.Dynamic.Editor 9 | { 10 | public static class UIPackageUtility 11 | { 12 | /// 13 | /// 获取所有UIPackage二进制文件 14 | /// 15 | public static List GetUIPackageFiles(string assetsRoot) 16 | { 17 | var files = Directory.GetFiles(assetsRoot, "*_fui.bytes", SearchOption.AllDirectories); 18 | 19 | var unityProjectPath = Path.GetFullPath(".").Replace('\\', '/'); 20 | var unityProjectPathLength = unityProjectPath.Length + 1; 21 | 22 | return files.Select(file => Path.GetFullPath(file).Replace('\\', '/').Substring(unityProjectPathLength)).ToList(); 23 | } 24 | 25 | public static bool ParseUIPackageIdAndName(string file, out string id, out string name) 26 | { 27 | id = string.Empty; 28 | name = string.Empty; 29 | 30 | var asset = AssetDatabase.LoadAssetAtPath(file); 31 | if (asset == null) 32 | { 33 | Debug.LogError($"FairyGUI: can not load asset at {file}"); 34 | return false; 35 | } 36 | 37 | var buffer = new ByteBuffer(asset.bytes); 38 | if (buffer.ReadUint() != 0x46475549) 39 | { 40 | Debug.LogError($"FairyGUI: old package format found in {file}"); 41 | return false; 42 | } 43 | 44 | buffer.version = buffer.ReadInt(); 45 | var ver2 = buffer.version >= 2; 46 | buffer.ReadBool(); //compressed 47 | 48 | id = buffer.ReadString(); 49 | name = buffer.ReadString(); 50 | 51 | return true; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Editor/UIPackageUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74462082f5af4ab7852ea068f8c2de09 3 | timeCreated: 1685348038 -------------------------------------------------------------------------------- /FairyGUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4025e9670f2ad6e4bbca15cea8253b7e 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fca1864980d947bfb1fd073c07362e7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Editor/DisplayObjectEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2f78faa29e5e1547837f976bf4b39f2 3 | timeCreated: 1541149029 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/EditorToolSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35dcb233f95ffd54c94f09d731db89ae 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/FairyGUI.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FairyGUI.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:af39456e6a3b4994f8bcbb4298527011" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /FairyGUI/Editor/FairyGUI.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 757f6ead127d5b34aa7080d8076f7570 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /FairyGUI/Editor/PackagesWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83ed477a96af9c94f9f2ccc24b5a24c0 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/StageCameraEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using FairyGUI; 3 | 4 | namespace FairyGUIEditor 5 | { 6 | /// 7 | /// 8 | /// 9 | [CustomEditor(typeof(StageCamera))] 10 | public class StageCameraEditor : Editor 11 | { 12 | string[] propertyToExclude; 13 | 14 | void OnEnable() 15 | { 16 | propertyToExclude = new string[] { "m_Script" }; 17 | } 18 | 19 | public override void OnInspectorGUI() 20 | { 21 | serializedObject.Update(); 22 | 23 | DrawPropertiesExcluding(serializedObject, propertyToExclude); 24 | 25 | if (serializedObject.ApplyModifiedProperties()) 26 | (target as StageCamera).ApplyModifiedProperties(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FairyGUI/Editor/StageCameraEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b99582678b83dc46986b02984c665a3 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/UIConfigEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74df68b10ee56a54a8105d88312571ce 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/UIContentScalerEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using FairyGUI; 3 | 4 | namespace FairyGUIEditor 5 | { 6 | /// 7 | /// 8 | /// 9 | [CustomEditor(typeof(UIContentScaler))] 10 | public class UIContentScalerEditor : Editor 11 | { 12 | SerializedProperty scaleMode; 13 | SerializedProperty screenMatchMode; 14 | SerializedProperty designResolutionX; 15 | SerializedProperty designResolutionY; 16 | SerializedProperty fallbackScreenDPI; 17 | SerializedProperty defaultSpriteDPI; 18 | SerializedProperty constantScaleFactor; 19 | SerializedProperty ignoreOrientation; 20 | 21 | string[] propertyToExclude; 22 | 23 | void OnEnable() 24 | { 25 | scaleMode = serializedObject.FindProperty("scaleMode"); 26 | screenMatchMode = serializedObject.FindProperty("screenMatchMode"); 27 | designResolutionX = serializedObject.FindProperty("designResolutionX"); 28 | designResolutionY = serializedObject.FindProperty("designResolutionY"); 29 | fallbackScreenDPI = serializedObject.FindProperty("fallbackScreenDPI"); 30 | defaultSpriteDPI = serializedObject.FindProperty("defaultSpriteDPI"); 31 | constantScaleFactor = serializedObject.FindProperty("constantScaleFactor"); 32 | ignoreOrientation = serializedObject.FindProperty("ignoreOrientation"); 33 | 34 | propertyToExclude = new string[] { "m_Script", "scaleMode", "screenMatchMode", "designResolutionX", "designResolutionY", 35 | "fallbackScreenDPI", "defaultSpriteDPI", "constantScaleFactor", "ignoreOrientation"}; 36 | } 37 | 38 | public override void OnInspectorGUI() 39 | { 40 | serializedObject.Update(); 41 | 42 | DrawPropertiesExcluding(serializedObject, propertyToExclude); 43 | 44 | EditorGUILayout.PropertyField(scaleMode); 45 | if ((UIContentScaler.ScaleMode)scaleMode.enumValueIndex == UIContentScaler.ScaleMode.ScaleWithScreenSize) 46 | { 47 | EditorGUILayout.PropertyField(designResolutionX); 48 | EditorGUILayout.PropertyField(designResolutionY); 49 | EditorGUILayout.PropertyField(screenMatchMode); 50 | EditorGUILayout.PropertyField(ignoreOrientation); 51 | } 52 | else if ((UIContentScaler.ScaleMode)scaleMode.enumValueIndex == UIContentScaler.ScaleMode.ConstantPhysicalSize) 53 | { 54 | EditorGUILayout.PropertyField(fallbackScreenDPI); 55 | EditorGUILayout.PropertyField(defaultSpriteDPI); 56 | } 57 | else 58 | EditorGUILayout.PropertyField(constantScaleFactor); 59 | 60 | if (serializedObject.ApplyModifiedProperties()) 61 | (target as UIContentScaler).ApplyModifiedProperties(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /FairyGUI/Editor/UIContentScalerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69174d19fa9521b4283e0b8f0e85acc8 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/UIPainterEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cb0f73c030157845aaa7b42a2b8d577 3 | timeCreated: 1461566835 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Editor/UIPanelEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94949994c6eda08448145f618d0db72f 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c89aebc44f76dc47855d7b455026700 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc39210f7f4d03f4aa637689b9d90d75 3 | folderAsset: yes 4 | timeCreated: 1446459912 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/AddOn.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5137d7a41873f9499f95f860a6cef17 3 | folderAsset: yes 4 | timeCreated: 1465913233 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/AddOn/FairyGUI-BlurFilter.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "FairyGUI/BlurFilter" { 4 | Properties { 5 | _MainTex ("Base (RGB)", 2D) = "white" {} 6 | } 7 | 8 | SubShader { 9 | Pass { 10 | ZTest Always 11 | ZWrite Off 12 | 13 | CGPROGRAM 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | 17 | #include "UnityCG.cginc" 18 | 19 | struct appdata_t { 20 | float4 vertex : POSITION; 21 | float2 texcoord : TEXCOORD0; 22 | }; 23 | 24 | struct v2f { 25 | float4 vertex : SV_POSITION; 26 | half2 texcoord : TEXCOORD0; 27 | half2 taps[4] : TEXCOORD1; 28 | }; 29 | 30 | sampler2D _MainTex; 31 | half4 _MainTex_TexelSize; 32 | half4 _BlurOffsets; 33 | 34 | v2f vert (appdata_t v) 35 | { 36 | v2f o; 37 | o.vertex = UnityObjectToClipPos(v.vertex); 38 | o.texcoord = v.texcoord - _BlurOffsets.xy * _MainTex_TexelSize.xy; 39 | o.taps[0] = o.texcoord + _MainTex_TexelSize * _BlurOffsets.xy; 40 | o.taps[1] = o.texcoord - _MainTex_TexelSize * _BlurOffsets.xy; 41 | o.taps[2] = o.texcoord + _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); 42 | o.taps[3] = o.texcoord - _MainTex_TexelSize * _BlurOffsets.xy * half2(1,-1); 43 | return o; 44 | } 45 | 46 | fixed4 frag (v2f i) : SV_Target 47 | { 48 | half4 color = tex2D(_MainTex, i.taps[0]); 49 | color += tex2D(_MainTex, i.taps[1]); 50 | color += tex2D(_MainTex, i.taps[2]); 51 | color += tex2D(_MainTex, i.taps[3]); 52 | return color * 0.25; 53 | } 54 | ENDCG 55 | } 56 | } 57 | Fallback off 58 | } 59 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/AddOn/FairyGUI-BlurFilter.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f83d3bb1d90aaf54d8aed0783317662f 3 | timeCreated: 1465913243 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/FairyGUI-BMFont.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd79153f88fa7334ea6c5564c053bdca 3 | timeCreated: 1459224288 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/FairyGUI-Image.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 263c97191482b3649ac7bf0810cc4f77 3 | timeCreated: 1459224288 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Resources/Shaders/FairyGUI-Text.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8526777372c6fef4f8162b3a7901dcb0 3 | timeCreated: 1459224288 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59df0b3cd5c24f74baf70cda75cb0aad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eed3a919a48726c46a61e180a615ef7d 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/BlendMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce4df113fe8d9994c83e22680544ccdb 3 | timeCreated: 1464679834 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/CaptureCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d207151359c99fb448f4b3380bf41b0f 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Container.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 531f2c788ec31e7459700f6811410a6f 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/DisplayObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24d09ba8cf3faa74f8dcd1c86ad38588 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/GoWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 796d0bdebe7368c47adfdf04a1abdfc6 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 736ceb6630254bd42b41568b387cbcbe 3 | folderAsset: yes 4 | timeCreated: 1461773297 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/ColliderHitTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class ColliderHitTest : IHitTest 9 | { 10 | /// 11 | /// 12 | /// 13 | public Collider collider; 14 | 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | virtual public bool HitTest(Rect contentRect, Vector2 localPoint) 22 | { 23 | RaycastHit hit; 24 | if (!HitTestContext.GetRaycastHitFromCache(HitTestContext.camera, out hit)) 25 | return false; 26 | 27 | if (hit.collider != collider) 28 | return false; 29 | 30 | return true; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/ColliderHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffed53edbd969f3439a942ca847cd43d 3 | timeCreated: 1461773299 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/HitTestContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public class HitTestContext 10 | { 11 | //set before hit test 12 | public static Vector3 screenPoint; 13 | public static Vector3 worldPoint; 14 | public static Vector3 direction; 15 | public static bool forTouch; 16 | public static Camera camera; 17 | 18 | public static int layerMask = -1; 19 | public static float maxDistance = Mathf.Infinity; 20 | 21 | public static Camera cachedMainCamera; 22 | 23 | static Dictionary raycastHits = new Dictionary(); 24 | 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | public static bool GetRaycastHitFromCache(Camera camera, out RaycastHit hit) 32 | { 33 | RaycastHit? hitRef; 34 | if (!raycastHits.TryGetValue(camera, out hitRef)) 35 | { 36 | Ray ray = camera.ScreenPointToRay(screenPoint); 37 | if (Physics.Raycast(ray, out hit, maxDistance, layerMask)) 38 | { 39 | raycastHits[camera] = hit; 40 | return true; 41 | } 42 | else 43 | { 44 | raycastHits[camera] = null; 45 | return false; 46 | } 47 | } 48 | else if (hitRef == null) 49 | { 50 | hit = new RaycastHit(); 51 | return false; 52 | } 53 | else 54 | { 55 | hit = (RaycastHit)hitRef; 56 | return true; 57 | } 58 | } 59 | 60 | /// 61 | /// 62 | /// 63 | /// 64 | /// 65 | public static void CacheRaycastHit(Camera camera, ref RaycastHit hit) 66 | { 67 | raycastHits[camera] = hit; 68 | } 69 | 70 | /// 71 | /// 72 | /// 73 | public static void ClearRaycastHitCache() 74 | { 75 | raycastHits.Clear(); 76 | } 77 | 78 | #if UNITY_2019_3_OR_NEWER 79 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 80 | static void InitializeOnLoad() 81 | { 82 | cachedMainCamera = null; 83 | raycastHits.Clear(); 84 | } 85 | #endif 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/HitTestContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19869d6307205b84a81aef6031ba1f33 3 | timeCreated: 1461750571 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/IHitTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public enum HitTestMode 9 | { 10 | Default, 11 | Raycast 12 | } 13 | 14 | /// 15 | /// 16 | /// 17 | public interface IHitTest 18 | { 19 | /// 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | bool HitTest(Rect contentRect, Vector2 localPoint); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/IHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bbadf82645501c41957c257ab020708 3 | timeCreated: 1461853133 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/MeshColliderHitTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class MeshColliderHitTest : ColliderHitTest 9 | { 10 | public Vector2 lastHit; 11 | 12 | /// 13 | /// 14 | /// 15 | /// 16 | public MeshColliderHitTest(MeshCollider collider) 17 | { 18 | this.collider = collider; 19 | } 20 | 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | override public bool HitTest(Rect contentRect, Vector2 localPoint) 28 | { 29 | RaycastHit hit; 30 | if (!HitTestContext.GetRaycastHitFromCache(HitTestContext.camera, out hit)) 31 | return false; 32 | 33 | if (hit.collider != collider) 34 | return false; 35 | 36 | lastHit = new Vector2(hit.textureCoord.x * contentRect.width, (1 - hit.textureCoord.y) * contentRect.height); 37 | HitTestContext.direction = Vector3.back; 38 | HitTestContext.worldPoint = StageCamera.main.ScreenToWorldPoint(new Vector2(lastHit.x, Screen.height - lastHit.y)); 39 | 40 | return true; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/MeshColliderHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d0a2fa0c7008814795dc7f5f3bd4b19 3 | timeCreated: 1461750571 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/PixelHitTest.cs: -------------------------------------------------------------------------------- 1 | using FairyGUI.Utils; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public class PixelHitTestData 10 | { 11 | public int pixelWidth; 12 | public float scale; 13 | public byte[] pixels; 14 | public int pixelsLength; 15 | public int pixelsOffset; 16 | 17 | public void Load(ByteBuffer ba) 18 | { 19 | ba.ReadInt(); 20 | pixelWidth = ba.ReadInt(); 21 | scale = 1.0f / ba.ReadByte(); 22 | pixels = ba.buffer; 23 | pixelsLength = ba.ReadInt(); 24 | pixelsOffset = ba.position; 25 | ba.Skip(pixelsLength); 26 | } 27 | } 28 | 29 | /// 30 | /// 31 | /// 32 | public class PixelHitTest : IHitTest 33 | { 34 | public int offsetX; 35 | public int offsetY; 36 | public float sourceWidth; 37 | public float sourceHeight; 38 | 39 | PixelHitTestData _data; 40 | 41 | /// 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | public PixelHitTest(PixelHitTestData data, int offsetX, int offsetY, float sourceWidth, float sourceHeight) 48 | { 49 | _data = data; 50 | this.offsetX = offsetX; 51 | this.offsetY = offsetY; 52 | this.sourceWidth = sourceWidth; 53 | this.sourceHeight = sourceHeight; 54 | } 55 | 56 | /// 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | public bool HitTest(Rect contentRect, Vector2 localPoint) 63 | { 64 | if (!contentRect.Contains(localPoint)) 65 | return false; 66 | 67 | int x = Mathf.FloorToInt((localPoint.x * sourceWidth / contentRect.width - offsetX) * _data.scale); 68 | int y = Mathf.FloorToInt((localPoint.y * sourceHeight / contentRect.height - offsetY) * _data.scale); 69 | if (x < 0 || y < 0 || x >= _data.pixelWidth) 70 | return false; 71 | 72 | int pos = y * _data.pixelWidth + x; 73 | int pos2 = pos / 8; 74 | int pos3 = pos % 8; 75 | 76 | if (pos2 >= 0 && pos2 < _data.pixelsLength) 77 | return ((_data.pixels[_data.pixelsOffset + pos2] >> pos3) & 0x1) > 0; 78 | else 79 | return false; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/PixelHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98cb65df7f5853c4b8e3719a28d4d81f 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/RectHitTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class RectHitTest : IHitTest 9 | { 10 | /// 11 | /// 12 | /// 13 | public Rect rect; 14 | 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | public bool HitTest(Rect contentRect, Vector2 localPoint) 22 | { 23 | return rect.Contains(localPoint); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/RectHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92768f03d9b8dea47b1649613c4d0de7 3 | timeCreated: 1474896442 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/ShapeHitTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class ShapeHitTest : IHitTest 9 | { 10 | /// 11 | /// 12 | /// 13 | public DisplayObject shape; 14 | 15 | public ShapeHitTest(DisplayObject obj) 16 | { 17 | shape = obj; 18 | } 19 | 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | public bool HitTest(Rect contentRect, Vector2 localPoint) 27 | { 28 | if (shape.graphics == null) 29 | return false; 30 | 31 | if (shape.parent != null) 32 | { 33 | localPoint = shape.parent.TransformPoint(localPoint, shape); 34 | contentRect.size = shape.size; 35 | } 36 | 37 | IHitTest ht = shape.graphics.meshFactory as IHitTest; 38 | if (ht == null) 39 | return false; 40 | 41 | return ht.HitTest(contentRect, localPoint); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/HitTest/ShapeHitTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cd85528f2766431cafc5282f956c060 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Image.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 948ec8822e3c52942bc6e7f6265b264c 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/MaterialManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7223c4628e56c1e448c70e10168f5fa1 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fca659474d209d94fbded309f407995c 3 | folderAsset: yes 4 | timeCreated: 1545987172 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/CompositeMesh.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public class CompositeMesh : IMeshFactory, IHitTest 10 | { 11 | /// 12 | /// 13 | /// 14 | public readonly List elements; 15 | 16 | /// 17 | /// If it is -1, means all elements are active, otherwise, only the specific element is active 18 | /// 19 | public int activeIndex; 20 | 21 | public CompositeMesh() 22 | { 23 | elements = new List(); 24 | activeIndex = -1; 25 | } 26 | 27 | public void OnPopulateMesh(VertexBuffer vb) 28 | { 29 | int cnt = elements.Count; 30 | if (cnt == 1) 31 | elements[0].OnPopulateMesh(vb); 32 | else 33 | { 34 | VertexBuffer vb2 = VertexBuffer.Begin(vb); 35 | 36 | for (int i = 0; i < cnt; i++) 37 | { 38 | if (activeIndex == -1 || i == activeIndex) 39 | { 40 | vb2.Clear(); 41 | elements[i].OnPopulateMesh(vb2); 42 | vb.Append(vb2); 43 | } 44 | } 45 | 46 | vb2.End(); 47 | } 48 | } 49 | 50 | public bool HitTest(Rect contentRect, Vector2 point) 51 | { 52 | if (!contentRect.Contains(point)) 53 | return false; 54 | 55 | bool flag = false; 56 | int cnt = elements.Count; 57 | for (int i = 0; i < cnt; i++) 58 | { 59 | if (activeIndex == -1 || i == activeIndex) 60 | { 61 | IHitTest ht = elements[i] as IHitTest; 62 | if (ht != null) 63 | { 64 | if (ht.HitTest(contentRect, point)) 65 | return true; 66 | } 67 | else 68 | flag = true; 69 | } 70 | } 71 | 72 | return flag; 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/CompositeMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba3d921c1f6e95f4e9105f45fd67bda5 3 | timeCreated: 1546159121 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/EllipseMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ea96854995120948847301fb48d1675 3 | timeCreated: 1545987173 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/FillMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b37d56dc1840734a8fdb4971f5bc733 3 | timeCreated: 1545987173 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/LineMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d1935a924fabf74a92c72b22a042279 3 | timeCreated: 1546519483 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/MeshFactory.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI 3 | { 4 | /// 5 | /// 6 | /// 7 | public interface IMeshFactory 8 | { 9 | /// 10 | /// 11 | /// 12 | /// 13 | void OnPopulateMesh(VertexBuffer vb); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/MeshFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 274275eaa3fbbc94697cbe90a0fb52f1 3 | timeCreated: 1545987172 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/PlaneMesh.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class PlaneMesh : IMeshFactory 9 | { 10 | public int gridSize = 30; 11 | 12 | public void OnPopulateMesh(VertexBuffer vb) 13 | { 14 | float w = vb.contentRect.width; 15 | float h = vb.contentRect.height; 16 | float xMax = vb.contentRect.xMax; 17 | float yMax = vb.contentRect.yMax; 18 | int hc = (int)Mathf.Min(Mathf.CeilToInt(w / gridSize), 9); 19 | int vc = (int)Mathf.Min(Mathf.CeilToInt(h / gridSize), 9); 20 | int eachPartX = Mathf.FloorToInt(w / hc); 21 | int eachPartY = Mathf.FloorToInt(h / vc); 22 | float x, y; 23 | for (int i = 0; i <= vc; i++) 24 | { 25 | if (i == vc) 26 | y = yMax; 27 | else 28 | y = vb.contentRect.y + i * eachPartY; 29 | for (int j = 0; j <= hc; j++) 30 | { 31 | if (j == hc) 32 | x = xMax; 33 | else 34 | x = vb.contentRect.x + j * eachPartX; 35 | vb.AddVert(new Vector3(x, y, 0)); 36 | } 37 | } 38 | 39 | for (int i = 0; i < vc; i++) 40 | { 41 | int k = i * (hc + 1); 42 | for (int j = 1; j <= hc; j++) 43 | { 44 | int m = k + j; 45 | vb.AddTriangle(m - 1, m, m + hc); 46 | vb.AddTriangle(m, m + hc + 1, m + hc); 47 | } 48 | } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/PlaneMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 121b756a7a8240c49b63fa9de560691a 3 | timeCreated: 1547970144 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/PolygonMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db020628cd79e714fbafdbaaa2cc355f 3 | timeCreated: 1545987173 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/RectMesh.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class RectMesh : IMeshFactory, IHitTest 9 | { 10 | /// 11 | /// 12 | /// 13 | public Rect? drawRect; 14 | 15 | /// 16 | /// 17 | /// 18 | public float lineWidth; 19 | 20 | /// 21 | /// 22 | /// 23 | public Color32 lineColor; 24 | 25 | /// 26 | /// 27 | /// 28 | public Color32? fillColor; 29 | 30 | /// 31 | /// 32 | /// 33 | public Color32[] colors; 34 | 35 | public RectMesh() 36 | { 37 | lineColor = Color.black; 38 | } 39 | 40 | public void OnPopulateMesh(VertexBuffer vb) 41 | { 42 | Rect rect = drawRect != null ? (Rect)drawRect : vb.contentRect; 43 | Color32 color = fillColor != null ? (Color32)fillColor : vb.vertexColor; 44 | if (lineWidth == 0) 45 | { 46 | if (color.a != 0)//optimized 47 | vb.AddQuad(rect, color); 48 | } 49 | else 50 | { 51 | Rect part; 52 | 53 | //left,right 54 | part = new Rect(rect.x, rect.y, lineWidth, rect.height); 55 | vb.AddQuad(part, lineColor); 56 | part = new Rect(rect.xMax - lineWidth, rect.y, lineWidth, rect.height); 57 | vb.AddQuad(part, lineColor); 58 | 59 | //top, bottom 60 | part = new Rect(rect.x + lineWidth, rect.y, rect.width - lineWidth * 2, lineWidth); 61 | vb.AddQuad(part, lineColor); 62 | part = new Rect(rect.x + lineWidth, rect.yMax - lineWidth, rect.width - lineWidth * 2, lineWidth); 63 | vb.AddQuad(part, lineColor); 64 | 65 | //middle 66 | if (color.a != 0)//optimized 67 | { 68 | part = Rect.MinMaxRect(rect.x + lineWidth, rect.y + lineWidth, rect.xMax - lineWidth, rect.yMax - lineWidth); 69 | if (part.width > 0 && part.height > 0) 70 | vb.AddQuad(part, color); 71 | } 72 | } 73 | 74 | if (colors != null) 75 | vb.RepeatColors(colors, 0, vb.currentVertCount); 76 | 77 | vb.AddTriangles(); 78 | } 79 | 80 | public bool HitTest(Rect contentRect, Vector2 point) 81 | { 82 | return contentRect.Contains(point); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/RectMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13a3a9d0d365d834696112114d7bf951 3 | timeCreated: 1545987172 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/RegularPolygonMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4084bdb2f1738340a28ab5699977f3b 3 | timeCreated: 1545987173 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/RoundedRectMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f910c4392a714c41b421c296621562b 3 | timeCreated: 1545987172 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/StraightLineMesh.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class StraightLineMesh : IMeshFactory 9 | { 10 | /// 11 | /// 12 | /// 13 | public Color color; 14 | 15 | /// 16 | /// 17 | /// 18 | public Vector3 origin; 19 | 20 | /// 21 | /// 22 | /// 23 | public Vector3 end; 24 | 25 | /// 26 | /// 27 | /// 28 | public float lineWidth; 29 | 30 | /// 31 | /// 32 | /// 33 | public bool repeatFill; 34 | 35 | public StraightLineMesh() 36 | { 37 | color = Color.black; 38 | lineWidth = 1; 39 | } 40 | 41 | /// 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | public StraightLineMesh(float lineWidth, Color color, bool repeatFill) 48 | { 49 | this.lineWidth = lineWidth; 50 | this.color = color; 51 | this.repeatFill = repeatFill; 52 | } 53 | 54 | public void OnPopulateMesh(VertexBuffer vb) 55 | { 56 | if (origin == end) 57 | return; 58 | 59 | float length = Vector2.Distance(origin, end); 60 | Vector3 lineVector = end - origin; 61 | Vector3 widthVector = Vector3.Cross(lineVector, new Vector3(0, 0, 1)); 62 | widthVector.Normalize(); 63 | 64 | Vector3 v0, v1, v2, v3; 65 | 66 | if (repeatFill) 67 | { 68 | float ratio = length / vb.textureSize.x; 69 | v0 = VertexBuffer.NormalizedUV[0]; 70 | v1 = VertexBuffer.NormalizedUV[1]; 71 | v2 = new Vector2(ratio, 1); 72 | v3 = new Vector2(ratio, 0); 73 | } 74 | else 75 | { 76 | v0 = new Vector2(vb.uvRect.xMin, vb.uvRect.yMin); 77 | v1 = new Vector2(vb.uvRect.xMin, vb.uvRect.yMax); 78 | v2 = new Vector2(vb.uvRect.xMax, vb.uvRect.yMax); 79 | v3 = new Vector2(vb.uvRect.xMax, vb.uvRect.yMin); 80 | } 81 | 82 | vb.AddVert(origin - widthVector * lineWidth * 0.5f, color, v0); 83 | vb.AddVert(origin + widthVector * lineWidth * 0.5f, color, v1); 84 | vb.AddVert(end + widthVector * lineWidth * 0.5f, color, v2); 85 | vb.AddVert(end - widthVector * lineWidth * 0.5f, color, v3); 86 | 87 | vb.AddTriangles(); 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/StraightLineMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27b002bc89d804a7b8058b9d16d5c506 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Mesh/VertexBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d5501e8f84e40e47835611ab3896029 3 | timeCreated: 1545987173 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/MovieClip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ddeeb52259b7ed4e8a604fa8cd47897 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/NAudioClip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e081bc28928c3474194543c862fadec5 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/NGraphics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b84f79fb60acc974cb58c5368b257716 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/NTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdb420f5e4ef87d419c4467d1b8f2ddf 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/ShaderConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4eae4be32683c04a96ac1c4cd1834ab 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Shape.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbcf11c269a33474aa9adaafd9867711 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Stage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6650441f8140eae4c896682b7fd5b3e6 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/StageCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 367e80e3fa958344491a9a196a902b72 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/StageEngine.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class StageEngine : MonoBehaviour 9 | { 10 | public int ObjectsOnStage; 11 | public int GraphicsOnStage; 12 | 13 | public static bool beingQuit; 14 | 15 | void Start() 16 | { 17 | useGUILayout = false; 18 | } 19 | 20 | void LateUpdate() 21 | { 22 | Stage.inst.InternalUpdate(); 23 | 24 | ObjectsOnStage = Stats.ObjectCount; 25 | GraphicsOnStage = Stats.GraphicsCount; 26 | } 27 | 28 | void OnGUI() 29 | { 30 | Stage.inst.HandleGUIEvents(Event.current); 31 | } 32 | 33 | void OnApplicationQuit() 34 | { 35 | if (Application.isEditor) 36 | { 37 | beingQuit = true; 38 | UIPackage.RemoveAllPackages(); 39 | Stage.inst.Dispose(); 40 | } 41 | } 42 | 43 | #if UNITY_2019_3_OR_NEWER 44 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 45 | static void InitializeOnLoad() 46 | { 47 | beingQuit = false; 48 | } 49 | #endif 50 | } 51 | } -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/StageEngine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0922848d650639f479e29635982d4a4c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 100 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Stats.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI 3 | { 4 | /// 5 | /// 6 | /// 7 | public class Stats 8 | { 9 | /// 10 | /// 11 | /// 12 | public static int ObjectCount; 13 | 14 | /// 15 | /// 16 | /// 17 | public static int GraphicsCount; 18 | 19 | /// 20 | /// 21 | /// 22 | public static int LatestObjectCreation; 23 | 24 | /// 25 | /// 26 | /// 27 | public static int LatestGraphicsCreation; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Stats.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baddfd53a8a771f4eaa567ee3eb2ccc0 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6a329985f59cbd4ba1618ac71c89d7d 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/BaseFont.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI 6 | { 7 | /// 8 | /// Base class for all kind of fonts. 9 | /// 10 | public class BaseFont 11 | { 12 | /// 13 | /// The name of this font object. 14 | /// 15 | public string name; 16 | 17 | /// 18 | /// The texture of this font object. 19 | /// 20 | public NTexture mainTexture; 21 | 22 | /// 23 | /// Can this font be tinted? Will be true for dynamic font and fonts generated by BMFont. 24 | /// 25 | public bool canTint; 26 | 27 | /// 28 | /// If true, it will use extra vertices to enhance bold effect 29 | /// 30 | public bool customBold; 31 | 32 | /// 33 | /// If true, it will use extra vertices to enhance bold effect ONLY when it is in italic style. 34 | /// 35 | public bool customBoldAndItalic; 36 | 37 | /// 38 | /// If true, it will use extra vertices(4 direction) to enhance outline effect 39 | /// 40 | public bool customOutline; 41 | 42 | /// 43 | /// The shader for this font object. 44 | /// 45 | public string shader; 46 | 47 | /// 48 | /// Keep text crisp. 49 | /// 50 | public bool keepCrisp; 51 | 52 | /// 53 | /// 54 | /// 55 | public int version; 56 | 57 | protected internal static bool textRebuildFlag; 58 | 59 | protected const float SupScale = 0.58f; 60 | protected const float SupOffset = 0.33f; 61 | 62 | virtual public void SetFormat(TextFormat format, float fontSizeScale) 63 | { 64 | } 65 | 66 | virtual public void PrepareCharacters(string text, TextFormat format, float fontSizeScale) 67 | { 68 | } 69 | 70 | virtual public void Prepare(TextFormat format) 71 | { 72 | } 73 | 74 | virtual public bool BuildGraphics(NGraphics graphics) 75 | { 76 | return false; 77 | } 78 | 79 | virtual public void StartDraw(NGraphics graphics) 80 | { 81 | } 82 | 83 | virtual public bool GetGlyph(char ch, out float width, out float height, out float baseline) 84 | { 85 | width = 0; 86 | height = 0; 87 | baseline = 0; 88 | return false; 89 | } 90 | 91 | virtual public void DrawGlyph(VertexBuffer vb, float x, float y2) 92 | { 93 | } 94 | 95 | virtual public void DrawLine(VertexBuffer vb, float x, float y, float width, int fontSize, int type) 96 | { 97 | } 98 | 99 | virtual public bool HasCharacter(char ch) 100 | { 101 | return false; 102 | } 103 | 104 | virtual public int GetLineHeight(int size) 105 | { 106 | return 0; 107 | } 108 | 109 | virtual public void Dispose() 110 | { 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/BaseFont.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 242acb07eafac7a43a60dc4107fbd6b4 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/BitmapFont.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1441c09e3389a046827b23ee409a37a 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/DynamicFont.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37b73f8527098974cb0ccf518ff95351 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/Emoji.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public class Emoji 10 | { 11 | /// 12 | /// 代表图片资源url。 13 | /// 14 | public string url; 15 | 16 | /// 17 | /// 图片宽度。不设置(0)则表示使用原始宽度。 18 | /// 19 | public int width; 20 | 21 | /// 22 | /// 图片高度。不设置(0)则表示使用原始高度。 23 | /// 24 | public int height; 25 | 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | public Emoji(string url, int width, int height) 33 | { 34 | this.url = url; 35 | this.width = width; 36 | this.height = height; 37 | } 38 | 39 | /// 40 | /// 41 | /// 42 | /// 43 | public Emoji(string url) 44 | { 45 | this.url = url; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/Emoji.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3859ae9020061394cadacd1624e04ed9 3 | timeCreated: 1475139464 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/FontManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5084c28e388b94a4fa4e2a80485296b3 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/IKeyboard.cs: -------------------------------------------------------------------------------- 1 | namespace FairyGUI 2 | { 3 | /// 4 | /// 用于文本输入的键盘接口 5 | /// 6 | public interface IKeyboard 7 | { 8 | /// 9 | /// 键盘已收回,输入已完成 10 | /// 11 | bool done { get; } 12 | 13 | /// 14 | /// 是否支持在光标处输入。如果为true,GetInput返回的是在当前光标处需要插入的文本,如果为false,GetInput返回的是整个文本。 15 | /// 16 | bool supportsCaret { get; } 17 | 18 | /// 19 | /// 用户输入的文本。 20 | /// 21 | /// 22 | string GetInput(); 23 | 24 | /// 25 | /// 打开键盘 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | /// 33 | /// 34 | /// 35 | void Open(string text, bool autocorrection, bool multiline, bool secure, bool alert, string textPlaceholder, int keyboardType, bool hideInput); 36 | 37 | /// 38 | /// 关闭键盘 39 | /// 40 | void Close(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/IKeyboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e3b9d951c903b049b8495c2d16f67fe 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/InputTextField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87f693de944eb7d4ab4ccb9b65af352a 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/RTLSupport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 575b3af943ee8a04bb4d8feb568b1d2e 3 | timeCreated: 1521600498 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/RichTextField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87b472f7ce488fa4bbd8942342458ccf 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/SelectionShape.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using FairyGUI.Utils; 4 | 5 | namespace FairyGUI 6 | { 7 | /// 8 | /// 9 | /// 10 | public class SelectionShape : DisplayObject, IMeshFactory 11 | { 12 | public readonly List rects; 13 | 14 | public SelectionShape() 15 | { 16 | CreateGameObject("SelectionShape"); 17 | graphics = new NGraphics(gameObject); 18 | graphics.texture = NTexture.Empty; 19 | graphics.meshFactory = this; 20 | 21 | rects = new List(); 22 | } 23 | 24 | /// 25 | /// 26 | /// 27 | public Color color 28 | { 29 | get 30 | { 31 | return graphics.color; 32 | } 33 | set 34 | { 35 | graphics.color = value; 36 | graphics.Tint(); 37 | } 38 | } 39 | 40 | public void Refresh() 41 | { 42 | int count = rects.Count; 43 | if (count > 0) 44 | { 45 | Rect rect = new Rect(); 46 | rect = rects[0]; 47 | Rect tmp; 48 | for (int i = 1; i < count; i++) 49 | { 50 | tmp = rects[i]; 51 | rect = ToolSet.Union(ref rect, ref tmp); 52 | } 53 | SetSize(rect.xMax, rect.yMax); 54 | } 55 | else 56 | SetSize(0, 0); 57 | graphics.SetMeshDirty(); 58 | } 59 | 60 | public void Clear() 61 | { 62 | rects.Clear(); 63 | graphics.SetMeshDirty(); 64 | } 65 | 66 | public void OnPopulateMesh(VertexBuffer vb) 67 | { 68 | int count = rects.Count; 69 | if (count == 0 || this.color == Color.clear) 70 | return; 71 | 72 | for (int i = 0; i < count; i++) 73 | vb.AddQuad(rects[i]); 74 | vb.AddTriangles(); 75 | } 76 | 77 | protected override DisplayObject HitTest() 78 | { 79 | Vector2 localPoint = WorldToLocal(HitTestContext.worldPoint, HitTestContext.direction); 80 | 81 | if (_contentRect.Contains(localPoint)) 82 | { 83 | int count = rects.Count; 84 | for (int i = 0; i < count; i++) 85 | { 86 | if (rects[i].Contains(localPoint)) 87 | return this; 88 | } 89 | } 90 | 91 | return null; 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/SelectionShape.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f1920b8ccf9c8b4ca5f2794991735d9 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/TextField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8a05d6d82201104cb6b5156ca294f54 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/TextFormat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecffbe294c108da4ab8a1c573e3d4dfd 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/TouchScreenKeyboard.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public class TouchScreenKeyboard : IKeyboard 9 | { 10 | UnityEngine.TouchScreenKeyboard _keyboard; 11 | 12 | public bool done 13 | { 14 | #if UNITY_2017_2_OR_NEWER 15 | get 16 | { 17 | return _keyboard == null 18 | || _keyboard.status == UnityEngine.TouchScreenKeyboard.Status.Done 19 | || _keyboard.status == UnityEngine.TouchScreenKeyboard.Status.Canceled 20 | || _keyboard.status == UnityEngine.TouchScreenKeyboard.Status.LostFocus; 21 | } 22 | #else 23 | get { return _keyboard == null || _keyboard.done || _keyboard.wasCanceled; } 24 | #endif 25 | } 26 | 27 | public bool supportsCaret 28 | { 29 | get { return false; } 30 | } 31 | 32 | public string GetInput() 33 | { 34 | if (_keyboard != null) 35 | { 36 | string s = _keyboard.text; 37 | 38 | if (this.done) 39 | _keyboard = null; 40 | 41 | return s; 42 | } 43 | else 44 | return null; 45 | } 46 | 47 | public void Open(string text, bool autocorrection, bool multiline, bool secure, bool alert, string textPlaceholder, int keyboardType, bool hideInput) 48 | { 49 | if (_keyboard != null) 50 | return; 51 | 52 | UnityEngine.TouchScreenKeyboard.hideInput = hideInput; 53 | _keyboard = UnityEngine.TouchScreenKeyboard.Open(text, (TouchScreenKeyboardType)keyboardType, autocorrection, multiline, secure, alert, textPlaceholder); 54 | } 55 | 56 | public void Close() 57 | { 58 | if (_keyboard != null) 59 | { 60 | _keyboard.active = false; 61 | _keyboard = null; 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/TouchScreenKeyboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb24d1c92a1114a4f9db5688cc3fa35b 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/Text/TypingEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 213be0a4bfae47c4ebf643f5ee856399 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Core/UpdateContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa81e163380612a4a9591fe57a5b442c 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faa71f0e576742d46865b6bb7422b7f0 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/EventBridge.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9712bee5e6977647989e012a6a332a6 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/EventContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public class EventContext 10 | { 11 | /// 12 | /// 13 | /// 14 | public EventDispatcher sender { get; internal set; } 15 | 16 | /// 17 | /// / 18 | /// 19 | public object initiator { get; internal set; } 20 | 21 | /// 22 | /// / 23 | /// 24 | public InputEvent inputEvent { get; internal set; } 25 | 26 | /// 27 | /// 28 | /// 29 | public string type; 30 | 31 | /// 32 | /// 33 | /// 34 | public object data; 35 | 36 | internal bool _defaultPrevented; 37 | internal bool _stopsPropagation; 38 | internal bool _touchCapture; 39 | 40 | internal List callChain = new List(); 41 | 42 | /// 43 | /// 44 | /// 45 | public void StopPropagation() 46 | { 47 | _stopsPropagation = true; 48 | } 49 | 50 | /// 51 | /// 52 | /// 53 | public void PreventDefault() 54 | { 55 | _defaultPrevented = true; 56 | } 57 | 58 | /// 59 | /// 60 | /// 61 | public void CaptureTouch() 62 | { 63 | _touchCapture = true; 64 | } 65 | 66 | /// 67 | /// 68 | /// 69 | public bool isDefaultPrevented 70 | { 71 | get { return _defaultPrevented; } 72 | } 73 | 74 | static Stack pool = new Stack(); 75 | internal static EventContext Get() 76 | { 77 | if (pool.Count > 0) 78 | { 79 | EventContext context = pool.Pop(); 80 | context._stopsPropagation = false; 81 | context._defaultPrevented = false; 82 | context._touchCapture = false; 83 | return context; 84 | } 85 | else 86 | return new EventContext(); 87 | } 88 | 89 | internal static void Return(EventContext value) 90 | { 91 | pool.Push(value); 92 | } 93 | 94 | 95 | 96 | #if UNITY_2019_3_OR_NEWER 97 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 98 | static void InitializeOnLoad() 99 | { 100 | pool.Clear(); 101 | } 102 | #endif 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/EventContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3391a1fa2fc33b7448dfdf3e7c48880d 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/EventDispatcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f31d18fa6488bb469504c7128522d21 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/EventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8747c4706bc8c864786f691555eaa2fb 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/IEventDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// 8 | /// 9 | public interface IEventDispatcher 10 | { 11 | void AddEventListener(string strType, EventCallback0 callback); 12 | void AddEventListener(string strType, EventCallback1 callback); 13 | void RemoveEventListener(string strType, EventCallback0 callback); 14 | void RemoveEventListener(string strType, EventCallback1 callback); 15 | bool DispatchEvent(EventContext context); 16 | bool DispatchEvent(string strType); 17 | bool DispatchEvent(string strType, object data); 18 | bool DispatchEvent(string strType, object data, object initiator); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/IEventDispatcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8dfc3c6bb6a91445b52cee1e916c398 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Event/InputEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc16eca0c17d9344882b6e63f26ecc9e 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccfece0bf7a7c2943b9b3f2194641818 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/DragonBones.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bec1f19725335f44792705dfe7bc116d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/DragonBones/DragonBonesLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2cc195037d886740b8d8495101b02d7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/Spine.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0d2e7db9f8769843a0cb839bb929f9d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/Spine/SpineLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 158ec9adfe1aac74e882a9bef2f54c35 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c91f453430958e540a7143fe445d8cbf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72d67841de8621743848ac13178d0bc9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro/Shaders/FairyGUI-TMP.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a934c1454cefb244a83ff0330750cf8 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro/TMPFont.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1e2735a9c3112a4daaabd9e42dc3311 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro/TMPTextFormat.cs: -------------------------------------------------------------------------------- 1 | #if FAIRYGUI_TMPRO 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public partial class TextFormat 9 | { 10 | public float faceDilate; 11 | public float outlineSoftness; 12 | public float underlaySoftness; 13 | } 14 | } 15 | 16 | #endif -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/TextMeshPro/TMPTextFormat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5e1583aef3fe114f971cb8517825a30 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/WebGLTextInput.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bc17e9a2d536cc4d8fe0a2eedd7763d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/WebGLTextInput/WebGLTextInput.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_WEBGL && FAIRYGUI_WEBGL_TEXT_INPUT 2 | 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using AOT; 6 | using FairyGUI; 7 | using UnityEngine; 8 | 9 | public static class WebGLTextInput 10 | { 11 | static WebGLTextInput() 12 | { 13 | WebGLTextInputInit(OnInput, OnBlur); 14 | } 15 | 16 | public static void Start(InputTextField target) 17 | { 18 | WebGLTextInputSetText(target.text, 19 | !target.textField.singleLine, 20 | ColorUtility.ToHtmlStringRGBA(target.textFormat.color), 21 | target.textFormat.size, 22 | target.textFormat.font, 23 | target.maxLength); 24 | 25 | WebGLInput.captureAllKeyboardInput = false; 26 | 27 | SyncTransform(target); 28 | } 29 | 30 | public static void Stop() 31 | { 32 | WebGLTextInputHide(); 33 | } 34 | 35 | public static void SyncTransform(InputTextField target) 36 | { 37 | Rect rect = target.TransformRect(new Rect(0, 0, target.width, target.height), null); 38 | rect.min = StageCamera.main.WorldToScreenPoint(rect.min); 39 | rect.max = StageCamera.main.WorldToScreenPoint(rect.max); 40 | rect.y = Screen.height - rect.y - rect.height; 41 | 42 | WebGLTextInputShow(rect.x, rect.y, target.width, target.height, 43 | rect.width / target.width, rect.height / target.height); 44 | } 45 | 46 | [MonoPInvokeCallback(typeof(Action))] 47 | static void OnInput(string value) 48 | { 49 | var focus = Stage.inst.focus as InputTextField; 50 | if (focus != null) 51 | focus.ReplaceText(value); 52 | } 53 | 54 | [MonoPInvokeCallback(typeof(Action))] 55 | static void OnBlur() 56 | { 57 | WebGLInput.captureAllKeyboardInput = true; 58 | 59 | var focus = Stage.inst.focus as InputTextField; 60 | if (focus != null) 61 | Stage.inst.SetFocus(null, true); 62 | } 63 | 64 | [DllImport("__Internal")] 65 | public static extern void WebGLTextInputInit(Action onInputCallback, Action onBlurCallback); 66 | 67 | [DllImport("__Internal")] 68 | public static extern void WebGLTextInputSetText(string text, bool multiline, string color, int fontSize, string fontFace, int maxLength); 69 | 70 | [DllImport("__Internal")] 71 | public static extern void WebGLTextInputShow(float x, float y, float width, float height, float scaleX, float scaleY); 72 | 73 | [DllImport("__Internal")] 74 | public static extern void WebGLTextInputHide(); 75 | } 76 | 77 | #endif -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/WebGLTextInput/WebGLTextInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbef1f88999cff9429f4355d4495585d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Extensions/WebGLTextInput/WebGLTextInput.jslib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 603415587db5d7741b9ff9bca2b55c97 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | WebGL: WebGL 27 | second: 28 | enabled: 1 29 | settings: {} 30 | userData: 31 | assetBundleName: 32 | assetBundleVariant: 33 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/FairyGUI.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FairyGUI", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:15fc0a57446b3144c949da3e2b9737a9" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [ 15 | { 16 | "name": "com.unity.render-pipelines.universal", 17 | "expression": "0.0.1", 18 | "define": "USE_URP_CAMERA" 19 | } 20 | ], 21 | "noEngineReferences": false 22 | } 23 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/FairyGUI.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af39456e6a3b4994f8bcbb4298527011 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Filter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 433dd68fcd8eedd489b1c789a3bdd726 3 | folderAsset: yes 4 | timeCreated: 1464768258 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Filter/BlurFilter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93a10729ff0ced14c97c9ae9d4771c4c 3 | timeCreated: 1464768262 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Filter/ColorFilter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f03204401ceeb6d4dad6b55e0889c0ae 3 | timeCreated: 1464768266 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Filter/IFilter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI 6 | { 7 | public interface IFilter 8 | { 9 | /// 10 | /// 11 | /// 12 | DisplayObject target { get; set; } 13 | 14 | /// 15 | /// 16 | /// 17 | void Update(); 18 | 19 | /// 20 | /// 21 | /// 22 | void Dispose(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Filter/IFilter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c508023e115ed34a94f92161160ef24 3 | timeCreated: 1464768262 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Gesture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1208c6212379851499f0b304870357dd 3 | folderAsset: yes 4 | timeCreated: 1464244762 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Gesture/LongPressGesture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 036b702098f47c24ea9cda6c2948507d 3 | timeCreated: 1464244762 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Gesture/PinchGesture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc85a819551042448a16308b82054c89 3 | timeCreated: 1464244766 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Gesture/RotationGesture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 155eda39968f1194d9b4b7bbd63596ee 3 | timeCreated: 1464244762 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Gesture/SwipeGesture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bed3df24eb979345a4d3ed9cd34ca0e 3 | timeCreated: 1464244762 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af2102ef32b55854c993041a6940127e 3 | folderAsset: yes 4 | timeCreated: 1531222519 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/EaseManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 080d1dce1c76e154c9c8f50151e6d69e 3 | timeCreated: 1531473796 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/EaseType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3faa49ad96d1cb45acf0a5534094d09 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/GPath.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3755f976b6dd17c408731fa87b3cb006 3 | timeCreated: 1546592349 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/GTween.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 613566965c56f6e4e9a95936b8128f90 3 | timeCreated: 1531222519 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/GTweener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48e1b5ac4a90a5649962a3e75fd666c2 3 | timeCreated: 1531222519 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/TweenManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3048174c9aaf2e840953e3cab497a426 3 | timeCreated: 1531222519 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/TweenPropType.cs: -------------------------------------------------------------------------------- 1 | namespace FairyGUI 2 | { 3 | /// 4 | /// 5 | /// 6 | public enum TweenPropType 7 | { 8 | None, 9 | X, 10 | Y, 11 | Z, 12 | XY, 13 | Position, 14 | Width, 15 | Height, 16 | Size, 17 | ScaleX, 18 | ScaleY, 19 | Scale, 20 | Rotation, 21 | RotationX, 22 | RotationY, 23 | Alpha, 24 | Progress 25 | } 26 | 27 | internal class TweenPropTypeUtils 28 | { 29 | internal static void SetProps(object target, TweenPropType propType, TweenValue value) 30 | { 31 | GObject g = target as GObject; 32 | if (g == null) 33 | return; 34 | 35 | switch (propType) 36 | { 37 | case TweenPropType.X: 38 | g.x = value.x; 39 | break; 40 | 41 | case TweenPropType.Y: 42 | g.y = value.x; 43 | break; 44 | 45 | case TweenPropType.Z: 46 | g.z = value.x; 47 | break; 48 | 49 | case TweenPropType.XY: 50 | g.xy = value.vec2; 51 | break; 52 | 53 | case TweenPropType.Position: 54 | g.position = value.vec3; 55 | break; 56 | 57 | case TweenPropType.Width: 58 | g.width = value.x; 59 | break; 60 | 61 | case TweenPropType.Height: 62 | g.height = value.x; 63 | break; 64 | 65 | case TweenPropType.Size: 66 | g.size = value.vec2; 67 | break; 68 | 69 | case TweenPropType.ScaleX: 70 | g.scaleX = value.x; 71 | break; 72 | 73 | case TweenPropType.ScaleY: 74 | g.scaleY = value.x; 75 | break; 76 | 77 | case TweenPropType.Scale: 78 | g.scale = value.vec2; 79 | break; 80 | 81 | case TweenPropType.Rotation: 82 | g.rotation = value.x; 83 | break; 84 | 85 | case TweenPropType.RotationX: 86 | g.rotationX = value.x; 87 | break; 88 | 89 | case TweenPropType.RotationY: 90 | g.rotationY = value.x; 91 | break; 92 | 93 | case TweenPropType.Alpha: 94 | g.alpha = value.x; 95 | break; 96 | 97 | case TweenPropType.Progress: 98 | g.asProgress.Update(value.d); 99 | break; 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/TweenPropType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7000822d8123b4344b21dcfb230f8938 3 | timeCreated: 1531473796 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Tween/TweenValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97e8a1ca496b4d34cad5f2420a9f8809 3 | timeCreated: 1531473796 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 929603a3379395146b898542bc37d31b 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76c9ac9d39933da4e833eddb1a96581a 3 | folderAsset: yes 4 | timeCreated: 1500559678 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/ChangePageAction.cs: -------------------------------------------------------------------------------- 1 | using FairyGUI.Utils; 2 | 3 | namespace FairyGUI 4 | { 5 | public class ChangePageAction : ControllerAction 6 | { 7 | public string objectId; 8 | public string controllerName; 9 | public string targetPage; 10 | 11 | public ChangePageAction() 12 | { 13 | } 14 | 15 | override protected void Enter(Controller controller) 16 | { 17 | if (string.IsNullOrEmpty(controllerName)) 18 | return; 19 | 20 | GComponent gcom; 21 | if (!string.IsNullOrEmpty(objectId)) 22 | gcom = controller.parent.GetChildById(objectId) as GComponent; 23 | else 24 | gcom = controller.parent; 25 | if (gcom != null) 26 | { 27 | Controller cc = gcom.GetController(controllerName); 28 | if (cc != null && cc != controller && !cc.changing) 29 | { 30 | if (this.targetPage == "~1") 31 | { 32 | if (controller.selectedIndex < cc.pageCount) 33 | cc.selectedIndex = controller.selectedIndex; 34 | } 35 | else if (this.targetPage == "~2") 36 | cc.selectedPage = controller.selectedPage; 37 | else 38 | cc.selectedPageId = this.targetPage; 39 | } 40 | } 41 | } 42 | 43 | override public void Setup(ByteBuffer buffer) 44 | { 45 | base.Setup(buffer); 46 | 47 | objectId = buffer.ReadS(); 48 | controllerName = buffer.ReadS(); 49 | targetPage = buffer.ReadS(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/ChangePageAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 625a0a9a670984b47a4b170a801c850e 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/ControllerAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | public class ControllerAction 7 | { 8 | public enum ActionType 9 | { 10 | PlayTransition, 11 | ChangePage 12 | } 13 | 14 | public string[] fromPage; 15 | public string[] toPage; 16 | 17 | public static ControllerAction CreateAction(ActionType type) 18 | { 19 | switch (type) 20 | { 21 | case ActionType.PlayTransition: 22 | return new PlayTransitionAction(); 23 | 24 | case ActionType.ChangePage: 25 | return new ChangePageAction(); 26 | } 27 | return null; 28 | } 29 | 30 | public ControllerAction() 31 | { 32 | } 33 | 34 | public void Run(Controller controller, string prevPage, string curPage) 35 | { 36 | if ((fromPage == null || fromPage.Length == 0 || Array.IndexOf(fromPage, prevPage) != -1) 37 | && (toPage == null || toPage.Length == 0 || Array.IndexOf(toPage, curPage) != -1)) 38 | Enter(controller); 39 | else 40 | Leave(controller); 41 | } 42 | 43 | virtual protected void Enter(Controller controller) 44 | { 45 | 46 | } 47 | 48 | virtual protected void Leave(Controller controller) 49 | { 50 | 51 | } 52 | 53 | virtual public void Setup(ByteBuffer buffer) 54 | { 55 | int cnt; 56 | 57 | cnt = buffer.ReadShort(); 58 | fromPage = new string[cnt]; 59 | for (int i = 0; i < cnt; i++) 60 | fromPage[i] = buffer.ReadS(); 61 | 62 | cnt = buffer.ReadShort(); 63 | toPage = new string[cnt]; 64 | for (int i = 0; i < cnt; i++) 65 | toPage[i] = buffer.ReadS(); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/ControllerAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6fb1eb3d57827b4bb09eddfa5c76137 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/PlayTransitionAction.cs: -------------------------------------------------------------------------------- 1 | using FairyGUI.Utils; 2 | 3 | namespace FairyGUI 4 | { 5 | public class PlayTransitionAction : ControllerAction 6 | { 7 | public string transitionName; 8 | public int playTimes; 9 | public float delay; 10 | public bool stopOnExit; 11 | 12 | private Transition _currentTransition; 13 | 14 | public PlayTransitionAction() 15 | { 16 | playTimes = 1; 17 | delay = 0; 18 | } 19 | 20 | override protected void Enter(Controller controller) 21 | { 22 | Transition trans = controller.parent.GetTransition(transitionName); 23 | if (trans != null) 24 | { 25 | if (_currentTransition != null && _currentTransition.playing) 26 | trans.ChangePlayTimes(playTimes); 27 | else 28 | trans.Play(playTimes, delay, null); 29 | _currentTransition = trans; 30 | } 31 | } 32 | 33 | override protected void Leave(Controller controller) 34 | { 35 | if (stopOnExit && _currentTransition != null) 36 | { 37 | _currentTransition.Stop(); 38 | _currentTransition = null; 39 | } 40 | } 41 | 42 | override public void Setup(ByteBuffer buffer) 43 | { 44 | base.Setup(buffer); 45 | 46 | transitionName = buffer.ReadS(); 47 | playTimes = buffer.ReadInt(); 48 | delay = buffer.ReadFloat(); 49 | stopOnExit = buffer.ReadBool(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Action/PlayTransitionAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eac7f8de0d09f17439fb3c8e4a06090e 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/AsyncCreationHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99d38995f0d185d4eb694a7728219c01 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Controller.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a032426f9564db4a95c1c5a513bcd12 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/DragDropManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb013a6e64663c34694529d92a620777 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/EMRenderSupport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ea7d5d9d5c232d4f9a312870329cbd2 3 | timeCreated: 1464535178 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/FieldTypes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d03a824e0fdd8a48a0ad6173b4593e0 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e5e996dd06bc77458af09a2465efb6d 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GComboBox.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65b819211c4a7ec4eb1cf17cda579377 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a21ec486dca945f459590f80e1e6f699 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GGraph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 913b7964e87194d4182c1ad388d94f19 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8aac7740f89ffc409bfb6cd30d58fec 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 106156ac7c8773640af01f14fd396393 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GLabel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd9c62cc282bb9b4fa9e794317eedd30 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5eda689519c51b42955139d2c6caba4 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43ce591d02b49e8419c431df4af3da0b 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GLoader3D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 808355b0b55f945779f2a21d3d69cbfb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GMovieClip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 158e4b32fb035414091844233b2b9269 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3ab09a55620b5f40a544e775edc4b22 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GObjectPool.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using FairyGUI.Utils; 4 | 5 | namespace FairyGUI 6 | { 7 | /// 8 | /// GObjectPool is use for GObject pooling. 9 | /// 10 | public class GObjectPool 11 | { 12 | /// 13 | /// Callback function when a new object is creating. 14 | /// 15 | /// 16 | public delegate void InitCallbackDelegate(GObject obj); 17 | 18 | /// 19 | /// Callback function when a new object is creating. 20 | /// 21 | public InitCallbackDelegate initCallback; 22 | 23 | Dictionary> _pool; 24 | Transform _manager; 25 | 26 | /// 27 | /// 需要设置一个manager,加入池里的对象都成为这个manager的孩子 28 | /// 29 | /// 30 | public GObjectPool(Transform manager) 31 | { 32 | _manager = manager; 33 | _pool = new Dictionary>(); 34 | } 35 | 36 | /// 37 | /// Dispose all objects in the pool. 38 | /// 39 | public void Clear() 40 | { 41 | foreach (KeyValuePair> kv in _pool) 42 | { 43 | Queue list = kv.Value; 44 | foreach (GObject obj in list) 45 | obj.Dispose(); 46 | } 47 | _pool.Clear(); 48 | } 49 | 50 | /// 51 | /// 52 | /// 53 | public int count 54 | { 55 | get { return _pool.Count; } 56 | } 57 | 58 | /// 59 | /// 60 | /// 61 | /// 62 | /// 63 | public GObject GetObject(string url) 64 | { 65 | url = UIPackage.NormalizeURL(url); 66 | if (url == null) 67 | return null; 68 | 69 | Queue arr; 70 | if (_pool.TryGetValue(url, out arr) 71 | && arr.Count > 0) 72 | return arr.Dequeue(); 73 | 74 | GObject obj = UIPackage.CreateObjectFromURL(url); 75 | if (obj != null) 76 | { 77 | if (initCallback != null) 78 | initCallback(obj); 79 | } 80 | 81 | return obj; 82 | } 83 | 84 | /// 85 | /// 86 | /// 87 | /// 88 | public void ReturnObject(GObject obj) 89 | { 90 | if (obj.displayObject.isDisposed) 91 | return; 92 | 93 | string url = obj.resourceURL; 94 | Queue arr; 95 | if (!_pool.TryGetValue(url, out arr)) 96 | { 97 | arr = new Queue(); 98 | _pool.Add(url, arr); 99 | } 100 | 101 | if (_manager != null) 102 | obj.displayObject.cachedTransform.SetParent(_manager, false); 103 | arr.Enqueue(obj); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb355b8d4ba140f469be6be6b062dfda 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GProgressBar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f13bf1fdc7711c4aa9c5e1631138025 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GRichTextField.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FairyGUI.Utils; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI 6 | { 7 | /// 8 | /// GRichTextField class. 9 | /// 10 | public class GRichTextField : GTextField 11 | { 12 | /// 13 | /// 14 | /// 15 | public RichTextField richTextField { get; private set; } 16 | 17 | public GRichTextField() 18 | : base() 19 | { 20 | } 21 | 22 | override protected void CreateDisplayObject() 23 | { 24 | richTextField = new RichTextField(); 25 | richTextField.gOwner = this; 26 | displayObject = richTextField; 27 | 28 | _textField = richTextField.textField; 29 | } 30 | 31 | override protected void SetTextFieldText() 32 | { 33 | string str = ParseTemplate(_text); 34 | 35 | _textField.maxWidth = maxWidth; 36 | if (_ubbEnabled) 37 | richTextField.htmlText = UBBParser.inst.Parse(str); 38 | else 39 | richTextField.htmlText = str; 40 | } 41 | 42 | /// 43 | /// 44 | /// 45 | public Dictionary emojies 46 | { 47 | get { return richTextField.emojies; } 48 | set { richTextField.emojies = value; } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GRichTextField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c329d14f7b7d35348be7ec3e2a4b0591 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GRoot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c82e50658ca58b2459448b9c86cb4777 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GScrollBar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6b0ce43cdb60cf4e8e1ddccdf2f5082 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2a1a4a3ec0a296489e15eb1ae1214ee 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GTextField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d64856957bd90d24aa05d134fb14e01d 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GTextInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e6f98107e4db9142b9de3358cf95378 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GTree.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2d05bd744ca041a8beb8cfd9421d8a7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/GTreeNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0507f7de6e0d34b85853b6a2f591aaf9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b22c996c870881c438177e27f3450ac7 3 | folderAsset: yes 4 | timeCreated: 1476166202 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87e99c1910ca9684d8719dae7bdb7658 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2050e67af29d06a44834f7ffbfe14e83 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearColor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4878a5e9a94c1d429c827f93ca3072b 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearDisplay.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// Gear is a connection between object and controller. 8 | /// 9 | public class GearDisplay : GearBase 10 | { 11 | /// 12 | /// Pages involed in this gear. 13 | /// 14 | public string[] pages { get; set; } 15 | 16 | int _visible; 17 | uint _displayLockToken; 18 | 19 | public GearDisplay(GObject owner) 20 | : base(owner) 21 | { 22 | _displayLockToken = 1; 23 | } 24 | 25 | override protected void AddStatus(string pageId, ByteBuffer buffer) 26 | { 27 | } 28 | 29 | override protected void Init() 30 | { 31 | pages = null; 32 | } 33 | 34 | override public void Apply() 35 | { 36 | _displayLockToken++; 37 | if (_displayLockToken == 0) 38 | _displayLockToken = 1; 39 | 40 | if (pages == null || pages.Length == 0 41 | || Array.IndexOf(pages, _controller.selectedPageId) != -1) 42 | _visible = 1; 43 | else 44 | _visible = 0; 45 | } 46 | 47 | override public void UpdateState() 48 | { 49 | } 50 | 51 | public uint AddLock() 52 | { 53 | _visible++; 54 | return _displayLockToken; 55 | } 56 | 57 | public void ReleaseLock(uint token) 58 | { 59 | if (token == _displayLockToken) 60 | _visible--; 61 | } 62 | 63 | public bool connected 64 | { 65 | get { return _controller == null || _visible > 0; } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f88c3ac62122e7141a5d6c41eb11da27 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearDisplay2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// Gear is a connection between object and controller. 8 | /// 9 | public class GearDisplay2 : GearBase 10 | { 11 | /// 12 | /// Pages involed in this gear. 13 | /// 14 | public string[] pages { get; set; } 15 | public int condition; 16 | 17 | int _visible; 18 | 19 | public GearDisplay2(GObject owner) 20 | : base(owner) 21 | { 22 | } 23 | 24 | override protected void AddStatus(string pageId, ByteBuffer buffer) 25 | { 26 | } 27 | 28 | override protected void Init() 29 | { 30 | pages = null; 31 | } 32 | 33 | override public void Apply() 34 | { 35 | if (pages == null || pages.Length == 0 36 | || Array.IndexOf(pages, _controller.selectedPageId) != -1) 37 | _visible = 1; 38 | else 39 | _visible = 0; 40 | } 41 | 42 | override public void UpdateState() 43 | { 44 | } 45 | public bool Evaluate(bool connected) 46 | { 47 | bool v = _controller == null || _visible > 0; 48 | if (this.condition == 0) 49 | v = v && connected; 50 | else 51 | v = v || connected; 52 | return v; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearDisplay2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96390d060150348e98dfe41bf7d23f5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearFontSize.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// Gear is a connection between object and controller. 8 | /// 9 | public class GearFontSize : GearBase 10 | { 11 | Dictionary _storage; 12 | int _default; 13 | GTextField _textField; 14 | 15 | public GearFontSize(GObject owner) 16 | : base(owner) 17 | { 18 | } 19 | 20 | protected override void Init() 21 | { 22 | if (_owner is GLabel) 23 | _textField = ((GLabel)_owner).GetTextField(); 24 | else if (_owner is GButton) 25 | _textField = ((GButton)_owner).GetTextField(); 26 | else 27 | _textField = (GTextField)_owner; 28 | 29 | _default = _textField.textFormat.size; 30 | _storage = new Dictionary(); 31 | } 32 | 33 | override protected void AddStatus(string pageId, ByteBuffer buffer) 34 | { 35 | if (pageId == null) 36 | _default = buffer.ReadInt(); 37 | else 38 | _storage[pageId] = buffer.ReadInt(); 39 | } 40 | 41 | override public void Apply() 42 | { 43 | if (_textField == null) 44 | return; 45 | 46 | _owner._gearLocked = true; 47 | 48 | int cv; 49 | if (!_storage.TryGetValue(_controller.selectedPageId, out cv)) 50 | cv = _default; 51 | 52 | TextFormat tf = _textField.textFormat; 53 | tf.size = cv; 54 | _textField.textFormat = tf; 55 | 56 | _owner._gearLocked = false; 57 | } 58 | 59 | override public void UpdateState() 60 | { 61 | if (_textField != null) 62 | _storage[_controller.selectedPageId] = _textField.textFormat.size; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearFontSize.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d3a7b66a83334b44bb8630ecc980a59 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearIcon.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// Gear is a connection between object and controller. 8 | /// 9 | public class GearIcon : GearBase 10 | { 11 | Dictionary _storage; 12 | string _default; 13 | 14 | public GearIcon(GObject owner) 15 | : base(owner) 16 | { 17 | } 18 | 19 | protected override void Init() 20 | { 21 | _default = _owner.icon; 22 | _storage = new Dictionary(); 23 | } 24 | 25 | override protected void AddStatus(string pageId, ByteBuffer buffer) 26 | { 27 | if (pageId == null) 28 | _default = buffer.ReadS(); 29 | else 30 | _storage[pageId] = buffer.ReadS(); 31 | } 32 | 33 | override public void Apply() 34 | { 35 | _owner._gearLocked = true; 36 | 37 | string cv; 38 | if (!_storage.TryGetValue(_controller.selectedPageId, out cv)) 39 | cv = _default; 40 | 41 | _owner.icon = cv; 42 | 43 | _owner._gearLocked = false; 44 | } 45 | 46 | override public void UpdateState() 47 | { 48 | _storage[_controller.selectedPageId] = _owner.icon; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearIcon.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27b2a638ddb815f40994e0477c3ea4c0 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearLook.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77704143cdb38714196c9ff520a079f8 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearSize.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 254f71ab913968a4e853a99ce79f0266 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FairyGUI.Utils; 3 | 4 | namespace FairyGUI 5 | { 6 | /// 7 | /// Gear is a connection between object and controller. 8 | /// 9 | public class GearText : GearBase 10 | { 11 | Dictionary _storage; 12 | string _default; 13 | 14 | public GearText(GObject owner) 15 | : base(owner) 16 | { 17 | } 18 | 19 | protected override void Init() 20 | { 21 | _default = _owner.text; 22 | _storage = new Dictionary(); 23 | } 24 | 25 | override protected void AddStatus(string pageId, ByteBuffer buffer) 26 | { 27 | if (pageId == null) 28 | _default = buffer.ReadS(); 29 | else 30 | _storage[pageId] = buffer.ReadS(); 31 | } 32 | 33 | override public void Apply() 34 | { 35 | _owner._gearLocked = true; 36 | 37 | string cv; 38 | if (!_storage.TryGetValue(_controller.selectedPageId, out cv)) 39 | cv = _default; 40 | 41 | _owner.text = cv; 42 | 43 | _owner._gearLocked = false; 44 | } 45 | 46 | override public void UpdateState() 47 | { 48 | _storage[_controller.selectedPageId] = _owner.text; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8b20f3a5dd39ec42bed3456334916fc 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/GearXY.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 082a852494dc8b94485733188788d58c 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/IAnimationGear.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI 3 | { 4 | /// 5 | /// 6 | /// 7 | public interface IAnimationGear 8 | { 9 | /// 10 | /// 11 | /// 12 | bool playing { get; set; } 13 | 14 | /// 15 | /// 16 | /// 17 | int frame { get; set; } 18 | 19 | /// 20 | /// 21 | /// 22 | float timeScale { get; set; } 23 | 24 | /// 25 | /// 26 | /// 27 | bool ignoreEngineTimeScale { get; set; } 28 | 29 | /// 30 | /// 31 | /// 32 | /// 33 | void Advance(float time); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/IAnimationGear.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d68e5b2a3af5c444689f459a8b265df7 3 | timeCreated: 1476166204 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/IColorGear.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI 4 | { 5 | /// 6 | /// 7 | /// 8 | public interface IColorGear 9 | { 10 | /// 11 | /// 12 | /// 13 | Color color { get; set; } 14 | } 15 | 16 | /// 17 | /// 18 | /// 19 | public interface ITextColorGear : IColorGear 20 | { 21 | /// 22 | /// 23 | /// 24 | Color strokeColor { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Gears/IColorGear.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e872cd17b52152a4fa250c830b9bb8cd 3 | timeCreated: 1476166204 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/IUISource.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI 3 | { 4 | /// 5 | /// 6 | /// 7 | public delegate void UILoadCallback(); 8 | 9 | /// 10 | /// 11 | /// 12 | public interface IUISource 13 | { 14 | /// 15 | /// 16 | /// 17 | string fileName { get; set; } 18 | 19 | /// 20 | /// 21 | /// 22 | bool loaded { get; } 23 | 24 | /// 25 | /// 26 | /// 27 | /// 28 | void Load(UILoadCallback callback); 29 | 30 | /// 31 | /// 取消加载 32 | /// 33 | void Cancel(); 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/IUISource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c742c10608d6ac84bb210a9d6abcb05d 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Margin.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI 3 | { 4 | /// 5 | /// 6 | /// 7 | public struct Margin 8 | { 9 | /// 10 | /// 11 | /// 12 | public int left; 13 | 14 | /// 15 | /// 16 | /// 17 | public int right; 18 | 19 | /// 20 | /// 21 | /// 22 | public int top; 23 | 24 | /// 25 | /// 26 | /// 27 | public int bottom; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Margin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f31f9a61b0590943ac37f1c16ff0dc9 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/MovieClipItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FairyGUI 4 | { 5 | public class MovieClipItem 6 | { 7 | public float interval { get; private set; } 8 | public float repeatDelay { get; private set; } 9 | public bool swing { get; private set; } 10 | public MovieClip.Frame[] frames { get; private set; } 11 | public int refCount { get; private set; } 12 | 13 | public event Action OnAcquire; 14 | public event Action OnRelease; 15 | 16 | public MovieClipItem(float interval, float repeatDelay, bool swing, MovieClip.Frame[] frames) 17 | { 18 | this.interval = interval; 19 | this.repeatDelay = repeatDelay; 20 | this.swing = swing; 21 | this.frames = frames; 22 | foreach (var frame in frames) 23 | { 24 | if (frame.texture == null) 25 | continue; 26 | 27 | frame.texture.AddRef(); 28 | } 29 | } 30 | 31 | public void Dispose() 32 | { 33 | foreach (var frame in frames) 34 | { 35 | if (frame.texture == null) 36 | continue; 37 | 38 | frame.texture.ReleaseRef(); 39 | } 40 | 41 | frames = null; 42 | } 43 | 44 | public void AddRef() 45 | { 46 | if (frames == null) 47 | return; // already disposed 48 | 49 | ++refCount; 50 | 51 | if (refCount == 1) 52 | OnAcquire?.Invoke(this); 53 | } 54 | 55 | public void ReleaseRef() 56 | { 57 | if (frames == null) 58 | return; // already disposed 59 | 60 | if (refCount == 0) 61 | return; 62 | 63 | --refCount; 64 | 65 | if (refCount == 0) 66 | OnRelease?.Invoke(this); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/MovieClipItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 657b4fd74a463ac4188017be93a39ea6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/PackageItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using FairyGUI.Utils; 5 | 6 | namespace FairyGUI 7 | { 8 | /// 9 | /// 10 | /// 11 | public class PackageItem 12 | { 13 | public UIPackage owner; 14 | 15 | public PackageItemType type; 16 | public ObjectType objectType; 17 | 18 | public string id; 19 | public string name; 20 | public int width; 21 | public int height; 22 | public string file; 23 | public bool exported; 24 | public NTexture texture; 25 | public ByteBuffer rawData; 26 | public string[] branches; 27 | public string[] highResolution; 28 | 29 | //image 30 | public Rect? scale9Grid; 31 | public bool scaleByTile; 32 | public int tileGridIndice; 33 | public PixelHitTestData pixelHitTestData; 34 | 35 | //movieclip 36 | public MovieClipItem movieClipItem; 37 | 38 | //component 39 | public bool translated; 40 | public UIObjectFactory.GComponentCreator extensionCreator; 41 | 42 | //font 43 | public BitmapFont bitmapFont; 44 | 45 | //sound 46 | public NAudioClip audioClip; 47 | 48 | //spine/dragonbones 49 | public Vector2 skeletonAnchor; 50 | public object skeletonAsset; 51 | public HashSet skeletonLoaders; 52 | 53 | public void Acquire(string objectName) 54 | { 55 | owner.Acquire(objectName); 56 | } 57 | 58 | public void Release(string objectName) 59 | { 60 | owner.Release(objectName); 61 | } 62 | 63 | public object Load() 64 | { 65 | return owner.GetItemAsset(this); 66 | } 67 | 68 | public PackageItem getBranch() 69 | { 70 | if (branches != null && owner._branchIndex != -1) 71 | { 72 | string itemId = branches[owner._branchIndex]; 73 | if (itemId != null) 74 | return owner.GetItem(itemId); 75 | } 76 | 77 | return this; 78 | } 79 | 80 | public PackageItem getHighResolution() 81 | { 82 | if (highResolution != null && GRoot.contentScaleLevel > 0) 83 | { 84 | int i = GRoot.contentScaleLevel - 1; 85 | if (i >= highResolution.Length) 86 | i = highResolution.Length - 1; 87 | string itemId = highResolution[i]; 88 | if (itemId != null) 89 | return owner.GetItem(itemId); 90 | } 91 | 92 | return this; 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/PackageItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acb6fb5c63e3f49409db871a5a97261b 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/PopupMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f15a5c9ba9a949d468aeb92e75f70dbd 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/RelationItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 859441fdd74333a498ff048e6b48798b 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Relations.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4376a9406aa478a4b82816818842d737 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/ScrollPane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e51675ea70043e1488812e46428e83aa 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Transition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b4b16745502a0a428467b2981a2a786 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/TranslationHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3efa1901e4c7ea44d9573c70d21e49f5 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Tree.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e3a2d82c02599a4f926286440678b58 3 | folderAsset: yes 4 | timeCreated: 1467555752 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Tree/TreeNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bfc19586c7b07e4b9193f658c390727 3 | timeCreated: 1467555753 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Tree/TreeView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a8a82de90eec564d9b40a4192d27f3d 3 | timeCreated: 1467555753 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ace51c3cbb5309547a7029cadaaa20ca 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIContentScaler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a723f7fd716aac049aa24e9186f18685 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIObjectFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 461feec05183bbf4f908aa1455325715 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIPackage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7177aa7a57b8cc0439fde7785099f11c 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIPainter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ca66c39de4dce2499306801170a139f 3 | timeCreated: 1461566422 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/UIPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 024553ecf96a65649b929ee08c9214fd 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/UI/Window.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c454632cb96595b4cbeeee678a5d9f0b 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d78e1a4b8ac1336498bfbbe945d16276 3 | folderAsset: yes 4 | timeCreated: 1460480287 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/ByteBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f72828fa75e491f4d95f92a46b01956a 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da6063debdf749748bac0a0029b709e5 3 | folderAsset: yes 4 | timeCreated: 1461773298 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI.Utils 6 | { 7 | /// 8 | /// 9 | /// 10 | public class HtmlButton : IHtmlObject 11 | { 12 | public GComponent button { get; private set; } 13 | 14 | public const string CLICK_EVENT = "OnHtmlButtonClick"; 15 | 16 | public static string resource; 17 | 18 | RichTextField _owner; 19 | HtmlElement _element; 20 | EventCallback1 _clickHandler; 21 | 22 | public HtmlButton() 23 | { 24 | button = UIPackage.CreateObjectFromURL(resource).asCom; 25 | _clickHandler = (EventContext context) => 26 | { 27 | _owner.DispatchEvent(CLICK_EVENT, context.data, this); 28 | }; 29 | } 30 | 31 | public DisplayObject displayObject 32 | { 33 | get { return button != null ? button.displayObject : null; } 34 | } 35 | 36 | public HtmlElement element 37 | { 38 | get { return _element; } 39 | } 40 | 41 | public float width 42 | { 43 | get { return button != null ? button.width : 0; } 44 | } 45 | 46 | public float height 47 | { 48 | get { return button != null ? button.height : 0; } 49 | } 50 | 51 | public void Create(RichTextField owner, HtmlElement element) 52 | { 53 | _owner = owner; 54 | _element = element; 55 | 56 | if (button == null) 57 | return; 58 | 59 | button.onClick.Add(_clickHandler); 60 | int width = element.GetInt("width", button.sourceWidth); 61 | int height = element.GetInt("height", button.sourceHeight); 62 | button.SetSize(width, height); 63 | button.text = element.GetString("value"); 64 | } 65 | 66 | public void SetPosition(float x, float y) 67 | { 68 | if (button != null) 69 | button.SetXY(x, y); 70 | } 71 | 72 | public void Add() 73 | { 74 | if (button != null) 75 | _owner.AddChild(button.displayObject); 76 | } 77 | 78 | public void Remove() 79 | { 80 | if (button != null && button.displayObject.parent != null) 81 | _owner.RemoveChild(button.displayObject); 82 | } 83 | 84 | public void Release() 85 | { 86 | if (button != null) 87 | button.RemoveEventListeners(); 88 | 89 | _owner = null; 90 | _element = null; 91 | } 92 | 93 | public void Dispose() 94 | { 95 | if (button != null) 96 | button.Dispose(); 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 268c2d7ad77b66449b4e0e39a6d0ca15 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d92c6025bf750145af0e456a7fd3f33 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81871e13cb458ab4da28358d5634e082 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1c8ffa51408aef45839b1d00198b819 3 | timeCreated: 1535374215 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlLink.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI.Utils 3 | { 4 | /// 5 | /// 6 | /// 7 | public class HtmlLink : IHtmlObject 8 | { 9 | RichTextField _owner; 10 | HtmlElement _element; 11 | SelectionShape _shape; 12 | 13 | EventCallback1 _clickHandler; 14 | EventCallback1 _rolloverHandler; 15 | EventCallback0 _rolloutHandler; 16 | 17 | public HtmlLink() 18 | { 19 | _shape = new SelectionShape(); 20 | _shape.gameObject.name = "HtmlLink"; 21 | _shape.cursor = "text-link"; 22 | 23 | _clickHandler = (EventContext context) => 24 | { 25 | _owner.BubbleEvent("onClickLink", _element.GetString("href")); 26 | }; 27 | _rolloverHandler = (EventContext context) => 28 | { 29 | if (_owner.htmlParseOptions.linkHoverBgColor.a > 0) 30 | _shape.color = _owner.htmlParseOptions.linkHoverBgColor; 31 | }; 32 | _rolloutHandler = () => 33 | { 34 | if (_owner.htmlParseOptions.linkHoverBgColor.a > 0) 35 | _shape.color = _owner.htmlParseOptions.linkBgColor; 36 | }; 37 | } 38 | 39 | public DisplayObject displayObject 40 | { 41 | get { return _shape; } 42 | } 43 | 44 | public HtmlElement element 45 | { 46 | get { return _element; } 47 | } 48 | 49 | public float width 50 | { 51 | get { return 0; } 52 | } 53 | 54 | public float height 55 | { 56 | get { return 0; } 57 | } 58 | 59 | public void Create(RichTextField owner, HtmlElement element) 60 | { 61 | _owner = owner; 62 | _element = element; 63 | _shape.onClick.Add(_clickHandler); 64 | _shape.onRollOver.Add(_rolloverHandler); 65 | _shape.onRollOut.Add(_rolloutHandler); 66 | _shape.color = _owner.htmlParseOptions.linkBgColor; 67 | } 68 | 69 | public void SetArea(int startLine, float startCharX, int endLine, float endCharX) 70 | { 71 | if (startLine == endLine && startCharX > endCharX) 72 | { 73 | float tmp = startCharX; 74 | startCharX = endCharX; 75 | endCharX = tmp; 76 | } 77 | _shape.rects.Clear(); 78 | _owner.textField.GetLinesShape(startLine, startCharX, endLine, endCharX, true, _shape.rects); 79 | _shape.Refresh(); 80 | } 81 | 82 | public void SetPosition(float x, float y) 83 | { 84 | _shape.SetXY(x, y); 85 | } 86 | 87 | public void Add() 88 | { 89 | //add below _shape 90 | _owner.AddChildAt(_shape, 0); 91 | } 92 | 93 | public void Remove() 94 | { 95 | if (_shape.parent != null) 96 | _owner.RemoveChild(_shape); 97 | } 98 | 99 | public void Release() 100 | { 101 | _shape.RemoveEventListeners(); 102 | 103 | _owner = null; 104 | _element = null; 105 | } 106 | 107 | public void Dispose() 108 | { 109 | _shape.Dispose(); 110 | _shape = null; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlLink.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2132a66ecae9cc4c99c6fbe37051723 3 | timeCreated: 1470116309 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlPageContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5454bca8f43f9094ea66614837a2c0be 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlParseOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI.Utils 6 | { 7 | /// 8 | /// 9 | /// 10 | public class HtmlParseOptions 11 | { 12 | /// 13 | /// 14 | /// 15 | public bool linkUnderline; 16 | 17 | /// 18 | /// 19 | /// 20 | public Color linkColor; 21 | 22 | /// 23 | /// 24 | /// 25 | public Color linkBgColor; 26 | 27 | /// 28 | /// 29 | /// 30 | public Color linkHoverBgColor; 31 | 32 | /// 33 | /// 34 | /// 35 | public bool ignoreWhiteSpace; 36 | 37 | /// 38 | /// 39 | /// 40 | public static bool DefaultLinkUnderline = true; 41 | 42 | /// 43 | /// 44 | /// 45 | public static Color DefaultLinkColor = new Color32(0x3A, 0x67, 0xCC, 0xFF); 46 | 47 | /// 48 | /// 49 | /// 50 | public static Color DefaultLinkBgColor = Color.clear; 51 | 52 | /// 53 | /// 54 | /// 55 | public static Color DefaultLinkHoverBgColor = Color.clear; 56 | 57 | public HtmlParseOptions() 58 | { 59 | linkUnderline = DefaultLinkUnderline; 60 | linkColor = DefaultLinkColor; 61 | linkBgColor = DefaultLinkBgColor; 62 | linkHoverBgColor = DefaultLinkHoverBgColor; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlParseOptions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e3e6e98345b46a43a4181a0790d4f30 3 | timeCreated: 1470231110 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlParser.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ddf5eb218ff0cf438894e2ceb54f494 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlSelect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI.Utils 6 | { 7 | /// 8 | /// 9 | /// 10 | public class HtmlSelect : IHtmlObject 11 | { 12 | public GComboBox comboBox { get; private set; } 13 | 14 | public const string CHANGED_EVENT = "OnHtmlSelectChanged"; 15 | 16 | public static string resource; 17 | 18 | RichTextField _owner; 19 | HtmlElement _element; 20 | EventCallback0 _changeHandler; 21 | 22 | public HtmlSelect() 23 | { 24 | comboBox = UIPackage.CreateObjectFromURL(resource).asComboBox; 25 | _changeHandler = () => 26 | { 27 | _owner.DispatchEvent(CHANGED_EVENT, null, this); 28 | }; 29 | } 30 | 31 | public DisplayObject displayObject 32 | { 33 | get { return comboBox.displayObject; } 34 | } 35 | 36 | public HtmlElement element 37 | { 38 | get { return _element; } 39 | } 40 | 41 | public float width 42 | { 43 | get { return comboBox != null ? comboBox.width : 0; } 44 | } 45 | 46 | public float height 47 | { 48 | get { return comboBox != null ? comboBox.height : 0; } 49 | } 50 | 51 | public void Create(RichTextField owner, HtmlElement element) 52 | { 53 | _owner = owner; 54 | _element = element; 55 | 56 | if (comboBox == null) 57 | return; 58 | 59 | comboBox.onChanged.Add(_changeHandler); 60 | 61 | int width = element.GetInt("width", comboBox.sourceWidth); 62 | int height = element.GetInt("height", comboBox.sourceHeight); 63 | comboBox.SetSize(width, height); 64 | comboBox.items = (string[])element.Get("items"); 65 | comboBox.values = (string[])element.Get("values"); 66 | comboBox.value = element.GetString("value"); 67 | } 68 | 69 | public void SetPosition(float x, float y) 70 | { 71 | if (comboBox != null) 72 | comboBox.SetXY(x, y); 73 | } 74 | 75 | public void Add() 76 | { 77 | if (comboBox != null) 78 | _owner.AddChild(comboBox.displayObject); 79 | } 80 | 81 | public void Remove() 82 | { 83 | if (comboBox != null && comboBox.displayObject.parent != null) 84 | _owner.RemoveChild(comboBox.displayObject); 85 | } 86 | 87 | public void Release() 88 | { 89 | if (comboBox != null) 90 | comboBox.RemoveEventListeners(); 91 | 92 | _owner = null; 93 | _element = null; 94 | } 95 | 96 | public void Dispose() 97 | { 98 | if (comboBox != null) 99 | comboBox.Dispose(); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/HtmlSelect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9047de8f5e36634b9cb9d7270dfb1e8 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/IHtmlObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace FairyGUI.Utils 6 | { 7 | /// 8 | /// Create->SetPosition->(Add<->Remove)->Release->Dispose 9 | /// 10 | public interface IHtmlObject 11 | { 12 | float width { get; } 13 | float height { get; } 14 | DisplayObject displayObject { get; } 15 | HtmlElement element { get; } 16 | 17 | void Create(RichTextField owner, HtmlElement element); 18 | void SetPosition(float x, float y); 19 | void Add(); 20 | void Remove(); 21 | void Release(); 22 | void Dispose(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/IHtmlObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5a416822d3ee0a4d80e32f6a03ba56f 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/IHtmlPageContext.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace FairyGUI.Utils 3 | { 4 | /// 5 | /// 6 | /// 7 | public interface IHtmlPageContext 8 | { 9 | IHtmlObject CreateObject(RichTextField owner, HtmlElement element); 10 | void FreeObject(IHtmlObject obj); 11 | 12 | NTexture GetImageTexture(HtmlImage image); 13 | void FreeImageTexture(HtmlImage image, NTexture texture); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Html/IHtmlPageContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f24771f8977b674aa4fbf86f45e2105 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/Timers.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae007a032c404234b875df43f3129117 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/ToolSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54357cad16a6ccb4ea698f76bb43527c 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/UBBParser.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 916709794f601f949962dffdb251b946 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/XML.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8375f35e0c0dbc4429287ee8578f3cf1 3 | timeCreated: 1460480288 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/XMLIterator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35c75485c4f537341bbc16207588f75d 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/XMLList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f086b805cd249140987f7f3ec5b4567 3 | timeCreated: 1460480287 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/XMLUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11312ca9745d52c4eb8e31630ad5ec7c 3 | timeCreated: 1461773298 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /FairyGUI/Runtime/Utils/ZipReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dc25ae9114bda14f998652db54f3af9 3 | timeCreated: 1535374214 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 SunHowe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 104b3b75e8112c44da86f2dc5a5d6f3b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fd7e0ff109345e44907f34becefe51e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42f001fd4d469bd4c959895cdf8e6297 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7adb3f310674a7aa84ef5ebdca21ca4 3 | timeCreated: 1685332012 -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetLoader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI.Dynamic 4 | { 5 | /// 6 | /// UIPackage二进制数据加载回调 7 | /// 8 | public delegate void LoadUIPackageBytesCallback(byte[] bytes, string assetNamePrefix); 9 | 10 | /// 11 | /// Texture资源加载回调 12 | /// 13 | public delegate void LoadTextureCallback(Texture texture); 14 | 15 | /// 16 | /// AudioClip资源加载回调 17 | /// 18 | public delegate void LoadAudioClipCallback(AudioClip audioClip); 19 | 20 | /// 21 | /// UI资源加载器接口 由外部实现接口后传给管理器进行使用 22 | /// 23 | public interface IUIAssetLoader 24 | { 25 | /// 26 | /// 异步加载UIPackage二进制数据 27 | /// 28 | void LoadUIPackageBytesAsync(string packageName, LoadUIPackageBytesCallback callback); 29 | 30 | /// 31 | /// 同步加载UIPackage二进制数据 通过bytes返回数据 assetNamePrefix返回资源前缀 32 | /// 33 | void LoadUIPackageBytes(string packageName, out byte[] bytes, out string assetNamePrefix); 34 | 35 | /// 36 | /// 异步加载Texture资源 37 | /// 38 | void LoadTextureAsync(string packageName, string assetName, string extension, LoadTextureCallback callback); 39 | 40 | /// 41 | /// 卸载Texture资源 42 | /// 43 | void UnloadTexture(Texture texture); 44 | 45 | /// 46 | /// 异步加载AudioClip资源 47 | /// 48 | void LoadAudioClipAsync(string packageName, string assetName, string extension, LoadAudioClipCallback callback); 49 | 50 | /// 51 | /// 卸载AudioCip资源 52 | /// 53 | void UnloadAudioClip(AudioClip audioClip); 54 | } 55 | } -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaeb0b56d8644e8197bd6f98a1cd863d 3 | timeCreated: 1685332129 -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FairyGUI.Dynamic 4 | { 5 | /// 6 | /// UI资源管理器 用于统一维护UIPackage与其他UI资源的加载与卸载 7 | /// 8 | public interface IUIAssetManager : IDisposable 9 | { 10 | /// 11 | /// 通过配置实例初始化管理器 12 | /// 13 | void Initialize(IUIAssetManagerConfiguration configuration); 14 | } 15 | } -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0824f3de3e9c43189362c0f089a8fb99 3 | timeCreated: 1685332020 -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetManagerConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace FairyGUI.Dynamic 2 | { 3 | /// 4 | /// UI资源管理器配置 5 | /// 6 | public interface IUIAssetManagerConfiguration 7 | { 8 | /// 9 | /// UIPackage辅助工具 10 | /// 11 | public IUIPackageHelper PackageHelper { get; } 12 | 13 | /// 14 | /// UI资源加载器 15 | /// 16 | public IUIAssetLoader AssetLoader { get; } 17 | 18 | /// 19 | /// 是否立即卸载未使用的UIPackage 20 | /// 21 | public bool UnloadUnusedUIPackageImmediately { get; } 22 | } 23 | } -------------------------------------------------------------------------------- /Runtime/Core/IUIAssetManagerConfiguration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 278db2d5c27648e2b76a86016071ee8a 3 | timeCreated: 1685332552 -------------------------------------------------------------------------------- /Runtime/Core/IUIPackageHelper.cs: -------------------------------------------------------------------------------- 1 | namespace FairyGUI.Dynamic 2 | { 3 | /// 4 | /// UIPackage辅助工具接口 5 | /// 6 | public interface IUIPackageHelper 7 | { 8 | /// 9 | /// 通过包id获取包名 10 | /// 11 | string GetPackageNameById(string id); 12 | } 13 | } -------------------------------------------------------------------------------- /Runtime/Core/IUIPackageHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cd1e93ad9f8421daa529eac8f4ed623 3 | timeCreated: 1685332427 -------------------------------------------------------------------------------- /Runtime/FairyGUI.Dynamic.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FairyGUI.Dyanmic", 3 | "rootNamespace": "FairyGUI.Dynamic", 4 | "references": [ 5 | "GUID:af39456e6a3b4994f8bcbb4298527011" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Runtime/FairyGUI.Dynamic.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 853ef8faf8a4268478503c4b87fdb23f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/Loader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1982b0fa0e4a4071a3c21617ac502abb 3 | timeCreated: 1685345630 -------------------------------------------------------------------------------- /Runtime/Loader/DelegateUIAssetLoader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI.Dynamic 5 | { 6 | /// 7 | /// 自定义委托的IUIAssetLoader派生类 为不方便实现接口的情况提供功能支持 8 | /// 9 | public sealed class DelegateUIAssetLoader : IUIAssetLoader 10 | { 11 | public delegate void LoadUIPackageBytesAsyncHandler(string packageName, LoadUIPackageBytesCallback callback); 12 | 13 | public delegate void LoadUIPackageBytesHandler(string packageName, out byte[] bytes, out string assetNamePrefix); 14 | 15 | public delegate void LoadTextureAsyncHandler(string packageName, string assetName, string extension, LoadTextureCallback callback); 16 | 17 | public delegate void UnloadTextureHandler(Texture texture); 18 | 19 | public delegate void LoadAudioClipAsyncHandler(string packageName, string assetName, string extension, LoadAudioClipCallback callback); 20 | 21 | public delegate void UnloadAudioClipHandler(AudioClip audioClip); 22 | 23 | public LoadUIPackageBytesAsyncHandler LoadUIPackageBytesAsyncHandlerImpl { get; set; } 24 | public LoadUIPackageBytesHandler LoadUIPackageBytesHandlerImpl { get; set; } 25 | public LoadTextureAsyncHandler LoadTextureAsyncHandlerImpl { get; set; } 26 | public UnloadTextureHandler UnloadTextureHandlerImpl { get; set; } 27 | public LoadAudioClipAsyncHandler LoadAudioClipAsyncHandlerImpl { get; set; } 28 | public UnloadAudioClipHandler UnloadAudioClipHandlerImpl { get; set; } 29 | 30 | public void LoadUIPackageBytesAsync(string packageName, LoadUIPackageBytesCallback callback) 31 | { 32 | if (LoadUIPackageBytesAsyncHandlerImpl == null) 33 | throw new NotImplementedException(); 34 | 35 | LoadUIPackageBytesAsyncHandlerImpl(packageName, callback); 36 | } 37 | 38 | public void LoadUIPackageBytes(string packageName, out byte[] bytes, out string assetNamePrefix) 39 | { 40 | if (LoadUIPackageBytesHandlerImpl == null) 41 | throw new NotImplementedException(); 42 | LoadUIPackageBytesHandlerImpl(packageName, out bytes, out assetNamePrefix); 43 | } 44 | 45 | public void LoadTextureAsync(string packageName, string assetName, string extension, LoadTextureCallback callback) 46 | { 47 | if (LoadTextureAsyncHandlerImpl == null) 48 | throw new NotImplementedException(); 49 | LoadTextureAsyncHandlerImpl(packageName, assetName, extension, callback); 50 | } 51 | 52 | public void UnloadTexture(Texture texture) 53 | { 54 | if (UnloadTextureHandlerImpl == null) 55 | throw new NotImplementedException(); 56 | UnloadTextureHandlerImpl(texture); 57 | } 58 | 59 | public void LoadAudioClipAsync(string packageName, string assetName, string extension, LoadAudioClipCallback callback) 60 | { 61 | if (LoadAudioClipAsyncHandlerImpl == null) 62 | throw new NotImplementedException(); 63 | 64 | LoadAudioClipAsyncHandlerImpl(packageName, assetName, extension, callback); 65 | } 66 | 67 | public void UnloadAudioClip(AudioClip audioClip) 68 | { 69 | if (UnloadAudioClipHandlerImpl == null) 70 | throw new NotImplementedException(); 71 | 72 | UnloadAudioClipHandlerImpl(audioClip); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Runtime/Loader/DelegateUIAssetLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf1dfc7fc0644484b1af84e98eec275a 3 | timeCreated: 1685345636 -------------------------------------------------------------------------------- /Runtime/Loader/ResourcesUIAssetLoader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace FairyGUI.Dynamic 4 | { 5 | /// 6 | /// Resources资源加载器 7 | /// 8 | public sealed class ResourcesUIAssetLoader : IUIAssetLoader 9 | { 10 | private readonly string m_PrefixAssetPath; 11 | 12 | public ResourcesUIAssetLoader(string mPrefixAssetPath = null) 13 | { 14 | m_PrefixAssetPath = mPrefixAssetPath ?? string.Empty; 15 | } 16 | 17 | public void LoadUIPackageBytesAsync(string packageName, LoadUIPackageBytesCallback callback) 18 | { 19 | var assetPath = packageName; 20 | if (!string.IsNullOrEmpty(m_PrefixAssetPath)) 21 | assetPath = m_PrefixAssetPath + "/" + assetPath; 22 | 23 | Resources.LoadAsync(assetPath + "_fui").completed += operation => 24 | { 25 | var request = (ResourceRequest)operation; 26 | if (request.asset == null) 27 | callback(null, packageName); 28 | else 29 | { 30 | var bytes = ((TextAsset)request.asset).bytes; 31 | Resources.UnloadAsset(request.asset); 32 | 33 | callback(bytes, assetPath); 34 | } 35 | }; 36 | } 37 | 38 | public void LoadUIPackageBytes(string packageName, out byte[] bytes, out string assetNamePrefix) 39 | { 40 | var assetPath = packageName; 41 | if (!string.IsNullOrEmpty(m_PrefixAssetPath)) 42 | assetPath = m_PrefixAssetPath + "/" + assetPath; 43 | 44 | var asset = Resources.Load(assetPath + "_fui"); 45 | if (asset == null) 46 | { 47 | bytes = null; 48 | assetNamePrefix = packageName; 49 | } 50 | else 51 | { 52 | bytes = asset.bytes; 53 | assetNamePrefix = assetPath; 54 | Resources.UnloadAsset(asset); 55 | } 56 | } 57 | 58 | public void LoadTextureAsync(string packageName, string assetName, string extension, LoadTextureCallback callback) 59 | { 60 | Resources.LoadAsync(assetName).completed += operation => 61 | { 62 | var request = (ResourceRequest)operation; 63 | if (request.asset == null) 64 | callback(null); 65 | else 66 | callback((Texture)request.asset); 67 | }; 68 | } 69 | 70 | public void UnloadTexture(Texture texture) 71 | { 72 | Resources.UnloadAsset(texture); 73 | } 74 | 75 | public void LoadAudioClipAsync(string packageName, string assetName, string extension, LoadAudioClipCallback callback) 76 | { 77 | Resources.LoadAsync(assetName).completed += operation => 78 | { 79 | var request = (ResourceRequest)operation; 80 | if (request.asset == null) 81 | callback(null); 82 | else 83 | callback((AudioClip)request.asset); 84 | }; 85 | } 86 | 87 | public void UnloadAudioClip(AudioClip audioClip) 88 | { 89 | Resources.UnloadAsset(audioClip); 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /Runtime/Loader/ResourcesUIAssetLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c84714f175eb4e1d9c935b39485ff36e 3 | timeCreated: 1685345986 -------------------------------------------------------------------------------- /Runtime/PackageMapping.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f14219acccf431e9966013181bf2891 3 | timeCreated: 1685347704 -------------------------------------------------------------------------------- /Runtime/PackageMapping/UIPackageMapping.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI.Dynamic 5 | { 6 | public sealed class UIPackageMapping : ScriptableObject, IUIPackageHelper 7 | { 8 | public string[] PackageIds; 9 | public string[] PackageNames; 10 | 11 | public string GetPackageNameById(string id) 12 | { 13 | if (m_PackageIdToNameMap == null) 14 | { 15 | m_PackageIdToNameMap = new Dictionary(); 16 | 17 | if (PackageIds != null && PackageNames != null) 18 | { 19 | var count = Mathf.Min(PackageIds.Length, PackageNames.Length); 20 | for (var i = 0; i < count; i++) 21 | m_PackageIdToNameMap.Add(PackageIds[i], PackageNames[i]); 22 | } 23 | } 24 | 25 | return m_PackageIdToNameMap.TryGetValue(id, out var packageName) ? packageName : null; 26 | } 27 | 28 | private Dictionary m_PackageIdToNameMap; 29 | } 30 | } -------------------------------------------------------------------------------- /Runtime/PackageMapping/UIPackageMapping.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e13d2388a6942f58d08722df396a5ac 3 | timeCreated: 1685347710 -------------------------------------------------------------------------------- /Runtime/UIAssetManager.CustomDestroyMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI.Dynamic 5 | { 6 | public partial class UIAssetManager 7 | { 8 | private void DestroyTexture(Texture texture) 9 | { 10 | if (texture == null) 11 | return; 12 | 13 | if (m_AssetLoader == null) 14 | throw new Exception("请设置AssetLoader"); 15 | 16 | m_LoadedTextures.Remove(texture); 17 | m_AssetLoader.UnloadTexture(texture); 18 | } 19 | 20 | private void DestroyAudioClip(AudioClip audioClip) 21 | { 22 | if (audioClip == null) 23 | return; 24 | 25 | if (m_AssetLoader == null) 26 | throw new Exception("请设置AssetLoader"); 27 | 28 | m_LoadedAudioClips.Remove(audioClip); 29 | m_AssetLoader.UnloadAudioClip(audioClip); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Runtime/UIAssetManager.CustomDestroyMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9119cb5287774671894cf9f65c94323e 3 | timeCreated: 1685342712 -------------------------------------------------------------------------------- /Runtime/UIAssetManager.Debugger.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace FairyGUI.Dynamic 5 | { 6 | public partial class UIAssetManager 7 | { 8 | #if UNITY_EDITOR 9 | 10 | /// 11 | /// 获取UIPackage引用计数 仅供调试使用 12 | /// 13 | private void GetUIPackageRefCounts(Dictionary buffer) 14 | { 15 | buffer.Clear(); 16 | 17 | foreach (var pair in m_UIPackageRefs) 18 | buffer.Add(pair.Key, pair.Value.RefCount); 19 | } 20 | 21 | [AddComponentMenu("")] 22 | public sealed class Debugger : MonoBehaviour 23 | { 24 | private static Debugger m_Debugger; 25 | 26 | public static Debugger CreateDebugger(UIAssetManager manager) 27 | { 28 | if (m_Debugger == null) 29 | { 30 | m_Debugger = new GameObject("UI Asset Manager").AddComponent(); 31 | DontDestroyOnLoad(m_Debugger.gameObject); 32 | } 33 | 34 | m_Debugger.m_Manager = manager; 35 | 36 | return m_Debugger; 37 | } 38 | 39 | public static void DestroyDebugger() 40 | { 41 | if (m_Debugger == null) 42 | return; 43 | 44 | GameObject.Destroy(m_Debugger.gameObject); 45 | } 46 | 47 | public Dictionary GetUIPackageRefCounts() 48 | { 49 | m_Manager.GetUIPackageRefCounts(m_UIPackageRefCounts); 50 | return m_UIPackageRefCounts; 51 | } 52 | 53 | public void UnloadAllUIPackages() 54 | { 55 | m_Manager.UnloadAllUIPackages(); 56 | } 57 | 58 | public void UnloadUnusedUIPackages() 59 | { 60 | m_Manager.UnloadUnusedUIPackages(); 61 | } 62 | 63 | private UIAssetManager m_Manager; 64 | private readonly Dictionary m_UIPackageRefCounts = new Dictionary(); 65 | } 66 | #endif 67 | } 68 | } -------------------------------------------------------------------------------- /Runtime/UIAssetManager.Debugger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a4a59a0b500426c817b0320a75f6f91 3 | timeCreated: 1685346271 -------------------------------------------------------------------------------- /Runtime/UIAssetManager.LoadResource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39e838216f894b13b4e2dcfa5856b60e 3 | timeCreated: 1685343670 -------------------------------------------------------------------------------- /Runtime/UIAssetManager.UIPackageRef.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 202e3677fb65411bbf82b0f7cc2ea7df 3 | timeCreated: 1685342758 -------------------------------------------------------------------------------- /Runtime/UIAssetManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac997fc36ccd4413bafb695ce752f28e 3 | timeCreated: 1685332788 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.howegame.fariygui.dynamic", 3 | "version": "1.0.0", 4 | "displayName": "FairyGUI-Dynamic", 5 | "description": "Unity package for FairyGUI-Dynamic. It provides a manager of FairyGUI UIPackage.", 6 | "category": "Runtime", 7 | "keywords": [ 8 | "FairyGUI" 9 | ], 10 | "author": { 11 | "name": "SunHowe", 12 | "email": "tosunhowe@gmail.com", 13 | "url": "https://github.com/SunHowe/FairyGUI-Dynamic.git" 14 | } 15 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a3eb2835735adf4c88e9db9a58d1ac2 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------