尺寸变化时自动调整按钮位置

This commit is contained in:
monitor1394
2018-09-12 07:17:57 +08:00
parent 8e15425fdf
commit 75c1fcb1bc
2 changed files with 73 additions and 603 deletions

View File

@@ -134,6 +134,8 @@ namespace xchart
private int graduationCount = 4;
[SerializeField]
private int graduationStep = 10;
[SerializeField]
private int graduationWidth = 50;
private float arrowLen = 10;
private float arrowSize = 6;
@@ -150,8 +152,9 @@ namespace xchart
private bool isShowAll;
private List<Text> graduationList = new List<Text>();
private Dictionary<string, LineData> lineMap = new Dictionary<string, LineData>();
private float lastMax = 0;
private float lastHig = 0;
private float lastMaxData = 0;
private float lastChartHig = 0;
private float lastGraduationWid = 0;
protected override void Awake()
{
@@ -165,7 +168,8 @@ namespace xchart
line.dataList.Clear();
if (line.button)
{
line.button.GetComponent<Image>().color = line.visible ? line.lineColor : Color.grey;
Color bcolor = line.visible ? line.lineColor : Color.grey;
line.button.GetComponent<Image>().color = bcolor;
line.button.GetComponentInChildren<Text>().text = line.name;
line.button.onClick.AddListener(delegate ()
{
@@ -261,7 +265,7 @@ namespace xchart
rect.anchorMax = Vector2.zero;
rect.anchorMin = Vector2.zero;
rect.pivot = Vector2.zero;
rect.sizeDelta = new Vector2(50, 20);
rect.sizeDelta = new Vector2(50-1, 20);
rect.localPosition = new Vector3(i*50, chartHigh + 30, 0);
Button btn = goBtn.GetComponent<Button>();
lineList[i].button = btn;
@@ -295,7 +299,7 @@ namespace xchart
goTxt.AddComponent<Text>();
Text txtg1 = goTxt.GetComponent<Text>();
txtg1.font = font;
txtg1.text = "显示";
txtg1.text = "SHOW";
txtg1.alignment = TextAnchor.MiddleCenter;
}
RectTransform rect = goBtn.GetComponent<RectTransform>();
@@ -303,17 +307,17 @@ namespace xchart
{
rect = goBtn.AddComponent<RectTransform>();
}
rect.anchorMax = new Vector2(1, 0);
rect.anchorMin = new Vector2(1, 0);
rect.pivot = new Vector2(1, 0);
rect.sizeDelta = new Vector2(50, 20);
rect.localPosition = new Vector3(0, chartHigh + 30, 0);
rect.anchorMax = Vector2.zero;
rect.anchorMin = Vector2.zero;
rect.pivot = Vector2.zero;
rect.sizeDelta = new Vector2(graduationWidth-1, 20);
rect.localPosition = new Vector3(-graduationWidth, chartHigh + 30, 0);
btnAll = goBtn.GetComponent<Button>();
btnAll.GetComponent<Image>().color = backgroundColor;
btnAll.onClick.AddListener(delegate ()
{
isShowAll = !isShowAll;
btnAll.GetComponentInChildren<Text>().text = isShowAll ? "隐藏" : "显示";
btnAll.GetComponentInChildren<Text>().text = isShowAll ? "HIDE" : "SHOW";
foreach(var line in lineList)
{
line.visible = isShowAll;
@@ -332,6 +336,7 @@ namespace xchart
AddPoint("rtt", Random.Range(15, 30));
AddPoint("ping", Random.Range(0, 100));
}
CheckLineSizeChange();
}
void OnClickButton(string key)
@@ -343,7 +348,7 @@ namespace xchart
line.step = graduationStep;
line.UpdateMinMax();
}
UpdateGradution();
CheckMaxDataChange();
UpdateMesh();
}
@@ -400,7 +405,7 @@ namespace xchart
LineData line = lineMap[key];
line.AddData(point, GetMaxPointCount());
UpdateMesh();
UpdateGradution();
CheckMaxDataChange();
}
public void ResetDataStart()
@@ -429,7 +434,7 @@ namespace xchart
line.UpdateMinMax();
}
UpdateMesh();
UpdateGradution();
CheckMaxDataChange();
}
private void UpdateMesh()
@@ -439,27 +444,49 @@ namespace xchart
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, (int)size.x);
}
private void UpdateGradution()
private void CheckLineSizeChange()
{
float chartHig = rectTransform.sizeDelta.y;
if (lastChartHig != chartHig)
{
lastChartHig = chartHig;
//update graduation pos
for (int i = 0; i < graduationList.Count; i++)
{
Vector3 pos = graduationList[i].rectTransform.localPosition;
float posY = lastChartHig * i / (graduationList.Count - 1);
graduationList[i].rectTransform.localPosition = new Vector3(pos.x, posY, pos.z);
}
//update line button pos
btnAll.transform.localPosition = new Vector3(-graduationWidth, chartHig + 30, 0);
for (int i = 0; i < lineList.Count; i++)
{
LineData line = lineList[i];
if (line.button)
{
line.button.transform.localPosition = new Vector3(i * 50, chartHig + 30, 0);
}
}
}
if(lastGraduationWid != graduationWidth)
{
lastGraduationWid = graduationWidth;
btnAll.GetComponent<RectTransform>().sizeDelta = new Vector2(graduationWidth, 20);
btnAll.transform.localPosition = new Vector3(-graduationWidth, chartHig + 30, 0);
}
}
private void CheckMaxDataChange()
{
float dataMax = GetAllLineMax();
if (lastMax != dataMax)
if (lastMaxData != dataMax)
{
lastMax = dataMax;
lastMaxData = dataMax;
for (int i = 0; i < graduationList.Count; i++)
{
graduationList[i].text = ((int)(dataMax * i / graduationList.Count)).ToString();
}
}
float chartHigh = rectTransform.sizeDelta.y;
if (lastHig != chartHigh)
{
lastHig = chartHigh;
for (int i = 0; i < graduationList.Count; i++)
{
Vector3 pos = graduationList[i].rectTransform.localPosition;
graduationList[i].rectTransform.localPosition = new Vector3(pos.x, lastHig * i / (graduationList.Count-1), pos.z);
}
}
}
protected override void OnPopulateMesh(VertexHelper vh)
@@ -469,10 +496,10 @@ namespace xchart
int chartWid = (int)(rectTransform.sizeDelta.x / pointWidth) * pointWidth;
float dataMax = GetAllLineMax();
// draw bg
Vector3 p1 = new Vector3(-50, chartHigh + 30);
Vector3 p1 = new Vector3(-graduationWidth, chartHigh + 30);
Vector3 p2 = new Vector3(chartWid + 50, chartHigh + 30);
Vector3 p3 = new Vector3(chartWid + 50, -20);
Vector3 p4 = new Vector3(-50, -20);
Vector3 p4 = new Vector3(-graduationWidth, -20);
DrawCube(vh, p1, p2, p3, p4, backgroundColor);
// draw coordinate
Vector3 coordZero = Vector3.zero;

