graph chart引入&骑行结果弹窗
This commit is contained in:
1 parent
40d118cea3
commit
96f3644b5b
2374 files changed
+485161
-2410
No files matched your search
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32578c1a672aa5c44bdd3d005e4adff1
|
||||
folderAsset: yes
|
||||
timeCreated: 1505898578
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,408 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[CustomEditor(typeof(CandleChart), true)]
|
||||
class CandleChartInspector : Editor
|
||||
{
|
||||
bool mCategories = false;
|
||||
string mCategoryError = null;
|
||||
string mNewCategoryName = "";
|
||||
GUIStyle mRedStyle;
|
||||
GUIStyle mBold;
|
||||
HashSet<string> mAllNames = new HashSet<string>();
|
||||
GUIStyle mSplitter;
|
||||
List<int> mToRemove = new List<int>();
|
||||
List<int> mToUp = new List<int>();
|
||||
Dictionary<string, string> mOperations = new Dictionary<string, string>();
|
||||
ChartDataEditor mWindow;
|
||||
Texture mSettings;
|
||||
|
||||
RenameWindow mRenameWindow = null;
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
mRedStyle = new GUIStyle();
|
||||
mRedStyle.normal.textColor = Color.red;
|
||||
|
||||
mSplitter = new GUIStyle();
|
||||
mSplitter.normal.background = EditorGUIUtility.whiteTexture;
|
||||
mSplitter.stretchWidth = true;
|
||||
mSplitter.margin = new RectOffset(0, 0, 7, 7);
|
||||
}
|
||||
|
||||
public void Splitter()
|
||||
{
|
||||
Rect position = GUILayoutUtility.GetRect(GUIContent.none, mSplitter, GUILayout.Height(1f));
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Color restoreColor = GUI.color;
|
||||
GUI.color = new Color(0.5f, 0.5f, 0.5f);
|
||||
mSplitter.Draw(position, false, false, false, false);
|
||||
GUI.color = restoreColor;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsAlphaNum(string str)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
if (!(char.IsLetter(str[i])) && (!(char.IsNumber(str[i]))) && str[i] != ' ')
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void DoOperations(SerializedProperty items, int size, string type)
|
||||
{
|
||||
mToRemove.Clear();
|
||||
mToUp.Clear();
|
||||
bool up = false;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
SerializedProperty entry = items.GetArrayElementAtIndex(i);
|
||||
if (entry == null)
|
||||
continue;
|
||||
SerializedProperty nameProp = entry.FindPropertyRelative("Name");
|
||||
string name = null;
|
||||
if (nameProp == null)
|
||||
name = entry.stringValue;
|
||||
else
|
||||
name = nameProp.stringValue;
|
||||
|
||||
string arg = type + "|" + name;
|
||||
string res = null;
|
||||
|
||||
if (up == true)
|
||||
{
|
||||
mToUp.Add(i);
|
||||
up = false;
|
||||
}
|
||||
|
||||
if (mOperations.TryGetValue(arg, out res))
|
||||
{
|
||||
if (res == "remove")
|
||||
mToRemove.Add(i);
|
||||
if (res == "up" && i > 0)
|
||||
mToUp.Add(i);
|
||||
if (res == "down")
|
||||
up = true;
|
||||
mOperations.Remove(arg);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < mToRemove.Count; i++)
|
||||
{
|
||||
items.DeleteArrayElementAtIndex(mToRemove[i]);
|
||||
}
|
||||
for (int i = 0; i < mToUp.Count; i++)
|
||||
{
|
||||
int cur = mToUp[i];
|
||||
items.MoveArrayElement(cur, cur - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void CandleSettings(SerializedProperty item)
|
||||
{
|
||||
SerializedProperty entry = item.Copy();
|
||||
EditorGUILayout.LabelField(entry.name);
|
||||
EditorGUI.indentLevel++;
|
||||
SerializedProperty end = entry.GetEndProperty(true);
|
||||
entry.Next(true);
|
||||
if (SerializedProperty.EqualContents(entry, end) == false)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (target is CandleChart) // canvas graph chart
|
||||
{
|
||||
if ((entry.name == "CandlePrefab"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entry.name == "CandleHoverPrefab")
|
||||
continue;
|
||||
}
|
||||
EditorGUILayout.PropertyField(entry, true);
|
||||
}
|
||||
while (entry.Next(false) && SerializedProperty.EqualContents(entry, end) == false);
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
private void NamedItemEditor(SerializedProperty data, string type, string property, string caption, ref string errorMessage, ref bool foldout, ref string newName)
|
||||
{
|
||||
SerializedProperty items = data.FindPropertyRelative(property);
|
||||
items.isExpanded = EditorGUILayout.Foldout(items.isExpanded, caption);
|
||||
//bool up, down;
|
||||
mAllNames.Clear();
|
||||
int size = items.arraySize;
|
||||
if (Event.current.type == EventType.Layout)
|
||||
DoOperations(items, size, type);
|
||||
size = items.arraySize;
|
||||
if (items.isExpanded)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
SerializedProperty entry = items.GetArrayElementAtIndex(i);
|
||||
if (entry == null)
|
||||
continue;
|
||||
|
||||
SerializedProperty nameProp = entry.FindPropertyRelative("Name");
|
||||
string name = null;
|
||||
if (nameProp == null)
|
||||
name = entry.stringValue;
|
||||
else
|
||||
name = nameProp.stringValue;
|
||||
mAllNames.Add(name);
|
||||
bool toogle = false;
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (nameProp != null)
|
||||
toogle = entry.isExpanded = EditorGUILayout.Foldout(entry.isExpanded, name);
|
||||
else
|
||||
{
|
||||
toogle = false;
|
||||
EditorGUILayout.LabelField(name);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button("..."))
|
||||
DoContext(type, name);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
if (toogle)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if (nameProp != null)
|
||||
{
|
||||
SerializedProperty end = entry.GetEndProperty(true);
|
||||
entry.Next(true);
|
||||
if (SerializedProperty.EqualContents(entry, end) == false)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (entry.name != "Name" && entry.name != "Data")
|
||||
{
|
||||
if (target is CandleChart) // canvas graph chart
|
||||
{
|
||||
if ((entry.name == "LinePrefab") || (entry.name == "FillPrefab") || (entry.name == "DotPrefab") || (entry.name == "Depth"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((entry.name == "LineHoverPrefab") || (entry.name == "PointHoverPrefab"))
|
||||
continue;
|
||||
}
|
||||
if (entry.name == "UpCandle" || entry.name == "DownCandle")
|
||||
CandleSettings(entry);
|
||||
else
|
||||
EditorGUILayout.PropertyField(entry, true);
|
||||
}
|
||||
}
|
||||
while (entry.Next(false) && SerializedProperty.EqualContents(entry, end) == false);
|
||||
}
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessage != null)
|
||||
EditorGUILayout.LabelField(errorMessage, mRedStyle);
|
||||
EditorGUILayout.LabelField(string.Format("Add new {0} :", type));
|
||||
//Rect indentAdd = EditorGUI.IndentedRect(new Rect(0f, 0f, 1000f, 1000f));
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
newName = EditorGUILayout.TextField(newName);
|
||||
//GUILayout.Space(indentAdd.xMin);
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
bool error = false;
|
||||
if (newName.Trim().Length == 0)
|
||||
{
|
||||
errorMessage = "Name can't be empty";
|
||||
error = true;
|
||||
}
|
||||
else if (IsAlphaNum(newName) == false)
|
||||
{
|
||||
errorMessage = "Name conatins invalid characters";
|
||||
error = true;
|
||||
}
|
||||
else if (mAllNames.Contains(newName))
|
||||
{
|
||||
errorMessage = string.Format("A {0} named {1} already exists in this chart", type, newName);
|
||||
error = true;
|
||||
}
|
||||
if (error == false)
|
||||
{
|
||||
errorMessage = null;
|
||||
items.InsertArrayElementAtIndex(size);
|
||||
SerializedProperty newItem = items.GetArrayElementAtIndex(size);
|
||||
SerializedProperty newItemName = newItem.FindPropertyRelative("Name");
|
||||
if (newItemName == null)
|
||||
newItem.stringValue = newName;
|
||||
else
|
||||
newItemName.stringValue = newName;
|
||||
newName = "";
|
||||
UpdateWindow();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = null;
|
||||
}
|
||||
UpdateWindow();
|
||||
}
|
||||
void callback(object val)
|
||||
{
|
||||
KeyValuePair<string, string> pair = (KeyValuePair<string, string>)val;
|
||||
mOperations[pair.Key] = pair.Value;
|
||||
}
|
||||
bool RenameCategory(string oldName, string newName)
|
||||
{
|
||||
CandleChart graph = (CandleChart)serializedObject.targetObject;
|
||||
try
|
||||
{
|
||||
graph.DataSource.RenameCategory(oldName, newName);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
serializedObject.Update();
|
||||
if (graph.gameObject.activeInHierarchy)
|
||||
graph.GenerateChart();
|
||||
else
|
||||
EditorUtility.SetDirty(graph);
|
||||
return true;
|
||||
}
|
||||
void RenameCalled(object val)
|
||||
{
|
||||
var data = (KeyValuePair<string, string>)val;
|
||||
RenameWindow window = EditorWindow.GetWindow<RenameWindow>();
|
||||
mRenameWindow = window;
|
||||
window.ShowDialog(data.Value, data.Key, RenameCategory);
|
||||
}
|
||||
void DoContext(string type, string name)
|
||||
{
|
||||
string arg = type + "|" + name;
|
||||
GenericMenu menu = new GenericMenu();
|
||||
menu.AddItem(new GUIContent("Move Up"), false, callback, new KeyValuePair<string, string>(arg, "up"));
|
||||
menu.AddItem(new GUIContent("Move Down"), false, callback, new KeyValuePair<string, string>(arg, "down"));
|
||||
menu.AddItem(new GUIContent("Remove"), false, callback, new KeyValuePair<string, string>(arg, "remove"));
|
||||
menu.AddItem(new GUIContent("Rename.."), false, RenameCalled, new KeyValuePair<string, string>(type, name));
|
||||
menu.ShowAsContext();
|
||||
}
|
||||
void UpdateWindow()
|
||||
{
|
||||
}
|
||||
void OnDisable()
|
||||
{
|
||||
if (mRenameWindow != null)
|
||||
{
|
||||
mRenameWindow.Close();
|
||||
mRenameWindow = null;
|
||||
}
|
||||
if (mWindow != null)
|
||||
{
|
||||
mWindow.Close();
|
||||
mWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
SerializedProperty autoScrollHorizontally = serializedObject.FindProperty("autoScrollHorizontally");
|
||||
SerializedProperty horizontalScrolling = serializedObject.FindProperty("horizontalScrolling");
|
||||
SerializedProperty autoScrollVertically = serializedObject.FindProperty("autoScrollVertically");
|
||||
SerializedProperty verticalScrolling = serializedObject.FindProperty("verticalScrolling");
|
||||
// SerializedProperty scrollable = serializedObject.FindProperty("scrollable");
|
||||
// EditorGUILayout.PropertyField(scrollable);
|
||||
// if (scrollable.boolValue == true)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(autoScrollHorizontally);
|
||||
if (autoScrollHorizontally.boolValue == false)
|
||||
EditorGUILayout.PropertyField(horizontalScrolling);
|
||||
EditorGUILayout.PropertyField(autoScrollVertically);
|
||||
if (autoScrollVertically.boolValue == false)
|
||||
EditorGUILayout.PropertyField(verticalScrolling);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
SerializedProperty graphData = serializedObject.FindProperty("Data");
|
||||
EditorGUILayout.BeginVertical();
|
||||
Splitter();
|
||||
if (mBold == null)
|
||||
mBold = new GUIStyle(EditorStyles.foldout);
|
||||
EditorGUILayout.LabelField("Data", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
NamedItemEditor(graphData, "category", "mSerializedData", "Categories", ref mCategoryError, ref mCategories, ref mNewCategoryName);
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
SerializedProperty horizontalOrigin = graphData.FindPropertyRelative("horizontalViewOrigin");
|
||||
SerializedProperty horizontalSize = graphData.FindPropertyRelative("horizontalViewSize");
|
||||
SerializedProperty automaticcHorizontaViewGap = graphData.FindPropertyRelative("automaticcHorizontaViewGap");
|
||||
|
||||
SerializedProperty verticalOrigin = graphData.FindPropertyRelative("verticalViewOrigin");
|
||||
SerializedProperty verticalSize = graphData.FindPropertyRelative("verticalViewSize");
|
||||
SerializedProperty automaticVerticalViewGap = graphData.FindPropertyRelative("automaticVerticalViewGap");
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Horizontal View", EditorStyles.boldLabel);
|
||||
SerializedProperty automaticProp = graphData.FindPropertyRelative("automaticHorizontalView");
|
||||
bool automatic = automaticProp.boolValue;
|
||||
automatic = GUILayout.Toggle(automatic, "Auto");
|
||||
GUILayout.FlexibleSpace();
|
||||
automaticProp.boolValue = automatic;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
if (automatic == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(horizontalOrigin);
|
||||
EditorGUILayout.PropertyField(horizontalSize);
|
||||
// if (horizontalSize.doubleValue < 0.0)
|
||||
// horizontalSize.doubleValue = 0.0001;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(automaticcHorizontaViewGap, new GUIContent("Horizontal Gap"));
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Vertical View", EditorStyles.boldLabel);
|
||||
automaticProp = graphData.FindPropertyRelative("automaticVerticallView");
|
||||
automatic = automaticProp.boolValue;
|
||||
automatic = GUILayout.Toggle(automatic, "Auto");
|
||||
GUILayout.FlexibleSpace();
|
||||
automaticProp.boolValue = automatic;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
if (automatic == false)
|
||||
{
|
||||
EditorGUILayout.PropertyField(verticalOrigin);
|
||||
EditorGUILayout.PropertyField(verticalSize);
|
||||
// if (verticalSize.doubleValue < 0.0)
|
||||
// verticalSize.doubleValue = 0.0001;
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(automaticVerticalViewGap, new GUIContent("Vertical Gap"));
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
serializedObject.Update();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e95afd72773c44d4ab4ccd60a38ac39e
|
||||
timeCreated: 1504187754
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,328 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using ChartAndGraph;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
[CustomEditor(typeof(PyramidChart), true)]
|
||||
class PyramidChartInspetor : Editor
|
||||
{
|
||||
bool mCategories = false;
|
||||
string mCategoryError = null;
|
||||
string mNewCategoryName = "";
|
||||
GUIStyle mRedStyle;
|
||||
GUIStyle mBold;
|
||||
HashSet<string> mAllNames = new HashSet<string>();
|
||||
GUIStyle mSplitter;
|
||||
List<int> mToRemove = new List<int>();
|
||||
List<int> mToUp = new List<int>();
|
||||
Dictionary<string, string> mOperations = new Dictionary<string, string>();
|
||||
ChartDataEditor mWindow;
|
||||
bool mUpdateWindow = false;
|
||||
Texture mSettings;
|
||||
|
||||
RenameWindow mRenameWindow = null;
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
mRedStyle = new GUIStyle();
|
||||
mRedStyle.normal.textColor = Color.red;
|
||||
|
||||
mSplitter = new GUIStyle();
|
||||
mSplitter.normal.background = EditorGUIUtility.whiteTexture;
|
||||
mSplitter.stretchWidth = true;
|
||||
mSplitter.margin = new RectOffset(0, 0, 7, 7);
|
||||
}
|
||||
|
||||
public void Splitter()
|
||||
{
|
||||
Rect position = GUILayoutUtility.GetRect(GUIContent.none, mSplitter, GUILayout.Height(1f));
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Color restoreColor = GUI.color;
|
||||
GUI.color = new Color(0.5f, 0.5f, 0.5f);
|
||||
mSplitter.Draw(position, false, false, false, false);
|
||||
GUI.color = restoreColor;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsAlphaNum(string str)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
if (!(char.IsLetter(str[i])) && (!(char.IsNumber(str[i]))) && str[i] != ' ')
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void DoOperations(SerializedProperty items, int size, string type)
|
||||
{
|
||||
mToRemove.Clear();
|
||||
mToUp.Clear();
|
||||
bool up = false;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
SerializedProperty entry = items.GetArrayElementAtIndex(i);
|
||||
if (entry == null)
|
||||
continue;
|
||||
SerializedProperty nameProp = entry.FindPropertyRelative("Name");
|
||||
string name = null;
|
||||
if (nameProp == null)
|
||||
name = entry.stringValue;
|
||||
else
|
||||
name = nameProp.stringValue;
|
||||
|
||||
string arg = type + "|" + name;
|
||||
string res = null;
|
||||
if (up == true)
|
||||
{
|
||||
mToUp.Add(i);
|
||||
up = false;
|
||||
}
|
||||
if (mOperations.TryGetValue(arg, out res))
|
||||
{
|
||||
if (res == "remove")
|
||||
mToRemove.Add(i);
|
||||
if (res == "up" && i > 0)
|
||||
mToUp.Add(i);
|
||||
if (res == "down")
|
||||
up = true;
|
||||
mOperations.Remove(arg);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < mToRemove.Count; i++)
|
||||
items.DeleteArrayElementAtIndex(mToRemove[i]);
|
||||
for (int i = 0; i < mToUp.Count; i++)
|
||||
{
|
||||
int cur = mToUp[i];
|
||||
items.MoveArrayElement(cur, cur - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private SerializedProperty getArrayCategory(SerializedProperty arr, string name)
|
||||
{
|
||||
for (int i = 0; i < arr.arraySize; i++)
|
||||
{
|
||||
SerializedProperty prop = arr.GetArrayElementAtIndex(i);
|
||||
if (prop.FindPropertyRelative("ColumnName").stringValue == name)
|
||||
return prop.FindPropertyRelative("Amount");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void NamedItemEditor(SerializedProperty data, string type, string property, string caption, ref string errorMessage, ref bool foldout, ref string newName)
|
||||
{
|
||||
SerializedProperty items = data.FindPropertyRelative(property);
|
||||
SerializedProperty dataValues = data.FindPropertyRelative("mData");
|
||||
items.isExpanded = EditorGUILayout.Foldout(items.isExpanded, caption);
|
||||
//bool up, down;
|
||||
mAllNames.Clear();
|
||||
int size = items.arraySize;
|
||||
if (Event.current.type == EventType.Layout)
|
||||
DoOperations(items, size, type);
|
||||
size = items.arraySize;
|
||||
if (items.isExpanded)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
SerializedProperty entry = items.GetArrayElementAtIndex(i);
|
||||
if (entry == null)
|
||||
continue;
|
||||
SerializedProperty nameProp = entry.FindPropertyRelative("Name");
|
||||
string name = null;
|
||||
if (nameProp == null)
|
||||
name = entry.stringValue;
|
||||
else
|
||||
name = nameProp.stringValue;
|
||||
mAllNames.Add(name);
|
||||
|
||||
bool toogle = false;
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (nameProp != null)
|
||||
toogle = entry.isExpanded =EditorGUILayout.Foldout(entry.isExpanded, name);
|
||||
else
|
||||
{
|
||||
toogle = false;
|
||||
EditorGUILayout.LabelField(name);
|
||||
}
|
||||
SerializedProperty valueProp = getArrayCategory(dataValues, name);
|
||||
GUILayout.FlexibleSpace();
|
||||
// if(valueProp != null)
|
||||
// EditorGUILayout.PropertyField(valueProp);
|
||||
if (GUILayout.Button("..."))
|
||||
DoContext(type, name);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
if (toogle)
|
||||
{
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
if (nameProp != null)
|
||||
{
|
||||
SerializedProperty end = entry.GetEndProperty(true);
|
||||
entry.Next(true);
|
||||
if (SerializedProperty.EqualContents(entry, end) == false)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (entry.name != "Name")
|
||||
EditorGUILayout.PropertyField(entry, true);
|
||||
if (entry.name == "HeightRatio" && valueProp != null)
|
||||
valueProp.floatValue = entry.floatValue;
|
||||
|
||||
}
|
||||
while (entry.Next(entry.name == "Materials") && SerializedProperty.EqualContents(entry, end) == false);
|
||||
}
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (errorMessage != null)
|
||||
EditorGUILayout.LabelField(errorMessage, mRedStyle);
|
||||
EditorGUILayout.LabelField(string.Format("Add new {0} :", type));
|
||||
//Rect indentAdd = EditorGUI.IndentedRect(new Rect(0f, 0f, 1000f, 1000f));
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
newName = EditorGUILayout.TextField(newName);
|
||||
//GUILayout.Space(indentAdd.xMin);
|
||||
if (GUILayout.Button("Add"))
|
||||
{
|
||||
bool error = false;
|
||||
if (newName.Trim().Length == 0)
|
||||
{
|
||||
errorMessage = "Name can't be empty";
|
||||
error = true;
|
||||
}
|
||||
else if (IsAlphaNum(newName) == false)
|
||||
{
|
||||
errorMessage = "Name conatins invalid characters";
|
||||
error = true;
|
||||
}
|
||||
else if (mAllNames.Contains(newName))
|
||||
{
|
||||
errorMessage = string.Format("A {0} named {1} already exists in this chart", type, newName);
|
||||
error = true;
|
||||
}
|
||||
if (error == false)
|
||||
{
|
||||
errorMessage = null;
|
||||
items.InsertArrayElementAtIndex(size);
|
||||
SerializedProperty newItem = items.GetArrayElementAtIndex(size);
|
||||
SerializedProperty newItemName = newItem.FindPropertyRelative("Name");
|
||||
if (newItemName == null)
|
||||
newItem.stringValue = newName;
|
||||
else
|
||||
newItemName.stringValue = newName;
|
||||
newName = "";
|
||||
UpdateWindow();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = null;
|
||||
}
|
||||
UpdateWindow();
|
||||
}
|
||||
|
||||
void callback(object val)
|
||||
{
|
||||
KeyValuePair<string, string> pair = (KeyValuePair<string, string>)val;
|
||||
mOperations[pair.Key] = pair.Value;
|
||||
}
|
||||
|
||||
bool RenameCategory(string fromName, string toName)
|
||||
{
|
||||
PyramidChart pyramidChart = (PyramidChart)serializedObject.targetObject;
|
||||
try
|
||||
{
|
||||
pyramidChart.DataSource.RenameCategory(fromName, toName);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
serializedObject.Update();
|
||||
if (pyramidChart.gameObject.activeInHierarchy)
|
||||
pyramidChart.GenerateChart();
|
||||
else
|
||||
EditorUtility.SetDirty(pyramidChart);
|
||||
return true;
|
||||
}
|
||||
|
||||
void RenameCalled(object val)
|
||||
{
|
||||
var data = (KeyValuePair<string, string>)val;
|
||||
RenameWindow window = EditorWindow.GetWindow<RenameWindow>();
|
||||
mRenameWindow = window;
|
||||
if (data.Key == "category")
|
||||
window.ShowDialog(data.Value, data.Key, RenameCategory);
|
||||
}
|
||||
void DoContext(string type, string name)
|
||||
{
|
||||
string arg = type + "|" + name;
|
||||
GenericMenu menu = new GenericMenu();
|
||||
menu.AddItem(new GUIContent("Move Up"), false, callback, new KeyValuePair<string, string>(arg, "up"));
|
||||
menu.AddItem(new GUIContent("Move Down"), false, callback, new KeyValuePair<string, string>(arg, "down"));
|
||||
menu.AddItem(new GUIContent("Remove"), false, callback, new KeyValuePair<string, string>(arg, "remove"));
|
||||
menu.AddItem(new GUIContent("Rename.."), false, RenameCalled, new KeyValuePair<string, string>(type, name));
|
||||
menu.ShowAsContext();
|
||||
}
|
||||
void UpdateWindow()
|
||||
{
|
||||
mUpdateWindow = true;
|
||||
}
|
||||
void OnDisable()
|
||||
{
|
||||
if(mRenameWindow != null)
|
||||
{
|
||||
mRenameWindow.Close();
|
||||
mRenameWindow = null;
|
||||
}
|
||||
if (mWindow != null)
|
||||
{
|
||||
mWindow.Close();
|
||||
mWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
SerializedProperty barData = serializedObject.FindProperty("Data");
|
||||
EditorGUILayout.BeginVertical();
|
||||
Splitter();
|
||||
if (mBold == null)
|
||||
mBold = new GUIStyle(EditorStyles.foldout);
|
||||
EditorGUILayout.LabelField("Data", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
NamedItemEditor(barData, "category", "mCategories", "Categories", ref mCategoryError, ref mCategories, ref mNewCategoryName);
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUILayout.EndVertical();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
serializedObject.Update();
|
||||
if (mUpdateWindow == true)
|
||||
{
|
||||
mUpdateWindow = false;
|
||||
if (mWindow != null)
|
||||
{
|
||||
mWindow.SetEditedObject(serializedObject);
|
||||
mWindow.Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79e4c0b8020ab4a42a6d990ae8dc88c3
|
||||
timeCreated: 1579446121
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30e0bcb506988d7498bdbaa0867abcf1
|
||||
folderAsset: yes
|
||||
timeCreated: 1578946274
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
interface IInternalPyramidData
|
||||
{
|
||||
ChartSparseDataSource InternalDataSource { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 369d1c0e7b4b9fc498252bc1ed05b04c
|
||||
timeCreated: 1579445919
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
|
||||
public interface IPyramidGenerator
|
||||
{
|
||||
GameObject ContainerObject { get; }
|
||||
void SetParams(float baseX1, float baseX2, float baseSize, float slopLeft, float slopeRight, float height,float inset,float startV,float endV);
|
||||
Vector3 GetTextPosition(PyramidChart.JustificationType justification,bool isBase);
|
||||
void GetUpperBase(out float baseX1, out float baseX2);
|
||||
void Generate();
|
||||
void ApplyInfo(string title, string text, Sprite image, float scale);
|
||||
void SetAlpha(float alpha);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a1189b51e201054181a7018cd594f6c
|
||||
timeCreated: 1579168376
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using ChartAndGraph;
|
||||
|
||||
public class PyramidAnimation : MonoBehaviour {
|
||||
|
||||
|
||||
public AnimationCurve Curve = AnimationCurve.Linear(0f, 0f, 1f, 1f);
|
||||
public bool AnimateOnStart = true;
|
||||
public float AnimationTime = 3f;
|
||||
float animationStart = -1f;
|
||||
PyramidChart chart;
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
chart = GetComponent<PyramidChart>();
|
||||
if (AnimateOnStart)
|
||||
Animate();
|
||||
}
|
||||
public void Animate()
|
||||
{
|
||||
animationStart = Time.time;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update ()
|
||||
{
|
||||
if (chart == null)
|
||||
return;
|
||||
if (animationStart < 0f)
|
||||
return;
|
||||
float elasped = (Time.time - animationStart) / AnimationTime;
|
||||
elasped = Mathf.Clamp(elasped, 0f, 1f);
|
||||
float blend = Curve.Evaluate(elasped);
|
||||
for(int i=0; i<chart.DataSource.TotalCategories; i++)
|
||||
{
|
||||
string name = chart.DataSource.GetCategoryName(i);
|
||||
chart.DataSource.SetCategoryAlpha(name, blend);
|
||||
chart.DataSource.SetCategoryOrientation(name, blend, 0f, 0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f8e5b63d2caba14993994657aeb9d90
|
||||
timeCreated: 1579516412
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,202 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[Serializable]
|
||||
public class PyramidCanvasGenerator : MaskableGraphic, IPyramidGenerator
|
||||
{
|
||||
|
||||
public RectTransform Container;
|
||||
public Text Title;
|
||||
public Text Info;
|
||||
public Image Sprite;
|
||||
|
||||
bool mPopulated = false;
|
||||
float mBaseX1;
|
||||
float mBaseX2;
|
||||
float mBaseSize;
|
||||
float mSlopLeft;
|
||||
float mSlopeRight;
|
||||
float mHeight;
|
||||
float mInset;
|
||||
float mStartV;
|
||||
float mEndV;
|
||||
CanvasGroup mGroup;
|
||||
UIVertex[] vertices = new UIVertex[4];
|
||||
Vector2[] normals = new Vector2[4];
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
mGroup = ChartCommon.EnsureComponent<CanvasGroup>(gameObject);
|
||||
|
||||
}
|
||||
|
||||
public GameObject ContainerObject {
|
||||
get {
|
||||
if (Container == null)
|
||||
return null;
|
||||
return Container.gameObject;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAlpha(float alpha)
|
||||
{
|
||||
if(mGroup != null)
|
||||
mGroup.alpha = alpha;
|
||||
}
|
||||
public override Texture mainTexture
|
||||
{
|
||||
get { return material.mainTexture; }
|
||||
}
|
||||
public void ApplyInfo(string title, string text, Sprite image,float scale)
|
||||
{
|
||||
if(Container != null)
|
||||
{
|
||||
Vector3 centtroid = vertices[0].position + vertices[1].position + vertices[2].position + vertices[3].position;
|
||||
centtroid *= 0.25f;
|
||||
float upperSize = Math.Abs(vertices[2].position.x - vertices[3].position.x);
|
||||
float downSize = Math.Abs(vertices[0].position.x - vertices[1].position.x);
|
||||
float total = upperSize + downSize;
|
||||
float weight = (downSize - upperSize) / total;
|
||||
weight = -weight * 0.5f + 0.5f;
|
||||
weight = Mathf.Lerp(0.3f, 0.7f, weight);
|
||||
centtroid.y = Mathf.Lerp(vertices[0].position.y, vertices[2].position.y, weight);
|
||||
centtroid = new Vector3(centtroid.x / rectTransform.rect.width, centtroid.y / rectTransform.rect.height);
|
||||
centtroid += new Vector3(0.5f, 0.5f, 0f);
|
||||
Container.anchorMax = centtroid;
|
||||
Container.anchorMin = centtroid;
|
||||
Container.anchoredPosition = new Vector2();
|
||||
Container.sizeDelta = new Vector2(Mathf.Abs(mBaseX1 - mBaseX2) - mInset*4, mHeight - mInset*2);
|
||||
Container.localScale = new Vector3(scale, scale, scale);
|
||||
}
|
||||
if (Title != null)
|
||||
Title.text = title;
|
||||
if (Info != null)
|
||||
Info.text = text;
|
||||
if (Sprite != null)
|
||||
Sprite.sprite = image;
|
||||
}
|
||||
|
||||
public void Generate()
|
||||
{
|
||||
SetAllDirty();
|
||||
Rebuild(CanvasUpdate.PreRender);
|
||||
}
|
||||
|
||||
public Vector3 GetTextPosition(PyramidChart.JustificationType justification, bool isBase)
|
||||
{
|
||||
Vector3 res = new Vector3();
|
||||
switch(justification)
|
||||
{
|
||||
case PyramidChart.JustificationType.LeftAligned:
|
||||
if (isBase)
|
||||
res = vertices[0].position;
|
||||
else
|
||||
res = (vertices[0].position + vertices[2].position) * 0.5f;
|
||||
break;
|
||||
case PyramidChart.JustificationType.RightAligned:
|
||||
if (isBase)
|
||||
res = vertices[1].position;
|
||||
else
|
||||
res = (vertices[1].position + vertices[3].position) * 0.5f;
|
||||
break;
|
||||
case PyramidChart.JustificationType.CenterAligned:
|
||||
if (isBase)
|
||||
res = (vertices[0].position + vertices[1].position) * 0.5f;
|
||||
else
|
||||
res = (vertices[0].position + vertices[1].position +vertices[2].position + vertices[3].position) * 0.25f;
|
||||
break;
|
||||
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public void GetUpperBase(out float baseX1, out float baseX2)
|
||||
{
|
||||
baseX1 = vertices[2].position.x + mBaseSize * 0.5f;
|
||||
baseX2 = vertices[3].position.x + mBaseSize * 0.5f;
|
||||
}
|
||||
|
||||
public void SetParams(float baseX1, float baseX2, float baseSize, float slopLeft, float slopeRight, float height, float inset, float startV, float endV)
|
||||
{
|
||||
mPopulated = true;
|
||||
mBaseX1 = baseX1;
|
||||
mBaseX2 = baseX2;
|
||||
mBaseSize = baseSize;
|
||||
mSlopLeft = slopLeft;
|
||||
mSlopeRight = slopeRight;
|
||||
mHeight = height;
|
||||
mInset = inset;
|
||||
mStartV = startV;
|
||||
mEndV = endV;
|
||||
PyramidMesh.Generate2dMesh(vertices, normals, mBaseX1, mBaseX2, mBaseSize, mSlopLeft, mSlopeRight, mHeight,mStartV,mEndV);
|
||||
}
|
||||
|
||||
#pragma warning disable 0672
|
||||
|
||||
protected override void OnFillVBO(List<UIVertex> vbo)
|
||||
{
|
||||
vbo.Clear();
|
||||
if (mPopulated == false)
|
||||
return;
|
||||
CanvasChartMesh mesh = new CanvasChartMesh(vbo);
|
||||
FillChartMesh(mesh);
|
||||
}
|
||||
|
||||
#pragma warning restore 0672
|
||||
|
||||
#if (!UNITY_5_2_0) && (!UNITY_5_2_1)
|
||||
protected override void OnPopulateMesh(VertexHelper vh)
|
||||
{
|
||||
vh.Clear();
|
||||
if (mPopulated == false)
|
||||
return;
|
||||
CanvasChartMesh mesh = new CanvasChartMesh(vh);
|
||||
FillChartMesh(mesh);
|
||||
}
|
||||
#endif
|
||||
#pragma warning disable 0672
|
||||
#if !UNITY_2017_1_OR_NEWER
|
||||
protected override void OnPopulateMesh(Mesh m)
|
||||
{
|
||||
m.Clear();
|
||||
if (mPopulated == false)
|
||||
return;
|
||||
WorldSpaceChartMesh chartmesh = new WorldSpaceChartMesh(true);
|
||||
FillChartMesh(chartmesh);
|
||||
chartmesh.ApplyToMesh(m);
|
||||
}
|
||||
#endif
|
||||
#pragma warning restore 0672
|
||||
|
||||
void FillChartMesh(IChartMesh mesh)
|
||||
{
|
||||
UIVertex v1 = vertices[0];
|
||||
UIVertex v2 = vertices[1];
|
||||
UIVertex v3 = vertices[2];
|
||||
UIVertex v4 = vertices[3];
|
||||
|
||||
v1.position += (Vector3)(normals[0] * mInset);
|
||||
v2.position += (Vector3)(normals[1] * mInset);
|
||||
v3.position += (Vector3)(normals[2] * mInset);
|
||||
v4.position += (Vector3)(normals[3] * mInset);
|
||||
|
||||
Vector2 inter;
|
||||
if(ChartCommon.SegmentIntersection(v1.position,v3.position,v2.position,v4.position,out inter))
|
||||
{
|
||||
v3.position = inter;
|
||||
v4.position = inter;
|
||||
}
|
||||
|
||||
mesh.AddQuad(v1, v2, v3, v4);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b2cb334c0c0a6448971702fcddbfecd
|
||||
timeCreated: 1579182822
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,639 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
/// <summary>
|
||||
/// Pie chart class
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
[Serializable]
|
||||
public class PyramidChart : AnyChart
|
||||
{
|
||||
public class PyramidEventArgs
|
||||
{
|
||||
public PyramidEventArgs(string category, string title,string text)
|
||||
{
|
||||
Title = title;
|
||||
Text = text;
|
||||
Category = category;
|
||||
}
|
||||
public string Category { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string Text { get; private set; }
|
||||
}
|
||||
|
||||
public enum JustificationType
|
||||
{
|
||||
LeftAligned,
|
||||
RightAligned,
|
||||
CenterAligned
|
||||
}
|
||||
|
||||
public enum SlopeType
|
||||
{
|
||||
Center,
|
||||
Left,
|
||||
Right,
|
||||
Custom
|
||||
}
|
||||
|
||||
bool mQuick = false;
|
||||
[Serializable]
|
||||
public class PyramidEvent : UnityEvent<PyramidEventArgs>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// occures when a pie item is clicked
|
||||
/// </summary>
|
||||
public PyramidEvent ItemClicked = new PyramidEvent();
|
||||
|
||||
/// <summary>
|
||||
/// occures when a pie item is hovered
|
||||
/// </summary>
|
||||
public PyramidEvent ItemHovered = new PyramidEvent();
|
||||
|
||||
/// <summary>
|
||||
/// occurs when no pie is hovered any longer
|
||||
/// </summary>
|
||||
public UnityEvent NonHovered = new UnityEvent();
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The material of the back of the pyramid")]
|
||||
public Material backMaterial;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The inset of each pyramid component
|
||||
/// </summary>
|
||||
public Material BackMaterial
|
||||
{
|
||||
get { return backMaterial; }
|
||||
set
|
||||
{
|
||||
backMaterial = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The inset of each pyramid component")]
|
||||
public float inset;
|
||||
|
||||
/// <summary>
|
||||
/// The inset of each pyramid component
|
||||
/// </summary>
|
||||
public float Inset
|
||||
{
|
||||
get { return inset; }
|
||||
set
|
||||
{
|
||||
inset = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("the text justification of the pyramid chart")]
|
||||
private JustificationType justification;
|
||||
|
||||
/// <summary>
|
||||
/// the text justification of the pyramid chart
|
||||
/// </summary>
|
||||
public JustificationType Justification
|
||||
{
|
||||
get { return justification; }
|
||||
set
|
||||
{
|
||||
justification = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("the slope type of the pyramid")]
|
||||
public SlopeType slope;
|
||||
|
||||
/// <summary>
|
||||
/// prefab for the pie item. must contain a PieCanvasGenerator component
|
||||
/// </summary>
|
||||
public SlopeType Slope
|
||||
{
|
||||
get { return slope; }
|
||||
set
|
||||
{
|
||||
slope = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("prefab for the pyramid item. must contain a PyramidCanvasGenerator component")]
|
||||
private PyramidCanvasGenerator prefab;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// prefab for the pie item. must contain a PieCanvasGenerator component
|
||||
/// </summary>
|
||||
public PyramidCanvasGenerator Prefab
|
||||
{
|
||||
get { return prefab; }
|
||||
set
|
||||
{
|
||||
prefab = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
private PyramidData Data = new PyramidData();
|
||||
|
||||
|
||||
float totalWidth, totalHeight;
|
||||
protected override IChartData DataLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return Data;
|
||||
}
|
||||
}
|
||||
|
||||
public PyramidData DataSource
|
||||
{
|
||||
get { return Data; }
|
||||
}
|
||||
|
||||
public override bool SupportRealtimeGeneration
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override LegenedData LegendInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
LegenedData legend = new LegenedData();
|
||||
if (Data == null)
|
||||
return legend;
|
||||
foreach (var column in ((IInternalPyramidData)Data).InternalDataSource.Columns)
|
||||
{
|
||||
var item = new LegenedData.LegenedItem();
|
||||
item.Name = column.Name;
|
||||
if (column.Material != null)
|
||||
item.Material = column.Material.Normal;
|
||||
else
|
||||
item.Material = null;
|
||||
legend.AddLegenedItem(item);
|
||||
}
|
||||
return legend;
|
||||
}
|
||||
}
|
||||
|
||||
public PyramidChart()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class PyramidObject
|
||||
{
|
||||
public string category;
|
||||
public GameObject pyramidObject;
|
||||
public GameObject backObject;
|
||||
public IPyramidGenerator Generator;
|
||||
public IPyramidGenerator BackGenerator;
|
||||
public string Title, Text;
|
||||
public BillboardText ItemLabel;
|
||||
}
|
||||
Dictionary<string, PyramidObject> mPyramids = new Dictionary<string, PyramidObject>();
|
||||
void HookEvents()
|
||||
{
|
||||
Data.ProperyUpdated -= Data_ProperyUpdated;
|
||||
Data.ProperyUpdated += Data_ProperyUpdated;
|
||||
Data.RealtimeProperyUpdated -= Data_RealtimeProperyUpdated;
|
||||
Data.RealtimeProperyUpdated += Data_RealtimeProperyUpdated;
|
||||
|
||||
((IInternalPyramidData)Data).InternalDataSource.DataStructureChanged -= MDataSource_DataStructureChanged;
|
||||
((IInternalPyramidData)Data).InternalDataSource.DataStructureChanged += MDataSource_DataStructureChanged;
|
||||
((IInternalPyramidData)Data).InternalDataSource.DataValueChanged -= MDataSource_DataValueChanged;
|
||||
((IInternalPyramidData)Data).InternalDataSource.DataValueChanged += MDataSource_DataValueChanged;
|
||||
}
|
||||
|
||||
private void Data_RealtimeProperyUpdated()
|
||||
{
|
||||
QuickInvalidate();
|
||||
}
|
||||
|
||||
private void Data_ProperyUpdated()
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected void QuickInvalidate()
|
||||
{
|
||||
if (Invalidating)
|
||||
return;
|
||||
Invalidate();
|
||||
mQuick = true;
|
||||
}
|
||||
|
||||
public override void Invalidate()
|
||||
{
|
||||
base.Invalidate();
|
||||
mQuick = false;
|
||||
}
|
||||
|
||||
private void MDataSource_DataValueChanged(object sender, DataSource.ChartDataSourceBase.DataValueChangedEventArgs e)
|
||||
{
|
||||
QuickInvalidate();
|
||||
}
|
||||
|
||||
private void MDataSource_DataStructureChanged(object sender, EventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
if (ChartCommon.IsInEditMode == false)
|
||||
{
|
||||
HookEvents();
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
HookEvents();
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void ClearChart()
|
||||
{
|
||||
base.ClearChart();
|
||||
mPyramids.Clear();
|
||||
}
|
||||
|
||||
Vector3 AlignTextPosition(AlignedItemLabels labels, PyramidObject obj, IPyramidGenerator generator,float height)
|
||||
{
|
||||
Vector3 position = new Vector3(labels.Location.Breadth, labels.Seperation, labels.Location.Depth);
|
||||
position.y += height;
|
||||
position = generator.GetTextPosition(justification, labels.Alignment == ChartLabelAlignment.Base);
|
||||
return position;
|
||||
}
|
||||
|
||||
protected IPyramidGenerator PreparePyramidObject(out GameObject pyramidObject)
|
||||
{
|
||||
if (Prefab == null)
|
||||
pyramidObject = new GameObject();
|
||||
else
|
||||
pyramidObject = GameObject.Instantiate(Prefab.gameObject);
|
||||
ChartCommon.EnsureComponent<RectTransform>(pyramidObject);
|
||||
ChartCommon.EnsureComponent<CanvasRenderer>(pyramidObject);
|
||||
return ChartCommon.EnsureComponent<PyramidCanvasGenerator>(pyramidObject);
|
||||
}
|
||||
|
||||
private void GeneratePyramid(bool update)
|
||||
{
|
||||
if (update == false)
|
||||
ClearChart();
|
||||
else
|
||||
EnsureTextController();
|
||||
if (((IInternalPyramidData)Data).InternalDataSource == null)
|
||||
return;
|
||||
|
||||
double[,] data = ((IInternalPyramidData)Data).InternalDataSource.getRawData();
|
||||
int rowCount = data.GetLength(0);
|
||||
int columnCount = data.GetLength(1);
|
||||
|
||||
if (rowCount != 1) // row count for pie must be 1
|
||||
return;
|
||||
|
||||
double total = 0.0;
|
||||
|
||||
for (int i = 0; i < columnCount; ++i)
|
||||
{
|
||||
double val = Math.Max(data[0, i], 0);
|
||||
total += val;
|
||||
}
|
||||
|
||||
var rectTrans = GetComponent<RectTransform>();
|
||||
totalHeight = rectTrans.rect.height;
|
||||
totalWidth = rectTrans.rect.width;
|
||||
|
||||
float baseX1 = 0;
|
||||
float baseX2 = totalWidth;
|
||||
float accumilatedHeight = 0;
|
||||
float? firstCenterHeight = null;
|
||||
float acummilatedWeight = 0;
|
||||
for (int i = 0; i < columnCount; ++i)
|
||||
{
|
||||
object userData = ((IInternalPyramidData)Data).InternalDataSource.Columns[i].UserData;
|
||||
var categoryData = ((PyramidData.CategoryData)userData);
|
||||
|
||||
string name = ((IInternalPyramidData)Data).InternalDataSource.Columns[i].Name;
|
||||
double amount = Math.Max(data[0, i], 0);
|
||||
if (amount == 0f)
|
||||
continue;
|
||||
|
||||
float weight = (float)(amount / total);
|
||||
float actualHeight = totalHeight * weight;
|
||||
|
||||
float slopeRight = categoryData.RightSlope;
|
||||
float slopeLeft = categoryData.LeftSlope;
|
||||
float atan;
|
||||
switch(slope)
|
||||
{
|
||||
case SlopeType.Center:
|
||||
atan = -Mathf.Atan2(totalHeight, totalWidth * 0.5f) * Mathf.Rad2Deg +90;
|
||||
slopeRight = atan;
|
||||
slopeLeft = atan;
|
||||
break;
|
||||
case SlopeType.Left:
|
||||
atan = -Mathf.Atan2(totalHeight, totalWidth) * Mathf.Rad2Deg + 90;
|
||||
slopeLeft = 0;
|
||||
slopeRight = atan;
|
||||
break;
|
||||
case SlopeType.Right:
|
||||
atan = -Mathf.Atan2(totalHeight, totalWidth) * Mathf.Rad2Deg + 90;
|
||||
slopeLeft = atan;
|
||||
slopeRight = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
GameObject pyramidObject = null;
|
||||
GameObject pyramidBackObject = null;
|
||||
IPyramidGenerator generator = null;
|
||||
IPyramidGenerator backgenerator = null;
|
||||
PyramidObject dataObject;
|
||||
float centerHeight = actualHeight * 0.5f + accumilatedHeight;
|
||||
float unblendedHeight = centerHeight;
|
||||
if (firstCenterHeight.HasValue == false)
|
||||
firstCenterHeight = centerHeight;
|
||||
centerHeight = Mathf.Lerp(firstCenterHeight.Value, centerHeight, categoryData.PositionBlend);
|
||||
|
||||
if (mPyramids.TryGetValue(name, out dataObject))
|
||||
{
|
||||
pyramidBackObject = dataObject.backObject;
|
||||
pyramidObject = dataObject.pyramidObject;
|
||||
backgenerator = dataObject.BackGenerator;
|
||||
generator = dataObject.Generator;
|
||||
generator.SetParams(baseX1, baseX2, totalWidth, slopeLeft, slopeRight, actualHeight,inset,0f,1f);
|
||||
if (backgenerator !=null)
|
||||
backgenerator.SetParams(baseX1, baseX2, totalWidth, slopeLeft, slopeRight, actualHeight, 0f, acummilatedWeight, acummilatedWeight + weight);
|
||||
if (dataObject.ItemLabel)
|
||||
{
|
||||
Vector3 labelPos = AlignTextPosition(mItemLabels, dataObject,generator, centerHeight);
|
||||
dataObject.ItemLabel.transform.localPosition = labelPos;
|
||||
ChartCommon.UpdateTextParams(dataObject.ItemLabel.UIText, categoryData.Title);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataObject = new PyramidObject();
|
||||
|
||||
if (backMaterial != null)
|
||||
{
|
||||
var backGenerator = PreparePyramidObject(out pyramidBackObject);
|
||||
backGenerator.SetParams(baseX1, baseX2, totalWidth, slopeLeft, slopeRight, actualHeight, 0f, acummilatedWeight, acummilatedWeight +weight);
|
||||
dataObject.backObject = pyramidBackObject;
|
||||
dataObject.BackGenerator = backGenerator;
|
||||
ChartCommon.HideObject(pyramidBackObject, hideHierarchy);
|
||||
pyramidBackObject.transform.SetParent(transform,false);
|
||||
ChartCommon.EnsureComponent<ChartItem>(pyramidBackObject);
|
||||
ChartMaterialController backcontrol = ChartCommon.EnsureComponent<ChartMaterialController>(pyramidBackObject);
|
||||
backcontrol.Materials = new ChartDynamicMaterial(backMaterial);
|
||||
foreach(var itemEffect in pyramidBackObject.GetComponents<ChartItemEffect>())
|
||||
ChartCommon.SafeDestroy(itemEffect);
|
||||
ChartCommon.SafeDestroy(backGenerator.ContainerObject);
|
||||
}
|
||||
|
||||
generator = PreparePyramidObject(out pyramidObject);
|
||||
generator.SetParams(baseX1, baseX2, totalWidth, slopeLeft, slopeRight, actualHeight, inset,0f,1f);
|
||||
ChartCommon.HideObject(pyramidObject, hideHierarchy);
|
||||
pyramidObject.transform.SetParent(transform,false);
|
||||
ChartCommon.EnsureComponent<ChartItem>(pyramidObject);
|
||||
|
||||
|
||||
|
||||
ChartMaterialController control = ChartCommon.EnsureComponent<ChartMaterialController>(pyramidObject);
|
||||
control.Materials = Data.GetMaterial(name);
|
||||
control.Refresh();
|
||||
|
||||
|
||||
dataObject.Generator = generator;
|
||||
dataObject.category = name;
|
||||
dataObject.pyramidObject = pyramidObject;
|
||||
mPyramids.Add(name, dataObject);
|
||||
|
||||
CharItemEffectController effect = ChartCommon.EnsureComponent<CharItemEffectController>(pyramidObject);
|
||||
effect.WorkOnParent = false;
|
||||
effect.InitialScale = false;
|
||||
|
||||
ChartItemEvents[] events = pyramidObject.GetComponentsInChildren<ChartItemEvents>();
|
||||
for (int j = 0; j < events.Length; ++j)
|
||||
{
|
||||
if (events[j] == null)
|
||||
continue;
|
||||
InternalItemEvents comp = (InternalItemEvents)events[j];
|
||||
comp.Parent = this;
|
||||
comp.UserData = dataObject;
|
||||
}
|
||||
|
||||
|
||||
if (mItemLabels != null)
|
||||
{
|
||||
|
||||
Vector3 labelPos = AlignTextPosition(mItemLabels, dataObject, generator, 0f);
|
||||
float angle = justification == JustificationType.LeftAligned ? -180f : 180f;
|
||||
BillboardText billboard = ChartCommon.CreateBillboardText(null, mItemLabels.TextPrefab, dataObject.pyramidObject.transform, categoryData.Title, labelPos.x, labelPos.y, labelPos.z, angle, null, hideHierarchy, mItemLabels.FontSize, mItemLabels.FontSharpness);
|
||||
dataObject.ItemLabel = billboard;
|
||||
dataObject.ItemLabel.transform.localPosition = labelPos;
|
||||
TextController.AddText(billboard);
|
||||
}
|
||||
}
|
||||
|
||||
dataObject.Text = categoryData.Text;
|
||||
dataObject.Title = categoryData.Title;
|
||||
|
||||
if (IsCanvas)
|
||||
{
|
||||
if (pyramidObject != null)
|
||||
{
|
||||
Vector2 actualPosition = new Vector2(0.5f, centerHeight) + categoryData.Shift;
|
||||
actualPosition = new Vector2(actualPosition.x , actualPosition.y / TotalHeight);
|
||||
var objectRect = pyramidObject.GetComponent<RectTransform>();
|
||||
objectRect.pivot = new Vector2(0.5f, 0.5f);
|
||||
objectRect.anchorMin = actualPosition;
|
||||
objectRect.anchorMax = actualPosition;
|
||||
objectRect.anchoredPosition = new Vector2();
|
||||
objectRect.sizeDelta = new Vector2(totalWidth, actualHeight);
|
||||
}
|
||||
if(pyramidBackObject != null)
|
||||
{
|
||||
Vector2 actualPosition = new Vector2(0.5f, unblendedHeight);
|
||||
actualPosition = new Vector2(actualPosition.x, actualPosition.y / TotalHeight);
|
||||
var objectRect = pyramidBackObject.GetComponent<RectTransform>();
|
||||
objectRect.pivot = new Vector2(0f, 0f);
|
||||
objectRect.anchorMin = actualPosition;
|
||||
objectRect.anchorMax = actualPosition;
|
||||
objectRect.anchoredPosition = new Vector2();
|
||||
}
|
||||
}
|
||||
accumilatedHeight += actualHeight;
|
||||
acummilatedWeight += weight;
|
||||
if(backgenerator!= null)
|
||||
backgenerator.Generate();
|
||||
generator.Generate();
|
||||
generator.GetUpperBase(out baseX1, out baseX2);
|
||||
generator.ApplyInfo(categoryData.Title, categoryData.Text, categoryData.Image,categoryData.Scale);
|
||||
generator.SetAlpha(categoryData.Alpha);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnLabelSettingChanged()
|
||||
{
|
||||
base.OnLabelSettingChanged();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnLabelSettingsSet()
|
||||
{
|
||||
base.OnLabelSettingsSet();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public override void InternalGenerateChart()
|
||||
{
|
||||
if (gameObject.activeInHierarchy == false)
|
||||
return;
|
||||
base.InternalGenerateChart();
|
||||
GeneratePyramid(mQuick);
|
||||
mQuick = false;
|
||||
}
|
||||
|
||||
protected override bool HasValues(AxisBase axis)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override double MaxValue(AxisBase axis)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
protected override double MinValue(AxisBase axis)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
protected virtual void OnPropertyChanged()
|
||||
{
|
||||
QuickInvalidate();
|
||||
}
|
||||
|
||||
protected override void OnPropertyUpdated()
|
||||
{
|
||||
base.OnPropertyUpdated();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void ValidateProperties()
|
||||
{
|
||||
base.ValidateProperties();
|
||||
if (inset < 0)
|
||||
inset = 0;
|
||||
}
|
||||
|
||||
PyramidEventArgs userDataToEventArgs(object userData)
|
||||
{
|
||||
PyramidObject pyramid = (PyramidObject)userData;
|
||||
return new PyramidEventArgs(pyramid.category, pyramid.Title,pyramid.Text);
|
||||
}
|
||||
|
||||
protected override void OnNonHoverted()
|
||||
{
|
||||
base.OnNonHoverted();
|
||||
if (NonHovered != null)
|
||||
NonHovered.Invoke();
|
||||
}
|
||||
|
||||
protected override void OnItemHoverted(object userData)
|
||||
{
|
||||
base.OnItemHoverted(userData);
|
||||
if (ItemHovered != null)
|
||||
ItemHovered.Invoke(userDataToEventArgs(userData));
|
||||
}
|
||||
|
||||
protected override void OnItemSelected(object userData)
|
||||
{
|
||||
base.OnItemSelected(userData);
|
||||
var args = userDataToEventArgs(userData);
|
||||
if (ItemClicked != null)
|
||||
ItemClicked.Invoke(args);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
}
|
||||
|
||||
protected override bool SupportsCategoryLabels
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsGroupLables
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsItemLabels
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool ShouldFitCanvas { get { return false; } }
|
||||
|
||||
protected override float TotalDepthLink { get { return 0f; } }
|
||||
|
||||
protected override float TotalHeightLink { get { return totalHeight; } }
|
||||
|
||||
protected override float TotalWidthLink { get { return totalWidth; } }
|
||||
|
||||
public override bool IsCanvas { get { return true; } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d0cd7c0544e4cc439d4a030e8a7a470
|
||||
timeCreated: 1578949498
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,450 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using ChartAndGraph.DataSource;
|
||||
using ChartAndGraph.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[Serializable]
|
||||
public class PyramidData : AbstractChartData, IInternalPyramidData, IChartData
|
||||
{
|
||||
[Serializable]
|
||||
internal class CategoryData
|
||||
{
|
||||
public string Name;
|
||||
public ChartDynamicMaterial Materials;
|
||||
public String Title;
|
||||
public String Text;
|
||||
public Sprite Image;
|
||||
|
||||
public float RightSlope;
|
||||
public float LeftSlope;
|
||||
public float HeightRatio;
|
||||
|
||||
public float Alpha;
|
||||
public float Scale;
|
||||
public float ShiftX, ShiftY;
|
||||
public float PositionBlend;
|
||||
public Vector2 Shift { get { return new Vector2(ShiftX, ShiftY); } }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class DataEntry
|
||||
{
|
||||
public string GroupName;
|
||||
public string ColumnName;
|
||||
public double Amount;
|
||||
}
|
||||
|
||||
public PyramidData()
|
||||
{
|
||||
mDataSource = new ChartSparseDataSource();
|
||||
if (mDataSource.Rows.Count == 0)
|
||||
mDataSource.Rows.Add(new DataSource.ChartDataRow("Pyramid"));
|
||||
}
|
||||
|
||||
private ChartSparseDataSource mDataSource;
|
||||
ChartSparseDataSource IInternalPyramidData.InternalDataSource { get { return mDataSource; } }
|
||||
[SerializeField]
|
||||
private CategoryData[] mCategories = new CategoryData[0];
|
||||
[SerializeField]
|
||||
private string[] mGroups = new string[1] { "Pyramid" };
|
||||
[SerializeField]
|
||||
private DataEntry[] mData = new DataEntry[0];
|
||||
|
||||
public int TotalCategories { get { return mDataSource.Columns.Count; } }
|
||||
|
||||
public void Update()
|
||||
{
|
||||
UpdateSliders();
|
||||
}
|
||||
|
||||
public string GetCategoryName(int index)
|
||||
{
|
||||
return mDataSource.Columns[index].Name;
|
||||
}
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
int totalColumns = mDataSource.Columns.Count;
|
||||
mCategories = new CategoryData[totalColumns];
|
||||
for (int i = 0; i < totalColumns; i++)
|
||||
{
|
||||
CategoryData data = new CategoryData();
|
||||
data.Name = mDataSource.Columns[i].Name;
|
||||
data.Materials = mDataSource.Columns[i].Material;
|
||||
object userData = mDataSource.Columns[i].UserData;
|
||||
if (userData != null && userData is CategoryData)
|
||||
{
|
||||
data.Alpha = ((CategoryData)userData).Alpha;
|
||||
data.HeightRatio = ((CategoryData)userData).HeightRatio;
|
||||
data.Image = ((CategoryData)userData).Image;
|
||||
data.Title = ((CategoryData)userData).Title;
|
||||
data.LeftSlope = ((CategoryData)userData).LeftSlope;
|
||||
data.RightSlope = ((CategoryData)userData).RightSlope;
|
||||
data.Scale = ((CategoryData)userData).Scale;
|
||||
data.ShiftX = ((CategoryData)userData).ShiftX;
|
||||
data.ShiftY = ((CategoryData)userData).ShiftY;
|
||||
data.Text = ((CategoryData)userData).Text;
|
||||
data.PositionBlend = ((CategoryData)userData).PositionBlend;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Alpha = 1f;
|
||||
data.HeightRatio = 1f;
|
||||
data.Image = null;
|
||||
data.Title = "";
|
||||
data.LeftSlope = -0.5f;
|
||||
data.RightSlope = -0.5f;
|
||||
data.Scale = 1f;
|
||||
data.ShiftX = 0f;
|
||||
data.ShiftY = 0f;
|
||||
data.Text = ((CategoryData)userData).Text;
|
||||
data.PositionBlend = 1f;
|
||||
}
|
||||
mCategories[i] = data;
|
||||
}
|
||||
|
||||
int totalRows = mDataSource.Rows.Count;
|
||||
mGroups = new string[totalRows];
|
||||
for (int i = 0; i < totalRows; i++)
|
||||
mGroups[i] = mDataSource.Rows[i].Name;
|
||||
|
||||
double[,] raw = mDataSource.getRawData();
|
||||
int current = 0;
|
||||
mData = new DataEntry[raw.GetLength(0) * raw.GetLength(1)];
|
||||
for (int i = 0; i < raw.GetLength(0); ++i)
|
||||
{
|
||||
for (int j = 0; j < raw.GetLength(1); ++j)
|
||||
{
|
||||
DataEntry entry = new DataEntry();
|
||||
entry.ColumnName = mDataSource.Columns[j].Name;
|
||||
entry.GroupName = mDataSource.Rows[i].Name;
|
||||
entry.Amount = raw[i, j];
|
||||
mData[current++] = entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event Action ProperyUpdated;
|
||||
public event Action RealtimeProperyUpdated;
|
||||
|
||||
protected void RaiseRealtimePropertyUpdated()
|
||||
{
|
||||
if (RealtimeProperyUpdated != null)
|
||||
RealtimeProperyUpdated();
|
||||
}
|
||||
|
||||
protected void RaisePropertyUpdated()
|
||||
{
|
||||
if (ProperyUpdated != null)
|
||||
ProperyUpdated();
|
||||
}
|
||||
public bool HasCategory(string category)
|
||||
{
|
||||
try
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
if (col != null)
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// rename a category. throws an exception on error
|
||||
/// </summary>
|
||||
/// <param name="prevName"></param>
|
||||
/// <param name="newName"></param>
|
||||
public void RenameCategory(string prevName, string newName)
|
||||
{
|
||||
mDataSource.Columns[prevName].Name = newName;
|
||||
RaisePropertyUpdated();
|
||||
}
|
||||
|
||||
public object StoreCategory(string category)
|
||||
{
|
||||
CategoryData data = (CategoryData)(mDataSource.Columns[category].UserData);
|
||||
data.Materials = mDataSource.Columns[category].Material;
|
||||
return data;
|
||||
}
|
||||
|
||||
public void RestoreCategory(string category, object data)
|
||||
{
|
||||
var toSet = (CategoryData)data;
|
||||
CategoryData current = (CategoryData)(mDataSource.Columns[category].UserData);
|
||||
current.Alpha = ((CategoryData)toSet).Alpha;
|
||||
current.HeightRatio = ((CategoryData)toSet).HeightRatio;
|
||||
current.Image = ((CategoryData)toSet).Image;
|
||||
current.Title = ((CategoryData)toSet).Title;
|
||||
current.LeftSlope = ((CategoryData)toSet).LeftSlope;
|
||||
current.RightSlope = ((CategoryData)toSet).RightSlope;
|
||||
current.Scale = ((CategoryData)toSet).Scale;
|
||||
current.ShiftX = ((CategoryData)toSet).ShiftX;
|
||||
current.ShiftY = ((CategoryData)toSet).ShiftY;
|
||||
current.Text = ((CategoryData)toSet).Text;
|
||||
current.PositionBlend = ((CategoryData)toSet).PositionBlend;
|
||||
|
||||
current.Materials = toSet.Materials;
|
||||
mDataSource.Columns[category].Material = toSet.Materials;
|
||||
RaisePropertyUpdated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// call this to suspend chart redrawing while updating the data of the chart
|
||||
/// </summary>
|
||||
public void StartBatch()
|
||||
{
|
||||
mDataSource.SuspendEvents = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// call this after StartBatch , this will apply all the changed made between the StartBatch call to this call
|
||||
/// </summary>
|
||||
public void EndBatch()
|
||||
{
|
||||
mDataSource.SuspendEvents = false;
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
mDataSource = new ChartSparseDataSource();
|
||||
mDataSource.SuspendEvents = true;
|
||||
mDataSource.Clear();
|
||||
if (mCategories == null)
|
||||
mCategories = new CategoryData[0];
|
||||
if (mGroups == null)
|
||||
mGroups = new string[0];
|
||||
if (mData == null)
|
||||
mData = new DataEntry[0];
|
||||
|
||||
for (int i = 0; i < mCategories.Length; i++)
|
||||
AddCategory(mCategories[i].Name, mCategories[i].Materials, mCategories[i].Title, mCategories[i].Text, mCategories[i].Image, mCategories[i].Alpha, mCategories[i].HeightRatio, mCategories[i].LeftSlope, mCategories[i].RightSlope, mCategories[i].PositionBlend, mCategories[i].Scale, mCategories[i].ShiftX, mCategories[i].ShiftY);
|
||||
// for (int i = 0; i < mGroups.Length; i++)
|
||||
// AddGroup(mGroups[i]);
|
||||
if (mDataSource.Rows.Count == 0)
|
||||
mDataSource.Rows.Add(new DataSource.ChartDataRow("Pyramid"));
|
||||
for (int i = 0; i < mData.Length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataEntry entry = mData[i];
|
||||
mDataSource.SetValue(entry.ColumnName, entry.GroupName, entry.Amount);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
mDataSource.SuspendEvents = false;
|
||||
}
|
||||
|
||||
private void AddGroup(string name)
|
||||
{
|
||||
mDataSource.Rows.Add(new ChartDataRow(name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new category to the pyramid chart. Each category has it's own material and name. each category corresponds to one pyr slice
|
||||
/// </summary>
|
||||
/// <param name="name">the name of the category</param>
|
||||
/// <param name="material">the material of the category</param>
|
||||
public void AddCategory(string name, Material material, String title, String text, Sprite image)
|
||||
{
|
||||
AddCategory(name, new ChartDynamicMaterial(material),title,text,image);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new category to the pyramid chart. Each category has it's own material and name. each category corresponds to one pie slice
|
||||
/// </summary>
|
||||
/// <param name="name">the name of the category</param>
|
||||
/// <param name="material">the dynamic material of the category. dynamic materials allows setting the material for different events</param>
|
||||
public void AddCategory(string name, ChartDynamicMaterial material, String title, String text, Sprite image,float alpha = 1f,float heightRatio = 1f,float leftSlope = 45f,float rightSlope = 45f,float positionBlend = 1f,float scale = 1f, float shiftX = 0f,float shiftY =0f)
|
||||
{
|
||||
if (title == null)
|
||||
title = "";
|
||||
if (text == null)
|
||||
text = "";
|
||||
|
||||
ChartDataColumn column = new ChartDataColumn(name);
|
||||
column.Material = material;
|
||||
CategoryData d = new CategoryData();
|
||||
d.Title = title;
|
||||
d.Text = text;
|
||||
d.Image = image;
|
||||
d.Alpha = alpha;
|
||||
d.HeightRatio = heightRatio;
|
||||
d.LeftSlope = leftSlope;
|
||||
d.RightSlope = rightSlope;
|
||||
d.PositionBlend = positionBlend;
|
||||
d.Scale = scale;
|
||||
d.ShiftX = shiftX;
|
||||
d.ShiftY = shiftY;
|
||||
column.UserData = d;
|
||||
mDataSource.mColumns.Add(column);
|
||||
SetValueInternal(name, "Pyramid", heightRatio);
|
||||
}
|
||||
|
||||
public void SetCategoryInfo(string category,string title,string text,Sprite image)
|
||||
{
|
||||
if (title == null)
|
||||
title = "";
|
||||
if (text == null)
|
||||
text = "";
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.Text = text;
|
||||
data.Title = title;
|
||||
data.Image = image;
|
||||
RaisePropertyUpdated();
|
||||
}
|
||||
public void SetCategoryAlpha(string category, float alpha)
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.Alpha = alpha;
|
||||
RaiseRealtimePropertyUpdated();
|
||||
}
|
||||
public void SetCategoryContentScale(string category,float scale)
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.Scale = scale;
|
||||
RaiseRealtimePropertyUpdated();
|
||||
}
|
||||
public void SetCategoryOrientation(string category,float positionBlend,float shiftX ,float shiftY)
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.PositionBlend = positionBlend;
|
||||
data.ShiftX = shiftX;
|
||||
data.ShiftY = shiftY;
|
||||
RaiseRealtimePropertyUpdated();
|
||||
}
|
||||
public void SetCategorySlope(string category,float leftSlop,float rightSlope)
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.LeftSlope = leftSlop;
|
||||
data.RightSlope = rightSlope;
|
||||
RaiseRealtimePropertyUpdated();
|
||||
}
|
||||
public void SetCategoryHeightRatio(string category, float heightRatio)
|
||||
{
|
||||
var col = mDataSource.Columns[category];
|
||||
CategoryData data = col.UserData as CategoryData;
|
||||
data.HeightRatio = heightRatio;
|
||||
SetValueInternal(category, "Pyramid", heightRatio);
|
||||
RaiseRealtimePropertyUpdated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// clears the pyramid chart data
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
string[] groups = mDataSource.Columns.Select(x => x.Name).ToArray();
|
||||
foreach (string s in groups)
|
||||
{
|
||||
RemoveCategory(s);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the material for the specified category
|
||||
/// </summary>
|
||||
/// <param name="category">the name of the category</param>
|
||||
/// <param name="material">the material of the category</param>
|
||||
public void SetMaterial(string category, Material material)
|
||||
{
|
||||
SetMaterial(category, new ChartDynamicMaterial(material));
|
||||
|
||||
}
|
||||
|
||||
internal ChartDynamicMaterial GetMaterial(string category)
|
||||
{
|
||||
return mDataSource.Columns[category].Material;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the material for the specified category
|
||||
/// </summary>
|
||||
/// <param name="category">the name of the category</param>
|
||||
/// <param name="material">the dynamic material of the category. dynamic materials allow setting the material for different events</param>
|
||||
public void SetMaterial(string category, ChartDynamicMaterial material)
|
||||
{
|
||||
mDataSource.Columns[category].Material = material;
|
||||
RaisePropertyUpdated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removes a category from the pyramid chart
|
||||
/// </summary>
|
||||
/// <param name="name">the name of the category to remove</param>
|
||||
public void RemoveCategory(string name)
|
||||
{
|
||||
ChartDataColumn column = mDataSource.Columns[name];
|
||||
RemoveSlider(name, "Pyramid");
|
||||
mDataSource.Columns.Remove(column);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gets the value for the specified category
|
||||
/// </summary>
|
||||
/// <param name="category">the category name</param>
|
||||
/// <param name="group">the group name</param>
|
||||
/// <returns></returns>
|
||||
public double GetValue(string category)
|
||||
{
|
||||
return mDataSource.GetValue(category, "Pyramid");
|
||||
}
|
||||
|
||||
public bool CheckAnimationEnded(float time, AnimationCurve curve)
|
||||
{
|
||||
if (curve.length == 0)
|
||||
return true;
|
||||
return time > curve.keys[curve.length - 1].time;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// used intenally , do not call
|
||||
/// </summary>
|
||||
/// <param name="cats"></param>
|
||||
public object[] StoreAllCategoriesinOrder()
|
||||
{
|
||||
return mCategories.ToArray();
|
||||
}
|
||||
|
||||
private void FixEaseFunction(AnimationCurve curve)
|
||||
{
|
||||
curve.postWrapMode = WrapMode.Once;
|
||||
curve.preWrapMode = WrapMode.Once;
|
||||
}
|
||||
|
||||
|
||||
protected override void SetValueInternal(string column, string row, double value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(mDataSource.Rows.Count ==0 )
|
||||
mDataSource.Rows.Add(new DataSource.ChartDataRow("Pyramid"));
|
||||
mDataSource.SetValue(column, "Pyramid", value);
|
||||
}
|
||||
catch (ChartException e)
|
||||
{
|
||||
Debug.LogWarning(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46cd052151826fb41a072a83f913f790
|
||||
timeCreated: 1578948915
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
class PyramidMesh
|
||||
{
|
||||
public static void Generate2dMesh(UIVertex[] mesh, Vector2[] normals,float baseX1, float baseX2,float baseSize, float slopLeft, float slopeRight, float height,float startV,float endV)
|
||||
{
|
||||
float halfHeight = height * 0.5f;
|
||||
float halfWidth = baseSize * 0.5f;
|
||||
slopLeft = -Mathf.Clamp(slopLeft, -90, 90) +90;
|
||||
slopeRight = Mathf.Clamp(slopeRight ,- 90, 90) +90;
|
||||
|
||||
float tanLeft = (1f/Mathf.Tan(slopLeft * Mathf.Deg2Rad)) * height;
|
||||
float tanRight =(1f/Mathf.Tan(slopeRight * Mathf.Deg2Rad)) * height;
|
||||
|
||||
float leftPos = baseX1 + tanLeft;
|
||||
float rightPos = baseX2 + tanRight;
|
||||
leftPos = Mathf.Clamp(leftPos, 0,baseSize);
|
||||
rightPos = Mathf.Clamp(rightPos, 0, baseSize);
|
||||
|
||||
|
||||
if (leftPos > rightPos)
|
||||
leftPos = rightPos = Mathf.Clamp(Mathf.Lerp(leftPos, rightPos, 0.5f), 0, baseSize);
|
||||
|
||||
UIVertex v1 = ChartCommon.CreateVertex(new Vector3(baseX1 - halfWidth, -halfHeight), new Vector2(0f, startV));
|
||||
UIVertex v2 = ChartCommon.CreateVertex(new Vector3(baseX2 - halfWidth, -halfHeight), new Vector2(1f, startV));
|
||||
UIVertex v3 = ChartCommon.CreateVertex(new Vector3(leftPos - halfWidth, halfHeight), new Vector2(0f, endV));
|
||||
UIVertex v4 = ChartCommon.CreateVertex(new Vector3(rightPos - halfWidth, halfHeight), new Vector2(1f, endV));
|
||||
|
||||
normals[0] = ((Vector2.up + ChartCommon.Perpendicular(v3.position - v1.position).normalized) * 0.5f).normalized;
|
||||
normals[1] = ((Vector2.up + ChartCommon.Perpendicular(v2.position - v4.position).normalized) * 0.5f).normalized;
|
||||
normals[2] = ((Vector2.down + ChartCommon.Perpendicular(v3.position - v1.position).normalized) * 0.5f).normalized;
|
||||
normals[3] = ((Vector2.down + ChartCommon.Perpendicular(v2.position - v4.position).normalized) * 0.5f).normalized;
|
||||
|
||||
mesh[0] = v1;
|
||||
mesh[1] = v2;
|
||||
mesh[2] = v3;
|
||||
mesh[3] = v4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cc5bd615b17ae34292624585cda8e6a
|
||||
timeCreated: 1579182822
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b321e42897743dd4aa55fd6373025c34
|
||||
folderAsset: yes
|
||||
timeCreated: 1505898441
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c5df8a40695a4340beca4c338df7e39
|
||||
folderAsset: yes
|
||||
timeCreated: 1491152606
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,651 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
#define CandleChart
|
||||
|
||||
using ChartAndGraph;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public abstract class CandleChart : ScrollableAxisChart
|
||||
{
|
||||
/// <summary>
|
||||
/// a candle chart event
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CandleEvent : UnityEvent<CandleEventArgs>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The height ratio of the chart")]
|
||||
protected float heightRatio = 300;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The width ratio of the chart")]
|
||||
protected float widthRatio = 600;
|
||||
|
||||
|
||||
protected override float TotalHeightLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return heightRatio;
|
||||
}
|
||||
}
|
||||
|
||||
protected override float TotalWidthLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return widthRatio;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// occures when a point is clicked
|
||||
/// </summary>
|
||||
public CandleEvent CandleClicked = new CandleEvent();
|
||||
/// <summary>
|
||||
/// occurs when a point is hovered
|
||||
/// </summary>
|
||||
public CandleEvent CandleHovered = new CandleEvent();
|
||||
/// <summary>
|
||||
/// occurs when no candle is hovered any longer
|
||||
/// </summary>
|
||||
public UnityEvent NonHovered = new UnityEvent();
|
||||
|
||||
public enum CandleThicknessMode
|
||||
{
|
||||
/// <summary>
|
||||
/// the candle size is detemined only by the candle duration paramenter
|
||||
/// </summary>
|
||||
Fill,
|
||||
/// <summary>
|
||||
/// the candle is of constant size , regardless of the view size
|
||||
/// </summary>
|
||||
Constant,
|
||||
/// <summary>
|
||||
/// the candle size is fixed , but proportional to the view size
|
||||
/// </summary>
|
||||
Proportional
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// format a candle value to the parameter strings
|
||||
/// </summary>
|
||||
/// <param name="candleVal"></param>
|
||||
/// <param name="fractionDigits"></param>
|
||||
/// <param name="open"></param>
|
||||
/// <param name="high"></param>
|
||||
/// <param name="low"></param>
|
||||
/// <param name="close"></param>
|
||||
public void FormatCandleValue(CandleChartData.CandleValue candleVal, int fractionDigits, out string open, out string high, out string low, out string close)
|
||||
{
|
||||
|
||||
open = StringFromAxisFormat(new DoubleVector3(candleVal.Start,candleVal.Open,0.0), mVerticalAxis,false);
|
||||
close = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Close, 0.0), mVerticalAxis, false);
|
||||
high = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.High, 0.0), mVerticalAxis, false);
|
||||
low = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Low, 0.0), mVerticalAxis, false);
|
||||
}
|
||||
/// <summary>
|
||||
/// format a candle value to the parameter strings
|
||||
/// </summary>
|
||||
/// <param name="candleVal"></param>
|
||||
/// <param name="fractionDigits"></param>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="duration"></param>
|
||||
public void FormatCandleValue(CandleChartData.CandleValue candleVal, int fractionDigits, out string start, out string duration)
|
||||
{
|
||||
start = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Open, 0.0), mHorizontalAxis, true);
|
||||
duration = StringFromAxisFormat(new DoubleVector3(candleVal.Duration, candleVal.Open, 0.0), mHorizontalAxis, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// format a candle value to the parameter strings
|
||||
/// </summary>
|
||||
/// <param name="candleVal"></param>
|
||||
/// <param name="fractionDigits"></param>
|
||||
/// <param name="open"></param>
|
||||
/// <param name="high"></param>
|
||||
/// <param name="low"></param>
|
||||
/// <param name="close"></param>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="duration"></param>
|
||||
public void FormatCandleValue(CandleChartData.CandleValue candleVal, int fractionDigits, out string open, out string high, out string low, out string close, out string start, out string duration)
|
||||
{
|
||||
FormatCandleValue(candleVal, fractionDigits, out open, out high, out low, out close);
|
||||
FormatCandleValue(candleVal, fractionDigits, out start, out duration);
|
||||
}
|
||||
|
||||
public class CandleEventArgs
|
||||
{
|
||||
int mType;
|
||||
|
||||
public CandleEventArgs(int index, int type, Rect selectionRect, Vector3 position, CandleChartData.CandleValue value, string category)
|
||||
{
|
||||
mType = type;
|
||||
Position = position;
|
||||
SelectionRect = selectionRect;
|
||||
CandleValue = value;
|
||||
Category = category;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// true if this event is triggered for the high portion of the candle
|
||||
/// </summary>
|
||||
public bool IsHighEvent { get { return mType == 0; } }
|
||||
/// <summary>
|
||||
/// true if this event is triggered for the low portion of the candle
|
||||
/// </summary>
|
||||
public bool IsLowEvent { get { return mType == 2; } }
|
||||
/// <summary>
|
||||
/// true if this event is triggerd for the body portion of the candle (open/close)
|
||||
/// </summary>
|
||||
public bool IsBodyEvent { get { return mType == 1; } }
|
||||
/// <summary>
|
||||
/// the rect on the canvas that represents the selected object
|
||||
/// </summary>
|
||||
public Rect SelectionRect { get; private set; }
|
||||
/// <summary>
|
||||
/// mouse position
|
||||
/// </summary>
|
||||
public Vector3 Position { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// the index of the candle in the data
|
||||
/// </summary>
|
||||
public int Index { get; private set; }
|
||||
/// <summary>
|
||||
/// the value of the candle
|
||||
/// </summary>
|
||||
public CandleChartData.CandleValue CandleValue { get; private set; }
|
||||
/// <summary>
|
||||
/// the category of the candle
|
||||
/// </summary>
|
||||
public string Category { get; private set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Thickness mode for the candle chart")]
|
||||
protected CandleThicknessMode thicknessMode = CandleThicknessMode.Constant;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Thickness mode for the candle chart
|
||||
/// </summary>
|
||||
public CandleThicknessMode ThicknessMode
|
||||
{
|
||||
get { return thicknessMode; }
|
||||
set
|
||||
{
|
||||
thicknessMode = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override IChartData DataLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return Data;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Thickness contant for the candle chart , it's meaning depends on the thickness mode")]
|
||||
protected float thicknessConstant = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// Thickness contant for the candle chart , it's meaning depends on the thickness mode\
|
||||
/// Fill - multiply the duration size of the candle by a constant , should be between 0f to 1f
|
||||
/// Constant - the pixel size of the candle
|
||||
/// Proportional - constant size of the candle in seconds
|
||||
/// </summary>
|
||||
public float ThicknessConstant
|
||||
{
|
||||
get { return thicknessConstant; }
|
||||
set
|
||||
{
|
||||
thicknessConstant = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
protected override float GetScrollingRange(int axis)
|
||||
{
|
||||
float min = (float)((IInternalCandleData)Data).GetMinValue(axis, false);
|
||||
float max = (float)((IInternalCandleData)Data).GetMaxValue(axis, false);
|
||||
return max - min;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("format with the following labels: <?start> , <?duration>,<?open>,<?high>,<?low>,<?close>")]
|
||||
private string itemFormat = "O:<?open>,H:<?high>,L:<?low>,C:<?close>";
|
||||
|
||||
/// <summary>
|
||||
/// format with the following labels:
|
||||
/// <?start>
|
||||
/// <?duration>
|
||||
/// <?open>
|
||||
/// <?close>
|
||||
/// <?high>
|
||||
/// <?low>
|
||||
/// </summary>
|
||||
public string ItemFormat
|
||||
{
|
||||
get { return itemFormat; }
|
||||
set
|
||||
{
|
||||
itemFormat = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Used when using hoverItem component, and the mouse is hovering over the body of the candle,format with the following labels: <?start> , <?duration>,<?open>,<?high>,<?low>,<?close>")]
|
||||
private string bodyFormat = "O:<?open>,C:<?close>";
|
||||
|
||||
/// <summary>
|
||||
/// format with the following labels:
|
||||
/// <?start>
|
||||
/// <?duration>
|
||||
/// <?open>
|
||||
/// <?close>
|
||||
/// <?high>
|
||||
/// <?low>
|
||||
/// </summary>
|
||||
public string BodyFormat
|
||||
{
|
||||
get { return bodyFormat; }
|
||||
set
|
||||
{
|
||||
bodyFormat = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Used when using hoverItem component, and the mouse is hovering over the high line of the candle,format with the following labels: <?start> , <?duration>,<?open>,<?high>,<?low>,<?close>")]
|
||||
private string highFormat = "H:<?high>";
|
||||
|
||||
public string HighFormat
|
||||
{
|
||||
get { return highFormat; }
|
||||
set
|
||||
{
|
||||
highFormat = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Used when using hoverItem component, and the mouse is hovering over the low line of the candle,format with the following labels: <?start> , <?duration>,<?open>,<?high>,<?low>,<?close>")]
|
||||
private string lowFormat = "L:<?low>";
|
||||
|
||||
public string LowFormat
|
||||
{
|
||||
get { return lowFormat; }
|
||||
set
|
||||
{
|
||||
lowFormat = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the candle chart data
|
||||
/// </summary>
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
protected CandleChartData Data = new CandleChartData();
|
||||
|
||||
/// <summary>
|
||||
/// Holds the candle chart data. including values and categories
|
||||
/// </summary>
|
||||
public CandleChartData DataSource { get { return Data; } }
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
if (ChartCommon.IsInEditMode == false)
|
||||
{
|
||||
HookEvents();
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
if (ChartCommon.IsInEditMode == false)
|
||||
{
|
||||
HookEvents();
|
||||
}
|
||||
Data.RestoreDataValues();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// hooks data source events.
|
||||
/// </summary>
|
||||
protected void HookEvents()
|
||||
{
|
||||
((IInternalCandleData)Data).InternalDataChanged -= CandleChart_InternalDataChanged;
|
||||
((IInternalCandleData)Data).InternalDataChanged += CandleChart_InternalDataChanged;
|
||||
|
||||
((IInternalCandleData)Data).InternalViewPortionChanged -= CandleChart_InternalViewPortionChanged;
|
||||
((IInternalCandleData)Data).InternalViewPortionChanged += CandleChart_InternalViewPortionChanged;
|
||||
|
||||
|
||||
((IInternalCandleData)Data).InternalRealTimeDataChanged -= CandleChart_InternalRealTimeDataChanged;
|
||||
((IInternalCandleData)Data).InternalRealTimeDataChanged += CandleChart_InternalRealTimeDataChanged;
|
||||
}
|
||||
|
||||
private void CandleChart_InternalViewPortionChanged(object sender, EventArgs e)
|
||||
{
|
||||
InvalidateRealtime();
|
||||
}
|
||||
|
||||
private void CandleChart_InternalRealTimeDataChanged(int index,string str)
|
||||
{
|
||||
InvalidateRealtime();
|
||||
}
|
||||
|
||||
private void CandleChart_InternalDataChanged(object sender, EventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
protected override void OnLabelSettingChanged()
|
||||
{
|
||||
base.OnLabelSettingChanged();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnAxisValuesChanged()
|
||||
{
|
||||
base.OnAxisValuesChanged();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnLabelSettingsSet()
|
||||
{
|
||||
base.OnLabelSettingsSet();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override LegenedData LegendInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
LegenedData data = new LegenedData();
|
||||
if (Data == null)
|
||||
return data;
|
||||
foreach (var cat in ((IInternalCandleData)Data).Categories)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
LegenedData.LegenedItem item = new LegenedData.LegenedItem();
|
||||
CandleChartData.CandleSettings settings = cat.UpCandle;
|
||||
if (i == 0)
|
||||
{
|
||||
item.Name = cat.Name + " Increasing";
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Name = cat.Name + " Decreasing";
|
||||
settings = cat.DownCandle;
|
||||
}
|
||||
|
||||
if (settings.Fill != null)
|
||||
item.Material = settings.Fill;
|
||||
else
|
||||
{
|
||||
if (settings.Outline != null)
|
||||
item.Material = settings.Outline;
|
||||
else
|
||||
item.Material = settings.Line;
|
||||
}
|
||||
data.AddLegenedItem(item);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsCategoryLabels
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsGroupLables
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool SupportsItemLabels
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override bool HasValues(AxisBase axis)
|
||||
{
|
||||
if (axis == mVerticalAxis || axis == mHorizontalAxis) // has both horizontal and vertical axis
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override double MaxValue(AxisBase axis)
|
||||
{
|
||||
if (axis == null)
|
||||
return 0.0;
|
||||
if (axis == mHorizontalAxis)
|
||||
return ((IInternalCandleData)Data).GetMaxValue(0, false);
|
||||
if (axis == mVerticalAxis)
|
||||
return ((IInternalCandleData)Data).GetMaxValue(1, false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
protected override double MinValue(AxisBase axis)
|
||||
{
|
||||
if (axis == null)
|
||||
return 0.0;
|
||||
if (axis == mHorizontalAxis)
|
||||
return ((IInternalCandleData)Data).GetMinValue(0, false);
|
||||
if (axis == mVerticalAxis)
|
||||
return ((IInternalCandleData)Data).GetMinValue(1, false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void Deflate(ref double start, ref double duration, double amount)
|
||||
{
|
||||
double center = start + duration * 0.5;
|
||||
duration *= amount;
|
||||
start = center - duration * 0.5;
|
||||
}
|
||||
CandleChartData.CandleValue NormalizeCandle(CandleChartData.CandleValue candle, DoubleVector3 min, DoubleVector3 range)
|
||||
{
|
||||
CandleChartData.CandleValue res = new CandleChartData.CandleValue();
|
||||
res.Open = ChartCommon.normalizeInRangeY(candle.Open, min, range);
|
||||
res.Close = ChartCommon.normalizeInRangeY(candle.Close, min, range);
|
||||
res.High = ChartCommon.normalizeInRangeY(candle.High, min, range);
|
||||
res.Low = ChartCommon.normalizeInRangeY(candle.Low, min, range);
|
||||
|
||||
double duration = candle.Duration;
|
||||
double start = candle.Start;
|
||||
if (ThicknessMode == CandleThicknessMode.Fill)
|
||||
Deflate(ref start, ref duration, ThicknessConstant);
|
||||
else if (thicknessMode == CandleThicknessMode.Proportional)
|
||||
Deflate(ref start, ref duration, ThicknessConstant / duration);
|
||||
double candleEnd = start + duration;
|
||||
candleEnd = ChartCommon.normalizeInRangeX(candleEnd, min, range);
|
||||
|
||||
res.Start = ChartCommon.normalizeInRangeX(start, min, range);
|
||||
res.Duration = candleEnd - res.Start;
|
||||
return res;
|
||||
}
|
||||
public CandleChartData.CandleValue InterpolateCandleInRect(CandleChartData.CandleValue candle, Rect viewRect)
|
||||
{
|
||||
CandleChartData.CandleValue res = new CandleChartData.CandleValue();
|
||||
res.Open = ChartCommon.interpolateInRectY(viewRect, candle.Open);
|
||||
res.Close = ChartCommon.interpolateInRectY(viewRect, candle.Close);
|
||||
res.High = ChartCommon.interpolateInRectY(viewRect, candle.High);
|
||||
res.Low = ChartCommon.interpolateInRectY(viewRect, candle.Low);
|
||||
|
||||
if (res.High < res.Low)
|
||||
{
|
||||
double tmp = res.High;
|
||||
res.High = res.Low;
|
||||
res.Low = tmp;
|
||||
tmp = res.Open;
|
||||
res.Open = res.Close;
|
||||
res.Close = tmp;
|
||||
}
|
||||
double candleEnd = candle.Start + candle.Duration;
|
||||
candleEnd = ChartCommon.interpolateInRectX(viewRect, candleEnd);
|
||||
double start = ChartCommon.interpolateInRectX(viewRect, candle.Start);
|
||||
double duration = candleEnd - start;
|
||||
|
||||
if (start > candleEnd)
|
||||
{
|
||||
double tmp = start;
|
||||
start = candleEnd;
|
||||
candleEnd = tmp;
|
||||
}
|
||||
if (ThicknessMode == CandleThicknessMode.Constant)
|
||||
{
|
||||
Deflate(ref start, ref duration, ThicknessConstant / duration);
|
||||
}
|
||||
|
||||
res.Start = start;
|
||||
res.Duration = duration;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
StringBuilder mTmpBuilder = new StringBuilder();
|
||||
|
||||
protected string FormatItemWithFormat(string format, string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
FormatItemWithFormat(mTmpBuilder, format, open, close, high, low, start, duration);
|
||||
return mTmpBuilder.ToString();
|
||||
|
||||
}
|
||||
public string FormatItem(string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
return FormatItemWithFormat(itemFormat, open, close, high, low, start, duration);
|
||||
}
|
||||
|
||||
public string FormatLow(string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
return FormatItemWithFormat(lowFormat, open, close, high, low, start, duration);
|
||||
}
|
||||
public string FormatHigh(string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
return FormatItemWithFormat(highFormat, open, close, high, low, start, duration);
|
||||
}
|
||||
public string FormatBody(string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
return FormatItemWithFormat(bodyFormat, open, close, high, low, start, duration);
|
||||
}
|
||||
|
||||
protected void FormatItem(StringBuilder builder, string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
FormatItemWithFormat(builder, itemFormat, open, close, high, low, start, duration);
|
||||
}
|
||||
protected void FormatItemWithFormat(StringBuilder builder, string format, string open, string close, string high, string low, string start, string duration)
|
||||
{
|
||||
builder.Length = 0;
|
||||
builder.Append(format);
|
||||
builder.Replace("<?open>", open).Replace("<?close>", close).Replace("<?high>", high).Replace("<?low>", low).Replace("<?start>", start).Replace("<?duration>", duration);
|
||||
}
|
||||
|
||||
protected void TransformCandles(IList<CandleChartData.CandleValue> candles, List<CandleChartData.CandleValue> output, Rect viewRect, DoubleVector3 min, DoubleVector3 max)
|
||||
{
|
||||
DoubleVector3 range = max - min;
|
||||
if (Math.Abs(range.x) <= 0.0001f || Math.Abs(range.y) < 0.0001f)
|
||||
return;
|
||||
output.Clear();
|
||||
for (int i = 0; i < candles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = candles[i];
|
||||
candle = InterpolateCandleInRect(NormalizeCandle(candle, min, range), viewRect);
|
||||
output.Add(candle);
|
||||
}
|
||||
}
|
||||
|
||||
protected int ClipCandles(IList<CandleChartData.CandleValue> candles, List<CandleChartData.CandleValue> result)
|
||||
{
|
||||
result.Clear();
|
||||
|
||||
double minX, minY, maxX, maxY, xScroll, yScroll, xSize, ySize, xOut;
|
||||
GetScrollParams(out minX, out minY, out maxX, out maxY, out xScroll, out yScroll, out xSize, out ySize, out xOut);
|
||||
double direction = 1.0;
|
||||
if (minX > maxX)
|
||||
direction = -1.0;
|
||||
bool prevOut = true;
|
||||
int refrenceIndex = 0;
|
||||
|
||||
for (int i = 0; i < candles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = candles[i];
|
||||
double candleEnd = candle.Duration + candle.Start;
|
||||
|
||||
if (candleEnd* direction >= xScroll* direction && candle.Start* direction <= xOut* direction) // if the candle is within range
|
||||
{
|
||||
if (prevOut)
|
||||
{
|
||||
refrenceIndex = i;
|
||||
prevOut = false;
|
||||
}
|
||||
result.Add(candle);
|
||||
}
|
||||
}
|
||||
return refrenceIndex;
|
||||
}
|
||||
protected override void OnNonHoverted()
|
||||
{
|
||||
base.OnNonHoverted();
|
||||
if (NonHovered != null)
|
||||
NonHovered.Invoke();
|
||||
}
|
||||
protected override void OnItemSelected(object userData)
|
||||
{
|
||||
base.OnItemSelected(userData);
|
||||
CandleEventArgs args = userData as CandleEventArgs;
|
||||
if (CandleClicked != null)
|
||||
CandleClicked.Invoke(args);
|
||||
}
|
||||
protected override void OnItemHoverted(object userData)
|
||||
{
|
||||
base.OnItemHoverted(userData);
|
||||
CandleEventArgs args = userData as CandleEventArgs;
|
||||
if (CandleHovered != null)
|
||||
CandleHovered.Invoke(args);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8205d387a1db4a04c85ed37decb56caf
|
||||
timeCreated: 1491152606
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,657 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using ChartAndGraph;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[Serializable]
|
||||
public class CandleChartData : ScrollableChartData, IInternalCandleData
|
||||
{
|
||||
[Serializable]
|
||||
public struct CandleValue
|
||||
{
|
||||
public CandleValue(double open, double high, double low, double close, DateTime start, TimeSpan duration)
|
||||
{
|
||||
Open = open;
|
||||
High = high;
|
||||
Low = low;
|
||||
Close = close;
|
||||
Start = ChartDateUtility.DateToValue(start);
|
||||
Duration = ChartDateUtility.TimeSpanToValue(duration);
|
||||
}
|
||||
|
||||
public CandleValue(double open, double high, double low, double close, double start, double duration)
|
||||
{
|
||||
Open = open;
|
||||
High = high;
|
||||
Low = low;
|
||||
Close = close;
|
||||
Start = start;
|
||||
Duration = duration;
|
||||
}
|
||||
|
||||
public double Open;
|
||||
public double High;
|
||||
public double Low;
|
||||
public double Close;
|
||||
public double Start;
|
||||
public double Duration;
|
||||
|
||||
public bool isUp
|
||||
{
|
||||
get { return Close > Open; }
|
||||
}
|
||||
|
||||
public double End
|
||||
{
|
||||
get { return Start + Duration; }
|
||||
}
|
||||
|
||||
public DoubleVector2 MidPoint
|
||||
{
|
||||
get { return new DoubleVector2(Start + (Duration * 0.5), (Open + Close) * 0.5); }
|
||||
}
|
||||
|
||||
public double Max
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Max(Open, Close);
|
||||
}
|
||||
}
|
||||
|
||||
public double LowBound
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Min(Math.Min(High, Low), Math.Min(Open, Close));
|
||||
}
|
||||
}
|
||||
|
||||
public double HighBound
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Max(Math.Max(High, Low), Math.Max(Open, Close));
|
||||
}
|
||||
}
|
||||
|
||||
public double Min
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Min(Open, Close);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CandleSettings
|
||||
{
|
||||
public double LineThickness = 2.0;
|
||||
public double CandleThicknessMultiplier = 1.0;
|
||||
public double OutlineThickness = 0.0;
|
||||
public ChartItemEffect CandleHoverPrefab;
|
||||
public Material Outline;
|
||||
public Material Line;
|
||||
public Material Fill;
|
||||
public GameObject CandlePrefab;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CategoryData : BaseScrollableCategoryData
|
||||
{
|
||||
public List<CandleValue> Data = new List<CandleValue>();
|
||||
public CandleSettings UpCandle = new CandleSettings();
|
||||
public CandleSettings DownCandle = new CandleSettings();
|
||||
public double Depth = 0f;
|
||||
}
|
||||
|
||||
class CandleComparer : IComparer<CandleValue>
|
||||
{
|
||||
public int Compare(CandleValue x, CandleValue y)
|
||||
{
|
||||
if (x.Open < y.Open)
|
||||
return -1;
|
||||
if (x.Open > y.Open)
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class SerializedCategory
|
||||
{
|
||||
public string Name;
|
||||
[HideInInspector]
|
||||
public CandleValue[] Data;
|
||||
[HideInInspector]
|
||||
public double? MaxX, MaxY, MinX, MinY;
|
||||
public CandleSettings UpCandle = new CandleSettings();
|
||||
public CandleSettings DownCandle = new CandleSettings();
|
||||
public double Depth = 0f;
|
||||
}
|
||||
|
||||
CandleComparer mComparer = new CandleComparer();
|
||||
|
||||
[SerializeField]
|
||||
SerializedCategory[] mSerializedData = new SerializedCategory[0];
|
||||
|
||||
event EventHandler IInternalCandleData.InternalViewPortionChanged
|
||||
{
|
||||
add
|
||||
{
|
||||
ViewPortionChanged += value;
|
||||
}
|
||||
remove
|
||||
{
|
||||
ViewPortionChanged -= value;
|
||||
}
|
||||
}
|
||||
|
||||
event EventHandler IInternalCandleData.InternalDataChanged
|
||||
{
|
||||
add
|
||||
{
|
||||
DataChanged += value;
|
||||
}
|
||||
|
||||
remove
|
||||
{
|
||||
DataChanged -= value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// rename a category. throws and exception on error
|
||||
/// </summary>
|
||||
/// <param name="prevName"></param>
|
||||
/// <param name="newName"></param>
|
||||
public void RenameCategory(string prevName, string newName)
|
||||
{
|
||||
if (prevName == newName)
|
||||
return;
|
||||
if (mData.ContainsKey(newName))
|
||||
throw new ArgumentException(String.Format("A category named {0} already exists", newName));
|
||||
CategoryData cat = (CategoryData)mData[prevName];
|
||||
mData.Remove(prevName);
|
||||
cat.Name = newName;
|
||||
mData.Add(newName, cat);
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new category to the candle chart.
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="material"></param>
|
||||
/// <param name="innerFill"></param>
|
||||
public void AddCategory(string category, CandleSettings up, CandleSettings down, double depth)
|
||||
{
|
||||
AddCategory3DCandle(category, up, down, 0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add category to the candle chart
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="up"></param>
|
||||
/// <param name="down"></param>
|
||||
/// <param name="depth"></param>
|
||||
public void AddCategory3DCandle(string category, CandleSettings up, CandleSettings down, double depth)
|
||||
{
|
||||
if (mData.ContainsKey(category))
|
||||
throw new ArgumentException(String.Format("A category named {0} already exists", category));
|
||||
CategoryData data = new CategoryData();
|
||||
mData.Add(category, data);
|
||||
data.Name = category;
|
||||
data.DownCandle = down;
|
||||
data.UpCandle = up;
|
||||
data.Depth = depth;
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removed a category from the DataSource. returnes true on success , or false if the category does not exist
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <returns></returns>
|
||||
public bool RemoveCategory(string category)
|
||||
{
|
||||
return mData.Remove(category);
|
||||
}
|
||||
|
||||
public void SetDownCandle(string category, CandleSettings down)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
data.DownCandle = down;
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
public void SetUpCandle(string category, CandleSettings up)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
data.UpCandle = up;
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// sets the depth for a 3d graph category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="depth"></param>
|
||||
public void Set3DCategoryDepth(string category, double depth)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
if (depth < 0)
|
||||
depth = 0f;
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
data.Depth = depth;
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// clears all the data for the selected category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
public void ClearCategory(string category)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
mData[category].MaxX = null;
|
||||
mData[category].MaxY = null;
|
||||
mData[category].MinX = null;
|
||||
mData[category].MinY = null;
|
||||
((CategoryData)mData[category]).Data.Clear();
|
||||
RaiseDataChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gets the candle at the specified index for a given category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
public int GetCandleCount(string category)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return 0;
|
||||
}
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
return data.Data.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gets the candle at the specified index for a given category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
public CandleValue GetCandle(string category, int index)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return new CandleValue();
|
||||
}
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
return data.Data[index];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns the total amount of candles in the given category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <returns></returns>
|
||||
public int GetTotalCandlesInCategory(string category)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return 0;
|
||||
}
|
||||
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
return data.Data.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// use this to modify candles in realtime.
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="candle"></param>
|
||||
public void ModifyCandleInCategory(string category, int candleIndex, double open, double high, double low, double close)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
List<CandleValue> candles = data.Data;
|
||||
|
||||
if (candleIndex == -1)
|
||||
candleIndex = data.Data.Count - 1;
|
||||
if (candleIndex < 0 || candleIndex >= candles.Count)
|
||||
{
|
||||
Debug.LogWarning("Candle index is out of range, call is ignored");
|
||||
return;
|
||||
}
|
||||
|
||||
double candleMax = Math.Max(Math.Max(open, close), Math.Max(high, low));
|
||||
double candleMin = Math.Min(Math.Min(open, close), Math.Min(high, low));
|
||||
|
||||
if (data.MaxY.HasValue == false || data.MaxY.Value < candleMax)
|
||||
data.MaxY = candleMax;
|
||||
if (data.MinY.HasValue == false || data.MinY.Value > candleMin)
|
||||
data.MinY = candleMin;
|
||||
|
||||
CandleValue candle = data.Data[candleIndex];
|
||||
candle.Open = open;
|
||||
candle.Close = close;
|
||||
candle.High = high;
|
||||
candle.Low = low;
|
||||
data.Data[candleIndex] = candle;
|
||||
RaiseRealtimeDataChanged(candleIndex, category);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removes a candle from a category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="index"></param>
|
||||
public void RemoveCandleInCategory(string category, int candleIndex)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
List<CandleValue> candles = data.Data;
|
||||
|
||||
if (candleIndex < 0 || candleIndex >= candles.Count)
|
||||
{
|
||||
Debug.LogWarning("Candle index is out of range, call is ignored");
|
||||
return;
|
||||
}
|
||||
|
||||
data.Data.RemoveAt(candleIndex);
|
||||
RaiseRealtimeDataChanged(candleIndex, category);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// use this to modify candles in realtime. this overload modifies the last candle and can be used for realtime candle data stream
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="candle"></param>
|
||||
public void ModifyLastCandleInCategory(string category, double open, double high, double low, double close)
|
||||
{
|
||||
ModifyCandleInCategory(category, -1, open, high, low, close);
|
||||
}
|
||||
|
||||
|
||||
class Slider : BaseSlider
|
||||
{
|
||||
public string category;
|
||||
public double from;
|
||||
public int index;
|
||||
public double to;
|
||||
public double current;
|
||||
public double y;
|
||||
private CandleChartData mParent;
|
||||
|
||||
public Slider(CandleChartData parent)
|
||||
{
|
||||
mParent = parent;
|
||||
}
|
||||
|
||||
public override DoubleVector2 Max
|
||||
{
|
||||
get
|
||||
{
|
||||
return new DoubleVector2(current, y);
|
||||
}
|
||||
}
|
||||
|
||||
public override DoubleVector2 Min
|
||||
{
|
||||
get
|
||||
{
|
||||
return new DoubleVector2(current, y);
|
||||
}
|
||||
}
|
||||
|
||||
public override string Category { get { return category; } }
|
||||
|
||||
public override int MinIndex
|
||||
{
|
||||
get { return index; }
|
||||
}
|
||||
public override bool Update()
|
||||
{
|
||||
BaseScrollableCategoryData baseData;
|
||||
|
||||
if (mParent.mData.TryGetValue(category, out baseData) == false)
|
||||
return true;
|
||||
|
||||
double time = Time.time;
|
||||
time -= StartTime;
|
||||
|
||||
if (Duration <= 0.0001f)
|
||||
time = 1f;
|
||||
else
|
||||
{
|
||||
time /= Duration;
|
||||
Math.Max(0.0, Math.Min(time, 1.0));
|
||||
}
|
||||
|
||||
current = from * (1.0 - time) + to * time;
|
||||
if (time >= 1f)
|
||||
{
|
||||
mParent.ModifyMinMax(baseData, new DoubleVector3(current, y, 0.0));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// adds a point to the category. The points are sorted by their x value automatically
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="point"></param>
|
||||
public void AddCandleToCategory(string category, CandleValue candle, float autoScrollSlideTime = 0f)
|
||||
{
|
||||
if (mData.ContainsKey(category) == false)
|
||||
{
|
||||
Debug.LogWarning("Invalid category name. Make sure the category is present in the chart");
|
||||
return;
|
||||
}
|
||||
|
||||
CategoryData data = (CategoryData)mData[category];
|
||||
List<CandleValue> candles = data.Data;
|
||||
|
||||
double start = candle.Start;
|
||||
double end = candle.Start + candle.Duration;
|
||||
|
||||
double candleMax = Math.Max(Math.Max(candle.Open, candle.Close), Math.Max(candle.High, candle.Low));
|
||||
double candleMin = Math.Min(Math.Min(candle.Open, candle.Close), Math.Min(candle.High, candle.Low));
|
||||
|
||||
|
||||
if (autoScrollSlideTime <= 0f)
|
||||
{
|
||||
if (data.MaxX.HasValue == false || data.MaxX.Value < end)
|
||||
data.MaxX = end;
|
||||
}
|
||||
if (data.MinX.HasValue == false || data.MinX.Value > start)
|
||||
data.MinX = start;
|
||||
if (data.MaxY.HasValue == false || data.MaxY.Value < candleMax)
|
||||
data.MaxY = candleMax;
|
||||
if (data.MinY.HasValue == false || data.MinY.Value > candleMin)
|
||||
data.MinY = candleMin;
|
||||
|
||||
if (candles.Count > 0)
|
||||
{
|
||||
if (candles[candles.Count - 1].Start < candle.Start)
|
||||
{
|
||||
if (autoScrollSlideTime > 0f)
|
||||
{
|
||||
Slider s = new Slider(this);
|
||||
s.category = category;
|
||||
s.from = candles[candles.Count - 1].End;
|
||||
s.to = end;
|
||||
s.StartTime = Time.time;
|
||||
s.Duration = autoScrollSlideTime;
|
||||
s.y = (candleMax + candleMin) * 0.5;
|
||||
s.index = candles.Count - 1;
|
||||
mSliders.Add(s);
|
||||
}
|
||||
candles.Add(candle);
|
||||
RaiseRealtimeDataChanged(candles.Count-1, category);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int search = candles.BinarySearch(candle, mComparer);
|
||||
if (search < 0)
|
||||
search = ~search;
|
||||
candles.Insert(search, candle);
|
||||
RaiseRealtimeDataChanged(search, category);
|
||||
}
|
||||
|
||||
double IInternalCandleData.GetMaxValue(int axis, bool dataValue)
|
||||
{
|
||||
return GetMaxValue(axis, dataValue);
|
||||
}
|
||||
|
||||
double IInternalCandleData.GetMinValue(int axis, bool dataValue)
|
||||
{
|
||||
return GetMinValue(axis, dataValue);
|
||||
}
|
||||
|
||||
public override void OnAfterDeserialize()
|
||||
{
|
||||
if (mSerializedData == null)
|
||||
return;
|
||||
mData.Clear();
|
||||
mSuspendEvents = true;
|
||||
for (int i = 0; i < mSerializedData.Length; i++)
|
||||
{
|
||||
SerializedCategory cat = mSerializedData[i];
|
||||
if (cat.Depth < 0)
|
||||
cat.Depth = 0f;
|
||||
string name = cat.Name;
|
||||
AddCategory3DCandle(name, cat.UpCandle, cat.DownCandle, cat.Depth);
|
||||
CategoryData data = (CategoryData)mData[name];
|
||||
data.Data.AddRange(cat.Data);
|
||||
data.MaxX = cat.MaxX;
|
||||
data.MaxY = cat.MaxY;
|
||||
data.MinX = cat.MinX;
|
||||
data.MinY = cat.MinY;
|
||||
}
|
||||
mSuspendEvents = false;
|
||||
}
|
||||
|
||||
public override void OnBeforeSerialize()
|
||||
{
|
||||
List<SerializedCategory> serialized = new List<SerializedCategory>();
|
||||
foreach (KeyValuePair<string, CategoryData> pair in mData.Select(x => new KeyValuePair<string, CategoryData>(x.Key, (CategoryData)x.Value)))
|
||||
{
|
||||
SerializedCategory cat = new SerializedCategory();
|
||||
cat.Name = pair.Key;
|
||||
cat.MaxX = pair.Value.MaxX;
|
||||
cat.MinX = pair.Value.MinX;
|
||||
cat.MaxY = pair.Value.MaxY;
|
||||
cat.MinY = pair.Value.MinY;
|
||||
cat.UpCandle = pair.Value.UpCandle;
|
||||
cat.DownCandle = pair.Value.DownCandle;
|
||||
cat.Depth = pair.Value.Depth;
|
||||
cat.Data = pair.Value.Data.ToArray();
|
||||
if (cat.Depth < 0)
|
||||
cat.Depth = 0f;
|
||||
serialized.Add(cat);
|
||||
}
|
||||
mSerializedData = serialized.ToArray();
|
||||
}
|
||||
|
||||
|
||||
public override BaseScrollableCategoryData GetDefaultCategory()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void InnerClearCategory(string category)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void AppendDatum(string category, MixedSeriesGenericValue value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void AppendDatum(string category, IList<MixedSeriesGenericValue> value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override bool AddCategory(string category, BaseScrollableCategoryData data)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
int IInternalCandleData.TotalCategories
|
||||
{
|
||||
get { return mData.Count; }
|
||||
}
|
||||
|
||||
event Action<int,string> IInternalCandleData.InternalRealTimeDataChanged
|
||||
{
|
||||
add
|
||||
{
|
||||
RealtimeDataChanged += value;
|
||||
}
|
||||
|
||||
remove
|
||||
{
|
||||
RealtimeDataChanged -= value;
|
||||
}
|
||||
}
|
||||
IEnumerable<CategoryData> IInternalCandleData.Categories
|
||||
{
|
||||
get
|
||||
{
|
||||
return mData.Values.Select(x => (CategoryData)x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8db3da49553a7d449f2082158192d56
|
||||
timeCreated: 1491152608
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,136 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
class CanvasCandle : MonoBehaviour, ICandleCreator
|
||||
{
|
||||
List<CandleChartData.CandleValue> mEmptyCandle = new List<CandleChartData.CandleValue>();
|
||||
HashSet<CanvasCandleGraphic> mOccupied = new HashSet<CanvasCandleGraphic>();
|
||||
CanvasCandleGraphic mCandle, mLine;
|
||||
CanvasCandleGraphic mOutline;
|
||||
/// <summary>
|
||||
/// The selected index is hovered about the specified point
|
||||
/// </summary>
|
||||
public event EventHandlingGraphic.GraphicEvent Hover;
|
||||
/// <summary>
|
||||
/// The selected index is clicked about the specified point
|
||||
/// </summary>
|
||||
public event EventHandlingGraphic.GraphicEvent Click;
|
||||
/// <summary>
|
||||
/// The currently hovered and selected objects are no longer selected or hovered.
|
||||
/// </summary>
|
||||
public event Action Leave;
|
||||
|
||||
private CanvasCandleGraphic CreateCandleGraphic()
|
||||
{
|
||||
GameObject obj = ChartCommon.CreateCanvasChartItem();
|
||||
CanvasCandleGraphic graphic = obj.AddComponent<CanvasCandleGraphic>();
|
||||
graphic.maskable = true;
|
||||
RectTransform rect = obj.GetComponent<RectTransform>();
|
||||
rect.SetParent(transform, false);
|
||||
rect.anchoredPosition = Vector3.zero;
|
||||
rect.rotation = Quaternion.identity;
|
||||
rect.localScale = new Vector3(1f, 1f, 1f);
|
||||
HookEventsForGraphic(graphic);
|
||||
return graphic;
|
||||
}
|
||||
|
||||
void HookEventsForGraphic(CanvasCandleGraphic graphic)
|
||||
{
|
||||
graphic.Hover += (index, type, data, position) => { Candle_Hover(graphic, index, type, data, position); };
|
||||
graphic.Click += (index, type, data, position) => { Candle_Click(graphic, index, type, data, position); }; ;
|
||||
graphic.Leave += () => { Candle_Leave(graphic); };
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
ChartCommon.SafeDestroy(mCandle);
|
||||
ChartCommon.SafeDestroy(mLine);
|
||||
ChartCommon.SafeDestroy(mOutline);
|
||||
}
|
||||
public void SetRefrenceIndex(int index)
|
||||
{
|
||||
if (mCandle != null)
|
||||
mCandle.SetRefrenceIndex(index);
|
||||
if (mLine != null)
|
||||
mCandle.SetRefrenceIndex(index);
|
||||
if (mOutline != null)
|
||||
mOutline.SetRefrenceIndex(index);
|
||||
|
||||
}
|
||||
public void Generate(CandleChart parent, Rect viewRect, IList<CandleChartData.CandleValue> value, CandleChartData.CandleSettings settings)
|
||||
{
|
||||
|
||||
if (parent.IsCanvas == false)
|
||||
{
|
||||
Debug.LogWarning("prefab is meant to be used with canvas candle chart only");
|
||||
return;
|
||||
}
|
||||
if (mCandle == null)
|
||||
mCandle = CreateCandleGraphic();
|
||||
if (settings.Fill == null || settings.CandleThicknessMultiplier < 0.0001f)
|
||||
mCandle.SetCandle(0, mEmptyCandle, settings);
|
||||
else
|
||||
mCandle.SetCandle(0, value, settings);
|
||||
mCandle.HoverTransform(transform);
|
||||
mCandle.SetViewRect(viewRect, new Rect());
|
||||
mCandle.SetHoverPrefab(settings.CandleHoverPrefab);
|
||||
mCandle.material = settings.Fill;
|
||||
|
||||
|
||||
if (mLine == null)
|
||||
mLine = CreateCandleGraphic();
|
||||
if (settings.Line == null || settings.LineThickness < 0.0001f)
|
||||
mLine.SetCandle(1, mEmptyCandle, settings);
|
||||
else
|
||||
mLine.SetCandle(1, value, settings);
|
||||
mLine.HoverTransform(transform);
|
||||
mLine.SetHoverPrefab(settings.CandleHoverPrefab);
|
||||
mLine.material = settings.Line;
|
||||
mLine.SetViewRect(viewRect, new Rect());
|
||||
|
||||
if (mOutline == null)
|
||||
mOutline = CreateCandleGraphic();
|
||||
mOutline.material = settings.Outline;
|
||||
mOutline.SetViewRect(viewRect, new Rect());
|
||||
if (settings.Outline == null || settings.OutlineThickness < 0.0001f)
|
||||
mOutline.SetCandle(2, mEmptyCandle, settings);
|
||||
else
|
||||
mOutline.SetCandle(2, value, settings);
|
||||
}
|
||||
|
||||
private void Candle_Leave(CanvasCandleGraphic graphic)
|
||||
{
|
||||
if (mOccupied.Remove(graphic))
|
||||
{
|
||||
if (mOccupied.Count == 0)
|
||||
{
|
||||
if (Leave != null)
|
||||
Leave();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Candle_Click(CanvasCandleGraphic graphic, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
mOccupied.Add(graphic);
|
||||
position = graphic.transform.TransformPoint(position);
|
||||
if (Click != null)
|
||||
Click(index, type, data, position);
|
||||
}
|
||||
|
||||
private void Candle_Hover(CanvasCandleGraphic graphic, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
mOccupied.Add(graphic);
|
||||
position = graphic.transform.TransformPoint(position);
|
||||
if (Hover != null)
|
||||
Hover(index, type, data, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 663704866ea20c443b89affc7c7efb2f
|
||||
timeCreated: 1491395378
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,548 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
class CanvasCandleChart : CandleChart
|
||||
{
|
||||
List<CandleChartData.CandleValue> mClipped = new List<CandleChartData.CandleValue>();
|
||||
List<CandleChartData.CandleValue> mTransformed = new List<CandleChartData.CandleValue>();
|
||||
List<CandleChartData.CandleValue> mCurrentSeries = new List<CandleChartData.CandleValue>();
|
||||
int mTmpCurrentIndex = 0;
|
||||
List<int> mUpToIndex = new List<int>();
|
||||
List<int> mDownToIndex = new List<int>();
|
||||
Dictionary<string, CategoryObject> mCategoryObjects = new Dictionary<string, CategoryObject>();
|
||||
|
||||
StringBuilder mRealtimeStringBuilder = new StringBuilder();
|
||||
HashSet<string> mOccupiedCateogies = new HashSet<string>();
|
||||
List<int> mTmpToRemove = new List<int>();
|
||||
private bool SupressRealtimeGeneration = false;
|
||||
|
||||
|
||||
|
||||
[SerializeField]
|
||||
private bool fitToContainer = false;
|
||||
public bool FitToContainer
|
||||
{
|
||||
get { return fitToContainer; }
|
||||
set
|
||||
{
|
||||
fitToContainer = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private ChartMagin fitMargin;
|
||||
public ChartMagin FitMargin
|
||||
{
|
||||
get { return fitMargin; }
|
||||
set
|
||||
{
|
||||
fitMargin = value;
|
||||
OnPropertyUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
protected override float TotalDepthLink
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool SupportRealtimeGeneration
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsCanvas
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class CategoryObject
|
||||
{
|
||||
public CanvasChartMesh mItemLabels;
|
||||
public CanvasCandle mUp;
|
||||
public CanvasCandle mDown;
|
||||
public Dictionary<int, string> mCahced = new Dictionary<int, string>();
|
||||
public HashSet<CanvasCandle> mOccupiedCandles = new HashSet<CanvasCandle>();
|
||||
private CanvasCandleChart mParent;
|
||||
/// <summary>
|
||||
/// The selected index is hovered about the specified point
|
||||
/// </summary>
|
||||
public event EventHandlingGraphic.GraphicEvent Hover;
|
||||
/// <summary>
|
||||
/// The selected index is clicked about the specified point
|
||||
/// </summary>
|
||||
public event EventHandlingGraphic.GraphicEvent Click;
|
||||
/// <summary>
|
||||
/// The currently hovered and selected objects are no longer selected or hovered.
|
||||
/// </summary>
|
||||
public event Action Leave;
|
||||
|
||||
public CategoryObject(CanvasCandleChart parent)
|
||||
{
|
||||
mParent = parent;
|
||||
}
|
||||
public void HookEvents()
|
||||
{
|
||||
HookEvents(mUp, true);
|
||||
HookEvents(mDown, false);
|
||||
}
|
||||
|
||||
void HookEvents(CanvasCandle candle, bool isUp)
|
||||
{
|
||||
if (candle == null)
|
||||
return;
|
||||
candle.Leave += () => mLeave(candle);
|
||||
candle.Hover += (index, type, data, position) => { mHover(candle, mParent.MapIndex(index, isUp), type, data, position); };
|
||||
candle.Click += (index, type, data, position) => { mClick(candle, mParent.MapIndex(index, isUp), type, data, position); };
|
||||
}
|
||||
|
||||
private void mClick(CanvasCandle candle, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
mOccupiedCandles.Add(candle);
|
||||
if (Click != null)
|
||||
Click(index, type, data, position);
|
||||
|
||||
}
|
||||
|
||||
private void mHover(CanvasCandle candle, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
mOccupiedCandles.Add(candle);
|
||||
if (Hover != null)
|
||||
Hover(index, type, data, position);
|
||||
}
|
||||
|
||||
private void mLeave(CanvasCandle candle)
|
||||
{
|
||||
if (mOccupiedCandles.Remove(candle))
|
||||
{
|
||||
if (mOccupiedCandles.Count == 0)
|
||||
{
|
||||
if (Leave != null)
|
||||
Leave();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override bool ShouldFitCanvas { get { return true; } }
|
||||
protected override FitType FitAspectCanvas
|
||||
{
|
||||
get
|
||||
{
|
||||
return FitType.Aspect;
|
||||
}
|
||||
}
|
||||
private CanvasCandle CreateDataObject(CandleChartData.CategoryData data, GameObject rectMask)
|
||||
{
|
||||
GameObject obj = new GameObject("Candles", typeof(RectTransform));
|
||||
ChartCommon.HideObject(obj, hideHierarchy);
|
||||
obj.AddComponent<ChartItem>();
|
||||
RectTransform t = obj.GetComponent<RectTransform>();
|
||||
obj.AddComponent<CanvasRenderer>();
|
||||
CanvasCandle candles = obj.AddComponent<CanvasCandle>();
|
||||
t.SetParent(rectMask.transform, false);
|
||||
t.localScale = new Vector3(1f, 1f, 1f);
|
||||
t.anchorMin = new Vector2(0f, 0f);
|
||||
t.anchorMax = new Vector2(1f, 1f);
|
||||
t.sizeDelta = new Vector2(0f, 0f);
|
||||
t.anchorMin = new Vector2(0f, 0f);
|
||||
t.anchorMax = new Vector2(0f, 0f);
|
||||
|
||||
t.anchoredPosition = Vector3.zero;
|
||||
return candles;
|
||||
}
|
||||
|
||||
protected override double GetCategoryDepth(string category)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
public override void GenerateRealtime()
|
||||
{
|
||||
if (SupressRealtimeGeneration)
|
||||
return;
|
||||
|
||||
base.GenerateRealtime();
|
||||
|
||||
double minX = ((IInternalCandleData)Data).GetMinValue(0, false);
|
||||
double minY = ((IInternalCandleData)Data).GetMinValue(1, false);
|
||||
double maxX = ((IInternalCandleData)Data).GetMaxValue(0, false);
|
||||
double maxY = ((IInternalCandleData)Data).GetMaxValue(1, false);
|
||||
|
||||
double xScroll = GetScrollOffset(0);
|
||||
double yScroll = GetScrollOffset(1);
|
||||
double xSize = maxX - minX;
|
||||
double ySize = maxY - minY;
|
||||
double xOut = minX + xScroll + xSize;
|
||||
double yOut = minY + yScroll + ySize;
|
||||
|
||||
DoubleVector3 min = new DoubleVector3(xScroll + minX, yScroll + minY);
|
||||
DoubleVector3 max = new DoubleVector3(xOut, yOut);
|
||||
|
||||
Rect viewRect = new Rect(0f, 0f, widthRatio, heightRatio);
|
||||
|
||||
ClearBillboardCategories();
|
||||
bool edit = false;
|
||||
|
||||
foreach (CandleChartData.CategoryData data in ((IInternalCandleData)Data).Categories)
|
||||
{
|
||||
CategoryObject obj = null;
|
||||
|
||||
if (mCategoryObjects.TryGetValue(data.Name, out obj) == false)
|
||||
continue;
|
||||
|
||||
mClipped.Clear();
|
||||
mTransformed.Clear();
|
||||
int refrenceIndex = ClipCandles(data.Data, mClipped);
|
||||
|
||||
TransformCandles(mClipped, mTransformed, viewRect, min, max);
|
||||
|
||||
if (data.Data.Count == 0 && ChartCommon.IsInEditMode)
|
||||
{
|
||||
edit = true;
|
||||
}
|
||||
|
||||
mTmpToRemove.Clear();
|
||||
int range = refrenceIndex + mClipped.Count;
|
||||
foreach (int key in obj.mCahced.Keys)
|
||||
{
|
||||
if (key < refrenceIndex || key > range)
|
||||
mTmpToRemove.Add(key);
|
||||
}
|
||||
|
||||
for (int i = 0; i < mTmpToRemove.Count; i++)
|
||||
obj.mCahced.Remove(mTmpToRemove[i]);
|
||||
|
||||
obj.mCahced.Remove(data.Data.Count - 1); // never store the last point cache , it might be intepolating by the realtime feature
|
||||
|
||||
if (data.Data.Count == 0)
|
||||
continue;
|
||||
|
||||
GenerateItemLabels(true, obj, data, viewRect, refrenceIndex, edit);
|
||||
|
||||
if (obj.mUp != null)
|
||||
{
|
||||
FillCurrentSeries(true, refrenceIndex);
|
||||
obj.mUp.Generate(this, viewRect, mCurrentSeries, data.UpCandle);
|
||||
}
|
||||
if (obj.mDown != null)
|
||||
{
|
||||
FillCurrentSeries(false, refrenceIndex);
|
||||
obj.mDown.Generate(this, viewRect, mCurrentSeries, data.DownCandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ClearChart()
|
||||
{
|
||||
base.ClearChart();
|
||||
ClearBillboard();
|
||||
mActiveTexts.Clear();
|
||||
mCategoryObjects.Clear();
|
||||
}
|
||||
|
||||
void GenerateItemLabels(bool realTime, CategoryObject categoryObj, CandleChartData.CategoryData data, Rect viewRect, int refrenceIndex, bool edit)
|
||||
{
|
||||
if (mItemLabels != null && mItemLabels.isActiveAndEnabled)
|
||||
{
|
||||
CanvasChartMesh m = null;
|
||||
if (realTime)
|
||||
{
|
||||
m = categoryObj.mItemLabels;
|
||||
if (m == null)
|
||||
return;
|
||||
m.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m = new CanvasChartMesh(true);
|
||||
m.RecycleText = true;
|
||||
categoryObj.mItemLabels = m;
|
||||
}
|
||||
|
||||
Rect textRect = viewRect;
|
||||
textRect.xMin -= 1f;
|
||||
textRect.yMin -= 1f;
|
||||
textRect.xMax += 1f;
|
||||
textRect.yMax += 1f;
|
||||
|
||||
for (int i = 0; i < mTransformed.Count; i++)
|
||||
{
|
||||
Vector2 pointValue = mTransformed[i].MidPoint.ToVector2();
|
||||
|
||||
if (textRect.Contains(pointValue) == false)
|
||||
continue;
|
||||
|
||||
CandleChartData.CandleValue candleVal = mTransformed[i];
|
||||
int candleIndex = i + refrenceIndex;
|
||||
if (edit == false)
|
||||
candleVal = data.Data[i + refrenceIndex];
|
||||
Vector3 labelPos = ((Vector3)pointValue) + new Vector3(mItemLabels.Location.Breadth, mItemLabels.Seperation, mItemLabels.Location.Depth);
|
||||
if (mItemLabels.Alignment == ChartLabelAlignment.Base)
|
||||
labelPos.y -= (float)mTransformed[i].MidPoint.y;
|
||||
|
||||
string toSet;
|
||||
if (realTime == false || categoryObj.mCahced.TryGetValue(candleIndex, out toSet) == false)
|
||||
{
|
||||
string Open = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Open, 0.0), mVerticalAxis, false);
|
||||
string Close = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Close, 0.0), mVerticalAxis, false);
|
||||
string High = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.High, 0.0), mVerticalAxis, false);
|
||||
string Low = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Low, 0.0), mVerticalAxis, false);
|
||||
string Start = StringFromAxisFormat(new DoubleVector3(candleVal.Start, candleVal.Open, 0.0), mHorizontalAxis, true);
|
||||
string Duration = StringFromAxisFormat(new DoubleVector3(candleVal.Duration, candleVal.Open, 0.0), mHorizontalAxis, true);
|
||||
FormatItem(mRealtimeStringBuilder, Open, Close, High, Low, Start, Duration);
|
||||
toSet = mItemLabels.TextFormat.Format(mRealtimeStringBuilder.ToString(), data.Name, "");
|
||||
categoryObj.mCahced[candleIndex] = toSet;
|
||||
}
|
||||
labelPos -= new Vector3(CanvasFitOffset.x * TotalWidth, CanvasFitOffset.y * TotalHeight, 0f);
|
||||
BillboardText billboard = m.AddText(this, mItemLabels.TextPrefab, transform, mItemLabels.FontSize, mItemLabels.FontSharpness, toSet, labelPos.x, labelPos.y, labelPos.z, 0f, null);
|
||||
TextController.AddText(billboard);
|
||||
AddBillboardText(data.Name, i + refrenceIndex, billboard);
|
||||
}
|
||||
|
||||
if (realTime)
|
||||
{
|
||||
m.DestoryRecycled();
|
||||
if (m.TextObjects != null)
|
||||
{
|
||||
foreach (BillboardText text in m.TextObjects)
|
||||
{
|
||||
((IInternalUse)this).InternalTextController.AddText(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bool UpPredicate(CandleChartData.CandleValue x)
|
||||
{
|
||||
if (x.isUp)
|
||||
mUpToIndex.Add(mTmpCurrentIndex);
|
||||
mTmpCurrentIndex++;
|
||||
return x.isUp;
|
||||
}
|
||||
bool DownPredicate(CandleChartData.CandleValue x)
|
||||
{
|
||||
if (x.isUp == false)
|
||||
mDownToIndex.Add(mTmpCurrentIndex);
|
||||
mTmpCurrentIndex++;
|
||||
return !x.isUp;
|
||||
}
|
||||
void FillCurrentSeries(bool isUp, int refrenceIndex)
|
||||
{
|
||||
mTmpCurrentIndex = refrenceIndex;
|
||||
mCurrentSeries.Clear();
|
||||
if (isUp)
|
||||
{
|
||||
mUpToIndex.Clear();
|
||||
mCurrentSeries.AddRange(mTransformed.Where(UpPredicate));
|
||||
}
|
||||
else
|
||||
{
|
||||
mDownToIndex.Clear();
|
||||
mCurrentSeries.AddRange(mTransformed.Where(DownPredicate));
|
||||
}
|
||||
}
|
||||
|
||||
int MapIndex(int index, bool isUp)
|
||||
{
|
||||
if (isUp)
|
||||
{
|
||||
if (mUpToIndex.Count <= index)
|
||||
return index;
|
||||
return mUpToIndex[index];
|
||||
}
|
||||
if (mDownToIndex.Count <= index)
|
||||
return index;
|
||||
return mDownToIndex[index];
|
||||
}
|
||||
|
||||
public override void InternalGenerateChart()
|
||||
{
|
||||
if (gameObject.activeInHierarchy == false)
|
||||
return;
|
||||
base.InternalGenerateChart();
|
||||
|
||||
if (FitToContainer)
|
||||
{
|
||||
RectTransform trans = GetComponent<RectTransform>();
|
||||
widthRatio = trans.rect.width;
|
||||
heightRatio = trans.rect.height;
|
||||
}
|
||||
ClearChart();
|
||||
|
||||
if (Data == null)
|
||||
return;
|
||||
GenerateAxis(true);
|
||||
|
||||
double minX = ((IInternalCandleData)Data).GetMinValue(0, false);
|
||||
double minY = ((IInternalCandleData)Data).GetMinValue(1, false);
|
||||
double maxX = ((IInternalCandleData)Data).GetMaxValue(0, false);
|
||||
double maxY = ((IInternalCandleData)Data).GetMaxValue(1, false);
|
||||
|
||||
double xScroll = GetScrollOffset(0);
|
||||
double yScroll = GetScrollOffset(1);
|
||||
double xSize = maxX - minX;
|
||||
double ySize = maxY - minY;
|
||||
double xOut = minX + xScroll + xSize;
|
||||
double yOut = minY + yScroll + ySize;
|
||||
|
||||
DoubleVector3 min = new DoubleVector3(xScroll + minX, yScroll + minY);
|
||||
DoubleVector3 max = new DoubleVector3(xOut, yOut);
|
||||
|
||||
Rect viewRect = new Rect(0f, 0f, widthRatio, heightRatio);
|
||||
|
||||
int total = ((IInternalCandleData)Data).TotalCategories + 1;
|
||||
bool edit = false;
|
||||
ClearBillboard();
|
||||
mActiveTexts.Clear();
|
||||
int index = 0;
|
||||
GameObject mask = CreateRectMask(viewRect);
|
||||
|
||||
foreach (CandleChartData.CategoryData data in ((IInternalCandleData)Data).Categories)
|
||||
{
|
||||
mClipped.Clear();
|
||||
mTransformed.Clear();
|
||||
int refrenceIndex = ClipCandles(data.Data, mClipped);
|
||||
|
||||
TransformCandles(mClipped, mTransformed, viewRect, min, max);
|
||||
|
||||
if (data.Data.Count == 0 && ChartCommon.IsInEditMode)
|
||||
{
|
||||
int tmpIndex = total - 1 - index;
|
||||
float low = (((float)tmpIndex) / (float)total);
|
||||
float high = (((float)tmpIndex + 1) / (float)total);
|
||||
float y1 = Mathf.Lerp(high, low, 0.6f);
|
||||
float y2 = Mathf.Lerp(high, low, 0.3f);
|
||||
mTransformed.Clear();
|
||||
mTransformed.Add(InterpolateCandleInRect(new CandleChartData.CandleValue(y1, high, low, y2, 0.1, 0.1), viewRect));
|
||||
mTransformed.Add(InterpolateCandleInRect(new CandleChartData.CandleValue(y1, low, high, y2, 0.5, 0.2), viewRect));
|
||||
edit = true;
|
||||
index++;
|
||||
}
|
||||
CategoryObject categoryObj = new CategoryObject(this);
|
||||
CanvasCandle up = CreateDataObject(data, mask);
|
||||
CanvasCandle down = CreateDataObject(data, mask);
|
||||
|
||||
FillCurrentSeries(true, refrenceIndex);
|
||||
up.Generate(this, viewRect, mCurrentSeries, data.UpCandle);
|
||||
|
||||
FillCurrentSeries(false, refrenceIndex);
|
||||
down.Generate(this, viewRect, mCurrentSeries, data.DownCandle);
|
||||
|
||||
string catName = data.Name;
|
||||
|
||||
categoryObj.mUp = up;
|
||||
categoryObj.mDown = down;
|
||||
categoryObj.HookEvents();
|
||||
|
||||
GenerateItemLabels(false, categoryObj, data, viewRect, refrenceIndex, edit);
|
||||
|
||||
categoryObj.Hover += (idx, t, d, pos) => { Category_Hover(catName, idx, t, d, pos); };
|
||||
categoryObj.Click += (idx, t, d, pos) => { Category_Click(catName, idx, t, d, pos); };
|
||||
categoryObj.Leave += () => { Category_Leave(catName); };
|
||||
mCategoryObjects[catName] = categoryObj;
|
||||
}
|
||||
}
|
||||
|
||||
void Category_Hover(string category, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
CandleChartData.CandleValue candle = Data.GetCandle(category, index);
|
||||
Dictionary<int, BillboardText> catgoryTexts;
|
||||
BillboardText b;
|
||||
|
||||
if (mTexts.TryGetValue(category, out catgoryTexts))
|
||||
{
|
||||
if (catgoryTexts.TryGetValue(index, out b))
|
||||
SelectActiveText(b);
|
||||
}
|
||||
Rect selection = new Rect();
|
||||
if (data != null && data is Rect)
|
||||
selection = (Rect)data;
|
||||
OnItemHoverted(new CandleEventArgs(index, type, selection, position, candle, category));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// handles click of the category
|
||||
/// </summary>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="position"></param>
|
||||
void Category_Click(string category, int index, int type, object data, Vector2 position)
|
||||
{
|
||||
CandleChartData.CandleValue candle = Data.GetCandle(category, index);
|
||||
Dictionary<int, BillboardText> catgoryTexts;
|
||||
BillboardText b;
|
||||
|
||||
if (mTexts.TryGetValue(category, out catgoryTexts))
|
||||
{
|
||||
if (catgoryTexts.TryGetValue(index, out b))
|
||||
SelectActiveText(b);
|
||||
}
|
||||
|
||||
Rect selection = new Rect();
|
||||
if (data != null && data is Rect)
|
||||
selection = (Rect)data;
|
||||
OnItemSelected(new CandleEventArgs(index, type, selection, position, candle, category));
|
||||
}
|
||||
|
||||
void Category_Leave(string cat)
|
||||
{
|
||||
TriggerActiveTextsOut();
|
||||
OnItemLeave(new CandleEventArgs(0, 0, new Rect(), new Vector3(), new CandleChartData.CandleValue(), cat),"none");
|
||||
}
|
||||
|
||||
protected override void OnItemHoverted(object userData)
|
||||
{
|
||||
base.OnItemHoverted(userData);
|
||||
var args = userData as CandleEventArgs;
|
||||
mOccupiedCateogies.Add(args.Category);
|
||||
}
|
||||
|
||||
protected override void OnItemSelected(object userData)
|
||||
{
|
||||
base.OnItemSelected(userData);
|
||||
var args = userData as CandleEventArgs;
|
||||
mOccupiedCateogies.Add(args.Category);
|
||||
}
|
||||
|
||||
protected override void OnItemLeave(object userData,string type)
|
||||
{
|
||||
//base.OnItemLeave(userData);
|
||||
CandleEventArgs args = userData as CandleEventArgs;
|
||||
if (args == null)
|
||||
return;
|
||||
|
||||
string category = args.Category;
|
||||
mOccupiedCateogies.Remove(category);
|
||||
mOccupiedCateogies.RemoveWhere(x => !Data.HasCategory(x));
|
||||
if (mOccupiedCateogies.Count == 0)
|
||||
{
|
||||
if (NonHovered != null)
|
||||
NonHovered.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
internal override void SetAsMixedSeries()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25a10981261111f4bbc2ed5f2cd476f7
|
||||
timeCreated: 1501868716
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,506 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
class CanvasCandleGraphic : EventHandlingGraphic
|
||||
{
|
||||
CandleChartData.CandleSettings mCandleSettings;
|
||||
List<CandleChartData.CandleValue> mCandles = new List<CandleChartData.CandleValue>();
|
||||
|
||||
int mPart;
|
||||
UIVertex[] mTmpVerts = new UIVertex[4];
|
||||
Vector2 mMin, mMax;
|
||||
|
||||
protected override Vector2 Min
|
||||
{
|
||||
get
|
||||
{
|
||||
return mMin;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Vector2 Max
|
||||
{
|
||||
get
|
||||
{
|
||||
return mMax;
|
||||
}
|
||||
}
|
||||
|
||||
protected Rect RectFromIndex(int index, int type, Rect Default)
|
||||
{
|
||||
if (index >= mCandles.Count)
|
||||
return Default;
|
||||
CandleChartData.CandleValue candle = mCandles[index];
|
||||
float max = (float)candle.Max;
|
||||
float min = (float)candle.Min;
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
|
||||
if (type == 0)
|
||||
return ChartCommon.RectFromCenter(mid, (float)mCandleSettings.LineThickness, max, (float)candle.High);
|
||||
if (type == 2)
|
||||
return ChartCommon.RectFromCenter(mid, (float)mCandleSettings.LineThickness, (float)candle.Low, min);
|
||||
return ChartCommon.RectFromCenter(mid, (float)(mCandleSettings.CandleThicknessMultiplier * candle.Duration), min, max);
|
||||
}
|
||||
|
||||
protected override void SetUpHoverObject(ChartItemEffect hover, int index, int type, object selectionData)
|
||||
{
|
||||
Rect selectionRect = (Rect)selectionData;
|
||||
selectionRect = RectFromIndex(index, type, selectionRect);
|
||||
hover.ItemData = selectionRect;
|
||||
SetupHoverObjectToRect(hover, index, type, selectionRect);
|
||||
}
|
||||
|
||||
protected void PickLine(Vector3 mouse, out int pickedIndex, out int pickedType, out object selectionData)
|
||||
{
|
||||
pickedIndex = -1;
|
||||
pickedType = -1;
|
||||
selectionData = null;
|
||||
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = mCandles[i];
|
||||
|
||||
float max = (float)candle.Max;
|
||||
float min = (float)candle.Min;
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
|
||||
Rect high = ChartCommon.RectFromCenter(mid, (float)mCandleSettings.LineThickness, max, (float)candle.High);
|
||||
Rect low = ChartCommon.RectFromCenter(mid, (float)mCandleSettings.LineThickness, (float)candle.Low, min);
|
||||
if (high.Contains(mouse))
|
||||
{
|
||||
selectionData = high;
|
||||
pickedType = 0;
|
||||
pickedIndex = i;
|
||||
return;
|
||||
}
|
||||
|
||||
if (low.Contains(mouse))
|
||||
{
|
||||
selectionData = low;
|
||||
pickedType = 2;
|
||||
pickedIndex = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void PickBody(Vector3 mouse, out int pickedIndex, out int pickedType, out object selectionData)
|
||||
{
|
||||
pickedIndex = -1;
|
||||
pickedType = -1;
|
||||
selectionData = null;
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = mCandles[i];
|
||||
float max = (float)candle.Max;
|
||||
float min = (float)candle.Min;
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
Rect Body = ChartCommon.RectFromCenter(mid, (float)(mCandleSettings.CandleThicknessMultiplier * candle.Duration), min, max);
|
||||
|
||||
if (Body.Contains(mouse))
|
||||
{
|
||||
selectionData = Body;
|
||||
pickedType = 1;
|
||||
pickedIndex = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Pick(Vector3 mouse, out int pickedIndex, out int pickedType, out object selectionData)
|
||||
{
|
||||
if (mPart == 0)
|
||||
PickBody(mouse, out pickedIndex, out pickedType, out selectionData);
|
||||
else
|
||||
PickLine(mouse, out pickedIndex, out pickedType, out selectionData);
|
||||
if (pickedIndex >= 0)
|
||||
pickedIndex += refrenceIndex;
|
||||
}
|
||||
|
||||
protected override float MouseInThreshold
|
||||
{
|
||||
get
|
||||
{
|
||||
return Sensitivity;
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearCandles()
|
||||
{
|
||||
mCandles = null;
|
||||
SetAllDirty();
|
||||
Rebuild(CanvasUpdate.PreRender);
|
||||
}
|
||||
|
||||
public void SetCandle(int part, IList<CandleChartData.CandleValue> candles, CandleChartData.CandleSettings settings)
|
||||
{
|
||||
mPart = part;
|
||||
mCandles.Clear();
|
||||
mCandles.AddRange(candles);
|
||||
mCandleSettings = settings;
|
||||
double minX = double.PositiveInfinity;
|
||||
double minY = double.PositiveInfinity;
|
||||
double maxX = double.NegativeInfinity;
|
||||
double maxY = double.NegativeInfinity;
|
||||
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
var candle = mCandles[i];
|
||||
minY = Math.Min(candle.LowBound, minY);
|
||||
maxY = Math.Max(candle.HighBound, maxY);
|
||||
minX = Math.Min(minX, candle.Start);
|
||||
maxX = Math.Max(maxX, candle.Start + candle.Duration);
|
||||
}
|
||||
mMin = new Vector2((float)minX, (float)minY);
|
||||
mMax = new Vector2((float)maxX, (float)maxY);
|
||||
|
||||
SetAllDirty();
|
||||
Rebuild(CanvasUpdate.PreRender);
|
||||
SetUpAllHoverObjects();
|
||||
|
||||
|
||||
}
|
||||
|
||||
IEnumerable<UIVertex> getOutline()
|
||||
{
|
||||
UIVertex v = new UIVertex();
|
||||
|
||||
if (mCandles == null)
|
||||
yield break;
|
||||
|
||||
float outlineThickness = (float)mCandleSettings.OutlineThickness * 0.5f;
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = mCandles[i];
|
||||
float max = (float)Math.Max(candle.Open, candle.Close);
|
||||
float min = (float)Math.Min(candle.Open, candle.Close);
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
float thickness = (float)(mCandleSettings.CandleThicknessMultiplier * candle.Duration * 0.5);
|
||||
|
||||
//long and dirty part the defines all the verices of the candle outline
|
||||
|
||||
//outline of the body
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid - thickness + outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid - thickness + outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
//outline of the body
|
||||
v.position = new Vector3(mid + thickness - outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid + thickness - outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
//outline of the high line
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness - outlineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness + outlineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness - outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness + outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
//outline of the high line
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness - outlineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness + outlineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness - outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness + outlineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
//outline of the low line
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness - outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness + outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness - outlineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness + outlineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
//outline of the low line
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness - outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness + outlineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness - outlineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness + outlineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
//outline of the low line connection with body
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, min + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, min + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, min - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, min - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
//outline of the low line connection with body
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, min + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, min + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, min - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, min - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
//outline of the high line connection with body
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, max - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, max - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - thickness - outlineThickness, max + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, max + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
//outline of the high line connection with body
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, max - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, max - outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + thickness + outlineThickness, max + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, max + outlineThickness, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
}
|
||||
}
|
||||
IEnumerable<UIVertex> getCandle()
|
||||
{
|
||||
UIVertex v = new UIVertex();
|
||||
|
||||
if (mCandles == null)
|
||||
yield break;
|
||||
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = mCandles[i];
|
||||
float max = (float)Math.Max(candle.Open, candle.Close);
|
||||
float min = (float)Math.Min(candle.Open, candle.Close);
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
float thickness = (float)(mCandleSettings.CandleThicknessMultiplier * candle.Duration * 0.5);
|
||||
|
||||
v.position = new Vector3(mid - thickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid + thickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid - thickness, min, 0f);
|
||||
v.uv0 = new Vector2(-0f, 1f);
|
||||
yield return v;
|
||||
v.position = new Vector3(mid + thickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<UIVertex> getLine()
|
||||
{
|
||||
UIVertex v = new UIVertex();
|
||||
if (mCandles == null)
|
||||
yield break;
|
||||
for (int i = 0; i < mCandles.Count; i++)
|
||||
{
|
||||
CandleChartData.CandleValue candle = mCandles[i];
|
||||
float max = (float)Math.Max(candle.Open, candle.Close);
|
||||
float min = (float)Math.Min(candle.Open, candle.Close);
|
||||
|
||||
float start = (float)candle.Start;
|
||||
float end = (float)(candle.Start + candle.Duration);
|
||||
float mid = (start + end) * 0.5f;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, (float)candle.High, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, max, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(0f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, min, 0f);
|
||||
v.uv0 = new Vector2(1f, 0f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid - (float)mCandleSettings.LineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(0f, 1f);
|
||||
yield return v;
|
||||
|
||||
v.position = new Vector3(mid + (float)mCandleSettings.LineThickness, (float)candle.Low, 0f);
|
||||
v.uv0 = new Vector2(1f, 1f);
|
||||
yield return v;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<UIVertex> getVerices()
|
||||
{
|
||||
if (mCandles == null)
|
||||
return new UIVertex[0];
|
||||
if (mPart == 0)
|
||||
return getCandle();
|
||||
else if (mPart == 1)
|
||||
return getLine();
|
||||
return getOutline();
|
||||
}
|
||||
|
||||
#if (!UNITY_5_2_0) && (!UNITY_5_2_1)
|
||||
protected override void OnPopulateMesh(VertexHelper vh)
|
||||
{
|
||||
base.OnPopulateMesh(vh);
|
||||
vh.Clear();
|
||||
int vPos = 0;
|
||||
foreach (UIVertex v in getVerices())
|
||||
{
|
||||
mTmpVerts[vPos++] = v;
|
||||
if (vPos == 4)
|
||||
{
|
||||
UIVertex tmp = mTmpVerts[2];
|
||||
mTmpVerts[2] = mTmpVerts[3];
|
||||
mTmpVerts[3] = tmp;
|
||||
vPos = 0;
|
||||
vh.AddUIVertexQuad(mTmpVerts);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#pragma warning disable 0672
|
||||
#if !UNITY_2017_1_OR_NEWER
|
||||
protected override void OnPopulateMesh(Mesh m)
|
||||
{
|
||||
WorldSpaceChartMesh mesh = new WorldSpaceChartMesh(1);
|
||||
int vPos = 0;
|
||||
foreach (UIVertex v in getVerices())
|
||||
{
|
||||
mTmpVerts[vPos++] = v;
|
||||
if (vPos == 4)
|
||||
{
|
||||
vPos = 0;
|
||||
|
||||
mesh.AddQuad(mTmpVerts[0], mTmpVerts[1], mTmpVerts[2], mTmpVerts[3]);
|
||||
}
|
||||
}
|
||||
mesh.ApplyToMesh(m);
|
||||
}
|
||||
#endif
|
||||
#pragma warning restore 0672
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05af876f1131be94d999a98f574aa820
|
||||
timeCreated: 1491155958
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
interface ICandleCreator
|
||||
{
|
||||
void Generate(CandleChart parent, Rect viewRect, IList<CandleChartData.CandleValue> value, CandleChartData.CandleSettings settings);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc37318de0ced4249a4f86d43c9799cc
|
||||
timeCreated: 1491395378
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
interface IInternalCandleData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="axis">0 for horizontal 1 for vertical</param>
|
||||
/// <returns></returns>
|
||||
double GetMinValue(int axis, bool dataValue);
|
||||
double GetMaxValue(int axis, bool dataValue);
|
||||
void OnBeforeSerialize();
|
||||
void OnAfterDeserialize();
|
||||
event EventHandler InternalDataChanged;
|
||||
event EventHandler InternalViewPortionChanged;
|
||||
event Action<int,string> InternalRealTimeDataChanged;
|
||||
int TotalCategories { get; }
|
||||
IEnumerable<CandleChartData.CategoryData> Categories { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aebb79a10b5864b48b9f8b096c53d48a
|
||||
timeCreated: 1501601469
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,101 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
|
||||
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using UnityEngine;
|
||||
|
||||
//namespace ChartAndGraph
|
||||
//{
|
||||
// class WorldSpaceCandle : MonoBehaviour, ICandleCreator
|
||||
// {
|
||||
// public GameObject Prefab = null;
|
||||
// GameObjectPool<ChartItem> mPooledCandles = new GameObjectPool<ChartItem>();
|
||||
// List<ChartItem> mCandles = new List<ChartItem>();
|
||||
|
||||
// class CandleObject
|
||||
// {
|
||||
// public GameObject upper;
|
||||
// public GameObject lower;
|
||||
// public GameObject body;
|
||||
// }
|
||||
|
||||
// GameObject CreatePrefab(Transform parent,float centerX, float fromY, float width, float toY)
|
||||
// {
|
||||
// GameObject obj = GameObject.Instantiate(Prefab);
|
||||
// ChartCommon.EnsureComponent<ChartItem>(obj);
|
||||
// obj.transform.SetParent((parent == null) ? transform : parent, true);
|
||||
// float centerY = (fromY + toY) * 0.5f;
|
||||
// float height = Mathf.Abs(fromY - toY);
|
||||
// obj.transform.position = new Vector3(centerX, centerY, 0f);
|
||||
// obj.transform.rotation = Quaternion.identity;
|
||||
// obj.transform.localScale = new Vector3(width * 2f, height, 1f);
|
||||
// return obj;
|
||||
// }
|
||||
|
||||
// ChartItem CreateCandle(CandleChartData.CandleValue candle, CandleChartData.CandleSettings settings)
|
||||
// {
|
||||
// float max = (float)candle.Max;
|
||||
// float min = (float)candle.Min;
|
||||
// float midX = (float)(candle.Start + (candle.Duration * 0.5));
|
||||
// // float midY = (max + min) * 0.5f;
|
||||
|
||||
// GameObject candleGameobj = ChartCommon.CreateChartItem();
|
||||
// candleGameobj.transform.SetParent(transform);
|
||||
// candleGameobj.transform.position = new Vector3(midX, 0f, 0f);
|
||||
// CandleObject candleObj = new CandleObject();
|
||||
|
||||
// candleObj.upper = CreatePrefab(candleGameobj.transform,0f, (float)candle.High, (float)settings.LineThickness, max);
|
||||
// candleObj.lower = CreatePrefab(candleGameobj.transform,0f, (float)candle.Low, (float)settings.LineThickness, min);
|
||||
// candleObj.body = CreatePrefab(candleGameobj.transform,0f, min, (float)settings.CandleThicknessMultiplier, max);
|
||||
|
||||
// SetMaterial(candleObj.upper, settings.Line);
|
||||
// SetMaterial(candleObj.lower, settings.Line);
|
||||
// SetMaterial(candleObj.body, settings.Fill);
|
||||
|
||||
// ChartItem t = candleGameobj.GetComponent<ChartItem>();
|
||||
// t.TagData = candleObj;
|
||||
|
||||
// return t;
|
||||
// }
|
||||
|
||||
// void ClearCandles()
|
||||
// {
|
||||
// for(int i=0; i<mCandles.Count; i++)
|
||||
// {
|
||||
// if (mCandles[i] != null)
|
||||
// {
|
||||
// ChartCommon.SafeDestroy(mCandles[i].gameObject);
|
||||
// }
|
||||
// }
|
||||
// mCandles.Clear();
|
||||
// mPooledCandles.DestoryAll();
|
||||
// }
|
||||
|
||||
// void SetMaterial(GameObject obj, Material mat)
|
||||
// {
|
||||
// Renderer rend = obj.GetComponent<Renderer>();
|
||||
// if (rend != null)
|
||||
// rend.material = mat;
|
||||
// }
|
||||
|
||||
// public void Generate(CandleChart parent,Rect viewRect, IList<CandleChartData.CandleValue> value, CandleChartData.CandleSettings settings)
|
||||
// {
|
||||
// if ((parent is ICanvas))
|
||||
// {
|
||||
// Debug.LogWarning("prefab is meant not meant to be used with canvas candle chart");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// ClearCandles();
|
||||
|
||||
// for (int i=0; i<value.Count; i++)
|
||||
// {
|
||||
// ChartItem candle = CreateCandle(value[i], settings);
|
||||
// mCandles.Add(candle);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 595feb9c9d841b044b53baa40a298e08
|
||||
timeCreated: 1491403646
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
partial class InfoBox
|
||||
{
|
||||
public CandleChart[] CandleChart;
|
||||
void CandleClicked(CandleChart.CandleEventArgs args)
|
||||
{
|
||||
if (args.IsBodyEvent)
|
||||
infoText.text = string.Format("{0} : Candle Body Clicked , O:{1},C:{2}", args.Category, args.CandleValue.Open, args.CandleValue.Close);
|
||||
if (args.IsHighEvent)
|
||||
infoText.text = string.Format("{0} : Candle High Clicked , H:{1}", args.Category, args.CandleValue.High);
|
||||
if (args.IsLowEvent)
|
||||
infoText.text = string.Format("{0} : Candle Low Clicked , L:{1}", args.Category, args.CandleValue.Low);
|
||||
}
|
||||
|
||||
void CandleHovered(CandleChart.CandleEventArgs args)
|
||||
{
|
||||
if (args.IsBodyEvent)
|
||||
infoText.text = string.Format("{0} : Candle Body , O:{1},C:{2}", args.Category, args.CandleValue.Open, args.CandleValue.Close);
|
||||
if (args.IsHighEvent)
|
||||
infoText.text = string.Format("{0} : Candle High , H:{1}", args.Category, args.CandleValue.High);
|
||||
if (args.IsLowEvent)
|
||||
infoText.text = string.Format("{0} : Candle Low , L:{1}", args.Category, args.CandleValue.Low);
|
||||
}
|
||||
|
||||
partial void HookCandle()
|
||||
{
|
||||
|
||||
if (CandleChart != null)
|
||||
{
|
||||
foreach (CandleChart candle in CandleChart)
|
||||
{
|
||||
if (candle == null)
|
||||
return;
|
||||
candle.CandleHovered.AddListener(CandleHovered);
|
||||
candle.CandleClicked.AddListener(CandleClicked);
|
||||
candle.NonHovered.AddListener(NonHovered);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 115c70417fd1518498b7c27119b85bc3
|
||||
timeCreated: 1559401806
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: caa1867a345999e4784987e59059e08e
|
||||
folderAsset: yes
|
||||
timeCreated: 1505900942
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
//using UnityEngine;
|
||||
//using System.Collections;
|
||||
//using ChartAndGraph;
|
||||
|
||||
//public partial class HoverText
|
||||
//{
|
||||
|
||||
// partial void HoverStart()
|
||||
// {
|
||||
// var candle = GetComponent<CandleChart>();
|
||||
// if (candle != null)
|
||||
// {
|
||||
// mChart = candle;
|
||||
// candle.CandleHovered.AddListener(CandleHover);
|
||||
// candle.NonHovered.AddListener(NonHover);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void CandleHover(CandleChart.CandleEventArgs args)
|
||||
// {
|
||||
// string data = "";
|
||||
// string open, high, low, close, start, duration;
|
||||
// ((CandleChart)mChart).FormatCandleValue(args.CandleValue, fractionDigits, out open, out high, out low, out close, out start, out duration);
|
||||
// if (args.IsBodyEvent)
|
||||
// data = ((CandleChart)mChart).FormatBody(open, close, high, low, start, duration);
|
||||
// else if (args.IsHighEvent)
|
||||
// data = ((CandleChart)mChart).FormatHigh(open, close, high, low, start, duration);
|
||||
// else if (args.IsLowEvent)
|
||||
// data = ((CandleChart)mChart).FormatLow(open, close, high, low, start, duration);
|
||||
// PopText(data, args.Position, true);
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4b3a5c7420d64a47ad65292ba0b1e82
|
||||
timeCreated: 1505900951
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93fe30b53aea5d54d9023365d0862fbf
|
||||
folderAsset: yes
|
||||
timeCreated: 1505898535
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53b9733d3a0d7df42a9b46408b2c0fcf
|
||||
folderAsset: yes
|
||||
timeCreated: 1505898540
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bb24616c76317d4caba008593941fe2
|
||||
folderAsset: yes
|
||||
timeCreated: 1504031547
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcfe38f0d03a9ed4ebae3515e70f68fd
|
||||
timeCreated: 1504031562
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5d64d3219460f94f9debf0631421462
|
||||
timeCreated: 1552401231
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b601d2a23361574782a1c81fdeaec5c
|
||||
folderAsset: yes
|
||||
timeCreated: 1579545472
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ca2380029f2d2d4fb6d52c953b75a26
|
||||
folderAsset: yes
|
||||
timeCreated: 1579476141
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 1
|
||||
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 5fd7a3824b7f1c1428babec7d1d4072b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.5764706, g: 0, b: 0.46666667, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a899f6ef1c3ae934da76be1b8288b26c
|
||||
timeCreated: 1579518166
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 2
|
||||
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 5fd7a3824b7f1c1428babec7d1d4072b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 0.7411765, b: 0.22352941, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c262250167779da499f76910637d7552
|
||||
timeCreated: 1579518166
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 3
|
||||
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 5fd7a3824b7f1c1428babec7d1d4072b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.89411765, g: 0, b: 0.4862745, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 992f5fc556b48144986d2304815cc367
|
||||
timeCreated: 1579518166
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 4
|
||||
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 5fd7a3824b7f1c1428babec7d1d4072b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 0.82012165, b: 0.89411765, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bec6f2a5195a7b54281bc09a23ae3dbd
|
||||
timeCreated: 1579544627
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,85 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Background1
|
||||
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailTex:
|
||||
m_Texture: {fileID: 2800000, guid: f696a252ecb06f0498d7a225181acd14, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 5fd7a3824b7f1c1428babec7d1d4072b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- PixelSnap: 0
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _Strength: 0.2
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba7e2530b20700c4ca957b37c45b6644
|
||||
timeCreated: 1579476150
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66fc84eeea993bc4a8feb32b430a9418
|
||||
folderAsset: yes
|
||||
timeCreated: 1579516305
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
@@ -0,0 +1,88 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c778d8a2225548419de42d717b06128
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 82431434e4e3af9458e3fe560bafb6ab
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,88 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09379c6e7e128984f849fec306377f51
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 27c257e796db0c6488e735ffaa79f5b8
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
@@ -0,0 +1,88 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0238f7f5583a83438645de4cddf6bbd
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 791824cc13df0e349b14e3c573314bc7
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,714 @@
|
||||
%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: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
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: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 0
|
||||
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: 0
|
||||
--- !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 &1112729708
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1112729713}
|
||||
- component: {fileID: 1112729712}
|
||||
- component: {fileID: 1112729710}
|
||||
- component: {fileID: 1112729709}
|
||||
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 &1112729709
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &1112729710
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1112729712
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
|
||||
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: 1
|
||||
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: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1112729713
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, 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 &1202179668
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1202179672}
|
||||
- component: {fileID: 1202179671}
|
||||
- component: {fileID: 1202179670}
|
||||
- component: {fileID: 1202179669}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1202179669
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2d49b7c1bcd2e07499844da127be038d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1202179670
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179671
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179672
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1237278566
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1237278567}
|
||||
- component: {fileID: 1237278569}
|
||||
- component: {fileID: 1237278568}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1237278567
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1237278566}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1237278568
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1237278566}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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: []
|
||||
m_Sprite: {fileID: 21300000, guid: 0ed00857906e8234ebe602f831824696, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1237278569
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1237278566}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1553072703
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1553072704}
|
||||
- component: {fileID: 1553072707}
|
||||
- component: {fileID: 1553072706}
|
||||
- component: {fileID: 1553072705}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1553072704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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: 1237278567}
|
||||
- {fileID: 1862691477}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
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}
|
||||
--- !u!114 &1553072705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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 &1553072706
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1553072707
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 1
|
||||
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!1 &1862691476
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1862691477}
|
||||
- component: {fileID: 1862691479}
|
||||
- component: {fileID: 1862691478}
|
||||
- component: {fileID: 1862691480}
|
||||
m_Layer: 0
|
||||
m_Name: Pyramid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1862691477
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
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:
|
||||
- {fileID: 1917072279}
|
||||
m_Father: {fileID: 1553072704}
|
||||
m_RootOrder: 1
|
||||
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: 300, y: 300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1862691478
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5d0cd7c0544e4cc439d4a030e8a7a470, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mPreviewObject: {fileID: 0}
|
||||
OnRedraw:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
keepOrthoSize: 0
|
||||
paperEffectText: 0
|
||||
vRSpaceText: 0
|
||||
vRSpaceScale: 0.1
|
||||
maintainLabelSize: 0
|
||||
ItemClicked:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
ItemHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
backMaterial: {fileID: 2100000, guid: ba7e2530b20700c4ca957b37c45b6644, type: 2}
|
||||
inset: 6.17
|
||||
justification: 2
|
||||
slope: 0
|
||||
prefab: {fileID: 11438898, guid: 798385cb58cab3041ac53c12c6997435, type: 3}
|
||||
Data:
|
||||
mCategories:
|
||||
- Name: Test
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: a899f6ef1c3ae934da76be1b8288b26c, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Base
|
||||
Text: A strong and solid base
|
||||
Image: {fileID: 21300000, guid: 1c778d8a2225548419de42d717b06128, type: 3}
|
||||
RightSlope: 25
|
||||
LeftSlope: 31.1
|
||||
HeightRatio: 1
|
||||
Alpha: 0.37
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
- Name: test2
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: c262250167779da499f76910637d7552, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Center
|
||||
Text: 'The very center '
|
||||
Image: {fileID: 21300000, guid: 09379c6e7e128984f849fec306377f51, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 0.73
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1.94
|
||||
- Name: test6
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: 992f5fc556b48144986d2304815cc367, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Top
|
||||
Text: the top
|
||||
Image: {fileID: 21300000, guid: f0238f7f5583a83438645de4cddf6bbd, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1.3
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
mGroups:
|
||||
- Pyramid
|
||||
mData:
|
||||
- GroupName: Pyramid
|
||||
ColumnName: Test
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test2
|
||||
Amount: 0.7300000190734863
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test6
|
||||
Amount: 1.2999999523162842
|
||||
--- !u!222 &1862691479
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1862691480
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3f8e5b63d2caba14993994657aeb9d90, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
AnimateOnStart: 1
|
||||
AnimationTime: 2
|
||||
--- !u!1 &1917072278
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1917072279}
|
||||
- component: {fileID: 1917072281}
|
||||
- component: {fileID: 1917072280}
|
||||
m_Layer: 0
|
||||
m_Name: textController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1917072279
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
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: 1862691477}
|
||||
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: -545, y: -306.5}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1917072280
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8c8bf670921e114bbea10f451c86392, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Camera: {fileID: 0}
|
||||
PlaneDistance: 20
|
||||
--- !u!114 &1917072281
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 55b5a59897c650342a9b23ff348a9992, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dc2b7473a651194992a7b904c024b32
|
||||
timeCreated: 1579447883
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,808 @@
|
||||
%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: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
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: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 0
|
||||
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: 0
|
||||
--- !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 &736079584
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 736079585}
|
||||
- component: {fileID: 736079587}
|
||||
- component: {fileID: 736079586}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &736079585
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &736079586
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.434, g: 0.428, b: 0.441, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: fd55c57177b598840808bf9df3e5d320, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &736079587
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &765119916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 765119917}
|
||||
- component: {fileID: 765119919}
|
||||
- component: {fileID: 765119918}
|
||||
m_Layer: 5
|
||||
m_Name: Image (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &765119917
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 1
|
||||
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 &765119918
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.191}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 5eaea410f68bc354881169a4123218e1, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &765119919
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &875557159
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 875557160}
|
||||
- component: {fileID: 875557162}
|
||||
- component: {fileID: 875557161}
|
||||
m_Layer: 0
|
||||
m_Name: textController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &875557160
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 875557159}
|
||||
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: 1862691477}
|
||||
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: -545, y: -306.5}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &875557161
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 875557159}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8c8bf670921e114bbea10f451c86392, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Camera: {fileID: 0}
|
||||
PlaneDistance: 20
|
||||
--- !u!114 &875557162
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 875557159}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 55b5a59897c650342a9b23ff348a9992, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1112729708
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1112729713}
|
||||
- component: {fileID: 1112729712}
|
||||
- component: {fileID: 1112729710}
|
||||
- component: {fileID: 1112729709}
|
||||
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 &1112729709
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &1112729710
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1112729712
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
|
||||
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: 1
|
||||
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: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1112729713
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, 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 &1202179668
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1202179672}
|
||||
- component: {fileID: 1202179671}
|
||||
- component: {fileID: 1202179670}
|
||||
- component: {fileID: 1202179669}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1202179669
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2d49b7c1bcd2e07499844da127be038d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1202179670
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179671
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179672
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1553072703
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1553072704}
|
||||
- component: {fileID: 1553072707}
|
||||
- component: {fileID: 1553072706}
|
||||
- component: {fileID: 1553072705}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1553072704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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: 736079585}
|
||||
- {fileID: 765119917}
|
||||
- {fileID: 1862691477}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
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}
|
||||
--- !u!114 &1553072705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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 &1553072706
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1553072707
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 1
|
||||
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!1 &1862691476
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1862691477}
|
||||
- component: {fileID: 1862691479}
|
||||
- component: {fileID: 1862691478}
|
||||
- component: {fileID: 1862691480}
|
||||
m_Layer: 0
|
||||
m_Name: Pyramid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1862691477
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
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:
|
||||
- {fileID: 875557160}
|
||||
m_Father: {fileID: 1553072704}
|
||||
m_RootOrder: 2
|
||||
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: 300, y: 300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1862691478
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5d0cd7c0544e4cc439d4a030e8a7a470, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mPreviewObject: {fileID: 0}
|
||||
OnRedraw:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
keepOrthoSize: 0
|
||||
paperEffectText: 0
|
||||
vRSpaceText: 0
|
||||
vRSpaceScale: 0.1
|
||||
maintainLabelSize: 0
|
||||
ItemClicked:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
ItemHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
backMaterial: {fileID: 2100000, guid: ba7e2530b20700c4ca957b37c45b6644, type: 2}
|
||||
inset: 6.17
|
||||
justification: 2
|
||||
slope: 0
|
||||
prefab: {fileID: 11403762, guid: df8d95aad3c82494d920ca9178332b0a, type: 3}
|
||||
Data:
|
||||
mCategories:
|
||||
- Name: Test
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: a899f6ef1c3ae934da76be1b8288b26c, type: 2}
|
||||
Hover: {r: 0, g: 0.04827571, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Base
|
||||
Text: A strong and solid base
|
||||
Image: {fileID: 21300000, guid: 1c778d8a2225548419de42d717b06128, type: 3}
|
||||
RightSlope: 25
|
||||
LeftSlope: 31.1
|
||||
HeightRatio: 1
|
||||
Alpha: 0.37
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
- Name: test2
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: c262250167779da499f76910637d7552, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Center
|
||||
Text: 'The very center '
|
||||
Image: {fileID: 21300000, guid: 09379c6e7e128984f849fec306377f51, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1.94
|
||||
- Name: test6
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: 992f5fc556b48144986d2304815cc367, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Top
|
||||
Text: tip top
|
||||
Image: {fileID: 21300000, guid: f0238f7f5583a83438645de4cddf6bbd, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
- Name: test4
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: bec6f2a5195a7b54281bc09a23ae3dbd, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Top
|
||||
Text: tip top
|
||||
Image: {fileID: 21300000, guid: f0238f7f5583a83438645de4cddf6bbd, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1.58
|
||||
Alpha: 1
|
||||
Scale: 0.73
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
mGroups:
|
||||
- Pyramid
|
||||
mData:
|
||||
- GroupName: Pyramid
|
||||
ColumnName: Test
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test2
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test6
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test4
|
||||
Amount: 1.5800000429153442
|
||||
--- !u!222 &1862691479
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1862691480
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3f8e5b63d2caba14993994657aeb9d90, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 2
|
||||
outSlope: 2
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
AnimateOnStart: 1
|
||||
AnimationTime: 2
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03e5cf6a61c3ec442b7585c573386558
|
||||
timeCreated: 1579536714
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91207cb8fe3cf174f83fc22b2459f29f
|
||||
folderAsset: yes
|
||||
timeCreated: 1505898510
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91841532711cecb44b8c4f0d73ffad56
|
||||
folderAsset: yes
|
||||
timeCreated: 1504359854
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using UnityEngine;
|
||||
using ChartAndGraph;
|
||||
|
||||
/// <summary>
|
||||
/// this tutorial follows the same pattern the graph tutorial goes. The only diffrence is that candle values are used.
|
||||
/// the values are in the follwing order : open high low close , start time , time durtaion
|
||||
/// </summary>
|
||||
public class CandleChartFeed : MonoBehaviour
|
||||
{
|
||||
float time = 3f;
|
||||
float x = 10f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
CandleChart candle = GetComponent<CandleChart>();
|
||||
if (candle != null)
|
||||
{
|
||||
candle.DataSource.StartBatch();
|
||||
candle.DataSource.ClearCategory("Player 1");
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
candle.DataSource.AddCandleToCategory("Player 1", new CandleChartData.CandleValue(Random.Range(5f, 10f), Random.Range(10f, 15f), Random.Range(0f, 5f), Random.Range(5f, 10f), i * 10f / 30f, Random.value * 10f / 30f));
|
||||
}
|
||||
|
||||
candle.DataSource.EndBatch();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
time -= Time.deltaTime;
|
||||
if (time <= 0)
|
||||
{
|
||||
time = 3f;
|
||||
x += 0.3f;
|
||||
CandleChart candle = GetComponent<CandleChart>();
|
||||
candle.DataSource.AddCandleToCategory("Player 1", new CandleChartData.CandleValue(Random.Range(5f, 10f), Random.Range(10f, 15f), Random.Range(0f, 5f), Random.Range(5f, 10f), x, Random.value * 10f / 30f), 1f);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a443a8b0aa95c294f8af741a4668151d
|
||||
timeCreated: 1504359855
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e17d3b367294aad4c86311cf61108a32
|
||||
timeCreated: 1505838971
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a66bffe76ea2be43ac614877910b797
|
||||
folderAsset: yes
|
||||
timeCreated: 1579545615
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using ChartAndGraph;
|
||||
|
||||
public class PyramidFeed : MonoBehaviour {
|
||||
|
||||
public Material newCategory;
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
var chart = GetComponent<PyramidChart>();
|
||||
chart.DataSource.AddCategory("New category", new ChartDynamicMaterial( newCategory,Color.blue,Color.white), "New", "and Fresh", null);
|
||||
chart.DataSource.SetCategoryHeightRatio("New category", 3f);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbb8241669e371448a3cde0b157afba8
|
||||
timeCreated: 1579545634
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,999 @@
|
||||
%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: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
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: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 0
|
||||
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: 0
|
||||
--- !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 &736079584
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 736079585}
|
||||
- component: {fileID: 736079587}
|
||||
- component: {fileID: 736079586}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &736079585
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &736079586
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.434, g: 0.428, b: 0.441, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: fd55c57177b598840808bf9df3e5d320, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &736079587
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 736079584}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &765119916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 765119917}
|
||||
- component: {fileID: 765119919}
|
||||
- component: {fileID: 765119918}
|
||||
m_Layer: 5
|
||||
m_Name: Image (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &765119917
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 1
|
||||
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 &765119918
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.191}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 5eaea410f68bc354881169a4123218e1, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &765119919
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765119916}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1112729708
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1112729713}
|
||||
- component: {fileID: 1112729712}
|
||||
- component: {fileID: 1112729710}
|
||||
- component: {fileID: 1112729709}
|
||||
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 &1112729709
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &1112729710
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1112729712
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
|
||||
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: 1
|
||||
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: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1112729713
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1112729708}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, 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 &1202179668
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1202179672}
|
||||
- component: {fileID: 1202179671}
|
||||
- component: {fileID: 1202179670}
|
||||
- component: {fileID: 1202179669}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1202179669
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2d49b7c1bcd2e07499844da127be038d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1202179670
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179671
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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 &1202179672
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1202179668}
|
||||
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: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1553072703
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1553072704}
|
||||
- component: {fileID: 1553072707}
|
||||
- component: {fileID: 1553072706}
|
||||
- component: {fileID: 1553072705}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1553072704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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: 736079585}
|
||||
- {fileID: 765119917}
|
||||
- {fileID: 1862691477}
|
||||
- {fileID: 1700345677}
|
||||
- {fileID: 1603263089}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
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}
|
||||
--- !u!114 &1553072705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
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 &1553072706
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1553072707
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1553072703}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 0}
|
||||
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!1 &1603263088
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1603263089}
|
||||
- component: {fileID: 1603263093}
|
||||
- component: {fileID: 1603263092}
|
||||
- component: {fileID: 1603263091}
|
||||
- component: {fileID: 1603263090}
|
||||
m_Layer: 5
|
||||
m_Name: Legend
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1603263089
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1603263088}
|
||||
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: 1553072704}
|
||||
m_RootOrder: 4
|
||||
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: 163.79, y: 80}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1603263090
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1603263088}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1603263091
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1603263088}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d84b02fbf02461b4d9e128564e9b62e6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
fontSize: 12
|
||||
CategoryImages: []
|
||||
legendItemPrefab: {fileID: 114000012660670322, guid: 806f4da7549adb2478fd5d395f187383,
|
||||
type: 3}
|
||||
chart: {fileID: 1862691478}
|
||||
--- !u!114 &1603263092
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1603263088}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 4
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!222 &1603263093
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1603263088}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1001 &1700345676
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1553072704}
|
||||
m_Modifications:
|
||||
- target: {fileID: 114000010483641462, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: PyramidChart.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114000010483641462, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: PyramidChart.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 1862691478}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 50
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 149c576c056be1345807a3dc94e006b2, type: 3}
|
||||
--- !u!224 &1700345677 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 224000012685174106, guid: 149c576c056be1345807a3dc94e006b2,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1700345676}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1862691476
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1862691477}
|
||||
- component: {fileID: 1862691479}
|
||||
- component: {fileID: 1862691478}
|
||||
- component: {fileID: 1862691480}
|
||||
m_Layer: 0
|
||||
m_Name: Pyramid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1862691477
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
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:
|
||||
- {fileID: 1917072279}
|
||||
m_Father: {fileID: 1553072704}
|
||||
m_RootOrder: 2
|
||||
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 &1862691478
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5d0cd7c0544e4cc439d4a030e8a7a470, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mPreviewObject: {fileID: 0}
|
||||
OnRedraw:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
keepOrthoSize: 0
|
||||
paperEffectText: 0
|
||||
vRSpaceText: 0
|
||||
vRSpaceScale: 0.1
|
||||
maintainLabelSize: 0
|
||||
ItemClicked:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
ItemHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonHovered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
backMaterial: {fileID: 2100000, guid: ba7e2530b20700c4ca957b37c45b6644, type: 2}
|
||||
inset: 6.17
|
||||
justification: 2
|
||||
slope: 0
|
||||
prefab: {fileID: 11403762, guid: df8d95aad3c82494d920ca9178332b0a, type: 3}
|
||||
Data:
|
||||
mCategories:
|
||||
- Name: Test
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: a899f6ef1c3ae934da76be1b8288b26c, type: 2}
|
||||
Hover: {r: 0, g: 0.04827571, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Base
|
||||
Text: A strong and solid base
|
||||
Image: {fileID: 21300000, guid: 1c778d8a2225548419de42d717b06128, type: 3}
|
||||
RightSlope: 25
|
||||
LeftSlope: 31.1
|
||||
HeightRatio: 1
|
||||
Alpha: 0.37
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
- Name: test2
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: c262250167779da499f76910637d7552, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Center
|
||||
Text: 'The very center '
|
||||
Image: {fileID: 21300000, guid: 09379c6e7e128984f849fec306377f51, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1.94
|
||||
- Name: test6
|
||||
Materials:
|
||||
Normal: {fileID: 2100000, guid: 992f5fc556b48144986d2304815cc367, type: 2}
|
||||
Hover: {r: 0, g: 0.047058824, b: 1, a: 1}
|
||||
Selected: {r: 1, g: 1, b: 1, a: 0}
|
||||
Title: Top
|
||||
Text: tip top
|
||||
Image: {fileID: 21300000, guid: f0238f7f5583a83438645de4cddf6bbd, type: 3}
|
||||
RightSlope: 15
|
||||
LeftSlope: 15
|
||||
HeightRatio: 1
|
||||
Alpha: 1
|
||||
Scale: 1
|
||||
ShiftX: 0
|
||||
ShiftY: 0
|
||||
PositionBlend: 1
|
||||
mGroups:
|
||||
- Pyramid
|
||||
mData:
|
||||
- GroupName: Pyramid
|
||||
ColumnName: Test
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test2
|
||||
Amount: 1
|
||||
- GroupName: Pyramid
|
||||
ColumnName: test6
|
||||
Amount: 1
|
||||
--- !u!222 &1862691479
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1862691480
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862691476}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cbb8241669e371448a3cde0b157afba8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
newCategory: {fileID: 2100000, guid: bec6f2a5195a7b54281bc09a23ae3dbd, type: 2}
|
||||
--- !u!1 &1917072278
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1917072279}
|
||||
- component: {fileID: 1917072281}
|
||||
- component: {fileID: 1917072280}
|
||||
m_Layer: 0
|
||||
m_Name: textController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1917072279
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
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: 1862691477}
|
||||
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: -545, y: -306.5}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1917072280
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8c8bf670921e114bbea10f451c86392, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Camera: {fileID: 0}
|
||||
PlaneDistance: 20
|
||||
--- !u!114 &1917072281
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 27
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1917072278}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 55b5a59897c650342a9b23ff348a9992, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01557104e9a7ceb4ebc9113290cef69f
|
||||
timeCreated: 1579545605
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user