summaryrefslogtreecommitdiff
path: root/Library/Artifacts/90/9088bad559ffa5c38cde278a491a1cf7
blob: ec41c1625d2538c1bbd5ab8548c00a1b637ea32b (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 99 38 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe .......8............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 d8 88 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 ................................
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 11 00 00 00 53 74 65 61 6d 49 47 41 43 6f 6e 76 65 72 74 65 72 00 00 00 ............SteamIGAConverter...
10a0 3e 88 00 00 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 20 26 26 20 55 4e 49 54 59 5f 45 4e >...#if.UNITY_EDITOR.&&.UNITY_EN
10c0 41 42 4c 45 5f 53 54 45 41 4d 5f 43 4f 4e 54 52 4f 4c 4c 45 52 5f 53 55 50 50 4f 52 54 0d 0a 75 ABLE_STEAM_CONTROLLER_SUPPORT..u
10e0 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 6c 6c 65 sing.System;..using.System.Colle
1100 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 2e 49 4f ctions.Generic;..using.System.IO
1120 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c 69 6e 71 3b 0d 0a 75 73 69 6e 67 20 53 79 73 ;..using.System.Linq;..using.Sys
1140 74 65 6d 2e 54 65 78 74 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 64 69 74 6f 72 3b 0d 0a 75 tem.Text;..using.UnityEditor;..u
1160 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 43 6f 6e sing.UnityEngine.InputSystem.Con
1180 74 72 6f 6c 73 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 trols;..using.UnityEngine.InputS
11a0 79 73 74 65 6d 2e 45 64 69 74 6f 72 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 ystem.Editor;..using.UnityEngine
11c0 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a 0d 0a 2f 2f 2f 2f 54 .InputSystem.Utilities;....////T
11e0 4f 44 4f 3a 20 6d 6f 74 69 6f 6e 20 64 61 74 61 20 73 75 70 70 6f 72 74 0d 0a 0d 0a 2f 2f 2f 2f ODO:.motion.data.support....////
1200 54 4f 44 4f 3a 20 68 61 70 74 69 63 73 20 73 75 70 70 6f 72 74 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 TODO:.haptics.support....////TOD
1220 4f 3a 20 65 6e 73 75 72 65 20 74 68 61 74 20 6e 6f 20 74 77 6f 20 61 63 74 69 6f 6e 73 20 68 61 O:.ensure.that.no.two.actions.ha
1240 76 65 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 20 65 76 65 6e 20 62 65 74 77 65 65 6e 20 6d 61 ve.the.same.name.even.between.ma
1260 70 73 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 73 6f 20 6e 65 65 64 20 74 6f 20 62 75 69 ps....////TODO:.also.need.to.bui
1280 6c 64 20 61 20 6c 61 79 6f 75 74 20 62 61 73 65 64 20 6f 6e 20 53 74 65 61 6d 43 6f 6e 74 72 6f ld.a.layout.based.on.SteamContro
12a0 6c 6c 65 72 20 74 68 61 74 20 68 61 73 20 63 6f 6e 74 72 6f 6c 73 20 72 65 70 72 65 73 65 6e 74 ller.that.has.controls.represent
12c0 69 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 20 6f 66 20 61 63 74 69 6f 6e 73 0d 0a ing.the.current.set.of.actions..
12e0 2f 2f 2f 2f 20 20 20 20 20 20 28 6d 69 67 68 74 20 6e 65 65 64 20 74 68 69 73 20 69 6e 20 74 68 ////......(might.need.this.in.th
1300 65 20 72 75 6e 74 69 6d 65 29 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 6c 6f 63 61 6c 69 7a 61 e.runtime)....////TODO:.localiza
1320 74 69 6f 6e 20 73 75 70 70 6f 72 74 20 28 61 6c 6c 6f 77 20 6c 6f 61 64 69 6e 67 20 65 78 69 73 tion.support.(allow.loading.exis
1340 74 69 6e 67 20 56 44 46 20 66 69 6c 65 20 61 6e 64 20 70 72 65 73 65 72 76 69 6e 67 20 6c 6f 63 ting.VDF.file.and.preserving.loc
1360 61 6c 69 7a 61 74 69 6f 6e 20 73 74 72 69 6e 67 73 29 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 alization.strings)....////TODO:.
1380 61 6c 6c 6f 77 20 68 61 76 69 6e 67 20 61 63 74 69 6f 6e 73 20 74 68 61 74 20 61 72 65 20 69 67 allow.having.actions.that.are.ig
13a0 6e 6f 72 65 64 20 62 79 20 53 74 65 61 6d 20 56 44 46 20 65 78 70 6f 72 74 0d 0a 0d 0a 2f 2f 2f nored.by.Steam.VDF.export....///
13c0 2f 54 4f 44 4f 3a 20 73 75 70 70 6f 72 74 20 66 6f 72 20 67 65 74 74 69 6e 67 20 64 69 73 70 6c /TODO:.support.for.getting.displ
13e0 61 79 4e 61 6d 65 73 2f 67 6c 79 70 68 73 20 66 72 6f 6d 20 53 74 65 61 6d 0d 0a 0d 0a 2f 2f 2f ayNames/glyphs.from.Steam....///
1400 2f 54 4f 44 4f 3a 20 70 6f 6c 6c 69 6e 67 20 69 6e 20 62 61 63 6b 67 72 6f 75 6e 64 0d 0a 0d 0a /TODO:.polling.in.background....
1420 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 74 53 79 73 74 65 namespace.UnityEngine.InputSyste
1440 6d 2e 53 74 65 61 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 m.Steam.Editor..{......///.<summ
1460 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 6f 6e 76 65 72 74 73 20 69 6e 70 75 74 20 61 63 74 ary>......///.Converts.input.act
1480 69 6f 6e 73 20 74 6f 20 61 6e 64 20 66 72 6f 6d 20 53 74 65 61 6d 20 49 47 41 20 66 69 6c 65 20 ions.to.and.from.Steam.IGA.file.
14a0 66 6f 72 6d 61 74 2e 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 format.......///.</summary>.....
14c0 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 69 64 65 61 .///.<remarks>......///.The.idea
14e0 20 62 65 68 69 6e 64 20 74 68 69 73 20 63 6f 6e 76 65 72 74 65 72 20 69 73 20 74 6f 20 65 6e 61 .behind.this.converter.is.to.ena
1500 62 6c 65 20 75 73 65 72 73 20 74 6f 20 75 73 65 20 55 6e 69 74 79 27 73 20 61 63 74 69 6f 6e 20 ble.users.to.use.Unity's.action.
1520 65 64 69 74 6f 72 20 74 6f 20 73 65 74 20 75 70 20 61 63 74 69 6f 6e 73 0d 0a 20 20 20 20 2f 2f editor.to.set.up.actions......//
1540 2f 20 66 6f 72 20 74 68 65 69 72 20 67 61 6d 65 20 61 6e 64 20 74 68 65 20 62 65 20 61 62 6c 65 /.for.their.game.and.the.be.able
1560 2c 20 77 68 65 6e 20 74 61 72 67 65 74 69 6e 67 20 64 65 73 6b 74 6f 70 73 20 74 68 72 6f 75 67 ,.when.targeting.desktops.throug
1580 68 20 53 74 65 61 6d 2c 20 74 6f 20 63 6f 6e 76 65 72 74 20 74 68 65 20 67 61 6d 65 27 73 20 61 h.Steam,.to.convert.the.game's.a
15a0 63 74 69 6f 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 6f 20 61 20 53 74 65 61 6d 20 56 44 46 20 66 ctions......///.to.a.Steam.VDF.f
15c0 69 6c 65 20 74 68 61 74 20 61 6c 6c 6f 77 73 20 75 73 69 6e 67 20 74 68 65 20 53 74 65 61 6d 20 ile.that.allows.using.the.Steam.
15e0 43 6f 6e 74 72 6f 6c 6c 65 72 20 41 50 49 20 77 69 74 68 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 Controller.API.with.the.game....
1600 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 67 65 6e 65 72 61 74 65 64 20 56 44 ...///......///.The.generated.VD
1620 46 20 66 69 6c 65 20 69 73 20 6d 65 61 6e 74 20 74 6f 20 61 6c 6c 6f 77 20 65 64 69 74 69 6e 67 F.file.is.meant.to.allow.editing
1640 20 62 79 20 68 61 6e 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 61 64 64 20 6c 6f 63 61 6c 69 7a .by.hand.in.order.to.add.localiz
1660 61 74 69 6f 6e 20 73 74 72 69 6e 67 73 20 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 61 70 70 6c 79 20 ation.strings.or......///.apply.
1680 53 74 65 61 6d 2d 73 70 65 63 69 66 69 63 20 73 65 74 74 69 6e 67 73 20 74 68 61 74 20 63 61 6e Steam-specific.settings.that.can
16a0 6e 6f 74 20 62 65 20 69 6e 66 65 72 72 65 64 20 66 72 6f 6d 20 55 6e 69 74 79 20 69 6e 70 75 74 not.be.inferred.from.Unity.input
16c0 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 .actions.......///.</remarks>...
16e0 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 53 74 65 61 6d 49 47 41 43 ...public.static.class.SteamIGAC
1700 6f 6e 76 65 72 74 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 onverter......{..........///.<su
1720 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 6e 65 72 61 74 65 20 43 23 20 mmary>..........///.Generate.C#.
1740 63 6f 64 65 20 66 6f 72 20 61 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 code.for.an.<see.cref="InputDevi
1760 63 65 22 2f 3e 20 64 65 72 69 76 65 64 20 63 6c 61 73 73 20 74 68 61 74 20 65 78 70 6f 73 65 73 ce"/>.derived.class.that.exposes
1780 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 72 20 74 .the.controls..........///.for.t
17a0 68 65 20 61 63 74 69 6f 6e 73 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 67 69 76 65 6e 20 53 74 he.actions.found.in.the.given.St
17c0 65 61 6d 20 49 47 41 20 64 65 73 63 72 69 70 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f eam.IGA.description...........//
17e0 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 70 61 72 61 6d /.</summary>..........///.<param
1800 20 6e 61 6d 65 3d 22 76 64 66 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f .name="vdf"></param>..........//
1820 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c 61 73 73 /.<param.name="namespaceAndClass
1840 4e 61 6d 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 Name"></param>..........///.<ret
1860 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 5b 53 79 73 74 65 6d urns></returns>..........[System
1880 2e 44 69 61 67 6e 6f 73 74 69 63 73 2e 43 6f 64 65 41 6e 61 6c 79 73 69 73 2e 53 75 70 70 72 65 .Diagnostics.CodeAnalysis.Suppre
18a0 73 73 4d 65 73 73 61 67 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 50 65 72 66 6f 72 6d 61 6e 63 65 ssMessage("Microsoft.Performance
18c0 22 2c 20 22 43 41 31 38 30 39 3a 41 76 6f 69 64 45 78 63 65 73 73 69 76 65 4c 6f 63 61 6c 73 22 ",."CA1809:AvoidExcessiveLocals"
18e0 2c 20 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 3d 20 22 54 4f 44 4f 3a 20 52 65 66 61 63 74 6f ,.Justification.=."TODO:.Refacto
1900 72 20 6c 61 74 65 72 2e 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 r.later.")]..........public.stat
1920 69 63 20 73 74 72 69 6e 67 20 47 65 6e 65 72 61 74 65 49 6e 70 75 74 44 65 76 69 63 65 46 72 6f ic.string.GenerateInputDeviceFro
1940 6d 53 74 65 61 6d 49 47 41 28 73 74 72 69 6e 67 20 76 64 66 2c 20 73 74 72 69 6e 67 20 6e 61 6d mSteamIGA(string.vdf,.string.nam
1960 65 73 70 61 63 65 41 6e 64 43 6c 61 73 73 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a espaceAndClassName)..........{..
1980 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 6c 6c 4f 72 45 ............if.(string.IsNullOrE
19a0 6d 70 74 79 28 76 64 66 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f mpty(vdf))..................thro
19c0 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 76 64 66 w.new.ArgumentNullException("vdf
19e0 22 29 3b 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 75 ");..............if.(string.IsNu
1a00 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c 61 73 73 4e 61 6d 65 29 llOrEmpty(namespaceAndClassName)
1a20 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 77 20 41 72 67 )..................throw.new.Arg
1a40 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 6d 65 73 70 61 63 65 41 6e 64 umentNullException("namespaceAnd
1a60 43 6c 61 73 73 4e 61 6d 65 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 ClassName");................//.P
1a80 61 72 73 65 20 56 44 46 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 72 73 65 arse.VDF...............var.parse
1aa0 64 56 64 66 20 3d 20 50 61 72 73 65 56 44 46 28 76 64 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 dVdf.=.ParseVDF(vdf);...........
1ac0 20 20 20 76 61 72 20 61 63 74 69 6f 6e 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 ...var.actions.=.(Dictionary<str
1ae0 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 28 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 ing,.object>)((Dictionary<string
1b00 2c 20 6f 62 6a 65 63 74 3e 29 70 61 72 73 65 64 56 64 66 5b 22 49 6e 20 47 61 6d 65 20 41 63 74 ,.object>)parsedVdf["In.Game.Act
1b20 69 6f 6e 73 22 5d 29 5b 22 61 63 74 69 6f 6e 73 22 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ions"])["actions"];.............
1b40 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 63 6c 61 73 73 20 61 6e 64 20 6e 61 6d 65 73 70 ...//.Determine.class.and.namesp
1b60 61 63 65 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 73 ace.name...............var.names
1b80 70 61 63 65 4e 61 6d 65 20 3d 20 22 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 paceName.=."";..............var.
1ba0 63 6c 61 73 73 4e 61 6d 65 20 3d 20 22 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 className.=."";..............var
1bc0 20 69 6e 64 65 78 4f 66 4c 61 73 74 44 6f 74 20 3d 20 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c .indexOfLastDot.=.namespaceAndCl
1be0 61 73 73 4e 61 6d 65 2e 4c 61 73 74 49 6e 64 65 78 4f 66 28 27 2e 27 29 3b 0d 0a 20 20 20 20 20 assName.LastIndexOf('.');.......
1c00 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 78 4f 66 4c 61 73 74 44 6f 74 20 21 3d 20 2d 31 29 .......if.(indexOfLastDot.!=.-1)
1c20 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 20 ..............{.................
1c40 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c 61 .namespaceName.=.namespaceAndCla
1c60 73 73 4e 61 6d 65 2e 53 75 62 73 74 72 69 6e 67 28 30 2c 20 69 6e 64 65 78 4f 66 4c 61 73 74 44 ssName.Substring(0,.indexOfLastD
1c80 6f 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6c 61 73 73 4e 61 6d 65 20 ot);..................className.
1ca0 3d 20 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c 61 73 73 4e 61 6d 65 2e 53 75 62 73 74 72 69 6e =.namespaceAndClassName.Substrin
1cc0 67 28 69 6e 64 65 78 4f 66 4c 61 73 74 44 6f 74 20 2b 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 g(indexOfLastDot.+.1);..........
1ce0 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 20 20 20 20 20 20 20 ....}..............else.........
1d00 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6c 61 73 73 4e 61 6d .....{..................classNam
1d20 65 20 3d 20 6e 61 6d 65 73 70 61 63 65 41 6e 64 43 6c 61 73 73 4e 61 6d 65 3b 0d 0a 20 20 20 20 e.=.namespaceAndClassName;......
1d40 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 74 65 ........}..............var.state
1d60 53 74 72 75 63 74 4e 61 6d 65 20 3d 20 63 6c 61 73 73 4e 61 6d 65 20 2b 20 22 53 74 61 74 65 22 StructName.=.className.+."State"
1d80 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 69 6c 64 65 72 20 3d 20 6e ;................var.builder.=.n
1da0 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ew.StringBuilder();.............
1dc0 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 2f 2f 20 54 48 49 53 20 46 49 4c 45 20 ...builder.Append("//.THIS.FILE.
1de0 48 41 53 20 42 45 45 4e 20 41 55 54 4f 2d 47 45 4e 45 52 41 54 45 44 5c 6e 22 29 3b 0d 0a 20 20 HAS.BEEN.AUTO-GENERATED\n");....
1e00 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 69 66 20 28 55 ..........builder.Append("#if.(U
1e20 4e 49 54 59 5f 45 44 49 54 4f 52 20 7c 7c 20 55 4e 49 54 59 5f 53 54 41 4e 44 41 4c 4f 4e 45 29 NITY_EDITOR.||.UNITY_STANDALONE)
1e40 20 26 26 20 55 4e 49 54 59 5f 45 4e 41 42 4c 45 5f 53 54 45 41 4d 5f 43 4f 4e 54 52 4f 4c 4c 45 .&&.UNITY_ENABLE_STEAM_CONTROLLE
1e60 52 5f 53 55 50 50 4f 52 54 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c R_SUPPORT\n");..............buil
1e80 64 65 72 2e 41 70 70 65 6e 64 28 22 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 3b 5c 6e der.Append("using.UnityEngine;\n
1ea0 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 ");..............builder.Append(
1ec0 22 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 3b 5c "using.UnityEngine.InputSystem;\
1ee0 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 n");..............builder.Append
1f00 28 22 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e ("using.UnityEngine.InputSystem.
1f20 43 6f 6e 74 72 6f 6c 73 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c Controls;\n");..............buil
1f40 64 65 72 2e 41 70 70 65 6e 64 28 22 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e der.Append("using.UnityEngine.In
1f60 70 75 74 53 79 73 74 65 6d 2e 4c 61 79 6f 75 74 73 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 putSystem.Layouts;\n");.........
1f80 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 75 73 69 6e 67 20 55 6e 69 74 79 .....builder.Append("using.Unity
1fa0 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 6c 3b 5c 6e 22 29 Engine.InputSystem.LowLevel;\n")
1fc0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 75 ;..............builder.Append("u
1fe0 73 69 6e 67 20 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 sing.UnityEngine.InputSystem.Uti
2000 6c 69 74 69 65 73 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 lities;\n");..............builde
2020 72 2e 41 70 70 65 6e 64 28 22 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 r.Append("using.UnityEngine.Inpu
2040 74 53 79 73 74 65 6d 2e 53 74 65 61 6d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 tSystem.Steam;\n");.............
2060 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f .builder.Append("#if.UNITY_EDITO
2080 52 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 R\n");..............builder.Appe
20a0 6e 64 28 22 75 73 69 6e 67 20 55 6e 69 74 79 45 64 69 74 6f 72 3b 5c 6e 22 29 3b 0d 0a 20 20 20 nd("using.UnityEditor;\n");.....
20c0 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 65 6e 64 69 66 5c .........builder.Append("#endif\
20e0 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 n");..............builder.Append
2100 28 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 ("\n");..............if.(!string
2120 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a .IsNullOrEmpty(namespaceName))..
2140 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 62 ............{..................b
2160 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 6e 61 6d 65 73 70 61 63 65 20 22 29 3b 0d 0a 20 20 uilder.Append("namespace.");....
2180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 6e 61 6d ..............builder.Append(nam
21a0 65 73 70 61 63 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 espaceName);..................bu
21c0 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 6e 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 ilder.Append("\n{\n");..........
21e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c 69 ....}................//.Initiali
2200 7a 65 4f 6e 4c 6f 61 64 20 61 74 74 72 69 62 75 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 zeOnLoad.attribute..............
2220 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f .builder.Append("#if.UNITY_EDITO
2240 52 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 R\n");..............builder.Appe
2260 6e 64 28 22 5b 49 6e 69 74 69 61 6c 69 7a 65 4f 6e 4c 6f 61 64 5d 5c 6e 22 29 3b 0d 0a 20 20 20 nd("[InitializeOnLoad]\n");.....
2280 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 65 6e 64 69 66 5c .........builder.Append("#endif\
22a0 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 74 72 6f 6c 20 6c n");................//.Control.l
22c0 61 79 6f 75 74 20 61 74 74 72 69 62 75 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 ayout.attribute...............bu
22e0 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 ilder.Append("[InputControlLayou
2300 74 28 73 74 61 74 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 22 29 3b 0d 0a 20 20 20 20 20 20 t(stateType.=.typeof(");........
2320 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 73 74 61 74 65 53 74 72 75 63 74 ......builder.Append(stateStruct
2340 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 Name);..............builder.Appe
2360 6e 64 28 22 29 29 5d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 nd("))]\n");................//.C
2380 6c 61 73 73 20 64 65 63 6c 61 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 lass.declaration...............b
23a0 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 70 75 62 6c 69 63 20 63 6c 61 73 73 20 22 29 3b 0d uilder.Append("public.class.");.
23c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 6c 61 73 .............builder.Append(clas
23e0 73 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 sName);..............builder.App
2400 65 6e 64 28 22 20 3a 20 53 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 5c 6e 22 29 3b 0d 0a 20 20 end(".:.SteamController\n");....
2420 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7b 5c 6e 22 29 3b ..........builder.Append("{\n");
2440 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 76 69 63 65 20 6d 61 74 63 68 65 ................//.Device.matche
2460 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 r...............builder.Append("
2480 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 49 6e 70 75 74 44 65 76 69 63 65 4d 61 ....private.static.InputDeviceMa
24a0 74 63 68 65 72 20 64 65 76 69 63 65 4d 61 74 63 68 65 72 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 tcher.deviceMatcher\n");........
24c0 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7b 5c 6e 22 29 3b ......builder.Append("....{\n");
24e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 ..............builder.Append("..
2500 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6e 65 77 20 49 6e 70 75 74 44 65 76 69 ......get.{.return.new.InputDevi
2520 63 65 4d 61 74 63 68 65 72 28 29 2e 57 69 74 68 49 6e 74 65 72 66 61 63 65 28 5c 22 53 74 65 61 ceMatcher().WithInterface(\"Stea
2540 6d 5c 22 29 2e 57 69 74 68 50 72 6f 64 75 63 74 28 5c 22 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 m\").WithProduct(\"");..........
2560 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 6c 61 73 73 4e 61 6d 65 29 3b 0d 0a ....builder.Append(className);..
2580 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 29 3b ............builder.Append("\");
25a0 20 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 .}\n");..............builder.App
25c0 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f end("....}\n");................/
25e0 2f 20 53 74 61 74 69 63 20 63 6f 6e 73 74 72 75 63 74 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 /.Static.constructor............
2600 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 20 20 ...builder.Append('\n');........
2620 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 69 66 20 55 4e 49 54 59 5f ......builder.Append("#if.UNITY_
2640 45 44 49 54 4f 52 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 EDITOR\n");..............builder
2660 2e 41 70 70 65 6e 64 28 22 20 20 20 20 73 74 61 74 69 63 20 22 29 3b 0d 0a 20 20 20 20 20 20 20 .Append("....static.");.........
2680 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 6c 61 73 73 4e 61 6d 65 29 3b 0d .....builder.Append(className);.
26a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 28 29 5c .............builder.Append("()\
26c0 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 n");..............builder.Append
26e0 28 22 20 20 20 20 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 ("....{\n");..............builde
2700 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 r.Append("........InputSystem.Re
2720 67 69 73 74 65 72 4c 61 79 6f 75 74 3c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 gisterLayout<");..............bu
2740 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 6c 61 73 73 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 ilder.Append(className);........
2760 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 3e 28 6d 61 74 63 68 65 73 3a ......builder.Append(">(matches:
2780 20 64 65 76 69 63 65 4d 61 74 63 68 65 72 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 .deviceMatcher);\n");...........
27a0 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 20 ...builder.Append("....}\n");...
27c0 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 65 6e 64 69 ...........builder.Append("#endi
27e0 66 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 75 6e 74 69 6d 65 f\n");................//.Runtime
2800 49 6e 69 74 69 61 6c 69 7a 65 4f 6e 4c 6f 61 64 4d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 InitializeOnLoadMethod..........
2820 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 4e 6f 74 20 72 65 6c 79 69 6e 67 20 6f 6e 20 73 74 61 .....//.NOTE:.Not.relying.on.sta
2840 74 69 63 20 63 74 6f 72 20 68 65 72 65 2e 20 53 65 65 20 69 6c 32 63 70 70 20 62 75 67 20 31 30 tic.ctor.here..See.il2cpp.bug.10
2860 31 34 32 39 33 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 14293...............builder.Appe
2880 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 nd('\n');..............builder.A
28a0 70 70 65 6e 64 28 22 20 20 20 20 5b 52 75 6e 74 69 6d 65 49 6e 69 74 69 61 6c 69 7a 65 4f 6e 4c ppend("....[RuntimeInitializeOnL
28c0 6f 61 64 4d 65 74 68 6f 64 28 6c 6f 61 64 54 79 70 65 3a 20 52 75 6e 74 69 6d 65 49 6e 69 74 69 oadMethod(loadType:.RuntimeIniti
28e0 61 6c 69 7a 65 4c 6f 61 64 54 79 70 65 2e 42 65 66 6f 72 65 53 63 65 6e 65 4c 6f 61 64 29 5d 5c alizeLoadType.BeforeSceneLoad)]\
2900 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 n");..............builder.Append
2920 28 22 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 75 6e 74 69 6d ("....private.static.void.Runtim
2940 65 49 6e 69 74 69 61 6c 69 7a 65 4f 6e 4c 6f 61 64 28 29 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 eInitializeOnLoad()\n");........
2960 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7b 5c 6e 22 29 3b ......builder.Append("....{\n");
2980 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 ..............builder.Append("..
29a0 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 67 69 73 74 65 72 4c 61 79 6f 75 74 ......InputSystem.RegisterLayout
29c0 3c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 <");..............builder.Append
29e0 28 63 6c 61 73 73 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 (className);..............builde
2a00 72 2e 41 70 70 65 6e 64 28 22 3e 28 6d 61 74 63 68 65 73 3a 20 64 65 76 69 63 65 4d 61 74 63 68 r.Append(">(matches:.deviceMatch
2a20 65 72 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 er);\n");..............builder.A
2a40 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ppend("....}\n");...............
2a60 20 2f 2f 20 43 6f 6e 74 72 6f 6c 20 70 72 6f 70 65 72 74 69 65 73 2e 0d 0a 20 20 20 20 20 20 20 .//.Control.properties..........
2a80 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 .....builder.Append('\n');......
2aa0 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 73 65 74 45 6e 74 72 79 20 69 6e ........foreach.(var.setEntry.in
2ac0 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .actions)..............{........
2ae0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 ..........var.setEntryProperties
2b00 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 .=.(Dictionary<string,.object>)s
2b20 65 74 45 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 etEntry.Value;..................
2b40 20 20 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..//.StickPadGyros..............
2b60 20 20 20 20 20 76 61 72 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 28 44 69 63 74 69 6f .....var.stickPadGyros.=.(Dictio
2b80 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f nary<string,.object>)setEntryPro
2ba0 70 65 72 74 69 65 73 5b 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d 0a 20 20 20 20 20 20 perties["StickPadGyro"];........
2bc0 20 20 20 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 ..........foreach.(var.entry.in.
2be0 73 74 69 63 6b 50 61 64 47 79 72 6f 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 stickPadGyros)..................
2c00 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 74 72 79 {......................var.entry
2c20 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c Properties.=.(Dictionary<string,
2c40 20 6f 62 6a 65 63 74 3e 29 65 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 .object>)entry.Value;...........
2c60 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 53 74 69 63 6b 20 3d 20 65 6e 74 72 79 50 72 ...........var.isStick.=.entryPr
2c80 6f 70 65 72 74 69 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 22 69 6e 70 75 74 5f 6d 6f 64 65 operties.ContainsKey("input_mode
2ca0 22 29 20 26 26 20 28 73 74 72 69 6e 67 29 65 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 69 ").&&.(string)entryProperties["i
2cc0 6e 70 75 74 5f 6d 6f 64 65 22 5d 20 3d 3d 20 22 6a 6f 79 73 74 69 63 6b 5f 6d 6f 76 65 22 3b 0d nput_mode"].==."joystick_move";.
2ce0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 .....................builder.App
2d00 65 6e 64 28 22 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 5d 5c 6e 22 29 3b 0d 0a 20 20 end("....[InputControl]\n");....
2d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 ..................builder.Append
2d40 28 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 24 22 20 20 20 (..........................$"...
2d60 20 70 75 62 6c 69 63 20 7b 28 69 73 53 74 69 63 6b 20 3f 20 22 53 74 69 63 6b 43 6f 6e 74 72 6f .public.{(isStick.?."StickContro
2d80 6c 22 20 3a 20 22 56 65 63 74 6f 72 32 43 6f 6e 74 72 6f 6c 22 29 7d 20 7b 43 53 68 61 72 70 43 l".:."Vector2Control")}.{CSharpC
2da0 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e odeHelpers.MakeIdentifier(entry.
2dc0 4b 65 79 29 7d 20 7b 7b 20 67 65 74 3b 20 70 72 6f 74 65 63 74 65 64 20 73 65 74 3b 20 7d 7d 5c Key)}.{{.get;.protected.set;.}}\
2de0 6e 22 29 3b 0d 0a 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 n");..................}.........
2e00 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 75 74 74 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 ...........//.Buttons...........
2e20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 74 74 6f 6e 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 ........var.buttons.=.(Dictionar
2e40 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 y<string,.object>)setEntryProper
2e60 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ties["Button"];.................
2e80 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 62 75 74 74 6f 6e 73 29 0d .foreach.(var.entry.in.buttons).
2ea0 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 20 .................{..............
2ec0 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 5b 49 6e 70 ........builder.Append("....[Inp
2ee0 75 74 43 6f 6e 74 72 6f 6c 5d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 utControl]\n");.................
2f00 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 .....builder.Append(............
2f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 20 20 20 20 70 75 62 6c 69 63 20 42 75 74 74 6f ..............$"....public.Butto
2f40 6e 43 6f 6e 74 72 6f 6c 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 nControl.{CSharpCodeHelpers.Make
2f60 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 20 7b 7b 20 67 65 74 3b 20 70 Identifier(entry.Key)}.{{.get;.p
2f80 72 6f 74 65 63 74 65 64 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 rotected.set;.}}\n");...........
2fa0 20 20 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 2f 2f 20 41 .......}....................//.A
2fc0 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nalogTriggers...................
2fe0 76 61 72 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 var.analogTriggers.=.(Dictionary
3000 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 <string,.object>)setEntryPropert
3020 69 65 73 5b 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 ies["AnalogTrigger"];...........
3040 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 61 6e 61 .......foreach.(var.entry.in.ana
3060 6c 6f 67 54 72 69 67 67 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d logTriggers)..................{.
3080 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 .....................builder.App
30a0 65 6e 64 28 22 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 5d 5c 6e 22 29 3b 0d 0a 20 20 end("....[InputControl]\n");....
30c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 ..................builder.Append
30e0 28 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 24 22 20 20 20 (..........................$"...
3100 20 70 75 62 6c 69 63 20 41 78 69 73 43 6f 6e 74 72 6f 6c 20 7b 43 53 68 61 72 70 43 6f 64 65 48 .public.AxisControl.{CSharpCodeH
3120 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 elpers.MakeIdentifier(entry.Key)
3140 7d 20 7b 7b 20 67 65 74 3b 20 70 72 6f 74 65 63 74 65 64 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b }.{{.get;.protected.set;.}}\n");
3160 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 ..................}.............
3180 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 69 73 68 53 65 74 75 70 .}................//.FinishSetup
31a0 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 .method...............builder.Ap
31c0 70 65 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 pend('\n');..............builder
31e0 2e 41 70 70 65 6e 64 28 22 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 .Append("....protected.override.
3200 76 6f 69 64 20 46 69 6e 69 73 68 53 65 74 75 70 28 29 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 void.FinishSetup()\n");.........
3220 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7b 5c 6e 22 29 3b 0d .....builder.Append("....{\n");.
3240 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 .............builder.Append("...
3260 20 20 20 20 20 62 61 73 65 2e 46 69 6e 69 73 68 53 65 74 75 70 28 29 3b 5c 6e 22 29 3b 0d 0a 20 .....base.FinishSetup();\n");...
3280 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 73 65 74 45 6e 74 72 79 ...........foreach.(var.setEntry
32a0 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .in.actions)..............{.....
32c0 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 .............var.setEntryPropert
32e0 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 ies.=.(Dictionary<string,.object
3300 3e 29 73 65 74 45 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 >)setEntry.Value;...............
3320 20 20 20 20 20 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 20 20 20 20 .....//.StickPadGyros...........
3340 20 20 20 20 20 20 20 20 76 61 72 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 28 44 69 63 ........var.stickPadGyros.=.(Dic
3360 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 tionary<string,.object>)setEntry
3380 50 72 6f 70 65 72 74 69 65 73 5b 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d 0a 20 20 20 Properties["StickPadGyro"];.....
33a0 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 65 6e 74 72 79 20 .............foreach.(var.entry.
33c0 69 6e 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 in.stickPadGyros)...............
33e0 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 76 61 72 20 65 6e ...{......................var.en
3400 74 72 79 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 tryProperties.=.(Dictionary<stri
3420 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 65 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 ng,.object>)entry.Value;........
3440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 53 74 69 63 6b 20 3d 20 65 6e 74 72 ..............var.isStick.=.entr
3460 79 50 72 6f 70 65 72 74 69 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 22 69 6e 70 75 74 5f 6d yProperties.ContainsKey("input_m
3480 6f 64 65 22 29 20 26 26 20 28 73 74 72 69 6e 67 29 65 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 ode").&&.(string)entryProperties
34a0 5b 22 69 6e 70 75 74 5f 6d 6f 64 65 22 5d 20 3d 3d 20 22 6a 6f 79 73 74 69 63 6b 5f 6d 6f 76 65 ["input_mode"].==."joystick_move
34c0 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e ";......................builder.
34e0 41 70 70 65 6e 64 28 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 Append(.........................
3500 20 24 22 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 .$"........{CSharpCodeHelpers.Ma
3520 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 20 3d 20 47 65 74 43 68 keIdentifier(entry.Key)}.=.GetCh
3540 69 6c 64 43 6f 6e 74 72 6f 6c 3c 7b 28 69 73 53 74 69 63 6b 20 3f 20 22 53 74 69 63 6b 43 6f 6e ildControl<{(isStick.?."StickCon
3560 74 72 6f 6c 22 20 3a 20 22 56 65 63 74 6f 72 32 43 6f 6e 74 72 6f 6c 22 29 7d 3e 28 5c 22 7b 65 trol".:."Vector2Control")}>(\"{e
3580 6e 74 72 79 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ntry.Key}\");\n");..............
35a0 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 2f 2f 20 42 75 74 74 ....}....................//.Butt
35c0 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 74 74 6f 6e ons...................var.button
35e0 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 s.=.(Dictionary<string,.object>)
3600 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 5d 3b 0d 0a 20 setEntryProperties["Button"];...
3620 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 65 6e 74 72 ...............foreach.(var.entr
3640 79 20 69 6e 20 62 75 74 74 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b y.in.buttons)..................{
3660 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 ......................builder.Ap
3680 70 65 6e 64 28 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 24 pend(..........................$
36a0 22 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 "........{CSharpCodeHelpers.Make
36c0 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 20 3d 20 47 65 74 43 68 69 6c Identifier(entry.Key)}.=.GetChil
36e0 64 43 6f 6e 74 72 6f 6c 3c 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 3e 28 5c 22 7b 65 6e 74 72 79 dControl<ButtonControl>(\"{entry
3700 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Key}\");\n");..................
3720 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 61 6c 6f 67 54 72 }....................//.AnalogTr
3740 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 6e 61 iggers...................var.ana
3760 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 logTriggers.=.(Dictionary<string
3780 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 41 6e ,.object>)setEntryProperties["An
37a0 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 alogTrigger"];..................
37c0 66 6f 72 65 61 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 61 6e 61 6c 6f 67 54 72 69 67 foreach.(var.entry.in.analogTrig
37e0 67 65 72 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 20 20 gers)..................{........
3800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 ..............builder.Append(...
3820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 20 20 20 20 20 20 20 .......................$".......
3840 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 .{CSharpCodeHelpers.MakeIdentifi
3860 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 20 3d 20 47 65 74 43 68 69 6c 64 43 6f 6e 74 72 6f 6c er(entry.Key)}.=.GetChildControl
3880 3c 41 78 69 73 43 6f 6e 74 72 6f 6c 3e 28 5c 22 7b 65 6e 74 72 79 2e 4b 65 79 7d 5c 22 29 3b 5c <AxisControl>(\"{entry.Key}\");\
38a0 6e 22 29 3b 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 n");..................}.........
38c0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 .....}..............builder.Appe
38e0 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f nd("....}\n");................//
3900 20 52 65 73 6f 6c 76 65 53 74 65 61 6d 41 63 74 69 6f 6e 73 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 .ResolveSteamActions.method.....
3920 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 6e 27 29 3b 0d ..........builder.Append('\n');.
3940 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 .............builder.Append("...
3960 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 52 65 73 6f 6c 76 65 .protected.override.void.Resolve
3980 53 74 65 61 6d 41 63 74 69 6f 6e 73 28 49 53 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 41 50 49 SteamActions(ISteamControllerAPI
39a0 20 61 70 69 29 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e .api)\n");..............builder.
39c0 41 70 70 65 6e 64 28 22 20 20 20 20 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Append("....{\n");..............
39e0 66 6f 72 65 61 63 68 20 28 76 61 72 20 73 65 74 45 6e 74 72 79 20 69 6e 20 61 63 74 69 6f 6e 73 foreach.(var.setEntry.in.actions
3a00 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 )..............{................
3a20 20 20 76 61 72 20 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 ..var.setEntryProperties.=.(Dict
3a40 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 2e ionary<string,.object>)setEntry.
3a60 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 Value;....................//.Set
3a80 20 68 61 6e 64 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 .handle...................builde
3aa0 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 r.Append(......................$
3ac0 22 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 "........{CSharpCodeHelpers.Make
3ae0 49 64 65 6e 74 69 66 69 65 72 28 73 65 74 45 6e 74 72 79 2e 4b 65 79 29 7d 53 65 74 48 61 6e 64 Identifier(setEntry.Key)}SetHand
3b00 6c 65 20 3d 20 61 70 69 2e 47 65 74 41 63 74 69 6f 6e 53 65 74 48 61 6e 64 6c 65 28 5c 22 7b 73 le.=.api.GetActionSetHandle(\"{s
3b20 65 74 45 6e 74 72 79 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 etEntry.Key}\");\n");...........
3b40 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 .........//.StickPadGyros.......
3b60 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 ............var.stickPadGyros.=.
3b80 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 (Dictionary<string,.object>)setE
3ba0 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d ntryProperties["StickPadGyro"];.
3bc0 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 65 6e .................foreach.(var.en
3be0 74 72 79 20 69 6e 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 29 0d 0a 20 20 20 20 20 20 20 20 20 try.in.stickPadGyros)...........
3c00 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 20 20 62 75 .......{......................bu
3c20 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ilder.Append(...................
3c40 20 20 20 20 20 20 20 24 22 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 .......$"........{CSharpCodeHelp
3c60 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 ers.MakeIdentifier(entry.Key)}Ha
3c80 6e 64 6c 65 20 3d 20 61 70 69 2e 47 65 74 41 6e 61 6c 6f 67 41 63 74 69 6f 6e 48 61 6e 64 6c 65 ndle.=.api.GetAnalogActionHandle
3ca0 28 5c 22 7b 65 6e 74 72 79 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 (\"{entry.Key}\");\n");.........
3cc0 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 20 20 20 20 20 2f 2f .........}....................//
3ce0 20 42 75 74 74 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 .Buttons...................var.b
3d00 75 74 74 6f 6e 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a uttons.=.(Dictionary<string,.obj
3d20 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 ect>)setEntryProperties["Button"
3d40 5d 3b 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 28 76 61 72 ];..................foreach.(var
3d60 20 65 6e 74 72 79 20 69 6e 20 62 75 74 74 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .entry.in.buttons)..............
3d80 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 62 75 69 6c 64 ....{......................build
3da0 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 er.Append(......................
3dc0 20 20 20 20 24 22 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 ....$"........{CSharpCodeHelpers
3de0 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 6e 64 6c .MakeIdentifier(entry.Key)}Handl
3e00 65 20 3d 20 61 70 69 2e 47 65 74 44 69 67 69 74 61 6c 41 63 74 69 6f 6e 48 61 6e 64 6c 65 28 5c e.=.api.GetDigitalActionHandle(\
3e20 22 7b 65 6e 74 72 79 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 "{entry.Key}\");\n");...........
3e40 20 20 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 2f 2f 20 41 .......}....................//.A
3e60 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nalogTriggers...................
3e80 76 61 72 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 var.analogTriggers.=.(Dictionary
3ea0 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 <string,.object>)setEntryPropert
3ec0 69 65 73 5b 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 ies["AnalogTrigger"];...........
3ee0 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 61 6e 61 .......foreach.(var.entry.in.ana
3f00 6c 6f 67 54 72 69 67 67 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d logTriggers)..................{.
3f20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 .....................builder.App
3f40 65 6e 64 28 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 24 22 end(..........................$"
3f60 20 20 20 20 20 20 20 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 ........{CSharpCodeHelpers.MakeI
3f80 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 6e 64 6c 65 20 3d 20 61 70 dentifier(entry.Key)}Handle.=.ap
3fa0 69 2e 47 65 74 41 6e 61 6c 6f 67 41 63 74 69 6f 6e 48 61 6e 64 6c 65 28 5c 22 7b 65 6e 74 72 79 i.GetAnalogActionHandle(\"{entry
3fc0 2e 4b 65 79 7d 5c 22 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Key}\");\n");..................
3fe0 7d 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 20 20 20 20 62 75 }..............}..............bu
4000 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 ilder.Append("....}\n");........
4020 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 63 61 63 68 65 20 66 69 65 6c 64 73 2e 0d ........//.Handle.cache.fields..
4040 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 6e 27 .............builder.Append('\n'
4060 29 3b 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 73 65 74 );..............foreach.(var.set
4080 45 6e 74 72 79 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b Entry.in.actions)..............{
40a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 74 45 6e 74 72 79 50 72 ..................var.setEntryPr
40c0 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f operties.=.(Dictionary<string,.o
40e0 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 bject>)setEntry.Value;..........
4100 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 68 61 6e 64 6c 65 2e 0d 0a 20 20 20 20 20 20 ..........//.Set.handle.........
4120 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 ..........builder.Append(.......
4140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 20 20 20 20 70 75 62 6c 69 63 20 53 74 65 61 ...............$"....public.Stea
4160 6d 48 61 6e 64 6c 65 3c 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 3e 20 7b 43 53 68 61 72 70 43 mHandle<InputActionMap>.{CSharpC
4180 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 73 65 74 45 6e 74 odeHelpers.MakeIdentifier(setEnt
41a0 72 79 2e 4b 65 79 29 7d 53 65 74 48 61 6e 64 6c 65 20 7b 7b 20 67 65 74 3b 20 70 72 69 76 61 74 ry.Key)}SetHandle.{{.get;.privat
41c0 65 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.set;.}}\n");..................
41e0 20 20 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..//.StickPadGyros..............
4200 20 20 20 20 20 76 61 72 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 28 44 69 63 74 69 6f .....var.stickPadGyros.=.(Dictio
4220 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f nary<string,.object>)setEntryPro
4240 70 65 72 74 69 65 73 5b 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d 0a 20 20 20 20 20 20 perties["StickPadGyro"];........
4260 20 20 20 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 ..........foreach.(var.entry.in.
4280 73 74 69 63 6b 50 61 64 47 79 72 6f 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 stickPadGyros)..................
42a0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 {......................builder.A
42c0 70 70 65 6e 64 28 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 ppend(..........................
42e0 24 22 20 20 20 20 70 75 62 6c 69 63 20 53 74 65 61 6d 48 61 6e 64 6c 65 3c 49 6e 70 75 74 41 63 $"....public.SteamHandle<InputAc
4300 74 69 6f 6e 3e 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 tion>.{CSharpCodeHelpers.MakeIde
4320 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 6e 64 6c 65 20 7b 7b 20 67 65 74 ntifier(entry.Key)}Handle.{{.get
4340 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 ;.private.set;.}}\n");..........
4360 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 20 20 20 20 2f 2f 20 ........}....................//.
4380 42 75 74 74 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 Buttons...................var.bu
43a0 74 74 6f 6e 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 ttons.=.(Dictionary<string,.obje
43c0 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 5d ct>)setEntryProperties["Button"]
43e0 3b 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 28 76 61 72 20 ;..................foreach.(var.
4400 65 6e 74 72 79 20 69 6e 20 62 75 74 74 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 entry.in.buttons)...............
4420 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 62 75 69 6c 64 65 ...{......................builde
4440 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r.Append(.......................
4460 20 20 20 24 22 20 20 20 20 70 75 62 6c 69 63 20 53 74 65 61 6d 48 61 6e 64 6c 65 3c 49 6e 70 75 ...$"....public.SteamHandle<Inpu
4480 74 41 63 74 69 6f 6e 3e 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 tAction>.{CSharpCodeHelpers.Make
44a0 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 6e 64 6c 65 20 7b 7b 20 Identifier(entry.Key)}Handle.{{.
44c0 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 get;.private.set;.}}\n");.......
44e0 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 20 20 20 20 20 ...........}....................
4500 2f 2f 20 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 //.AnalogTriggers...............
4520 20 20 20 20 76 61 72 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 6f ....var.analogTriggers.=.(Dictio
4540 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f nary<string,.object>)setEntryPro
4560 70 65 72 74 69 65 73 5b 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 20 perties["AnalogTrigger"];.......
4580 20 20 20 20 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 ...........foreach.(var.entry.in
45a0 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .analogTriggers)................
45c0 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 62 75 69 6c 64 65 72 ..{......................builder
45e0 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Append(........................
4600 20 20 24 22 20 20 20 20 70 75 62 6c 69 63 20 53 74 65 61 6d 48 61 6e 64 6c 65 3c 49 6e 70 75 74 ..$"....public.SteamHandle<Input
4620 41 63 74 69 6f 6e 3e 20 7b 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 Action>.{CSharpCodeHelpers.MakeI
4640 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 7d 48 61 6e 64 6c 65 20 7b 7b 20 67 dentifier(entry.Key)}Handle.{{.g
4660 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 et;.private.set;.}}\n");........
4680 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 0d 0a 20 20 ..........}..............}......
46a0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 74 65 61 6d 41 63 74 69 6f 6e 53 65 74 73 20 70 72 6f ..........//.steamActionSets.pro
46c0 70 65 72 74 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 perty...............builder.Appe
46e0 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 nd('\n');..............builder.A
4700 70 70 65 6e 64 28 22 20 20 20 20 70 72 69 76 61 74 65 20 53 74 65 61 6d 41 63 74 69 6f 6e 53 65 ppend("....private.SteamActionSe
4720 74 49 6e 66 6f 5b 5d 20 6d 5f 41 63 74 69 6f 6e 53 65 74 73 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 tInfo[].m_ActionSets;\n");......
4740 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 70 75 62 6c ........builder.Append("....publ
4760 69 63 20 6f 76 65 72 72 69 64 65 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 53 74 65 61 6d 41 ic.override.ReadOnlyArray<SteamA
4780 63 74 69 6f 6e 53 65 74 49 6e 66 6f 3e 20 73 74 65 61 6d 41 63 74 69 6f 6e 53 65 74 73 5c 6e 22 ctionSetInfo>.steamActionSets\n"
47a0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 );..............builder.Append("
47c0 20 20 20 20 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e ....{\n");..............builder.
47e0 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 67 65 74 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 Append("........get\n");........
4800 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 7b 5c ......builder.Append("........{\
4820 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 n");..............builder.Append
4840 28 22 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 53 65 74 73 20 3d ("............if.(m_ActionSets.=
4860 3d 20 6e 75 6c 6c 29 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 =.null)\n");..............builde
4880 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 r.Append("................m_Acti
48a0 6f 6e 53 65 74 73 20 3d 20 6e 65 77 5b 5d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 onSets.=.new[]\n");.............
48c0 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .builder.Append("...............
48e0 20 7b 5c 6e 22 29 3b 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 .{\n");..............foreach.(va
4900 72 20 73 65 74 45 6e 74 72 79 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 r.setEntry.in.actions)..........
4920 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 ....{..................builder.A
4940 70 70 65 6e 64 28 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 0d 0a 20 20 20 20 20 20 20 20 20 20 ppend(string.Format(............
4960 20 20 20 20 20 20 20 20 20 20 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e .........."....................n
4980 65 77 20 53 74 65 61 6d 41 63 74 69 6f 6e 53 65 74 49 6e 66 6f 20 7b 7b 20 6e 61 6d 65 20 3d 20 ew.SteamActionSetInfo.{{.name.=.
49a0 5c 22 7b 30 7d 5c 22 2c 20 68 61 6e 64 6c 65 20 3d 20 7b 31 7d 53 65 74 48 61 6e 64 6c 65 20 7d \"{0}\",.handle.=.{1}SetHandle.}
49c0 7d 2c 5c 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 45 },\n",......................setE
49e0 6e 74 72 79 2e 4b 65 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 ntry.Key,......................C
4a00 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 SharpCodeHelpers.MakeIdentifier(
4a20 73 65 74 45 6e 74 72 79 2e 4b 65 79 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d setEntry.Key)));..............}.
4a40 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 .............builder.Append("...
4a60 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .............};\n");............
4a80 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 20 20 20 20 72 65 ..builder.Append("............re
4aa0 74 75 72 6e 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 53 74 65 61 6d 41 63 74 69 turn.new.ReadOnlyArray<SteamActi
4ac0 6f 6e 53 65 74 49 6e 66 6f 3e 28 6d 5f 41 63 74 69 6f 6e 53 65 74 73 29 3b 5c 6e 22 29 3b 0d 0a onSetInfo>(m_ActionSets);\n");..
4ae0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 ............builder.Append("....
4b00 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e ....}\n");..............builder.
4b20 41 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 Append("....}\n");..............
4b40 20 20 2f 2f 20 55 70 64 61 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..//.Update.method..............
4b60 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 6e 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 .builder.Append('\n');..........
4b80 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 70 72 6f 74 65 63 74 65 ....builder.Append("....protecte
4ba0 64 20 6f 76 65 72 72 69 64 65 20 75 6e 73 61 66 65 20 76 6f 69 64 20 55 70 64 61 74 65 28 49 53 d.override.unsafe.void.Update(IS
4bc0 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 41 50 49 20 61 70 69 29 5c 6e 22 29 3b 0d 0a 20 20 20 teamControllerAPI.api)\n");.....
4be0 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7b 5c 6e .........builder.Append("....{\n
4c00 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 ");..............builder.Append(
4c20 24 22 20 20 20 20 20 20 20 20 7b 73 74 61 74 65 53 74 72 75 63 74 4e 61 6d 65 7d 20 73 74 61 74 $"........{stateStructName}.stat
4c40 65 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 75 72 72 65 6e 74 e;\n");..............var.current
4c60 42 75 74 74 6f 6e 42 69 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 ButtonBit.=.0;..............fore
4c80 61 63 68 20 28 76 61 72 20 73 65 74 45 6e 74 72 79 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 ach.(var.setEntry.in.actions)...
4ca0 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 76 61 ...........{..................va
4cc0 72 20 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 r.setEntryProperties.=.(Dictiona
4ce0 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 2e 56 61 6c 75 ry<string,.object>)setEntry.Valu
4d00 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 69 63 6b 50 61 e;....................//.StickPa
4d20 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 69 dGyros...................var.sti
4d40 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c ckPadGyros.=.(Dictionary<string,
4d60 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 53 74 69 .object>)setEntryProperties["Sti
4d80 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f ckPadGyro"];..................fo
4da0 72 65 61 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 73 74 69 63 6b 50 61 64 47 79 72 6f reach.(var.entry.in.stickPadGyro
4dc0 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 20 20 20 20 20 s)..................{...........
4de0 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 73 74 72 69 6e 67 ...........builder.Append(string
4e00 2e 46 6f 72 6d 61 74 28 22 20 20 20 20 20 20 20 20 73 74 61 74 65 2e 7b 30 7d 20 3d 20 61 70 69 .Format("........state.{0}.=.api
4e20 2e 47 65 74 41 6e 61 6c 6f 67 41 63 74 69 6f 6e 44 61 74 61 28 73 74 65 61 6d 43 6f 6e 74 72 6f .GetAnalogActionData(steamContro
4e40 6c 6c 65 72 48 61 6e 64 6c 65 2c 20 7b 30 7d 48 61 6e 64 6c 65 29 2e 70 6f 73 69 74 69 6f 6e 3b llerHandle,.{0}Handle).position;
4e60 5c 6e 22 2c 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 43 53 \n",..........................CS
4e80 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 harpCodeHelpers.MakeIdentifier(e
4ea0 6e 74 72 79 2e 4b 65 79 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ntry.Key)));..................}.
4ec0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 75 74 74 6f 6e 73 2e 0d 0a ...................//.Buttons...
4ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 74 74 6f 6e 73 20 3d 20 28 44 ................var.buttons.=.(D
4f00 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 ictionary<string,.object>)setEnt
4f20 72 79 50 72 6f 70 65 72 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 5d 3b 0d 0a 20 20 20 20 20 20 20 ryProperties["Button"];.........
4f40 20 20 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 62 .........foreach.(var.entry.in.b
4f60 75 74 74 6f 6e 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 uttons)..................{......
4f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d ................builder.Append(.
4fa0 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 24 22 20 20 20 20 20 .........................$".....
4fc0 20 20 20 69 66 20 28 61 70 69 2e 47 65 74 44 69 67 69 74 61 6c 41 63 74 69 6f 6e 44 61 74 61 28 ...if.(api.GetDigitalActionData(
4fe0 73 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 48 61 6e 64 6c 65 2c 20 7b 43 53 68 61 72 70 43 6f steamControllerHandle,.{CSharpCo
5000 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b deHelpers.MakeIdentifier(entry.K
5020 65 79 29 7d 48 61 6e 64 6c 65 29 2e 70 72 65 73 73 65 64 29 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 ey)}Handle).pressed)\n");.......
5040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 24 22 ...............builder.Append($"
5060 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 74 65 2e 62 75 74 74 6f 6e 73 5b 7b 63 75 72 72 65 ............state.buttons[{curre
5080 6e 74 42 75 74 74 6f 6e 42 69 74 20 2f 20 38 7d 5d 20 7c 3d 20 7b 63 75 72 72 65 6e 74 42 75 74 ntButtonBit./.8}].|=.{currentBut
50a0 74 6f 6e 42 69 74 20 25 20 38 7d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 tonBit.%.8};\n");...............
50c0 20 20 20 20 20 20 20 2b 2b 63 75 72 72 65 6e 74 42 75 74 74 6f 6e 42 69 74 3b 0d 0a 20 20 20 20 .......++currentButtonBit;......
50e0 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 20 20 20 20 ............}...................
5100 20 2f 2f 20 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .//.AnalogTriggers..............
5120 20 20 20 20 20 76 61 72 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 .....var.analogTriggers.=.(Dicti
5140 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 onary<string,.object>)setEntryPr
5160 6f 70 65 72 74 69 65 73 5b 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 operties["AnalogTrigger"];......
5180 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 65 6e 74 72 79 20 69 ............foreach.(var.entry.i
51a0 6e 20 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 n.analogTriggers)...............
51c0 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 62 75 69 6c 64 65 ...{......................builde
51e0 72 2e 41 70 70 65 6e 64 28 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 22 20 20 20 20 20 20 20 20 r.Append(string.Format("........
5200 73 74 61 74 65 2e 7b 30 7d 20 3d 20 61 70 69 2e 47 65 74 41 6e 61 6c 6f 67 41 63 74 69 6f 6e 44 state.{0}.=.api.GetAnalogActionD
5220 61 74 61 28 73 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 48 61 6e 64 6c 65 2c 20 7b 30 7d 48 61 ata(steamControllerHandle,.{0}Ha
5240 6e 64 6c 65 29 2e 70 6f 73 69 74 69 6f 6e 2e 78 3b 5c 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 ndle).position.x;\n",...........
5260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 ...............CSharpCodeHelpers
5280 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e 74 72 79 2e 4b 65 79 29 29 29 3b 0d 0a 20 .MakeIdentifier(entry.Key)));...
52a0 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 20 7d 0d ...............}..............}.
52c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 .............builder.Append("...
52e0 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 75 65 75 65 53 74 61 74 65 45 76 65 6e 74 .....InputSystem.QueueStateEvent
5300 28 74 68 69 73 2c 20 73 74 61 74 65 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 (this,.state);\n");.............
5320 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 .builder.Append("....}\n");.....
5340 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7d 5c 6e 22 29 ...........builder.Append("}\n")
5360 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e ;................if.(!string.IsN
5380 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 ullOrEmpty(namespaceName))......
53a0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7d 5c 6e 22 ............builder.Append("}\n"
53c0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 61 74 65 20 73 74 72 75 63 );................//.State.struc
53e0 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 t...............builder.Append("
5400 70 75 62 6c 69 63 20 75 6e 73 61 66 65 20 73 74 72 75 63 74 20 22 29 3b 0d 0a 20 20 20 20 20 20 public.unsafe.struct.");........
5420 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 73 74 61 74 65 53 74 72 75 63 74 ......builder.Append(stateStruct
5440 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 Name);..............builder.Appe
5460 6e 64 28 22 20 3a 20 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 6e 66 6f 5c 6e 22 29 3b 0d nd(".:.IInputStateTypeInfo\n");.
5480 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7b 5c 6e .............builder.Append("{\n
54a0 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 ");..............builder.Append(
54c0 22 20 20 20 20 70 75 62 6c 69 63 20 46 6f 75 72 43 43 20 66 6f 72 6d 61 74 5c 6e 22 29 3b 0d 0a "....public.FourCC.format\n");..
54e0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 ............builder.Append("....
5500 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 {\n");..............builder.Appe
5520 6e 64 28 22 20 20 20 20 20 20 20 20 67 65 74 20 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 nd("........get.{\n");..........
5540 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 68 61 6e 64 6c 65 20 63 6c 61 73 73 20 6e 61 6d 65 73 ....////TODO:.handle.class.names
5560 20 74 68 61 74 20 61 72 65 20 73 68 6f 72 74 65 72 20 74 68 61 6e 20 34 20 63 68 61 72 61 63 74 .that.are.shorter.than.4.charact
5580 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 75 70 70 65 72 ers..............////TODO:.upper
55a0 63 61 73 65 20 63 68 61 72 61 63 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 case.characters..............bui
55c0 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 lder.Append(..................$"
55e0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 46 6f 75 72 43 43 28 27 7b ............return.new.FourCC('{
5600 63 6c 61 73 73 4e 61 6d 65 5b 30 5d 7d 27 2c 20 27 7b 63 6c 61 73 73 4e 61 6d 65 5b 31 5d 7d 27 className[0]}',.'{className[1]}'
5620 2c 20 27 7b 63 6c 61 73 73 4e 61 6d 65 5b 32 5d 7d 27 2c 20 27 7b 63 6c 61 73 73 4e 61 6d 65 5b ,.'{className[2]}',.'{className[
5640 33 5d 7d 27 29 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 3]}');\n");..............builder
5660 2e 41 70 70 65 6e 64 28 22 20 20 20 20 20 20 20 20 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 .Append("........}\n");.........
5680 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 7d 5c 6e 22 29 3b 0d .....builder.Append("....}\n");.
56a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 6e 22 .............builder.Append("\n"
56c0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 6f 74 61 6c 42 75 74 74 6f 6e 43 );..............var.totalButtonC
56e0 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 ount.=.0;..............foreach.(
5700 76 61 72 20 73 65 74 45 6e 74 72 79 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 var.setEntry.in.actions)........
5720 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 73 65 74 ......{..................var.set
5740 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 EntryProperties.=.(Dictionary<st
5760 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 0d ring,.object>)setEntry.Value;...
5780 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 75 74 74 6f 6e 73 2e 0d 0a 20 20 .................//.Buttons.....
57a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 74 74 6f 6e 73 20 3d 20 28 44 69 63 ..............var.buttons.=.(Dic
57c0 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 tionary<string,.object>)setEntry
57e0 50 72 6f 70 65 72 74 69 65 73 5b 22 42 75 74 74 6f 6e 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 Properties["Button"];...........
5800 20 20 20 20 20 20 20 76 61 72 20 62 75 74 74 6f 6e 43 6f 75 6e 74 20 3d 20 62 75 74 74 6f 6e 73 .......var.buttonCount.=.buttons
5820 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 75 74 .Count;..................if.(but
5840 74 6f 6e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b tonCount.>.0)..................{
5860 0d 0a 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 ......................foreach.(v
5880 61 72 20 65 6e 74 72 79 20 69 6e 20 62 75 74 74 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ar.entry.in.buttons)............
58a0 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 20 ..........{.....................
58c0 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 .....builder.Append(............
58e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 20 20 20 20 5b 49 6e 70 75 74 43 6f ..................$"....[InputCo
5900 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 5c 22 7b 65 6e 74 72 79 2e 4b 65 79 7d 5c 22 2c 20 6c 61 ntrol(name.=.\"{entry.Key}\",.la
5920 79 6f 75 74 20 3d 20 5c 22 42 75 74 74 6f 6e 5c 22 2c 20 62 69 74 20 3d 20 7b 74 6f 74 61 6c 42 yout.=.\"Button\",.bit.=.{totalB
5940 75 74 74 6f 6e 43 6f 75 6e 74 7d 29 5d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 uttonCount})]\n");..............
5960 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 74 6f 74 61 6c 42 75 74 74 6f 6e 43 6f 75 6e 74 3b 0d ............++totalButtonCount;.
5980 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 20 20 20 20 20 .....................}..........
59a0 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 20 20 20 20 20 20 ........}..............}........
59c0 20 20 20 20 20 20 69 66 20 28 74 6f 74 61 6c 42 75 74 74 6f 6e 43 6f 75 6e 74 20 3e 20 30 29 0d ......if.(totalButtonCount.>.0).
59e0 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 20 20 .............{..................
5a00 76 61 72 20 62 79 74 65 43 6f 75 6e 74 20 3d 20 28 74 6f 74 61 6c 42 75 74 74 6f 6e 43 6f 75 6e var.byteCount.=.(totalButtonCoun
5a20 74 20 2b 20 37 29 20 2f 20 38 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 t.+.7)./.8;..................bui
5a40 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 20 20 20 20 70 75 62 6c 69 63 20 66 69 78 65 64 20 62 79 lder.Append("....public.fixed.by
5a60 74 65 20 62 75 74 74 6f 6e 73 5b 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 te.buttons[");..................
5a80 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 62 79 74 65 43 6f 75 6e 74 2e 54 6f 53 74 72 69 6e builder.Append(byteCount.ToStrin
5aa0 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 g());..................builder.A
5ac0 70 70 65 6e 64 28 22 5d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 ppend("];\n");..............}...
5ae0 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 73 65 74 45 6e 74 72 79 ...........foreach.(var.setEntry
5b00 20 69 6e 20 61 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .in.actions)..............{.....
5b20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 .............var.setEntryPropert
5b40 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 ies.=.(Dictionary<string,.object
5b60 3e 29 73 65 74 45 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 >)setEntry.Value;...............
5b80 20 20 20 20 20 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 2e 0d 0a 20 20 20 20 20 20 20 20 .....//.StickPadGyros...........
5ba0 20 20 20 20 20 20 20 20 76 61 72 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 20 3d 20 28 44 69 63 ........var.stickPadGyros.=.(Dic
5bc0 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 tionary<string,.object>)setEntry
5be0 50 72 6f 70 65 72 74 69 65 73 5b 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 5d 3b 0d 0a 20 20 20 Properties["StickPadGyro"];.....
5c00 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 65 6e 74 72 79 20 .............foreach.(var.entry.
5c20 69 6e 20 73 74 69 63 6b 50 61 64 47 79 72 6f 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 in.stickPadGyros)...............
5c40 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 76 61 72 20 65 6e ...{......................var.en
5c60 74 72 79 50 72 6f 70 65 72 74 69 65 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 tryProperties.=.(Dictionary<stri
5c80 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 65 6e 74 72 79 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 ng,.object>)entry.Value;........
5ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 53 74 69 63 6b 20 3d 20 65 6e 74 72 ..............var.isStick.=.entr
5cc0 79 50 72 6f 70 65 72 74 69 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 22 69 6e 70 75 74 5f 6d yProperties.ContainsKey("input_m
5ce0 6f 64 65 22 29 20 26 26 20 28 73 74 72 69 6e 67 29 65 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 ode").&&.(string)entryProperties
5d00 5b 22 69 6e 70 75 74 5f 6d 6f 64 65 22 5d 20 3d 3d 20 22 6a 6f 79 73 74 69 63 6b 5f 6d 6f 76 65 ["input_mode"].==."joystick_move
5d20 22 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 62 75 69 6c 64 65 ";........................builde
5d40 72 2e 41 70 70 65 6e 64 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r.Append(.......................
5d60 20 20 20 24 22 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 5c 22 ...$"....[InputControl(name.=.\"
5d80 7b 65 6e 74 72 79 2e 4b 65 79 7d 5c 22 2c 20 6c 61 79 6f 75 74 20 3d 20 5c 22 7b 28 69 73 53 74 {entry.Key}\",.layout.=.\"{(isSt
5da0 69 63 6b 20 3f 20 22 53 74 69 63 6b 22 20 3a 20 22 56 65 63 74 6f 72 32 22 29 7d 5c 22 29 5d 5c ick.?."Stick".:."Vector2")}\")]\
5dc0 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 n");......................builde
5de0 72 2e 41 70 70 65 6e 64 28 24 22 20 20 20 20 70 75 62 6c 69 63 20 56 65 63 74 6f 72 32 20 7b 43 r.Append($"....public.Vector2.{C
5e00 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 SharpCodeHelpers.MakeIdentifier(
5e20 65 6e 74 72 79 2e 4b 65 79 29 7d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 entry.Key)};\n");...............
5e40 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 41 6e 61 6c 6f ...}....................//.Analo
5e60 67 54 72 69 67 67 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 gTriggers...................var.
5e80 61 6e 61 6c 6f 67 54 72 69 67 67 65 72 73 20 3d 20 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 analogTriggers.=.(Dictionary<str
5ea0 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 29 73 65 74 45 6e 74 72 79 50 72 6f 70 65 72 74 69 65 73 5b ing,.object>)setEntryProperties[
5ec0 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 "AnalogTrigger"];...............
5ee0 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 61 6e 61 6c 6f 67 54 ...foreach.(var.entry.in.analogT
5f00 72 69 67 67 65 72 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 riggers)..................{.....
5f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 .................builder.Append(
5f40 24 22 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 5c 22 7b 65 6e $"....[InputControl(name.=.\"{en
5f60 74 72 79 2e 4b 65 79 7d 5c 22 2c 20 6c 61 79 6f 75 74 20 3d 20 5c 22 41 78 69 73 5c 22 29 5d 5c try.Key}\",.layout.=.\"Axis\")]\
5f80 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 n");......................builde
5fa0 72 2e 41 70 70 65 6e 64 28 24 22 20 20 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 7b 43 53 68 r.Append($"....public.float.{CSh
5fc0 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 65 6e arpCodeHelpers.MakeIdentifier(en
5fe0 74 72 79 2e 4b 65 79 29 7d 3b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 try.Key)};\n");.................
6000 20 7d 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 20 20 20 20 62 .}..............}..............b
6020 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 uilder.Append("}\n");...........
6040 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 23 65 6e 64 69 66 5c 6e 22 29 3b .....builder.Append("#endif\n");
6060 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 ................return.builder.T
6080 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 oString();..........}...........
60a0 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 43 6f 6e 76 .///.<summary>..........///.Conv
60c0 65 72 74 20 61 6e 20 2e 69 6e 70 75 74 61 63 74 69 6f 6e 73 20 61 73 73 65 74 20 74 6f 20 53 74 ert.an..inputactions.asset.to.St
60e0 65 61 6d 20 56 44 46 20 66 6f 72 6d 61 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 eam.VDF.format...........///.</s
6100 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 ummary>..........///.<param.name
6120 3d 22 61 73 73 65 74 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ="asset"></param>..........///.<
6140 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6c 6f 63 61 6c 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 param.name="locale"></param>....
6160 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 69 6e 20 53 ......///.<returns>A.string.in.S
6180 74 65 61 6d 20 56 44 46 20 66 6f 72 6d 61 74 20 64 65 73 63 72 69 62 69 6e 67 20 22 49 6e 20 47 team.VDF.format.describing."In.G
61a0 61 6d 65 20 41 63 74 69 6f 6e 73 22 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 ame.Actions".corresponding.to.th
61c0 65 20 61 63 74 69 6f 6e 73 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d e.actions.in..........///.<param
61e0 72 65 66 20 6e 61 6d 65 3d 22 61 73 73 65 74 22 2f 3e 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 ref.name="asset"/>.</returns>...
6200 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 .......///.<exception.cref="Argu
6220 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d mentNullException"><paramref.nam
6240 65 3d 22 61 73 73 65 74 22 2f 3e 20 69 73 20 6e 75 6c 6c 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e e="asset"/>.is.null.</exception>
6260 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 43 ..........public.static.string.C
6280 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 6f 6e 73 54 6f 53 74 65 61 6d 49 47 41 28 49 6e 70 onvertInputActionsToSteamIGA(Inp
62a0 75 74 41 63 74 69 6f 6e 41 73 73 65 74 20 61 73 73 65 74 2c 20 73 74 72 69 6e 67 20 6c 6f 63 61 utActionAsset.asset,.string.loca
62c0 6c 65 20 3d 20 22 65 6e 67 6c 69 73 68 22 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 le.=."english")..........{......
62e0 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 ........if.(asset.==.null)......
6300 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 65 6e 74 4e 75 ............throw.new.ArgumentNu
6320 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 65 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 llException("asset");...........
6340 20 20 20 72 65 74 75 72 6e 20 43 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 6f 6e 73 54 6f 53 ...return.ConvertInputActionsToS
6360 74 65 61 6d 49 47 41 28 61 73 73 65 74 2e 61 63 74 69 6f 6e 4d 61 70 73 2c 20 6c 6f 63 61 6c 65 teamIGA(asset.actionMaps,.locale
6380 3a 20 6c 6f 63 61 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 :.locale);..........}...........
63a0 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 43 6f 6e 76 65 72 74 49 6e 70 .public.static.string.ConvertInp
63c0 75 74 41 63 74 69 6f 6e 73 54 6f 53 74 65 61 6d 49 47 41 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c utActionsToSteamIGA(IEnumerable<
63e0 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 3e 20 61 63 74 69 6f 6e 4d 61 70 73 2c 20 73 74 72 69 InputActionMap>.actionMaps,.stri
6400 6e 67 20 6c 6f 63 61 6c 65 20 3d 20 22 65 6e 67 6c 69 73 68 22 29 0d 0a 20 20 20 20 20 20 20 20 ng.locale.=."english")..........
6420 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 4d 61 70 73 20 3d 3d {..............if.(actionMaps.==
6440 20 6e 75 6c 6c 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 .null)..................throw.ne
6460 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 63 74 69 6f 6e 4d w.ArgumentNullException("actionM
6480 61 70 73 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 6f 63 61 6c 69 aps");................var.locali
64a0 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 zationStrings.=.new.Dictionary<s
64c0 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 tring,.string>();...............
64e0 20 76 61 72 20 62 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 .var.builder.=.new.StringBuilder
6500 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 ();..............builder.Append(
6520 22 5c 22 49 6e 20 47 61 6d 65 20 41 63 74 69 6f 6e 73 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 "\"In.Game.Actions\"\n");.......
6540 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 7b 5c 6e 22 29 3b 0d 0a 0d .......builder.Append("{\n");...
6560 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 .............//.Add.actions.....
6580 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 22 61 63 ..........builder.Append("\t\"ac
65a0 74 69 6f 6e 73 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 tions\"\n");..............builde
65c0 72 2e 41 70 70 65 6e 64 28 22 5c 74 7b 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 r.Append("\t{\n");..............
65e0 20 20 2f 2f 20 41 64 64 20 65 61 63 68 20 61 63 74 69 6f 6e 20 6d 61 70 2e 0d 0a 20 20 20 20 20 ..//.Add.each.action.map........
6600 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 69 6e .......foreach.(var.actionMap.in
6620 20 61 63 74 69 6f 6e 4d 61 70 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .actionMaps)..............{.....
6640 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 4e 61 6d 65 20 3d .............var.actionMapName.=
6660 20 61 63 74 69 6f 6e 4d 61 70 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .actionMap.name;................
6680 20 20 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 49 64 65 6e 74 69 66 69 65 72 20 3d 20 43 53 68 61 ..var.actionMapIdentifier.=.CSha
66a0 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 61 63 74 rpCodeHelpers.MakeIdentifier(act
66c0 69 6f 6e 4d 61 70 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ionMapName);....................
66e0 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 22 22 29 3b 0d 0a 20 20 20 20 20 builder.Append("\t\t\"");.......
6700 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 61 63 74 69 6f 6e ...........builder.Append(action
6720 4d 61 70 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 MapName);..................build
6740 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 er.Append("\"\n");..............
6760 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 7b 5c 6e 22 29 3b 0d 0a ....builder.Append("\t\t{\n");..
6780 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 69 74 6c 65 2e 0d 0a 20 20 20 ..................//.Title......
67a0 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c .............builder.Append("\t\
67c0 74 5c 74 5c 22 74 69 74 6c 65 5c 22 5c 74 5c 22 23 53 65 74 5f 22 29 3b 0d 0a 20 20 20 20 20 20 t\t\"title\"\t\"#Set_");........
67e0 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 61 63 74 69 6f 6e 4d ..........builder.Append(actionM
6800 61 70 49 64 65 6e 74 69 66 69 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 apIdentifier);..................
6820 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 builder.Append("\"\n");.........
6840 20 20 20 20 20 20 20 20 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 5b 22 53 65 .........localizationStrings["Se
6860 74 5f 22 20 2b 20 61 63 74 69 6f 6e 4d 61 70 49 64 65 6e 74 69 66 69 65 72 5d 20 3d 20 61 63 74 t_".+.actionMapIdentifier].=.act
6880 69 6f 6e 4d 61 70 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ionMapName;..................../
68a0 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 /.StickPadGyro.actions..........
68c0 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c .........builder.Append("\t\t\t\
68e0 22 53 74 69 63 6b 50 61 64 47 79 72 6f 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 "StickPadGyro\"\n");............
6900 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 7b 5c 6e 22 ......builder.Append("\t\t\t{\n"
6920 29 3b 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 28 76 61 72 );..................foreach.(var
6940 20 61 63 74 69 6f 6e 20 69 6e 20 61 63 74 69 6f 6e 4d 61 70 2e 61 63 74 69 6f 6e 73 2e 57 68 65 .action.in.actionMap.actions.Whe
6960 72 65 28 78 20 3d 3e 20 47 65 74 53 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 49 6e 70 75 74 54 re(x.=>.GetSteamControllerInputT
6980 79 70 65 28 78 29 20 3d 3d 20 22 53 74 69 63 6b 50 61 64 47 79 72 6f 22 29 29 0d 0a 20 20 20 20 ype(x).==."StickPadGyro"))......
69a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 ................ConvertInputActi
69c0 6f 6e 54 6f 56 44 46 28 61 63 74 69 6f 6e 2c 20 62 75 69 6c 64 65 72 2c 20 6c 6f 63 61 6c 69 7a onToVDF(action,.builder,.localiz
69e0 61 74 69 6f 6e 53 74 72 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ationStrings);..................
6a00 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 7d 5c 6e 22 29 3b 0d 0a 0d 0a builder.Append("\t\t\t}\n");....
6a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 ................//.AnalogTrigger
6a40 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 .actions...................build
6a60 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 er.Append("\t\t\t\"AnalogTrigger
6a80 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 \"\n");..................builder
6aa0 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 .Append("\t\t\t{\n");...........
6ac0 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 63 74 69 6f 6e 20 69 6e 20 61 63 .......foreach.(var.action.in.ac
6ae0 74 69 6f 6e 4d 61 70 2e 61 63 74 69 6f 6e 73 2e 57 68 65 72 65 28 78 20 3d 3e 20 47 65 74 53 74 tionMap.actions.Where(x.=>.GetSt
6b00 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 49 6e 70 75 74 54 79 70 65 28 78 29 20 3d 3d 20 22 41 6e eamControllerInputType(x).==."An
6b20 61 6c 6f 67 54 72 69 67 67 65 72 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 alogTrigger"))..................
6b40 20 20 20 20 43 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 6f 6e 54 6f 56 44 46 28 61 63 74 69 ....ConvertInputActionToVDF(acti
6b60 6f 6e 2c 20 62 75 69 6c 64 65 72 2c 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 on,.builder,.localizationStrings
6b80 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 );..................builder.Appe
6ba0 6e 64 28 22 5c 74 5c 74 5c 74 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nd("\t\t\t}\n");................
6bc0 20 20 20 20 2f 2f 20 42 75 74 74 6f 6e 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 ....//.Button.actions...........
6be0 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c 22 ........builder.Append("\t\t\t\"
6c00 42 75 74 74 6f 6e 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 Button\"\n");..................b
6c20 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 7b 5c 6e 22 29 3b 0d 0a 20 20 20 uilder.Append("\t\t\t{\n");.....
6c40 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 61 63 74 69 6f 6e .............foreach.(var.action
6c60 20 69 6e 20 61 63 74 69 6f 6e 4d 61 70 2e 61 63 74 69 6f 6e 73 2e 57 68 65 72 65 28 78 20 3d 3e .in.actionMap.actions.Where(x.=>
6c80 20 47 65 74 53 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 49 6e 70 75 74 54 79 70 65 28 78 29 20 .GetSteamControllerInputType(x).
6ca0 3d 3d 20 22 42 75 74 74 6f 6e 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ==."Button"))...................
6cc0 20 20 20 43 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 6f 6e 54 6f 56 44 46 28 61 63 74 69 6f ...ConvertInputActionToVDF(actio
6ce0 6e 2c 20 62 75 69 6c 64 65 72 2c 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 29 n,.builder,.localizationStrings)
6d00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e ;..................builder.Appen
6d20 64 28 22 5c 74 5c 74 5c 74 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 d("\t\t\t}\n");.................
6d40 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 7d 5c 6e 22 29 3b 0d 0a 20 ...builder.Append("\t\t}\n");...
6d60 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 20 62 75 69 6c ...........}................buil
6d80 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 der.Append("\t}\n");............
6da0 20 20 20 20 2f 2f 20 41 64 64 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 ....//.Add.localizations........
6dc0 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 22 6c 6f 63 61 6c .......builder.Append("\t\"local
6de0 69 7a 61 74 69 6f 6e 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c ization\"\n");..............buil
6e00 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 der.Append("\t{\n");............
6e20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 22 22 29 3b 0d 0a 20 20 20 ..builder.Append("\t\t\"");.....
6e40 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 6c 6f 63 61 6c 65 29 3b .........builder.Append(locale);
6e60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 ..............builder.Append("\"
6e80 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e \n");..............builder.Appen
6ea0 64 28 22 5c 74 5c 74 7b 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 d("\t\t{\n");..............forea
6ec0 63 68 20 28 76 61 72 20 65 6e 74 72 79 20 69 6e 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 ch.(var.entry.in.localizationStr
6ee0 69 6e 67 73 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 ings)..............{............
6f00 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c 22 22 29 ......builder.Append("\t\t\t\"")
6f20 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e ;..................builder.Appen
6f40 64 28 65 6e 74 72 79 2e 4b 65 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 d(entry.Key);..................b
6f60 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 74 5c 22 22 29 3b 0d 0a 20 20 20 20 20 20 uilder.Append("\"\t\"");........
6f80 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 65 6e 74 72 79 2e 56 ..........builder.Append(entry.V
6fa0 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e alue);..................builder.
6fc0 41 70 70 65 6e 64 28 22 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a Append("\"\n");..............}..
6fe0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 ............builder.Append("\t\t
7000 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 }\n");..............builder.Appe
7020 6e 64 28 22 5c 74 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c nd("\t}\n");................buil
7040 64 65 72 2e 41 70 70 65 6e 64 28 22 7d 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 der.Append("}\n");..............
7060 20 20 72 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 ..return.builder.ToString();....
7080 20 20 20 20 20 20 7d 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 ......}............private.stati
70a0 63 20 76 6f 69 64 20 43 6f 6e 76 65 72 74 49 6e 70 75 74 41 63 74 69 6f 6e 54 6f 56 44 46 28 49 c.void.ConvertInputActionToVDF(I
70c0 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 nputAction.action,.StringBuilder
70e0 20 62 75 69 6c 64 65 72 2c 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 .builder,.Dictionary<string,.str
7100 69 6e 67 3e 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 29 0d 0a 20 20 20 20 20 ing>.localizationStrings).......
7120 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 ...{..............builder.Append
7140 28 22 5c 74 5c 74 5c 74 5c 74 5c 22 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 ("\t\t\t\t\"");..............bui
7160 6c 64 65 72 2e 41 70 70 65 6e 64 28 61 63 74 69 6f 6e 2e 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 lder.Append(action.name);.......
7180 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 70 49 64 65 6e 74 69 66 69 65 72 20 3d 20 43 53 68 .........var.mapIdentifier.=.CSh
71a0 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 61 63 arpCodeHelpers.MakeIdentifier(ac
71c0 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 tion.actionMap.name);...........
71e0 20 20 20 76 61 72 20 61 63 74 69 6f 6e 49 64 65 6e 74 69 66 69 65 72 20 3d 20 43 53 68 61 72 70 ...var.actionIdentifier.=.CSharp
7200 43 6f 64 65 48 65 6c 70 65 72 73 2e 4d 61 6b 65 49 64 65 6e 74 69 66 69 65 72 28 61 63 74 69 6f CodeHelpers.MakeIdentifier(actio
7220 6e 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 69 74 6c 65 49 n.name);..............var.titleI
7240 64 20 3d 20 22 41 63 74 69 6f 6e 5f 22 20 2b 20 6d 61 70 49 64 65 6e 74 69 66 69 65 72 20 2b 20 d.=."Action_".+.mapIdentifier.+.
7260 22 5f 22 20 2b 20 61 63 74 69 6f 6e 49 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 20 20 20 20 "_".+.actionIdentifier;.........
7280 20 20 20 20 20 6c 6f 63 61 6c 69 7a 61 74 69 6f 6e 53 74 72 69 6e 67 73 5b 74 69 74 6c 65 49 64 .....localizationStrings[titleId
72a0 5d 20 3d 20 61 63 74 69 6f 6e 2e 6e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ].=.action.name;................
72c0 2f 2f 20 53 74 69 63 6b 50 61 64 47 79 72 6f 73 20 61 72 65 20 6f 62 6a 65 63 74 73 2e 20 45 76 //.StickPadGyros.are.objects..Ev
72e0 65 72 79 74 68 69 6e 67 20 65 6c 73 65 20 69 73 20 6a 75 73 74 20 73 74 72 69 6e 67 73 2e 0d 0a erything.else.is.just.strings...
7300 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 70 75 74 54 79 70 65 20 3d 20 47 65 74 53 ............var.inputType.=.GetS
7320 74 65 61 6d 43 6f 6e 74 72 6f 6c 6c 65 72 49 6e 70 75 74 54 79 70 65 28 61 63 74 69 6f 6e 29 3b teamControllerInputType(action);
7340 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 70 75 74 54 79 70 65 20 3d 3d 20 22 ..............if.(inputType.==."
7360 53 74 69 63 6b 50 61 64 47 79 72 6f 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 StickPadGyro")..............{...
7380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c ...............builder.Append("\
73a0 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e "\n");..................builder.
73c0 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c 74 7b 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 Append("\t\t\t\t{\n");..........
73e0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 69 74 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..........//.Title..............
7400 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 5c 74 5c 74 5c 74 5c .....builder.Append("\t\t\t\t\t\
7420 22 74 69 74 6c 65 5c 22 5c 74 5c 22 23 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 "title\"\t\"#");................
7440 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 74 69 74 6c 65 49 64 29 3b 0d 0a 20 20 20 20 ..builder.Append(titleId);......
7460 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 6e ............builder.Append("\"\n
7480 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 63 69 64 65 ");....................//.Decide
74a0 20 6f 6e 20 22 69 6e 70 75 74 5f 6d 6f 64 65 22 2e 20 41 73 73 75 6d 65 20 22 61 62 73 6f 6c 75 .on."input_mode"..Assume."absolu
74c0 74 65 5f 6d 6f 75 73 65 22 20 62 79 20 64 65 66 61 75 6c 74 20 61 6e 64 20 74 61 6b 65 0d 0a 20 te_mouse".by.default.and.take...
74e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 6e 79 74 68 69 6e 67 20 62 75 69 6c 74 ...............//.anything.built
7500 20 6f 6e 20 53 74 69 63 6b 43 6f 6e 74 72 6f 6c 20 61 73 20 22 6a 6f 79 73 74 69 63 6b 5f 6d 6f .on.StickControl.as."joystick_mo
7520 76 65 22 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 70 75 74 4d ve"...................var.inputM
7540 6f 64 65 20 3d 20 22 61 62 73 6f 6c 75 74 65 5f 6d 6f 75 73 65 22 3b 0d 0a 20 20 20 20 20 20 20 ode.=."absolute_mouse";.........
7560 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 45 64 69 74 6f .........var.controlType.=.Edito
7580 72 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 54 72 79 47 65 74 4c rInputControlLayoutCache.TryGetL
75a0 61 79 6f 75 74 28 61 63 74 69 6f 6e 2e 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 ayout(action.expectedControlType
75c0 29 2e 74 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 ).type;..................if.(typ
75e0 65 6f 66 28 53 74 69 63 6b 43 6f 6e 74 72 6f 6c 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 eof(StickControl).IsAssignableFr
7600 6f 6d 28 63 6f 6e 74 72 6f 6c 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 om(controlType))................
7620 20 20 20 20 20 20 69 6e 70 75 74 4d 6f 64 65 20 3d 20 22 6a 6f 79 73 74 69 63 6b 5f 6d 6f 76 65 ......inputMode.=."joystick_move
7640 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 ";..................builder.Appe
7660 6e 64 28 22 5c 74 5c 74 5c 74 5c 74 5c 74 5c 22 69 6e 70 75 74 5f 6d 6f 64 65 5c 22 5c 74 5c 22 nd("\t\t\t\t\t\"input_mode\"\t\"
7680 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 ");..................builder.App
76a0 65 6e 64 28 69 6e 70 75 74 4d 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 end(inputMode);.................
76c0 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 .builder.Append("\"\n");........
76e0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 74 5c 74 ............builder.Append("\t\t
7700 5c 74 5c 74 7d 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 \t\t}\n");..............}.......
7720 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .......else..............{......
7740 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 74 ............builder.Append("\"\t
7760 5c 22 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 \"");..................builder.A
7780 70 70 65 6e 64 28 74 69 74 6c 65 49 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ppend(titleId);.................
77a0 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 22 5c 22 5c 6e 22 29 3b 0d 0a 20 20 20 20 20 20 .builder.Append("\"\n");........
77c0 20 20 20 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 ......}..........}............pu
77e0 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 53 74 65 61 6d 43 6f 6e 74 72 blic.static.string.GetSteamContr
7800 6f 6c 6c 65 72 49 6e 70 75 74 54 79 70 65 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f ollerInputType(InputAction.actio
7820 6e 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 61 n)..........{..............if.(a
7840 63 74 69 6f 6e 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 ction.==.null)..................
7860 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 throw.new.ArgumentNullException(
7880 22 61 63 74 69 6f 6e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b "action");................//.Mak
78a0 65 20 73 75 72 65 20 77 65 20 68 61 76 65 20 61 6e 20 65 78 70 65 63 74 65 64 20 63 6f 6e 74 72 e.sure.we.have.an.expected.contr
78c0 6f 6c 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 65 78 70 65 ol.layout...............var.expe
78e0 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 3d 20 61 63 74 69 6f 6e 2e 65 78 70 65 63 ctedControlLayout.=.action.expec
7900 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 tedControlType;..............if.
7920 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 65 78 70 65 63 74 65 64 43 6f (string.IsNullOrEmpty(expectedCo
7940 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 ntrolLayout))..................t
7960 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 22 43 61 6e hrow.new.ArgumentException($"Can
7980 6e 6f 74 20 64 65 74 65 72 6d 69 6e 65 20 53 74 65 61 6d 20 69 6e 70 75 74 20 74 79 70 65 20 66 not.determine.Steam.input.type.f
79a0 6f 72 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 20 74 68 61 74 20 68 61 73 20 6e 6f or.action.'{action}'.that.has.no
79c0 20 61 73 73 6f 63 69 61 74 65 64 20 65 78 70 65 63 74 65 64 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 .associated.expected.control.lay
79e0 6f 75 74 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 6f out",......................nameo
7a00 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 f(action));................//.Tr
7a20 79 20 74 6f 20 66 65 74 63 68 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 y.to.fetch.the.layout...........
7a40 20 20 20 20 76 61 72 20 6c 61 79 6f 75 74 20 3d 20 45 64 69 74 6f 72 49 6e 70 75 74 43 6f 6e 74 ....var.layout.=.EditorInputCont
7a60 72 6f 6c 4c 61 79 6f 75 74 43 61 63 68 65 2e 54 72 79 47 65 74 4c 61 79 6f 75 74 28 65 78 70 65 rolLayoutCache.TryGetLayout(expe
7a80 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ctedControlLayout);.............
7aa0 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 20 20 20 20 20 20 .if.(layout.==.null)............
7ac0 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 65 70 74 69 6f ......throw.new.ArgumentExceptio
7ae0 6e 28 24 22 43 61 6e 6e 6f 74 20 64 65 74 65 72 6d 69 6e 65 20 53 74 65 61 6d 20 69 6e 70 75 74 n($"Cannot.determine.Steam.input
7b00 20 74 79 70 65 20 66 6f 72 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 3b 20 63 61 6e .type.for.action.'{action}';.can
7b20 6e 6f 74 20 66 69 6e 64 20 6c 61 79 6f 75 74 20 27 7b 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f not.find.layout.'{expectedContro
7b40 6c 4c 61 79 6f 75 74 7d 27 22 2c 20 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a lLayout}'",.nameof(action));....
7b60 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 70 20 6f 75 72 20 73 75 70 70 6f 72 74 65 64 ............//.Map.our.supported
7b80 20 63 6f 6e 74 72 6f 6c 20 74 79 70 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 .control.types...............var
7ba0 20 63 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 6c 61 79 6f 75 74 2e 74 79 70 65 3b 0d 0a 20 20 20 .controlType.=.layout.type;.....
7bc0 20 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 6f 66 28 42 75 74 74 6f 6e 43 6f 6e 74 72 6f .........if.(typeof(ButtonContro
7be0 6c 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 63 6f 6e 74 72 6f 6c 54 79 70 65 29 l).IsAssignableFrom(controlType)
7c00 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 22 42 75 74 74 6f )..................return."Butto
7c20 6e 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 6f 66 28 49 6e 70 75 n";..............if.(typeof(Inpu
7c40 74 43 6f 6e 74 72 6f 6c 3c 66 6c 6f 61 74 3e 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f tControl<float>).IsAssignableFro
7c60 6d 28 63 6f 6e 74 72 6f 6c 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 m(controlType)).................
7c80 20 72 65 74 75 72 6e 20 22 41 6e 61 6c 6f 67 54 72 69 67 67 65 72 22 3b 0d 0a 20 20 20 20 20 20 .return."AnalogTrigger";........
7ca0 20 20 20 20 20 20 69 66 20 28 74 79 70 65 6f 66 28 56 65 63 74 6f 72 32 43 6f 6e 74 72 6f 6c 29 ......if.(typeof(Vector2Control)
7cc0 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 63 6f 6e 74 72 6f 6c 54 79 70 65 29 29 0d .IsAssignableFrom(controlType)).
7ce0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 53 74 69 63 6b 50 61 .................return."StickPa
7d00 64 47 79 72 6f 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 72 79 74 dGyro";................//.Everyt
7d20 68 69 6e 67 20 65 6c 73 65 20 74 68 72 6f 77 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 hing.else.throws...............t
7d40 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 22 43 61 6e hrow.new.ArgumentException($"Can
7d60 6e 6f 74 20 64 65 74 65 72 6d 69 6e 65 20 53 74 65 61 6d 20 69 6e 70 75 74 20 74 79 70 65 20 66 not.determine.Steam.input.type.f
7d80 6f 72 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 3b 20 6c 61 79 6f 75 74 20 27 7b 65 or.action.'{action}';.layout.'{e
7da0 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 7d 27 20 77 69 74 68 20 63 6f 6e 74 xpectedControlLayout}'.with.cont
7dc0 72 6f 6c 20 74 79 70 65 20 27 7b 20 63 6f 6e 74 72 6f 6c 54 79 70 65 2e 4e 61 6d 65 7d 27 20 68 rol.type.'{.controlType.Name}'.h
7de0 61 73 20 6e 6f 20 6b 6e 6f 77 6e 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 69 6e 20 74 68 as.no.known.representation.in.th
7e00 65 20 53 74 65 61 6d 20 63 6f 6e 74 72 6f 6c 6c 65 72 20 41 50 49 22 2c 20 6e 61 6d 65 6f 66 28 e.Steam.controller.API",.nameof(
7e20 61 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 action));..........}............
7e40 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c public.static.Dictionary<string,
7e60 20 6f 62 6a 65 63 74 3e 20 50 61 72 73 65 56 44 46 28 73 74 72 69 6e 67 20 76 64 66 29 0d 0a 20 .object>.ParseVDF(string.vdf)...
7e80 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 20 70 61 72 73 65 72 .......{..............var.parser
7ea0 20 3d 20 6e 65 77 20 56 44 46 50 61 72 73 65 72 28 76 64 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 .=.new.VDFParser(vdf);..........
7ec0 20 20 20 20 72 65 74 75 72 6e 20 70 61 72 73 65 72 2e 50 61 72 73 65 28 29 3b 0d 0a 20 20 20 20 ....return.parser.Parse();......
7ee0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 75 63 74 20 ....}............private.struct.
7f00 56 44 46 50 61 72 73 65 72 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 VDFParser..........{............
7f20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 76 64 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ..public.string.vdf;............
7f40 20 20 70 75 62 6c 69 63 20 69 6e 74 20 6c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ..public.int.length;............
7f60 20 20 70 75 62 6c 69 63 20 69 6e 74 20 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 ..public.int.position;..........
7f80 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 44 46 50 61 72 73 65 72 28 73 74 72 69 6e 67 20 76 64 ......public.VDFParser(string.vd
7fa0 66 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 f)..............{...............
7fc0 20 20 20 74 68 69 73 2e 76 64 66 20 3d 20 76 64 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...this.vdf.=.vdf;..............
7fe0 20 20 20 20 6c 65 6e 67 74 68 20 3d 20 76 64 66 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 ....length.=.vdf.Length;........
8000 20 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 ..........position.=.0;.........
8020 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 69 63 .....}................public.Dic
8040 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 20 50 61 72 73 65 28 29 0d tionary<string,.object>.Parse().
8060 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 20 20 .............{..................
8080 76 61 72 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 var.result.=.new.Dictionary<stri
80a0 6e 67 2c 20 6f 62 6a 65 63 74 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng,.object>();..................
80c0 50 61 72 73 65 4b 65 79 56 61 6c 75 65 50 61 69 72 28 72 65 73 75 6c 74 29 3b 0d 0a 20 20 20 20 ParseKeyValuePair(result);......
80e0 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 ............SkipWhitespace();...
8100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 ...............if.(position.<.le
8120 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 ngth)......................throw
8140 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 .new.InvalidOperationException($
8160 22 50 61 72 73 65 20 65 72 72 6f 72 20 61 74 20 7b 70 6f 73 69 74 69 6f 6e 7d 20 69 6e 20 27 7b "Parse.error.at.{position}.in.'{
8180 76 64 66 7d 27 3b 20 6e 6f 74 20 65 78 70 65 63 74 69 6e 67 20 61 6e 79 20 6d 6f 72 65 20 69 6e vdf}';.not.expecting.any.more.in
81a0 70 75 74 22 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 72 put");..................return.r
81c0 65 73 75 6c 74 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 20 esult;..............}...........
81e0 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 50 61 72 73 65 4b 65 79 56 61 6c 75 65 50 .....private.bool.ParseKeyValueP
8200 61 69 72 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 20 72 air(Dictionary<string,.object>.r
8220 65 73 75 6c 74 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 esult)..............{...........
8240 20 20 20 20 20 20 20 76 61 72 20 6b 65 79 20 3d 20 50 61 72 73 65 53 74 72 69 6e 67 28 29 3b 0d .......var.key.=.ParseString();.
8260 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6b 65 79 2e 69 73 45 6d 70 74 79 .................if.(key.isEmpty
8280 29 0d 0a 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 66 61 )......................return.fa
82a0 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 lse;....................SkipWhit
82c0 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 espace();..................if.(p
82e0 6f 73 69 74 69 6f 6e 20 3d 3d 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 osition.==.length)..............
8300 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 ........throw.new.InvalidOperati
8320 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 45 78 70 65 63 74 69 6e 67 20 76 61 6c 75 65 20 6f 72 onException($"Expecting.value.or
8340 20 6f 62 6a 65 63 74 20 61 74 20 70 6f 73 69 74 69 6f 6e 20 7b 70 6f 73 69 74 69 6f 6e 7d 20 69 .object.at.position.{position}.i
8360 6e 20 27 7b 76 64 66 7d 27 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 n.'{vdf}'");....................
8380 76 61 72 20 6e 65 78 74 43 68 61 72 20 3d 20 76 64 66 5b 70 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 var.nextChar.=.vdf[position];...
83a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 78 74 43 68 61 72 20 3d 3d 20 27 ...............if.(nextChar.==.'
83c0 22 27 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 20 20 20 20 "')..................{..........
83e0 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 76 61 6c 75 65 20 3d 20 50 61 72 73 65 53 74 72 ............var.value.=.ParseStr
8400 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 ing();......................resu
8420 6c 74 5b 6b 65 79 2e 54 6f 53 74 72 69 6e 67 28 29 5d 20 3d 20 76 61 6c 75 65 2e 54 6f 53 74 72 lt[key.ToString()].=.value.ToStr
8440 69 6e 67 28 29 3b 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 ing();..................}.......
8460 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6e 65 78 74 43 68 61 72 20 3d 3d 20 ...........else.if.(nextChar.==.
8480 27 7b 27 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 20 20 20 '{')..................{.........
84a0 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 76 61 6c 75 65 20 3d 20 50 61 72 73 65 4f 62 .............var.value.=.ParseOb
84c0 6a 65 63 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 ject();......................res
84e0 75 6c 74 5b 6b 65 79 2e 54 6f 53 74 72 69 6e 67 28 29 5d 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 ult[key.ToString()].=.value;....
8500 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 20 20 20 ..............}.................
8520 20 65 6c 73 65 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 .else..................{........
8540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f ..............throw.new.InvalidO
8560 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 45 78 70 65 63 74 69 6e 67 20 76 61 perationException($"Expecting.va
8580 6c 75 65 20 6f 72 20 6f 62 6a 65 63 74 20 61 74 20 70 6f 73 69 74 69 6f 6e 20 7b 70 6f 73 69 74 lue.or.object.at.position.{posit
85a0 69 6f 6e 7d 20 69 6e 20 27 7b 76 64 66 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ion}.in.'{vdf}'");..............
85c0 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 72 65 74 75 72 6e 20 ....}....................return.
85e0 74 72 75 65 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 20 20 true;..............}............
8600 20 20 20 20 70 72 69 76 61 74 65 20 53 75 62 73 74 72 69 6e 67 20 50 61 72 73 65 53 74 72 69 6e ....private.Substring.ParseStrin
8620 67 28 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 g()..............{..............
8640 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ....SkipWhitespace();...........
8660 20 20 20 20 20 20 20 69 66 20 28 70 6f 73 69 74 69 6f 6e 20 3d 3d 20 6c 65 6e 67 74 68 20 7c 7c .......if.(position.==.length.||
8680 20 76 64 66 5b 70 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 .vdf[position].!=.'"')..........
86a0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 53 75 62 73 74 72 69 6e 67 ............return.new.Substring
86c0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 6f ();....................++positio
86e0 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 72 74 50 6f 73 n;..................var.startPos
8700 20 3d 20 70 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 .=.position;..................wh
8720 69 6c 65 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 6e 67 74 68 20 26 26 20 76 64 66 5b 70 6f ile.(position.<.length.&&.vdf[po
8740 73 69 74 69 6f 6e 5d 20 21 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sition].!=.'"').................
8760 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....++position;................
8780 20 20 76 61 72 20 65 6e 64 50 6f 73 20 3d 20 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 ..var.endPos.=.position;........
87a0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 6e 67 74 ............if.(position.<.lengt
87c0 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 h)......................++positi
87e0 6f 6e 3b 0d 0a 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 65 on;....................return.ne
8800 77 20 53 75 62 73 74 72 69 6e 67 28 76 64 66 2c 20 73 74 61 72 74 50 6f 73 2c 20 65 6e 64 50 6f w.Substring(vdf,.startPos,.endPo
8820 73 20 2d 20 73 74 61 72 74 50 6f 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d s.-.startPos);..............}...
8840 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 44 69 63 74 69 6f 6e 61 72 79 3c .............private.Dictionary<
8860 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 20 50 61 72 73 65 4f 62 6a 65 63 74 28 29 0d 0a 20 string,.object>.ParseObject()...
8880 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 53 6b ...........{..................Sk
88a0 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ipWhitespace();.................
88c0 20 69 66 20 28 70 6f 73 69 74 69 6f 6e 20 3d 3d 20 6c 65 6e 67 74 68 20 7c 7c 20 76 64 66 5b 70 .if.(position.==.length.||.vdf[p
88e0 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 7b 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 osition].!=.'{')................
8900 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ......return.null;..............
8920 20 20 20 20 20 20 76 61 72 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 ......var.result.=.new.Dictionar
8940 79 3c 73 74 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 y<string,.object>();............
8960 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ........++position;.............
8980 20 20 20 20 20 77 68 69 6c 65 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 6e 67 74 68 29 0d 0a .....while.(position.<.length)..
89a0 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 20 20 ................{...............
89c0 20 20 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 4b 65 79 56 61 6c 75 65 50 61 69 72 28 72 65 .......if.(!ParseKeyValuePair(re
89e0 73 75 6c 74 29 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 sult))..........................
8a00 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 break;..................}.......
8a20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a .............SkipWhitespace();..
8a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6f 73 69 74 69 6f 6e 20 3d 3d 20 ................if.(position.==.
8a60 6c 65 6e 67 74 68 20 7c 7c 20 76 64 66 5b 70 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 7d 27 29 0d length.||.vdf[position].!=.'}').
8a80 0a 20 20 20 20 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 49 .....................throw.new.I
8aa0 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 45 78 70 65 63 nvalidOperationException($"Expec
8ac0 74 69 6e 67 20 27 7d 7d 27 20 61 74 20 70 6f 73 69 74 69 6f 6e 20 7b 70 6f 73 69 74 69 6f 6e 7d ting.'}}'.at.position.{position}
8ae0 20 69 6e 20 27 7b 76 64 66 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .in.'{vdf}'");..................
8b00 2b 2b 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 ++position;....................r
8b20 65 74 75 72 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a eturn.result;..............}....
8b40 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 6b 69 70 57 68 69 ............private.void.SkipWhi
8b60 74 65 73 70 61 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 tespace()..............{........
8b80 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 6e 67 ..........while.(position.<.leng
8ba0 74 68 20 26 26 20 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 76 64 66 5b 70 6f 73 69 th.&&.char.IsWhiteSpace(vdf[posi
8bc0 74 69 6f 6e 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 tion]))......................++p
8be0 6f 73 69 74 69 6f 6e 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 osition;..............}.........
8c00 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 4d 65 6e 75 49 74 65 6d 28 22 41 73 73 65 74 73 2f .}............[MenuItem("Assets/
8c20 53 74 65 61 6d 2f 45 78 70 6f 72 74 20 74 6f 20 53 74 65 61 6d 20 49 6e 2d 47 61 6d 65 20 41 63 Steam/Export.to.Steam.In-Game.Ac
8c40 74 69 6f 6e 73 20 46 69 6c 65 2e 2e 2e 22 2c 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 tions.File...",.true)]..........
8c60 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 45 78 70 6f 72 74 43 6f 6e 74 private.static.bool.IsExportCont
8c80 65 78 74 4d 65 6e 75 49 74 65 6d 45 6e 61 62 6c 65 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d extMenuItemEnabled()..........{.
8ca0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 65 6c 65 63 74 69 6f 6e 2e 61 63 .............return.Selection.ac
8cc0 74 69 76 65 4f 62 6a 65 63 74 20 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 3b 0d tiveObject.is.InputActionAsset;.
8ce0 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 4d 65 6e 75 49 74 65 6d 28 .........}............[MenuItem(
8d00 22 41 73 73 65 74 73 2f 53 74 65 61 6d 2f 45 78 70 6f 72 74 20 74 6f 20 53 74 65 61 6d 20 49 6e "Assets/Steam/Export.to.Steam.In
8d20 2d 47 61 6d 65 20 41 63 74 69 6f 6e 73 20 46 69 6c 65 2e 2e 2e 22 29 5d 0d 0a 20 20 20 20 20 20 -Game.Actions.File...")]........
8d40 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 45 78 70 6f 72 74 43 6f 6e 74 ..private.static.void.ExportCont
8d60 65 78 74 4d 65 6e 75 49 74 65 6d 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 extMenuItem()..........{........
8d80 20 20 20 20 20 20 76 61 72 20 73 65 6c 65 63 74 65 64 41 73 73 65 74 20 3d 20 28 49 6e 70 75 74 ......var.selectedAsset.=.(Input
8da0 41 63 74 69 6f 6e 41 73 73 65 74 29 53 65 6c 65 63 74 69 6f 6e 2e 61 63 74 69 76 65 4f 62 6a 65 ActionAsset)Selection.activeObje
8dc0 63 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 ct;................//.Determine.
8de0 64 65 66 61 75 6c 74 20 2e 76 64 66 20 66 69 6c 65 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 default..vdf.file.name..........
8e00 20 20 20 20 20 76 61 72 20 64 65 66 61 75 6c 74 56 44 46 4e 61 6d 65 20 3d 20 22 22 3b 0d 0a 20 .....var.defaultVDFName.=."";...
8e20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 69 72 65 63 74 6f 72 79 20 3d 20 22 22 3b 0d 0a ...........var.directory.=."";..
8e40 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 73 73 65 74 50 61 74 68 20 3d 20 41 73 73 65 ............var.assetPath.=.Asse
8e60 74 44 61 74 61 62 61 73 65 2e 47 65 74 41 73 73 65 74 50 61 74 68 28 73 65 6c 65 63 74 65 64 41 tDatabase.GetAssetPath(selectedA
8e80 73 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e sset);..............if.(!string.
8ea0 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 73 73 65 74 50 61 74 68 29 29 0d 0a 20 20 20 20 20 IsNullOrEmpty(assetPath)).......
8ec0 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 64 65 66 61 75 6c .......{..................defaul
8ee0 74 56 44 46 4e 61 6d 65 20 3d 20 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f tVDFName.=.Path.GetFileNameWitho
8f00 75 74 45 78 74 65 6e 73 69 6f 6e 28 61 73 73 65 74 50 61 74 68 29 20 2b 20 22 2e 76 64 66 22 3b utExtension(assetPath).+.".vdf";
8f20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 72 65 63 74 6f 72 79 20 3d 20 50 61 ..................directory.=.Pa
8f40 74 68 2e 47 65 74 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 61 73 73 65 74 50 61 74 68 29 3b 0d th.GetDirectoryName(assetPath);.
8f60 0a 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 20 2f 2f .............}................//
8f80 20 41 73 6b 20 66 6f 72 20 73 61 76 65 20 6c 6f 63 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 .Ask.for.save.location..........
8fa0 20 20 20 20 20 76 61 72 20 66 69 6c 65 4e 61 6d 65 20 3d 20 45 64 69 74 6f 72 55 74 69 6c 69 74 .....var.fileName.=.EditorUtilit
8fc0 79 2e 53 61 76 65 46 69 6c 65 50 61 6e 65 6c 28 22 45 78 70 6f 72 74 20 53 74 65 61 6d 20 49 6e y.SaveFilePanel("Export.Steam.In
8fe0 2d 47 61 6d 65 20 41 63 74 69 6f 6e 73 20 46 69 6c 65 22 2c 20 64 69 72 65 63 74 6f 72 79 2c 20 -Game.Actions.File",.directory,.
9000 64 65 66 61 75 6c 74 56 44 46 4e 61 6d 65 2c 20 22 76 64 66 22 29 3b 0d 0a 20 20 20 20 20 20 20 defaultVDFName,."vdf");.........
9020 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 66 .....if.(!string.IsNullOrEmpty(f
9040 69 6c 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ileName))..............{........
9060 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 20 3d 20 43 6f 6e 76 65 72 74 49 6e 70 75 ..........var.text.=.ConvertInpu
9080 74 41 63 74 69 6f 6e 73 54 6f 53 74 65 61 6d 49 47 41 28 73 65 6c 65 63 74 65 64 41 73 73 65 74 tActionsToSteamIGA(selectedAsset
90a0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c );..................File.WriteAl
90c0 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 74 65 78 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 lText(fileName,.text);..........
90e0 20 20 20 20 20 20 20 20 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 52 65 66 72 65 73 68 28 29 3b ........AssetDatabase.Refresh();
9100 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 ..............}..........}......
9120 20 20 20 20 20 20 5b 4d 65 6e 75 49 74 65 6d 28 22 41 73 73 65 74 73 2f 53 74 65 61 6d 2f 47 65 ......[MenuItem("Assets/Steam/Ge
9140 6e 65 72 61 74 65 20 55 6e 69 74 79 20 49 6e 70 75 74 20 44 65 76 69 63 65 2e 2e 2e 22 2c 20 74 nerate.Unity.Input.Device...",.t
9160 72 75 65 29 5d 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 62 6f rue)]..........private.static.bo
9180 6f 6c 20 49 73 47 65 6e 65 72 61 74 65 43 6f 6e 74 65 78 74 4d 65 6e 75 49 74 65 6d 45 6e 61 62 ol.IsGenerateContextMenuItemEnab
91a0 6c 65 64 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 2f 2f led()..........{..............//
91c0 20 56 44 46 20 66 69 6c 65 73 20 68 61 76 65 20 6e 6f 20 61 73 73 6f 63 69 61 74 65 64 20 69 6d .VDF.files.have.no.associated.im
91e0 70 6f 72 74 65 72 20 61 6e 64 20 73 6f 20 63 6f 6d 65 20 69 6e 20 61 73 20 44 65 66 61 75 6c 74 porter.and.so.come.in.as.Default
9200 41 73 73 65 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 28 53 65 6c 65 63 Assets...............if.(!(Selec
9220 74 69 6f 6e 2e 61 63 74 69 76 65 4f 62 6a 65 63 74 20 69 73 20 44 65 66 61 75 6c 74 41 73 73 65 tion.activeObject.is.DefaultAsse
9240 74 29 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 66 61 6c 73 t))..................return.fals
9260 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 73 73 65 74 50 61 74 68 20 e;................var.assetPath.
9280 3d 20 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 47 65 74 41 73 73 65 74 50 61 74 68 28 53 65 6c =.AssetDatabase.GetAssetPath(Sel
92a0 65 63 74 69 6f 6e 2e 61 63 74 69 76 65 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ection.activeObject);...........
92c0 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 61 73 73 ...if.(!string.IsNullOrEmpty(ass
92e0 65 74 50 61 74 68 29 20 26 26 20 50 61 74 68 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 61 73 73 etPath).&&.Path.GetExtension(ass
9300 65 74 50 61 74 68 29 20 3d 3d 20 22 2e 76 64 66 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 etPath).==.".vdf")..............
9320 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....return.true;................
9340 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 return.false;..........}........
9360 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 73 75 70 70 6f 72 74 20 73 65 74 74 69 6e 67 20 63 6c ....////TODO:.support.setting.cl
9380 61 73 73 20 61 6e 64 20 6e 61 6d 65 73 70 61 63 65 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 ass.and.namespace.name..........
93a0 5b 4d 65 6e 75 49 74 65 6d 28 22 41 73 73 65 74 73 2f 53 74 65 61 6d 2f 47 65 6e 65 72 61 74 65 [MenuItem("Assets/Steam/Generate
93c0 20 55 6e 69 74 79 20 49 6e 70 75 74 20 44 65 76 69 63 65 2e 2e 2e 22 29 5d 0d 0a 20 20 20 20 20 .Unity.Input.Device...")].......
93e0 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 47 65 6e 65 72 61 74 65 43 ...private.static.void.GenerateC
9400 6f 6e 74 65 78 74 4d 65 6e 75 49 74 65 6d 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ontextMenuItem()..........{.....
9420 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 6c 65 63 74 65 64 41 73 73 65 74 20 3d 20 53 65 6c .........var.selectedAsset.=.Sel
9440 65 63 74 69 6f 6e 2e 61 63 74 69 76 65 4f 62 6a 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ection.activeObject;............
9460 20 20 76 61 72 20 61 73 73 65 74 50 61 74 68 20 3d 20 41 73 73 65 74 44 61 74 61 62 61 73 65 2e ..var.assetPath.=.AssetDatabase.
9480 47 65 74 41 73 73 65 74 50 61 74 68 28 73 65 6c 65 63 74 65 64 41 73 73 65 74 29 3b 0d 0a 20 20 GetAssetPath(selectedAsset);....
94a0 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 6c 6c 4f 72 45 6d 70 ..........if.(string.IsNullOrEmp
94c0 74 79 28 61 73 73 65 74 50 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ty(assetPath))..............{...
94e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 22 43 ...............Debug.LogError("C
9500 61 6e 6e 6f 74 20 64 65 74 65 72 6d 69 6e 65 20 73 6f 75 72 63 65 20 61 73 73 65 74 20 70 61 74 annot.determine.source.asset.pat
9520 68 22 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 3b 0d 0a 20 h");..................return;...
9540 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 20 76 61 72 20 ...........}................var.
9560 64 65 66 61 75 6c 74 43 6c 61 73 73 4e 61 6d 65 20 3d 20 50 61 74 68 2e 47 65 74 46 69 6c 65 4e defaultClassName.=.Path.GetFileN
9580 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 61 73 73 65 74 50 61 74 68 29 3b 0d ameWithoutExtension(assetPath);.
95a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 66 61 75 6c 74 46 69 6c 65 4e 61 6d 65 .............var.defaultFileName
95c0 20 3d 20 64 65 66 61 75 6c 74 43 6c 61 73 73 4e 61 6d 65 20 2b 20 22 2e 63 73 22 3b 0d 0a 20 20 .=.defaultClassName.+.".cs";....
95e0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 66 61 75 6c 74 44 69 72 65 63 74 6f 72 79 20 3d ..........var.defaultDirectory.=
9600 20 50 61 74 68 2e 47 65 74 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 61 73 73 65 74 50 61 74 68 .Path.GetDirectoryName(assetPath
9620 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 73 6b 20 66 6f 72 20 73 61 76 );................//.Ask.for.sav
9640 65 20 6c 6f 63 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 6c e.location...............var.fil
9660 65 4e 61 6d 65 20 3d 20 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 53 61 76 65 46 69 6c 65 50 61 eName.=.EditorUtility.SaveFilePa
9680 6e 65 6c 28 22 47 65 6e 65 72 61 74 65 20 43 23 20 49 6e 70 75 74 20 44 65 76 69 63 65 20 43 6c nel("Generate.C#.Input.Device.Cl
96a0 61 73 73 22 2c 20 64 65 66 61 75 6c 74 44 69 72 65 63 74 6f 72 79 2c 20 64 65 66 61 75 6c 74 46 ass",.defaultDirectory,.defaultF
96c0 69 6c 65 4e 61 6d 65 2c 20 22 63 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ileName,."cs");..............if.
96e0 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 66 69 6c 65 4e 61 6d 65 29 29 (string.IsNullOrEmpty(fileName))
9700 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 ..................return;.......
9720 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 56 44 46 20 66 69 6c 65 20 74 65 78 74 2e 0d .........//.Load.VDF.file.text..
9740 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 76 64 66 20 3d 20 46 69 6c 65 2e 52 65 61 64 .............var.vdf.=.File.Read
9760 41 6c 6c 54 65 78 74 28 61 73 73 65 74 50 61 74 68 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 AllText(assetPath);.............
9780 20 20 20 2f 2f 20 47 65 6e 65 72 61 74 65 20 61 6e 64 20 77 72 69 74 65 20 6f 75 74 70 75 74 2e ...//.Generate.and.write.output.
97a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6c 61 73 73 4e 61 6d 65 20 3d 20 50 61 ..............var.className.=.Pa
97c0 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 66 th.GetFileNameWithoutExtension(f
97e0 69 6c 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 20 ileName);..............var.text.
9800 3d 20 47 65 6e 65 72 61 74 65 49 6e 70 75 74 44 65 76 69 63 65 46 72 6f 6d 53 74 65 61 6d 49 47 =.GenerateInputDeviceFromSteamIG
9820 41 28 76 64 66 2c 20 63 6c 61 73 73 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 A(vdf,.className);..............
9840 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 74 65 78 74 File.WriteAllText(fileName,.text
9860 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 52 65 );..............AssetDatabase.Re
9880 66 72 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d fresh();..........}......}..}...
98a0 0a 23 65 6e 64 69 66 20 2f 2f 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 20 26 26 20 55 4e 49 54 59 .#endif.//.UNITY_EDITOR.&&.UNITY
98c0 5f 45 4e 41 42 4c 45 5f 53 54 45 41 4d 5f 43 4f 4e 54 52 4f 4c 4c 45 52 5f 53 55 50 50 4f 52 54 _ENABLE_STEAM_CONTROLLER_SUPPORT
98e0 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 00 53 74 65 61 ............................Stea
9900 6d 49 47 41 43 6f 6e 76 65 72 74 65 72 00 00 00 24 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e mIGAConverter...$...UnityEngine.
9920 49 6e 70 75 74 53 79 73 74 65 6d 2e 53 74 65 61 6d 2e 45 64 69 74 6f 72 InputSystem.Steam.Editor