View File

@@ -449,7 +449,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 530637865}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -33, y: 20, z: 0}
m_LocalPosition: {x: -33, y: 25, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1297066860}
@@ -457,7 +457,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -33, y: 20}
m_AnchoredPosition: {x: -33, y: 25}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &530637867
@@ -492,7 +492,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 11
m_Text: 8
--- !u!222 &530637868
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -561,117 +561,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &672658513
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 672658514}
- component: {fileID: 672658517}
- component: {fileID: 672658516}
- component: {fileID: 672658515}
m_Layer: 0
m_Name: button2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &672658514
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 672658513}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 100, y: 130, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 988473382}
m_Father: {fileID: 1297066860}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 100, y: 130}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0, y: 0}
--- !u!114 &672658515
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 672658513}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 672658516}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &672658516
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 672658513}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.89705884, g: 0.04617214, b: 0.8735863, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!222 &672658517
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 672658513}
--- !u!1 &954306449
GameObject:
m_ObjectHideFlags: 0
@@ -696,7 +585,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 954306449}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -33, y: 40, z: 0}
m_LocalPosition: {x: -33, y: 50, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1297066860}
@@ -704,7 +593,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -33, y: 40}
m_AnchoredPosition: {x: -33, y: 50}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &954306451
@@ -739,87 +628,13 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 23
m_Text: 16
--- !u!222 &954306452
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 954306449}
--- !u!1 &988473381
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 988473382}
- component: {fileID: 988473384}
- component: {fileID: 988473383}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &988473382
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 988473381}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 25, y: 10, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 672658514}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &988473383
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 988473381}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PING
--- !u!222 &988473384
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 988473381}
--- !u!1 &1008807759
GameObject:
m_ObjectHideFlags: 0
@@ -844,7 +659,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1008807759}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -33, y: 60, z: 0}
m_LocalPosition: {x: -33, y: 75, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1297066860}
@@ -852,7 +667,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -33, y: 60}
m_AnchoredPosition: {x: -33, y: 75}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1008807761
@@ -887,235 +702,13 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 35
m_Text: 24
--- !u!222 &1008807762
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1008807759}
--- !u!1 &1026794233
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1026794234}
- component: {fileID: 1026794237}
- component: {fileID: 1026794236}
- component: {fileID: 1026794235}
m_Layer: 0
m_Name: button1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1026794234
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1026794233}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 50, y: 130, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1557497569}
m_Father: {fileID: 1297066860}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 50, y: 130}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1026794235
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1026794233}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1026794236}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1026794236
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1026794233}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.77205884, b: 0.1650608, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!222 &1026794237
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1026794233}
--- !u!1 &1205280153
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1205280154}
- component: {fileID: 1205280157}
- component: {fileID: 1205280156}
- component: {fileID: 1205280155}
m_Layer: 0
m_Name: button0
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1205280154
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1205280153}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 130, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1349897915}
m_Father: {fileID: 1297066860}
m_RootOrder: 6
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: 130}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1205280155
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1205280153}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1205280156}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1205280156
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1205280153}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.334077, g: 0.2794118, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!222 &1205280157
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1205280153}
--- !u!1 &1256963132
GameObject:
m_ObjectHideFlags: 0
@@ -1140,7 +733,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1256963132}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -33, y: 80, z: 0}
m_LocalPosition: {x: -33, y: 100, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1297066860}
@@ -1148,7 +741,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -33, y: 80}
m_AnchoredPosition: {x: -33, y: 100}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1256963134
@@ -1183,7 +776,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 46
m_Text: 32
--- !u!222 &1256963135
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -1223,9 +816,6 @@ RectTransform:
- {fileID: 1008807760}
- {fileID: 1256963133}
- {fileID: 2050447234}
- {fileID: 1205280154}
- {fileID: 1026794234}
- {fileID: 672658514}
m_Father: {fileID: 2051892027}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1258,6 +848,7 @@ MonoBehaviour:
pointSize: 1.5
graduationCount: 4
graduationStep: 10
graduationWidth: 50
backgroundColor: {r: 0, g: 0, b: 0, a: 0.559}
font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
lineList:
@@ -1265,171 +856,23 @@ MonoBehaviour:
key: fps
lineColor: {r: 0.334077, g: 0.2794118, b: 1, a: 1}
pointColor: {r: 1, g: 1, b: 1, a: 1}
button: {fileID: 1205280155}
button: {fileID: 0}
- name: RTT
key: rtt
lineColor: {r: 0, g: 0.77205884, b: 0.1650608, a: 1}
pointColor: {r: 1, g: 1, b: 1, a: 1}
button: {fileID: 1026794235}
button: {fileID: 0}
- name: PING
key: ping
lineColor: {r: 0.89705884, g: 0.04617214, b: 0.8735863, a: 1}
pointColor: {r: 1, g: 1, b: 1, a: 1}
button: {fileID: 672658515}
button: {fileID: 0}
--- !u!222 &1297066862
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1297066859}
--- !u!1 &1349897914
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1349897915}
- component: {fileID: 1349897917}
- component: {fileID: 1349897916}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1349897915
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1349897914}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 25, y: 10, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1205280154}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1349897916
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1349897914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: FPS
--- !u!222 &1349897917
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1349897914}
--- !u!1 &1557497568
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1557497569}
- component: {fileID: 1557497571}
- component: {fileID: 1557497570}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1557497569
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1557497568}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 25, y: 10, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1026794234}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1557497570
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1557497568}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: RTT
--- !u!222 &1557497571
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1557497568}
--- !u!1 &2050447233
GameObject:
m_ObjectHideFlags: 0
@@ -1446,7 +889,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &2050447234
RectTransform:
m_ObjectHideFlags: 0