海拔图和小地图
This commit is contained in:
1 parent
45801dff22
commit
c5bd9daba2
521 files changed
+1985033
-439
No files matched your search
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7c05fe198b1e46eabc5896450bf9cec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,155 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ChartModule), true)]
|
||||
internal class ChartModuleDrawer : PropertyDrawer
|
||||
{
|
||||
public class Styles
|
||||
{
|
||||
public static readonly GUIContent iconAdd = new GUIContent("+", "Add");
|
||||
public static readonly GUIContent iconRemove = new GUIContent("-", "Remove");
|
||||
public static readonly GUIContent iconUp = new GUIContent("↑", "Up");
|
||||
public static readonly GUIContent iconDown = new GUIContent("↓", "Down");
|
||||
public static readonly GUIStyle invisibleButton = "InvisibleButton";
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
var lastX = drawRect.x;
|
||||
var lastWid = drawRect.width;
|
||||
SerializedProperty m_Column = prop.FindPropertyRelative("m_Column");
|
||||
SerializedProperty m_Name = prop.FindPropertyRelative("m_Name");
|
||||
SerializedProperty m_SubName = prop.FindPropertyRelative("m_SubName");
|
||||
SerializedProperty m_Title = prop.FindPropertyRelative("m_Title");
|
||||
SerializedProperty m_Selected = prop.FindPropertyRelative("m_Selected");
|
||||
SerializedProperty m_Panel = prop.FindPropertyRelative("m_Panel");
|
||||
var fieldWid = EditorGUIUtility.currentViewWidth - 30 - 5 - 40 - 80 - 50 - 100 - 6 * 2 - 70;
|
||||
drawRect.width = 15;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var oldFlag = m_Selected.boolValue;
|
||||
EditorGUI.PropertyField(drawRect, m_Selected, GUIContent.none);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
var demo = prop.serializedObject.targetObject as Demo;
|
||||
var index = GetIndex(prop);
|
||||
var selectedIndex = demo.GetSelectedModule();
|
||||
if (selectedIndex != index)
|
||||
{
|
||||
for (int i = 0; i < demo.chartModules.Count; i++)
|
||||
{
|
||||
demo.chartModules[i].select = i == index && m_Selected.boolValue;
|
||||
}
|
||||
demo.InitModuleButton();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Selected.boolValue = oldFlag;
|
||||
}
|
||||
}
|
||||
drawRect.x += 17;
|
||||
drawRect.width = 80;
|
||||
EditorGUI.PropertyField(drawRect, m_Name, GUIContent.none);
|
||||
drawRect.x += 82;
|
||||
drawRect.width = 50;
|
||||
EditorGUI.PropertyField(drawRect, m_SubName, GUIContent.none);
|
||||
drawRect.x += 52;
|
||||
drawRect.width = fieldWid;
|
||||
EditorGUI.PropertyField(drawRect, m_Title, GUIContent.none);
|
||||
drawRect.x += fieldWid + 2;
|
||||
drawRect.width = 100;
|
||||
EditorGUI.PropertyField(drawRect, m_Panel, GUIContent.none);
|
||||
drawRect.x += 102;
|
||||
drawRect.width = 40;
|
||||
EditorGUI.PropertyField(drawRect, m_Column, GUIContent.none);
|
||||
|
||||
var btnWidth = 12;
|
||||
drawRect.x += 42;
|
||||
drawRect.width = btnWidth;
|
||||
if (GUI.Button(drawRect, Styles.iconUp, Styles.invisibleButton))
|
||||
{
|
||||
var demo = prop.serializedObject.targetObject as Demo;
|
||||
var index = GetIndex(prop);
|
||||
if (index >= 0)
|
||||
{
|
||||
Swap(demo.chartModules, index, index - 1);
|
||||
demo.InitModuleButton();
|
||||
}
|
||||
}
|
||||
drawRect.x += btnWidth + 1;
|
||||
if (GUI.Button(drawRect, Styles.iconDown, Styles.invisibleButton))
|
||||
{
|
||||
var demo = prop.serializedObject.targetObject as Demo;
|
||||
var index = GetIndex(prop);
|
||||
if (index >= 0)
|
||||
{
|
||||
Swap(demo.chartModules, index, index + 1);
|
||||
demo.InitModuleButton();
|
||||
}
|
||||
}
|
||||
drawRect.x += btnWidth + 1;
|
||||
if (GUI.Button(drawRect, Styles.iconAdd, Styles.invisibleButton))
|
||||
{
|
||||
var demo = prop.serializedObject.targetObject as Demo;
|
||||
var index = GetIndex(prop);
|
||||
if (index >= 0)
|
||||
{
|
||||
demo.chartModules.Insert(index + 1, new ChartModule());
|
||||
demo.InitModuleButton();
|
||||
}
|
||||
}
|
||||
drawRect.x += 16;
|
||||
if (GUI.Button(drawRect, Styles.iconRemove, Styles.invisibleButton))
|
||||
{
|
||||
var demo = prop.serializedObject.targetObject as Demo;
|
||||
var index = GetIndex(prop);
|
||||
if (index >= 0)
|
||||
{
|
||||
demo.chartModules.RemoveAt(index);
|
||||
demo.InitModuleButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
return 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
}
|
||||
|
||||
private int GetIndex(SerializedProperty prop)
|
||||
{
|
||||
int index = -1;
|
||||
var sindex = prop.propertyPath.LastIndexOf('[');
|
||||
var eindex = prop.propertyPath.LastIndexOf(']');
|
||||
if (sindex >= 0 && eindex >= 0)
|
||||
{
|
||||
var str = prop.propertyPath.Substring(sindex + 1, eindex - sindex - 1);
|
||||
int.TryParse(str, out index);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
private static bool Swap<T>(List<T> list, int index1, int index2)
|
||||
{
|
||||
if (index1 < 0 || index1 >= list.Count) return false;
|
||||
if (index2 < 0 || index2 >= list.Count) return false;
|
||||
var temp = list[index1];
|
||||
list[index1] = list[index2];
|
||||
list[index2] = temp;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fbbaed3e670f478c844c1bdfc73d433
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor class used to edit UI BaseChart.
|
||||
/// </summary>
|
||||
|
||||
[CustomEditor(typeof(Demo), false)]
|
||||
internal class DemoEditor : Editor
|
||||
{
|
||||
protected Demo m_Target;
|
||||
protected SerializedProperty m_Script;
|
||||
protected SerializedProperty m_LeftWidth;
|
||||
protected SerializedProperty m_LeftButtonHeight;
|
||||
protected SerializedProperty m_ChartSpacing;
|
||||
protected SerializedProperty m_ChartSizeRatio;
|
||||
protected SerializedProperty m_ButtonNormalColor;
|
||||
protected SerializedProperty m_ButtonSelectedColor;
|
||||
protected SerializedProperty m_ButtonHighlightColor;
|
||||
protected SerializedProperty m_ChartModule;
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
m_Target = (Demo)target;
|
||||
m_Script = serializedObject.FindProperty("m_Script");
|
||||
m_LeftWidth = serializedObject.FindProperty("m_LeftWidth");
|
||||
m_ChartSpacing = serializedObject.FindProperty("m_ChartSpacing");
|
||||
m_ChartSizeRatio = serializedObject.FindProperty("m_ChartSizeRatio");
|
||||
m_LeftButtonHeight = serializedObject.FindProperty("m_LeftButtonHeight");
|
||||
m_ButtonNormalColor = serializedObject.FindProperty("m_ButtonNormalColor");
|
||||
m_ButtonSelectedColor = serializedObject.FindProperty("m_ButtonSelectedColor");
|
||||
m_ButtonHighlightColor = serializedObject.FindProperty("m_ButtonHighlightColor");
|
||||
m_ChartModule = serializedObject.FindProperty("m_ChartModule");
|
||||
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
if (m_Target == null && target == null)
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
return;
|
||||
}
|
||||
serializedObject.Update();
|
||||
EditorGUILayout.PropertyField(m_LeftWidth);
|
||||
EditorGUILayout.PropertyField(m_LeftButtonHeight);
|
||||
EditorGUILayout.PropertyField(m_ChartSpacing);
|
||||
EditorGUILayout.PropertyField(m_ChartSizeRatio);
|
||||
EditorGUILayout.PropertyField(m_ButtonNormalColor);
|
||||
EditorGUILayout.PropertyField(m_ButtonSelectedColor);
|
||||
EditorGUILayout.PropertyField(m_ButtonHighlightColor);
|
||||
|
||||
var size = m_ChartModule.arraySize;
|
||||
size = EditorGUILayout.IntField("Chart Module Size", size);
|
||||
if (size != m_ChartModule.arraySize)
|
||||
{
|
||||
while (size > m_ChartModule.arraySize) m_ChartModule.arraySize++;
|
||||
while (size < m_ChartModule.arraySize) m_ChartModule.arraySize--;
|
||||
}
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
EditorGUILayout.PropertyField(m_ChartModule.GetArrayElementAtIndex(i));
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90c1787bea03849c8b6d19be625b7e17
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a51c10c0ca30408fba6f8e59145ce69
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,282 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XCharts;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
[System.Serializable]
|
||||
public class ChartModule
|
||||
{
|
||||
[SerializeField] private string m_Name = "Name";
|
||||
[SerializeField] private string m_SubName = "SubName";
|
||||
[SerializeField] private int m_Column = 3;
|
||||
|
||||
[SerializeField] private string m_Title = "Title";
|
||||
[SerializeField] private bool m_Selected;
|
||||
[SerializeField] private GameObject m_Panel;
|
||||
|
||||
public int column { get { return m_Column; } set { m_Column = value; } }
|
||||
public string name { get { return m_Name; } set { m_Name = value; } }
|
||||
public string subName { get { return m_SubName; } set { m_SubName = value; } }
|
||||
public string title { get { return m_Title; } set { m_Title = value; } }
|
||||
public bool select { get { return m_Selected; } set { m_Selected = value; } }
|
||||
public GameObject panel { get { return m_Panel; } set { m_Panel = value; } }
|
||||
public Button button { get; set; }
|
||||
public int index { get; internal set; }
|
||||
}
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
public class Demo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private float m_LeftWidth = 150;
|
||||
[SerializeField] private float m_LeftButtonHeight = 60;
|
||||
[SerializeField] private Vector2 m_ChartSpacing = new Vector2(5, 5);
|
||||
[SerializeField] private Vector2 m_ChartSizeRatio = new Vector2(5, 3);
|
||||
[SerializeField] private Color m_ButtonNormalColor;
|
||||
[SerializeField] private Color m_ButtonSelectedColor;
|
||||
[SerializeField] private Color m_ButtonHighlightColor;
|
||||
[SerializeField] public int lastSelectedModuleIndex = -1;
|
||||
[SerializeField] private List<ChartModule> m_ChartModule = new List<ChartModule>();
|
||||
|
||||
private GameObject m_BtnClone;
|
||||
private Theme m_SelectedTheme;
|
||||
private int m_LastSelectedModuleIndex;
|
||||
private float m_LastCheckLeftWidth;
|
||||
|
||||
private Button m_DefaultThemeButton;
|
||||
private Button m_LightThemeButton;
|
||||
private Button m_DarkThemeButton;
|
||||
|
||||
private Text m_Title;
|
||||
|
||||
private ScrollRect m_ScrollRect;
|
||||
private Mask m_Mark;
|
||||
|
||||
public List<ChartModule> chartModules { get { return m_ChartModule; } }
|
||||
|
||||
void Awake()
|
||||
{
|
||||
m_SelectedTheme = Theme.Default;
|
||||
|
||||
m_ButtonNormalColor = ChartHelper.GetColor("#293C55FF");
|
||||
m_ButtonSelectedColor = ChartHelper.GetColor("#e43c59ff");
|
||||
m_ButtonHighlightColor = ChartHelper.GetColor("#0E151FFF");
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_ScrollRect = transform.Find("chart_detail").GetComponent<ScrollRect>();
|
||||
m_Mark = transform.Find("chart_detail/Viewport").GetComponent<Mask>();
|
||||
m_Mark.enabled = true;
|
||||
m_Title = transform.Find("chart_title/Text").GetComponent<Text>();
|
||||
InitThemeButton();
|
||||
InitModuleButton();
|
||||
|
||||
InitSize();
|
||||
}
|
||||
|
||||
void InitSize()
|
||||
{
|
||||
UIUtil.SetRectTransformWidth(transform, m_LeftWidth, "chart_list");
|
||||
UIUtil.SetRectTransformLeft(transform, m_LeftWidth, "chart_detail");
|
||||
UIUtil.SetRectTransformLeft(transform, m_LeftWidth, "chart_title");
|
||||
UIUtil.SetGridLayoutGroup(transform, new Vector2(m_LeftWidth, m_LeftButtonHeight), new Vector2(0, 2), "chart_list");
|
||||
foreach (var module in m_ChartModule)
|
||||
{
|
||||
SetChartRootInfo(module);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetChartGridLayoutGroup(GridLayoutGroup grid, int column)
|
||||
{
|
||||
if (grid == null) return;
|
||||
var screenWidth = Screen.width;
|
||||
var screenHeight = Screen.height;
|
||||
#if UNITY_EDITOR
|
||||
screenWidth = Camera.main.pixelWidth;
|
||||
#endif
|
||||
var chartWidth = (screenWidth - m_LeftWidth - m_ChartSpacing.x * (column + 1)) / column;
|
||||
|
||||
var rect = grid.gameObject.GetComponent<RectTransform>();
|
||||
rect.anchorMin = new Vector2(0, 1);
|
||||
rect.anchorMax = new Vector2(1, 1);
|
||||
rect.pivot = new Vector2(0, 1);
|
||||
rect.anchoredPosition = Vector2.zero;
|
||||
rect.sizeDelta = new Vector2(0, rect.sizeDelta.y);
|
||||
grid.spacing = m_ChartSpacing;
|
||||
grid.cellSize = new Vector2(chartWidth, chartWidth * m_ChartSizeRatio.y / m_ChartSizeRatio.x);
|
||||
}
|
||||
|
||||
private void SetChartRootInfo(ChartModule module)
|
||||
{
|
||||
var chartRoot = module.panel;
|
||||
if (chartRoot == null) return;
|
||||
var grid = chartRoot.GetComponent<GridLayoutGroup>();
|
||||
var hig = Mathf.CeilToInt(chartRoot.transform.childCount * 1f / module.column) * (grid.cellSize.y + grid.spacing.y);
|
||||
SetChartGridLayoutGroup(grid, module.column);
|
||||
UIUtil.SetRectTransformHeight(chartRoot.transform, hig);
|
||||
}
|
||||
|
||||
void ResetParam()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.RemoveChartObject();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (m_ChartModule.Count <= 0) return;
|
||||
if (!Application.isPlaying) m_Mark.enabled = false;
|
||||
|
||||
if (m_LastCheckLeftWidth != m_LeftWidth)
|
||||
{
|
||||
m_LastCheckLeftWidth = m_LeftWidth;
|
||||
InitSize();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public int GetSelectedModule()
|
||||
{
|
||||
for (int i = 0; i < m_ChartModule.Count; i++)
|
||||
{
|
||||
if (m_ChartModule[i].select) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void InitModuleButton()
|
||||
{
|
||||
var btnPanel = transform.Find("chart_list");
|
||||
m_BtnClone = transform.Find("btn_clone").gameObject;
|
||||
m_BtnClone.SetActive(false);
|
||||
ChartHelper.DestroyAllChildren(btnPanel.transform);
|
||||
for (int i = 0; i < m_ChartModule.Count; i++)
|
||||
{
|
||||
var module = m_ChartModule[i];
|
||||
module.index = i;
|
||||
var btnName = "btn_" + module.name;
|
||||
GameObject btn;
|
||||
if (btnPanel.Find(btnName))
|
||||
{
|
||||
btn = btnPanel.Find(btnName).gameObject;
|
||||
btn.name = btnName;
|
||||
ChartHelper.SetActive(btn, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
btn = GameObject.Instantiate(m_BtnClone);
|
||||
btn.SetActive(true);
|
||||
btn.name = btnName;
|
||||
btn.transform.SetParent(btnPanel);
|
||||
btn.transform.localPosition = Vector3.zero;
|
||||
}
|
||||
btn.transform.localScale = Vector3.one;
|
||||
module.button = btn.GetComponent<Button>();
|
||||
module.button.transform.Find("Text").GetComponent<Text>().text = module.name.Replace("\\n", "\n");
|
||||
module.button.transform.Find("SubText").GetComponent<Text>().text = module.subName.Replace("\\n", "\n");
|
||||
|
||||
ChartHelper.ClearEventListener(btn.gameObject);
|
||||
ChartHelper.AddEventListener(btn.gameObject, EventTriggerType.PointerDown, (data) =>
|
||||
{
|
||||
ClickModule(module);
|
||||
});
|
||||
}
|
||||
for (int i = 0; i < m_ChartModule.Count; i++)
|
||||
{
|
||||
var module = m_ChartModule[i];
|
||||
module.index = i;
|
||||
if (module.select)
|
||||
{
|
||||
ClickModule(module);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClickModule(ChartModule selectedModule)
|
||||
{
|
||||
if (lastSelectedModuleIndex >= 0)
|
||||
{
|
||||
m_ChartModule[lastSelectedModuleIndex].select = false;
|
||||
}
|
||||
lastSelectedModuleIndex = selectedModule.index;
|
||||
foreach (var module in m_ChartModule)
|
||||
{
|
||||
if (module.index != lastSelectedModuleIndex)
|
||||
{
|
||||
var block = module.button.colors;
|
||||
block.highlightedColor = m_ButtonHighlightColor;
|
||||
block.selectedColor = m_ButtonNormalColor;
|
||||
block.normalColor = m_ButtonNormalColor;
|
||||
module.button.colors = block;
|
||||
if (module.panel != null)
|
||||
module.panel.SetActive(false);
|
||||
//module.select = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var block = module.button.colors;
|
||||
block.highlightedColor = m_ButtonSelectedColor;
|
||||
block.selectedColor = m_ButtonSelectedColor;
|
||||
block.normalColor = m_ButtonSelectedColor;
|
||||
module.button.colors = block;
|
||||
if (module.panel != null)
|
||||
module.panel.SetActive(true);
|
||||
// module.select = true;
|
||||
}
|
||||
}
|
||||
if (selectedModule.panel != null)
|
||||
m_ScrollRect.content = selectedModule.panel.GetComponent<RectTransform>();
|
||||
SetChartRootInfo(selectedModule);
|
||||
m_Title.text = string.IsNullOrEmpty(selectedModule.title) ?
|
||||
selectedModule.name : selectedModule.title;
|
||||
}
|
||||
|
||||
void InitThemeButton()
|
||||
{
|
||||
m_DefaultThemeButton = transform.Find("chart_theme/btn_default").GetComponent<Button>();
|
||||
m_LightThemeButton = transform.Find("chart_theme/btn_light").GetComponent<Button>();
|
||||
m_DarkThemeButton = transform.Find("chart_theme/btn_dark").GetComponent<Button>();
|
||||
|
||||
m_DefaultThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Default);
|
||||
m_LightThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Light);
|
||||
m_DarkThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Dark);
|
||||
|
||||
m_DefaultThemeButton.onClick.AddListener(delegate () { SelecteTheme(Theme.Default); });
|
||||
m_LightThemeButton.onClick.AddListener(delegate () { SelecteTheme(Theme.Light); });
|
||||
m_DarkThemeButton.onClick.AddListener(delegate () { SelecteTheme(Theme.Dark); });
|
||||
|
||||
//SelecteTheme(Theme.Default);
|
||||
}
|
||||
|
||||
void SelecteTheme(Theme theme)
|
||||
{
|
||||
m_SelectedTheme = theme;
|
||||
m_DefaultThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Default);
|
||||
m_LightThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Light);
|
||||
m_DarkThemeButton.transform.Find("selected").gameObject.SetActive(m_SelectedTheme == Theme.Dark);
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.UpdateTheme(theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f81ca580204024b8db33b4646c549c4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,185 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using XCharts;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
internal class Demo_Animation : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int m_FadeInDuration = 1000;
|
||||
[SerializeField] private int m_FadeOutDuration = 1000;
|
||||
[SerializeField] private int m_DataChangeDuration = 500;
|
||||
void Awake()
|
||||
{
|
||||
InitCharts();
|
||||
TryInitButton("buttons/btnFadeIn", AnimationFadeIn);
|
||||
TryInitButton("buttons/btnFadeOut", AnimationFadeOut);
|
||||
TryInitButton("buttons/btnDataAdd", AnimationDataAdd);
|
||||
TryInitButton("buttons/btnDataChange", AnimationDataChange);
|
||||
TryInitButton("buttons/btnPause", AnimationPause);
|
||||
TryInitButton("buttons/btnResume", AnimationResume);
|
||||
TryInitButton("buttons/btnReset", AnimationReset);
|
||||
}
|
||||
|
||||
void InitCharts()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeInDuration = m_FadeInDuration;
|
||||
serie.animation.fadeOutDuration = m_FadeOutDuration;
|
||||
serie.animation.dataChangeDuration = m_DataChangeDuration;
|
||||
}
|
||||
}
|
||||
SetInputField("settings/fadeIn/InputField", m_FadeInDuration, OnFadeInDurationChanged);
|
||||
SetInputField("settings/fadeOut/InputField", m_FadeOutDuration, OnFadeOutDurationChanged);
|
||||
SetInputField("settings/dataChange/InputField", m_DataChangeDuration, OnDataChangeDurationChanged);
|
||||
}
|
||||
|
||||
void SetInputField(string path, int value, UnityAction<string> act)
|
||||
{
|
||||
var input = transform.Find(path).gameObject.GetComponent<InputField>();
|
||||
input.onEndEdit.AddListener(act);
|
||||
input.text = value.ToString();
|
||||
}
|
||||
|
||||
Button TryInitButton(string name, UnityAction act)
|
||||
{
|
||||
var trans = transform.Find(name);
|
||||
if (trans)
|
||||
{
|
||||
var btn = trans.gameObject.GetComponent<Button>();
|
||||
btn.onClick.AddListener(act);
|
||||
return btn;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationFadeIn()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationFadeOut()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeOut();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationDataAdd()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationFadeOut();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationDataChange()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
if (chart is RingChart)
|
||||
{
|
||||
var serieData = chart.series.GetSerie(0).GetSerieData(0);
|
||||
chart.UpdateData(0, 0, 0, Random.Range(0, serieData.GetData(1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
var dataCount = chart.series.list[0].dataCount;
|
||||
var index = UnityEngine.Random.Range(0, dataCount);
|
||||
chart.UpdateData(0, index, UnityEngine.Random.Range(1, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationPause()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationPause();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationResume()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationResume();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationReset()
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
chart.AnimationReset();
|
||||
}
|
||||
}
|
||||
|
||||
void OnFadeInDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_FadeInDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeInDuration = m_FadeInDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnFadeOutDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_FadeOutDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.fadeOutDuration = m_FadeOutDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDataChangeDurationChanged(string content)
|
||||
{
|
||||
var charts = transform.GetComponentsInChildren<BaseChart>();
|
||||
m_DataChangeDuration = int.Parse(content);
|
||||
foreach (var chart in charts)
|
||||
{
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
serie.animation.dataChangeDuration = m_DataChangeDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13a697cc1196d43fdb8f329026a721e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,131 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using XCharts;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[ExecuteInEditMode]
|
||||
internal class Demo_Performance : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private float fps = 0;
|
||||
[SerializeField] private int m_MaxCacheDataNumber = 3000;
|
||||
|
||||
private const float INTERVAL = 0.2f;
|
||||
private int frameCount = 0;
|
||||
private float lastTime = 0f;
|
||||
private int initCount = 0;
|
||||
private System.DateTime timeNow;
|
||||
|
||||
private LineChart fpsChart;
|
||||
private LineChart lineChart;
|
||||
private BarChart barChart;
|
||||
private Text fpsText;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
fpsChart = transform.Find("fps/FpsChart").gameObject.GetComponent<LineChart>();
|
||||
lineChart = transform.Find("charts/LineChart").gameObject.GetComponent<LineChart>();
|
||||
barChart = transform.Find("charts/BarChart").gameObject.GetComponent<BarChart>();
|
||||
fpsText = transform.Find("settings/txtFps").gameObject.GetComponent<Text>();
|
||||
fpsChart.ClearData();
|
||||
lineChart.ClearData();
|
||||
barChart.ClearData();
|
||||
InitCharts();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
lastTime = Time.realtimeSinceStartup;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
frameCount++;
|
||||
if (initCount < m_MaxCacheDataNumber)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
initCount++;
|
||||
if (initCount > m_MaxCacheDataNumber) break;
|
||||
AddOneData();
|
||||
}
|
||||
}
|
||||
if (Time.realtimeSinceStartup - lastTime >= INTERVAL)
|
||||
{
|
||||
fps = frameCount / (Time.realtimeSinceStartup - lastTime);
|
||||
frameCount = 0;
|
||||
lastTime = Time.realtimeSinceStartup;
|
||||
fpsChart.AddData(0, fps);
|
||||
fpsChart.AddXAxisData(Time.frameCount.ToString());
|
||||
fpsText.text = string.Format("FPS:{0:f1}", fps);
|
||||
if (initCount >= m_MaxCacheDataNumber)
|
||||
{
|
||||
AddOneData();
|
||||
initCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AddOneData()
|
||||
{
|
||||
lineChart.title.text = initCount + "数据";
|
||||
barChart.title.text = initCount + "数据";
|
||||
timeNow = timeNow.AddSeconds(1);
|
||||
string category = timeNow.ToString("hh:mm:ss");
|
||||
float xvalue = Mathf.PI / 180 * initCount;
|
||||
float yvalue = 15 + Mathf.Sin(xvalue) * 2;
|
||||
|
||||
lineChart.AddData(0, yvalue);
|
||||
lineChart.AddXAxisData(category);
|
||||
barChart.AddData(0, yvalue);
|
||||
barChart.AddXAxisData(category);
|
||||
}
|
||||
|
||||
void InitCharts()
|
||||
{
|
||||
fpsChart.SetMaxCache(1000);
|
||||
lineChart.SetMaxCache(m_MaxCacheDataNumber);
|
||||
barChart.SetMaxCache(m_MaxCacheDataNumber);
|
||||
SetInputField("settings/fadeIn/InputField", m_MaxCacheDataNumber, OnFadeInDurationChanged);
|
||||
}
|
||||
|
||||
void SetInputField(string path, int value, UnityAction<string> act)
|
||||
{
|
||||
var input = transform.Find(path).gameObject.GetComponent<InputField>();
|
||||
input.onEndEdit.AddListener(act);
|
||||
input.text = value.ToString();
|
||||
}
|
||||
|
||||
Button TryInitButton(string name, UnityAction act)
|
||||
{
|
||||
var trans = transform.Find(name);
|
||||
if (trans)
|
||||
{
|
||||
var btn = trans.gameObject.GetComponent<Button>();
|
||||
btn.onClick.AddListener(act);
|
||||
return btn;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnFadeInDurationChanged(string content)
|
||||
{
|
||||
m_MaxCacheDataNumber = int.Parse(content);
|
||||
lineChart.SetMaxCache(m_MaxCacheDataNumber);
|
||||
barChart.SetMaxCache(m_MaxCacheDataNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9d68a9ea64234d42af215ee70dd20af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,74 @@
|
||||
/************************************************/
|
||||
/* */
|
||||
/* Copyright (c) 2018 - 2021 monitor1394 */
|
||||
/* https://github.com/monitor1394 */
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XChartsDemo
|
||||
{
|
||||
internal static class UIUtil
|
||||
{
|
||||
|
||||
public static RectTransform GetRectTransform(Transform transform, string path)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
transform = transform.Find(path);
|
||||
}
|
||||
if (transform != null)
|
||||
{
|
||||
return transform.gameObject.GetComponent<RectTransform>();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static void SetRectTransformWidth(Transform transform, float width, string path = null)
|
||||
{
|
||||
var rect = GetRectTransform(transform, path);
|
||||
if (rect != null)
|
||||
{
|
||||
rect.sizeDelta = new Vector2(width, rect.sizeDelta.y);
|
||||
}
|
||||
}
|
||||
public static void SetRectTransformHeight(Transform transform, float height, string path = null)
|
||||
{
|
||||
var rect = GetRectTransform(transform, path);
|
||||
if (rect != null)
|
||||
{
|
||||
rect.sizeDelta = new Vector2(rect.sizeDelta.x, height);
|
||||
}
|
||||
}
|
||||
public static void SetRectTransformLeft(Transform transform, float width, string path = null)
|
||||
{
|
||||
var rect = GetRectTransform(transform, path);
|
||||
if (rect != null)
|
||||
{
|
||||
rect.anchoredPosition = new Vector2(width, rect.anchoredPosition.y);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetGridLayoutGroup(Transform transform, Vector2 cellSize, Vector2 spacing, string path = null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
transform = transform.Find(path);
|
||||
}
|
||||
if (transform != null)
|
||||
{
|
||||
var com = transform.gameObject.GetComponent<GridLayoutGroup>();
|
||||
if (com != null)
|
||||
{
|
||||
com.cellSize = cellSize;
|
||||
com.spacing = spacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("SetGridLayoutGroupSize ERROR:can't find GridLayoutGroup: " + (transform.name + "/" + path));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c48d683ad65245e7838578f46c55202
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,536 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &69708543
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 69708547}
|
||||
- component: {fileID: 69708546}
|
||||
- component: {fileID: 69708545}
|
||||
- component: {fileID: 69708544}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &69708544
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 69708543}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &69708545
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 69708543}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &69708546
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 69708543}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &69708547
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 69708543}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &98970907
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 98970910}
|
||||
- component: {fileID: 98970909}
|
||||
- component: {fileID: 98970908}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &98970908
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 98970907}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &98970909
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 98970907}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 5
|
||||
--- !u!4 &98970910
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 98970907}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1221971497
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1221971498}
|
||||
- component: {fileID: 1221971500}
|
||||
- component: {fileID: 1221971499}
|
||||
m_Layer: 5
|
||||
m_Name: ugl
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1221971498
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221971497}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1981203670}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 500, y: 500}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1221971499
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221971497}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e8a87ea5df031473da3eb5fb8f57e20a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!222 &1221971500
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221971497}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1849247238
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1849247240}
|
||||
- component: {fileID: 1849247239}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1849247239
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1849247238}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.802082
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1849247240
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1849247238}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1981203666
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1981203670}
|
||||
- component: {fileID: 1981203669}
|
||||
- component: {fileID: 1981203668}
|
||||
- component: {fileID: 1981203667}
|
||||
m_Layer: 0
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1981203667
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1981203666}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1981203668
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1981203666}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1981203669
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1981203666}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 69708546}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1981203670
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1981203666}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1221971498}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b8f38ab97f854badb87b43f638e5290
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8890fea0a5384d328f22e9738289cc9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5adbd6df9174d6943b7eb8d23651ffd1
|
||||
timeCreated: 1553641950
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97265b476acdc465999cb5dd2631950d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user