| | 1 | | using DCL.Components; |
| | 2 | | using DCL.Helpers; |
| | 3 | | using DCL.Models; |
| | 4 | | using NUnit.Framework; |
| | 5 | | using System.Collections; |
| | 6 | | using UnityEngine; |
| | 7 | | using UnityEngine.TestTools; |
| | 8 | | using UnityEngine.UI; |
| | 9 | |
|
| | 10 | | namespace Tests |
| | 11 | | { |
| | 12 | | public class UIContainerStackTests : UITestsBase |
| | 13 | | { |
| | 14 | | [UnityTest] |
| | 15 | | public IEnumerator PropertiesAreAppliedCorrectly() |
| | 16 | | { |
| | 17 | | // Create UIScreenSpaceShape |
| 1 | 18 | | UIScreenSpace screenSpaceShape = |
| | 19 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 20 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 21 | | yield return screenSpaceShape.routine; |
| | 22 | |
|
| | 23 | | // Create UIContainerStack |
| 1 | 24 | | UIContainerStack uiContainerStack = |
| | 25 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 26 | | CLASS_ID.UI_CONTAINER_STACK); |
| 1 | 27 | | yield return uiContainerStack.routine; |
| | 28 | |
|
| 1 | 29 | | UnityEngine.UI.Image image = uiContainerStack.referencesContainer.image; |
| | 30 | |
|
| | 31 | | // Check default properties are applied correctly |
| 1 | 32 | | Assert.IsTrue(image.color == new Color(0f, 0f, 0f, 0f)); |
| 1 | 33 | | Assert.IsTrue(uiContainerStack.referencesContainer.canvasGroup.blocksRaycasts); |
| 1 | 34 | | Assert.AreEqual(100f, uiContainerStack.childHookRectTransform.rect.width); |
| 1 | 35 | | Assert.AreEqual(50f, uiContainerStack.childHookRectTransform.rect.height); |
| 1 | 36 | | Assert.AreEqual(Vector3.zero, uiContainerStack.childHookRectTransform.localPosition); |
| | 37 | |
|
| 1 | 38 | | yield return TestHelpers.SharedComponentUpdate(uiContainerStack, |
| | 39 | | new UIContainerStack.Model |
| | 40 | | { |
| | 41 | | parentComponent = screenSpaceShape.id, |
| | 42 | | color = new Color(0.2f, 0.7f, 0.05f, 1f), |
| | 43 | | isPointerBlocker = true, |
| | 44 | | width = new UIValue(275f), |
| | 45 | | height = new UIValue(130f), |
| | 46 | | positionX = new UIValue(-30f), |
| | 47 | | positionY = new UIValue(-15f), |
| | 48 | | hAlign = "right", |
| | 49 | | vAlign = "bottom" |
| | 50 | | }); |
| | 51 | |
|
| | 52 | | // Check updated properties are applied correctly |
| 1 | 53 | | Assert.IsTrue(uiContainerStack.referencesContainer.transform.parent == |
| | 54 | | screenSpaceShape.childHookRectTransform); |
| 1 | 55 | | Assert.IsTrue(image.color == new Color(0.2f, 0.7f, 0.05f, 1f)); |
| 1 | 56 | | Assert.IsTrue(image.raycastTarget); |
| 1 | 57 | | Assert.AreEqual(275f, uiContainerStack.childHookRectTransform.rect.width); |
| 1 | 58 | | Assert.AreEqual(130f, uiContainerStack.childHookRectTransform.rect.height); |
| 1 | 59 | | Assert.IsTrue(uiContainerStack.referencesContainer.layoutGroup.childAlignment == TextAnchor.LowerRight); |
| | 60 | |
|
| 1 | 61 | | Vector2 alignedPosition = CalculateAlignedAnchoredPosition(screenSpaceShape.childHookRectTransform.rect, |
| | 62 | | uiContainerStack.childHookRectTransform.rect, "bottom", "right"); |
| 1 | 63 | | alignedPosition += new Vector2(-30, -15); // apply offset position |
| | 64 | |
|
| 1 | 65 | | Assert.AreEqual(alignedPosition.ToString(), |
| | 66 | | uiContainerStack.childHookRectTransform.anchoredPosition.ToString()); |
| | 67 | |
|
| 1 | 68 | | screenSpaceShape.Dispose(); |
| 1 | 69 | | } |
| | 70 | |
|
| | 71 | | [UnityTest] |
| | 72 | | public IEnumerator MissingValuesGetDefaultedOnUpdate() |
| | 73 | | { |
| | 74 | | // Create UIScreenSpaceShape |
| 1 | 75 | | UIScreenSpace screenSpaceShape = |
| | 76 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 77 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 78 | | yield return screenSpaceShape.routine; |
| | 79 | |
|
| 1 | 80 | | yield return TestHelpers.TestSharedComponentDefaultsOnUpdate<UIContainerStack.Model, UIContainerStack>( |
| | 81 | | scene, CLASS_ID.UI_CONTAINER_STACK); |
| 1 | 82 | | } |
| | 83 | |
|
| | 84 | | [UnityTest] |
| 2 | 85 | | public IEnumerator AddedCorrectlyOnInvisibleParent() { yield return TestHelpers.TestUIElementAddedCorrectlyOnInv |
| | 86 | |
|
| | 87 | | [UnityTest] |
| | 88 | | public IEnumerator NormalizedSize() |
| | 89 | | { |
| | 90 | | // Create UIScreenSpaceShape |
| 1 | 91 | | UIScreenSpace screenSpaceShape = |
| | 92 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 93 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 94 | | yield return screenSpaceShape.routine; |
| | 95 | |
|
| | 96 | | // Create UIContainerStack |
| 1 | 97 | | UIContainerStack uiContainerStack = |
| | 98 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 99 | | CLASS_ID.UI_CONTAINER_STACK, |
| | 100 | | new UIContainerStack.Model |
| | 101 | | { |
| | 102 | | parentComponent = screenSpaceShape.id, |
| | 103 | | width = new UIValue(50, UIValue.Unit.PERCENT), |
| | 104 | | height = new UIValue(30, UIValue.Unit.PERCENT) |
| | 105 | | }); |
| 1 | 106 | | yield return uiContainerStack.routine; |
| | 107 | |
|
| 1 | 108 | | UnityEngine.UI.Image image = uiContainerStack.childHookRectTransform.GetComponent<UnityEngine.UI.Image>(); |
| | 109 | |
|
| | 110 | | // Check updated properties are applied correctly |
| 1 | 111 | | Assert.AreEqual(screenSpaceShape.childHookRectTransform.rect.width * 0.5f, |
| | 112 | | uiContainerStack.childHookRectTransform.rect.width, 0.01f); |
| 1 | 113 | | Assert.AreEqual(screenSpaceShape.childHookRectTransform.rect.height * 0.3f, |
| | 114 | | uiContainerStack.childHookRectTransform.rect.height, 0.01f); |
| | 115 | |
|
| 1 | 116 | | screenSpaceShape.Dispose(); |
| 1 | 117 | | yield return null; |
| 1 | 118 | | } |
| | 119 | |
|
| | 120 | | [UnityTest] |
| | 121 | | public IEnumerator TestChildrenAreHandledCorrectly() |
| | 122 | | { |
| | 123 | | // Create UIScreenSpaceShape |
| 1 | 124 | | UIScreenSpace screenSpaceShape = |
| | 125 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 126 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 127 | | yield return screenSpaceShape.routine; |
| | 128 | |
|
| | 129 | | // Create UIContainerStack |
| 1 | 130 | | UIContainerStack uiContainerStack = |
| | 131 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 132 | | CLASS_ID.UI_CONTAINER_STACK); |
| 1 | 133 | | yield return uiContainerStack.routine; |
| | 134 | |
|
| | 135 | |
|
| | 136 | | // Create 1st child object |
| 1 | 137 | | UIContainerRect childComponent1 = TestHelpers.SharedComponentCreate<UIContainerRect, UIContainerRect.Model>( |
| | 138 | | scene, CLASS_ID.UI_CONTAINER_RECT, |
| | 139 | | new UIContainerRect.Model() |
| | 140 | | { |
| | 141 | | parentComponent = uiContainerStack.id |
| | 142 | | }); |
| | 143 | |
|
| 1 | 144 | | yield return childComponent1.routine; |
| | 145 | |
|
| 1 | 146 | | Assert.IsTrue(uiContainerStack.stackContainers.ContainsKey(childComponent1.id)); |
| 1 | 147 | | Assert.IsTrue(childComponent1.referencesContainer.transform.parent.gameObject == |
| | 148 | | uiContainerStack.stackContainers[childComponent1.id]); |
| | 149 | |
|
| | 150 | | // Create 2nd child object |
| 1 | 151 | | UIImage childComponent2 = TestHelpers.SharedComponentCreate<UIImage, UIImage.Model>(scene, |
| | 152 | | CLASS_ID.UI_IMAGE_SHAPE, |
| | 153 | | new UIImage.Model |
| | 154 | | { |
| | 155 | | parentComponent = uiContainerStack.id, |
| | 156 | | }); |
| | 157 | |
|
| 1 | 158 | | yield return childComponent2.routine; |
| | 159 | |
|
| 1 | 160 | | Assert.IsTrue(uiContainerStack.stackContainers.ContainsKey(childComponent2.id)); |
| 1 | 161 | | Assert.IsTrue(childComponent2.referencesContainer.transform.parent.gameObject == |
| | 162 | | uiContainerStack.stackContainers[childComponent2.id]); |
| | 163 | |
|
| 1 | 164 | | screenSpaceShape.Dispose(); |
| 1 | 165 | | yield return null; |
| 1 | 166 | | } |
| | 167 | |
|
| | 168 | | [UnityTest] |
| | 169 | | public IEnumerator VerticalStackIsAppliedCorrectly() |
| | 170 | | { |
| | 171 | | // Create UIScreenSpaceShape |
| 1 | 172 | | UIScreenSpace screenSpaceShape = |
| | 173 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 174 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 175 | | yield return screenSpaceShape.routine; |
| | 176 | |
|
| | 177 | | // Create UIContainerStack |
| 1 | 178 | | UIContainerStack uiContainerStack = |
| | 179 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 180 | | CLASS_ID.UI_CONTAINER_STACK, |
| | 181 | | new UIContainerStack.Model |
| | 182 | | { |
| | 183 | | width = new UIValue(500f), |
| | 184 | | height = new UIValue(300f) |
| | 185 | | }); |
| | 186 | |
|
| 1 | 187 | | yield return uiContainerStack.routine; |
| | 188 | |
|
| | 189 | | // Check container stack was initialized correctly |
| 1 | 190 | | Assert.IsTrue(uiContainerStack != null); |
| | 191 | |
|
| 1 | 192 | | var layoutGroup = uiContainerStack.referencesContainer.GetComponentInChildren<VerticalLayoutGroup>(); |
| 1 | 193 | | Assert.IsTrue(layoutGroup != null); |
| 1 | 194 | | Assert.IsFalse(layoutGroup.childControlHeight); |
| 1 | 195 | | Assert.IsFalse(layoutGroup.childControlWidth); |
| 1 | 196 | | Assert.IsFalse(layoutGroup.childForceExpandWidth); |
| 1 | 197 | | Assert.IsFalse(layoutGroup.childForceExpandHeight); |
| | 198 | |
|
| | 199 | | // Create 1st child object |
| 1 | 200 | | UIContainerRect childComponent1 = TestHelpers.SharedComponentCreate<UIContainerRect, UIContainerRect.Model>( |
| | 201 | | scene, CLASS_ID.UI_CONTAINER_RECT, |
| | 202 | | new UIContainerRect.Model |
| | 203 | | { |
| | 204 | | parentComponent = uiContainerStack.id, |
| | 205 | | width = new UIValue(130f), |
| | 206 | | height = new UIValue(70f) |
| | 207 | | }); |
| | 208 | |
|
| 1 | 209 | | yield return childComponent1.routine; |
| | 210 | |
|
| | 211 | | // Create 2nd child object |
| 1 | 212 | | UIImage childComponent2 = TestHelpers.SharedComponentCreate<UIImage, UIImage.Model>(scene, |
| | 213 | | CLASS_ID.UI_IMAGE_SHAPE, |
| | 214 | | new UIImage.Model |
| | 215 | | { |
| | 216 | | parentComponent = uiContainerStack.id, |
| | 217 | | width = new UIValue(75f), |
| | 218 | | height = new UIValue(35f) |
| | 219 | | }); |
| | 220 | |
|
| 1 | 221 | | yield return childComponent2.routine; |
| | 222 | |
|
| | 223 | | // Create 3rd child object |
| 1 | 224 | | UIInputText childComponent3 = TestHelpers.SharedComponentCreate<UIInputText, UIInputText.Model>(scene, |
| | 225 | | CLASS_ID.UI_INPUT_TEXT_SHAPE, |
| | 226 | | new UIInputText.Model |
| | 227 | | { |
| | 228 | | parentComponent = uiContainerStack.id, |
| | 229 | | width = new UIValue(150f), |
| | 230 | | height = new UIValue(50f) |
| | 231 | | }); |
| | 232 | |
|
| 1 | 233 | | yield return childComponent3.routine; |
| | 234 | |
|
| 1 | 235 | | RectTransform child1RT = childComponent1.referencesContainer.transform.parent as RectTransform; |
| 1 | 236 | | RectTransform child2RT = childComponent2.referencesContainer.transform.parent as RectTransform; |
| 1 | 237 | | RectTransform child3RT = childComponent3.referencesContainer.transform.parent as RectTransform; |
| | 238 | |
|
| 1 | 239 | | Assert.AreEqual(new Vector2(65, -35).ToString(), child1RT.anchoredPosition.ToString()); |
| 1 | 240 | | Assert.AreEqual(new Vector2(37.5f, -87.5f).ToString(), child2RT.anchoredPosition.ToString()); |
| 1 | 241 | | Assert.AreEqual(new Vector2(75, -130).ToString(), child3RT.anchoredPosition.ToString()); |
| | 242 | |
|
| 1 | 243 | | Assert.AreEqual(new Vector2(130, 70).ToString(), child1RT.sizeDelta.ToString()); |
| 1 | 244 | | Assert.AreEqual(new Vector2(75, 35).ToString(), child2RT.sizeDelta.ToString()); |
| 1 | 245 | | Assert.AreEqual(new Vector2(150, 50).ToString(), child3RT.sizeDelta.ToString()); |
| | 246 | |
|
| 1 | 247 | | screenSpaceShape.Dispose(); |
| 1 | 248 | | yield return null; |
| 1 | 249 | | } |
| | 250 | |
|
| | 251 | | [UnityTest] |
| | 252 | | public IEnumerator HorizontalStackIsAppliedCorrectly() |
| | 253 | | { |
| | 254 | | // Create UIScreenSpaceShape |
| 1 | 255 | | UIScreenSpace screenSpaceShape = |
| | 256 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 257 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 258 | | yield return screenSpaceShape.routine; |
| | 259 | |
|
| | 260 | | // Create UIContainerStack |
| 1 | 261 | | UIContainerStack uiContainerStack = |
| | 262 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 263 | | CLASS_ID.UI_CONTAINER_STACK); |
| 1 | 264 | | yield return uiContainerStack.routine; |
| | 265 | |
|
| 1 | 266 | | yield return TestHelpers.SharedComponentUpdate(uiContainerStack, |
| | 267 | | new UIContainerStack.Model |
| | 268 | | { |
| | 269 | | width = new UIValue(500f), |
| | 270 | | height = new UIValue(300f), |
| | 271 | | stackOrientation = UIContainerStack.StackOrientation.HORIZONTAL |
| | 272 | | }); |
| | 273 | |
|
| | 274 | | // Check container stack was initialized correctly |
| 1 | 275 | | Assert.IsTrue(uiContainerStack != null); |
| | 276 | |
|
| 1 | 277 | | var layoutGroup = uiContainerStack.referencesContainer.GetComponentInChildren<HorizontalLayoutGroup>(); |
| 1 | 278 | | Assert.IsTrue(layoutGroup != null); |
| 1 | 279 | | Assert.IsFalse(layoutGroup.childControlHeight); |
| 1 | 280 | | Assert.IsFalse(layoutGroup.childControlWidth); |
| 1 | 281 | | Assert.IsFalse(layoutGroup.childForceExpandWidth); |
| 1 | 282 | | Assert.IsFalse(layoutGroup.childForceExpandHeight); |
| | 283 | |
|
| | 284 | | // Create 1st child object |
| 1 | 285 | | UIContainerRect childComponent1 = TestHelpers.SharedComponentCreate<UIContainerRect, UIContainerRect.Model>( |
| | 286 | | scene, CLASS_ID.UI_CONTAINER_RECT, |
| | 287 | | new UIContainerRect.Model |
| | 288 | | { |
| | 289 | | parentComponent = uiContainerStack.id, |
| | 290 | | width = new UIValue(130f), |
| | 291 | | height = new UIValue(70f) |
| | 292 | | }); |
| | 293 | |
|
| 1 | 294 | | yield return childComponent1.routine; |
| | 295 | |
|
| | 296 | | // Create 2nd child object |
| 1 | 297 | | UIImage childComponent2 = TestHelpers.SharedComponentCreate<UIImage, UIImage.Model>(scene, |
| | 298 | | CLASS_ID.UI_IMAGE_SHAPE, |
| | 299 | | new UIImage.Model |
| | 300 | | { |
| | 301 | | parentComponent = uiContainerStack.id, |
| | 302 | | width = new UIValue(75f), |
| | 303 | | height = new UIValue(35f) |
| | 304 | | }); |
| 1 | 305 | | yield return childComponent2.routine; |
| | 306 | |
|
| | 307 | | /// Create 3rd child object |
| 1 | 308 | | UIInputText childComponent3 = TestHelpers.SharedComponentCreate<UIInputText, UIInputText.Model>(scene, |
| | 309 | | CLASS_ID.UI_INPUT_TEXT_SHAPE, |
| | 310 | | new UIInputText.Model |
| | 311 | | { |
| | 312 | | parentComponent = uiContainerStack.id, |
| | 313 | | width = new UIValue(150f), |
| | 314 | | height = new UIValue(50f) |
| | 315 | | }); |
| | 316 | |
|
| 1 | 317 | | yield return childComponent3.routine; |
| | 318 | |
|
| 1 | 319 | | RectTransform child1RT = childComponent1.referencesContainer.transform.parent as RectTransform; |
| 1 | 320 | | RectTransform child2RT = childComponent2.referencesContainer.transform.parent as RectTransform; |
| 1 | 321 | | RectTransform child3RT = childComponent3.referencesContainer.transform.parent as RectTransform; |
| | 322 | |
|
| 1 | 323 | | Assert.AreEqual(new Vector2(65, -35).ToString(), child1RT.anchoredPosition.ToString()); |
| 1 | 324 | | Assert.AreEqual(new Vector2(167.5f, -17.5f).ToString(), child2RT.anchoredPosition.ToString()); |
| 1 | 325 | | Assert.AreEqual(new Vector2(280, -25).ToString(), child3RT.anchoredPosition.ToString()); |
| | 326 | |
|
| 1 | 327 | | Assert.AreEqual(new Vector2(130, 70).ToString(), child1RT.sizeDelta.ToString()); |
| 1 | 328 | | Assert.AreEqual(new Vector2(75, 35).ToString(), child2RT.sizeDelta.ToString()); |
| 1 | 329 | | Assert.AreEqual(new Vector2(150, 50).ToString(), child3RT.sizeDelta.ToString()); |
| | 330 | |
|
| 1 | 331 | | screenSpaceShape.Dispose(); |
| 1 | 332 | | yield return null; |
| 1 | 333 | | } |
| | 334 | |
|
| | 335 | | [UnityTest] |
| | 336 | | public IEnumerator AdaptSizeIsAppliedCorrectly() |
| | 337 | | { |
| | 338 | | // Create UIScreenSpaceShape |
| 1 | 339 | | UIScreenSpace screenSpaceShape = |
| | 340 | | TestHelpers.SharedComponentCreate<UIScreenSpace, UIScreenSpace.Model>(scene, |
| | 341 | | CLASS_ID.UI_SCREEN_SPACE_SHAPE); |
| 1 | 342 | | yield return screenSpaceShape.routine; |
| | 343 | |
|
| | 344 | | // Create UIContainerStack |
| 1 | 345 | | UIContainerStack uiContainerStack = |
| | 346 | | TestHelpers.SharedComponentCreate<UIContainerStack, UIContainerStack.Model>(scene, |
| | 347 | | CLASS_ID.UI_CONTAINER_STACK, |
| | 348 | | new UIContainerStack.Model |
| | 349 | | { |
| | 350 | | width = new UIValue(500f), |
| | 351 | | height = new UIValue(300f) |
| | 352 | | }); |
| | 353 | |
|
| 1 | 354 | | yield return uiContainerStack.routine; |
| | 355 | |
|
| | 356 | | // Create 1st child object |
| 1 | 357 | | UIContainerRect childComponent1 = TestHelpers.SharedComponentCreate<UIContainerRect, UIContainerRect.Model>( |
| | 358 | | scene, CLASS_ID.UI_CONTAINER_RECT, |
| | 359 | | new UIContainerRect.Model |
| | 360 | | { |
| | 361 | | parentComponent = uiContainerStack.id, |
| | 362 | | width = new UIValue(130f), |
| | 363 | | height = new UIValue(70f) |
| | 364 | | }); |
| | 365 | |
|
| 1 | 366 | | yield return childComponent1.routine; |
| | 367 | |
|
| | 368 | | // Create 2nd child object |
| 1 | 369 | | UIImage childComponent2 = TestHelpers.SharedComponentCreate<UIImage, UIImage.Model>(scene, |
| | 370 | | CLASS_ID.UI_IMAGE_SHAPE, |
| | 371 | | new UIImage.Model |
| | 372 | | { |
| | 373 | | parentComponent = uiContainerStack.id, |
| | 374 | | width = new UIValue(75f), |
| | 375 | | height = new UIValue(35f) |
| | 376 | | }); |
| 1 | 377 | | yield return childComponent2.routine; |
| | 378 | |
|
| | 379 | | // Create 3rd child object |
| 1 | 380 | | UIInputText childComponent3 = TestHelpers.SharedComponentCreate<UIInputText, UIInputText.Model>(scene, |
| | 381 | | CLASS_ID.UI_INPUT_TEXT_SHAPE, |
| | 382 | | new UIInputText.Model |
| | 383 | | { |
| | 384 | | parentComponent = uiContainerStack.id, |
| | 385 | | width = new UIValue(150f), |
| | 386 | | height = new UIValue(50f) |
| | 387 | | }); |
| 1 | 388 | | yield return childComponent3.routine; |
| | 389 | |
|
| | 390 | |
|
| 1 | 391 | | yield return TestHelpers.SharedComponentUpdate(uiContainerStack, |
| | 392 | | new UIContainerStack.Model |
| | 393 | | { |
| | 394 | | adaptHeight = true, |
| | 395 | | adaptWidth = true, |
| | 396 | | }); |
| | 397 | |
|
| 1 | 398 | | yield return null; |
| | 399 | |
|
| | 400 | | // Check stacked components position |
| 1 | 401 | | Assert.AreEqual(150f, uiContainerStack.childHookRectTransform.rect.width, 0.01f); |
| 1 | 402 | | Assert.AreEqual( |
| | 403 | | childComponent1.referencesContainer.rectTransform.rect.height + childComponent2.referencesContainer |
| | 404 | | .rectTransform.rect.heigh |
| | 405 | | + childComponent3.referencesContainer |
| | 406 | | .rectTransform.rect.heigh |
| | 407 | | uiContainerStack.childHookRectTransform.rect.height, 0.01f); |
| | 408 | |
|
| 1 | 409 | | screenSpaceShape.Dispose(); |
| 1 | 410 | | yield return null; |
| 1 | 411 | | } |
| | 412 | | } |
| | 413 | | } |