升级框架
This commit is contained in:
@@ -4,7 +4,6 @@ namespace NBF
|
||||
{
|
||||
public const int Excel = 1;
|
||||
public const int AB = 2;
|
||||
|
||||
public const int App = 3;
|
||||
|
||||
public const int CopyShare = 4;
|
||||
|
||||
3
Assets/Scripts/Editor/FairyGUI.meta
Normal file
3
Assets/Scripts/Editor/FairyGUI.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fa57e7cd335467f8be7158eef21edb8
|
||||
timeCreated: 1768704531
|
||||
329
Assets/Scripts/Editor/FairyGUI/DisplayObjectEditor.cs
Normal file
329
Assets/Scripts/Editor/FairyGUI/DisplayObjectEditor.cs
Normal file
@@ -0,0 +1,329 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using FairyGUI;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(DisplayObjectInfo))]
|
||||
public class DisplayObjectEditor : Editor
|
||||
{
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
bool _guiControllersFoldout = true;
|
||||
bool _guiTransitionsFoldout = true;
|
||||
bool _guiTextFormatFoldout = true;
|
||||
#endif
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
EditorApplication.update += _onEditorAppUpdate;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EditorApplication.update -= _onEditorAppUpdate;
|
||||
}
|
||||
|
||||
void _onEditorAppUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DisplayObject obj = (target as DisplayObjectInfo).displayObject;
|
||||
if (obj == null)
|
||||
return;
|
||||
|
||||
EditorGUILayout.LabelField(obj.GetType().Name + ": " + obj.id, (GUIStyle)"OL Title");
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
string name = EditorGUILayout.TextField("Name", obj.name);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
obj.name = name;
|
||||
if (obj is Container)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool fairyBatching = EditorGUILayout.Toggle("FairyBatching", ((Container)obj).fairyBatching);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
((Container)obj).fairyBatching = fairyBatching;
|
||||
}
|
||||
|
||||
GObject gObj = obj.gOwner;
|
||||
if (gObj != null)
|
||||
{
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.LabelField(gObj.GetType().Name + ": " + gObj.id, (GUIStyle)"OL Title");
|
||||
EditorGUILayout.Separator();
|
||||
|
||||
if (!string.IsNullOrEmpty(gObj.resourceURL))
|
||||
{
|
||||
PackageItem pi = UIPackage.GetItemByURL(gObj.resourceURL);
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Resource");
|
||||
EditorGUILayout.LabelField(pi.name + "@" + pi.owner.name);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
name = EditorGUILayout.TextField("Name", gObj.name);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.name = name;
|
||||
|
||||
if (gObj.parent != null)
|
||||
{
|
||||
string[] options = new string[gObj.parent.numChildren];
|
||||
int[] values = new int[options.Length];
|
||||
for (int i = 0; i < options.Length; i++)
|
||||
{
|
||||
options[i] = i.ToString();
|
||||
values[i] = i;
|
||||
}
|
||||
EditorGUI.BeginChangeCheck();
|
||||
int childIndex = EditorGUILayout.IntPopup("Child Index", gObj.parent.GetChildIndex(gObj), options, values);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.parent.SetChildIndex(gObj, childIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Child Index");
|
||||
EditorGUILayout.LabelField("No Parent");
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
float alpha = EditorGUILayout.Slider("Alpha", gObj.alpha, 0, 1);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.alpha = alpha;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector3 position = EditorGUILayout.Vector3Field("Position", gObj.position);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.position = position;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector3 rotation = EditorGUILayout.Vector3Field("Rotation", new Vector3(gObj.rotationX, gObj.rotationY, gObj.rotation));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
gObj.rotationX = rotation.x;
|
||||
gObj.rotationY = rotation.y;
|
||||
gObj.rotation = rotation.z;
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector2 scale = EditorGUILayout.Vector2Field("Scale", gObj.scale);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.scale = scale;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector2 skew = EditorGUILayout.Vector2Field("Skew", gObj.skew);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.skew = skew;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector2 size = EditorGUILayout.Vector2Field("Size", gObj.size);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.size = size;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Vector2 pivot = EditorGUILayout.Vector2Field("Pivot", gObj.pivot);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.pivot = pivot;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
string text = EditorGUILayout.TextField("Text", gObj.text);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.text = text;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
string icon = EditorGUILayout.TextField("Icon", gObj.icon);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.icon = icon;
|
||||
|
||||
//Draw Color Field
|
||||
var objType = gObj.GetType();
|
||||
var colorProperty = objType.GetProperty("color");
|
||||
if (colorProperty != null)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Color color = (Color)colorProperty.GetValue(gObj);
|
||||
color = EditorGUILayout.ColorField("Color", color);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
colorProperty.SetValue(gObj, color);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
string tooltips = EditorGUILayout.TextField("Tooltips", gObj.tooltips);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.tooltips = tooltips;
|
||||
|
||||
if (!(gObj is GImage))
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool touchable = EditorGUILayout.Toggle("Touchable", gObj.touchable);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.touchable = touchable;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool draggable = EditorGUILayout.Toggle("Draggable", gObj.draggable);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.draggable = draggable;
|
||||
}
|
||||
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
TextFormat textFormat = null;
|
||||
if (gObj is GTextField gTxt)
|
||||
{
|
||||
textFormat = gTxt.textFormat;
|
||||
}
|
||||
|
||||
if (textFormat != null)
|
||||
{
|
||||
_guiTextFormatFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(_guiTextFormatFoldout, "Text Format");
|
||||
EditorGUI.BeginChangeCheck();
|
||||
if (_guiTextFormatFoldout)
|
||||
{
|
||||
|
||||
var initLabelWidth = EditorGUIUtility.labelWidth;
|
||||
|
||||
var richStyle = new GUIStyle(GUI.skin.label);
|
||||
richStyle.richText = true;
|
||||
EditorGUIUtility.labelWidth = 60;
|
||||
textFormat.font = EditorGUILayout.TextField("Font", textFormat.font);
|
||||
textFormat.align = (AlignType)EditorGUILayout.EnumPopup("Align", textFormat.align);
|
||||
|
||||
EditorGUIUtility.labelWidth = initLabelWidth;
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUIUtility.labelWidth = 40;
|
||||
textFormat.size = EditorGUILayout.IntField("Size", textFormat.size);
|
||||
textFormat.color = EditorGUILayout.ColorField("Color", textFormat.color);
|
||||
EditorGUIUtility.labelWidth = initLabelWidth;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUIUtility.labelWidth = 40;
|
||||
textFormat.outline = EditorGUILayout.FloatField("Outline", textFormat.outline);
|
||||
textFormat.outlineColor = EditorGUILayout.ColorField("Color", textFormat.outlineColor);
|
||||
EditorGUIUtility.labelWidth = initLabelWidth;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUIUtility.labelWidth = 50;
|
||||
textFormat.shadowOffset = EditorGUILayout.Vector2Field("Shadow Offset", textFormat.shadowOffset);
|
||||
textFormat.shadowColor = EditorGUILayout.ColorField("Color", textFormat.shadowColor);
|
||||
EditorGUIUtility.labelWidth = initLabelWidth;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
textFormat.italic = EditorGUILayout.ToggleLeft("<i>I</i>", textFormat.italic, richStyle, GUILayout.Width(30));
|
||||
textFormat.bold = EditorGUILayout.ToggleLeft("<b>B</b>", textFormat.bold, richStyle, GUILayout.Width(30));
|
||||
textFormat.underline = EditorGUILayout.ToggleLeft("U̲", textFormat.underline, richStyle, GUILayout.Width(30));
|
||||
textFormat.strikethrough = EditorGUILayout.ToggleLeft(" S̶ ̶ ̶", textFormat.strikethrough, richStyle, GUILayout.Width(36));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUIUtility.labelWidth = 90;
|
||||
textFormat.lineSpacing = EditorGUILayout.IntField("Line Spacing", textFormat.lineSpacing);
|
||||
textFormat.letterSpacing = EditorGUILayout.IntField("Letter Spacing", textFormat.letterSpacing);
|
||||
EditorGUIUtility.labelWidth = initLabelWidth;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
textFormat.specialStyle = (TextFormat.SpecialStyle)EditorGUILayout.EnumPopup("Special Style", textFormat.specialStyle);
|
||||
|
||||
}
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gObj.asTextField.textFormat = textFormat;
|
||||
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
}
|
||||
|
||||
if (gObj is GComponent gComp)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool opaque = EditorGUILayout.Toggle("Opaque", gComp.opaque);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
gComp.opaque = opaque;
|
||||
|
||||
var headerLabelStyle = new GUIStyle(GUI.skin.label);
|
||||
headerLabelStyle.fontStyle = FontStyle.Bold;
|
||||
|
||||
if (gComp.Controllers.Count > 0)
|
||||
{
|
||||
_guiControllersFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(_guiControllersFoldout, "Controllers");
|
||||
if (_guiControllersFoldout)
|
||||
{
|
||||
foreach (var ctl in gComp.Controllers)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(ctl.name, headerLabelStyle, GUILayout.MaxWidth(ctl.name.Length * 15));
|
||||
|
||||
for (var i = 0; i < ctl.pageCount; i++)
|
||||
{
|
||||
var btnName = ctl.GetPageId(i) + ": " + ctl.GetPageName(i);
|
||||
var btnStyle = new GUIStyle("ButtonMid");
|
||||
if (ctl.selectedIndex == i)
|
||||
{
|
||||
btnStyle.normal.textColor = Color.green;
|
||||
btnStyle.hover.textColor = Color.yellow;
|
||||
btnStyle.fontStyle = FontStyle.Bold;
|
||||
}
|
||||
if (GUILayout.Button(btnName, btnStyle))
|
||||
{
|
||||
ctl.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
}
|
||||
|
||||
if (gComp.Transitions.Count > 0)
|
||||
{
|
||||
_guiTransitionsFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(_guiTransitionsFoldout, "Transitions");
|
||||
if (_guiTransitionsFoldout)
|
||||
{
|
||||
foreach (var transition in gComp.Transitions)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
var labelStyle = new GUIStyle(headerLabelStyle);
|
||||
if (transition.playing)
|
||||
{
|
||||
labelStyle.normal.textColor = Color.yellow;
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"{transition.name} - {transition.totalDuration}s", labelStyle, GUILayout.MinWidth(150));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var timeScale = transition.timeScale;
|
||||
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
transition.timeScale = timeScale;
|
||||
|
||||
|
||||
if (GUILayout.Button("▶", GUILayout.Width(20)))
|
||||
{
|
||||
transition.Play();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("■", GUILayout.Width(20)))
|
||||
{
|
||||
transition.Stop();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/DisplayObjectEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/DisplayObjectEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2f78faa29e5e1547837f976bf4b39f2
|
||||
timeCreated: 1541149029
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
142
Assets/Scripts/Editor/FairyGUI/EditorToolSet.cs
Normal file
142
Assets/Scripts/Editor/FairyGUI/EditorToolSet.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using FairyGUI;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class EditorToolSet
|
||||
{
|
||||
public static GUIContent[] packagesPopupContents;
|
||||
|
||||
static bool _loaded;
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
static void Startup()
|
||||
{
|
||||
EditorApplication.update += EditorApplication_Update;
|
||||
}
|
||||
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
static void InitializeOnLoad()
|
||||
{
|
||||
_loaded = false;
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/FairyGUI/UI Panel", false, 0)]
|
||||
static void CreatePanel()
|
||||
{
|
||||
EditorApplication.update -= EditorApplication_Update;
|
||||
EditorApplication.update += EditorApplication_Update;
|
||||
|
||||
StageCamera.CheckMainCamera();
|
||||
|
||||
GameObject panelObject = new GameObject("UIPanel");
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
panelObject.transform.parent = Selection.activeGameObject.transform;
|
||||
panelObject.layer = Selection.activeGameObject.layer;
|
||||
}
|
||||
else
|
||||
{
|
||||
int layer = LayerMask.NameToLayer(StageCamera.LayerName);
|
||||
panelObject.layer = layer;
|
||||
}
|
||||
panelObject.AddComponent<FairyGUI.UIPanel>();
|
||||
Selection.objects = new Object[] { panelObject };
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/FairyGUI/UI Camera", false, 0)]
|
||||
static void CreateCamera()
|
||||
{
|
||||
StageCamera.CheckMainCamera();
|
||||
Selection.objects = new Object[] { StageCamera.main.gameObject };
|
||||
}
|
||||
|
||||
[MenuItem("Window/FairyGUI - Refresh Packages And Panels")]
|
||||
static void RefreshPanels()
|
||||
{
|
||||
ReloadPackages();
|
||||
}
|
||||
|
||||
static void EditorApplication_Update()
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
return;
|
||||
|
||||
if (_loaded || !EMRenderSupport.hasTarget)
|
||||
return;
|
||||
|
||||
LoadPackages();
|
||||
}
|
||||
|
||||
public static void ReloadPackages()
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
_loaded = false;
|
||||
LoadPackages();
|
||||
Debug.Log("FairyGUI - Refresh Packages And Panels complete.");
|
||||
}
|
||||
else
|
||||
EditorUtility.DisplayDialog("FairyGUI", "Cannot run in play mode.", "OK");
|
||||
}
|
||||
|
||||
public static void LoadPackages()
|
||||
{
|
||||
if (Application.isPlaying || _loaded)
|
||||
return;
|
||||
|
||||
EditorApplication.update -= EditorApplication_Update;
|
||||
EditorApplication.update += EditorApplication_Update;
|
||||
|
||||
_loaded = true;
|
||||
|
||||
UIPackage.RemoveAllPackages();
|
||||
UIPackage.branch = null;
|
||||
FontManager.Clear();
|
||||
NTexture.DisposeEmpty();
|
||||
UIObjectFactory.Clear();
|
||||
|
||||
string[] ids = AssetDatabase.FindAssets("_fui t:textAsset");
|
||||
int cnt = ids.Length;
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(ids[i]);
|
||||
int pos = assetPath.LastIndexOf("_fui");
|
||||
if (pos == -1)
|
||||
continue;
|
||||
|
||||
assetPath = assetPath.Substring(0, pos);
|
||||
if (AssetDatabase.AssetPathToGUID(assetPath) != null)
|
||||
UIPackage.AddPackage(assetPath,
|
||||
(string name, string extension, System.Type type, out DestroyMethod destroyMethod) =>
|
||||
{
|
||||
destroyMethod = DestroyMethod.Unload;
|
||||
return AssetDatabase.LoadAssetAtPath(name + extension, type);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
List<UIPackage> pkgs = UIPackage.GetPackages();
|
||||
pkgs.Sort(CompareUIPackage);
|
||||
|
||||
cnt = pkgs.Count;
|
||||
packagesPopupContents = new GUIContent[cnt + 1];
|
||||
for (int i = 0; i < cnt; i++)
|
||||
packagesPopupContents[i] = new GUIContent(pkgs[i].name);
|
||||
packagesPopupContents[cnt] = new GUIContent("Please Select");
|
||||
|
||||
EMRenderSupport.Reload();
|
||||
}
|
||||
|
||||
static int CompareUIPackage(UIPackage u1, UIPackage u2)
|
||||
{
|
||||
return u1.name.CompareTo(u2.name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/EditorToolSet.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/EditorToolSet.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35dcb233f95ffd54c94f09d731db89ae
|
||||
timeCreated: 1535374214
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Scripts/Editor/FairyGUI/FairyGUI.Editor.asmdef
Normal file
18
Assets/Scripts/Editor/FairyGUI/FairyGUI.Editor.asmdef
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "FairyGUI.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:8c8f9d96103e94a7da84b012fd7e9f13"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f91e78d2be1f8ce48a1b3d8e8c4eaddb
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
193
Assets/Scripts/Editor/FairyGUI/PackagesWindow.cs
Normal file
193
Assets/Scripts/Editor/FairyGUI/PackagesWindow.cs
Normal file
@@ -0,0 +1,193 @@
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using System.Collections.Generic;
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
using UnityEditor.Experimental.SceneManagement;
|
||||
#endif
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PackagesWindow : EditorWindow
|
||||
{
|
||||
Vector2 scrollPos1;
|
||||
Vector2 scrollPos2;
|
||||
GUIStyle itemStyle;
|
||||
|
||||
int selectedPackage;
|
||||
string selectedPackageName;
|
||||
string selectedComponentName;
|
||||
|
||||
public PackagesWindow()
|
||||
{
|
||||
this.maxSize = new Vector2(550, 400);
|
||||
this.minSize = new Vector2(550, 400);
|
||||
}
|
||||
|
||||
public void SetSelection(string packageName, string componentName)
|
||||
{
|
||||
selectedPackageName = packageName;
|
||||
selectedComponentName = componentName;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
if (itemStyle == null)
|
||||
itemStyle = new GUIStyle(GUI.skin.GetStyle("Tag MenuItem"));
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
//package list start------
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(5);
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
GUILayout.Space(10);
|
||||
|
||||
EditorGUILayout.LabelField("Packages", (GUIStyle)"OL Title", GUILayout.Width(300));
|
||||
GUILayout.Space(5);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
scrollPos1 = EditorGUILayout.BeginScrollView(scrollPos1, (GUIStyle)"CN Box", GUILayout.Height(300), GUILayout.Width(300));
|
||||
EditorToolSet.LoadPackages();
|
||||
List<UIPackage> pkgs = UIPackage.GetPackages();
|
||||
int cnt = pkgs.Count;
|
||||
if (cnt == 0)
|
||||
{
|
||||
selectedPackage = -1;
|
||||
selectedPackageName = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Toggle(selectedPackageName == pkgs[i].name, pkgs[i].name, itemStyle, GUILayout.ExpandWidth(true)))
|
||||
{
|
||||
selectedPackage = i;
|
||||
selectedPackageName = pkgs[i].name;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
//package list end------
|
||||
|
||||
//component list start------
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(5);
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
GUILayout.Space(10);
|
||||
|
||||
EditorGUILayout.LabelField("Components", (GUIStyle)"OL Title", GUILayout.Width(220));
|
||||
GUILayout.Space(5);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
scrollPos2 = EditorGUILayout.BeginScrollView(scrollPos2, (GUIStyle)"CN Box", GUILayout.Height(300), GUILayout.Width(220));
|
||||
if (selectedPackage >= 0)
|
||||
{
|
||||
List<PackageItem> items = pkgs[selectedPackage].GetItems();
|
||||
int i = 0;
|
||||
foreach (PackageItem pi in items)
|
||||
{
|
||||
if (pi.type == PackageItemType.Component && pi.exported)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Toggle(selectedComponentName == pi.name, pi.name, itemStyle, GUILayout.ExpandWidth(true)))
|
||||
selectedComponentName = pi.name;
|
||||
i++;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
//component list end------
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(20);
|
||||
|
||||
//buttons start---
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
GUILayout.Space(180);
|
||||
|
||||
if (GUILayout.Button("Refresh", GUILayout.Width(100)))
|
||||
EditorToolSet.ReloadPackages();
|
||||
|
||||
GUILayout.Space(20);
|
||||
if (GUILayout.Button("OK", GUILayout.Width(100)) && selectedPackage >= 0)
|
||||
{
|
||||
UIPackage selectedPkg = pkgs[selectedPackage];
|
||||
string tmp = selectedPkg.assetPath.ToLower();
|
||||
string packagePath;
|
||||
int pos = tmp.LastIndexOf("/resources/");
|
||||
if (pos != -1)
|
||||
packagePath = selectedPkg.assetPath.Substring(pos + 11);
|
||||
else
|
||||
{
|
||||
pos = tmp.IndexOf("resources/");
|
||||
if (pos == 0)
|
||||
packagePath = selectedPkg.assetPath.Substring(pos + 10);
|
||||
else
|
||||
packagePath = selectedPkg.assetPath;
|
||||
}
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
bool isPrefab = PrefabUtility.GetPrefabAssetType(Selection.activeGameObject) != PrefabAssetType.NotAPrefab;
|
||||
#else
|
||||
bool isPrefab = PrefabUtility.GetPrefabType(Selection.activeGameObject) == PrefabType.Prefab;
|
||||
#endif
|
||||
Selection.activeGameObject.SendMessage("OnUpdateSource",
|
||||
new object[] { selectedPkg.name, packagePath, selectedComponentName, !isPrefab },
|
||||
SendMessageOptions.DontRequireReceiver);
|
||||
}
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
||||
if (prefabStage != null)
|
||||
EditorSceneManager.MarkSceneDirty(prefabStage.scene);
|
||||
else
|
||||
ApplyChange();
|
||||
#else
|
||||
ApplyChange();
|
||||
#endif
|
||||
this.Close();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
void ApplyChange()
|
||||
{
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/PackagesWindow.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/PackagesWindow.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83ed477a96af9c94f9f2ccc24b5a24c0
|
||||
timeCreated: 1535374214
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
29
Assets/Scripts/Editor/FairyGUI/StageCameraEditor.cs
Normal file
29
Assets/Scripts/Editor/FairyGUI/StageCameraEditor.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using UnityEditor;
|
||||
using FairyGUI;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(StageCamera))]
|
||||
public class StageCameraEditor : Editor
|
||||
{
|
||||
string[] propertyToExclude;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
propertyToExclude = new string[] { "m_Script" };
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
DrawPropertiesExcluding(serializedObject, propertyToExclude);
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
(target as StageCamera).ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/StageCameraEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/StageCameraEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b99582678b83dc46986b02984c665a3
|
||||
timeCreated: 1460480287
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
226
Assets/Scripts/Editor/FairyGUI/UIConfigEditor.cs
Normal file
226
Assets/Scripts/Editor/FairyGUI/UIConfigEditor.cs
Normal file
@@ -0,0 +1,226 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using FairyGUI;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIConfig))]
|
||||
public class UIConfigEditor : Editor
|
||||
{
|
||||
string[] propertyToExclude;
|
||||
bool itemsFoldout;
|
||||
bool packagesFoldOut;
|
||||
int errorState;
|
||||
|
||||
private const float kButtonWidth = 18f;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
propertyToExclude = new string[] { "m_Script", "Items", "PreloadPackages" };
|
||||
|
||||
itemsFoldout = EditorPrefs.GetBool("itemsFoldOut");
|
||||
packagesFoldOut = EditorPrefs.GetBool("packagesFoldOut");
|
||||
errorState = 0;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
DrawPropertiesExcluding(serializedObject, propertyToExclude);
|
||||
|
||||
UIConfig config = (UIConfig)target;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
itemsFoldout = EditorGUILayout.Foldout(itemsFoldout, "Config Items");
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
EditorPrefs.SetBool("itemsFoldOut", itemsFoldout);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
bool modified = false;
|
||||
|
||||
if (itemsFoldout)
|
||||
{
|
||||
Undo.RecordObject(config, "Items");
|
||||
|
||||
int len = config.Items.Count;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Add");
|
||||
UIConfig.ConfigKey selectedKey = (UIConfig.ConfigKey)EditorGUILayout.EnumPopup((System.Enum)UIConfig.ConfigKey.PleaseSelect);
|
||||
|
||||
if (selectedKey != UIConfig.ConfigKey.PleaseSelect)
|
||||
{
|
||||
int index = (int)selectedKey;
|
||||
|
||||
if (index > len - 1)
|
||||
{
|
||||
for (int i = len; i < index; i++)
|
||||
config.Items.Add(new UIConfig.ConfigValue());
|
||||
|
||||
UIConfig.ConfigValue value = new UIConfig.ConfigValue();
|
||||
value.valid = true;
|
||||
UIConfig.SetDefaultValue(selectedKey, value);
|
||||
config.Items.Add(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIConfig.ConfigValue value = config.Items[index];
|
||||
if (value == null)
|
||||
{
|
||||
value = new UIConfig.ConfigValue();
|
||||
value.valid = true;
|
||||
UIConfig.SetDefaultValue(selectedKey, value);
|
||||
config.Items[index] = value;
|
||||
}
|
||||
else if (!value.valid)
|
||||
{
|
||||
value.valid = true;
|
||||
UIConfig.SetDefaultValue(selectedKey, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
UIConfig.ConfigValue value = config.Items[i];
|
||||
if (value == null || !value.valid)
|
||||
continue;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel(((UIConfig.ConfigKey)i).ToString());
|
||||
switch ((UIConfig.ConfigKey)i)
|
||||
{
|
||||
case UIConfig.ConfigKey.ClickDragSensitivity:
|
||||
case UIConfig.ConfigKey.DefaultComboBoxVisibleItemCount:
|
||||
case UIConfig.ConfigKey.DefaultScrollStep:
|
||||
case UIConfig.ConfigKey.TouchDragSensitivity:
|
||||
case UIConfig.ConfigKey.TouchScrollSensitivity:
|
||||
case UIConfig.ConfigKey.InputCaretSize:
|
||||
value.i = EditorGUILayout.IntField(value.i);
|
||||
break;
|
||||
|
||||
case UIConfig.ConfigKey.ButtonSound:
|
||||
case UIConfig.ConfigKey.GlobalModalWaiting:
|
||||
case UIConfig.ConfigKey.HorizontalScrollBar:
|
||||
case UIConfig.ConfigKey.LoaderErrorSign:
|
||||
case UIConfig.ConfigKey.PopupMenu:
|
||||
case UIConfig.ConfigKey.PopupMenu_seperator:
|
||||
case UIConfig.ConfigKey.TooltipsWin:
|
||||
case UIConfig.ConfigKey.VerticalScrollBar:
|
||||
case UIConfig.ConfigKey.WindowModalWaiting:
|
||||
case UIConfig.ConfigKey.DefaultFont:
|
||||
value.s = EditorGUILayout.TextField(value.s);
|
||||
break;
|
||||
|
||||
case UIConfig.ConfigKey.DefaultScrollBounceEffect:
|
||||
case UIConfig.ConfigKey.DefaultScrollTouchEffect:
|
||||
case UIConfig.ConfigKey.RenderingTextBrighterOnDesktop:
|
||||
case UIConfig.ConfigKey.AllowSoftnessOnTopOrLeftSide:
|
||||
case UIConfig.ConfigKey.DepthSupportForPaintingMode:
|
||||
value.b = EditorGUILayout.Toggle(value.b);
|
||||
break;
|
||||
|
||||
case UIConfig.ConfigKey.ButtonSoundVolumeScale:
|
||||
value.f = EditorGUILayout.Slider(value.f, 0, 1);
|
||||
break;
|
||||
|
||||
case UIConfig.ConfigKey.ModalLayerColor:
|
||||
case UIConfig.ConfigKey.InputHighlightColor:
|
||||
value.c = EditorGUILayout.ColorField(value.c);
|
||||
break;
|
||||
|
||||
case UIConfig.ConfigKey.Branch:
|
||||
EditorGUI.BeginChangeCheck();
|
||||
value.s = EditorGUILayout.TextField(value.s);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (GUILayout.Button(new GUIContent("X", "Delete Item"), EditorStyles.miniButtonRight, GUILayout.Width(30)))
|
||||
{
|
||||
config.Items[i].Reset();
|
||||
UIConfig.SetDefaultValue((UIConfig.ConfigKey)i, config.Items[i]);
|
||||
modified = true;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
packagesFoldOut = EditorGUILayout.Foldout(packagesFoldOut, "Preload Packages");
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
EditorPrefs.SetBool("packagesFoldOut", packagesFoldOut);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (packagesFoldOut)
|
||||
{
|
||||
Undo.RecordObject(config, "PreloadPackages");
|
||||
|
||||
EditorToolSet.LoadPackages();
|
||||
|
||||
if (EditorToolSet.packagesPopupContents != null)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Add");
|
||||
int selected = EditorGUILayout.Popup(EditorToolSet.packagesPopupContents.Length - 1, EditorToolSet.packagesPopupContents);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (selected != EditorToolSet.packagesPopupContents.Length - 1)
|
||||
{
|
||||
UIPackage pkg = UIPackage.GetPackages()[selected];
|
||||
string tmp = pkg.assetPath.ToLower();
|
||||
int pos = tmp.LastIndexOf("resources/");
|
||||
if (pos != -1)
|
||||
{
|
||||
string packagePath = pkg.assetPath.Substring(pos + 10);
|
||||
if (config.PreloadPackages.IndexOf(packagePath) == -1)
|
||||
config.PreloadPackages.Add(packagePath);
|
||||
|
||||
errorState = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorState = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (errorState > 0)
|
||||
{
|
||||
errorState--;
|
||||
EditorGUILayout.HelpBox("Package is not in resources folder.", MessageType.Warning);
|
||||
}
|
||||
|
||||
int cnt = config.PreloadPackages.Count;
|
||||
int pi = 0;
|
||||
while (pi < cnt)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("" + pi + ".");
|
||||
config.PreloadPackages[pi] = EditorGUILayout.TextField(config.PreloadPackages[pi]);
|
||||
if (GUILayout.Button(new GUIContent("X", "Delete Item"), EditorStyles.miniButtonRight, GUILayout.Width(30)))
|
||||
{
|
||||
config.PreloadPackages.RemoveAt(pi);
|
||||
cnt--;
|
||||
}
|
||||
else
|
||||
pi++;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
else
|
||||
errorState = 0;
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties() || modified)
|
||||
(target as UIConfig).ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/UIConfigEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/UIConfigEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74df68b10ee56a54a8105d88312571ce
|
||||
timeCreated: 1460480288
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
64
Assets/Scripts/Editor/FairyGUI/UIContentScalerEditor.cs
Normal file
64
Assets/Scripts/Editor/FairyGUI/UIContentScalerEditor.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using UnityEditor;
|
||||
using FairyGUI;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIContentScaler))]
|
||||
public class UIContentScalerEditor : Editor
|
||||
{
|
||||
SerializedProperty scaleMode;
|
||||
SerializedProperty screenMatchMode;
|
||||
SerializedProperty designResolutionX;
|
||||
SerializedProperty designResolutionY;
|
||||
SerializedProperty fallbackScreenDPI;
|
||||
SerializedProperty defaultSpriteDPI;
|
||||
SerializedProperty constantScaleFactor;
|
||||
SerializedProperty ignoreOrientation;
|
||||
|
||||
string[] propertyToExclude;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
scaleMode = serializedObject.FindProperty("scaleMode");
|
||||
screenMatchMode = serializedObject.FindProperty("screenMatchMode");
|
||||
designResolutionX = serializedObject.FindProperty("designResolutionX");
|
||||
designResolutionY = serializedObject.FindProperty("designResolutionY");
|
||||
fallbackScreenDPI = serializedObject.FindProperty("fallbackScreenDPI");
|
||||
defaultSpriteDPI = serializedObject.FindProperty("defaultSpriteDPI");
|
||||
constantScaleFactor = serializedObject.FindProperty("constantScaleFactor");
|
||||
ignoreOrientation = serializedObject.FindProperty("ignoreOrientation");
|
||||
|
||||
propertyToExclude = new string[] { "m_Script", "scaleMode", "screenMatchMode", "designResolutionX", "designResolutionY",
|
||||
"fallbackScreenDPI", "defaultSpriteDPI", "constantScaleFactor", "ignoreOrientation"};
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
DrawPropertiesExcluding(serializedObject, propertyToExclude);
|
||||
|
||||
EditorGUILayout.PropertyField(scaleMode);
|
||||
if ((UIContentScaler.ScaleMode)scaleMode.enumValueIndex == UIContentScaler.ScaleMode.ScaleWithScreenSize)
|
||||
{
|
||||
EditorGUILayout.PropertyField(designResolutionX);
|
||||
EditorGUILayout.PropertyField(designResolutionY);
|
||||
EditorGUILayout.PropertyField(screenMatchMode);
|
||||
EditorGUILayout.PropertyField(ignoreOrientation);
|
||||
}
|
||||
else if ((UIContentScaler.ScaleMode)scaleMode.enumValueIndex == UIContentScaler.ScaleMode.ConstantPhysicalSize)
|
||||
{
|
||||
EditorGUILayout.PropertyField(fallbackScreenDPI);
|
||||
EditorGUILayout.PropertyField(defaultSpriteDPI);
|
||||
}
|
||||
else
|
||||
EditorGUILayout.PropertyField(constantScaleFactor);
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
(target as UIContentScaler).ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/UIContentScalerEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/UIContentScalerEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69174d19fa9521b4283e0b8f0e85acc8
|
||||
timeCreated: 1460480288
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
88
Assets/Scripts/Editor/FairyGUI/UIPainterEditor.cs
Normal file
88
Assets/Scripts/Editor/FairyGUI/UIPainterEditor.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIPainter))]
|
||||
public class UIPainterEditor : Editor
|
||||
{
|
||||
SerializedProperty packageName;
|
||||
SerializedProperty componentName;
|
||||
SerializedProperty renderCamera;
|
||||
SerializedProperty fairyBatching;
|
||||
SerializedProperty touchDisabled;
|
||||
SerializedProperty sortingOrder;
|
||||
|
||||
string[] propertyToExclude;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
packageName = serializedObject.FindProperty("packageName");
|
||||
componentName = serializedObject.FindProperty("componentName");
|
||||
renderCamera = serializedObject.FindProperty("renderCamera");
|
||||
fairyBatching = serializedObject.FindProperty("fairyBatching");
|
||||
touchDisabled = serializedObject.FindProperty("touchDisabled");
|
||||
sortingOrder = serializedObject.FindProperty("sortingOrder");
|
||||
|
||||
propertyToExclude = new string[] { "m_Script", "packageName", "componentName", "packagePath",
|
||||
"renderCamera", "fairyBatching", "touchDisabled","sortingOrder"
|
||||
};
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
UIPainter panel = target as UIPainter;
|
||||
|
||||
DrawPropertiesExcluding(serializedObject, propertyToExclude);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Package Name");
|
||||
if (GUILayout.Button(packageName.stringValue, "ObjectField"))
|
||||
EditorWindow.GetWindow<PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
|
||||
|
||||
if (GUILayout.Button("Clear", GUILayout.Width(50)))
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
bool isPrefab = PrefabUtility.GetPrefabAssetType(panel) != PrefabAssetType.NotAPrefab;
|
||||
#else
|
||||
bool isPrefab = PrefabUtility.GetPrefabType(panel) == PrefabType.Prefab;
|
||||
#endif
|
||||
panel.SendMessage("OnUpdateSource", new object[] { null, null, null, !isPrefab });
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Component Name");
|
||||
if (GUILayout.Button(componentName.stringValue, "ObjectField"))
|
||||
EditorWindow.GetWindow<PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
int oldSortingOrder = panel.sortingOrder;
|
||||
EditorGUILayout.PropertyField(sortingOrder);
|
||||
EditorGUILayout.PropertyField(renderCamera);
|
||||
EditorGUILayout.PropertyField(fairyBatching);
|
||||
EditorGUILayout.PropertyField(touchDisabled);
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
bool isPrefab = PrefabUtility.GetPrefabAssetType(panel) != PrefabAssetType.NotAPrefab;
|
||||
#else
|
||||
bool isPrefab = PrefabUtility.GetPrefabType(panel) == PrefabType.Prefab;
|
||||
#endif
|
||||
if (!isPrefab)
|
||||
{
|
||||
panel.ApplyModifiedProperties(sortingOrder.intValue != oldSortingOrder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/UIPainterEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/UIPainterEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cb0f73c030157845aaa7b42a2b8d577
|
||||
timeCreated: 1461566835
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
157
Assets/Scripts/Editor/FairyGUI/UIPanelEditor.cs
Normal file
157
Assets/Scripts/Editor/FairyGUI/UIPanelEditor.cs
Normal file
@@ -0,0 +1,157 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
|
||||
namespace FairyGUIEditor
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(FairyGUI.UIPanel))]
|
||||
public class UIPanelEditor : Editor
|
||||
{
|
||||
SerializedProperty packageName;
|
||||
SerializedProperty componentName;
|
||||
SerializedProperty packagePath;
|
||||
SerializedProperty renderMode;
|
||||
SerializedProperty renderCamera;
|
||||
SerializedProperty sortingOrder;
|
||||
SerializedProperty position;
|
||||
SerializedProperty scale;
|
||||
SerializedProperty rotation;
|
||||
SerializedProperty fairyBatching;
|
||||
SerializedProperty fitScreen;
|
||||
SerializedProperty touchDisabled;
|
||||
SerializedProperty hitTestMode;
|
||||
SerializedProperty setNativeChildrenOrder;
|
||||
|
||||
string[] propertyToExclude;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
packageName = serializedObject.FindProperty("packageName");
|
||||
componentName = serializedObject.FindProperty("componentName");
|
||||
packagePath = serializedObject.FindProperty("packagePath");
|
||||
renderMode = serializedObject.FindProperty("renderMode");
|
||||
renderCamera = serializedObject.FindProperty("renderCamera");
|
||||
sortingOrder = serializedObject.FindProperty("sortingOrder");
|
||||
position = serializedObject.FindProperty("position");
|
||||
scale = serializedObject.FindProperty("scale");
|
||||
rotation = serializedObject.FindProperty("rotation");
|
||||
fairyBatching = serializedObject.FindProperty("fairyBatching");
|
||||
fitScreen = serializedObject.FindProperty("fitScreen");
|
||||
touchDisabled = serializedObject.FindProperty("touchDisabled");
|
||||
hitTestMode = serializedObject.FindProperty("hitTestMode");
|
||||
setNativeChildrenOrder = serializedObject.FindProperty("setNativeChildrenOrder");
|
||||
|
||||
|
||||
propertyToExclude = new string[] { "m_Script", "packageName", "componentName", "packagePath", "renderMode",
|
||||
"renderCamera", "sortingOrder", "position", "scale", "rotation", "fairyBatching", "fitScreen","touchDisabled",
|
||||
"hitTestMode","cachedUISize","setNativeChildrenOrder"
|
||||
};
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
FairyGUI.UIPanel panel = target as FairyGUI.UIPanel;
|
||||
|
||||
DrawPropertiesExcluding(serializedObject, propertyToExclude);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Package Name");
|
||||
if (GUILayout.Button(packageName.stringValue, "ObjectField"))
|
||||
EditorWindow.GetWindow<PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
|
||||
|
||||
if (GUILayout.Button("Clear", GUILayout.Width(50)))
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
bool isPrefab = PrefabUtility.GetPrefabAssetType(panel) != PrefabAssetType.NotAPrefab;
|
||||
#else
|
||||
bool isPrefab = PrefabUtility.GetPrefabType(panel) == PrefabType.Prefab;
|
||||
#endif
|
||||
panel.SendMessage("OnUpdateSource", new object[] { null, null, null, !isPrefab });
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Component Name");
|
||||
if (GUILayout.Button(componentName.stringValue, "ObjectField"))
|
||||
EditorWindow.GetWindow<PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Package Path");
|
||||
EditorGUILayout.LabelField(packagePath.stringValue, (GUIStyle)"helpbox");
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (Application.isPlaying)
|
||||
EditorGUILayout.EnumPopup("Render Mode", panel.container.renderMode);
|
||||
else
|
||||
EditorGUILayout.PropertyField(renderMode);
|
||||
if ((RenderMode)renderMode.enumValueIndex != RenderMode.ScreenSpaceOverlay)
|
||||
EditorGUILayout.PropertyField(renderCamera);
|
||||
|
||||
int oldSortingOrder = panel.sortingOrder;
|
||||
EditorGUILayout.PropertyField(sortingOrder);
|
||||
EditorGUILayout.PropertyField(fairyBatching);
|
||||
EditorGUILayout.PropertyField(hitTestMode);
|
||||
EditorGUILayout.PropertyField(touchDisabled);
|
||||
EditorGUILayout.PropertyField(setNativeChildrenOrder);
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.LabelField("UI Transform", (GUIStyle)"OL Title");
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(position);
|
||||
EditorGUILayout.PropertyField(rotation);
|
||||
EditorGUILayout.PropertyField(scale);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
FairyGUI.FitScreen oldFitScreen = (FairyGUI.FitScreen)fitScreen.enumValueIndex;
|
||||
EditorGUILayout.PropertyField(fitScreen);
|
||||
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
bool isPrefab = PrefabUtility.GetPrefabAssetType(panel) != PrefabAssetType.NotAPrefab;
|
||||
#else
|
||||
bool isPrefab = PrefabUtility.GetPrefabType(panel) == PrefabType.Prefab;
|
||||
#endif
|
||||
if (!isPrefab)
|
||||
{
|
||||
panel.ApplyModifiedProperties(sortingOrder.intValue != oldSortingOrder, (FairyGUI.FitScreen)fitScreen.enumValueIndex != oldFitScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnSceneGUI()
|
||||
{
|
||||
FairyGUI.UIPanel panel = (target as FairyGUI.UIPanel);
|
||||
if (panel.container == null)
|
||||
return;
|
||||
|
||||
Vector3 pos = panel.GetUIWorldPosition();
|
||||
float sizeFactor = HandleUtility.GetHandleSize(pos);
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
Vector3 newPos = Handles.FreeMoveHandle(pos, sizeFactor, Vector3.one, Handles.ArrowHandleCap);
|
||||
#elif UNITY_2017_1_OR_NEWER
|
||||
Vector3 newPos = Handles.FreeMoveHandle(pos, Quaternion.identity, sizeFactor, Vector3.one, Handles.ArrowHandleCap);
|
||||
#else
|
||||
Vector3 newPos = Handles.FreeMoveHandle(pos, Quaternion.identity, sizeFactor, Vector3.one, Handles.ArrowCap);
|
||||
#endif
|
||||
if (newPos != pos)
|
||||
{
|
||||
Vector2 v1 = HandleUtility.WorldToGUIPoint(pos);
|
||||
Vector2 v2 = HandleUtility.WorldToGUIPoint(newPos);
|
||||
Vector3 delta = v2 - v1;
|
||||
delta.x = (int)delta.x;
|
||||
delta.y = (int)delta.y;
|
||||
|
||||
panel.MoveUI(delta);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Scripts/Editor/FairyGUI/UIPanelEditor.cs.meta
Normal file
13
Assets/Scripts/Editor/FairyGUI/UIPanelEditor.cs.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94949994c6eda08448145f618d0db72f
|
||||
timeCreated: 1535374215
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -7,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using NBC;
|
||||
using Fantasy.Serialize;
|
||||
using LightProto;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user