UI update 02
This commit is contained in:
@@ -0,0 +1,258 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public class PraseExternalDataEditor : UnityEditor.EditorWindow
|
||||
{
|
||||
[SerializeField] private int m_DataDimension = 1;
|
||||
[SerializeField] private double m_DefaultYValue = 0;
|
||||
private static BaseChart s_Chart;
|
||||
private static Serie s_Serie;
|
||||
private static Axis s_Axis;
|
||||
private static bool s_LinksData;
|
||||
private static PraseExternalDataEditor window;
|
||||
private static string inputJsonText = "";
|
||||
|
||||
public static void ShowWindow()
|
||||
{
|
||||
window = GetWindow<PraseExternalDataEditor>();
|
||||
window.titleContent = new GUIContent("PraseExternalData");
|
||||
window.minSize = new Vector2(450, 550);
|
||||
window.Focus();
|
||||
window.Show();
|
||||
}
|
||||
|
||||
public static void UpdateData(BaseChart chart, Serie serie, Axis axis, bool linksData)
|
||||
{
|
||||
s_Chart = chart;
|
||||
s_Serie = serie;
|
||||
s_Axis = axis;
|
||||
s_LinksData = linksData;
|
||||
inputJsonText = UnityEngine.GUIUtility.systemCopyBuffer;
|
||||
}
|
||||
|
||||
void OnInspectorUpdate()
|
||||
{
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (s_Chart == null)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
EditorGUILayout.LabelField("Input external data (echarts data):");
|
||||
m_DataDimension = EditorGUILayout.IntField("Data Dimension", m_DataDimension);
|
||||
if (m_DataDimension < 1)
|
||||
m_DataDimension = 1;
|
||||
else if (m_DataDimension == 2)
|
||||
m_DefaultYValue = EditorGUILayout.DoubleField("Default Y Value", m_DefaultYValue);
|
||||
inputJsonText = EditorGUILayout.TextArea(inputJsonText, GUILayout.Height(400));
|
||||
if (GUILayout.Button("Try Add"))
|
||||
{
|
||||
if (s_Serie != null)
|
||||
{
|
||||
if (!ParseArrayData(s_Serie, inputJsonText))
|
||||
{
|
||||
if (ParseJsonData(s_Serie, inputJsonText))
|
||||
inputJsonText = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
inputJsonText = "";
|
||||
}
|
||||
}
|
||||
else if (s_Axis != null)
|
||||
{
|
||||
if (!ParseArrayData(s_Axis, inputJsonText))
|
||||
{
|
||||
if (ParseJsonData(s_Axis, inputJsonText))
|
||||
inputJsonText = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
inputJsonText = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool ParseArrayData(Axis axis, string arrayData)
|
||||
{
|
||||
arrayData = arrayData.Trim();
|
||||
if (!arrayData.StartsWith("data: Array")) return false;
|
||||
axis.data.Clear();
|
||||
var list = arrayData.Split('\n');
|
||||
for (int i = 1; i < list.Length; i++)
|
||||
{
|
||||
var temp = list[i].Split(':');
|
||||
if (temp.Length == 2)
|
||||
{
|
||||
var category = temp[1].Replace("\"", "").Trim();
|
||||
axis.data.Add(category);
|
||||
}
|
||||
}
|
||||
axis.SetAllDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool ParseArrayData(Serie serie, string arrayData)
|
||||
{
|
||||
arrayData = arrayData.Trim();
|
||||
if (!arrayData.StartsWith("data: Array")) return false;
|
||||
if (s_LinksData) serie.ClearLinks();
|
||||
else serie.ClearData();
|
||||
var list = arrayData.Split('\n');
|
||||
for (int i = 1; i < list.Length; i++)
|
||||
{
|
||||
var temp = list[i].Split(':');
|
||||
if (temp.Length == 2)
|
||||
{
|
||||
var strvalue = temp[1].Replace("\"", "").Trim();
|
||||
var value = 0d;
|
||||
var flag = double.TryParse(strvalue, out value);
|
||||
if (flag)
|
||||
{
|
||||
serie.AddYData(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
serie.SetAllDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool ParseJsonData(Axis axis, string jsonData)
|
||||
{
|
||||
if (!CheckJsonData(ref jsonData)) return false;
|
||||
axis.data.Clear();
|
||||
string[] datas = jsonData.Split(',');
|
||||
for (int i = 0; i < datas.Length; i++)
|
||||
{
|
||||
var txt = datas[i].Trim().Replace("[", "").Replace("]", "");
|
||||
var value = 0d;
|
||||
if (!double.TryParse(txt, out value))
|
||||
axis.data.Add(txt.Replace("\'", "").Replace("\"", ""));
|
||||
}
|
||||
axis.SetAllDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从json中导入数据
|
||||
/// </summary>
|
||||
/// <param name="jsonData"></param>
|
||||
private bool ParseJsonData(Serie serie, string jsonData)
|
||||
{
|
||||
if (!CheckJsonData(ref jsonData)) return false;
|
||||
if (s_LinksData) serie.ClearLinks();
|
||||
else serie.ClearData();
|
||||
if (jsonData.IndexOf("],") > -1 || jsonData.IndexOf("] ,") > -1)
|
||||
{
|
||||
string[] datas = jsonData.Split(new string[] { "],", "] ," }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < datas.Length; i++)
|
||||
{
|
||||
var data = datas[i].Replace("[", "").Replace("]", "").Split(new char[] { '[', ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var serieData = new SerieData();
|
||||
double value = 0;
|
||||
if (data.Length == 2 && !double.TryParse(data[0], out value))
|
||||
{
|
||||
double.TryParse(data[1], out value);
|
||||
if (m_DataDimension == 2)
|
||||
serieData.data = new List<double>() { i, m_DefaultYValue, value };
|
||||
else
|
||||
serieData.data = new List<double>() { i, value };
|
||||
serieData.name = data[0].Replace("\"", "").Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < data.Length; j++)
|
||||
{
|
||||
var txt = data[j].Trim().Replace("]", "");
|
||||
var flag = double.TryParse(txt, out value);
|
||||
if (flag)
|
||||
{
|
||||
serieData.data.Add(value);
|
||||
}
|
||||
else serieData.name = txt.Replace("\"", "").Trim();
|
||||
}
|
||||
}
|
||||
serie.AddSerieData(serieData);
|
||||
}
|
||||
}
|
||||
else if (jsonData.IndexOf("value") > -1 && jsonData.IndexOf("name") > -1)
|
||||
{
|
||||
string[] datas = jsonData.Split(new string[] { "},", "} ,", "}" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < datas.Length; i++)
|
||||
{
|
||||
var arr = datas[i].Replace("{", "").Split(',');
|
||||
var serieData = new SerieData();
|
||||
foreach (var a in arr)
|
||||
{
|
||||
if (a.StartsWith("value:"))
|
||||
{
|
||||
double value = double.Parse(a.Substring(6, a.Length - 6));
|
||||
if (m_DataDimension == 2)
|
||||
serieData.data = new List<double>() { i, m_DefaultYValue, value };
|
||||
else
|
||||
serieData.data = new List<double>() { i, value };
|
||||
}
|
||||
else if (a.StartsWith("name:"))
|
||||
{
|
||||
string name = a.Substring(6, a.Length - 6 - 1);
|
||||
serieData.name = name;
|
||||
}
|
||||
else if (a.StartsWith("selected:"))
|
||||
{
|
||||
string selected = a.Substring(9, a.Length - 9);
|
||||
serieData.selected = bool.Parse(selected);
|
||||
}
|
||||
}
|
||||
serie.AddSerieData(serieData);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] datas = jsonData.Split(',');
|
||||
for (int i = 0; i < datas.Length; i++)
|
||||
{
|
||||
double value;
|
||||
var flag = double.TryParse(datas[i].Trim(), out value);
|
||||
if (flag)
|
||||
{
|
||||
var serieData = new SerieData();
|
||||
if (m_DataDimension == 2)
|
||||
serieData.data = new List<double>() { i, m_DefaultYValue, value };
|
||||
else
|
||||
serieData.data = new List<double>() { i, value };
|
||||
serie.AddSerieData(serieData);
|
||||
}
|
||||
}
|
||||
}
|
||||
serie.SetAllDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool CheckJsonData(ref string jsonData)
|
||||
{
|
||||
if (string.IsNullOrEmpty(jsonData)) return false;
|
||||
jsonData = jsonData.Replace("\r\n", "");
|
||||
jsonData = jsonData.Replace(" ", "");
|
||||
jsonData = jsonData.Replace("\n", "");
|
||||
int startIndex = jsonData.IndexOf("[");
|
||||
int endIndex = jsonData.LastIndexOf("]");
|
||||
if (startIndex == -1 || endIndex == -1)
|
||||
{
|
||||
Debug.LogError("json data need include in [ ]");
|
||||
return false;
|
||||
}
|
||||
jsonData = jsonData.Substring(startIndex + 1, endIndex - startIndex - 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b41bbccd77d88460aba5bcf81b4920ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,59 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomEditor(typeof(XCSettings))]
|
||||
public class XCSettingsEditor : UnityEditor.Editor
|
||||
{
|
||||
internal class Styles
|
||||
{
|
||||
public static readonly GUIContent defaultFontAssetLabel = new GUIContent("Default Font Asset", "The Font Asset that will be assigned by default to newly created text objects when no Font Asset is specified.");
|
||||
public static readonly GUIContent defaultFontAssetPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Font Assets and Material Presets are located.\nExample \"Fonts & Materials/\"");
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
class XCResourceImporterProvider : SettingsProvider
|
||||
{
|
||||
XCResourcesImporter m_ResourceImporter;
|
||||
|
||||
public XCResourceImporterProvider() : base("Project/XCharts", SettingsScope.Project)
|
||||
{ }
|
||||
|
||||
public override void OnGUI(string searchContext)
|
||||
{
|
||||
if (m_ResourceImporter == null)
|
||||
m_ResourceImporter = new XCResourcesImporter();
|
||||
|
||||
m_ResourceImporter.OnGUI();
|
||||
}
|
||||
|
||||
public override void OnDeactivate()
|
||||
{
|
||||
if (m_ResourceImporter != null)
|
||||
m_ResourceImporter.OnDestroy();
|
||||
}
|
||||
|
||||
static UnityEngine.Object GetSettings()
|
||||
{
|
||||
return Resources.Load<XCSettings>("XCSettings");
|
||||
}
|
||||
|
||||
[SettingsProviderGroup]
|
||||
static SettingsProvider[] CreateXCSettingsProvider()
|
||||
{
|
||||
var providers = new System.Collections.Generic.List<SettingsProvider> { new XCResourceImporterProvider() };
|
||||
if (GetSettings() != null)
|
||||
{
|
||||
var provider = new AssetSettingsProvider("Project/XCharts/Settings", GetSettings);
|
||||
provider.PopulateSearchKeywordsFromGUIContentProperties<XCSettingsEditor.Styles>();
|
||||
providers.Add(provider);
|
||||
}
|
||||
|
||||
return providers.ToArray();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a1acb5e9cc3740aabbaaccd4ec9b8b8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
using ADB = UnityEditor.AssetDatabase;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public partial class XChartsEditor
|
||||
{
|
||||
[MenuItem("XCharts/BarChart/Baisc Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Baisc Column", priority = 45)]
|
||||
public static void AddBarChart()
|
||||
{
|
||||
AddChart<BarChart>("BarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Zebra Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Zebra Column", priority = 45)]
|
||||
public static void AddBarChart_ZebraColumn()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Zebra Column");
|
||||
chart.DefaultZebraColumnChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Capsule Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Capsule Column", priority = 45)]
|
||||
public static void AddBarChart_CapsuleColumn()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Capsule Column");
|
||||
chart.DefaultCapsuleColumnChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Grouped Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Grouped Column", priority = 45)]
|
||||
public static void AddBarChart_GroupedColumn()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Grouped Column");
|
||||
chart.DefaultGroupedColumnChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Stacked Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Stacked Column", priority = 45)]
|
||||
public static void AddBarChart_StackedColumn()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Stacked Column");
|
||||
chart.DefaultStackedColumnChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Percent Column", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Percent Column", priority = 45)]
|
||||
public static void AddBarChart_PercentColumn()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Percent Column");
|
||||
chart.DefaultPercentColumnChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Baisc Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Baisc Bar", priority = 45)]
|
||||
public static void AddBarChart_BasicBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart");
|
||||
chart.DefaultBarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Zebra Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Zebra Bar", priority = 45)]
|
||||
public static void AddBarChart_ZebraBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Zebra Bar");
|
||||
chart.DefaultZebraBarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Capsule Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Capsule Bar", priority = 45)]
|
||||
public static void AddBarChart_CapsuleBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Capsule Bar");
|
||||
chart.DefaultCapsuleBarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Grouped Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Grouped Bar", priority = 45)]
|
||||
public static void AddBarChart_GroupedBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Grouped Bar");
|
||||
chart.DefaultGroupedBarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Stacked Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Stacked Bar", priority = 45)]
|
||||
public static void AddBarChart_StackedBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Stacked Bar");
|
||||
chart.DefaultStackedBarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/BarChart/Percent Bar", priority = 45)]
|
||||
[MenuItem("GameObject/UI/XCharts/BarChart/Percent Bar", priority = 45)]
|
||||
public static void AddBarChart_PercentBar()
|
||||
{
|
||||
var chart = AddChart<BarChart>("BarChart", "Percent Bar");
|
||||
chart.DefaultPercentBarChart();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56ff28653cd1148dc857e65c4440cf74
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
using ADB = UnityEditor.AssetDatabase;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public partial class XChartsEditor
|
||||
{
|
||||
[MenuItem("XCharts/LineChart/Basic Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Basic Line", priority = 44)]
|
||||
public static void AddLineChart()
|
||||
{
|
||||
AddChart<LineChart>("LineChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Area Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Area Line", priority = 44)]
|
||||
public static void AddLineChart_Area()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Area", "Area Line");
|
||||
chart.DefaultAreaLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Smooth Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Smooth Line", priority = 44)]
|
||||
public static void AddLineChart_Smooth()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Smooth", "Smooth Line");
|
||||
chart.DefaultSmoothLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Smooth Area", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Smooth Area Line", priority = 44)]
|
||||
public static void AddLineChart_SmoothArea()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_SmoothArea", "Smooth Area Line");
|
||||
chart.DefaultSmoothAreaLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Stack Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Stack Line", priority = 44)]
|
||||
public static void AddLineChart_Stack()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Stack", "Stack Line");
|
||||
chart.DefaultStackLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Stack Area Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Stack Area Line", priority = 44)]
|
||||
public static void AddLineChart_StackArea()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_StackArea", "Stack Area Line");
|
||||
chart.DefaultStackAreaLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Step Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Step Line", priority = 44)]
|
||||
public static void AddLineChart_Step()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Step", "Step Line");
|
||||
chart.DefaultStepLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Dashed Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Dashed Line", priority = 44)]
|
||||
public static void AddLineChart_Dash()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Dashed", "Dashed Line");
|
||||
chart.DefaultDashLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Time Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Time Line", priority = 44)]
|
||||
public static void AddLineChart_Time()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Time", "Time Line");
|
||||
chart.DefaultTimeLineChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/LineChart/Log Line", priority = 44)]
|
||||
[MenuItem("GameObject/UI/XCharts/LineChart/Log Line", priority = 44)]
|
||||
public static void AddLineChart_Log()
|
||||
{
|
||||
var chart = AddChart<LineChart>("LineChart_Log", "Log Line");
|
||||
chart.DefaultLogLineChart();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5036b2e279753473a906aaaf8b369d44
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
using ADB = UnityEditor.AssetDatabase;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public partial class XChartsEditor
|
||||
{
|
||||
[MenuItem("XCharts/PieChart/Pie", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Pie", priority = 46)]
|
||||
public static void AddPieChart()
|
||||
{
|
||||
AddChart<PieChart>("PieChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart/Pie With Label", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Pie With Label", priority = 46)]
|
||||
public static void AddPieChart_WithLabel()
|
||||
{
|
||||
var chart = AddChart<PieChart>("PieChart");
|
||||
chart.DefaultLabelPieChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart/Donut", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Donut", priority = 46)]
|
||||
public static void AddPieChart_Donut()
|
||||
{
|
||||
var chart = AddChart<PieChart>("PieChart");
|
||||
chart.DefaultDonutPieChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart/Donut With Label", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Donut With Label", priority = 46)]
|
||||
public static void AddPieChart_DonutWithLabel()
|
||||
{
|
||||
var chart = AddChart<PieChart>("PieChart");
|
||||
chart.DefaultLabelDonutPieChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart/Radius Rose", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Radius Rose", priority = 46)]
|
||||
public static void AddPieChart_RadiusRose()
|
||||
{
|
||||
var chart = AddChart<PieChart>("PieChart");
|
||||
chart.DefaultRadiusRosePieChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PieChart/Area Rose", priority = 46)]
|
||||
[MenuItem("GameObject/UI/XCharts/PieChart/Area Rose", priority = 46)]
|
||||
public static void AddPieChart_AreaRose()
|
||||
{
|
||||
var chart = AddChart<PieChart>("PieChart");
|
||||
chart.DefaultAreaRosePieChart();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75bcae53ea72749418444c00f6281a3d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
using ADB = UnityEditor.AssetDatabase;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public partial class XChartsEditor
|
||||
{
|
||||
[MenuItem("XCharts/PolarChart/Line", priority = 54)]
|
||||
[MenuItem("GameObject/UI/XCharts/PolarChart/Line", priority = 54)]
|
||||
public static void PolarChart()
|
||||
{
|
||||
AddChart<PolarChart>("PolarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PolarChart/Radial Bar", priority = 54)]
|
||||
[MenuItem("GameObject/UI/XCharts/PolarChart/Radial Bar", priority = 54)]
|
||||
public static void PolarChart_RadialBar()
|
||||
{
|
||||
var chart = AddChart<PolarChart>("PolarChart");
|
||||
chart.DefaultRadialBarPolarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PolarChart/Tangential Bar", priority = 54)]
|
||||
[MenuItem("GameObject/UI/XCharts/PolarChart/Tangential Bar", priority = 54)]
|
||||
public static void PolarChart_TangentialBar()
|
||||
{
|
||||
var chart = AddChart<PolarChart>("PolarChart");
|
||||
chart.DefaultTangentialBarPolarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/PolarChart/Heatmap", priority = 54)]
|
||||
[MenuItem("GameObject/UI/XCharts/PolarChart/Heatmap", priority = 54)]
|
||||
public static void PolarChart_Heatmap()
|
||||
{
|
||||
var chart = AddChart<PolarChart>("PolarChart");
|
||||
chart.DefaultHeatmapPolarChart();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cf6923e1dcc04bb4a077d53bf7b6a0d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,403 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts.Runtime;
|
||||
using ADB = UnityEditor.AssetDatabase;
|
||||
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
public partial class XChartsEditor : UnityEditor.Editor
|
||||
{
|
||||
private static Transform GetParent()
|
||||
{
|
||||
GameObject selectObj = Selection.activeGameObject;
|
||||
if (selectObj == null)
|
||||
{
|
||||
#if UNITY_2023_1_OR_NEWER
|
||||
var canvas = UnityEngine.Object.FindFirstObjectByType<Canvas>();
|
||||
#else
|
||||
var canvas = GameObject.FindObjectOfType<Canvas>();
|
||||
#endif
|
||||
if (canvas != null) return canvas.transform;
|
||||
else
|
||||
{
|
||||
var canvasObject = new GameObject();
|
||||
canvasObject.name = "Canvas";
|
||||
canvas = canvasObject.AddComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceCamera;
|
||||
var mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
|
||||
canvas.worldCamera = mainCamera == null ? null : mainCamera.GetComponent<Camera>();
|
||||
canvasObject.AddComponent<CanvasScaler>();
|
||||
canvasObject.AddComponent<GraphicRaycaster>();
|
||||
if (GameObject.Find("EventSystem") == null)
|
||||
{
|
||||
var eventSystem = new GameObject();
|
||||
eventSystem.name = "EventSystem";
|
||||
eventSystem.AddComponent<EventSystem>();
|
||||
eventSystem.AddComponent<StandaloneInputModule>();
|
||||
}
|
||||
return canvas.transform;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return selectObj.transform;
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetName(Transform parent, string name)
|
||||
{
|
||||
if (parent.Find(name) == null) return name;
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
var newName = string.Format("{0} ({1})", name, i);
|
||||
if (parent.Find(newName) == null)
|
||||
{
|
||||
return newName;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static T AddChart<T>(string chartName, string titleName = null) where T : BaseChart
|
||||
{
|
||||
XCThemeMgr.CheckReloadTheme();
|
||||
var chart = AddGraph<T>(chartName);
|
||||
if (!string.IsNullOrEmpty(titleName))
|
||||
{
|
||||
var title = chart.GetChartComponent<Title>();
|
||||
title.text = titleName;
|
||||
}
|
||||
return chart;
|
||||
}
|
||||
|
||||
public static T AddGraph<T>(string graphName) where T : Graphic
|
||||
{
|
||||
var parent = GetParent();
|
||||
if (parent == null) return null;
|
||||
XCThemeMgr.CheckReloadTheme();
|
||||
var obj = new GameObject();
|
||||
obj.name = GetName(parent, graphName);
|
||||
obj.layer = LayerMask.NameToLayer("UI");
|
||||
var t = obj.AddComponent<T>();
|
||||
obj.transform.SetParent(parent);
|
||||
obj.transform.localScale = Vector3.one;
|
||||
obj.transform.localPosition = Vector3.zero;
|
||||
obj.transform.localRotation = Quaternion.Euler(0, 0, 0);
|
||||
var rect = obj.GetComponent<RectTransform>();
|
||||
rect.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
rect.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
rect.pivot = new Vector2(0.5f, 0.5f);
|
||||
Selection.activeGameObject = obj;
|
||||
EditorUtility.SetDirty(obj);
|
||||
return t;
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/EmptyChart", priority = 43)]
|
||||
[MenuItem("GameObject/UI/XCharts/EmptyChart", priority = 43)]
|
||||
public static void AddBaseChart()
|
||||
{
|
||||
AddChart<BaseChart>("EmptyChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RadarChart/Polygon Radar", priority = 47)]
|
||||
[MenuItem("GameObject/UI/XCharts/RadarChart/Polygon Radar", priority = 47)]
|
||||
public static void AddRadarChart()
|
||||
{
|
||||
AddChart<RadarChart>("RadarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RadarChart/Cirle Radar", priority = 47)]
|
||||
[MenuItem("GameObject/UI/XCharts/RadarChart/Cirle Radar", priority = 47)]
|
||||
public static void AddRadarChart_CirleRadar()
|
||||
{
|
||||
var chart = AddChart<RadarChart>("RadarChart");
|
||||
chart.DefaultCircleRadarChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/ScatterChart/Scatter", priority = 48)]
|
||||
[MenuItem("GameObject/UI/XCharts/ScatterChart/Scatter", priority = 48)]
|
||||
public static void AddScatterChart()
|
||||
{
|
||||
AddChart<ScatterChart>("ScatterChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/ScatterChart/Bubble", priority = 48)]
|
||||
[MenuItem("GameObject/UI/XCharts/ScatterChart/Bubble", priority = 48)]
|
||||
public static void AddScatterChart_Bubble()
|
||||
{
|
||||
var chart = AddChart<ScatterChart>("ScatterChart");
|
||||
chart.DefaultBubbleChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/HeatmapChart/Heatmap", priority = 49)]
|
||||
[MenuItem("GameObject/UI/XCharts/HeatmapChart/Heatmap", priority = 49)]
|
||||
public static void AddHeatmapChart()
|
||||
{
|
||||
AddChart<HeatmapChart>("HeatmapChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/HeatmapChart/Count Heatmap", priority = 49)]
|
||||
[MenuItem("GameObject/UI/XCharts/HeatmapChart/Count Heatmap", priority = 49)]
|
||||
public static void AddHeatmapChart_Count()
|
||||
{
|
||||
var chart = AddChart<HeatmapChart>("HeatmapChart");
|
||||
chart.DefaultCountHeatmapChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RingChart/Ring", priority = 51)]
|
||||
[MenuItem("GameObject/UI/XCharts/RingChart/Ring", priority = 51)]
|
||||
public static void AddRingChart()
|
||||
{
|
||||
AddChart<RingChart>("RingChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/RingChart/Multiple Ring", priority = 51)]
|
||||
[MenuItem("GameObject/UI/XCharts/RingChart/Multiple Ring", priority = 51)]
|
||||
public static void AddRingChart_MultiRing()
|
||||
{
|
||||
var chart = AddChart<RingChart>("RingChart");
|
||||
chart.DefaultMultipleRingChart();
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/CandlestickChart/Candlestick", priority = 54)]
|
||||
[MenuItem("GameObject/UI/XCharts/CandlestickChart/Candlestick", priority = 54)]
|
||||
public static void CandlestickChart()
|
||||
{
|
||||
AddChart<CandlestickChart>("CandlestickChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/ParallelChart/Parallel", priority = 55)]
|
||||
[MenuItem("GameObject/UI/XCharts/ParallelChart/Parallel", priority = 55)]
|
||||
public static void ParallelChart()
|
||||
{
|
||||
AddChart<ParallelChart>("ParallelChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/SimplifiedChart/Line", priority = 56)]
|
||||
[MenuItem("GameObject/UI/XCharts/SimplifiedChart/Line", priority = 56)]
|
||||
public static void SimplifiedLineChart()
|
||||
{
|
||||
AddChart<SimplifiedLineChart>("SimplifiedLineChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/SimplifiedChart/Bar", priority = 57)]
|
||||
[MenuItem("GameObject/UI/XCharts/SimplifiedChart/Bar", priority = 57)]
|
||||
public static void SimplifiedBarChart()
|
||||
{
|
||||
AddChart<SimplifiedBarChart>("SimplifiedBarChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/SimplifiedChart/Candlestick", priority = 58)]
|
||||
[MenuItem("GameObject/UI/XCharts/SimplifiedChart/Candlestick", priority = 58)]
|
||||
public static void SimplifiedCandlestickChart()
|
||||
{
|
||||
AddChart<SimplifiedCandlestickChart>("SimplifiedCandlestickChart");
|
||||
}
|
||||
|
||||
[MenuItem("XCharts/Themes Reload")]
|
||||
public static void ReloadTheme()
|
||||
{
|
||||
XCThemeMgr.ReloadThemeList();
|
||||
}
|
||||
|
||||
#region Text mesh pro support
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
const string SYMBOL_TMP = "dUI_TextMeshPro";
|
||||
const string ASMDEF_TMP = "Unity.TextMeshPro";
|
||||
|
||||
#if !dUI_TextMeshPro
|
||||
[MenuItem("XCharts/TextMeshPro Enable")]
|
||||
#endif
|
||||
public static void EnableTextMeshPro()
|
||||
{
|
||||
if (!IsSpecifyAssemblyExist(ASMDEF_TMP))
|
||||
{
|
||||
Debug.LogError("TextMeshPro is not in the project, please import TextMeshPro package first.");
|
||||
return;
|
||||
}
|
||||
if (EditorUtility.DisplayDialog("TextMeshPro Enable", "TextMeshPro is disabled, do you want to enable it?", "Yes", "Cancel"))
|
||||
{
|
||||
DefineSymbolsUtil.AddGlobalDefine(SYMBOL_TMP);
|
||||
XChartsMgr.RemoveAllChartObject();
|
||||
CheckAsmdefTmpReference(true);
|
||||
}
|
||||
}
|
||||
|
||||
#if dUI_TextMeshPro
|
||||
[MenuItem("XCharts/TextMeshPro Disable")]
|
||||
#endif
|
||||
public static void DisableTextMeshPro()
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("TextMeshPro Disable", "TextMeshPro is enabled, do you want to disable it?", "Yes", "Cancel"))
|
||||
{
|
||||
CheckAsmdefTmpReference(false);
|
||||
DefineSymbolsUtil.RemoveGlobalDefine(SYMBOL_TMP);
|
||||
XChartsMgr.RemoveAllChartObject();
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckAsmdefTmpReference(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
InsertSpecifyReferenceIntoAssembly(Platform.Editor, ASMDEF_TMP);
|
||||
InsertSpecifyReferenceIntoAssembly(Platform.Runtime, ASMDEF_TMP);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveSpecifyReferenceFromAssembly(Platform.Editor, ASMDEF_TMP);
|
||||
RemoveSpecifyReferenceFromAssembly(Platform.Runtime, ASMDEF_TMP);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region InputSystem Support
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
//As InputSystem is released in 2019.1+ ,when unity version is 2019.1+ , enable InputSystem Support
|
||||
const string SYMBOL_I_S = "INPUT_SYSTEM_ENABLED";
|
||||
const string ASMDEF_I_S = "Unity.InputSystem";
|
||||
|
||||
#if !INPUT_SYSTEM_ENABLED
|
||||
[MenuItem("XCharts/InputSystem Enable")]
|
||||
#endif
|
||||
public static void EnableInputSystem()
|
||||
{
|
||||
if (!IsSpecifyAssemblyExist(ASMDEF_I_S))
|
||||
{
|
||||
Debug.LogError("InputSystem is not in the project, please import InputSystem package first.");
|
||||
return;
|
||||
}
|
||||
if (EditorUtility.DisplayDialog("InputSystem Enable", "InputSystem is disabled, do you want to enable it?", "Yes", "Cancel"))
|
||||
{
|
||||
CheckAsmdefInputSystemReference(true);
|
||||
DefineSymbolsUtil.AddGlobalDefine(SYMBOL_I_S);
|
||||
}
|
||||
}
|
||||
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
[MenuItem("XCharts/InputSystem Disable")]
|
||||
#endif
|
||||
public static void DisableInputSystem()
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("InputSystem Disable", "InputSystem is enabled, do you want to disable it?", "Yes", "Cancel"))
|
||||
{
|
||||
CheckAsmdefInputSystemReference(false);
|
||||
DefineSymbolsUtil.RemoveGlobalDefine(SYMBOL_I_S);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckAsmdefInputSystemReference(bool enable)
|
||||
{
|
||||
if(enable)
|
||||
{
|
||||
InsertSpecifyReferenceIntoAssembly(Platform.Editor, ASMDEF_I_S);
|
||||
InsertSpecifyReferenceIntoAssembly(Platform.Runtime, ASMDEF_I_S);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveSpecifyReferenceFromAssembly(Platform.Editor, ASMDEF_I_S);
|
||||
RemoveSpecifyReferenceFromAssembly(Platform.Runtime, ASMDEF_I_S);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region Assistant members
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
// as text mesh pro is released in 2017.1, so we may use these function and types in 2017.1 or later
|
||||
private static void InsertSpecifyReferenceIntoAssembly(Platform platform, string reference)
|
||||
{
|
||||
var file = GetPackageAssemblyDefinitionPath(platform);
|
||||
var content = File.ReadAllText(file);
|
||||
var data = new AssemblyDefinitionData();
|
||||
EditorJsonUtility.FromJsonOverwrite(content, data);
|
||||
if (!data.references.Contains(reference))
|
||||
{
|
||||
data.references.Add(reference);
|
||||
var json = EditorJsonUtility.ToJson(data, true);
|
||||
File.WriteAllText(file, json);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private static void RemoveSpecifyReferenceFromAssembly(Platform platform, string reference)
|
||||
{
|
||||
var file = GetPackageAssemblyDefinitionPath(platform);
|
||||
var content = File.ReadAllText(file);
|
||||
var data = new AssemblyDefinitionData();
|
||||
EditorJsonUtility.FromJsonOverwrite(content, data);
|
||||
if (data.references.Contains(reference))
|
||||
{
|
||||
data.references.Remove(reference);
|
||||
var json = EditorJsonUtility.ToJson(data, true);
|
||||
File.WriteAllText(file, json);
|
||||
}
|
||||
}
|
||||
|
||||
public enum Platform { Editor, Runtime }
|
||||
public static string GetPackageAssemblyDefinitionPath(Platform platform)
|
||||
{
|
||||
var p = platform == Platform.Editor ? "Editor" : "Runtime";
|
||||
var f = "XCharts." + p + ".asmdef";
|
||||
var sub = Path.Combine(p, f);
|
||||
string packagePath = Path.GetFullPath("Packages/com.monitor1394.xcharts");
|
||||
if (!Directory.Exists(packagePath))
|
||||
{
|
||||
packagePath = ADB.FindAssets("t:Script")
|
||||
.Where(v => Path.GetFileNameWithoutExtension(ADB.GUIDToAssetPath(v)) == "XChartsMgr")
|
||||
.Select(id => ADB.GUIDToAssetPath(id))
|
||||
.FirstOrDefault();
|
||||
packagePath = Path.GetDirectoryName(packagePath);
|
||||
packagePath = packagePath.Substring(0, packagePath.LastIndexOf("Runtime"));
|
||||
}
|
||||
return Path.Combine(packagePath, sub);
|
||||
}
|
||||
|
||||
public static bool IsSpecifyAssemblyExist(string name)
|
||||
{
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
foreach (var assembly in UnityEditor.Compilation.CompilationPipeline.GetAssemblies(UnityEditor.Compilation.AssembliesType.Player))
|
||||
{
|
||||
if (assembly.name.Equals(name)) return true;
|
||||
}
|
||||
#elif UNITY_2017_3_OR_NEWER
|
||||
foreach (var assembly in UnityEditor.Compilation.CompilationPipeline.GetAssemblies())
|
||||
{
|
||||
if (assembly.name.Equals(name)) return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class AssemblyDefinitionData
|
||||
{
|
||||
#pragma warning disable 649
|
||||
public string name;
|
||||
public List<string> references;
|
||||
public List<string> includePlatforms;
|
||||
public List<string> excludePlatforms;
|
||||
public bool allowUnsafeCode;
|
||||
public bool overrideReferences;
|
||||
public List<string> precompiledReferences;
|
||||
public bool autoReferenced;
|
||||
public List<string> defineConstraints;
|
||||
public List<string> versionDefines;
|
||||
public bool noEngineReferences;
|
||||
#pragma warning restore 649
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 941beb76fdaa64a27a2df6561893157e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user