Files
Magical-Jumping-Bean/Library/metadata/c3/c32df609537c54c46adf92992a673693
T

90 lines
8.2 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í Ì2019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ¦€²Ð¦¦¦€#¦€+H€3ÿÿÿÿ1€1€ÿÿÿÿ@Þ Q€j
H€<ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jÕ€Iÿÿÿÿ1€1€ÿÿÿÿÀÞH€j€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€j€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ¦€²
E Þ€#.€,5a Þ€#.€,€r Þ€# .€,
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jñ€JÿÿÿÿÀ1€1€ÿÿÿÿÞ€j€ÿÿÿÿ\€ÿÿÿÿH€rÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€wÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ€#!.€,"€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ%.€j&Õ€“ÿÿÿÿ'1€1€ÿÿÿÿ(ÀÞ)€j€ÿÿÿÿ*H€›€ÿÿÿÿ+1€1€ÿÿÿÿ,@Þ-Q€j.y
 /Þ€#0.€,1 €§2@¾€¶ 3@Þ€#4.€,5H€»ÿÿÿÿ61€1€ÿÿÿÿ7@Þ8Q€j9H€Æÿÿÿÿ:1€1€ÿÿÿÿ;@Þ<Q€j=H€Øÿÿÿÿ>1€1€ÿÿÿÿ?@Þ@Q€jAMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×ÜZ56 :!@iÁJ*€7€ÿÿÿÿ¦€²E Þ.(a Þ.€r Þ .
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jH€ê€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jñ€=ÿÿÿÿ1€1€ÿÿÿÿÞ€j€ÿÿÿÿH€›€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ.y€Q Þ. Þ€X!H€iÿÿÿÿ"1€1€ÿÿÿÿ#@Þ$Q€j%H€uÿÿÿÿ&1€1€ÿÿÿÿ'@Þ(Q€j)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacetx\ày¯Øä <Òo5ÇEL¦ý)™¢vc9IPackages/com.unity.ugui/Tests/Runtime/Canvas/SiblingOrderChangesLayout.csày¯SiblingOrderChangesLayout] using UnityEngine;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
using UnityEngine.UI;
[TestFixture]
[Category("RegressionTest")]
[Description("Case 723062")]
public class SiblingOrderChangesLayout
{
GameObject m_CanvasGO;
GameObject m_ParentGO;
GameObject m_Child1GO;
GameObject m_Child2GO;
[SetUp]
public void TestSetup()
{
m_CanvasGO = new GameObject("Canvas", typeof(Canvas));
m_ParentGO = new GameObject("ParentRenderer");
m_Child1GO = CreateTextObject("ChildRenderer1");
m_Child2GO = CreateTextObject("ChildRenderer2");
#if UNITY_EDITOR
UnityEditor.EditorApplication.ExecuteMenuItem("Window/General/Game");
#endif
}
[UnityTest]
public IEnumerator ReorderingSiblingChangesLayout()
{
m_ParentGO.transform.SetParent(m_CanvasGO.transform);
m_Child1GO.transform.SetParent(m_ParentGO.transform);
m_Child2GO.transform.SetParent(m_ParentGO.transform);
m_ParentGO.AddComponent<CanvasRenderer>();
m_ParentGO.AddComponent<RectTransform>();
m_ParentGO.AddComponent<VerticalLayoutGroup>();
m_ParentGO.AddComponent<ContentSizeFitter>();
yield return new WaitForEndOfFrame();
Vector2 child1Pos = m_Child1GO.GetComponent<RectTransform>().anchoredPosition;
Vector2 child2Pos = m_Child2GO.GetComponent<RectTransform>().anchoredPosition;
Assert.That(child1Pos, Is.Not.EqualTo(child2Pos));
Assert.That(m_Child1GO.GetComponent<CanvasRenderer>().hasMoved, Is.False, "CanvasRenderer.hasMoved should be false");
m_Child2GO.transform.SetAsFirstSibling();
Canvas.ForceUpdateCanvases();
Assert.That(m_Child1GO.GetComponent<CanvasRenderer>().hasMoved, Is.True, "CanvasRenderer.hasMoved should be true");
Vector2 newChild1Pos = m_Child1GO.GetComponent<RectTransform>().anchoredPosition;
Vector2 newChild2Pos = m_Child2GO.GetComponent<RectTransform>().anchoredPosition;
Assert.That(newChild1Pos, Is.EqualTo(child2Pos), "Child1 should have moved to Child2's position");
Assert.That(newChild2Pos, Is.EqualTo(child1Pos), "Child2 should have moved to Child1's position");
}
[TearDown]
public void TearDown()
{
GameObject.DestroyImmediate(m_CanvasGO);
}
// Factory method for creating UI text objects taken from the original bug repro scene:
private GameObject CreateTextObject(string name)
{
GameObject outputTextGameObject = new GameObject("OutputContent", typeof(CanvasRenderer));
RectTransform outputTextTransform = outputTextGameObject.AddComponent<RectTransform>();
outputTextTransform.pivot = new Vector2(0.5f, 0);
outputTextTransform.anchorMin = Vector2.zero;
outputTextTransform.anchorMax = new Vector2(1, 0);
outputTextTransform.anchoredPosition = Vector2.zero;
outputTextTransform.sizeDelta = Vector2.zero;
Text outputText = outputTextGameObject.AddComponent<Text>();
outputText.text = "Hello World!";
outputTextGameObject.name = name;