summaryrefslogtreecommitdiff
path: root/Library/Artifacts/b6/b62d4a74de3306a80c8a8a37ceda3d14
blob: 569f1d2da2d7f3fbbf43d8788d5dcce71e42f228 (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 54 f4 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ......T.............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 94 44 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 .D..............................
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 1d 00 00 00 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 ............EditorInputControlLa
10a0 79 6f 75 74 43 61 63 68 65 00 00 00 e7 43 00 00 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 youtCache....C..#if.UNITY_EDITOR
10c0 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f ..using.System;..using.System.Co
10e0 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d llections.Generic;..using.System
1100 2e 4c 69 6e 71 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 .Linq;..using.UnityEngine.InputS
1120 79 73 74 65 6d 2e 4c 61 79 6f 75 74 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e ystem.Layouts;..using.UnityEngin
1140 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 44 75 61 6c 53 68 6f 63 6b 3b 0d 0a 75 73 69 6e 67 20 e.InputSystem.DualShock;..using.
1160 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 UnityEngine.InputSystem.Utilitie
1180 73 3b 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 s;....namespace.UnityEngine.Inpu
11a0 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d tSystem.Editor..{......///.<summ
11c0 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 63 68 65 73 20 3c 73 65 65 20 63 72 65 66 3d 22 ary>......///.Caches.<see.cref="
11e0 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 22 2f 3e 20 69 6e 73 74 61 6e 63 65 73 2e InputControlLayout"/>.instances.
1200 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 ......///.</summary>......///.<r
1220 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 20 74 68 65 20 65 64 69 74 6f 72 20 77 emarks>......///.In.the.editor.w
1240 65 20 6e 65 65 64 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 e.need.access.to.the.<see.cref="
1260 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 22 3e 49 6e 70 75 74 43 6f 6e 74 72 6f 6c InputControlLayout">InputControl
1280 4c 61 79 6f 75 74 73 3c 2f 73 65 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 72 65 67 69 73 74 65 72 65 Layouts</see>......///.registere
12a0 64 20 77 69 74 68 20 74 68 65 20 73 79 73 74 65 6d 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 66 61 d.with.the.system.in.order.to.fa
12c0 63 69 6c 69 74 61 74 65 20 76 61 72 69 6f 75 73 20 55 49 20 66 65 61 74 75 72 65 73 2e 20 49 6e cilitate.various.UI.features..In
12e0 73 74 65 61 64 20 6f 66 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 73 74 72 75 63 74 69 6e 67 20 6c stead.of......///.constructing.l
1300 61 79 6f 75 74 20 69 6e 73 74 61 6e 63 65 73 20 6f 76 65 72 20 61 6e 64 20 6f 76 65 72 2c 20 77 ayout.instances.over.and.over,.w
1320 65 20 6b 65 65 70 20 74 68 65 6d 20 61 72 6f 75 6e 64 20 69 6e 20 68 65 72 65 2e 0d 0a 20 20 20 e.keep.them.around.in.here......
1340 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 63 6c 61 73 73 20 69 73 20 6f 6e 6c 79 .///......///.This.class.is.only
1360 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 74 68 65 20 65 64 69 74 6f 72 20 28 77 68 65 6e 20 3c .available.in.the.editor.(when.<
1380 63 3e 55 4e 49 54 59 5f 45 44 49 54 4f 52 3c 2f 63 3e 20 69 73 20 74 72 75 65 29 2e 0d 0a 20 20 c>UNITY_EDITOR</c>.is.true).....
13a0 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 ..///.</remarks>......internal.s
13c0 74 61 74 69 63 20 63 6c 61 73 73 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 tatic.class.EditorInputControlLa
13e0 79 6f 75 74 43 61 63 68 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 youtCache......{..........///.<s
1400 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 74 65 72 61 74 65 20 6f 76 65 ummary>..........///.Iterate.ove
1420 72 20 61 6c 6c 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 74 73 20 69 6e 20 74 68 65 20 73 79 73 r.all.control.layouts.in.the.sys
1440 74 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 tem...........///.</summary>....
1460 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c ......public.static.IEnumerable<
1480 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 3e 20 61 6c 6c 4c 61 79 6f 75 74 73 0d 0a InputControlLayout>.allLayouts..
14a0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 ........{..............get......
14c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 ........{..................Refre
14e0 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e sh();..................return.In
1500 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e 74 61 62 6c 65 2e 56 61 6c putControlLayout.cache.table.Val
1520 75 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ues;..............}..........}..
1540 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........///.<summary>.........
1560 20 2f 2f 2f 20 49 74 65 72 61 74 65 20 6f 76 65 72 20 61 6c 6c 20 75 6e 69 71 75 65 20 75 73 61 .///.Iterate.over.all.unique.usa
1580 67 65 73 20 61 6e 64 20 74 68 65 69 72 20 72 65 73 70 65 63 74 69 76 65 20 6c 69 73 74 73 20 6f ges.and.their.respective.lists.o
15a0 66 20 6c 61 79 6f 75 74 73 20 74 68 61 74 20 75 73 65 20 74 68 65 6d 2e 0d 0a 20 20 20 20 20 20 f.layouts.that.use.them.........
15c0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 ..///.</summary>..........public
15e0 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 75 70 6c 65 3c 73 74 72 69 6e 67 .static.IEnumerable<Tuple<string
1600 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 3e 3e 20 61 6c 6c 55 73 61 67 65 ,.IEnumerable<string>>>.allUsage
1620 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 s..........{..............get...
1640 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 ...........{..................Re
1660 66 72 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e fresh();..................return
1680 20 73 5f 55 73 61 67 65 73 2e 53 65 6c 65 63 74 28 70 61 69 72 20 3d 3e 20 6e 65 77 20 54 75 70 .s_Usages.Select(pair.=>.new.Tup
16a0 6c 65 3c 73 74 72 69 6e 67 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 3e 28 le<string,.IEnumerable<string>>(
16c0 70 61 69 72 2e 4b 65 79 2c 20 70 61 69 72 2e 56 61 6c 75 65 2e 53 65 6c 65 63 74 28 78 20 3d 3e pair.Key,.pair.Value.Select(x.=>
16e0 20 78 2e 54 6f 53 74 72 69 6e 67 28 29 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d .x.ToString())));..............}
1700 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 ..........}............public.st
1720 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 atic.IEnumerable<InputControlLay
1740 6f 75 74 3e 20 61 6c 6c 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 0d 0a 20 20 20 20 20 20 20 20 out>.allControlLayouts..........
1760 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 {..............get..............
1780 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 29 3b 0d 0a 20 {..................Refresh();...
17a0 20 20 20 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 6e 61 6d 65 ...............foreach.(var.name
17c0 20 69 6e 20 73 5f 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 .in.s_ControlLayouts)...........
17e0 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 49 6e 70 75 74 43 6f 6e ...........yield.return.InputCon
1800 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 trolLayout.cache.FindOrLoadLayou
1820 74 28 6e 61 6d 65 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 t(name.ToString());.............
1840 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 .}..........}............public.
1860 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c static.IEnumerable<InputControlL
1880 61 79 6f 75 74 3e 20 61 6c 6c 44 65 76 69 63 65 4c 61 79 6f 75 74 73 0d 0a 20 20 20 20 20 20 20 ayout>.allDeviceLayouts.........
18a0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .{..............get.............
18c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 29 3b 0d 0a .{..................Refresh();..
18e0 20 20 20 20 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 6e 61 6d ................foreach.(var.nam
1900 65 20 69 6e 20 73 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 e.in.s_DeviceLayouts)...........
1920 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 49 6e 70 75 74 43 6f 6e ...........yield.return.InputCon
1940 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 trolLayout.cache.FindOrLoadLayou
1960 74 28 6e 61 6d 65 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 t(name.ToString());.............
1980 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 .}..........}............public.
19a0 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c static.IEnumerable<InputControlL
19c0 61 79 6f 75 74 3e 20 61 6c 6c 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 0d 0a 20 20 20 20 20 20 ayout>.allProductLayouts........
19e0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 ..{..............get............
1a00 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 29 3b 0d ..{..................Refresh();.
1a20 0a 20 20 20 20 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 6e 61 .................foreach.(var.na
1a40 6d 65 20 69 6e 20 73 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 29 0d 0a 20 20 20 20 20 20 20 me.in.s_ProductLayouts).........
1a60 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 49 6e 70 75 74 43 .............yield.return.InputC
1a80 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 ontrolLayout.cache.FindOrLoadLay
1aa0 6f 75 74 28 6e 61 6d 65 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 out(name.ToString());...........
1ac0 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 ...}..........}............publi
1ae0 63 20 73 74 61 74 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 54 72 79 47 c.static.InputControlLayout.TryG
1b00 65 74 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 etLayout(string.layoutName).....
1b20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 .....{..............if.(string.I
1b40 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 sNullOrEmpty(layoutName)).......
1b60 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 ...........throw.new.ArgumentExc
1b80 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e 61 6d 65 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 eption("Layout.name.cannot.be.nu
1ba0 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 6d 65 6f 66 28 6c 61 79 6f 75 74 4e 61 6d 65 29 ll.or.empty",.nameof(layoutName)
1bc0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 29 3b 0d 0a 20 20 );................Refresh();....
1be0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 ..........return.InputControlLay
1c00 6f 75 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 74 28 6c 61 79 6f 75 out.cache.FindOrLoadLayout(layou
1c20 74 4e 61 6d 65 2c 20 74 68 72 6f 77 49 66 4e 6f 74 46 6f 75 6e 64 3a 20 66 61 6c 73 65 29 3b 0d tName,.throwIfNotFound:.false);.
1c40 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 .........}............public.sta
1c60 74 69 63 20 54 79 70 65 20 47 65 74 56 61 6c 75 65 54 79 70 65 28 73 74 72 69 6e 67 20 6c 61 79 tic.Type.GetValueType(string.lay
1c80 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 outName)..........{.............
1ca0 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 .if.(string.IsNullOrEmpty(layout
1cc0 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 Name))..................throw.ne
1ce0 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e 61 6d 65 w.ArgumentException("Layout.name
1d00 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 6d 65 6f .cannot.be.null.or.empty",.nameo
1d20 66 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f f(layoutName));................/
1d40 2f 20 4c 6f 61 64 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 /.Load.layout...............var.
1d60 6c 61 79 6f 75 74 20 3d 20 54 72 79 47 65 74 4c 61 79 6f 75 74 28 6c 61 79 6f 75 74 4e 61 6d 65 layout.=.TryGetLayout(layoutName
1d80 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 20 3d 3d 20 6e 75 );..............if.(layout.==.nu
1da0 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c ll)..................return.null
1dc0 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 72 61 62 20 74 79 70 65 2e 0d 0a ;................//.Grab.type...
1de0 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 79 70 65 20 3d 20 6c 61 79 6f 75 74 2e 74 79 ............var.type.=.layout.ty
1e00 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 74 79 pe;..............Debug.Assert(ty
1e20 70 65 20 21 3d 20 6e 75 6c 6c 2c 20 22 4c 61 79 6f 75 74 20 73 68 6f 75 6c 64 20 68 61 76 65 20 pe.!=.null,."Layout.should.have.
1e40 61 73 73 6f 63 69 61 74 65 64 20 74 79 70 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 associated.type");..............
1e60 44 65 62 75 67 2e 41 73 73 65 72 74 28 74 79 70 65 6f 66 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c Debug.Assert(typeof(InputControl
1e80 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 74 79 70 65 29 2c 0d 0a 20 20 20 20 20 ).IsAssignableFrom(type),.......
1ea0 20 20 20 20 20 20 20 20 20 20 20 22 4c 61 79 6f 75 74 27 73 20 61 73 73 6f 63 69 61 74 65 64 20 ..........."Layout's.associated.
1ec0 74 79 70 65 20 73 68 6f 75 6c 64 20 62 65 20 64 65 72 69 76 65 64 20 66 72 6f 6d 20 49 6e 70 75 type.should.be.derived.from.Inpu
1ee0 74 43 6f 6e 74 72 6f 6c 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 tControl");................retur
1f00 6e 20 6c 61 79 6f 75 74 2e 47 65 74 56 61 6c 75 65 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 n.layout.GetValueType();........
1f20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 45 6e ..}............public.static.IEn
1f40 75 6d 65 72 61 62 6c 65 3c 49 6e 70 75 74 44 65 76 69 63 65 4d 61 74 63 68 65 72 3e 20 47 65 74 umerable<InputDeviceMatcher>.Get
1f60 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 28 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 DeviceMatchers(string.layoutName
1f80 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 )..........{..............if.(st
1fa0 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 0d ring.IsNullOrEmpty(layoutName)).
1fc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d .................throw.new.Argum
1fe0 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e 61 6d 65 20 63 61 6e 6e 6f 74 entException("Layout.name.cannot
2000 20 62 65 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 6d 65 6f 66 28 6c 61 79 6f 75 .be.null.or.empty",.nameof(layou
2020 74 4e 61 6d 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 tName));................Refresh(
2040 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 );..............s_DeviceMatchers
2060 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 .TryGetValue(new.InternedString(
2080 6c 61 79 6f 75 74 4e 61 6d 65 29 2c 20 6f 75 74 20 76 61 72 20 6d 61 74 63 68 65 72 73 29 3b 0d layoutName),.out.var.matchers);.
20a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 61 74 63 68 65 72 73 3b 0d 0a 20 .............return.matchers;...
20c0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 .......}............public.stati
20e0 63 20 73 74 72 69 6e 67 20 47 65 74 44 69 73 70 6c 61 79 4e 61 6d 65 28 73 74 72 69 6e 67 20 6c c.string.GetDisplayName(string.l
2100 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ayoutName)..........{...........
2120 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f ...if.(string.IsNullOrEmpty(layo
2140 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 utName))..................throw.
2160 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e 61 new.ArgumentException("Layout.na
2180 6d 65 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 6d me.cannot.be.null.or.empty",.nam
21a0 65 6f 66 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 eof(layoutName));...............
21c0 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 54 72 79 47 65 74 4c 61 79 6f 75 74 28 6c 61 79 6f 75 .var.layout.=.TryGetLayout(layou
21e0 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 20 tName);..............if.(layout.
2200 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ==.null)..................return
2220 20 6c 61 79 6f 75 74 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 .layoutName;................if.(
2240 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 2e 64 69 73 !string.IsNullOrEmpty(layout.dis
2260 70 6c 61 79 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 playName))..................retu
2280 72 6e 20 6c 61 79 6f 75 74 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 rn.layout.displayName;..........
22a0 20 20 20 20 72 65 74 75 72 6e 20 6c 61 79 6f 75 74 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 ....return.layout.name;.........
22c0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .}............///.<summary>.....
22e0 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 .....///.List.the.controls.that.
2300 6d 61 79 20 62 65 20 70 72 65 73 65 6e 74 20 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 6f 72 20 64 65 may.be.present.on.controls.or.de
2320 76 69 63 65 73 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 6c 61 79 6f 75 74 20 62 79 20 76 69 72 vices.of.the.given.layout.by.vir
2340 74 75 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 62 65 69 6e 67 20 64 65 66 69 6e 65 tue..........///.of.being.define
2360 64 20 69 6e 20 6f 74 68 65 72 20 6c 61 79 6f 75 74 73 20 62 61 73 65 64 20 6f 6e 20 69 74 2e 0d d.in.other.layouts.based.on.it..
2380 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 .........///.</summary>.........
23a0 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6c 61 79 6f 75 74 4e 61 6d 65 22 3e 3c 2f .///.<param.name="layoutName"></
23c0 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 param>..........///.<returns></r
23e0 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 eturns>..........public.static.I
2400 45 6e 75 6d 65 72 61 62 6c 65 3c 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 3e 20 47 65 74 4f Enumerable<OptionalControl>.GetO
2420 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 46 6f 72 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 ptionalControlsForLayout(string.
2440 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 layoutName)..........{..........
2460 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 ....if.(string.IsNullOrEmpty(lay
2480 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 outName))..................throw
24a0 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 4c 61 79 6f 75 74 20 6e .new.ArgumentException("Layout.n
24c0 61 6d 65 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 22 2c 20 6e 61 ame.cannot.be.null.or.empty",.na
24e0 6d 65 6f 66 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 meof(layoutName));..............
2500 20 20 52 65 66 72 65 73 68 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 ..Refresh();................if.(
2520 21 73 5f 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 !s_OptionalControls.TryGetValue(
2540 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6c 61 79 6f 75 74 4e 61 6d 65 29 2c 20 new.InternedString(layoutName),.
2560 6f 75 74 20 76 61 72 20 6c 69 73 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 out.var.list))..................
2580 72 65 74 75 72 6e 20 45 6e 75 6d 65 72 61 62 6c 65 2e 45 6d 70 74 79 3c 4f 70 74 69 6f 6e 61 6c return.Enumerable.Empty<Optional
25a0 43 6f 6e 74 72 6f 6c 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 Control>();................retur
25c0 6e 20 6c 69 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 n.list;..........}............pu
25e0 62 6c 69 63 20 73 74 61 74 69 63 20 54 65 78 74 75 72 65 32 44 20 47 65 74 49 63 6f 6e 46 6f 72 blic.static.Texture2D.GetIconFor
2600 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 Layout(string.layoutName).......
2620 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e ...{..............if.(string.IsN
2640 75 6c 6c 4f 72 45 6d 70 74 79 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 ullOrEmpty(layoutName)).........
2660 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 .........throw.new.ArgumentNullE
2680 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 6c 61 79 6f 75 74 4e 61 6d 65 29 29 3b 0d 0a 0d xception(nameof(layoutName));...
26a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 72 65 73 68 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 .............Refresh();.........
26c0 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 61 6c 72 65 61 64 79 20 68 61 76 65 .......//.See.if.we.already.have
26e0 20 69 74 20 69 6e 20 74 68 65 20 63 61 63 68 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 .it.in.the.cache...............v
2700 61 72 20 69 6e 74 65 72 6e 65 64 4e 61 6d 65 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 ar.internedName.=.new.InternedSt
2720 72 69 6e 67 28 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ring(layoutName);..............i
2740 66 20 28 73 5f 49 63 6f 6e 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 69 6e 74 65 72 6e 65 64 4e f.(s_Icons.TryGetValue(internedN
2760 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 69 63 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ame,.out.var.icon)).............
2780 20 20 20 20 20 72 65 74 75 72 6e 20 69 63 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .....return.icon;...............
27a0 20 2f 2f 20 4e 6f 2c 20 73 6f 20 73 65 65 20 69 66 20 77 65 20 68 61 76 65 20 61 6e 20 69 63 6f .//.No,.so.see.if.we.have.an.ico
27c0 6e 20 6f 6e 20 64 69 73 6b 20 66 6f 72 20 65 78 61 63 74 6c 79 20 74 68 65 20 6c 61 79 6f 75 74 n.on.disk.for.exactly.the.layout
27e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 61 ..............//.we're.looking.a
2800 74 20 28 69 2e 65 2e 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 29 2e 0d 0a 20 20 t.(i.e..with.the.same.name).....
2820 20 20 20 20 20 20 20 20 20 20 69 63 6f 6e 20 3d 20 47 55 49 48 65 6c 70 65 72 73 2e 4c 6f 61 64 ..........icon.=.GUIHelpers.Load
2840 49 63 6f 6e 28 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 Icon(layoutName);..............i
2860 66 20 28 69 63 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d f.(icon.!=.null)..............{.
2880 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 63 6f 6e 73 2e 41 64 64 28 69 6e 74 .................s_Icons.Add(int
28a0 65 72 6e 65 64 4e 61 6d 65 2c 20 69 63 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ernedName,.icon);...............
28c0 20 20 20 72 65 74 75 72 6e 20 69 63 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ...return.icon;..............}..
28e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 2c 20 6e 6f 74 20 74 68 61 74 20 65 69 ..............//.No,.not.that.ei
2900 74 68 65 72 20 73 6f 20 73 74 61 72 74 20 77 61 6c 6b 69 6e 67 20 75 70 20 74 68 65 20 69 6e 68 ther.so.start.walking.up.the.inh
2920 65 72 69 74 61 6e 63 65 20 63 68 61 69 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 75 eritance.chain..............//.u
2940 6e 74 69 6c 20 77 65 20 65 69 74 68 65 72 20 62 75 6d 70 20 61 67 61 69 6e 73 74 20 74 68 65 20 ntil.we.either.bump.against.the.
2960 63 65 69 6c 69 6e 67 20 6f 72 20 66 69 6e 64 20 61 6e 20 69 63 6f 6e 2e 0d 0a 20 20 20 20 20 20 ceiling.or.find.an.icon.........
2980 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 54 72 79 47 65 74 4c 61 79 6f 75 74 28 ......var.layout.=.TryGetLayout(
29a0 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 layoutName);..............if.(la
29c0 79 6f 75 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 yout.!=.null)..............{....
29e0 20 20 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 62 61 73 65 4c ..............foreach.(var.baseL
2a00 61 79 6f 75 74 4e 61 6d 65 20 69 6e 20 6c 61 79 6f 75 74 2e 62 61 73 65 4c 61 79 6f 75 74 73 29 ayoutName.in.layout.baseLayouts)
2a20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
2a40 20 20 20 20 20 20 20 20 20 69 63 6f 6e 20 3d 20 47 65 74 49 63 6f 6e 46 6f 72 4c 61 79 6f 75 74 .........icon.=.GetIconForLayout
2a60 28 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 (baseLayoutName);...............
2a80 20 20 20 20 20 20 20 69 66 20 28 69 63 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 .......if.(icon.!=.null)........
2aa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 63 6f 6e 3b 0d 0a ..................return.icon;..
2ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ................}...............
2ae0 20 20 20 20 20 2f 2f 20 49 66 20 69 74 27 73 20 61 20 63 6f 6e 74 72 6f 6c 20 61 6e 64 20 74 68 .....//.If.it's.a.control.and.th
2b00 65 72 65 27 73 20 6e 6f 20 73 70 65 63 69 66 69 63 20 69 63 6f 6e 2c 20 72 65 74 75 72 6e 20 61 ere's.no.specific.icon,.return.a
2b20 20 67 65 6e 65 72 69 63 20 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .generic.one...................i
2b40 66 20 28 6c 61 79 6f 75 74 2e 69 73 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 f.(layout.isControlLayout)......
2b60 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
2b80 20 20 20 76 61 72 20 67 65 6e 65 72 69 63 49 63 6f 6e 20 3d 20 47 55 49 48 65 6c 70 65 72 73 2e ...var.genericIcon.=.GUIHelpers.
2ba0 4c 6f 61 64 49 63 6f 6e 28 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 22 29 3b 0d 0a 20 20 20 20 20 LoadIcon("InputControl");.......
2bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 65 6e 65 72 69 63 49 63 6f 6e 20 21 ...............if.(genericIcon.!
2be0 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a =.null)......................{..
2c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 63 6f 6e 73 2e ........................s_Icons.
2c20 41 64 64 28 69 6e 74 65 72 6e 65 64 4e 61 6d 65 2c 20 67 65 6e 65 72 69 63 49 63 6f 6e 29 3b 0d Add(internedName,.genericIcon);.
2c40 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 .........................return.
2c60 67 65 6e 65 72 69 63 49 63 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 genericIcon;....................
2c80 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 ..}..................}..........
2ca0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 20 69 63 6f 6e 20 ....}................//.No.icon.
2cc0 66 6f 72 20 61 6e 79 74 68 69 6e 67 20 69 6e 20 74 68 69 73 20 6c 61 79 6f 75 74 27 73 20 63 68 for.anything.in.this.layout's.ch
2ce0 61 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a ain...............return.null;..
2d00 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 ........}............public.stru
2d20 63 74 20 43 6f 6e 74 72 6f 6c 53 65 61 72 63 68 52 65 73 75 6c 74 0d 0a 20 20 20 20 20 20 20 20 ct.ControlSearchResult..........
2d40 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 63 6f 6e {..............public.string.con
2d60 74 72 6f 6c 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e trolPath;..............public.In
2d80 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 putControlLayout.layout;........
2da0 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e ......public.InputControlLayout.
2dc0 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 69 74 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ControlItem.item;..........}....
2de0 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 20 43 6c 65 ........internal.static.void.Cle
2e00 61 72 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 4c ar()..........{..............s_L
2e20 61 79 6f 75 74 52 65 67 69 73 74 72 61 74 69 6f 6e 56 65 72 73 69 6f 6e 20 3d 20 30 3b 0d 0a 20 ayoutRegistrationVersion.=.0;...
2e40 20 20 20 20 20 20 20 20 20 20 20 73 5f 4c 61 79 6f 75 74 43 61 63 68 65 52 65 66 2e 44 69 73 70 ...........s_LayoutCacheRef.Disp
2e60 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 55 73 61 67 65 73 2e 43 6c 65 ose();..............s_Usages.Cle
2e80 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 43 6f 6e 74 72 6f 6c 4c 61 79 6f ar();..............s_ControlLayo
2ea0 75 74 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 76 69 uts.Clear();..............s_Devi
2ec0 63 65 4c 61 79 6f 75 74 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ceLayouts.Clear();..............
2ee0 73 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 s_ProductLayouts.Clear();.......
2f00 20 20 20 20 20 20 20 73 5f 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 2e 43 6c 65 61 72 28 29 3b .......s_DeviceMatchers.Clear();
2f20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 63 6f 6e 73 2e 43 6c 65 61 72 28 29 3b 0d 0a ..............s_Icons.Clear();..
2f40 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 6f 75 72 20 6c ........}............//.If.our.l
2f60 61 79 6f 75 74 20 64 61 74 61 20 69 73 20 6f 75 74 64 61 74 65 64 2c 20 72 65 73 63 61 6e 20 61 ayout.data.is.outdated,.rescan.a
2f80 6c 6c 20 74 68 65 20 6c 61 79 6f 75 74 73 20 69 6e 20 74 68 65 20 73 79 73 74 65 6d 2e 0d 0a 20 ll.the.layouts.in.the.system....
2fa0 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 52 65 66 72 65 .......private.static.void.Refre
2fc0 73 68 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 sh()..........{..............var
2fe0 20 6d 61 6e 61 67 65 72 20 3d 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 73 5f 4d 61 6e 61 67 65 72 .manager.=.InputSystem.s_Manager
3000 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 6e 61 67 65 72 2e 6d 5f 4c 61 79 ;..............if.(manager.m_Lay
3020 6f 75 74 52 65 67 69 73 74 72 61 74 69 6f 6e 56 65 72 73 69 6f 6e 20 3d 3d 20 73 5f 4c 61 79 6f outRegistrationVersion.==.s_Layo
3040 75 74 52 65 67 69 73 74 72 61 74 69 6f 6e 56 65 72 73 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 utRegistrationVersion)..........
3060 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 ........return;................C
3080 6c 65 61 72 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 5f 4c 61 lear();................if.(!s_La
30a0 79 6f 75 74 43 61 63 68 65 52 65 66 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 youtCacheRef.valid).............
30c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 20 74 68 65 20 65 64 .{..................//.In.the.ed
30e0 69 74 6f 72 2c 20 77 65 20 6b 65 65 70 20 61 20 70 65 72 6d 61 6e 65 6e 74 20 72 65 66 65 72 65 itor,.we.keep.a.permanent.refere
3100 6e 63 65 20 6f 6e 20 74 68 65 20 67 6c 6f 62 61 6c 20 6c 61 79 6f 75 74 0d 0a 20 20 20 20 20 20 nce.on.the.global.layout........
3120 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 61 63 68 65 2e 20 4d 65 61 6e 73 20 74 68 61 74 20 69 ..........//.cache..Means.that.i
3140 6e 20 74 68 65 20 65 64 69 74 6f 72 2c 20 77 65 20 61 6c 77 61 79 73 20 68 61 76 65 20 61 6c 6c n.the.editor,.we.always.have.all
3160 20 6c 61 79 6f 75 74 73 20 6c 6f 61 64 65 64 20 69 6e 20 66 75 6c 6c 0d 0a 20 20 20 20 20 20 20 .layouts.loaded.in.full.........
3180 20 20 20 20 20 20 20 20 20 2f 2f 20 61 74 20 61 6c 6c 20 74 69 6d 65 73 20 77 68 65 72 65 61 73 .........//.at.all.times.whereas
31a0 20 69 6e 20 74 68 65 20 70 6c 61 79 65 72 2c 20 77 65 20 6c 6f 61 64 20 6c 61 79 6f 75 74 73 20 .in.the.player,.we.load.layouts.
31c0 6f 6e 6c 79 20 77 68 69 6c 65 20 77 65 20 6e 65 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 only.while.we.need..............
31e0 20 20 20 20 2f 2f 20 74 68 65 6d 20 61 6e 64 20 74 68 65 6e 20 72 65 6c 65 61 73 65 20 74 68 65 ....//.them.and.then.release.the
3200 6d 20 61 67 61 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 4c 61 79 6f m.again...................s_Layo
3220 75 74 43 61 63 68 65 52 65 66 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e utCacheRef.=.InputControlLayout.
3240 43 61 63 68 65 52 65 66 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 CacheRef();..............}......
3260 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 4e 61 6d 65 73 20 3d 20 6d 61 6e 61 ..........var.layoutNames.=.mana
3280 67 65 72 2e 4c 69 73 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 28 29 2e 54 6f 41 72 72 61 79 ger.ListControlLayouts().ToArray
32a0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6d 65 6d 62 65 72 20 77 ();................//.Remember.w
32c0 68 69 63 68 20 6c 61 79 6f 75 74 20 6d 61 70 73 20 74 6f 20 77 68 69 63 68 20 64 65 76 69 63 65 hich.layout.maps.to.which.device
32e0 20 6d 61 74 63 68 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f .matchers...............var.layo
3300 75 74 4d 61 74 63 68 65 72 73 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e utMatchers.=.InputControlLayout.
3320 73 5f 4c 61 79 6f 75 74 73 2e 6c 61 79 6f 75 74 4d 61 74 63 68 65 72 73 3b 0d 0a 20 20 20 20 20 s_Layouts.layoutMatchers;.......
3340 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 6c 61 79 .......foreach.(var.entry.in.lay
3360 6f 75 74 4d 61 74 63 68 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 outMatchers)..............{.....
3380 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 2e 54 72 .............s_DeviceMatchers.Tr
33a0 79 47 65 74 56 61 6c 75 65 28 65 6e 74 72 79 2e 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 yGetValue(entry.layoutName,.out.
33c0 76 61 72 20 6d 61 74 63 68 65 72 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 var.matchers);..................
33e0 20 20 6d 61 74 63 68 65 72 73 2e 41 70 70 65 6e 64 28 65 6e 74 72 79 2e 64 65 76 69 63 65 4d 61 ..matchers.Append(entry.deviceMa
3400 74 63 68 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 76 69 63 tcher);..................s_Devic
3420 65 4d 61 74 63 68 65 72 73 5b 65 6e 74 72 79 2e 6c 61 79 6f 75 74 4e 61 6d 65 5d 20 3d 20 6d 61 eMatchers[entry.layoutName].=.ma
3440 74 63 68 65 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 tchers;..............}..........
3460 20 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 61 6e 64 20 73 74 6f 72 65 20 61 6c 6c 20 6c 61 79 6f ......//.Load.and.store.all.layo
3480 75 74 73 2e 0d 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 6c uts...............foreach.(var.l
34a0 61 79 6f 75 74 4e 61 6d 65 20 69 6e 20 6c 61 79 6f 75 74 4e 61 6d 65 73 29 0d 0a 20 20 20 20 20 ayoutName.in.layoutNames).......
34c0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 .......{..................////FI
34e0 58 4d 45 3a 20 64 6f 65 73 20 6e 6f 74 20 70 72 6f 74 65 63 74 20 61 67 61 69 6e 73 74 20 65 78 XME:.does.not.protect.against.ex
3500 63 65 70 74 69 6f 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 ceptions..................var.la
3520 79 6f 75 74 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e yout.=.InputControlLayout.cache.
3540 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 74 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 74 68 72 FindOrLoadLayout(layoutName,.thr
3560 6f 77 49 66 4e 6f 74 46 6f 75 6e 64 3a 20 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 owIfNotFound:.false);...........
3580 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 .......if.(layout.==.null)......
35a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 ................continue;.......
35c0 20 20 20 20 20 20 20 20 20 20 20 20 20 53 63 61 6e 4c 61 79 6f 75 74 28 6c 61 79 6f 75 74 29 3b .............ScanLayout(layout);
35e0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 2e 69 ....................if.(layout.i
3600 73 4f 76 65 72 72 69 64 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sOverride)......................
3620 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 continue;....................if.
3640 28 6c 61 79 6f 75 74 2e 69 73 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 (layout.isControlLayout)........
3660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 73 2e 41 ..............s_ControlLayouts.A
3680 64 64 28 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dd(layout.name);................
36a0 20 20 65 6c 73 65 20 69 66 20 28 73 5f 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 2e 43 6f 6e 74 ..else.if.(s_DeviceMatchers.Cont
36c0 61 69 6e 73 4b 65 79 28 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ainsKey(layout.name))...........
36e0 20 20 20 20 20 20 20 20 20 20 20 73 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 2e 41 64 64 28 ...........s_ProductLayouts.Add(
3700 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 layout.name);..................e
3720 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 76 69 63 lse......................s_Devic
3740 65 4c 61 79 6f 75 74 73 2e 41 64 64 28 6c 61 79 6f 75 74 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 eLayouts.Add(layout.name);......
3760 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 6f 76 65 ........}................//.Move
3780 20 61 6c 6c 20 64 65 76 69 63 65 20 6c 61 79 6f 75 74 73 20 77 69 74 68 6f 75 74 20 61 20 64 65 .all.device.layouts.without.a.de
37a0 76 69 63 65 20 64 65 73 63 72 69 70 74 69 6f 6e 20 62 75 74 20 64 65 72 69 76 65 64 20 66 72 6f vice.description.but.derived.fro
37c0 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 20 6c 61 79 6f 75 74 20 74 68 61 74 20 m..............//.a.layout.that.
37e0 68 61 73 20 6f 6e 65 20 6f 76 65 72 20 74 6f 20 74 68 65 20 70 72 6f 64 75 63 74 20 6c 69 73 74 has.one.over.to.the.product.list
3800 2e 0d 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 6e 61 6d 65 ...............foreach.(var.name
3820 20 69 6e 20 73 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .in.s_DeviceLayouts)............
3840 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 ..{..................var.layout.
3860 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f =.InputControlLayout.cache.FindO
3880 72 4c 6f 61 64 4c 61 79 6f 75 74 28 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 rLoadLayout(name);..............
38a0 20 20 20 20 20 20 69 66 20 28 6c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f 75 74 73 2e 6c ......if.(layout.m_BaseLayouts.l
38c0 65 6e 67 74 68 20 3e 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ength.>.1)......................
38e0 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 69 6f throw.new.NotImplementedExceptio
3900 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 n();....................for.(var
3920 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 6c 61 79 6f 75 74 2e 62 61 73 65 4c 61 79 .baseLayoutName.=.layout.baseLay
3940 6f 75 74 73 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 29 3b 20 21 62 61 73 65 4c 61 79 6f outs.FirstOrDefault();.!baseLayo
3960 75 74 4e 61 6d 65 2e 49 73 45 6d 70 74 79 28 29 3b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 utName.IsEmpty();)..............
3980 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 ....{......................if.(s
39a0 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 2e 43 6f 6e 74 61 69 6e 73 28 62 61 73 65 4c 61 79 _ProductLayouts.Contains(baseLay
39c0 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b outName))......................{
39e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 66 ..........................//.Def
3a00 65 72 20 72 65 6d 6f 76 69 6e 67 20 66 72 6f 6d 20 73 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 73 er.removing.from.s_DeviceLayouts
3a20 20 74 6f 20 6b 65 65 70 20 69 74 65 72 61 74 69 6f 6e 20 73 74 61 62 6c 65 2e 0d 0a 20 20 20 20 .to.keep.iteration.stable.......
3a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 50 72 6f 64 75 63 74 4c 61 79 ....................s_ProductLay
3a60 6f 75 74 73 2e 41 64 64 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 outs.Add(name);.................
3a80 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........break;.................
3aa0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 .....}........................va
3ac0 72 20 62 61 73 65 4c 61 79 6f 75 74 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 r.baseLayout.=.InputControlLayou
3ae0 74 2e 63 61 63 68 65 2e 46 69 6e 64 4f 72 4c 6f 61 64 4c 61 79 6f 75 74 28 62 61 73 65 4c 61 79 t.cache.FindOrLoadLayout(baseLay
3b00 6f 75 74 4e 61 6d 65 2c 20 74 68 72 6f 77 49 66 4e 6f 74 46 6f 75 6e 64 3a 20 66 61 6c 73 65 29 outName,.throwIfNotFound:.false)
3b20 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 61 73 65 4c ;......................if.(baseL
3b40 61 79 6f 75 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ayout.==.null)..................
3b60 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ........continue;...............
3b80 20 20 20 20 20 20 20 69 66 20 28 62 61 73 65 4c 61 79 6f 75 74 2e 6d 5f 42 61 73 65 4c 61 79 6f .......if.(baseLayout.m_BaseLayo
3ba0 75 74 73 2e 6c 65 6e 67 74 68 20 3e 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 uts.length.>.1).................
3bc0 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 .........throw.new.NotImplemente
3be0 64 45 78 63 65 70 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dException();...................
3c00 20 20 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 20 3d 20 62 61 73 65 4c 61 79 6f 75 74 2e 62 ...baseLayoutName.=.baseLayout.b
3c20 61 73 65 4c 61 79 6f 75 74 73 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 29 3b 0d 0a 20 20 aseLayouts.FirstOrDefault();....
3c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ..............}..............}..
3c60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6d 6f 76 65 20 65 76 65 72 79 20 70 72 ..............//.Remove.every.pr
3c80 6f 64 75 63 74 20 64 65 76 69 63 65 20 6c 61 79 6f 75 74 20 6e 6f 77 2e 0d 0a 20 20 20 20 20 20 oduct.device.layout.now.........
3ca0 20 20 20 20 20 20 73 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 73 2e 45 78 63 65 70 74 57 69 74 68 ......s_DeviceLayouts.ExceptWith
3cc0 28 73 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 (s_ProductLayouts);.............
3ce0 20 20 20 73 5f 4c 61 79 6f 75 74 52 65 67 69 73 74 72 61 74 69 6f 6e 56 65 72 73 69 6f 6e 20 3d ...s_LayoutRegistrationVersion.=
3d00 20 6d 61 6e 61 67 65 72 2e 6d 5f 4c 61 79 6f 75 74 52 65 67 69 73 74 72 61 74 69 6f 6e 56 65 72 .manager.m_LayoutRegistrationVer
3d20 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 sion;..........}............priv
3d40 61 74 65 20 73 74 61 74 69 63 20 69 6e 74 20 73 5f 4c 61 79 6f 75 74 52 65 67 69 73 74 72 61 74 ate.static.int.s_LayoutRegistrat
3d60 69 6f 6e 56 65 72 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 ionVersion;..........private.sta
3d80 74 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 43 61 63 68 65 52 65 66 49 tic.InputControlLayout.CacheRefI
3da0 6e 73 74 61 6e 63 65 20 73 5f 4c 61 79 6f 75 74 43 61 63 68 65 52 65 66 3b 0d 0a 0d 0a 20 20 20 nstance.s_LayoutCacheRef;.......
3dc0 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 48 61 73 .....private.static.readonly.Has
3de0 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 73 5f 43 6f 6e 74 72 6f 6c 4c 61 hSet<InternedString>.s_ControlLa
3e00 79 6f 75 74 73 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 youts.=.new.HashSet<InternedStri
3e20 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 ng>();..........private.static.r
3e40 65 61 64 6f 6e 6c 79 20 48 61 73 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 eadonly.HashSet<InternedString>.
3e60 73 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 73 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 49 6e s_DeviceLayouts.=.new.HashSet<In
3e80 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 ternedString>();..........privat
3ea0 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 48 61 73 68 53 65 74 3c 49 6e 74 65 72 6e e.static.readonly.HashSet<Intern
3ec0 65 64 53 74 72 69 6e 67 3e 20 73 5f 50 72 6f 64 75 63 74 4c 61 79 6f 75 74 73 20 3d 20 6e 65 77 edString>.s_ProductLayouts.=.new
3ee0 20 48 61 73 68 53 65 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 .HashSet<InternedString>();.....
3f00 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 44 69 63 .....private.static.readonly.Dic
3f20 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 4c 69 73 74 3c 4f 70 74 tionary<InternedString,.List<Opt
3f40 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 3e 3e 20 73 5f 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c ionalControl>>.s_OptionalControl
3f60 73 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c s.=..............new.Dictionary<
3f80 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 4c 69 73 74 3c 4f 70 74 69 6f 6e 61 6c 43 6f 6e InternedString,.List<OptionalCon
3fa0 74 72 6f 6c 3e 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 trol>>();..........private.stati
3fc0 63 20 72 65 61 64 6f 6e 6c 79 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 c.readonly.Dictionary<InternedSt
3fe0 72 69 6e 67 2c 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e 70 75 74 44 65 76 69 63 65 4d 61 ring,.InlinedArray<InputDeviceMa
4000 74 63 68 65 72 3e 3e 20 73 5f 44 65 76 69 63 65 4d 61 74 63 68 65 72 73 20 3d 0d 0a 20 20 20 20 tcher>>.s_DeviceMatchers.=......
4020 20 20 20 20 20 20 20 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 ........new.Dictionary<InternedS
4040 74 72 69 6e 67 2c 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 49 6e 70 75 74 44 65 76 69 63 65 4d tring,.InlinedArray<InputDeviceM
4060 61 74 63 68 65 72 3e 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 atcher>>();..........private.sta
4080 74 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 54 tic.Dictionary<InternedString,.T
40a0 65 78 74 75 72 65 32 44 3e 20 73 5f 49 63 6f 6e 73 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 exture2D>.s_Icons.=.............
40c0 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 .new.Dictionary<InternedString,.
40e0 54 65 78 74 75 72 65 32 44 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6b Texture2D>();............//.We.k
4100 65 65 70 20 61 20 6d 61 70 20 6f 66 20 61 6c 6c 20 75 6e 69 71 75 65 20 75 73 61 67 65 73 20 77 eep.a.map.of.all.unique.usages.w
4120 65 20 66 69 6e 64 20 69 6e 20 6c 61 79 6f 75 74 73 20 61 6e 64 20 61 6c 73 6f 0d 0a 20 20 20 20 e.find.in.layouts.and.also......
4140 20 20 20 20 2f 2f 20 72 65 74 61 69 6e 20 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 6c 61 79 6f ....//.retain.a.list.of.the.layo
4160 75 74 73 20 74 68 65 79 20 61 72 65 20 75 73 65 64 20 77 69 74 68 2e 0d 0a 20 20 20 20 20 20 20 uts.they.are.used.with..........
4180 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 6f 72 74 65 64 44 .private.static.readonly.SortedD
41a0 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 4c 69 73 74 3c 49 ictionary<InternedString,.List<I
41c0 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 3e 20 73 5f 55 73 61 67 65 73 20 3d 0d 0a 20 20 20 20 nternedString>>.s_Usages.=......
41e0 20 20 20 20 20 20 20 20 6e 65 77 20 53 6f 72 74 65 64 44 69 63 74 69 6f 6e 61 72 79 3c 49 6e 74 ........new.SortedDictionary<Int
4200 65 72 6e 65 64 53 74 72 69 6e 67 2c 20 4c 69 73 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 ernedString,.List<InternedString
4220 3e 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 >>();............private.static.
4240 76 6f 69 64 20 53 63 61 6e 4c 61 79 6f 75 74 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f void.ScanLayout(InputControlLayo
4260 75 74 20 6c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ut.layout)..........{...........
4280 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 6c 61 79 6f 75 74 2e 63 6f 6e 74 72 6f 6c ...var.controls.=.layout.control
42a0 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 s;..............for.(var.i.=.0;.
42c0 69 20 3c 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 i.<.controls.Count;.++i)........
42e0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e ......{..................var.con
4300 74 72 6f 6c 20 3d 20 63 6f 6e 74 72 6f 6c 73 5b 69 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 trol.=.controls[i];.............
4320 20 20 20 20 20 20 20 2f 2f 20 49 66 20 69 74 27 73 20 6e 6f 74 20 6a 75 73 74 20 61 20 63 6f 6e .......//.If.it's.not.just.a.con
4340 74 72 6f 6c 20 6d 6f 64 69 66 79 69 6e 67 20 73 6f 6d 65 20 69 6e 6e 65 72 20 63 68 69 6c 64 20 trol.modifying.some.inner.child.
4360 63 6f 6e 74 72 6f 6c 2c 20 61 64 64 20 63 6f 6e 74 72 6f 6c 20 74 6f 20 61 6c 6c 20 62 61 73 65 control,.add.control.to.all.base
4380 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6c 61 79 6f 75 74 73 20 61 73 20 ..................//.layouts.as.
43a0 61 6e 20 6f 70 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 an.optional.control.............
43c0 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 ......//..................//.NOT
43e0 45 3a 20 57 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 6c 61 79 6f 75 74 73 20 70 6f 73 74 E:.We're.looking.at.layouts.post
4400 2d 6d 65 72 67 69 6e 67 20 68 65 72 65 2e 20 4d 65 61 6e 73 20 77 65 20 68 61 76 65 20 61 6c 72 -merging.here..Means.we.have.alr
4420 65 61 64 79 20 70 69 63 6b 65 64 20 75 70 20 61 6c 6c 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 eady.picked.up.all.the..........
4440 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 73 20 70 72 65 73 65 6e ........//.......controls.presen
4460 74 20 6f 6e 20 74 68 65 20 62 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.on.the.base...................
4480 69 66 20 28 63 6f 6e 74 72 6f 6c 2e 69 73 46 69 72 73 74 44 65 66 69 6e 65 64 49 6e 54 68 69 73 if.(control.isFirstDefinedInThis
44a0 4c 61 79 6f 75 74 20 26 26 20 21 63 6f 6e 74 72 6f 6c 2e 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 Layout.&&.!control.isModifyingEx
44c0 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 20 26 26 20 21 63 6f 6e 74 72 6f 6c 2e 6c 61 79 6f 75 74 istingControl.&&.!control.layout
44e0 2e 49 73 45 6d 70 74 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a .IsEmpty())..................{..
4500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 ....................foreach.(var
4520 20 62 61 73 65 4c 61 79 6f 75 74 20 69 6e 20 6c 61 79 6f 75 74 2e 62 61 73 65 4c 61 79 6f 75 74 .baseLayout.in.layout.baseLayout
4540 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4f s)..........................AddO
4560 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 52 65 63 75 72 73 69 76 65 28 62 61 73 65 4c 61 79 6f ptionalControlRecursive(baseLayo
4580 75 74 2c 20 72 65 66 20 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ut,.ref.control);...............
45a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6c 6c 65 ...}....................//.Colle
45c0 63 74 20 75 6e 69 71 75 65 20 75 73 61 67 65 73 20 61 6e 64 20 74 68 65 20 6c 61 79 6f 75 74 73 ct.unique.usages.and.the.layouts
45e0 20 75 73 65 64 20 77 69 74 68 20 74 68 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .used.with.them.................
4600 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 75 73 61 67 65 20 69 6e 20 63 6f 6e 74 72 6f 6c 2e ..foreach.(var.usage.in.control.
4620 75 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 usages)..................{......
4640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6d 70 74 79 20 75 73 61 67 65 73 20 ................//.Empty.usages.
4660 63 61 6e 20 6f 63 63 75 72 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 77 61 6e 74 can.occur.for.controls.that.want
4680 20 74 6f 20 72 65 73 65 74 20 69 6e 68 65 72 69 74 65 64 20 75 73 61 67 65 73 2e 0d 0a 20 20 20 .to.reset.inherited.usages......
46a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 .................if.(string.IsNu
46c0 6c 6c 4f 72 45 6d 70 74 79 28 75 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 llOrEmpty(usage))...............
46e0 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ...........continue;............
4700 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 74 65 72 6e 65 64 55 73 61 67 65 20 3d 20 ............var.internedUsage.=.
4720 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 75 73 61 67 65 29 3b 0d 0a 20 20 20 20 new.InternedString(usage);......
4740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 74 65 72 6e 65 64 4c 61 79 6f ................var.internedLayo
4760 75 74 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 63 6f 6e 74 72 6f 6c 2e ut.=.new.InternedString(control.
4780 6c 61 79 6f 75 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layout);........................
47a0 69 66 20 28 21 73 5f 55 73 61 67 65 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 69 6e 74 65 72 6e if.(!s_Usages.TryGetValue(intern
47c0 65 64 55 73 61 67 65 2c 20 6f 75 74 20 76 61 72 20 6c 61 79 6f 75 74 4c 69 73 74 29 29 0d 0a 20 edUsage,.out.var.layoutList))...
47e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
4800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 4c 69 73 74 20 3d 20 6e 65 77 20 4c ..............layoutList.=.new.L
4820 69 73 74 3c 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 3e 20 7b 69 6e 74 65 72 6e 65 64 4c 61 79 ist<InternedString>.{internedLay
4840 6f 75 74 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 out};..........................s
4860 5f 55 73 61 67 65 73 5b 69 6e 74 65 72 6e 65 64 55 73 61 67 65 5d 20 3d 20 6c 61 79 6f 75 74 4c _Usages[internedUsage].=.layoutL
4880 69 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ist;......................}.....
48a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 .................else...........
48c0 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
48e0 20 20 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 41 6c 72 65 61 64 79 49 6e 4c 69 73 74 20 3d 0d ......var.layoutAlreadyInList.=.
4900 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 .............................lay
4920 6f 75 74 4c 69 73 74 2e 41 6e 79 28 78 20 3d 3e 20 78 20 3d 3d 20 69 6e 74 65 72 6e 65 64 4c 61 outList.Any(x.=>.x.==.internedLa
4940 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 yout);..........................
4960 69 66 20 28 21 6c 61 79 6f 75 74 41 6c 72 65 61 64 79 49 6e 4c 69 73 74 29 0d 0a 20 20 20 20 20 if.(!layoutAlreadyInList).......
4980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 79 6f 75 74 4c 69 73 .......................layoutLis
49a0 74 2e 41 64 64 28 69 6e 74 65 72 6e 65 64 4c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 t.Add(internedLayout);..........
49c0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ............}..................}
49e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ..............}..........}......
4a00 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 64 64 4f 70 74 ......private.static.void.AddOpt
4a20 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 52 65 63 75 72 73 69 76 65 28 49 6e 74 65 72 6e 65 64 53 74 ionalControlRecursive(InternedSt
4a40 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 72 65 66 20 49 6e 70 75 74 43 6f 6e 74 72 6f ring.layoutName,.ref.InputContro
4a60 6c 4c 61 79 6f 75 74 2e 43 6f 6e 74 72 6f 6c 49 74 65 6d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 29 lLayout.ControlItem.controlItem)
4a80 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 ..........{..............Debug.A
4aa0 73 73 65 72 74 28 21 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 69 73 4d 6f 64 69 66 79 69 6e 67 45 78 ssert(!controlItem.isModifyingEx
4ac0 69 73 74 69 6e 67 43 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 istingControl);..............Deb
4ae0 75 67 2e 41 73 73 65 72 74 28 21 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 6c 61 79 6f 75 74 2e 49 73 ug.Assert(!controlItem.layout.Is
4b00 45 6d 70 74 79 28 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 63 75 Empty());................//.Recu
4b20 72 73 65 20 69 6e 74 6f 20 62 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 rse.into.base...............if.(
4b40 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e 62 61 73 InputControlLayout.s_Layouts.bas
4b60 65 4c 61 79 6f 75 74 54 61 62 6c 65 2e 54 72 79 47 65 74 56 61 6c 75 65 28 6c 61 79 6f 75 74 4e eLayoutTable.TryGetValue(layoutN
4b80 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 29 29 0d 0a 20 ame,.out.var.baseLayoutName))...
4ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f ...............AddOptionalContro
4bc0 6c 52 65 63 75 72 73 69 76 65 28 62 61 73 65 4c 61 79 6f 75 74 4e 61 6d 65 2c 20 72 65 66 20 63 lRecursive(baseLayoutName,.ref.c
4be0 6f 6e 74 72 6f 6c 49 74 65 6d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 ontrolItem);................//.S
4c00 65 65 20 69 66 20 77 65 20 61 6c 72 65 61 64 79 20 68 61 76 65 20 74 68 69 73 20 6f 70 74 69 6f ee.if.we.already.have.this.optio
4c20 6e 61 6c 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 6c nal.control...............var.al
4c40 72 65 61 64 79 50 72 65 73 65 6e 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 readyPresent.=.false;...........
4c60 20 20 20 69 66 20 28 21 73 5f 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 73 2e 54 72 79 47 65 ...if.(!s_OptionalControls.TryGe
4c80 74 56 61 6c 75 65 28 6c 61 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 76 61 72 20 6c 69 73 74 29 tValue(layoutName,.out.var.list)
4ca0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
4cc0 20 20 6c 69 73 74 20 3d 20 6e 65 77 20 4c 69 73 74 3c 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f ..list.=.new.List<OptionalContro
4ce0 6c 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 4f 70 74 69 6f 6e 61 l>();..................s_Optiona
4d00 6c 43 6f 6e 74 72 6f 6c 73 5b 6c 61 79 6f 75 74 4e 61 6d 65 5d 20 3d 20 6c 69 73 74 3b 0d 0a 20 lControls[layoutName].=.list;...
4d20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a ...........}..............else..
4d40 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ............{................../
4d60 2f 20 53 65 65 20 69 66 20 77 65 20 61 6c 72 65 61 64 79 20 68 61 76 65 20 74 68 69 73 20 63 6f /.See.if.we.already.have.this.co
4d80 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 ntrol...................foreach.
4da0 28 76 61 72 20 69 74 65 6d 20 69 6e 20 6c 69 73 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 (var.item.in.list)..............
4dc0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 ....{......................if.(i
4de0 74 65 6d 2e 6e 61 6d 65 20 3d 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 6e 61 6d 65 20 26 26 20 tem.name.==.controlItem.name.&&.
4e00 69 74 65 6d 2e 6c 61 79 6f 75 74 20 3d 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 6d 2e 6c 61 79 6f 75 item.layout.==.controlItem.layou
4e20 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 t)......................{.......
4e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 72 65 61 64 79 50 72 65 73 65 6e ...................alreadyPresen
4e60 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.=.true;.......................
4e80 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ...break;......................}
4ea0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
4ec0 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 61 6c 72 65 61 64 79 50 72 65 73 .}..............if.(!alreadyPres
4ee0 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 73 74 2e 41 64 64 28 6e ent)..................list.Add(n
4f00 65 77 20 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 20 7b 6e 61 6d 65 20 3d 20 63 6f 6e 74 72 ew.OptionalControl.{name.=.contr
4f20 6f 6c 49 74 65 6d 2e 6e 61 6d 65 2c 20 6c 61 79 6f 75 74 20 3d 20 63 6f 6e 74 72 6f 6c 49 74 65 olItem.name,.layout.=.controlIte
4f40 6d 2e 6c 61 79 6f 75 74 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 m.layout});..........}..........
4f60 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6e 20 ..///.<summary>..........///.An.
4f80 6f 70 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 69 73 20 61 20 63 6f 6e 74 72 6f 6c 20 74 68 optional.control.is.a.control.th
4fa0 61 74 20 69 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 6f 6e 20 61 20 6c 61 79 6f 75 74 20 62 75 at.is.not.defined.on.a.layout.bu
4fc0 74 20 77 68 69 63 68 20 69 73 20 64 65 66 69 6e 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 t.which.is.defined..........///.
4fe0 6f 6e 20 61 20 64 65 72 69 76 65 64 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f on.a.derived.layout...........//
5000 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 /.</summary>..........///.<remar
5020 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6e 20 65 78 61 6d 70 6c 65 20 69 73 20 74 ks>..........///.An.example.is.t
5040 68 65 20 22 61 63 63 65 6c 65 72 61 74 69 6f 6e 22 20 63 6f 6e 74 72 6f 6c 20 64 65 66 69 6e 65 he."acceleration".control.define
5060 64 20 62 79 20 73 6f 6d 65 20 6c 61 79 6f 75 74 73 20 62 61 73 65 64 20 6f 6e 20 3c 73 65 65 20 d.by.some.layouts.based.on.<see.
5080 63 72 65 66 3d 22 47 61 6d 65 70 61 64 22 2f 3e 20 28 65 2e 67 2e 0d 0a 20 20 20 20 20 20 20 20 cref="Gamepad"/>.(e.g...........
50a0 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 44 75 61 6c 53 68 6f 63 6b 47 61 6d 65 70 61 64 2e ///.<see.cref="DualShockGamepad.
50c0 61 63 63 65 6c 65 72 61 74 69 6f 6e 22 2f 3e 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 67 61 6d 65 acceleration"/>..This.means.game
50e0 70 61 64 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 41 59 20 68 61 76 65 20 61 20 67 79 72 pads..........///.MAY.have.a.gyr
5100 6f 20 61 6e 64 20 74 68 75 73 20 4d 41 59 20 68 61 76 65 20 61 6e 20 22 61 63 63 65 6c 65 72 61 o.and.thus.MAY.have.an."accelera
5120 74 69 6f 6e 22 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 tion".control...........///.....
5140 20 20 20 20 20 2f 2f 2f 20 49 6e 20 62 69 6e 64 69 6e 67 73 20 28 3c 73 65 65 20 63 72 65 66 3d .....///.In.bindings.(<see.cref=
5160 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 22 2f 3e 29 2c 20 69 74 20 69 73 20 70 65 72 66 65 63 74 "InputBinding"/>),.it.is.perfect
5180 6c 79 20 76 61 6c 69 64 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 74 68 69 73 20 6f 70 70 6f 72 ly.valid.to.deal.with.this.oppor
51a0 74 75 6e 69 73 74 69 63 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 63 72 tunistically..........///.and.cr
51c0 65 61 74 65 20 61 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 63 3e 22 26 6c 74 3b 47 61 6d 65 70 61 eate.a.binding.to.<c>"&lt;Gamepa
51e0 64 26 67 74 3b 2f 61 63 63 65 6c 65 72 61 74 69 6f 6e 22 3c 2f 63 3e 20 77 68 69 63 68 20 77 69 d&gt;/acceleration"</c>.which.wi
5200 6c 6c 20 62 69 6e 64 20 63 6f 72 72 65 63 74 6c 79 20 49 46 20 74 68 65 20 67 61 6d 65 70 61 64 ll.bind.correctly.IF.the.gamepad
5220 20 68 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 20 61 63 63 65 6c 65 72 61 74 69 6f .has..........///.an.acceleratio
5240 6e 20 63 6f 6e 74 72 6f 6c 20 62 75 74 20 77 69 6c 6c 20 64 6f 20 6e 6f 74 68 69 6e 67 20 69 66 n.control.but.will.do.nothing.if
5260 20 69 74 20 64 6f 65 73 6e 27 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 .it.doesn't...........///.......
5280 20 20 20 2f 2f 2f 20 54 68 65 20 63 6f 6e 63 65 70 74 20 6f 66 20 6f 70 74 69 6f 6e 61 6c 20 63 ...///.The.concept.of.optional.c
52a0 6f 6e 74 72 6f 6c 73 20 70 65 72 6d 69 74 73 20 73 65 74 74 69 6e 67 20 75 70 20 73 75 63 68 20 ontrols.permits.setting.up.such.
52c0 62 69 6e 64 69 6e 67 73 20 69 6e 20 74 68 65 20 55 49 20 62 79 20 6d 61 6b 69 6e 67 20 63 6f 6e bindings.in.the.UI.by.making.con
52e0 74 72 6f 6c 73 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 72 65 20 70 72 65 73 trols.that..........///.are.pres
5300 65 6e 74 20 6f 6e 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 20 6c 61 79 6f 75 74 73 20 74 68 61 ent.on.more.specific.layouts.tha
5320 6e 20 74 68 65 20 6f 6e 65 20 63 75 72 72 65 6e 74 6c 79 20 6c 6f 6f 6b 65 64 20 61 74 20 61 76 n.the.one.currently.looked.at.av
5340 61 69 6c 61 62 6c 65 20 64 69 72 65 63 74 6c 79 20 6f 6e 20 74 68 65 0d 0a 20 20 20 20 20 20 20 ailable.directly.on.the.........
5360 20 2f 2f 2f 20 62 61 73 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c .///.base.layout...........///.<
5380 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 /remarks>..........public.struct
53a0 20 4f 70 74 69 6f 6e 61 6c 43 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .OptionalControl..........{.....
53c0 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6e .........public.InternedString.n
53e0 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 74 65 72 6e 65 ame;..............public.Interne
5400 64 53 74 72 69 6e 67 20 6c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f dString.layout;..............///
5420 2f 52 45 56 49 45 57 3a 20 64 6f 20 77 65 20 77 61 6e 74 20 74 6f 20 68 61 76 65 20 74 68 65 20 /REVIEW:.do.we.want.to.have.the.
5440 6c 69 73 74 20 6f 66 20 6c 61 79 6f 75 74 73 20 74 68 61 74 20 64 65 66 69 6e 65 20 74 68 65 20 list.of.layouts.that.define.the.
5460 63 6f 6e 74 72 6f 6c 3f 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 23 control?..........}......}..}..#
5480 65 6e 64 69 66 20 2f 2f 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 00 00 00 00 00 00 00 00 00 endif.//.UNITY_EDITOR...........
54a0 00 00 00 00 00 00 00 00 00 00 00 00 1d 00 00 00 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 72 ................EditorInputContr
54c0 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 00 00 00 1e 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e olLayoutCache.......UnityEngine.
54e0 49 6e 70 75 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 00 00 InputSystem.Editor..