| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 81 00 00 58 a8 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ......X.............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 | 48 48 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 | HH.............................. |
| 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 0a 00 00 00 49 6d 61 67 65 54 65 73 74 73 00 00 cf 47 00 00 75 73 69 6e | ............ImageTests...G..usin |
| 10a0 | 67 20 53 79 73 74 65 6d 3b 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f | g.System;.using.System.Collectio |
| 10c0 | 6e 73 2e 47 65 6e 65 72 69 63 3b 0a 75 73 69 6e 67 20 4e 55 6e 69 74 2e 46 72 61 6d 65 77 6f 72 | ns.Generic;.using.NUnit.Framewor |
| 10e0 | 6b 3b 0a 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 55 49 2e 54 65 73 | k;..namespace.UnityEngine.UI.Tes |
| 1100 | 74 73 0a 7b 0a 20 20 20 20 5b 54 65 73 74 46 69 78 74 75 72 65 5d 0a 20 20 20 20 63 6c 61 73 73 | ts.{.....[TestFixture].....class |
| 1120 | 20 49 6d 61 67 65 54 65 73 74 73 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 49 6d 61 67 65 20 | .ImageTests.....{.........Image. |
| 1140 | 6d 5f 49 6d 61 67 65 3b 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 70 72 69 74 65 20 | m_Image;.........private.Sprite. |
| 1160 | 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 70 72 69 74 65 | m_Sprite;.........private.Sprite |
| 1180 | 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 54 65 78 74 75 | .m_OverrideSprite;.........Textu |
| 11a0 | 72 65 32 44 20 74 65 78 74 75 72 65 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 32 44 28 31 32 38 | re2D.texture.=.new.Texture2D(128 |
| 11c0 | 2c 20 31 32 38 29 3b 0a 20 20 20 20 20 20 20 20 54 65 78 74 75 72 65 32 44 20 6f 76 65 72 72 69 | ,.128);.........Texture2D.overri |
| 11e0 | 64 65 54 65 78 74 75 72 65 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 32 44 28 35 31 32 2c 20 35 | deTexture.=.new.Texture2D(512,.5 |
| 1200 | 31 32 29 3b 0a 0a 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 6d 5f 64 69 72 74 79 56 65 72 74 3b 0a | 12);..........bool.m_dirtyVert;. |
| 1220 | 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 3b 0a 20 20 20 20 | ........bool.m_dirtyLayout;..... |
| 1240 | 20 20 20 20 62 6f 6f 6c 20 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 3b 0a 0a 20 20 20 20 20 | ....bool.m_dirtyMaterial;....... |
| 1260 | 20 20 20 5b 53 65 74 55 70 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 | ...[SetUp].........public.void.T |
| 1280 | 65 73 74 53 65 74 75 70 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | estSetup().........{............ |
| 12a0 | 20 76 61 72 20 63 61 6e 76 61 73 52 6f 6f 74 20 3d 20 6e 65 77 20 47 61 6d 65 4f 62 6a 65 63 74 | .var.canvasRoot.=.new.GameObject |
| 12c0 | 28 22 43 61 6e 76 61 73 22 2c 20 74 79 70 65 6f 66 28 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 29 | ("Canvas",.typeof(RectTransform) |
| 12e0 | 2c 20 74 79 70 65 6f 66 28 43 61 6e 76 61 73 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 | ,.typeof(Canvas));.............G |
| 1300 | 61 6d 65 4f 62 6a 65 63 74 20 67 61 6d 65 4f 62 6a 65 63 74 20 3d 20 6e 65 77 20 47 61 6d 65 4f | ameObject.gameObject.=.new.GameO |
| 1320 | 62 6a 65 63 74 28 22 49 6d 61 67 65 22 2c 20 74 79 70 65 6f 66 28 52 65 63 74 54 72 61 6e 73 66 | bject("Image",.typeof(RectTransf |
| 1340 | 6f 72 6d 29 2c 20 74 79 70 65 6f 66 28 49 6d 61 67 65 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | orm),.typeof(Image));........... |
| 1360 | 20 20 67 61 6d 65 4f 62 6a 65 63 74 2e 74 72 61 6e 73 66 6f 72 6d 2e 53 65 74 50 61 72 65 6e 74 | ..gameObject.transform.SetParent |
| 1380 | 28 63 61 6e 76 61 73 52 6f 6f 74 2e 74 72 61 6e 73 66 6f 72 6d 29 3b 0a 0a 20 20 20 20 20 20 20 | (canvasRoot.transform);......... |
| 13a0 | 20 20 20 20 20 6d 5f 49 6d 61 67 65 20 3d 20 67 61 6d 65 4f 62 6a 65 63 74 2e 47 65 74 43 6f 6d | .....m_Image.=.gameObject.GetCom |
| 13c0 | 70 6f 6e 65 6e 74 3c 49 6d 61 67 65 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f | ponent<Image>();..............Co |
| 13e0 | 6c 6f 72 5b 5d 20 63 6f 6c 6f 72 73 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 5b 31 32 38 20 2a 20 31 | lor[].colors.=.new.Color[128.*.1 |
| 1400 | 32 38 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 79 20 3d 20 30 3b | 28];.............for.(int.y.=.0; |
| 1420 | 20 79 20 3c 20 31 32 38 3b 20 79 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 | .y.<.128;.y++).................f |
| 1440 | 6f 72 20 28 69 6e 74 20 78 20 3d 20 30 3b 20 78 20 3c 20 31 32 38 3b 20 78 2b 2b 29 0a 20 20 20 | or.(int.x.=.0;.x.<.128;.x++).... |
| 1460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6c 6f 72 73 5b 78 20 2b 20 31 32 38 20 | .................colors[x.+.128. |
| 1480 | 2a 20 79 5d 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 28 30 2c 20 30 2c 20 30 2c 20 31 20 2d 20 78 20 | *.y].=.new.Color(0,.0,.0,.1.-.x. |
| 14a0 | 2f 20 31 32 38 66 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 75 72 65 2e 53 65 74 | /.128f);.............texture.Set |
| 14c0 | 50 69 78 65 6c 73 28 63 6f 6c 6f 72 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 | Pixels(colors);.............text |
| 14e0 | 75 72 65 2e 41 70 70 6c 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 5b | ure.Apply();..............Color[ |
| 1500 | 5d 20 6f 76 65 72 72 69 64 65 43 6f 6c 6f 72 73 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 5b 35 31 32 | ].overrideColors.=.new.Color[512 |
| 1520 | 20 2a 20 35 31 32 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 79 20 | .*.512];.............for.(int.y. |
| 1540 | 3d 20 30 3b 20 79 20 3c 20 35 31 32 3b 20 79 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.0;.y.<.512;.y++).............. |
| 1560 | 20 20 20 66 6f 72 20 28 69 6e 74 20 78 20 3d 20 30 3b 20 78 20 3c 20 35 31 32 3b 20 78 2b 2b 29 | ...for.(int.x.=.0;.x.<.512;.x++) |
| 1580 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 64 65 43 6f 6c | .....................overrideCol |
| 15a0 | 6f 72 73 5b 78 20 2b 20 35 31 32 20 2a 20 79 5d 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 28 30 2c 20 | ors[x.+.512.*.y].=.new.Color(0,. |
| 15c0 | 30 2c 20 30 2c 20 79 20 2f 20 35 31 32 66 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 | 0,.0,.y./.512f);.............ove |
| 15e0 | 72 72 69 64 65 54 65 78 74 75 72 65 2e 53 65 74 50 69 78 65 6c 73 28 6f 76 65 72 72 69 64 65 43 | rrideTexture.SetPixels(overrideC |
| 1600 | 6f 6c 6f 72 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 76 65 72 72 69 64 65 54 65 78 74 | olors);.............overrideText |
| 1620 | 75 72 65 2e 41 70 70 6c 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 70 72 69 | ure.Apply();..............m_Spri |
| 1640 | 74 65 20 3d 20 53 70 72 69 74 65 2e 43 72 65 61 74 65 28 74 65 78 74 75 72 65 2c 20 6e 65 77 20 | te.=.Sprite.Create(texture,.new. |
| 1660 | 52 65 63 74 28 30 2c 20 30 2c 20 31 32 38 2c 20 31 32 38 29 2c 20 6e 65 77 20 56 65 63 74 6f 72 | Rect(0,.0,.128,.128),.new.Vector |
| 1680 | 32 28 30 2e 35 66 2c 20 30 2e 35 66 29 2c 20 31 30 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | 2(0.5f,.0.5f),.100);............ |
| 16a0 | 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 53 70 72 69 74 65 2e 43 72 65 61 74 | .m_OverrideSprite.=.Sprite.Creat |
| 16c0 | 65 28 6f 76 65 72 72 69 64 65 54 65 78 74 75 72 65 2c 20 6e 65 77 20 52 65 63 74 28 30 2c 20 30 | e(overrideTexture,.new.Rect(0,.0 |
| 16e0 | 2c 20 35 31 32 2c 20 35 31 32 29 2c 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2e 35 66 2c 20 30 | ,.512,.512),.new.Vector2(0.5f,.0 |
| 1700 | 2e 35 66 29 2c 20 32 30 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 | .5f),.200);..............m_Image |
| 1720 | 2e 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 20 | .rectTransform.anchoredPosition. |
| 1740 | 3d 20 6e 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 20 20 20 | =.new.Vector2(0,.0);............ |
| 1760 | 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 | .m_Image.rectTransform.sizeDelta |
| 1780 | 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 31 30 30 29 3b 0a 20 20 20 20 20 20 | .=.new.Vector2(100,.100);....... |
| 17a0 | 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 52 65 67 69 73 74 65 72 44 69 72 74 79 56 65 72 74 69 | ......m_Image.RegisterDirtyVerti |
| 17c0 | 63 65 73 43 61 6c 6c 62 61 63 6b 28 28 29 20 3d 3e 20 6d 5f 64 69 72 74 79 56 65 72 74 20 3d 20 | cesCallback(().=>.m_dirtyVert.=. |
| 17e0 | 74 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 52 65 67 69 73 | true);.............m_Image.Regis |
| 1800 | 74 65 72 44 69 72 74 79 4c 61 79 6f 75 74 43 61 6c 6c 62 61 63 6b 28 28 29 20 3d 3e 20 6d 5f 64 | terDirtyLayoutCallback(().=>.m_d |
| 1820 | 69 72 74 79 4c 61 79 6f 75 74 20 3d 20 74 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | irtyLayout.=.true);............. |
| 1840 | 6d 5f 49 6d 61 67 65 2e 52 65 67 69 73 74 65 72 44 69 72 74 79 4d 61 74 65 72 69 61 6c 43 61 6c | m_Image.RegisterDirtyMaterialCal |
| 1860 | 6c 62 61 63 6b 28 28 29 20 3d 3e 20 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 20 3d 20 74 72 | lback(().=>.m_dirtyMaterial.=.tr |
| 1880 | 75 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 73 65 74 44 69 72 74 79 46 6c 61 67 | ue);..............ResetDirtyFlag |
| 18a0 | 73 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 61 72 44 6f 77 | s();.........}..........[TearDow |
| 18c0 | 6e 5d 0a 20 20 20 20 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 | n].........public.void.TearDown( |
| 18e0 | 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 20 | ).........{.............m_Image. |
| 1900 | 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 70 72 69 74 65 20 3d 20 6e | =.null;.............m_Sprite.=.n |
| 1920 | 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 | ull;.........}..........private. |
| 1940 | 76 6f 69 64 20 52 65 73 65 74 44 69 72 74 79 46 6c 61 67 73 28 29 0a 20 20 20 20 20 20 20 20 7b | void.ResetDirtyFlags().........{ |
| 1960 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 64 69 72 74 79 56 65 72 74 20 3d 20 6d 5f 64 69 72 | .............m_dirtyVert.=.m_dir |
| 1980 | 74 79 4c 61 79 6f 75 74 20 3d 20 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 20 3d 20 66 61 6c | tyLayout.=.m_dirtyMaterial.=.fal |
| 19a0 | 73 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 | se;.........}..........[Test]... |
| 19c0 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 54 65 73 74 53 70 72 69 74 65 28 | ......public.void.SetTestSprite( |
| 19e0 | 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e | ).........{.............m_Image. |
| 1a00 | 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d | sprite.=.m_Sprite;.............m |
| 1a20 | 5f 49 6d 61 67 65 2e 6f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 | _Image.overrideSprite.=.m_Overri |
| 1a40 | 64 65 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 | deSprite;.............Assert.Are |
| 1a60 | 45 71 75 61 6c 28 6d 5f 53 70 72 69 74 65 2c 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 29 3b | Equal(m_Sprite,.m_Image.sprite); |
| 1a80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6e 75 | .............m_Image.sprite.=.nu |
| 1aa0 | 6c 6c 3b 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 | ll;.............Assert.AreEqual( |
| 1ac0 | 6e 75 6c 6c 2c 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 29 3b 0a 20 20 20 20 20 20 20 20 7d | null,.m_Image.sprite);.........} |
| 1ae0 | 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ..........[Test].........public. |
| 1b00 | 76 6f 69 64 20 54 65 73 74 50 69 78 65 6c 73 50 65 72 55 6e 69 74 28 29 0a 20 20 20 20 20 20 20 | void.TestPixelsPerUnit()........ |
| 1b20 | 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 | .{.............m_Image.sprite.=. |
| 1b40 | 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 | m_Sprite;.............Assert.Are |
| 1b60 | 45 71 75 61 6c 28 31 2e 30 66 2c 20 6d 5f 49 6d 61 67 65 2e 70 69 78 65 6c 73 50 65 72 55 6e 69 | Equal(1.0f,.m_Image.pixelsPerUni |
| 1b80 | 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 6f 76 65 72 72 69 64 | t);..............m_Image.overrid |
| 1ba0 | 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 3b 0a 20 20 20 20 | eSprite.=.m_OverrideSprite;..... |
| 1bc0 | 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 2e 30 66 2c 20 6d 5f | ........Assert.AreEqual(2.0f,.m_ |
| 1be0 | 49 6d 61 67 65 2e 70 69 78 65 6c 73 50 65 72 55 6e 69 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 | Image.pixelsPerUnit);........... |
| 1c00 | 20 20 20 6d 5f 49 6d 61 67 65 2e 6f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6e 75 6c 6c | ...m_Image.overrideSprite.=.null |
| 1c20 | 3b 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 31 2e | ;.............Assert.AreEqual(1. |
| 1c40 | 30 66 2c 20 6d 5f 49 6d 61 67 65 2e 70 69 78 65 6c 73 50 65 72 55 6e 69 74 29 3b 0a 20 20 20 20 | 0f,.m_Image.pixelsPerUnit);..... |
| 1c60 | 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 | ....}..........[Test].........pu |
| 1c80 | 62 6c 69 63 20 76 6f 69 64 20 52 61 79 63 61 73 74 4f 76 65 72 49 6d 61 67 65 57 69 74 68 6f 75 | blic.void.RaycastOverImageWithou |
| 1ca0 | 74 41 53 70 72 69 74 65 52 65 74 75 72 6e 54 72 75 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 | tASpriteReturnTrue().........{.. |
| 1cc0 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6e 75 6c 6c | ...........m_Image.sprite.=.null |
| 1ce0 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 72 61 79 63 61 73 74 20 3d 20 6d 5f 49 | ;.............bool.raycast.=.m_I |
| 1d00 | 6d 61 67 65 2e 52 61 79 63 61 73 74 28 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 2c 20 31 30 29 | mage.Raycast(new.Vector2(10,.10) |
| 1d20 | 2c 20 6e 65 77 20 43 61 6d 65 72 61 28 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | ,.new.Camera());.............Ass |
| 1d40 | 65 72 74 2e 41 72 65 45 71 75 61 6c 28 74 72 75 65 2c 20 72 61 79 63 61 73 74 29 3b 0a 20 20 20 | ert.AreEqual(true,.raycast);.... |
| 1d60 | 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 5b | .....}..........[Test].........[ |
| 1d80 | 54 65 73 74 43 61 73 65 28 30 2e 30 66 2c 20 31 30 30 30 2c 20 31 30 30 30 29 5d 0a 20 20 20 20 | TestCase(0.0f,.1000,.1000)]..... |
| 1da0 | 20 20 20 20 5b 54 65 73 74 43 61 73 65 28 31 2e 30 66 2c 20 31 30 30 30 2c 20 31 30 30 30 29 5d | ....[TestCase(1.0f,.1000,.1000)] |
| 1dc0 | 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 43 61 73 65 28 30 2e 30 66 2c 20 2d 31 30 30 30 2c 20 | .........[TestCase(0.0f,.-1000,. |
| 1de0 | 31 30 30 30 29 5d 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 43 61 73 65 28 31 2e 30 66 2c 20 2d | 1000)].........[TestCase(1.0f,.- |
| 1e00 | 31 30 30 30 2c 20 31 30 30 30 29 5d 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 43 61 73 65 28 30 | 1000,.1000)].........[TestCase(0 |
| 1e20 | 2e 30 66 2c 20 31 30 30 30 2c 20 2d 31 30 30 30 29 5d 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 | .0f,.1000,.-1000)].........[Test |
| 1e40 | 43 61 73 65 28 31 2e 30 66 2c 20 31 30 30 30 2c 20 2d 31 30 30 30 29 5d 0a 20 20 20 20 20 20 20 | Case(1.0f,.1000,.-1000)]........ |
| 1e60 | 20 5b 54 65 73 74 43 61 73 65 28 30 2e 30 66 2c 20 2d 31 30 30 30 2c 20 2d 31 30 30 30 29 5d 0a | .[TestCase(0.0f,.-1000,.-1000)]. |
| 1e80 | 20 20 20 20 20 20 20 20 5b 54 65 73 74 43 61 73 65 28 31 2e 30 66 2c 20 2d 31 30 30 30 2c 20 2d | ........[TestCase(1.0f,.-1000,.- |
| 1ea0 | 31 30 30 30 29 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 52 61 79 63 61 | 1000)].........public.void.Rayca |
| 1ec0 | 73 74 4f 76 65 72 49 6d 61 67 65 57 69 74 68 6f 75 74 41 53 70 72 69 74 65 52 65 74 75 72 6e 73 | stOverImageWithoutASpriteReturns |
| 1ee0 | 54 72 75 65 57 69 74 68 43 6f 6f 72 64 69 6e 61 74 65 73 4f 75 74 73 69 64 65 54 68 65 42 6f 75 | TrueWithCoordinatesOutsideTheBou |
| 1f00 | 6e 64 61 72 69 65 73 28 66 6c 6f 61 74 20 61 6c 70 68 61 54 68 72 65 73 68 6f 6c 64 2c 20 66 6c | ndaries(float.alphaThreshold,.fl |
| 1f20 | 6f 61 74 20 78 2c 20 66 6c 6f 61 74 20 79 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 | oat.x,.float.y).........{....... |
| 1f40 | 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 61 6c 70 68 61 48 69 74 54 65 73 74 4d 69 6e 69 6d 75 | ......m_Image.alphaHitTestMinimu |
| 1f60 | 6d 54 68 72 65 73 68 6f 6c 64 20 3d 20 31 2e 30 66 20 2d 20 61 6c 70 68 61 54 68 72 65 73 68 6f | mThreshold.=.1.0f.-.alphaThresho |
| 1f80 | 6c 64 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 72 61 79 63 61 73 74 20 3d 20 6d | ld;.............bool.raycast.=.m |
| 1fa0 | 5f 49 6d 61 67 65 2e 52 61 79 63 61 73 74 28 6e 65 77 20 56 65 63 74 6f 72 32 28 78 2c 20 79 29 | _Image.Raycast(new.Vector2(x,.y) |
| 1fc0 | 2c 20 6e 65 77 20 43 61 6d 65 72 61 28 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | ,.new.Camera());.............Ass |
| 1fe0 | 65 72 74 2e 49 73 54 72 75 65 28 72 61 79 63 61 73 74 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a | ert.IsTrue(raycast);.........}.. |
| 2000 | 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f | ........[Test].........public.vo |
| 2020 | 69 64 20 53 65 74 74 69 6e 67 53 70 72 69 74 65 4d 61 72 6b 73 41 6c 6c 41 73 44 69 72 74 79 28 | id.SettingSpriteMarksAllAsDirty( |
| 2040 | 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e | ).........{.............m_Image. |
| 2060 | 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 | sprite.=.m_Sprite;.............A |
| 2080 | 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 | ssert.True(m_dirtyVert,."Vertice |
| 20a0 | 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 | s.have.not.been.dirtied");...... |
| 20c0 | 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 | .......Assert.True(m_dirtyLayout |
| 20e0 | 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 | ,."Layout.has.not.been.dirtied") |
| 2100 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 | ;.............Assert.True(m_dirt |
| 2120 | 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 20 6e 6f 74 20 62 65 65 | yMaterial,."Material.has.not.bee |
| 2140 | 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | n.dirtied");.........}.......... |
| 2160 | 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 | [Test].........public.void.Setti |
| 2180 | 6e 67 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 4d 61 72 6b 73 41 6c 6c 41 73 44 69 72 74 79 28 | ngOverrideSpriteMarksAllAsDirty( |
| 21a0 | 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e | ).........{.............m_Image. |
| 21c0 | 6f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 | overrideSprite.=.m_OverrideSprit |
| 21e0 | 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 | e;.............Assert.True(m_dir |
| 2200 | 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 6e 20 | tyVert,."Vertices.have.not.been. |
| 2220 | 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 | dirtied");.............Assert.Tr |
| 2240 | 75 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 6e 6f | ue(m_dirtyLayout,."Layout.has.no |
| 2260 | 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 | t.been.dirtied");.............As |
| 2280 | 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 | sert.True(m_dirtyMaterial,."Mate |
| 22a0 | 72 69 61 6c 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 | rial.has.not.been.dirtied");.... |
| 22c0 | 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 | .....}..........[Test].........p |
| 22e0 | 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 54 79 70 65 4d 61 72 6b 73 56 65 72 74 69 | ublic.void.SettingTypeMarksVerti |
| 2300 | 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 | cesAsDirty().........{.......... |
| 2320 | 20 20 20 6d 5f 49 6d 61 67 65 2e 74 79 70 65 20 3d 20 49 6d 61 67 65 2e 54 79 70 65 2e 46 69 6c | ...m_Image.type.=.Image.Type.Fil |
| 2340 | 6c 65 64 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 | led;.............Assert.True(m_d |
| 2360 | 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 | irtyVert,."Vertices.have.not.bee |
| 2380 | 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e | n.dirtied");.............Assert. |
| 23a0 | 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 | False(m_dirtyLayout,."Layout.has |
| 23c0 | 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | .been.dirtied");.............Ass |
| 23e0 | 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 | ert.False(m_dirtyMaterial,."Mate |
| 2400 | 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 | rial.has.been.dirtied");........ |
| 2420 | 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 | .}..........[Test].........publi |
| 2440 | 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 50 72 65 73 65 72 76 65 41 73 70 65 63 74 4d 61 72 6b | c.void.SettingPreserveAspectMark |
| 2460 | 73 56 65 72 74 69 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 | sVerticesAsDirty().........{.... |
| 2480 | 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 70 72 65 73 65 72 76 65 41 73 70 65 63 74 20 | .........m_Image.preserveAspect. |
| 24a0 | 3d 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 | =.true;.............Assert.True( |
| 24c0 | 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 | m_dirtyVert,."Vertices.have.not. |
| 24e0 | 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 | been.dirtied");.............Asse |
| 2500 | 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 | rt.False(m_dirtyLayout,."Layout. |
| 2520 | 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | has.been.dirtied");............. |
| 2540 | 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d | Assert.False(m_dirtyMaterial,."M |
| 2560 | 61 74 65 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 | aterial.has.been.dirtied");..... |
| 2580 | 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 | ....}..........[Test].........pu |
| 25a0 | 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 46 69 6c 6c 43 65 6e 74 65 72 4d 61 72 6b 73 | blic.void.SettingFillCenterMarks |
| 25c0 | 56 65 72 74 69 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 | VerticesAsDirty().........{..... |
| 25e0 | 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 43 65 6e 74 65 72 20 3d 20 66 61 6c | ........m_Image.fillCenter.=.fal |
| 2600 | 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 | se;.............Assert.True(m_di |
| 2620 | 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 6e | rtyVert,."Vertices.have.not.been |
| 2640 | 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 | .dirtied");.............Assert.F |
| 2660 | 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 | alse(m_dirtyLayout,."Layout.has. |
| 2680 | 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 | been.dirtied");.............Asse |
| 26a0 | 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 | rt.False(m_dirtyMaterial,."Mater |
| 26c0 | 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 | ial.has.been.dirtied");......... |
| 26e0 | 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | }..........[Test].........public |
| 2700 | 20 76 6f 69 64 20 53 65 74 74 69 6e 67 46 69 6c 6c 4d 65 74 68 6f 64 4d 61 72 6b 73 56 65 72 74 | .void.SettingFillMethodMarksVert |
| 2720 | 69 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 | icesAsDirty().........{......... |
| 2740 | 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4d 65 74 68 6f 64 20 3d 20 49 6d 61 67 65 2e 46 | ....m_Image.fillMethod.=.Image.F |
| 2760 | 69 6c 6c 4d 65 74 68 6f 64 2e 48 6f 72 69 7a 6f 6e 74 61 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 | illMethod.Horizontal;........... |
| 2780 | 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 | ..Assert.True(m_dirtyVert,."Vert |
| 27a0 | 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 | ices.have.not.been.dirtied");... |
| 27c0 | 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 | ..........Assert.False(m_dirtyLa |
| 27e0 | 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 | yout,."Layout.has.been.dirtied") |
| 2800 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 | ;.............Assert.False(m_dir |
| 2820 | 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 | tyMaterial,."Material.has.been.d |
| 2840 | 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 | irtied");.........}..........[Te |
| 2860 | 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 46 | st].........public.void.SettingF |
| 2880 | 69 6c 6c 41 6d 6f 75 6e 74 4d 61 72 6b 73 56 65 72 74 69 63 65 73 41 73 44 69 72 74 79 28 29 0a | illAmountMarksVerticesAsDirty(). |
| 28a0 | 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 | ........{.............m_Image.fi |
| 28c0 | 6c 6c 41 6d 6f 75 6e 74 20 3d 20 30 2e 35 66 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | llAmount.=.0.5f;.............Ass |
| 28e0 | 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 | ert.True(m_dirtyVert,."Vertices. |
| 2900 | 68 61 76 65 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 | have.not.been.dirtied");........ |
| 2920 | 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c | .....Assert.False(m_dirtyLayout, |
| 2940 | 20 22 4c 61 79 6f 75 74 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 | ."Layout.has.been.dirtied");.... |
| 2960 | 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d 61 74 | .........Assert.False(m_dirtyMat |
| 2980 | 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 | erial,."Material.has.been.dirtie |
| 29a0 | 64 22 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 | d");.........}..........[Test].. |
| 29c0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 46 69 6c 6c 43 6c | .......public.void.SettingFillCl |
| 29e0 | 6f 63 6b 77 69 73 65 4d 61 72 6b 73 56 65 72 74 69 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 | ockwiseMarksVerticesAsDirty()... |
| 2a00 | 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c | ......{.............m_Image.fill |
| 2a20 | 43 6c 6f 63 6b 77 69 73 65 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 | Clockwise.=.false;.............A |
| 2a40 | 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 | ssert.True(m_dirtyVert,."Vertice |
| 2a60 | 73 20 68 61 76 65 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 | s.have.not.been.dirtied");...... |
| 2a80 | 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 | .......Assert.False(m_dirtyLayou |
| 2aa0 | 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 | t,."Layout.has.been.dirtied");.. |
| 2ac0 | 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d | ...........Assert.False(m_dirtyM |
| 2ae0 | 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 | aterial,."Material.has.been.dirt |
| 2b00 | 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d | ied");.........}..........[Test] |
| 2b20 | 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 46 69 6c 6c | .........public.void.SettingFill |
| 2b40 | 4f 72 69 67 69 6e 4d 61 72 6b 73 56 65 72 74 69 63 65 73 41 73 44 69 72 74 79 28 29 0a 20 20 20 | OriginMarksVerticesAsDirty().... |
| 2b60 | 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f | .....{.............m_Image.fillO |
| 2b80 | 72 69 67 69 6e 20 3d 20 31 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 | rigin.=.1;.............Assert.Tr |
| 2ba0 | 75 65 28 6d 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e | ue(m_dirtyVert,."Vertices.have.n |
| 2bc0 | 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 | ot.been.dirtied");.............A |
| 2be0 | 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f | ssert.False(m_dirtyLayout,."Layo |
| 2c00 | 75 74 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 | ut.has.been.dirtied");.......... |
| 2c20 | 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c | ...Assert.False(m_dirtyMaterial, |
| 2c40 | 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 | ."Material.has.been.dirtied");.. |
| 2c60 | 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 | .......}..........[Test]........ |
| 2c80 | 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 74 69 6e 67 45 76 65 6e 74 41 6c 70 68 61 54 68 | .public.void.SettingEventAlphaTh |
| 2ca0 | 72 65 73 68 6f 6c 64 4d 61 72 6b 73 4e 6f 74 68 69 6e 67 41 73 44 69 72 74 79 28 29 0a 20 20 20 | resholdMarksNothingAsDirty().... |
| 2cc0 | 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 61 6c 70 68 61 | .....{.............m_Image.alpha |
| 2ce0 | 48 69 74 54 65 73 74 4d 69 6e 69 6d 75 6d 54 68 72 65 73 68 6f 6c 64 20 3d 20 30 2e 35 66 3b 0a | HitTestMinimumThreshold.=.0.5f;. |
| 2d00 | 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f 64 69 72 74 79 | ............Assert.False(m_dirty |
| 2d20 | 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 62 65 65 6e 20 64 69 72 74 69 65 | Vert,."Vertices.have.been.dirtie |
| 2d40 | 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 65 28 6d 5f | d");.............Assert.False(m_ |
| 2d60 | 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 73 20 62 65 65 6e 20 64 69 | dirtyLayout,."Layout.has.been.di |
| 2d80 | 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 6c 73 | rtied");.............Assert.Fals |
| 2da0 | 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 4d 61 74 65 72 69 61 6c 20 68 61 73 | e(m_dirtyMaterial,."Material.has |
| 2dc0 | 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 | .been.dirtied");.........}...... |
| 2de0 | 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4f | ....[Test].........public.void.O |
| 2e00 | 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 4d 61 6b 65 46 69 6c 6c 4f 72 69 67 69 6e 5a | nAfterDeserializeMakeFillOriginZ |
| 2e20 | 65 72 6f 49 66 4e 6f 74 42 65 74 77 65 65 6e 5a 65 72 6f 41 6e 64 54 68 72 65 65 28 29 0a 20 20 | eroIfNotBetweenZeroAndThree()... |
| 2e40 | 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d | ......{.............for.(int.i.= |
| 2e60 | 20 2d 31 30 3b 20 69 20 3c 20 30 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a | .-10;.i.<.0;.i++).............{. |
| 2e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 | ................m_Image.fillOrig |
| 2ea0 | 69 6e 20 3d 20 69 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e | in.=.i;.................m_Image. |
| 2ec0 | 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | OnAfterDeserialize();........... |
| 2ee0 | 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 | ......Assert.AreEqual(0,.m_Image |
| 2f00 | 2e 66 69 6c 6c 4f 72 69 67 69 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 | .fillOrigin);.............}..... |
| 2f20 | 20 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 34 3b 20 | .........for.(int.i.=.0;.i.<.4;. |
| 2f40 | 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | i++).............{.............. |
| 2f60 | 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 20 3d 20 69 3b 0a 20 20 20 20 20 | ...m_Image.fillOrigin.=.i;...... |
| 2f80 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 72 44 65 73 65 72 69 | ...........m_Image.OnAfterDeseri |
| 2fa0 | 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e | alize();.................Assert. |
| 2fc0 | 41 72 65 45 71 75 61 6c 28 69 2c 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 29 3b | AreEqual(i,.m_Image.fillOrigin); |
| 2fe0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 | .............}..............for. |
| 3000 | 28 69 6e 74 20 69 20 3d 20 34 3b 20 69 20 3c 20 31 30 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 | (int.i.=.4;.i.<.10;.i++)........ |
| 3020 | 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 | .....{.................m_Image.f |
| 3040 | 69 6c 6c 4f 72 69 67 69 6e 20 3d 20 69 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | illOrigin.=.i;.................m |
| 3060 | 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 | _Image.OnAfterDeserialize();.... |
| 3080 | 20 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 30 2c 20 | .............Assert.AreEqual(0,. |
| 30a0 | 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | m_Image.fillOrigin);............ |
| 30c0 | 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 | .}.........}..........[Test].... |
| 30e0 | 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c | .....public.void.OnAfterDeserial |
| 3100 | 69 7a 65 4d 61 6b 65 46 69 6c 6c 4f 72 69 67 69 6e 5a 65 72 6f 49 66 46 69 6c 6c 4f 72 69 67 69 | izeMakeFillOriginZeroIfFillOrigi |
| 3120 | 6e 47 72 65 61 74 65 72 54 68 61 6e 31 41 6e 64 46 69 6c 6c 4d 65 74 68 6f 64 48 6f 72 69 7a 6f | nGreaterThan1AndFillMethodHorizo |
| 3140 | 6e 74 61 6c 4f 72 56 65 72 74 69 63 61 6c 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 | ntalOrVertical().........{...... |
| 3160 | 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4d 65 74 68 6f 64 20 3d 20 49 6d 61 67 | .......m_Image.fillMethod.=.Imag |
| 3180 | 65 2e 46 69 6c 6c 4d 65 74 68 6f 64 2e 48 6f 72 69 7a 6f 6e 74 61 6c 3b 0a 20 20 20 20 20 20 20 | e.FillMethod.Horizontal;........ |
| 31a0 | 20 20 20 20 20 49 6d 61 67 65 2e 46 69 6c 6c 4d 65 74 68 6f 64 5b 5d 20 66 69 6c 6c 4d 65 74 68 | .....Image.FillMethod[].fillMeth |
| 31c0 | 6f 64 73 54 6f 54 65 73 74 20 3d 20 7b 49 6d 61 67 65 2e 46 69 6c 6c 4d 65 74 68 6f 64 2e 48 6f | odsToTest.=.{Image.FillMethod.Ho |
| 31e0 | 72 69 7a 6f 6e 74 61 6c 2c 20 49 6d 61 67 65 2e 46 69 6c 6c 4d 65 74 68 6f 64 2e 56 65 72 74 69 | rizontal,.Image.FillMethod.Verti |
| 3200 | 63 61 6c 7d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 | cal};..............foreach.(var. |
| 3220 | 66 69 6c 6c 4d 65 74 68 6f 64 20 69 6e 20 66 69 6c 6c 4d 65 74 68 6f 64 73 54 6f 54 65 73 74 29 | fillMethod.in.fillMethodsToTest) |
| 3240 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | .............{.................m |
| 3260 | 5f 49 6d 61 67 65 2e 66 69 6c 6c 4d 65 74 68 6f 64 20 3d 20 66 69 6c 6c 4d 65 74 68 6f 64 3b 0a | _Image.fillMethod.=.fillMethod;. |
| 3280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 2d 31 30 | ................for.(int.i.=.-10 |
| 32a0 | 3b 20 69 20 3c 20 30 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a | ;.i.<.0;.i++).................{. |
| 32c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c | ....................m_Image.fill |
| 32e0 | 4f 72 69 67 69 6e 20 3d 20 69 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Origin.=.i;..................... |
| 3300 | 6d 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 | m_Image.OnAfterDeserialize();... |
| 3320 | 20 20 20 20 20 20 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 | ..................Assert.AreEqua |
| 3340 | 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 29 3b 0a 20 20 20 20 20 20 | l(0,.m_Image.fillOrigin);....... |
| 3360 | 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 | ..........}..................for |
| 3380 | 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 32 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 | .(int.i.=.0;.i.<.2;.i++)........ |
| 33a0 | 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | .........{.....................m |
| 33c0 | 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 20 3d 20 69 3b 0a 20 20 20 20 20 20 20 20 20 | _Image.fillOrigin.=.i;.......... |
| 33e0 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 72 44 65 73 65 72 69 | ...........m_Image.OnAfterDeseri |
| 3400 | 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | alize();.....................Ass |
| 3420 | 65 72 74 2e 41 72 65 45 71 75 61 6c 28 69 2c 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 | ert.AreEqual(i,.m_Image.fillOrig |
| 3440 | 69 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | in);.................}.......... |
| 3460 | 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 32 3b 20 69 20 3c 20 31 30 30 3b | ........for.(int.i.=.2;.i.<.100; |
| 3480 | 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 | .i++).................{......... |
| 34a0 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 20 3d | ............m_Image.fillOrigin.= |
| 34c0 | 20 69 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e | .i;.....................m_Image. |
| 34e0 | 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | OnAfterDeserialize();........... |
| 3500 | 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 30 2c 20 6d 5f 49 | ..........Assert.AreEqual(0,.m_I |
| 3520 | 6d 61 67 65 2e 66 69 6c 6c 4f 72 69 67 69 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | mage.fillOrigin);............... |
| 3540 | 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 | ..}.............}.........}..... |
| 3560 | 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 | .....[Test].........public.void. |
| 3580 | 4f 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 43 6c 61 6d 70 73 46 69 6c 6c 41 6d 6f 75 | OnAfterDeserializeClampsFillAmou |
| 35a0 | 6e 74 42 65 74 77 65 65 6e 5a 65 72 6f 41 6e 64 4f 6e 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a | ntBetweenZeroAndOne().........{. |
| 35c0 | 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 66 6c 6f 61 74 20 66 20 3d 20 2d 35 3b 20 66 | ............for.(float.f.=.-5;.f |
| 35e0 | 20 3c 20 30 3b 20 66 20 2b 3d 20 30 2e 31 66 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 | .<.0;.f.+=.0.1f).............{.. |
| 3600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 41 6d 6f 75 6e | ...............m_Image.fillAmoun |
| 3620 | 74 20 3d 20 66 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 4f | t.=.f;.................m_Image.O |
| 3640 | 6e 41 66 74 65 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | nAfterDeserialize();............ |
| 3660 | 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e | .....Assert.AreEqual(0,.m_Image. |
| 3680 | 66 69 6c 6c 41 6d 6f 75 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 | fillAmount);.............}...... |
| 36a0 | 20 20 20 20 20 20 20 20 66 6f 72 20 28 66 6c 6f 61 74 20 66 20 3d 20 30 3b 20 66 20 3c 20 31 3b | ........for.(float.f.=.0;.f.<.1; |
| 36c0 | 20 66 20 2b 3d 20 30 2e 31 66 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 | .f.+=.0.1f).............{....... |
| 36e0 | 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 41 6d 6f 75 6e 74 20 3d 20 66 | ..........m_Image.fillAmount.=.f |
| 3700 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 | ;.................m_Image.OnAfte |
| 3720 | 72 44 65 73 65 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rDeserialize();................. |
| 3740 | 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 66 2c 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 41 | Assert.AreEqual(f,.m_Image.fillA |
| 3760 | 6d 6f 75 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 | mount);.............}........... |
| 3780 | 20 20 20 66 6f 72 20 28 66 6c 6f 61 74 20 66 20 3d 20 31 3b 20 66 20 3c 20 35 3b 20 66 20 2b 3d | ...for.(float.f.=.1;.f.<.5;.f.+= |
| 37a0 | 20 30 2e 31 66 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | .0.1f).............{............ |
| 37c0 | 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 41 6d 6f 75 6e 74 20 3d 20 66 3b 0a 20 20 20 | .....m_Image.fillAmount.=.f;.... |
| 37e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 4f 6e 41 66 74 65 72 44 65 73 65 | .............m_Image.OnAfterDese |
| 3800 | 72 69 61 6c 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 | rialize();.................Asser |
| 3820 | 74 2e 41 72 65 45 71 75 61 6c 28 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 69 6c 6c 41 6d 6f 75 6e 74 | t.AreEqual(1,.m_Image.fillAmount |
| 3840 | 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 | );.............}.........}...... |
| 3860 | 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 | ....[Test].........public.void.S |
| 3880 | 65 74 4e 61 74 69 76 65 53 69 7a 65 53 65 74 73 41 6c 6c 41 73 44 69 72 74 79 41 6e 64 53 65 74 | etNativeSizeSetsAllAsDirtyAndSet |
| 38a0 | 73 41 6e 63 68 6f 72 4d 61 78 41 6e 64 53 69 7a 65 44 65 6c 74 61 57 68 65 6e 4f 76 65 72 72 69 | sAnchorMaxAndSizeDeltaWhenOverri |
| 38c0 | 64 65 53 70 72 69 74 65 49 73 4e 6f 74 4e 75 6c 6c 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 | deSpriteIsNotNull().........{... |
| 38e0 | 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 | ..........m_Image.sprite.=.m_Spr |
| 3900 | 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 6f 76 65 72 72 69 64 | ite;.............m_Image.overrid |
| 3920 | 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 3b 0a 20 20 20 20 | eSprite.=.m_OverrideSprite;..... |
| 3940 | 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e | ........m_Image.rectTransform.an |
| 3960 | 63 68 6f 72 4d 61 78 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 31 30 30 29 3b | chorMax.=.new.Vector2(100,.100); |
| 3980 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f | .............m_Image.rectTransfo |
| 39a0 | 72 6d 2e 61 6e 63 68 6f 72 4d 69 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 2c 20 30 29 | rm.anchorMin.=.new.Vector2(0,.0) |
| 39c0 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 53 65 74 4e 61 74 69 76 65 53 | ;.............m_Image.SetNativeS |
| 39e0 | 69 7a 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d | ize();.............Assert.True(m |
| 3a00 | 5f 64 69 72 74 79 56 65 72 74 2c 20 22 56 65 72 74 69 63 65 73 20 68 61 76 65 20 6e 6f 74 20 62 | _dirtyVert,."Vertices.have.not.b |
| 3a20 | 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 | een.dirtied");.............Asser |
| 3a40 | 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 4c 61 79 6f 75 74 2c 20 22 4c 61 79 6f 75 74 20 68 61 | t.True(m_dirtyLayout,."Layout.ha |
| 3a60 | 73 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | s.not.been.dirtied");........... |
| 3a80 | 20 20 41 73 73 65 72 74 2e 54 72 75 65 28 6d 5f 64 69 72 74 79 4d 61 74 65 72 69 61 6c 2c 20 22 | ..Assert.True(m_dirtyMaterial,." |
| 3aa0 | 4d 61 74 65 72 69 61 6c 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 64 69 72 74 69 65 64 22 29 3b | Material.has.not.been.dirtied"); |
| 3ac0 | 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 6d 5f 49 | .............Assert.AreEqual(m_I |
| 3ae0 | 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 4d 69 6e 2c 20 6d 5f | mage.rectTransform.anchorMin,.m_ |
| 3b00 | 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 4d 61 78 29 3b 0a | Image.rectTransform.anchorMax);. |
| 3b20 | 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 6d 5f 4f 76 | ............Assert.AreEqual(m_Ov |
| 3b40 | 65 72 72 69 64 65 53 70 72 69 74 65 2e 72 65 63 74 2e 73 69 7a 65 20 2f 20 6d 5f 49 6d 61 67 65 | errideSprite.rect.size./.m_Image |
| 3b60 | 2e 70 69 78 65 6c 73 50 65 72 55 6e 69 74 2c 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e | .pixelsPerUnit,.m_Image.rectTran |
| 3b80 | 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 0a 20 20 20 | sform.sizeDelta);.........}..... |
| 3ba0 | 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 | .....[Test].........public.void. |
| 3bc0 | 4f 6e 50 6f 70 75 6c 61 74 65 4d 65 73 68 57 68 65 6e 4e 6f 4f 76 65 72 72 69 64 65 53 70 72 69 | OnPopulateMeshWhenNoOverrideSpri |
| 3be0 | 74 65 50 72 65 73 65 6e 74 44 65 66 65 72 73 54 6f 47 72 61 70 68 69 63 49 6d 70 6c 65 6d 65 6e | tePresentDefersToGraphicImplemen |
| 3c00 | 74 61 74 69 6f 6e 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d | tation().........{.............m |
| 3c20 | 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 | _OverrideSprite.=.null;......... |
| 3c40 | 20 20 20 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 61 6e 63 68 6f 72 | ....m_Image.rectTransform.anchor |
| 3c60 | 65 64 50 6f 73 69 74 69 6f 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 30 30 2c 20 34 35 | edPosition.=.new.Vector2(100,.45 |
| 3c80 | 32 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e | 2);.............m_Image.rectTran |
| 3ca0 | 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 38 38 | sform.sizeDelta.=.new.Vector2(88 |
| 3cc0 | 31 2c 20 35 39 33 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 63 6f 6c | 1,.593);.............m_Image.col |
| 3ce0 | 6f 72 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 28 30 2e 31 66 2c 20 30 2e 32 66 2c 20 30 2e 38 66 2c | or.=.new.Color(0.1f,.0.2f,.0.8f, |
| 3d00 | 20 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 74 65 78 48 65 6c 70 65 72 20 76 | .0);..............VertexHelper.v |
| 3d20 | 68 20 3d 20 6e 65 77 20 56 65 72 74 65 78 48 65 6c 70 65 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 | h.=.new.VertexHelper();......... |
| 3d40 | 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 49 6e 76 6f 6b 65 4f 6e 50 6f 70 75 6c 61 74 65 4d 65 73 | .....m_Image.InvokeOnPopulateMes |
| 3d60 | 68 28 76 68 29 3b 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 | h(vh);.............Assert.AreEqu |
| 3d80 | 61 6c 28 34 2c 20 76 68 2e 63 75 72 72 65 6e 74 56 65 72 74 43 6f 75 6e 74 29 3b 0a 20 20 20 20 | al(4,.vh.currentVertCount);..... |
| 3da0 | 20 20 20 20 20 20 20 20 4c 69 73 74 3c 55 49 56 65 72 74 65 78 3e 20 76 65 72 74 73 20 3d 20 6e | ........List<UIVertex>.verts.=.n |
| 3dc0 | 65 77 20 4c 69 73 74 3c 55 49 56 65 72 74 65 78 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | ew.List<UIVertex>();............ |
| 3de0 | 20 76 68 2e 47 65 74 55 49 56 65 72 74 65 78 53 74 72 65 61 6d 28 76 65 72 74 73 29 3b 0a 0a 20 | .vh.GetUIVertexStream(verts);... |
| 3e00 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 65 20 76 65 72 74 69 63 65 73 20 66 6f 72 20 74 | ...........//.The.vertices.for.t |
| 3e20 | 68 65 20 32 20 74 72 69 61 6e 67 6c 65 73 20 6f 66 20 74 68 65 20 63 61 6e 76 61 73 0a 20 20 20 | he.2.triangles.of.the.canvas.... |
| 3e40 | 20 20 20 20 20 20 20 20 20 55 49 56 65 72 74 65 78 5b 5d 20 65 78 70 65 63 74 65 64 56 65 72 74 | .........UIVertex[].expectedVert |
| 3e60 | 69 63 65 73 20 3d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | ices.=.............{............ |
| 3e80 | 20 20 20 20 20 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....new.UIVertex............... |
| 3ea0 | 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6c 6f 72 20 3d 20 | ..{.....................color.=. |
| 3ec0 | 6d 5f 49 6d 61 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | m_Image.color,.................. |
| 3ee0 | 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 | ...position.=.m_Image.rectTransf |
| 3f00 | 6f 72 6d 2e 72 65 63 74 2e 6d 69 6e 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | orm.rect.min,................... |
| 3f20 | 20 20 75 76 30 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 66 2c 20 30 66 29 2c 0a 20 20 20 | ..uv0.=.new.Vector2(0f,.0f),.... |
| 3f40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 | .................normal.=.new.Ve |
| 3f60 | 63 74 6f 72 33 28 30 2c 20 30 2c 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ctor3(0,.0,.-1),................ |
| 3f80 | 20 20 20 20 20 74 61 6e 67 65 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c | .....tangent.=.new.Vector4(1,.0, |
| 3fa0 | 20 30 2c 20 2d 31 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 | .0,.-1).................},...... |
| 3fc0 | 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 20 | ...........new.UIVertex......... |
| 3fe0 | 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f | ........{.....................co |
| 4000 | 6c 6f 72 20 3d 20 6d 5f 49 6d 61 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | lor.=.m_Image.color,............ |
| 4020 | 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 | .........position.=.new.Vector3( |
| 4040 | 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 78 4d 69 6e 2c | m_Image.rectTransform.rect.xMin, |
| 4060 | 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 79 4d 61 78 | .m_Image.rectTransform.rect.yMax |
| 4080 | 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 76 30 20 3d 20 6e 65 77 | ),.....................uv0.=.new |
| 40a0 | 20 56 65 63 74 6f 72 32 28 30 66 2c 20 31 66 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .Vector2(0f,.1f),............... |
| 40c0 | 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 2c 20 30 2c | ......normal.=.new.Vector3(0,.0, |
| 40e0 | 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 61 6e 67 65 6e | .-1),.....................tangen |
| 4100 | 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c 20 30 2c 20 2d 31 29 0a 20 20 20 | t.=.new.Vector4(1,.0,.0,.-1).... |
| 4120 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............},................. |
| 4140 | 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 | new.UIVertex.................{.. |
| 4160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6c 6f 72 20 3d 20 6d 5f 49 6d 61 | ...................color.=.m_Ima |
| 4180 | 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6f | ge.color,.....................po |
| 41a0 | 73 69 74 69 6f 6e 20 3d 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 | sition.=.m_Image.rectTransform.r |
| 41c0 | 65 63 74 2e 6d 61 78 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 76 30 | ect.max,.....................uv0 |
| 41e0 | 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 66 2c 20 31 66 29 2c 0a 20 20 20 20 20 20 20 20 | .=.new.Vector2(1f,.1f),......... |
| 4200 | 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 | ............normal.=.new.Vector3 |
| 4220 | 28 30 2c 20 30 2c 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (0,.0,.-1),..................... |
| 4240 | 74 61 6e 67 65 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c 20 30 2c 20 2d | tangent.=.new.Vector4(1,.0,.0,.- |
| 4260 | 31 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 20 20 | 1).................},........... |
| 4280 | 20 20 20 20 20 20 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......new.UIVertex.............. |
| 42a0 | 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6c 6f 72 20 3d | ...{.....................color.= |
| 42c0 | 20 6d 5f 49 6d 61 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .m_Image.color,................. |
| 42e0 | 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 | ....position.=.m_Image.rectTrans |
| 4300 | 66 6f 72 6d 2e 72 65 63 74 2e 6d 61 78 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | form.rect.max,.................. |
| 4320 | 20 20 20 75 76 30 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 31 66 2c 20 31 66 29 2c 0a 20 20 | ...uv0.=.new.Vector2(1f,.1f),... |
| 4340 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 | ..................normal.=.new.V |
| 4360 | 65 63 74 6f 72 33 28 30 2c 20 30 2c 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ector3(0,.0,.-1),............... |
| 4380 | 20 20 20 20 20 20 74 61 6e 67 65 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 | ......tangent.=.new.Vector4(1,.0 |
| 43a0 | 2c 20 30 2c 20 2d 31 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 | ,.0,.-1).................},..... |
| 43c0 | 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 | ............new.UIVertex........ |
| 43e0 | 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | .........{.....................c |
| 4400 | 6f 6c 6f 72 20 3d 20 6d 5f 49 6d 61 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 | olor.=.m_Image.color,........... |
| 4420 | 20 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 | ..........position.=.new.Vector3 |
| 4440 | 28 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 78 4d 61 78 | (m_Image.rectTransform.rect.xMax |
| 4460 | 2c 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 79 4d 69 | ,.m_Image.rectTransform.rect.yMi |
| 4480 | 6e 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 76 30 20 3d 20 6e 65 | n),.....................uv0.=.ne |
| 44a0 | 77 20 56 65 63 74 6f 72 32 28 31 66 2c 20 30 66 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | w.Vector2(1f,.0f),.............. |
| 44c0 | 20 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 2c 20 30 | .......normal.=.new.Vector3(0,.0 |
| 44e0 | 2c 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 61 6e 67 65 | ,.-1),.....................tange |
| 4500 | 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c 20 30 2c 20 2d 31 29 0a 20 20 | nt.=.new.Vector4(1,.0,.0,.-1)... |
| 4520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............},................ |
| 4540 | 20 6e 65 77 20 55 49 56 65 72 74 65 78 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a | .new.UIVertex.................{. |
| 4560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6c 6f 72 20 3d 20 6d 5f 49 6d | ....................color.=.m_Im |
| 4580 | 61 67 65 2e 63 6f 6c 6f 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 | age.color,.....................p |
| 45a0 | 6f 73 69 74 69 6f 6e 20 3d 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e | osition.=.m_Image.rectTransform. |
| 45c0 | 72 65 63 74 2e 6d 69 6e 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 76 | rect.min,.....................uv |
| 45e0 | 30 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 30 66 2c 20 30 66 29 2c 0a 20 20 20 20 20 20 20 | 0.=.new.Vector2(0f,.0f),........ |
| 4600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 | .............normal.=.new.Vector |
| 4620 | 33 28 30 2c 20 30 2c 20 2d 31 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 3(0,.0,.-1),.................... |
| 4640 | 20 74 61 6e 67 65 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c 20 30 2c 20 | .tangent.=.new.Vector4(1,.0,.0,. |
| 4660 | 2d 31 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 0a 20 20 20 20 20 20 20 20 20 | -1).................},.......... |
| 4680 | 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 | ...};..............for.(int.i.=. |
| 46a0 | 30 3b 20 69 20 3c 20 76 65 72 74 73 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 | 0;.i.<.verts.Count;.i++)........ |
| 46c0 | 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | .....{.................Assert.Ar |
| 46e0 | 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 56 65 72 74 69 63 65 73 5b 69 5d 2c 20 76 65 72 74 | eEqual(expectedVertices[i],.vert |
| 4700 | 73 5b 69 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a | s[i]);.............}.........}.. |
| 4720 | 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 54 65 73 74 4f 6e 50 6f 70 75 6c | ........private.void.TestOnPopul |
| 4740 | 61 74 65 4d 65 73 68 54 79 70 65 53 69 6d 70 6c 65 28 56 65 72 74 65 78 48 65 6c 70 65 72 20 76 | ateMeshTypeSimple(VertexHelper.v |
| 4760 | 68 2c 20 56 65 63 74 6f 72 34 20 55 56 73 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 | h,.Vector4.UVs).........{....... |
| 4780 | 20 20 20 20 20 20 4c 69 73 74 3c 55 49 56 65 72 74 65 78 3e 20 76 65 72 74 73 20 3d 20 6e 65 77 | ......List<UIVertex>.verts.=.new |
| 47a0 | 20 4c 69 73 74 3c 55 49 56 65 72 74 65 78 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | .List<UIVertex>();.............v |
| 47c0 | 68 2e 47 65 74 55 49 56 65 72 74 65 78 53 74 72 65 61 6d 28 76 65 72 74 73 29 3b 0a 0a 20 20 20 | h.GetUIVertexStream(verts);..... |
| 47e0 | 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 34 2c 20 76 68 2e 63 | .........Assert.AreEqual(4,.vh.c |
| 4800 | 75 72 72 65 6e 74 56 65 72 74 43 6f 75 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 | urrentVertCount);.............As |
| 4820 | 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 36 2c 20 76 68 2e 63 75 72 72 65 6e 74 49 6e 64 65 78 | sert.AreEqual(6,.vh.currentIndex |
| 4840 | 43 6f 75 6e 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6d 67 52 65 63 74 | Count);..............var.imgRect |
| 4860 | 20 3d 20 6d 5f 49 6d 61 67 65 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 3b 0a 20 | .=.m_Image.rectTransform.rect;.. |
| 4880 | 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 5b 5d 20 65 78 70 65 63 74 65 64 56 65 72 | ...........Vector3[].expectedVer |
| 48a0 | 74 69 63 65 73 20 3d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | tices.=.............{........... |
| 48c0 | 20 20 20 20 20 20 69 6d 67 52 65 63 74 2e 6d 69 6e 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......imgRect.min,.............. |
| 48e0 | 20 20 20 6e 65 77 20 56 65 63 74 6f 72 33 28 69 6d 67 52 65 63 74 2e 78 4d 69 6e 2c 20 69 6d 67 | ...new.Vector3(imgRect.xMin,.img |
| 4900 | 52 65 63 74 2e 79 4d 61 78 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 67 52 | Rect.yMax),.................imgR |
| 4920 | 65 63 74 2e 6d 61 78 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 67 52 65 63 74 | ect.max,.................imgRect |
| 4940 | 2e 6d 61 78 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 | .max,.................new.Vector |
| 4960 | 33 28 69 6d 67 52 65 63 74 2e 78 4d 61 78 2c 20 69 6d 67 52 65 63 74 2e 79 4d 69 6e 29 2c 0a 20 | 3(imgRect.xMax,.imgRect.yMin),.. |
| 4980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 67 52 65 63 74 2e 6d 69 6e 0a 20 20 20 20 20 | ...............imgRect.min...... |
| 49a0 | 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 5b 5d | .......};..............Vector2[] |
| 49c0 | 20 65 78 70 65 63 74 65 64 55 56 30 73 20 3d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 | .expectedUV0s.=.............{... |
| 49e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 55 56 73 2e 78 2c | ..............new.Vector2(UVs.x, |
| 4a00 | 20 55 56 73 2e 79 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 | .UVs.y),.................new.Vec |
| 4a20 | 74 6f 72 32 28 55 56 73 2e 78 2c 20 55 56 73 2e 77 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | tor2(UVs.x,.UVs.w),............. |
| 4a40 | 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 55 56 73 2e 7a 2c 20 55 56 73 2e 77 29 2c 0a 20 | ....new.Vector2(UVs.z,.UVs.w),.. |
| 4a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 55 56 73 2e 7a | ...............new.Vector2(UVs.z |
| 4a80 | 2c 20 55 56 73 2e 77 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 | ,.UVs.w),.................new.Ve |
| 4aa0 | 63 74 6f 72 32 28 55 56 73 2e 7a 2c 20 55 56 73 2e 79 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | ctor2(UVs.z,.UVs.y),............ |
| 4ac0 | 20 20 20 20 20 6e 65 77 20 56 65 63 74 6f 72 32 28 55 56 73 2e 78 2c 20 55 56 73 2e 79 29 2c 0a | .....new.Vector2(UVs.x,.UVs.y),. |
| 4ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | ............};..............var. |
| 4b00 | 65 78 70 65 63 74 65 64 4e 6f 72 6d 61 6c 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 2c 20 | expectedNormal.=.new.Vector3(0,. |
| 4b20 | 30 2c 20 2d 31 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 78 70 65 63 74 65 64 | 0,.-1);.............var.expected |
| 4b40 | 54 61 6e 67 65 6e 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 31 2c 20 30 2c 20 30 2c 20 2d | Tangent.=.new.Vector4(1,.0,.0,.- |
| 4b60 | 31 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 32 20 65 78 70 65 63 74 65 64 | 1);.............Color32.expected |
| 4b80 | 43 6f 6c 6f 72 20 3d 20 6d 5f 49 6d 61 67 65 2e 63 6f 6c 6f 72 3b 0a 20 20 20 20 20 20 20 20 20 | Color.=.m_Image.color;.......... |
| 4ba0 | 20 20 20 56 65 63 74 6f 72 32 20 65 78 70 65 63 74 65 64 55 56 31 20 3d 20 6e 65 77 20 56 65 63 | ...Vector2.expectedUV1.=.new.Vec |
| 4bc0 | 74 6f 72 32 28 30 2c 20 30 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e | tor2(0,.0);..............for.(in |
| 4be0 | 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 36 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 | t.i.=.0;.i.<.6;.i++)............ |
| 4c00 | 20 7b 0a 20 20 20 20 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 | .{.................Assert.AreEqu |
| 4c20 | 61 6c 28 65 78 70 65 63 74 65 64 56 65 72 74 69 63 65 73 5b 69 5d 2c 20 76 65 72 74 73 5b 69 5d | al(expectedVertices[i],.verts[i] |
| 4c40 | 2e 70 6f 73 69 74 69 6f 6e 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 | .position);.................Asse |
| 4c60 | 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 55 56 30 73 5b 69 5d 2c 20 76 65 72 | rt.AreEqual(expectedUV0s[i],.ver |
| 4c80 | 74 73 5b 69 5d 2e 75 76 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 | ts[i].uv0);.................Asse |
| 4ca0 | 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 55 56 31 2c 20 76 65 72 74 73 5b 69 | rt.AreEqual(expectedUV1,.verts[i |
| 4cc0 | 5d 2e 75 76 31 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 | ].uv1);.................Assert.A |
| 4ce0 | 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 4e 6f 72 6d 61 6c 2c 20 76 65 72 74 73 5b 69 5d | reEqual(expectedNormal,.verts[i] |
| 4d00 | 2e 6e 6f 72 6d 61 6c 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 | .normal);.................Assert |
| 4d20 | 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 54 61 6e 67 65 6e 74 2c 20 76 65 72 74 73 | .AreEqual(expectedTangent,.verts |
| 4d40 | 5b 69 5d 2e 74 61 6e 67 65 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 | [i].tangent);.................As |
| 4d60 | 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 65 78 70 65 63 74 65 64 43 6f 6c 6f 72 2c 20 76 65 72 | sert.AreEqual(expectedColor,.ver |
| 4d80 | 74 73 5b 69 5d 2e 63 6f 6c 6f 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 | ts[i].color);.............}..... |
| 4da0 | 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 | ....}..........[Test].........pu |
| 4dc0 | 62 6c 69 63 20 76 6f 69 64 20 4f 6e 50 6f 70 75 6c 61 74 65 4d 65 73 68 57 69 74 68 54 79 70 65 | blic.void.OnPopulateMeshWithType |
| 4de0 | 54 69 6c 65 64 4e 6f 42 6f 72 64 65 72 47 65 6e 65 72 61 74 65 73 45 78 70 65 63 74 65 64 52 65 | TiledNoBorderGeneratesExpectedRe |
| 4e00 | 73 75 6c 74 73 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f | sults().........{.............m_ |
| 4e20 | 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 | Image.sprite.=.m_Sprite;........ |
| 4e40 | 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 2e 74 65 78 74 75 72 65 2e 77 72 61 70 | .....m_Image.sprite.texture.wrap |
| 4e60 | 4d 6f 64 65 20 3d 20 54 65 78 74 75 72 65 57 72 61 70 4d 6f 64 65 2e 52 65 70 65 61 74 3b 0a 0a | Mode.=.TextureWrapMode.Repeat;.. |
| 4e80 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 74 79 70 65 20 3d 20 49 6d 61 67 65 | ............m_Image.type.=.Image |
| 4ea0 | 2e 54 79 70 65 2e 54 69 6c 65 64 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 74 65 78 | .Type.Tiled;..............Vertex |
| 4ec0 | 48 65 6c 70 65 72 20 76 68 20 3d 20 6e 65 77 20 56 65 72 74 65 78 48 65 6c 70 65 72 28 29 3b 0a | Helper.vh.=.new.VertexHelper();. |
| 4ee0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 49 6e 76 6f 6b 65 4f 6e 50 6f 70 | .............m_Image.InvokeOnPop |
| 4f00 | 75 6c 61 74 65 4d 65 73 68 28 76 68 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 | ulateMesh(vh);..............Asse |
| 4f20 | 72 74 2e 41 72 65 45 71 75 61 6c 28 34 2c 20 76 68 2e 63 75 72 72 65 6e 74 56 65 72 74 43 6f 75 | rt.AreEqual(4,.vh.currentVertCou |
| 4f40 | 6e 74 29 3b 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 | nt);.............Assert.AreEqual |
| 4f60 | 28 36 2c 20 76 68 2e 63 75 72 72 65 6e 74 49 6e 64 65 78 43 6f 75 6e 74 29 3b 0a 20 20 20 20 20 | (6,.vh.currentIndexCount);...... |
| 4f80 | 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 | ...}..........[Test].........pub |
| 4fa0 | 6c 69 63 20 76 6f 69 64 20 4d 69 6e 57 69 64 74 68 48 65 69 67 68 74 41 72 65 5a 65 72 6f 57 69 | lic.void.MinWidthHeightAreZeroWi |
| 4fc0 | 74 68 4e 6f 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | thNoImage().........{........... |
| 4fe0 | 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 6d 69 6e | ..Assert.AreEqual(0,.m_Image.min |
| 5000 | 57 69 64 74 68 29 3b 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 | Width);.............Assert.AreEq |
| 5020 | 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 6d 69 6e 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 | ual(0,.m_Image.minHeight);...... |
| 5040 | 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 | ...}..........[Test].........pub |
| 5060 | 6c 69 63 20 76 6f 69 64 20 46 6c 65 78 69 62 6c 65 57 69 64 74 68 48 65 69 67 68 74 41 72 65 43 | lic.void.FlexibleWidthHeightAreC |
| 5080 | 6f 72 72 65 63 74 57 69 74 68 4e 6f 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 | orrectWithNoImage().........{... |
| 50a0 | 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 2d 31 2c 20 6d 5f | ..........Assert.AreEqual(-1,.m_ |
| 50c0 | 49 6d 61 67 65 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | Image.flexibleWidth);........... |
| 50e0 | 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 6c | ..Assert.AreEqual(-1,.m_Image.fl |
| 5100 | 65 78 69 62 6c 65 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 | exibleHeight);.........}........ |
| 5120 | 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 72 65 | ..[Test].........public.void.Pre |
| 5140 | 66 65 72 72 65 64 57 69 64 74 68 48 65 69 67 68 74 41 72 65 43 6f 72 72 65 63 74 57 69 74 68 4e | ferredWidthHeightAreCorrectWithN |
| 5160 | 6f 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 | oImage().........{.............A |
| 5180 | 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 70 72 65 66 65 72 | ssert.AreEqual(0,.m_Image.prefer |
| 51a0 | 72 65 64 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | redWidth);.............Assert.Ar |
| 51c0 | 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 | eEqual(0,.m_Image.preferredHeigh |
| 51e0 | 74 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 | t);.........}..........[Test]... |
| 5200 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4d 69 6e 57 69 64 74 68 48 65 69 67 68 74 | ......public.void.MinWidthHeight |
| 5220 | 41 72 65 5a 65 72 6f 57 69 74 68 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 | AreZeroWithImage().........{.... |
| 5240 | 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 | .........m_Image.sprite.=.m_Spri |
| 5260 | 74 65 3b 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 | te;.............Assert.AreEqual( |
| 5280 | 30 2c 20 6d 5f 49 6d 61 67 65 2e 6d 69 6e 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | 0,.m_Image.minWidth);........... |
| 52a0 | 20 20 41 73 73 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 6d 69 6e | ..Assert.AreEqual(0,.m_Image.min |
| 52c0 | 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 | Height);.........}..........[Tes |
| 52e0 | 74 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 46 6c 65 78 69 62 6c 65 57 | t].........public.void.FlexibleW |
| 5300 | 69 64 74 68 48 65 69 67 68 74 41 72 65 43 6f 72 72 65 63 74 57 69 74 68 49 6d 61 67 65 28 29 0a | idthHeightAreCorrectWithImage(). |
| 5320 | 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 | ........{.............m_Image.sp |
| 5340 | 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | rite.=.m_Sprite;.............Ass |
| 5360 | 65 72 74 2e 41 72 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 6c 65 78 69 62 6c | ert.AreEqual(-1,.m_Image.flexibl |
| 5380 | 65 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 65 45 | eWidth);.............Assert.AreE |
| 53a0 | 71 75 61 6c 28 2d 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 29 | qual(-1,.m_Image.flexibleHeight) |
| 53c0 | 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 | ;.........}..........[Test]..... |
| 53e0 | 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 72 65 66 65 72 72 65 64 57 69 64 74 68 48 65 | ....public.void.PreferredWidthHe |
| 5400 | 69 67 68 74 41 72 65 43 6f 72 72 65 63 74 57 69 74 68 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 | ightAreCorrectWithImage()....... |
| 5420 | 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d | ..{.............m_Image.sprite.= |
| 5440 | 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | .m_Sprite;.............Assert.Ar |
| 5460 | 65 45 71 75 61 6c 28 31 32 38 2c 20 6d 5f 49 6d 61 67 65 2e 70 72 65 66 65 72 72 65 64 57 69 64 | eEqual(128,.m_Image.preferredWid |
| 5480 | 74 68 29 3b 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 | th);.............Assert.AreEqual |
| 54a0 | 28 31 32 38 2c 20 6d 5f 49 6d 61 67 65 2e 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 29 3b 0a | (128,.m_Image.preferredHeight);. |
| 54c0 | 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 | ........}..........[Test]....... |
| 54e0 | 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4d 69 6e 57 69 64 74 68 48 65 69 67 68 74 41 72 65 5a | ..public.void.MinWidthHeightAreZ |
| 5500 | 65 72 6f 57 69 74 68 4f 76 65 72 72 69 64 65 49 6d 61 67 65 28 29 0a 20 20 20 20 20 20 20 20 7b | eroWithOverrideImage().........{ |
| 5520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 20 3d 20 6d 5f | .............m_Image.sprite.=.m_ |
| 5540 | 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 6f 76 65 72 | Sprite;.............m_Image.over |
| 5560 | 72 69 64 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 74 65 3b 0a 20 | rideSprite.=.m_OverrideSprite;.. |
| 5580 | 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 30 2c 20 6d 5f | ...........Assert.AreEqual(0,.m_ |
| 55a0 | 49 6d 61 67 65 2e 6d 69 6e 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 | Image.minWidth);.............Ass |
| 55c0 | 65 72 74 2e 41 72 65 45 71 75 61 6c 28 30 2c 20 6d 5f 49 6d 61 67 65 2e 6d 69 6e 48 65 69 67 68 | ert.AreEqual(0,.m_Image.minHeigh |
| 55e0 | 74 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 | t);.........}..........[Test]... |
| 5600 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 46 6c 65 78 69 62 6c 65 57 69 64 74 68 48 | ......public.void.FlexibleWidthH |
| 5620 | 65 69 67 68 74 41 72 65 43 6f 72 72 65 63 74 57 69 74 68 4f 76 65 72 72 69 64 65 49 6d 61 67 65 | eightAreCorrectWithOverrideImage |
| 5640 | 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 | ().........{.............m_Image |
| 5660 | 2e 73 70 72 69 74 65 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .sprite.=.m_Sprite;............. |
| 5680 | 6d 5f 49 6d 61 67 65 2e 6f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 | m_Image.overrideSprite.=.m_Overr |
| 56a0 | 69 64 65 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 41 72 | ideSprite;.............Assert.Ar |
| 56c0 | 65 45 71 75 61 6c 28 2d 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 6c 65 78 69 62 6c 65 57 69 64 74 68 | eEqual(-1,.m_Image.flexibleWidth |
| 56e0 | 29 3b 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 2d | );.............Assert.AreEqual(- |
| 5700 | 31 2c 20 6d 5f 49 6d 61 67 65 2e 66 6c 65 78 69 62 6c 65 48 65 69 67 68 74 29 3b 0a 20 20 20 20 | 1,.m_Image.flexibleHeight);..... |
| 5720 | 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 5b 54 65 73 74 5d 0a 20 20 20 20 20 20 20 20 70 75 | ....}..........[Test].........pu |
| 5740 | 62 6c 69 63 20 76 6f 69 64 20 50 72 65 66 65 72 72 65 64 57 69 64 74 68 48 65 69 67 68 74 41 72 | blic.void.PreferredWidthHeightAr |
| 5760 | 65 43 6f 72 72 65 63 74 57 69 74 68 4f 76 65 72 72 69 64 65 49 6d 61 67 65 28 29 0a 20 20 20 20 | eCorrectWithOverrideImage()..... |
| 5780 | 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 2e 73 70 72 69 74 65 | ....{.............m_Image.sprite |
| 57a0 | 20 3d 20 6d 5f 53 70 72 69 74 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6d 61 67 65 | .=.m_Sprite;.............m_Image |
| 57c0 | 2e 6f 76 65 72 72 69 64 65 53 70 72 69 74 65 20 3d 20 6d 5f 4f 76 65 72 72 69 64 65 53 70 72 69 | .overrideSprite.=.m_OverrideSpri |
| 57e0 | 74 65 3b 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 | te;.............Assert.AreEqual( |
| 5800 | 32 35 36 2c 20 6d 5f 49 6d 61 67 65 2e 70 72 65 66 65 72 72 65 64 57 69 64 74 68 29 3b 0a 20 20 | 256,.m_Image.preferredWidth);... |
| 5820 | 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 32 35 36 2c 20 6d | ..........Assert.AreEqual(256,.m |
| 5840 | 5f 49 6d 61 67 65 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 | _Image.preferredHeight);........ |
| 5860 | 20 7d 0a 20 20 20 20 7d 0a 7d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .}.....}.}...................... |
| 5880 | 0a 00 00 00 49 6d 61 67 65 54 65 73 74 73 00 00 14 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e | ....ImageTests......UnityEngine. |
| 58a0 | 55 49 2e 54 65 73 74 73 | UI.Tests |