| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 81 00 00 49 94 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ......I.............2019.3.6f1.. |
| 0020 | ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 | ...............f..!..5.9.4.Q...B |
| 0040 | 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 | ...............7................ |
| 0060 | 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 | ................................ |
| 0080 | 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 | ...............E................ |
| 00a0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 | ...............#................ |
| 00c0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 | ...............,................ |
| 00e0 | 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 | ...........5...a................ |
| 0100 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 | ...............#................ |
| 0120 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 | ...............,................ |
| 0140 | 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 | ...............r................ |
| 0160 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 | ...............#................ |
| 0180 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 | ...............,................ |
| 01a0 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 | ...........H.................... |
| 01c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 | ...........1...1............@... |
| 01e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 | ................................ |
| 0200 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 | ...........Q...j................ |
| 0220 | 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 | ...............J................ |
| 0240 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 | ...........1...1................ |
| 0260 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 | ................................ |
| 0280 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 | ...............j................ |
| 02a0 | 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 | ...........\.................... |
| 02c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 | ...........H...r................ |
| 02e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0300 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 | ................................ |
| 0320 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0340 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 | ...........H...w................ |
| 0360 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0380 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 | ................................ |
| 03a0 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 03c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 | ...........H.................... |
| 03e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0400 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 | ................................ |
| 0420 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0440 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 | ...........y.................... |
| 0460 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 | ...............#.......!........ |
| 0480 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 | ...............,......."........ |
| 04a0 | 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 | .......................#....@... |
| 04c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 | ...........1...1.......$........ |
| 04e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 | .......................%........ |
| 0500 | 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 | ...............j.......&........ |
| 0520 | 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 | .......................'........ |
| 0540 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 | ...........1...1.......(........ |
| 0560 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 | .......................)........ |
| 0580 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 | ...............j.......*........ |
| 05a0 | 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 | ...........H...........+........ |
| 05c0 | 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 | ...........1...1.......,....@... |
| 05e0 | 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 | .......................-........ |
| 0600 | 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0620 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 | ...........y.........../........ |
| 0640 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 | ...............#.......0........ |
| 0660 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 | ...............,.......1........ |
| 0680 | 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 | .......................2....@... |
| 06a0 | 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 | .......................3....@... |
| 06c0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 | ...............#.......4........ |
| 06e0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 | ...............,.......5........ |
| 0700 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 | ...........H...........6........ |
| 0720 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 | ...........1...1.......7....@... |
| 0740 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 | .......................8........ |
| 0760 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 | ...........Q...j.......9........ |
| 0780 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 | ...........H...........:........ |
| 07a0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 | ...........1...1.......;....@... |
| 07c0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 | .......................<........ |
| 07e0 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 | ...........Q...j.......=........ |
| 0800 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 | ...........H...........>........ |
| 0820 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 | ...........1...1.......?....@... |
| 0840 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 | .......................@........ |
| 0860 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 | ...........Q...j.......A........ |
| 0880 | 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 | .......MonoImporter.PPtr<EditorE |
| 08a0 | 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 | xtension>.m_FileID.m_PathID.PPtr |
| 08c0 | 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 | <PrefabInstance>.m_ExternalObjec |
| 08e0 | 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 | ts.SourceAssetIdentifier.type.as |
| 0900 | 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 | sembly.name.m_UsedFileIDs.m_Defa |
| 0920 | 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f | ultReferences.executionOrder.ico |
| 0940 | 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d | n.m_UserData.m_AssetBundleName.m |
| 0960 | 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 | _AssetBundleVariant.....s....... |
| 0980 | 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 | G....Z56.:!@i.J*...............7 |
| 09a0 | 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 | ................................ |
| 09c0 | 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 | ...............................E |
| 09e0 | 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a00 | 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a20 | 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 | ...........................(...a |
| 0a40 | 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a60 | 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a80 | 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 | ...............................r |
| 0aa0 | 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0ac0 | 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0ae0 | 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab | ...........................H.... |
| 0b00 | 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0b20 | 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0b40 | 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0b60 | 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea | ...........................H.... |
| 0b80 | 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0ba0 | 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0bc0 | 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0be0 | 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d | ...............................= |
| 0c00 | 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0c20 | 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ................................ |
| 0c40 | 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a | ...............................j |
| 0c60 | 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b | ...........................H.... |
| 0c80 | 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 | ...........................1...1 |
| 0ca0 | 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b | ............@................... |
| 0cc0 | 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a | ...........................Q...j |
| 0ce0 | 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a | ...........................y.... |
| 0d00 | 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 | ................................ |
| 0d20 | 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f | ................................ |
| 0d40 | 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 | ...........................y...Q |
| 0d60 | 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0d80 | 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0da0 | 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 | ...............................X |
| 0dc0 | 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 | .......!...................H...i |
| 0de0 | 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ......."...................1...1 |
| 0e00 | 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......#....@................... |
| 0e20 | 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......$...................Q...j |
| 0e40 | 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 | .......%...................H...u |
| 0e60 | 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | .......&...................1...1 |
| 0e80 | 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......'....@................... |
| 0ea0 | 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......(...................Q...j |
| 0ec0 | 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 | .......)...............PPtr<Edit |
| 0ee0 | 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 | orExtension>.m_FileID.m_PathID.P |
| 0f00 | 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 | Ptr<PrefabInstance>.m_DefaultRef |
| 0f20 | 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 | erences.m_Icon.m_ExecutionOrder. |
| 0f40 | 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 | m_ClassName.m_Namespace......... |
| 0f60 | 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 | ............\........y......`... |
| 0f80 | 34 39 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 49.............................. |
| 0fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 | .....................y.......... |
| 1040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1080 | 00 00 00 00 00 00 00 00 14 00 00 00 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 54 65 73 74 73 | ............GridLayoutGroupTests |
| 10a0 | c0 38 00 00 75 73 69 6e 67 20 4e 55 6e 69 74 2e 46 72 61 6d 65 77 6f 72 6b 3b 0a 75 73 69 6e 67 | .8..using.NUnit.Framework;.using |
| 10c0 | 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 45 76 65 6e 74 53 79 73 74 65 6d 73 3b 0a 75 73 69 6e 67 | .UnityEngine.EventSystems;.using |
| 10e0 | 20 55 6e 69 74 79 45 6e 67 69 6e 65 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e | .UnityEngine;.using.UnityEngine. |
| 1100 | 55 49 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 54 65 73 74 54 6f 6f 6c 73 3b | UI;.using.UnityEngine.TestTools; |
| 1120 | 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 49 4f 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 64 69 | .using.System.IO;.using.UnityEdi |
| 1140 | 74 6f 72 3b 0a 0a 63 6c 61 73 73 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 54 65 73 74 73 | tor;..class.GridLayoutGroupTests |
| 1160 | 20 3a 20 49 50 72 65 62 75 69 6c 64 53 65 74 75 70 0a 7b 0a 20 20 20 20 63 6f 6e 73 74 20 73 74 | .:.IPrebuildSetup.{.....const.st |
| 1180 | 72 69 6e 67 20 6b 50 72 65 66 61 62 50 61 74 68 20 3d 20 22 41 73 73 65 74 73 2f 52 65 73 6f 75 | ring.kPrefabPath.=."Assets/Resou |
| 11a0 | 72 63 65 73 2f 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 54 65 73 74 73 2e 70 72 65 66 61 62 | rces/GridLayoutGroupTests.prefab |
| 11c0 | 22 3b 0a 20 20 20 20 70 72 69 76 61 74 65 20 47 61 6d 65 4f 62 6a 65 63 74 20 6d 5f 50 72 65 66 | ";.....private.GameObject.m_Pref |
| 11e0 | 61 62 52 6f 6f 74 3b 0a 20 20 20 20 70 72 69 76 61 74 65 20 47 72 69 64 4c 61 79 6f 75 74 47 72 | abRoot;.....private.GridLayoutGr |
| 1200 | 6f 75 70 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 3b 0a 0a 20 20 20 20 70 75 62 6c 69 63 20 76 | oup.m_LayoutGroup;......public.v |
| 1220 | 6f 69 64 20 53 65 74 75 70 28 29 0a 20 20 20 20 7b 0a 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 | oid.Setup().....{.#if.UNITY_EDIT |
| 1240 | 4f 52 0a 20 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 47 4f 20 3d 20 6e 65 77 20 47 61 6d 65 | OR.........var.rootGO.=.new.Game |
| 1260 | 4f 62 6a 65 63 74 28 22 72 6f 6f 74 47 6f 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 63 | Object("rootGo");..........var.c |
| 1280 | 61 6e 76 61 73 47 4f 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 43 61 6e 76 61 73 | anvasGO.=.new.GameObject("Canvas |
| 12a0 | 22 29 3b 0a 20 20 20 20 20 20 20 20 63 61 6e 76 61 73 47 4f 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 | ");.........canvasGO.transform.S |
| 12c0 | 65 74 50 61 72 65 6e 74 28 72 6f 6f 74 47 4f 2e 74 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 | etParent(rootGO.transform);..... |
| 12e0 | 20 20 20 20 43 61 6e 76 61 73 20 63 61 6e 76 61 73 20 3d 20 63 61 6e 76 61 73 47 4f 2e 41 64 64 | ....Canvas.canvas.=.canvasGO.Add |
| 1300 | 43 6f 6d 70 6f 6e 65 6e 74 3c 43 61 6e 76 61 73 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 63 61 6e | Component<Canvas>();.........can |
| 1320 | 76 61 73 2e 72 65 66 65 72 65 6e 63 65 50 69 78 65 6c 73 50 65 72 55 6e 69 74 20 3d 20 31 30 30 | vas.referencePixelsPerUnit.=.100 |
| 1340 | 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 67 72 6f 75 70 47 4f 20 3d 20 6e 65 77 20 47 61 6d | ;..........var.groupGO.=.new.Gam |
| 1360 | 65 4f 62 6a 65 63 74 28 22 47 72 6f 75 70 22 2c 20 74 79 70 65 6f 66 28 52 65 63 74 54 72 61 6e | eObject("Group",.typeof(RectTran |
| 1380 | 73 66 6f 72 6d 29 2c 20 74 79 70 65 6f 66 28 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 29 29 | sform),.typeof(GridLayoutGroup)) |
| 13a0 | 3b 0a 20 20 20 20 20 20 20 20 67 72 6f 75 70 47 4f 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 | ;.........groupGO.transform.SetP |
| 13c0 | 61 72 65 6e 74 28 63 61 6e 76 61 73 2e 74 72 61 6e 73 66 6f 72 6d 29 3b 0a 0a 20 20 20 20 20 20 | arent(canvas.transform);........ |
| 13e0 | 20 20 76 61 72 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d 20 67 72 6f 75 70 47 4f 2e 47 65 | ..var.rectTransform.=.groupGO.Ge |
| 1400 | 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 29 3b 0a 20 20 20 | tComponent<RectTransform>();.... |
| 1420 | 20 20 20 20 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 20 3d 20 6e | .....rectTransform.sizeDelta.=.n |
| 1440 | 65 77 20 56 65 63 74 6f 72 32 28 34 30 30 2c 20 35 30 30 29 3b 0a 20 20 20 20 20 20 20 20 72 65 | ew.Vector2(400,.500);.........re |
| 1460 | 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 65 64 50 6f 73 69 74 69 6f 6e 20 3d 20 6e | ctTransform.anchoredPosition.=.n |
| 1480 | 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 30 29 3b 0a 20 20 20 20 20 20 20 20 72 65 63 74 54 72 | ew.Vector2(0,.0);.........rectTr |
| 14a0 | 61 6e 73 66 6f 72 6d 2e 70 69 76 6f 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 30 | ansform.pivot.=.new.Vector2(0,.0 |
| 14c0 | 29 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 47 72 6f 75 70 20 3d 20 67 72 | );..........var.layoutGroup.=.gr |
| 14e0 | 6f 75 70 47 4f 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 47 72 69 64 4c 61 79 6f 75 74 47 72 6f | oupGO.GetComponent<GridLayoutGro |
| 1500 | 75 70 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 47 72 6f 75 70 2e 73 70 61 63 69 | up>();.........layoutGroup.spaci |
| 1520 | 6e 67 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 2c 20 30 29 3b 0a 20 20 20 20 20 20 20 | ng.=.new.Vector2(10,.0);........ |
| 1540 | 20 6c 61 79 6f 75 74 47 72 6f 75 70 2e 73 74 61 72 74 43 6f 72 6e 65 72 20 3d 20 47 72 69 64 4c | .layoutGroup.startCorner.=.GridL |
| 1560 | 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 72 6e 65 72 2e 55 70 70 65 72 4c 65 66 74 3b 0a 20 20 20 | ayoutGroup.Corner.UpperLeft;.... |
| 1580 | 20 20 20 20 20 6c 61 79 6f 75 74 47 72 6f 75 70 2e 63 65 6c 6c 53 69 7a 65 20 3d 20 6e 65 77 20 | .....layoutGroup.cellSize.=.new. |
| 15a0 | 56 65 63 74 6f 72 32 28 39 30 2c 20 35 30 29 3b 0a 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 47 | Vector2(90,.50);.........layoutG |
| 15c0 | 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 | roup.constraint.=.GridLayoutGrou |
| 15e0 | 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 6c 65 78 69 62 6c 65 3b 0a 20 20 20 20 20 20 20 20 6c | p.Constraint.Flexible;.........l |
| 1600 | 61 79 6f 75 74 47 72 6f 75 70 2e 73 74 61 72 74 41 78 69 73 20 3d 20 47 72 69 64 4c 61 79 6f 75 | ayoutGroup.startAxis.=.GridLayou |
| 1620 | 74 47 72 6f 75 70 2e 41 78 69 73 2e 48 6f 72 69 7a 6f 6e 74 61 6c 3b 0a 20 20 20 20 20 20 20 20 | tGroup.Axis.Horizontal;......... |
| 1640 | 6c 61 79 6f 75 74 47 72 6f 75 70 2e 63 68 69 6c 64 41 6c 69 67 6e 6d 65 6e 74 20 3d 20 54 65 78 | layoutGroup.childAlignment.=.Tex |
| 1660 | 74 41 6e 63 68 6f 72 2e 55 70 70 65 72 4c 65 66 74 3b 0a 20 20 20 20 20 20 20 20 6c 61 79 6f 75 | tAnchor.UpperLeft;.........layou |
| 1680 | 74 47 72 6f 75 70 2e 65 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 | tGroup.enabled.=.false;......... |
| 16a0 | 6c 61 79 6f 75 74 47 72 6f 75 70 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 | layoutGroup.enabled.=.true;..... |
| 16c0 | 20 20 20 20 20 76 61 72 20 65 6c 31 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 | .....var.el1.=.new.GameObject("E |
| 16e0 | 6c 65 6d 65 6e 74 31 22 29 3b 0a 20 20 20 20 20 20 20 20 65 6c 31 2e 74 72 61 6e 73 66 6f 72 6d | lement1");.........el1.transform |
| 1700 | 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 | .SetParent(rectTransform);...... |
| 1720 | 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 31 20 3d 20 65 6c 31 2e 41 64 64 43 6f 6d 70 6f 6e 65 | ...var.element1.=.el1.AddCompone |
| 1740 | 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c | nt<LayoutElement>();.........(el |
| 1760 | 31 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 | 1.transform.as.RectTransform).pi |
| 1780 | 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d | vot.=.Vector2.zero;.........elem |
| 17a0 | 65 6e 74 31 2e 6d 69 6e 57 69 64 74 68 20 3d 20 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 | ent1.minWidth.=.5;.........eleme |
| 17c0 | 6e 74 31 2e 6d 69 6e 48 65 69 67 68 74 20 3d 20 31 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d | nt1.minHeight.=.10;.........elem |
| 17e0 | 65 6e 74 31 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 31 30 30 3b 0a 20 20 20 20 20 | ent1.preferredWidth.=.100;...... |
| 1800 | 20 20 20 65 6c 65 6d 65 6e 74 31 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 35 30 | ...element1.preferredHeight.=.50 |
| 1820 | 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 31 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 | ;.........element1.flexibleWidth |
| 1840 | 20 3d 20 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 31 2e 66 6c 65 78 69 62 6c 65 48 | .=.0;.........element1.flexibleH |
| 1860 | 65 69 67 68 74 20 3d 20 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 31 2e 65 6e 61 62 | eight.=.0;.........element1.enab |
| 1880 | 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 32 20 3d 20 6e | led.=.true;..........var.el2.=.n |
| 18a0 | 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 6c 65 6d 65 6e 74 32 22 29 3b 0a 20 20 20 20 20 | ew.GameObject("Element2");...... |
| 18c0 | 20 20 20 65 6c 32 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 | ...el2.transform.SetParent(rectT |
| 18e0 | 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 32 20 | ransform);.........var.element2. |
| 1900 | 3d 20 65 6c 32 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 | =.el2.AddComponent<LayoutElement |
| 1920 | 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c 32 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 | >();.........(el2.transform.as.R |
| 1940 | 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 | ectTransform).pivot.=.Vector2.ze |
| 1960 | 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 32 2e 6d 69 6e 57 69 64 74 68 20 3d 20 | ro;.........element2.minWidth.=. |
| 1980 | 31 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 32 2e 6d 69 6e 48 65 69 67 68 74 20 3d | 10;.........element2.minHeight.= |
| 19a0 | 20 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 32 2e 70 72 65 66 65 72 72 65 64 57 69 | .5;.........element2.preferredWi |
| 19c0 | 64 74 68 20 3d 20 2d 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 32 2e 70 72 65 66 65 | dth.=.-1;.........element2.prefe |
| 19e0 | 72 72 65 64 48 65 69 67 68 74 20 3d 20 2d 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 | rredHeight.=.-1;.........element |
| 1a00 | 32 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 20 3d 20 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 | 2.flexibleWidth.=.0;.........ele |
| 1a20 | 6d 65 6e 74 32 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 20 3d 20 30 3b 0a 20 20 20 20 20 20 | ment2.flexibleHeight.=.0;....... |
| 1a40 | 20 20 65 6c 65 6d 65 6e 74 32 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 | ..element2.enabled.=.true;...... |
| 1a60 | 20 20 20 20 76 61 72 20 65 6c 33 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 6c | ....var.el3.=.new.GameObject("El |
| 1a80 | 65 6d 65 6e 74 33 22 29 3b 0a 20 20 20 20 20 20 20 20 65 6c 33 2e 74 72 61 6e 73 66 6f 72 6d 2e | ement3");.........el3.transform. |
| 1aa0 | 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 20 | SetParent(rectTransform);....... |
| 1ac0 | 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 33 20 3d 20 65 6c 33 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e | ..var.element3.=.el3.AddComponen |
| 1ae0 | 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c 33 | t<LayoutElement>();.........(el3 |
| 1b00 | 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 76 | .transform.as.RectTransform).piv |
| 1b20 | 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 | ot.=.Vector2.zero;.........eleme |
| 1b40 | 6e 74 33 2e 6d 69 6e 57 69 64 74 68 20 3d 20 36 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 | nt3.minWidth.=.60;.........eleme |
| 1b60 | 6e 74 33 2e 6d 69 6e 48 65 69 67 68 74 20 3d 20 32 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d | nt3.minHeight.=.25;.........elem |
| 1b80 | 65 6e 74 33 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 20 20 20 20 | ent3.preferredWidth.=.120;...... |
| 1ba0 | 20 20 20 65 6c 65 6d 65 6e 74 33 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 34 30 | ...element3.preferredHeight.=.40 |
| 1bc0 | 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 33 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 | ;.........element3.flexibleWidth |
| 1be0 | 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 33 2e 66 6c 65 78 69 62 6c 65 48 | .=.1;.........element3.flexibleH |
| 1c00 | 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 33 2e 65 6e 61 62 | eight.=.1;.........element3.enab |
| 1c20 | 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 34 20 3d 20 6e | led.=.true;..........var.el4.=.n |
| 1c40 | 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 6c 65 6d 65 6e 74 34 22 29 3b 0a 20 20 20 20 20 | ew.GameObject("Element4");...... |
| 1c60 | 20 20 20 65 6c 34 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 | ...el4.transform.SetParent(rectT |
| 1c80 | 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 34 20 | ransform);.........var.element4. |
| 1ca0 | 3d 20 65 6c 34 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 | =.el4.AddComponent<LayoutElement |
| 1cc0 | 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c 34 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 | >();.........(el4.transform.as.R |
| 1ce0 | 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 | ectTransform).pivot.=.Vector2.ze |
| 1d00 | 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 34 2e 6d 69 6e 57 69 64 74 68 20 3d 20 | ro;.........element4.minWidth.=. |
| 1d20 | 36 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 34 2e 6d 69 6e 48 65 69 67 68 74 20 3d | 60;.........element4.minHeight.= |
| 1d40 | 20 32 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 34 2e 70 72 65 66 65 72 72 65 64 57 | .25;.........element4.preferredW |
| 1d60 | 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 34 2e 70 72 65 | idth.=.120;.........element4.pre |
| 1d80 | 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 34 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 | ferredHeight.=.40;.........eleme |
| 1da0 | 6e 74 34 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 | nt4.flexibleWidth.=.1;.........e |
| 1dc0 | 6c 65 6d 65 6e 74 34 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 20 20 | lement4.flexibleHeight.=.1;..... |
| 1de0 | 20 20 20 20 65 6c 65 6d 65 6e 74 34 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 | ....element4.enabled.=.true;.... |
| 1e00 | 20 20 20 20 20 20 76 61 72 20 65 6c 35 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 | ......var.el5.=.new.GameObject(" |
| 1e20 | 45 6c 65 6d 65 6e 74 35 22 29 3b 0a 20 20 20 20 20 20 20 20 65 6c 35 2e 74 72 61 6e 73 66 6f 72 | Element5");.........el5.transfor |
| 1e40 | 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 | m.SetParent(rectTransform);..... |
| 1e60 | 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 35 20 3d 20 65 6c 35 2e 41 64 64 43 6f 6d 70 6f 6e | ....var.element5.=.el5.AddCompon |
| 1e80 | 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 | ent<LayoutElement>();.........(e |
| 1ea0 | 6c 35 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 | l5.transform.as.RectTransform).p |
| 1ec0 | 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 | ivot.=.Vector2.zero;.........ele |
| 1ee0 | 6d 65 6e 74 35 2e 6d 69 6e 57 69 64 74 68 20 3d 20 36 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 | ment5.minWidth.=.60;.........ele |
| 1f00 | 6d 65 6e 74 35 2e 6d 69 6e 48 65 69 67 68 74 20 3d 20 32 35 3b 0a 20 20 20 20 20 20 20 20 65 6c | ment5.minHeight.=.25;.........el |
| 1f20 | 65 6d 65 6e 74 35 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 20 20 | ement5.preferredWidth.=.120;.... |
| 1f40 | 20 20 20 20 20 65 6c 65 6d 65 6e 74 35 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 | .....element5.preferredHeight.=. |
| 1f60 | 34 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 35 2e 66 6c 65 78 69 62 6c 65 57 69 64 | 40;.........element5.flexibleWid |
| 1f80 | 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 35 2e 66 6c 65 78 69 62 6c | th.=.1;.........element5.flexibl |
| 1fa0 | 65 48 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 35 2e 65 6e | eHeight.=.1;.........element5.en |
| 1fc0 | 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 36 20 3d | abled.=.true;..........var.el6.= |
| 1fe0 | 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 6c 65 6d 65 6e 74 36 22 29 3b 0a 20 20 20 | .new.GameObject("Element6");.... |
| 2000 | 20 20 20 20 20 65 6c 36 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 | .....el6.transform.SetParent(rec |
| 2020 | 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 | tTransform);.........var.element |
| 2040 | 36 20 3d 20 65 6c 36 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 | 6.=.el6.AddComponent<LayoutEleme |
| 2060 | 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c 36 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 | nt>();.........(el6.transform.as |
| 2080 | 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e | .RectTransform).pivot.=.Vector2. |
| 20a0 | 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 36 2e 6d 69 6e 57 69 64 74 68 20 | zero;.........element6.minWidth. |
| 20c0 | 3d 20 36 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 36 2e 6d 69 6e 48 65 69 67 68 74 | =.60;.........element6.minHeight |
| 20e0 | 20 3d 20 32 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 36 2e 70 72 65 66 65 72 72 65 | .=.25;.........element6.preferre |
| 2100 | 64 57 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 36 2e 70 | dWidth.=.120;.........element6.p |
| 2120 | 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 34 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 | referredHeight.=.40;.........ele |
| 2140 | 6d 65 6e 74 36 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 | ment6.flexibleWidth.=.1;........ |
| 2160 | 20 65 6c 65 6d 65 6e 74 36 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 | .element6.flexibleHeight.=.1;... |
| 2180 | 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 36 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a | ......element6.enabled.=.true;.. |
| 21a0 | 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 37 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 | ........var.el7.=.new.GameObject |
| 21c0 | 28 22 45 6c 65 6d 65 6e 74 37 22 29 3b 0a 20 20 20 20 20 20 20 20 65 6c 37 2e 74 72 61 6e 73 66 | ("Element7");.........el7.transf |
| 21e0 | 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 | orm.SetParent(rectTransform);... |
| 2200 | 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 37 20 3d 20 65 6c 37 2e 41 64 64 43 6f 6d 70 | ......var.element7.=.el7.AddComp |
| 2220 | 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 | onent<LayoutElement>();......... |
| 2240 | 28 65 6c 37 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 | (el7.transform.as.RectTransform) |
| 2260 | 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 | .pivot.=.Vector2.zero;.........e |
| 2280 | 6c 65 6d 65 6e 74 37 2e 6d 69 6e 57 69 64 74 68 20 3d 20 36 30 3b 0a 20 20 20 20 20 20 20 20 65 | lement7.minWidth.=.60;.........e |
| 22a0 | 6c 65 6d 65 6e 74 37 2e 6d 69 6e 48 65 69 67 68 74 20 3d 20 32 35 3b 0a 20 20 20 20 20 20 20 20 | lement7.minHeight.=.25;......... |
| 22c0 | 65 6c 65 6d 65 6e 74 37 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 | element7.preferredWidth.=.120;.. |
| 22e0 | 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 37 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 | .......element7.preferredHeight. |
| 2300 | 3d 20 34 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 37 2e 66 6c 65 78 69 62 6c 65 57 | =.40;.........element7.flexibleW |
| 2320 | 69 64 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 37 2e 66 6c 65 78 69 | idth.=.1;.........element7.flexi |
| 2340 | 62 6c 65 48 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 37 2e | bleHeight.=.1;.........element7. |
| 2360 | 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 38 | enabled.=.true;..........var.el8 |
| 2380 | 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 28 22 45 6c 65 6d 65 6e 74 38 22 29 3b 0a 20 | .=.new.GameObject("Element8");.. |
| 23a0 | 20 20 20 20 20 20 20 65 6c 38 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 | .......el8.transform.SetParent(r |
| 23c0 | 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 | ectTransform);.........var.eleme |
| 23e0 | 6e 74 38 20 3d 20 65 6c 38 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 | nt8.=.el8.AddComponent<LayoutEle |
| 2400 | 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 28 65 6c 38 2e 74 72 61 6e 73 66 6f 72 6d 20 | ment>();.........(el8.transform. |
| 2420 | 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 | as.RectTransform).pivot.=.Vector |
| 2440 | 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 38 2e 6d 69 6e 57 69 64 74 | 2.zero;.........element8.minWidt |
| 2460 | 68 20 3d 20 36 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 38 2e 6d 69 6e 48 65 69 67 | h.=.60;.........element8.minHeig |
| 2480 | 68 74 20 3d 20 32 35 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 38 2e 70 72 65 66 65 72 | ht.=.25;.........element8.prefer |
| 24a0 | 72 65 64 57 69 64 74 68 20 3d 20 31 32 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 38 | redWidth.=.120;.........element8 |
| 24c0 | 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 34 30 3b 0a 20 20 20 20 20 20 20 20 65 | .preferredHeight.=.40;.........e |
| 24e0 | 6c 65 6d 65 6e 74 38 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 | lement8.flexibleWidth.=.1;...... |
| 2500 | 20 20 20 65 6c 65 6d 65 6e 74 38 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 20 3d 20 31 3b 0a | ...element8.flexibleHeight.=.1;. |
| 2520 | 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 38 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b | ........element8.enabled.=.true; |
| 2540 | 0a 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 39 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 | ..........var.el9.=.new.GameObje |
| 2560 | 63 74 28 22 45 6c 65 6d 65 6e 74 39 22 29 3b 0a 20 20 20 20 20 20 20 20 65 6c 39 2e 74 72 61 6e | ct("Element9");.........el9.tran |
| 2580 | 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 28 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 3b 0a | sform.SetParent(rectTransform);. |
| 25a0 | 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 39 20 3d 20 65 6c 39 2e 41 64 64 43 6f | ........var.element9.=.el9.AddCo |
| 25c0 | 6d 70 6f 6e 65 6e 74 3c 4c 61 79 6f 75 74 45 6c 65 6d 65 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 | mponent<LayoutElement>();....... |
| 25e0 | 20 20 28 65 6c 39 2e 74 72 61 6e 73 66 6f 72 6d 20 61 73 20 52 65 63 74 54 72 61 6e 73 66 6f 72 | ..(el9.transform.as.RectTransfor |
| 2600 | 6d 29 2e 70 69 76 6f 74 20 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0a 20 20 20 20 20 20 20 | m).pivot.=.Vector2.zero;........ |
| 2620 | 20 65 6c 65 6d 65 6e 74 39 2e 6d 69 6e 57 69 64 74 68 20 3d 20 35 30 30 3b 0a 20 20 20 20 20 20 | .element9.minWidth.=.500;....... |
| 2640 | 20 20 65 6c 65 6d 65 6e 74 39 2e 6d 69 6e 48 65 69 67 68 74 20 3d 20 33 30 30 3b 0a 20 20 20 20 | ..element9.minHeight.=.300;..... |
| 2660 | 20 20 20 20 65 6c 65 6d 65 6e 74 39 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 31 30 | ....element9.preferredWidth.=.10 |
| 2680 | 30 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 39 2e 70 72 65 66 65 72 72 65 64 48 65 | 00;.........element9.preferredHe |
| 26a0 | 69 67 68 74 20 3d 20 36 30 30 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 39 2e 66 6c 65 | ight.=.600;.........element9.fle |
| 26c0 | 78 69 62 6c 65 57 69 64 74 68 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 39 | xibleWidth.=.1;.........element9 |
| 26e0 | 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 65 6c 65 | .flexibleHeight.=.1;.........ele |
| 2700 | 6d 65 6e 74 39 2e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 65 6c | ment9.enabled.=.true;.........el |
| 2720 | 65 6d 65 6e 74 39 2e 69 67 6e 6f 72 65 4c 61 79 6f 75 74 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 | ement9.ignoreLayout.=.true;..... |
| 2740 | 20 20 20 20 20 69 66 20 28 21 44 69 72 65 63 74 6f 72 79 2e 45 78 69 73 74 73 28 22 41 73 73 65 | .....if.(!Directory.Exists("Asse |
| 2760 | 74 73 2f 52 65 73 6f 75 72 63 65 73 2f 22 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 72 | ts/Resources/")).............Dir |
| 2780 | 65 63 74 6f 72 79 2e 43 72 65 61 74 65 44 69 72 65 63 74 6f 72 79 28 22 41 73 73 65 74 73 2f 52 | ectory.CreateDirectory("Assets/R |
| 27a0 | 65 73 6f 75 72 63 65 73 2f 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 50 72 65 66 61 62 55 74 69 6c | esources/");..........PrefabUtil |
| 27c0 | 69 74 79 2e 53 61 76 65 41 73 50 72 65 66 61 62 41 73 73 65 74 28 72 6f 6f 74 47 4f 2c 20 6b 50 | ity.SaveAsPrefabAsset(rootGO,.kP |
| 27e0 | 72 65 66 61 62 50 61 74 68 29 3b 0a 20 20 20 20 20 20 20 20 47 61 6d 65 4f 62 6a 65 63 74 2e 44 | refabPath);.........GameObject.D |
| 2800 | 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 28 72 6f 6f 74 47 4f 29 3b 0a 23 65 6e 64 69 66 0a | estroyImmediate(rootGO);.#endif. |
| 2820 | 20 20 20 20 7d 0a 0a 20 20 20 20 5b 53 65 74 55 70 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f | ....}......[SetUp].....public.vo |
| 2840 | 69 64 20 54 65 73 74 53 65 74 75 70 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 6d 5f 50 | id.TestSetup().....{.........m_P |
| 2860 | 72 65 66 61 62 52 6f 6f 74 20 3d 20 47 61 6d 65 4f 62 6a 65 63 74 2e 49 6e 73 74 61 6e 74 69 61 | refabRoot.=.GameObject.Instantia |
| 2880 | 74 65 28 52 65 73 6f 75 72 63 65 73 2e 4c 6f 61 64 28 22 47 72 69 64 4c 61 79 6f 75 74 47 72 6f | te(Resources.Load("GridLayoutGro |
| 28a0 | 75 70 54 65 73 74 73 22 29 29 20 61 73 20 47 61 6d 65 4f 62 6a 65 63 74 3b 0a 20 20 20 20 20 20 | upTests")).as.GameObject;....... |
| 28c0 | 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 20 3d 20 6d 5f 50 72 65 66 61 62 52 6f 6f 74 2e 47 | ..m_LayoutGroup.=.m_PrefabRoot.G |
| 28e0 | 65 74 43 6f 6d 70 6f 6e 65 6e 74 49 6e 43 68 69 6c 64 72 65 6e 3c 47 72 69 64 4c 61 79 6f 75 74 | etComponentInChildren<GridLayout |
| 2900 | 47 72 6f 75 70 3e 28 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 5b 4f 6e 65 54 69 6d 65 54 65 61 | Group>();.....}......[OneTimeTea |
| 2920 | 72 44 6f 77 6e 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 65 61 72 44 6f 77 6e 28 | rDown].....public.void.TearDown( |
| 2940 | 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 47 61 6d 65 4f 62 6a 65 63 74 2e 44 65 73 74 72 | ).....{.........GameObject.Destr |
| 2960 | 6f 79 49 6d 6d 65 64 69 61 74 65 28 6d 5f 50 72 65 66 61 62 52 6f 6f 74 29 3b 0a 23 69 66 20 55 | oyImmediate(m_PrefabRoot);.#if.U |
| 2980 | 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 41 73 73 65 74 44 61 74 61 62 61 73 | NITY_EDITOR.........AssetDatabas |
| 29a0 | 65 2e 44 65 6c 65 74 65 41 73 73 65 74 28 6b 50 72 65 66 61 62 50 61 74 68 29 3b 0a 23 65 6e 64 | e.DeleteAsset(kPrefabPath);.#end |
| 29c0 | 69 66 0a 20 20 20 20 7d 0a 0a 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 | if.....}......[Test].....public. |
| 29e0 | 76 6f 69 64 20 54 65 73 74 46 6c 65 78 69 62 6c 65 43 61 6c 63 75 6c 61 74 65 4c 61 79 6f 75 74 | void.TestFlexibleCalculateLayout |
| 2a00 | 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 | ().....{.........m_LayoutGroup.c |
| 2a20 | 6f 6e 73 74 72 61 69 6e 74 20 3d 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 | onstraint.=.GridLayoutGroup.Cons |
| 2a40 | 74 72 61 69 6e 74 2e 46 6c 65 78 69 62 6c 65 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e | traint.Flexible;.........Assert. |
| 2a60 | 41 72 65 45 71 75 61 6c 28 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 74 72 61 | AreEqual(GridLayoutGroup.Constra |
| 2a80 | 69 6e 74 2e 46 6c 65 78 69 62 6c 65 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 | int.Flexible,.m_LayoutGroup.cons |
| 2aa0 | 74 72 61 69 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 4c 61 79 6f 75 74 52 65 62 75 69 6c 64 65 72 | traint);.........LayoutRebuilder |
| 2ac0 | 2e 46 6f 72 63 65 52 65 62 75 69 6c 64 4c 61 79 6f 75 74 49 6d 6d 65 64 69 61 74 65 28 6d 5f 4c | .ForceRebuildLayoutImmediate(m_L |
| 2ae0 | 61 79 6f 75 74 47 72 6f 75 70 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e | ayoutGroup.GetComponent<RectTran |
| 2b00 | 73 66 6f 72 6d 3e 28 29 29 3b 0a 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 | sform>());..........Assert.AreEq |
| 2b20 | 75 61 6c 28 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 57 69 64 74 68 29 3b | ual(90,.m_LayoutGroup.minWidth); |
| 2b40 | 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 30 30 2c 20 6d 5f | .........Assert.AreEqual(100,.m_ |
| 2b60 | 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 | LayoutGroup.minHeight);......... |
| 2b80 | 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f | Assert.AreEqual(290,.m_LayoutGro |
| 2ba0 | 75 70 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 | up.preferredWidth);.........Asse |
| 2bc0 | 72 74 2e 41 72 65 45 71 75 61 6c 28 31 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 | rt.AreEqual(100,.m_LayoutGroup.p |
| 2be0 | 72 65 66 65 72 72 65 64 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e | referredHeight);.........Assert. |
| 2c00 | 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 | AreEqual(-1,.m_LayoutGroup.flexi |
| 2c20 | 62 6c 65 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 | bleWidth);.........Assert.AreEqu |
| 2c40 | 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 48 65 69 | al(-1,.m_LayoutGroup.flexibleHei |
| 2c60 | 67 68 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 5b 5d 20 65 78 70 65 63 74 65 | ght);..........Vector2[].expecte |
| 2c80 | 64 50 6f 73 69 74 69 6f 6e 73 20 3d 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 | dPositions.=.........{.......... |
| 2ca0 | 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 | ...new.Vector2(0,.-50),......... |
| 2cc0 | 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 | ....new.Vector2(100,.-50),...... |
| 2ce0 | 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 32 30 30 2c 20 2d 35 30 29 2c 0a 20 20 | .......new.Vector2(200,.-50),... |
| 2d00 | 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 33 30 30 2c 20 2d 35 30 29 2c | ..........new.Vector2(300,.-50), |
| 2d20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 30 30 | .............new.Vector2(0,.-100 |
| 2d40 | 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 | ),.............new.Vector2(100,. |
| 2d60 | 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 32 | -100),.............new.Vector2(2 |
| 2d80 | 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f | 00,.-100),.............new.Vecto |
| 2da0 | 72 32 28 33 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 | r2(300,.-100),.........};....... |
| 2dc0 | 20 20 20 56 65 63 74 6f 72 32 20 65 78 70 65 63 74 65 64 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 | ...Vector2.expectedSize.=.new.Ve |
| 2de0 | 63 74 6f 72 32 28 39 30 2c 20 35 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 | ctor2(90,.50);..........for.(int |
| 2e00 | 20 69 20 3d 20 30 3b 20 69 20 3c 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 2e 4c 65 | .i.=.0;.i.<.expectedPositions.Le |
| 2e20 | 6e 67 74 68 3b 20 2b 2b 69 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | ngth;.++i).........{............ |
| 2e40 | 20 76 61 72 20 65 6c 65 6d 65 6e 74 20 3d 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 74 72 61 | .var.element.=.m_LayoutGroup.tra |
| 2e60 | 6e 73 66 6f 72 6d 2e 46 69 6e 64 28 22 45 6c 65 6d 65 6e 74 22 20 2b 20 28 69 20 2b 20 31 29 29 | nsform.Find("Element".+.(i.+.1)) |
| 2e80 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 | ;.............var.rectTransform. |
| 2ea0 | 3d 20 65 6c 65 6d 65 6e 74 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 | =.element.GetComponent<RectTrans |
| 2ec0 | 66 6f 72 6d 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 | form>();..............Assert.Are |
| 2ee0 | 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 5b 69 5d 2c 20 72 65 63 74 | Equal(expectedPositions[i],.rect |
| 2f00 | 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 65 64 50 6f 73 69 74 69 6f 6e 29 3b 0a 20 20 20 | Transform.anchoredPosition);.... |
| 2f20 | 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 | .........Assert.AreEqual(expecte |
| 2f40 | 64 53 69 7a 65 2c 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 29 3b | dSize,.rectTransform.sizeDelta); |
| 2f60 | 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 | .........}.....}......[Test].... |
| 2f80 | 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 65 73 74 48 6f 72 69 7a 6f 6e 74 61 6c 6c 79 43 6f 6e | .public.void.TestHorizontallyCon |
| 2fa0 | 74 72 61 69 6e 65 64 43 61 6c 63 75 6c 61 74 65 4c 61 79 6f 75 74 48 6f 72 69 7a 6f 6e 74 61 6c | trainedCalculateLayoutHorizontal |
| 2fc0 | 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 | ().....{.........m_LayoutGroup.c |
| 2fe0 | 6f 6e 73 74 72 61 69 6e 74 20 3d 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 | onstraint.=.GridLayoutGroup.Cons |
| 3000 | 74 72 61 69 6e 74 2e 46 69 78 65 64 43 6f 6c 75 6d 6e 43 6f 75 6e 74 3b 0a 20 20 20 20 20 20 20 | traint.FixedColumnCount;........ |
| 3020 | 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 20 3d | .m_LayoutGroup.constraintCount.= |
| 3040 | 20 32 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 47 72 69 64 | .2;.........Assert.AreEqual(Grid |
| 3060 | 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 43 6f 6c 75 | LayoutGroup.Constraint.FixedColu |
| 3080 | 6d 6e 43 6f 75 6e 74 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e | mnCount,.m_LayoutGroup.constrain |
| 30a0 | 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 2c 20 6d | t);.........Assert.AreEqual(2,.m |
| 30c0 | 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 29 3b 0a 20 | _LayoutGroup.constraintCount);.. |
| 30e0 | 20 20 20 20 20 20 20 4c 61 79 6f 75 74 52 65 62 75 69 6c 64 65 72 2e 46 6f 72 63 65 52 65 62 75 | .......LayoutRebuilder.ForceRebu |
| 3100 | 69 6c 64 4c 61 79 6f 75 74 49 6d 6d 65 64 69 61 74 65 28 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 | ildLayoutImmediate(m_LayoutGroup |
| 3120 | 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 29 29 3b | .GetComponent<RectTransform>()); |
| 3140 | 0a 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 39 30 2c 20 6d | ..........Assert.AreEqual(190,.m |
| 3160 | 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 | _LayoutGroup.minWidth);......... |
| 3180 | 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f | Assert.AreEqual(200,.m_LayoutGro |
| 31a0 | 75 70 2e 6d 69 6e 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | up.minHeight);.........Assert.Ar |
| 31c0 | 65 45 71 75 61 6c 28 31 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 66 65 72 | eEqual(190,.m_LayoutGroup.prefer |
| 31e0 | 72 65 64 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 | redWidth);.........Assert.AreEqu |
| 3200 | 61 6c 28 32 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 66 65 72 72 65 64 48 | al(200,.m_LayoutGroup.preferredH |
| 3220 | 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 | eight);.........Assert.AreEqual( |
| 3240 | 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 29 | -1,.m_LayoutGroup.flexibleWidth) |
| 3260 | 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f | ;.........Assert.AreEqual(-1,.m_ |
| 3280 | 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 29 3b 0a 0a 20 20 | LayoutGroup.flexibleHeight);.... |
| 32a0 | 20 20 20 20 20 20 56 65 63 74 6f 72 32 5b 5d 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e | ......Vector2[].expectedPosition |
| 32c0 | 73 20 3d 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 | s.=.........{.............new.Ve |
| 32e0 | 63 74 6f 72 32 28 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 | ctor2(0,.-50),.............new.V |
| 3300 | 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 | ector2(100,.-50),.............ne |
| 3320 | 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | w.Vector2(0,.-100),............. |
| 3340 | 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 | new.Vector2(100,.-100),......... |
| 3360 | 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 35 30 29 2c 0a 20 20 20 20 20 20 | ....new.Vector2(0,.-150),....... |
| 3380 | 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 31 35 30 29 2c 0a 20 20 | ......new.Vector2(100,.-150),... |
| 33a0 | 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 32 30 30 29 2c 0a | ..........new.Vector2(0,.-200),. |
| 33c0 | 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 32 30 | ............new.Vector2(100,.-20 |
| 33e0 | 30 29 2c 0a 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 20 | 0),.........};..........Vector2. |
| 3400 | 65 78 70 65 63 74 65 64 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 39 30 2c 20 35 | expectedSize.=.new.Vector2(90,.5 |
| 3420 | 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c | 0);..........for.(int.i.=.0;.i.< |
| 3440 | 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0a | .expectedPositions.Length;.++i). |
| 3460 | 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e | ........{.............var.elemen |
| 3480 | 74 20 3d 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 74 72 61 6e 73 66 6f 72 6d 2e 46 69 6e 64 | t.=.m_LayoutGroup.transform.Find |
| 34a0 | 28 22 45 6c 65 6d 65 6e 74 22 20 2b 20 28 69 20 2b 20 31 29 29 3b 0a 20 20 20 20 20 20 20 20 20 | ("Element".+.(i.+.1));.......... |
| 34c0 | 20 20 20 76 61 72 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d 20 65 6c 65 6d 65 6e 74 2e 47 | ...var.rectTransform.=.element.G |
| 34e0 | 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 29 3b 0a 0a 20 | etComponent<RectTransform>();... |
| 3500 | 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 | ...........Assert.AreEqual(expec |
| 3520 | 74 65 64 50 6f 73 69 74 69 6f 6e 73 5b 69 5d 2c 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 | tedPositions[i],.rectTransform.a |
| 3540 | 6e 63 68 6f 72 65 64 50 6f 73 69 74 69 6f 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 | nchoredPosition);.............As |
| 3560 | 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 53 69 7a 65 2c 20 72 65 63 74 | sert.AreEqual(expectedSize,.rect |
| 3580 | 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a | Transform.sizeDelta);.........}. |
| 35a0 | 20 20 20 20 7d 0a 0a 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 | ....}......[Test].....public.voi |
| 35c0 | 64 20 54 65 73 74 56 65 72 74 69 63 61 6c 6c 79 43 6f 6e 74 72 61 69 6e 65 64 43 61 6c 63 75 6c | d.TestVerticallyContrainedCalcul |
| 35e0 | 61 74 65 4c 61 79 6f 75 74 48 6f 72 69 7a 6f 6e 74 61 6c 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 | ateLayoutHorizontal().....{..... |
| 3600 | 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 47 | ....m_LayoutGroup.constraint.=.G |
| 3620 | 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 52 | ridLayoutGroup.Constraint.FixedR |
| 3640 | 6f 77 43 6f 75 6e 74 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 | owCount;.........m_LayoutGroup.c |
| 3660 | 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 20 3d 20 32 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 | onstraintCount.=.2;.........Asse |
| 3680 | 72 74 2e 41 72 65 45 71 75 61 6c 28 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 | rt.AreEqual(GridLayoutGroup.Cons |
| 36a0 | 74 72 61 69 6e 74 2e 46 69 78 65 64 52 6f 77 43 6f 75 6e 74 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 | traint.FixedRowCount,.m_LayoutGr |
| 36c0 | 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e | oup.constraint);.........Assert. |
| 36e0 | 41 72 65 45 71 75 61 6c 28 32 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 | AreEqual(2,.m_LayoutGroup.constr |
| 3700 | 61 69 6e 74 43 6f 75 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 4c 61 79 6f 75 74 52 65 62 75 69 6c | aintCount);.........LayoutRebuil |
| 3720 | 64 65 72 2e 46 6f 72 63 65 52 65 62 75 69 6c 64 4c 61 79 6f 75 74 49 6d 6d 65 64 69 61 74 65 28 | der.ForceRebuildLayoutImmediate( |
| 3740 | 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 | m_LayoutGroup.GetComponent<RectT |
| 3760 | 72 61 6e 73 66 6f 72 6d 3e 28 29 29 3b 0a 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | ransform>());..........Assert.Ar |
| 3780 | 65 45 71 75 61 6c 28 33 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 57 69 64 | eEqual(390,.m_LayoutGroup.minWid |
| 37a0 | 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 30 30 | th);.........Assert.AreEqual(100 |
| 37c0 | 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 48 65 69 67 68 74 29 3b 0a 20 20 20 20 | ,.m_LayoutGroup.minHeight);..... |
| 37e0 | 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 33 39 30 2c 20 6d 5f 4c 61 79 6f 75 | ....Assert.AreEqual(390,.m_Layou |
| 3800 | 74 47 72 6f 75 70 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 | tGroup.preferredWidth);......... |
| 3820 | 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f | Assert.AreEqual(100,.m_LayoutGro |
| 3840 | 75 70 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 | up.preferredHeight);.........Ass |
| 3860 | 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 | ert.AreEqual(-1,.m_LayoutGroup.f |
| 3880 | 6c 65 78 69 62 6c 65 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | lexibleWidth);.........Assert.Ar |
| 38a0 | 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c | eEqual(-1,.m_LayoutGroup.flexibl |
| 38c0 | 65 48 65 69 67 68 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 5b 5d 20 65 78 70 | eHeight);..........Vector2[].exp |
| 38e0 | 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 20 3d 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 | ectedPositions.=.........{...... |
| 3900 | 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 | .......new.Vector2(0,.-50),..... |
| 3920 | 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 35 30 29 2c 0a 20 | ........new.Vector2(100,.-50),.. |
| 3940 | 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 32 30 30 2c 20 2d 35 30 29 | ...........new.Vector2(200,.-50) |
| 3960 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 33 30 30 2c 20 2d | ,.............new.Vector2(300,.- |
| 3980 | 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 | 50),.............new.Vector2(0,. |
| 39a0 | 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 | -100),.............new.Vector2(1 |
| 39c0 | 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f | 00,.-100),.............new.Vecto |
| 39e0 | 72 32 28 32 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 | r2(200,.-100),.............new.V |
| 3a00 | 65 63 74 6f 72 32 28 33 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 | ector2(300,.-100),.........};... |
| 3a20 | 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 20 65 78 70 65 63 74 65 64 53 69 7a 65 20 3d 20 6e 65 | .......Vector2.expectedSize.=.ne |
| 3a40 | 77 20 56 65 63 74 6f 72 32 28 39 30 2c 20 35 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 66 6f 72 20 | w.Vector2(90,.50);..........for. |
| 3a60 | 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e | (int.i.=.0;.i.<.expectedPosition |
| 3a80 | 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 | s.Length;.++i).........{........ |
| 3aa0 | 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 20 3d 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 | .....var.element.=.m_LayoutGroup |
| 3ac0 | 2e 74 72 61 6e 73 66 6f 72 6d 2e 46 69 6e 64 28 22 45 6c 65 6d 65 6e 74 22 20 2b 20 28 69 20 2b | .transform.Find("Element".+.(i.+ |
| 3ae0 | 20 31 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 63 74 54 72 61 6e 73 66 | .1));.............var.rectTransf |
| 3b00 | 6f 72 6d 20 3d 20 65 6c 65 6d 65 6e 74 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 | orm.=.element.GetComponent<RectT |
| 3b20 | 72 61 6e 73 66 6f 72 6d 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 | ransform>();..............Assert |
| 3b40 | 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 5b 69 5d 2c 20 | .AreEqual(expectedPositions[i],. |
| 3b60 | 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 65 64 50 6f 73 69 74 69 6f 6e 29 3b | rectTransform.anchoredPosition); |
| 3b80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 | .............Assert.AreEqual(exp |
| 3ba0 | 65 63 74 65 64 53 69 7a 65 2c 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c | ectedSize,.rectTransform.sizeDel |
| 3bc0 | 74 61 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 5b 54 65 73 74 5d | ta);.........}.....}......[Test] |
| 3be0 | 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 65 73 74 48 6f 72 69 7a 6f 6e 74 61 6c 6c | .....public.void.TestHorizontall |
| 3c00 | 79 43 6f 6e 74 72 61 69 6e 65 64 43 61 6c 63 75 6c 61 74 65 4c 61 79 6f 75 74 56 65 72 74 69 63 | yContrainedCalculateLayoutVertic |
| 3c20 | 61 6c 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 | al().....{.........m_LayoutGroup |
| 3c40 | 2e 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f | .constraint.=.GridLayoutGroup.Co |
| 3c60 | 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 43 6f 6c 75 6d 6e 43 6f 75 6e 74 3b 0a 20 20 20 20 20 | nstraint.FixedColumnCount;...... |
| 3c80 | 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 | ...m_LayoutGroup.constraintCount |
| 3ca0 | 20 3d 20 32 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 73 74 61 72 | .=.2;.........m_LayoutGroup.star |
| 3cc0 | 74 41 78 69 73 20 3d 20 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 41 78 69 73 2e 56 65 72 | tAxis.=.GridLayoutGroup.Axis.Ver |
| 3ce0 | 74 69 63 61 6c 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 47 | tical;.........Assert.AreEqual(G |
| 3d00 | 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 43 | ridLayoutGroup.Constraint.FixedC |
| 3d20 | 6f 6c 75 6d 6e 43 6f 75 6e 74 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 | olumnCount,.m_LayoutGroup.constr |
| 3d40 | 61 69 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 | aint);.........Assert.AreEqual(2 |
| 3d60 | 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 29 | ,.m_LayoutGroup.constraintCount) |
| 3d80 | 3b 0a 20 20 20 20 20 20 20 20 4c 61 79 6f 75 74 52 65 62 75 69 6c 64 65 72 2e 46 6f 72 63 65 52 | ;.........LayoutRebuilder.ForceR |
| 3da0 | 65 62 75 69 6c 64 4c 61 79 6f 75 74 49 6d 6d 65 64 69 61 74 65 28 6d 5f 4c 61 79 6f 75 74 47 72 | ebuildLayoutImmediate(m_LayoutGr |
| 3dc0 | 6f 75 70 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 | oup.GetComponent<RectTransform>( |
| 3de0 | 29 29 3b 0a 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 39 30 | ));..........Assert.AreEqual(190 |
| 3e00 | 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e 57 69 64 74 68 29 3b 0a 20 20 20 20 20 | ,.m_LayoutGroup.minWidth);...... |
| 3e20 | 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 | ...Assert.AreEqual(200,.m_Layout |
| 3e40 | 47 72 6f 75 70 2e 6d 69 6e 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 | Group.minHeight);.........Assert |
| 3e60 | 2e 41 72 65 45 71 75 61 6c 28 31 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 | .AreEqual(190,.m_LayoutGroup.pre |
| 3e80 | 66 65 72 72 65 64 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 | ferredWidth);.........Assert.Are |
| 3ea0 | 45 71 75 61 6c 28 32 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 66 65 72 72 | Equal(200,.m_LayoutGroup.preferr |
| 3ec0 | 65 64 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 | edHeight);.........Assert.AreEqu |
| 3ee0 | 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 57 69 64 | al(-1,.m_LayoutGroup.flexibleWid |
| 3f00 | 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c | th);.........Assert.AreEqual(-1, |
| 3f20 | 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 29 3b 0a | .m_LayoutGroup.flexibleHeight);. |
| 3f40 | 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 5b 5d 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 | .........Vector2[].expectedPosit |
| 3f60 | 69 6f 6e 73 20 3d 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 | ions.=.........{.............new |
| 3f80 | 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 | .Vector2(0,.-50),.............ne |
| 3fa0 | 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | w.Vector2(0,.-100),............. |
| 3fc0 | 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 | new.Vector2(0,.-150),........... |
| 3fe0 | 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 32 30 30 29 2c 0a 20 20 20 20 20 20 20 20 | ..new.Vector2(0,.-200),......... |
| 4000 | 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 | ....new.Vector2(100,.-50),...... |
| 4020 | 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 31 30 30 29 2c 0a 20 | .......new.Vector2(100,.-100),.. |
| 4040 | 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 31 35 30 | ...........new.Vector2(100,.-150 |
| 4060 | 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 | ),.............new.Vector2(100,. |
| 4080 | 2d 32 30 30 29 2c 0a 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f | -200),.........};..........Vecto |
| 40a0 | 72 32 20 65 78 70 65 63 74 65 64 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 39 30 | r2.expectedSize.=.new.Vector2(90 |
| 40c0 | 2c 20 35 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 | ,.50);..........for.(int.i.=.0;. |
| 40e0 | 69 20 3c 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b | i.<.expectedPositions.Length;.++ |
| 4100 | 69 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 | i).........{.............var.ele |
| 4120 | 6d 65 6e 74 20 3d 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 74 72 61 6e 73 66 6f 72 6d 2e 46 | ment.=.m_LayoutGroup.transform.F |
| 4140 | 69 6e 64 28 22 45 6c 65 6d 65 6e 74 22 20 2b 20 28 69 20 2b 20 31 29 29 3b 0a 20 20 20 20 20 20 | ind("Element".+.(i.+.1));....... |
| 4160 | 20 20 20 20 20 20 76 61 72 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d 20 65 6c 65 6d 65 6e | ......var.rectTransform.=.elemen |
| 4180 | 74 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 29 3b | t.GetComponent<RectTransform>(); |
| 41a0 | 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 | ..............Assert.AreEqual(ex |
| 41c0 | 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 5b 69 5d 2c 20 72 65 63 74 54 72 61 6e 73 66 6f 72 | pectedPositions[i],.rectTransfor |
| 41e0 | 6d 2e 61 6e 63 68 6f 72 65 64 50 6f 73 69 74 69 6f 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | m.anchoredPosition);............ |
| 4200 | 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 53 69 7a 65 2c 20 72 | .Assert.AreEqual(expectedSize,.r |
| 4220 | 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 29 3b 0a 20 20 20 20 20 20 20 | ectTransform.sizeDelta);........ |
| 4240 | 20 7d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 | .}.....}......[Test].....public. |
| 4260 | 76 6f 69 64 20 54 65 73 74 56 65 72 74 69 63 61 6c 6c 79 43 6f 6e 74 72 61 69 6e 65 64 43 61 6c | void.TestVerticallyContrainedCal |
| 4280 | 63 75 6c 61 74 65 4c 61 79 6f 75 74 56 65 72 74 69 63 61 6c 28 29 0a 20 20 20 20 7b 0a 20 20 20 | culateLayoutVertical().....{.... |
| 42a0 | 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 | .....m_LayoutGroup.constraint.=. |
| 42c0 | 47 72 69 64 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 | GridLayoutGroup.Constraint.Fixed |
| 42e0 | 52 6f 77 43 6f 75 6e 74 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e | RowCount;.........m_LayoutGroup. |
| 4300 | 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 20 3d 20 32 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c | constraintCount.=.2;.........m_L |
| 4320 | 61 79 6f 75 74 47 72 6f 75 70 2e 73 74 61 72 74 41 78 69 73 20 3d 20 47 72 69 64 4c 61 79 6f 75 | ayoutGroup.startAxis.=.GridLayou |
| 4340 | 74 47 72 6f 75 70 2e 41 78 69 73 2e 56 65 72 74 69 63 61 6c 3b 0a 20 20 20 20 20 20 20 20 6d 5f | tGroup.Axis.Vertical;.........m_ |
| 4360 | 4c 61 79 6f 75 74 47 72 6f 75 70 2e 73 74 61 72 74 43 6f 72 6e 65 72 20 3d 20 47 72 69 64 4c 61 | LayoutGroup.startCorner.=.GridLa |
| 4380 | 79 6f 75 74 47 72 6f 75 70 2e 43 6f 72 6e 65 72 2e 4c 6f 77 65 72 52 69 67 68 74 3b 0a 20 20 20 | youtGroup.Corner.LowerRight;.... |
| 43a0 | 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 47 72 69 64 4c 61 79 6f 75 74 47 | .....Assert.AreEqual(GridLayoutG |
| 43c0 | 72 6f 75 70 2e 43 6f 6e 73 74 72 61 69 6e 74 2e 46 69 78 65 64 52 6f 77 43 6f 75 6e 74 2c 20 6d | roup.Constraint.FixedRowCount,.m |
| 43e0 | 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 20 20 20 20 20 20 | _LayoutGroup.constraint);....... |
| 4400 | 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 32 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f | ..Assert.AreEqual(2,.m_LayoutGro |
| 4420 | 75 70 2e 63 6f 6e 73 74 72 61 69 6e 74 43 6f 75 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c | up.constraintCount);.........m_L |
| 4440 | 61 79 6f 75 74 47 72 6f 75 70 2e 43 61 6c 63 75 6c 61 74 65 4c 61 79 6f 75 74 49 6e 70 75 74 48 | ayoutGroup.CalculateLayoutInputH |
| 4460 | 6f 72 69 7a 6f 6e 74 61 6c 28 29 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f | orizontal();.........m_LayoutGro |
| 4480 | 75 70 2e 53 65 74 4c 61 79 6f 75 74 48 6f 72 69 7a 6f 6e 74 61 6c 28 29 3b 0a 20 20 20 20 20 20 | up.SetLayoutHorizontal();....... |
| 44a0 | 20 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 43 61 6c 63 75 6c 61 74 65 4c 61 79 6f 75 74 49 | ..m_LayoutGroup.CalculateLayoutI |
| 44c0 | 6e 70 75 74 56 65 72 74 69 63 61 6c 28 29 3b 0a 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 | nputVertical();.........m_Layout |
| 44e0 | 47 72 6f 75 70 2e 53 65 74 4c 61 79 6f 75 74 56 65 72 74 69 63 61 6c 28 29 3b 0a 0a 20 20 20 20 | Group.SetLayoutVertical();...... |
| 4500 | 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 33 39 30 2c 20 6d 5f 4c 61 79 6f 75 | ....Assert.AreEqual(390,.m_Layou |
| 4520 | 74 47 72 6f 75 70 2e 6d 69 6e 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 | tGroup.minWidth);.........Assert |
| 4540 | 2e 41 72 65 45 71 75 61 6c 28 31 30 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 6d 69 6e | .AreEqual(100,.m_LayoutGroup.min |
| 4560 | 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c | Height);.........Assert.AreEqual |
| 4580 | 28 33 39 30 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 66 65 72 72 65 64 57 69 64 | (390,.m_LayoutGroup.preferredWid |
| 45a0 | 74 68 29 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 31 30 30 | th);.........Assert.AreEqual(100 |
| 45c0 | 2c 20 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 29 | ,.m_LayoutGroup.preferredHeight) |
| 45e0 | 3b 0a 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f | ;.........Assert.AreEqual(-1,.m_ |
| 4600 | 4c 61 79 6f 75 74 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 29 3b 0a 20 20 20 20 | LayoutGroup.flexibleWidth);..... |
| 4620 | 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 4c 61 79 6f 75 74 | ....Assert.AreEqual(-1,.m_Layout |
| 4640 | 47 72 6f 75 70 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 | Group.flexibleHeight);.......... |
| 4660 | 56 65 63 74 6f 72 32 5b 5d 20 65 78 70 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 20 3d 0a 20 20 | Vector2[].expectedPositions.=... |
| 4680 | 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 | ......{.............new.Vector2( |
| 46a0 | 33 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 | 300,.-100),.............new.Vect |
| 46c0 | 6f 72 32 28 33 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 | or2(300,.-50),.............new.V |
| 46e0 | 65 63 74 6f 72 32 28 32 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e | ector2(200,.-100),.............n |
| 4700 | 65 77 20 56 65 63 74 6f 72 32 28 32 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 20 20 20 20 20 20 20 | ew.Vector2(200,.-50),........... |
| 4720 | 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 31 30 30 29 2c 0a 20 20 20 20 20 20 | ..new.Vector2(100,.-100),....... |
| 4740 | 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 2d 35 30 29 2c 0a 20 20 20 | ......new.Vector2(100,.-50),.... |
| 4760 | 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 31 30 30 29 2c 0a 20 | .........new.Vector2(0,.-100),.. |
| 4780 | 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 2d 35 30 29 2c 0a | ...........new.Vector2(0,.-50),. |
| 47a0 | 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 20 65 78 70 65 | ........};..........Vector2.expe |
| 47c0 | 63 74 65 64 53 69 7a 65 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 39 30 2c 20 35 30 29 3b 0a | ctedSize.=.new.Vector2(90,.50);. |
| 47e0 | 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 65 78 70 | .........for.(int.i.=.0;.i.<.exp |
| 4800 | 65 63 74 65 64 50 6f 73 69 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0a 20 20 20 20 | ectedPositions.Length;.++i)..... |
| 4820 | 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 20 3d 20 | ....{.............var.element.=. |
| 4840 | 6d 5f 4c 61 79 6f 75 74 47 72 6f 75 70 2e 74 72 61 6e 73 66 6f 72 6d 2e 46 69 6e 64 28 22 45 6c | m_LayoutGroup.transform.Find("El |
| 4860 | 65 6d 65 6e 74 22 20 2b 20 28 69 20 2b 20 31 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | ement".+.(i.+.1));.............v |
| 4880 | 61 72 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d 20 65 6c 65 6d 65 6e 74 2e 47 65 74 43 6f | ar.rectTransform.=.element.GetCo |
| 48a0 | 6d 70 6f 6e 65 6e 74 3c 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 3e 28 29 3b 0a 0a 20 20 20 20 20 | mponent<RectTransform>();....... |
| 48c0 | 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 50 | .......Assert.AreEqual(expectedP |
| 48e0 | 6f 73 69 74 69 6f 6e 73 5b 69 5d 2c 20 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f | ositions[i],.rectTransform.ancho |
| 4900 | 72 65 64 50 6f 73 69 74 69 6f 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 | redPosition);.............Assert |
| 4920 | 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 53 69 7a 65 2c 20 72 65 63 74 54 72 61 6e | .AreEqual(expectedSize,.rectTran |
| 4940 | 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 | sform.sizeDelta);.........}..... |
| 4960 | 7d 0a 7d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 00 00 47 72 69 64 | }.}.........................Grid |
| 4980 | 4c 61 79 6f 75 74 47 72 6f 75 70 54 65 73 74 73 00 00 00 00 | LayoutGroupTests.... |