Files
Magical-Jumping-Bean/Library/metadata/e9/e9a32780b69dcdb438da3e3f43202f54
T

101 lines
9.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¯ØÔž:rkÙÜKƒ­ãó4òEKPackages/com.unity.ugui/Tests/Runtime/LayoutGroup/LayoutGroupArrangement.csày¯LayoutGroupArrangementWusing System;
using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using UnityEngine.UI;
[TestFixture]
public class LayoutGroupArrangement
{
const float k_LayoutDefaultSize = 100f;
GameObject m_Canvas;
GameObject m_LayoutGameObject;
RectTransform m_Child1;
RectTransform m_Child2;
[SetUp]
public void TestSetup()
{
m_Canvas = new GameObject("Canvas", typeof(Canvas));
m_LayoutGameObject = new GameObject("LayoutGroup", typeof(RectTransform));
m_LayoutGameObject.transform.SetParent(m_Canvas.transform, false);
m_LayoutGameObject.GetComponent<RectTransform>().sizeDelta =
new Vector2(k_LayoutDefaultSize, k_LayoutDefaultSize);
m_Child1 = new GameObject("Child1").AddComponent<RectTransform>();
m_Child1.SetParent(m_LayoutGameObject.transform, false);
m_Child2 = new GameObject("Child2").AddComponent<RectTransform>();
m_Child2.SetParent(m_LayoutGameObject.transform, false);
}
[UnityTest]
[Category("RegressionTest")]
[Description("Nested GameObjects without a Layout Element will effect a Layout Group's arrangement (case 1026779)")]
public IEnumerator LayoutGroup_ShouldResizeChildren_AfterDisablingAndEnablingAnyChild(
[Values(typeof(HorizontalLayoutGroup), typeof(VerticalLayoutGroup))]
Type layoutGroup)
{
var layoutComponent = (HorizontalOrVerticalLayoutGroup)m_LayoutGameObject.AddComponent(layoutGroup);
layoutComponent.childForceExpandHeight = true;
layoutComponent.childForceExpandWidth = true;
layoutComponent.childControlHeight = true;
layoutComponent.childControlWidth = true;
Assert.That(m_LayoutGameObject.GetComponent<RectTransform>().sizeDelta,
Is.EqualTo(Vector2.one * k_LayoutDefaultSize),
"Layout's size should not change after adding the " + layoutGroup.Name);
yield return null;
// HorizontalLayoutGroup will rearrange the children to have width equal to half the layout's width.
var expectedWidth = layoutGroup == typeof(HorizontalLayoutGroup)
? k_LayoutDefaultSize / 2
: k_LayoutDefaultSize;
// VerticalLayoutGroup will rearrange the children to have height equal to half the layout's height.
var expectedHeight = layoutGroup == typeof(VerticalLayoutGroup) ? k_LayoutDefaultSize / 2 : k_LayoutDefaultSize;
Assert.That(m_Child1.sizeDelta.x, Is.EqualTo(expectedWidth),
"Adding " + layoutGroup.Name + " did not resize the first child.");
Assert.That(m_Child1.sizeDelta.y, Is.EqualTo(expectedHeight),
"Adding " + layoutGroup.Name + " did not resize the first child.");
Assert.That(m_Child2.sizeDelta, Is.EqualTo(m_Child1.sizeDelta), "Both children should be of the same size.");
// Disable the second child and verify that the first child is resized to have size equal to the layout's size.
m_Child2.gameObject.SetActive(false);
yield return null;
Assert.That(m_Child1.sizeDelta.x, Is.EqualTo(k_LayoutDefaultSize),
layoutGroup.Name + " did not resize the first child after disabling the second child.");
Assert.That(m_Child1.sizeDelta.y, Is.EqualTo(k_LayoutDefaultSize),
layoutGroup.Name + " did not resize the first child after disabling the second child.");
// Enable the second child and verify that the first child is resized to the expected width/height.
m_Child2.gameObject.SetActive(true);
yield return null;
Assert.That(m_Child1.sizeDelta.x, Is.EqualTo(expectedWidth),
layoutGroup.Name + " did not resize the first child after enabling the second child.");
Assert.That(m_Child1.sizeDelta.y, Is.EqualTo(expectedHeight),
layoutGroup.Name + " did not resize the first child after enabling the second child.");
Assert.That(m_Child2.sizeDelta, Is.EqualTo(m_Child1.sizeDelta), "Both children should be of the same size.");
}
[TearDown]
public void TearDown()
{