summaryrefslogtreecommitdiff
path: root/Library/Artifacts/6e/6eb78afc67751d72a4c18104744ec3be
blob: 3cabbce570bd5dafb7b675a5be922edf0c21524d (plain)
ofshex dumpascii
0000 00 00 0f 81 00 01 1a 14 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ....................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 b4 09 01 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 13 00 00 00 49 6e 70 75 74 41 63 74 69 6f 6e 54 72 65 65 56 69 65 77 00 ............InputActionTreeView.
10a0 20 09 01 00 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 75 73 69 6e 67 20 53 79 73 74 ....#if.UNITY_EDITOR..using.Syst
10c0 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 em;..using.System.Collections.Ge
10e0 6e 65 72 69 63 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 neric;..using.System.Linq;..usin
1100 67 20 53 79 73 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 g.System.Text;..using.UnityEdito
1120 72 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 64 69 74 6f 72 2e 49 4d 47 55 49 2e 43 6f 6e 74 r;..using.UnityEditor.IMGUI.Cont
1140 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 79 rols;..using.UnityEngine.InputSy
1160 73 74 65 6d 2e 4c 61 79 6f 75 74 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 stem.Layouts;..using.UnityEngine
1180 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 20 54 68 .InputSystem.Utilities;....//.Th
11a0 65 20 61 63 74 69 6f 6e 20 74 72 65 65 20 76 69 65 77 20 69 6c 6c 75 73 74 72 61 74 65 73 20 6f e.action.tree.view.illustrates.o
11c0 6e 65 20 6f 66 20 74 68 65 20 77 65 61 6b 6e 65 73 73 65 73 20 6f 66 20 55 6e 69 74 79 27 73 20 ne.of.the.weaknesses.of.Unity's.
11e0 65 64 69 74 69 6e 67 20 6d 6f 64 65 6c 2e 20 57 68 69 6c 65 20 6f 70 65 72 61 74 69 6e 67 20 64 editing.model..While.operating.d
1200 69 72 65 63 74 6c 79 0d 0a 2f 2f 20 6f 6e 20 73 65 72 69 61 6c 69 7a 65 64 20 64 61 74 61 20 64 irectly..//.on.serialized.data.d
1220 6f 65 73 20 68 61 76 65 20 61 20 6e 75 6d 62 65 72 20 6f 66 20 61 64 76 61 6e 74 61 67 65 73 20 oes.have.a.number.of.advantages.
1240 28 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 75 6e 64 6f 20 73 79 73 74 65 6d 20 62 65 69 6e 67 20 (the.built-in.undo.system.being.
1260 6f 6e 65 20 6f 66 20 74 68 65 6d 29 2c 20 6d 61 6b 69 6e 67 20 74 68 65 0d 0a 2f 2f 20 70 65 72 one.of.them),.making.the..//.per
1280 73 69 73 74 65 6e 63 65 20 6d 6f 64 65 6c 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 74 68 65 sistence.model.equivalent.to.the
12a0 20 65 64 69 74 20 6d 6f 64 65 6c 20 64 6f 65 73 6e 27 74 20 77 6f 72 6b 20 77 65 6c 6c 2e 20 53 .edit.model.doesn't.work.well..S
12c0 65 72 69 61 6c 69 7a 65 64 20 64 61 74 61 20 77 69 6c 6c 20 62 65 20 6c 61 69 64 20 6f 75 74 20 erialized.data.will.be.laid.out.
12e0 66 6f 72 20 70 65 72 73 69 73 74 65 6e 63 65 2c 0d 0a 2f 2f 20 6e 6f 74 20 66 6f 72 20 74 68 65 for.persistence,..//.not.for.the
1300 20 63 6f 6e 76 65 6e 69 65 6e 63 65 20 6f 66 20 65 64 69 74 69 6e 67 20 6f 70 65 72 61 74 69 6f .convenience.of.editing.operatio
1320 6e 73 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 65 64 69 74 69 6e 67 20 6f 70 65 72 ns..This.means.that.editing.oper
1340 61 74 69 6f 6e 73 20 68 61 76 65 20 74 6f 20 63 6f 6e 73 74 61 6e 74 6c 79 20 6a 75 6d 70 20 74 ations.have.to.constantly.jump.t
1360 68 72 6f 75 67 68 0d 0a 2f 2f 20 68 6f 6f 70 73 20 74 6f 20 6d 61 70 20 74 68 65 6d 73 65 6c 76 hrough..//.hoops.to.map.themselv
1380 65 73 20 6f 6e 74 6f 20 74 68 65 20 70 65 72 73 69 73 74 65 6e 63 65 20 6d 6f 64 65 6c 20 6f 66 es.onto.the.persistence.model.of
13a0 20 74 68 65 20 64 61 74 61 2e 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 57 69 74 68 20 6d 61 6e .the.data.....////TODO:.With.man
13c0 79 20 61 63 74 69 6f 6e 73 20 61 6e 64 20 62 69 6e 64 69 6e 67 73 20 74 68 65 20 6c 69 73 74 20 y.actions.and.bindings.the.list.
13e0 62 65 63 6f 6d 65 73 20 72 65 61 6c 6c 79 20 68 61 72 64 20 74 6f 20 67 72 6f 6b 3b 20 6d 61 6b becomes.really.hard.to.grok;.mak
1400 65 20 74 68 69 6e 67 73 20 6d 6f 72 65 20 76 69 73 75 61 6c 6c 79 20 64 69 73 74 69 6e 63 74 69 e.things.more.visually.distincti
1420 76 65 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 64 64 20 63 6f 6e 74 65 78 74 20 6d 65 6e 75 ve....////TODO:.add.context.menu
1440 20 69 74 65 6d 73 20 66 6f 72 20 72 65 6f 72 64 65 72 69 6e 67 20 61 63 74 69 6f 6e 20 61 6e 64 .items.for.reordering.action.and
1460 20 62 69 6e 67 69 6e 67 20 65 6e 74 72 69 65 73 20 28 6c 69 6b 65 20 22 4d 6f 76 65 20 55 70 22 .binging.entries.(like."Move.Up"
1480 20 61 6e 64 20 22 4d 6f 76 65 20 44 6f 77 6e 22 29 0d 0a 0d 0a 2f 2f 2f 2f 46 49 58 4d 45 3a 20 .and."Move.Down")....////FIXME:.
14a0 63 6f 6e 74 65 78 74 20 6d 65 6e 75 20 63 61 6e 6e 6f 74 20 62 65 20 62 72 6f 75 67 68 74 20 75 context.menu.cannot.be.brought.u
14c0 70 20 77 68 65 6e 20 74 68 65 72 65 27 73 20 6e 6f 20 69 74 65 6d 73 20 69 6e 20 74 68 65 20 74 p.when.there's.no.items.in.the.t
14e0 72 65 65 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 ree....namespace.UnityEngine.Inp
1500 75 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d utSystem.Editor..{......///.<sum
1520 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 74 72 65 65 20 76 69 65 77 20 73 68 6f 77 69 mary>......///.A.tree.view.showi
1540 6e 67 20 61 63 74 69 6f 6e 20 6d 61 70 73 2c 20 61 63 74 69 6f 6e 73 2c 20 61 6e 64 20 62 69 6e ng.action.maps,.actions,.and.bin
1560 64 69 6e 67 73 2e 20 54 68 69 73 20 69 73 20 74 68 65 20 63 6f 72 65 20 70 69 65 63 65 20 61 72 dings..This.is.the.core.piece.ar
1580 6f 75 6e 64 20 77 68 69 63 68 20 74 68 65 20 76 61 72 69 6f 75 73 0d 0a 20 20 20 20 2f 2f 2f 20 ound.which.the.various......///.
15a0 70 69 65 63 65 73 20 6f 66 20 61 63 74 69 6f 6e 20 65 64 69 74 69 6e 67 20 66 75 6e 63 74 69 6f pieces.of.action.editing.functio
15c0 6e 61 6c 69 74 79 20 72 65 76 6f 6c 76 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 nality.revolve.......///.</summa
15e0 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 ry>......///.<remarks>......///.
1600 54 68 65 20 74 72 65 65 20 76 69 65 77 20 63 61 6e 20 62 65 20 66 6c 65 78 69 62 6c 79 20 75 73 The.tree.view.can.be.flexibly.us
1620 65 64 20 74 6f 20 63 6f 6e 74 61 69 6e 20 6f 6e 6c 79 20 70 61 72 74 73 20 6f 66 20 61 20 73 70 ed.to.contain.only.parts.of.a.sp
1640 65 63 69 66 69 63 20 61 63 74 69 6f 6e 20 73 65 74 75 70 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 ecific.action.setup..For.example
1660 2c 0d 0a 20 20 20 20 2f 2f 2f 20 62 79 20 6f 6e 6c 79 20 61 64 64 69 6e 67 20 69 74 65 6d 73 20 ,......///.by.only.adding.items.
1680 66 6f 72 20 61 63 74 69 6f 6e 20 6d 61 70 73 20 28 3c 73 65 65 20 63 72 65 66 3d 22 41 63 74 69 for.action.maps.(<see.cref="Acti
16a0 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 22 2f 3e 20 74 6f 20 74 68 65 20 74 72 65 65 2c 20 74 68 onMapTreeItem"/>.to.the.tree,.th
16c0 65 20 74 72 65 65 20 76 69 65 77 0d 0a 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 62 65 63 6f 6d 65 e.tree.view......///.will.become
16e0 20 61 20 66 6c 61 74 20 6c 69 73 74 20 6f 66 20 61 63 74 69 6f 6e 20 6d 61 70 73 2e 20 4f 72 20 .a.flat.list.of.action.maps..Or.
1700 62 79 20 61 64 64 69 6e 67 20 6f 6e 6c 79 20 69 74 65 6d 73 20 66 6f 72 20 61 63 74 69 6f 6e 73 by.adding.only.items.for.actions
1720 20 28 3c 73 65 65 20 63 72 65 66 3d 22 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 22 2f 3e 0d 0a .(<see.cref="ActionTreeItem"/>..
1740 20 20 20 20 2f 2f 2f 20 61 6e 64 20 69 74 65 6d 73 20 66 6f 72 20 74 68 65 69 72 20 62 69 6e 64 ....///.and.items.for.their.bind
1760 69 6e 67 73 20 28 3c 73 65 65 20 63 72 65 66 3d 22 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d ings.(<see.cref="BindingTreeItem
1780 22 2f 3e 29 20 74 6f 20 74 68 65 20 74 72 65 65 2c 20 69 74 20 77 69 6c 6c 20 62 65 63 6f 6d 65 "/>).to.the.tree,.it.will.become
17a0 20 61 6e 20 61 63 74 69 6f 6e 2d 6f 6e 6c 79 0d 0a 20 20 20 20 2f 2f 2f 20 74 72 65 65 20 76 69 .an.action-only......///.tree.vi
17c0 65 77 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 75 73 ew.......///......///.This.is.us
17e0 65 64 20 62 79 20 74 68 65 20 61 63 74 69 6f 6e 20 61 73 73 65 74 20 65 64 69 74 6f 72 20 74 6f ed.by.the.action.asset.editor.to
1800 20 73 65 70 61 72 61 74 65 20 61 63 74 69 6f 6e 20 6d 61 70 73 20 61 6e 64 20 74 68 65 69 72 20 .separate.action.maps.and.their.
1820 61 63 74 69 6f 6e 73 20 69 6e 74 6f 20 74 77 6f 20 73 65 70 61 72 61 74 65 0d 0a 20 20 20 20 2f actions.into.two.separate....../
1840 2f 2f 20 74 72 65 65 20 76 69 65 77 73 20 28 74 68 65 20 6c 65 66 74 6d 6f 73 74 20 61 6e 64 20 //.tree.views.(the.leftmost.and.
1860 74 68 65 20 6d 69 64 64 6c 65 20 63 6f 6c 75 6d 6e 20 6f 66 20 74 68 65 20 65 64 69 74 6f 72 29 the.middle.column.of.the.editor)
1880 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 45 61 63 68 20 61 63 74 69 6f 6e 20 .......///......///.Each.action.
18a0 74 72 65 65 20 63 6f 6d 65 73 20 77 69 74 68 20 63 6f 70 79 2d 70 61 73 74 65 20 61 6e 64 20 63 tree.comes.with.copy-paste.and.c
18c0 6f 6e 74 65 78 74 20 6d 65 6e 75 20 73 75 70 70 6f 72 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f ontext.menu.support.......///.</
18e0 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 63 6c 61 73 73 20 49 6e 70 remarks>......internal.class.Inp
1900 75 74 41 63 74 69 6f 6e 54 72 65 65 56 69 65 77 20 3a 20 54 72 65 65 56 69 65 77 0d 0a 20 20 20 utActionTreeView.:.TreeView.....
1920 20 7b 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 43 72 65 61 74 69 6f 6e 0d 0a 0d 0a .{..........#region.Creation....
1940 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 6f 6e 54 72 65 65 56 69 ........public.InputActionTreeVi
1960 65 77 28 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 20 73 65 72 69 61 6c 69 7a 65 64 4f 62 ew(SerializedObject.serializedOb
1980 6a 65 63 74 2c 20 54 72 65 65 56 69 65 77 53 74 61 74 65 20 73 74 61 74 65 20 3d 20 6e 75 6c 6c ject,.TreeViewState.state.=.null
19a0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 73 74 61 74 65 20 3f 3f 20 6e )..............:.base(state.??.n
19c0 65 77 20 54 72 65 65 56 69 65 77 53 74 61 74 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ew.TreeViewState())..........{..
19e0 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 73 65 72 69 61 6c 69 ............Debug.Assert(seriali
1a00 7a 65 64 4f 62 6a 65 63 74 20 21 3d 20 6e 75 6c 6c 2c 20 22 4d 75 73 74 20 68 61 76 65 20 73 65 zedObject.!=.null,."Must.have.se
1a20 72 69 61 6c 69 7a 65 64 20 6f 62 6a 65 63 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 rialized.object");..............
1a40 74 68 69 73 2e 73 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 20 3d 20 73 65 72 69 61 6c 69 7a this.serializedObject.=.serializ
1a60 65 64 4f 62 6a 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 53 65 72 edObject;..............UpdateSer
1a80 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 28 29 3b 0d 0a 20 20 20 20 ializedObjectDirtyCount();......
1aa0 20 20 20 20 20 20 20 20 66 6f 6c 64 6f 75 74 4f 76 65 72 72 69 64 65 20 3d 20 44 72 61 77 46 6f ........foldoutOverride.=.DrawFo
1ac0 6c 64 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 72 61 77 48 65 61 64 65 72 20 3d ldout;..............drawHeader.=
1ae0 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 72 61 77 50 6c 75 73 42 75 74 74 .true;..............drawPlusButt
1b00 6f 6e 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 72 61 77 4d 69 6e 75 on.=.true;..............drawMinu
1b20 73 42 75 74 74 6f 6e 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 sButton.=.true;..............m_F
1b40 6f 72 63 65 41 63 63 65 70 74 52 65 6e 61 6d 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 orceAcceptRename.=.false;.......
1b60 20 20 20 20 20 20 20 6d 5f 54 69 74 6c 65 20 3d 20 6e 65 77 20 47 55 49 43 6f 6e 74 65 6e 74 28 .......m_Title.=.new.GUIContent(
1b80 22 22 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 2f 2f 2f 20 3c "");..........}............///.<
1ba0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 20 61 6e 20 61 summary>..........///.Build.an.a
1bc0 63 74 69 6f 6e 20 74 72 65 65 20 74 68 61 74 20 73 68 6f 77 73 20 6f 6e 6c 79 20 74 68 65 20 62 ction.tree.that.shows.only.the.b
1be0 69 6e 64 69 6e 67 73 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2e 0d 0a 20 indings.for.the.given.action....
1c00 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 .......///.</summary>..........p
1c20 75 62 6c 69 63 20 73 74 61 74 69 63 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 42 75 69 6c 64 57 ublic.static.TreeViewItem.BuildW
1c40 69 74 68 4a 75 73 74 42 69 6e 64 69 6e 67 73 46 72 6f 6d 41 63 74 69 6f 6e 28 53 65 72 69 61 6c ithJustBindingsFromAction(Serial
1c60 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 53 65 72 izedProperty.actionProperty,.Ser
1c80 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 ializedProperty.actionMapPropert
1ca0 79 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 y.=.null)..........{............
1cc0 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 21 3d ..Debug.Assert(actionProperty.!=
1ce0 20 6e 75 6c 6c 2c 20 22 41 63 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 20 63 61 6e 6e 6f 74 20 62 .null,."Action.property.cannot.b
1d00 65 20 6e 75 6c 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 20 e.null");..............var.root.
1d20 3d 20 6e 65 77 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 28 61 63 74 69 6f 6e 4d 61 70 50 72 =.new.ActionTreeItem(actionMapPr
1d40 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 operty,.actionProperty);........
1d60 20 20 20 20 20 20 72 6f 6f 74 2e 64 65 70 74 68 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 ......root.depth.=.-1;..........
1d80 20 20 20 20 72 6f 6f 74 2e 41 64 64 42 69 6e 64 69 6e 67 73 54 6f 28 72 6f 6f 74 29 3b 0d 0a 20 ....root.AddBindingsTo(root);...
1da0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 ...........return.root;.........
1dc0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .}............///.<summary>.....
1de0 20 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 20 61 6e 20 61 63 74 69 6f 6e 20 74 72 65 65 20 74 68 .....///.Build.an.action.tree.th
1e00 61 74 20 73 68 6f 77 73 20 6f 6e 6c 79 20 74 68 65 20 61 63 74 69 6f 6e 73 20 61 6e 64 20 62 69 at.shows.only.the.actions.and.bi
1e20 6e 64 69 6e 67 73 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 6d 61 70 2e ndings.for.the.given.action.map.
1e40 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ..........///.</summary>........
1e60 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 42 75 69 ..public.static.TreeViewItem.Bui
1e80 6c 64 57 69 74 68 4a 75 73 74 41 63 74 69 6f 6e 73 41 6e 64 42 69 6e 64 69 6e 67 73 46 72 6f 6d ldWithJustActionsAndBindingsFrom
1ea0 4d 61 70 28 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 6f 6e 4d 61 70 Map(SerializedProperty.actionMap
1ec0 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 Property)..........{............
1ee0 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 ..Debug.Assert(actionMapProperty
1f00 20 21 3d 20 6e 75 6c 6c 2c 20 22 41 63 74 69 6f 6e 20 6d 61 70 20 70 72 6f 70 65 72 74 79 20 63 .!=.null,."Action.map.property.c
1f20 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 annot.be.null");..............va
1f40 72 20 72 6f 6f 74 20 3d 20 6e 65 77 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 28 61 r.root.=.new.ActionMapTreeItem(a
1f60 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ctionMapProperty);..............
1f80 72 6f 6f 74 2e 64 65 70 74 68 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f root.depth.=.-1;..............ro
1fa0 6f 74 2e 41 64 64 41 63 74 69 6f 6e 73 41 6e 64 42 69 6e 64 69 6e 67 73 54 6f 28 72 6f 6f 74 29 ot.AddActionsAndBindingsTo(root)
1fc0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 ;..............return.root;.....
1fe0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d .....}............///.<summary>.
2000 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 20 61 6e 20 61 63 74 69 6f 6e 20 74 72 65 .........///.Build.an.action.tre
2020 65 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 6f 6e 6c 79 20 74 68 65 20 61 63 74 69 6f 6e 20 e.that.contains.only.the.action.
2040 6d 61 70 73 20 66 72 6f 6d 20 74 68 65 20 67 69 76 65 6e 20 2e 69 6e 70 75 74 61 63 74 69 6f 6e maps.from.the.given..inputaction
2060 73 20 61 73 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e s.asset...........///.</summary>
2080 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 54 72 65 65 56 69 65 77 ..........public.static.TreeView
20a0 49 74 65 6d 20 42 75 69 6c 64 57 69 74 68 4a 75 73 74 41 63 74 69 6f 6e 4d 61 70 73 46 72 6f 6d Item.BuildWithJustActionMapsFrom
20c0 41 73 73 65 74 28 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 20 61 73 73 65 74 4f 62 6a 65 Asset(SerializedObject.assetObje
20e0 63 74 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 44 65 62 75 ct)..........{..............Debu
2100 67 2e 41 73 73 65 72 74 28 61 73 73 65 74 4f 62 6a 65 63 74 20 21 3d 20 6e 75 6c 6c 2c 20 22 41 g.Assert(assetObject.!=.null,."A
2120 73 73 65 74 20 6f 62 6a 65 63 74 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 22 29 3b 0d 0a 20 sset.object.cannot.be.null");...
2140 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 20 3d 20 6e 65 77 20 54 72 65 65 56 69 ...........var.root.=.new.TreeVi
2160 65 77 49 74 65 6d 20 7b 69 64 20 3d 20 30 2c 20 64 65 70 74 68 20 3d 20 2d 31 7d 3b 0d 0a 20 20 ewItem.{id.=.0,.depth.=.-1};....
2180 20 20 20 20 20 20 20 20 20 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 2e 41 64 64 41 ..........ActionMapTreeItem.AddA
21a0 63 74 69 6f 6e 4d 61 70 73 46 72 6f 6d 41 73 73 65 74 54 6f 28 72 6f 6f 74 2c 20 61 73 73 65 74 ctionMapsFromAssetTo(root,.asset
21c0 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f Object);..............return.roo
21e0 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 t;..........}............public.
2200 73 74 61 74 69 63 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 42 75 69 6c 64 46 75 6c 6c 54 72 65 static.TreeViewItem.BuildFullTre
2220 65 28 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 20 61 73 73 65 74 4f 62 6a 65 63 74 29 0d e(SerializedObject.assetObject).
2240 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 .........{..............Debug.As
2260 73 65 72 74 28 61 73 73 65 74 4f 62 6a 65 63 74 20 21 3d 20 6e 75 6c 6c 2c 20 22 41 73 73 65 74 sert(assetObject.!=.null,."Asset
2280 20 6f 62 6a 65 63 74 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 22 29 3b 0d 0a 20 20 20 20 20 .object.cannot.be.null");.......
22a0 20 20 20 20 20 20 20 76 61 72 20 72 6f 6f 74 20 3d 20 6e 65 77 20 54 72 65 65 56 69 65 77 49 74 .......var.root.=.new.TreeViewIt
22c0 65 6d 20 7b 69 64 20 3d 20 30 2c 20 64 65 70 74 68 20 3d 20 2d 31 7d 3b 0d 0a 20 20 20 20 20 20 em.{id.=.0,.depth.=.-1};........
22e0 20 20 20 20 20 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 2e 41 64 64 41 63 74 69 6f ......ActionMapTreeItem.AddActio
2300 6e 4d 61 70 73 46 72 6f 6d 41 73 73 65 74 54 6f 28 72 6f 6f 74 2c 20 61 73 73 65 74 4f 62 6a 65 nMapsFromAssetTo(root,.assetObje
2320 63 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 6f 6f 74 2e 68 61 73 43 68 ct);..............if.(root.hasCh
2340 69 6c 64 72 65 6e 29 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 ildren)..................foreach
2360 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 72 6f 6f 74 2e 63 68 69 6c 64 72 65 6e 29 0d 0a 20 .(var.child.in.root.children)...
2380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 41 63 74 69 6f 6e 4d 61 70 54 72 ...................((ActionMapTr
23a0 65 65 49 74 65 6d 29 63 68 69 6c 64 29 2e 41 64 64 41 63 74 69 6f 6e 73 41 6e 64 42 69 6e 64 69 eeItem)child).AddActionsAndBindi
23c0 6e 67 73 54 6f 28 63 68 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ngsTo(child);..............retur
23e0 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 n.root;..........}............pr
2400 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 42 75 otected.override.TreeViewItem.Bu
2420 69 6c 64 52 6f 6f 74 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 ildRoot()..........{............
2440 20 20 76 61 72 20 72 6f 6f 74 20 3d 20 6f 6e 42 75 69 6c 64 54 72 65 65 3f 2e 49 6e 76 6f 6b 65 ..var.root.=.onBuildTree?.Invoke
2460 28 29 20 3f 3f 20 6e 65 77 20 54 72 65 65 56 69 65 77 49 74 65 6d 28 30 2c 20 2d 31 29 3b 0d 0a ().??.new.TreeViewItem(0,.-1);..
2480 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 61 20 66 69 ..............//.If.we.have.a.fi
24a0 6c 74 65 72 2c 20 72 65 6d 6f 76 65 20 75 6e 77 61 6e 74 65 64 20 69 74 65 6d 73 20 66 72 6f 6d lter,.remove.unwanted.items.from
24c0 20 74 68 65 20 74 72 65 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a .the.tree...............//.NOTE:
24e0 20 57 65 20 75 73 65 20 74 68 69 73 20 6d 65 74 68 6f 64 20 72 61 74 68 65 72 20 74 68 61 6e 20 .We.use.this.method.rather.than.
2500 54 72 65 65 56 69 65 77 27 73 20 62 75 69 6c 74 2d 69 6e 20 73 65 61 72 63 68 20 66 75 6e 63 74 TreeView's.built-in.search.funct
2520 69 6f 6e 61 6c 69 74 79 20 61 73 20 77 65 20 77 61 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ionality.as.we.want.............
2540 20 2f 2f 20 20 20 20 20 20 20 74 6f 20 6b 65 65 70 20 74 68 65 20 74 72 65 65 20 73 74 72 75 63 .//.......to.keep.the.tree.struc
2560 74 75 72 65 20 66 75 6c 6c 79 20 69 6e 74 61 63 74 20 77 68 65 72 65 61 73 20 73 65 61 72 63 68 ture.fully.intact.whereas.search
2580 53 74 72 69 6e 67 20 73 77 69 74 63 68 65 73 20 74 68 65 20 74 72 65 65 20 69 6e 74 6f 0d 0a 20 String.switches.the.tree.into...
25a0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 61 20 64 69 66 66 65 72 65 6e 74 20 ...........//.......a.different.
25c0 76 69 65 77 20 6d 6f 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 49 74 view.mode...............if.(m_It
25e0 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 2e 4c 65 6e 67 74 68 53 61 66 65 28 29 20 3e 20 emFilterCriteria.LengthSafe().>.
2600 30 20 26 26 20 72 6f 6f 74 2e 68 61 73 43 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 0.&&.root.hasChildren)..........
2620 20 20 20 20 7b 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 ....{..................foreach.(
2640 76 61 72 20 63 68 69 6c 64 20 69 6e 20 72 6f 6f 74 2e 63 68 69 6c 64 72 65 6e 2e 4f 66 54 79 70 var.child.in.root.children.OfTyp
2660 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 3e 28 29 2e 54 6f 41 72 72 61 79 28 e<ActionTreeItemBase>().ToArray(
2680 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 75 6e 65 54 72 65 ))......................PruneTre
26a0 65 42 79 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 65 72 28 63 68 69 6c 64 29 3b 0d 0a 20 20 20 eByItemSearchFilter(child);.....
26c0 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 20 52 6f 6f .........}................//.Roo
26e0 74 20 6e 6f 64 65 20 69 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 68 61 76 65 20 60 63 68 69 6c t.node.is.required.to.have.`chil
2700 64 72 65 6e 60 20 6e 6f 74 20 62 65 20 6e 75 6c 6c 2e 20 41 64 64 20 65 6d 70 74 79 20 6c 69 73 dren`.not.be.null..Add.empty.lis
2720 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 66 20 6e 65 63 65 73 73 61 72 79 2e t,..............//.if.necessary.
2740 20 43 61 6e 20 68 61 70 70 65 6e 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 77 65 20 .Can.happen,.for.example,.if.we.
2760 68 61 76 65 20 61 20 73 69 6e 67 6c 65 74 6f 6e 20 61 63 74 69 6f 6e 20 61 74 20 74 68 65 0d 0a have.a.singleton.action.at.the..
2780 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 72 6f 6f 74 20 62 75 74 20 6e 6f 20 62 69 6e 64 69 ............//.root.but.no.bindi
27a0 6e 67 73 20 6f 6e 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 6f 6f 74 ngs.on.it...............if.(root
27c0 2e 63 68 69 6c 64 72 65 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .children.==.null)..............
27e0 20 20 20 20 72 6f 6f 74 2e 63 68 69 6c 64 72 65 6e 20 3d 20 6e 65 77 20 4c 69 73 74 3c 54 72 65 ....root.children.=.new.List<Tre
2800 65 56 69 65 77 49 74 65 6d 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 eViewItem>();................ret
2820 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 urn.root;..........}............
2840 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 46 69 #endregion............#region.Fi
2860 6c 74 65 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c ltering............internal.bool
2880 20 68 61 73 46 69 6c 74 65 72 20 3d 3e 20 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 .hasFilter.=>.m_ItemFilterCriter
28a0 69 61 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f ia.!=.null;............public.vo
28c0 69 64 20 43 6c 65 61 72 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 65 72 41 6e 64 52 65 6c 6f 61 id.ClearItemSearchFilterAndReloa
28e0 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 69 66 20 28 d()..........{..............if.(
2900 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 m_ItemFilterCriteria.==.null)...
2920 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 20 20 20 20 20 20 20 ...............return;..........
2940 20 20 20 20 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 20 3d 20 6e 75 6c 6c 3b ....m_ItemFilterCriteria.=.null;
2960 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6c 6f 61 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 ..............Reload();.........
2980 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 49 74 65 .}............public.void.SetIte
29a0 6d 53 65 61 72 63 68 46 69 6c 74 65 72 41 6e 64 52 65 6c 6f 61 64 28 73 74 72 69 6e 67 20 63 72 mSearchFilterAndReload(string.cr
29c0 69 74 65 72 69 61 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 iteria)..........{..............
29e0 53 65 74 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 65 72 41 6e 64 52 65 6c 6f 61 64 28 46 69 6c SetItemSearchFilterAndReload(Fil
2a00 74 65 72 43 72 69 74 65 72 69 6f 6e 2e 46 72 6f 6d 53 74 72 69 6e 67 28 63 72 69 74 65 72 69 61 terCriterion.FromString(criteria
2a20 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 70 75 62 6c 69 63 ));..........}............public
2a40 20 76 6f 69 64 20 53 65 74 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 65 72 41 6e 64 52 65 6c 6f .void.SetItemSearchFilterAndRelo
2a60 61 64 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 3e 20 ad(IEnumerable<FilterCriterion>.
2a80 63 72 69 74 65 72 69 61 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 criteria)..........{............
2aa0 20 20 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 20 3d 20 63 72 69 74 65 72 69 ..m_ItemFilterCriteria.=.criteri
2ac0 61 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6c 6f 61 64 a.ToArray();..............Reload
2ae0 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 20 70 72 69 76 61 74 ();..........}............privat
2b00 65 20 76 6f 69 64 20 50 72 75 6e 65 54 72 65 65 42 79 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 e.void.PruneTreeByItemSearchFilt
2b20 65 72 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d 29 0d 0a 20 20 20 er(ActionTreeItemBase.item).....
2b40 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 72 75 6e 65 20 73 75 62 .....{..............//.Prune.sub
2b60 74 72 65 65 20 69 66 20 69 74 65 6d 20 69 73 20 66 6f 72 63 65 64 20 6f 75 74 20 62 79 20 61 6e tree.if.item.is.forced.out.by.an
2b80 79 20 6f 66 20 6f 75 72 20 63 72 69 74 65 72 69 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 y.of.our.criteria...............
2ba0 69 66 20 28 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 2e 41 6e 79 28 78 20 3d if.(m_ItemFilterCriteria.Any(x.=
2bc0 3e 20 78 2e 4d 61 74 63 68 65 73 28 69 74 65 6d 29 20 3d 3d 20 46 69 6c 74 65 72 43 72 69 74 65 >.x.Matches(item).==.FilterCrite
2be0 72 69 6f 6e 2e 4d 61 74 63 68 2e 46 61 69 6c 75 72 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 rion.Match.Failure))............
2c00 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 2e 70 61 72 65 6e 74 ..{..................item.parent
2c20 2e 63 68 69 6c 64 72 65 6e 2e 52 65 6d 6f 76 65 28 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 .children.Remove(item);.........
2c40 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d .........return;..............}.
2c60 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c ...............////REVIEW:.shoul
2c80 64 20 77 65 20 2a 61 6c 77 61 79 73 2a 20 64 6f 20 74 68 69 73 3f 20 28 72 65 67 61 72 64 6c 65 d.we.*always*.do.this?.(regardle
2ca0 73 73 20 6f 66 20 77 68 65 74 68 65 72 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 69 ss.of.whether.a.control.scheme.i
2cc0 73 20 73 65 6c 65 63 74 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 68 65 6e s.selected)..............//.When
2ce0 20 66 69 6c 74 65 72 69 6e 67 20 62 79 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 2c 20 77 65 20 .filtering.by.binding.group,.we.
2d00 74 61 67 20 62 69 6e 64 69 6e 67 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 69 6e 20 61 6e 79 tag.bindings.that.are.not.in.any
2d20 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 20 61 73 20 22 7b 47 4c 4f 42 41 4c 7d 22 2e 0d 0a 20 .binding.group.as."{GLOBAL}"....
2d40 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 68 65 6c 70 73 20 77 68 65 6e 20 68 61 ...........//.This.helps.when.ha
2d60 76 69 6e 67 20 61 20 73 70 65 63 69 66 69 63 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 73 ving.a.specific.control.scheme.s
2d80 65 6c 65 63 74 65 64 2c 20 74 6f 20 61 6c 73 6f 20 73 65 65 20 74 68 65 20 62 69 6e 64 69 6e 67 elected,.to.also.see.the.binding
2da0 73 20 74 68 61 74 20 61 72 65 20 61 63 74 69 76 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f s.that.are.active............../
2dc0 2f 20 69 6e 20 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 62 79 20 76 69 72 74 /.in.that.control.scheme.by.virt
2de0 75 65 20 6f 66 20 6e 6f 74 20 62 65 69 6e 67 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 ue.of.not.being.associated.with.
2e00 2a 61 6e 79 2a 20 73 70 65 63 69 66 69 63 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e 0d 0a *any*.specific.control.scheme...
2e20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 42 69 6e 64 69 6e 67 54 ............if.(item.is.BindingT
2e40 72 65 65 49 74 65 6d 20 62 69 6e 64 69 6e 67 49 74 65 6d 20 26 26 0d 0a 20 20 20 20 20 20 20 20 reeItem.bindingItem.&&..........
2e60 20 20 20 20 20 20 20 20 21 28 69 74 65 6d 20 69 73 20 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 ........!(item.is.CompositeBindi
2e80 6e 67 54 72 65 65 49 74 65 6d 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ngTreeItem).&&..................
2ea0 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 62 69 6e 64 69 6e 67 49 74 65 6d string.IsNullOrEmpty(bindingItem
2ec0 2e 67 72 6f 75 70 73 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 .groups).&&..................m_I
2ee0 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 2e 41 6e 79 28 78 20 3d 3e 20 78 2e 74 79 70 temFilterCriteria.Any(x.=>.x.typ
2f00 65 20 3d 3d 20 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 2e 54 79 70 65 2e 42 79 42 69 6e 64 e.==.FilterCriterion.Type.ByBind
2f20 69 6e 67 47 72 6f 75 70 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ingGroup))..............{.......
2f40 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 2e 64 69 73 70 6c 61 79 4e 61 6d 65 20 2b 3d 20 22 ...........item.displayName.+=."
2f60 20 7b 47 4c 4f 42 41 4c 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 .{GLOBAL}";..............}......
2f80 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 72 75 6e 65 20 63 68 69 6c 64 72 65 6e 2e 0d 0a 20 20 ..........//.Prune.children.....
2fa0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 2e 68 61 73 43 68 69 6c 64 72 65 6e 29 0d ..........if.(item.hasChildren).
2fc0 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 .............{..................
2fe0 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 69 74 65 6d 2e 63 68 69 6c 64 foreach.(var.child.in.item.child
3000 72 65 6e 2e 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 3e 28 29 ren.OfType<ActionTreeItemBase>()
3020 2e 54 6f 41 72 72 61 79 28 29 29 20 2f 2f 20 57 65 27 72 65 20 6d 6f 64 69 66 79 69 6e 67 20 74 .ToArray()).//.We're.modifying.t
3040 68 65 20 63 68 69 6c 64 20 6c 69 73 74 20 73 6f 20 63 6f 70 79 2e 0d 0a 20 20 20 20 20 20 20 20 he.child.list.so.copy...........
3060 20 20 20 20 20 20 20 20 20 20 20 20 50 72 75 6e 65 54 72 65 65 42 79 49 74 65 6d 53 65 61 72 63 ............PruneTreeByItemSearc
3080 68 46 69 6c 74 65 72 28 63 68 69 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a hFilter(child);..............}..
30a0 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d ........}............#endregion.
30c0 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 46 69 6e 64 69 6e 67 20 49 74 65 6d 73 ...........#region.Finding.Items
30e0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 ............public.ActionTreeIte
3100 6d 42 61 73 65 20 46 69 6e 64 49 74 65 6d 42 79 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 74 68 mBase.FindItemByPath(string.path
3120 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f )..........{..............var.co
3140 6d 70 6f 6e 65 6e 74 73 20 3d 20 70 61 74 68 2e 53 70 6c 69 74 28 27 2f 27 29 3b 0d 0a 20 20 20 mponents.=.path.Split('/');.....
3160 20 20 20 20 20 20 20 20 20 76 61 72 20 63 75 72 72 65 6e 74 20 3d 20 72 6f 6f 74 49 74 65 6d 3b .........var.current.=.rootItem;
3180 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 63 6f 6d 70 6f ..............foreach.(var.compo
31a0 6e 65 6e 74 20 69 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nent.in.components).............
31c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 2e .{..................if.(current.
31e0 68 61 73 43 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d hasChildren)..................{.
3200 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 66 6f 75 6e 64 20 3d .....................var.found.=
3220 20 66 61 6c 73 65 3b 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 .false;......................for
3240 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 63 75 72 72 65 6e 74 2e 63 68 69 6c 64 each.(var.child.in.current.child
3260 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ren)......................{.....
3280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 69 6c 64 2e 64 .....................if.(child.d
32a0 69 73 70 6c 61 79 4e 61 6d 65 2e 45 71 75 61 6c 73 28 63 6f 6d 70 6f 6e 65 6e 74 2c 20 53 74 72 isplayName.Equals(component,.Str
32c0 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 ingComparison.InvariantCultureIg
32e0 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 noreCase))......................
3300 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 20 20 20 20 20 ....{...........................
3320 20 20 20 63 75 72 72 65 6e 74 20 3d 20 63 68 69 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...current.=.child;.............
3340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 75 6e 64 20 3d 20 74 72 75 65 3b 0d 0a .................found.=.true;..
3360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 ............................brea
3380 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 k;..........................}...
33a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ...................}............
33c0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 6f 75 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 ............if.(found)..........
33e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 ................continue;.......
3400 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 ...........}....................
3420 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 return.null;..............}.....
3440 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 .........return.(ActionTreeItemB
3460 61 73 65 29 63 75 72 72 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ase)current;..........}.........
3480 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 46 69 6e ...public.ActionTreeItemBase.Fin
34a0 64 49 74 65 6d 42 79 50 72 6f 70 65 72 74 79 50 61 74 68 28 73 74 72 69 6e 67 20 70 72 6f 70 65 dItemByPropertyPath(string.prope
34c0 72 74 79 50 61 74 68 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 rtyPath)..........{.............
34e0 20 72 65 74 75 72 6e 20 46 69 6e 64 46 69 72 73 74 49 74 65 6d 3c 41 63 74 69 6f 6e 54 72 65 65 .return.FindFirstItem<ActionTree
3500 49 74 65 6d 42 61 73 65 3e 28 78 20 3d 3e 20 78 2e 70 72 6f 70 65 72 74 79 2e 70 72 6f 70 65 72 ItemBase>(x.=>.x.property.proper
3520 74 79 50 61 74 68 20 3d 3d 20 70 72 6f 70 65 72 74 79 50 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 tyPath.==.propertyPath);........
3540 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 54 72 65 65 ..}............public.ActionTree
3560 49 74 65 6d 42 61 73 65 20 46 69 6e 64 49 74 65 6d 46 6f 72 28 53 65 72 69 61 6c 69 7a 65 64 50 ItemBase.FindItemFor(SerializedP
3580 72 6f 70 65 72 74 79 20 65 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 roperty.element)..........{.....
35a0 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6d 61 79 20 62 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 .........//.We.may.be.looking.at
35c0 20 61 20 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 74 68 61 74 20 72 65 66 65 72 .a.SerializedProperty.that.refer
35e0 73 20 74 6f 20 74 68 65 20 73 61 6d 65 20 65 6c 65 6d 65 6e 74 20 62 75 74 20 69 73 0d 0a 20 20 s.to.the.same.element.but.is....
3600 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 74 73 20 6f 77 6e 20 69 6e 73 74 61 6e 63 65 20 64 69 ..........//.its.own.instance.di
3620 66 66 65 72 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 6f 6e 65 20 77 65 27 72 65 20 75 73 69 6e 67 fferent.from.the.one.we're.using
3640 20 69 6e 20 74 68 65 20 74 72 65 65 2e 20 43 6f 6d 70 61 72 65 20 70 72 6f 70 65 72 74 69 65 73 .in.the.tree..Compare.properties
3660 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 79 20 70 61 74 68 2c 20 6e 6f 74 20 62 79 ..............//.by.path,.not.by
3680 20 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 .object.instance...............r
36a0 65 74 75 72 6e 20 46 69 6e 64 46 69 72 73 74 49 74 65 6d 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 eturn.FindFirstItem<ActionTreeIt
36c0 65 6d 42 61 73 65 3e 28 78 20 3d 3e 20 78 2e 70 72 6f 70 65 72 74 79 2e 70 72 6f 70 65 72 74 79 emBase>(x.=>.x.property.property
36e0 50 61 74 68 20 3d 3d 20 65 6c 65 6d 65 6e 74 2e 70 72 6f 70 65 72 74 79 50 61 74 68 29 3b 0d 0a Path.==.element.propertyPath);..
3700 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 49 74 65 ........}............public.TIte
3720 6d 20 46 69 6e 64 46 69 72 73 74 49 74 65 6d 3c 54 49 74 65 6d 3e 28 46 75 6e 63 3c 54 49 74 65 m.FindFirstItem<TItem>(Func<TIte
3740 6d 2c 20 62 6f 6f 6c 3e 20 70 72 65 64 69 63 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 m,.bool>.predicate).............
3760 20 77 68 65 72 65 20 54 49 74 65 6d 20 3a 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 .where.TItem.:.ActionTreeItemBas
3780 65 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 72 65 74 75 72 6e e..........{..............return
37a0 20 46 69 6e 64 46 69 72 73 74 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 72 6f 6f 74 49 74 65 6d .FindFirstItemRecursive(rootItem
37c0 2c 20 70 72 65 64 69 63 61 74 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ,.predicate);..........}........
37e0 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 54 49 74 65 6d 20 46 69 6e 64 46 69 72 ....private.static.TItem.FindFir
3800 73 74 49 74 65 6d 52 65 63 75 72 73 69 76 65 3c 54 49 74 65 6d 3e 28 54 72 65 65 56 69 65 77 49 stItemRecursive<TItem>(TreeViewI
3820 74 65 6d 20 63 75 72 72 65 6e 74 2c 20 46 75 6e 63 3c 54 49 74 65 6d 2c 20 62 6f 6f 6c 3e 20 70 tem.current,.Func<TItem,.bool>.p
3840 72 65 64 69 63 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 49 74 redicate)..............where.TIt
3860 65 6d 20 3a 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 0d 0a 20 20 20 20 20 20 20 em.:.ActionTreeItemBase.........
3880 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 20 69 73 20 54 .{..............if.(current.is.T
38a0 49 74 65 6d 20 69 74 65 6d 4f 66 54 79 70 65 20 26 26 20 70 72 65 64 69 63 61 74 65 28 69 74 65 Item.itemOfType.&&.predicate(ite
38c0 6d 4f 66 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 mOfType))..................retur
38e0 6e 20 69 74 65 6d 4f 66 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 n.itemOfType;................if.
3900 28 63 75 72 72 65 6e 74 2e 68 61 73 43 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 (current.hasChildren)...........
3920 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 63 75 72 .......foreach.(var.child.in.cur
3940 72 65 6e 74 2e 63 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rent.children)..................
3960 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 69 74 65 6d 20 {......................var.item.
3980 3d 20 46 69 6e 64 46 69 72 73 74 49 74 65 6d 52 65 63 75 72 73 69 76 65 28 63 68 69 6c 64 2c 20 =.FindFirstItemRecursive(child,.
39a0 70 72 65 64 69 63 61 74 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 predicate);.....................
39c0 20 69 66 20 28 69 74 65 6d 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .if.(item.!=.null)..............
39e0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d 3b 0d 0a 20 20 20 20 20 20 ............return.item;........
3a00 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 72 65 74 75 72 ..........}................retur
3a20 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 65 n.null;..........}............#e
3a40 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 53 65 6c 65 ndregion............#region.Sele
3a60 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6c 65 ction............public.void.Cle
3a80 61 72 53 65 6c 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 arSelection()..........{........
3aa0 20 20 20 20 20 20 53 65 74 53 65 6c 65 63 74 69 6f 6e 28 6e 65 77 20 69 6e 74 5b 30 5d 2c 20 54 ......SetSelection(new.int[0],.T
3ac0 72 65 65 56 69 65 77 53 65 6c 65 63 74 69 6f 6e 4f 70 74 69 6f 6e 73 2e 46 69 72 65 53 65 6c 65 reeViewSelectionOptions.FireSele
3ae0 63 74 69 6f 6e 43 68 61 6e 67 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ctionChanged);..........}.......
3b00 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 6c 65 63 74 49 74 65 6d 73 28 49 45 6e .....public.void.SelectItems(IEn
3b20 75 6d 65 72 61 62 6c 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 3e 20 69 74 65 umerable<ActionTreeItemBase>.ite
3b40 6d 73 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 53 65 74 53 ms)..........{..............SetS
3b60 65 6c 65 63 74 69 6f 6e 28 69 74 65 6d 73 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 78 2e 69 64 29 election(items.Select(x.=>.x.id)
3b80 2e 54 6f 4c 69 73 74 28 29 2c 20 54 72 65 65 56 69 65 77 53 65 6c 65 63 74 69 6f 6e 4f 70 74 69 .ToList(),.TreeViewSelectionOpti
3ba0 6f 6e 73 2e 46 69 72 65 53 65 6c 65 63 74 69 6f 6e 43 68 61 6e 67 65 64 29 3b 0d 0a 20 20 20 20 ons.FireSelectionChanged);......
3bc0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 6c ....}............public.void.Sel
3be0 65 63 74 49 74 65 6d 28 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 65 6c 65 6d 65 ectItem(SerializedProperty.eleme
3c00 6e 74 2c 20 62 6f 6f 6c 20 61 64 64 69 74 69 76 65 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 nt,.bool.additive.=.false)......
3c20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 46 69 ....{..............var.item.=.Fi
3c40 6e 64 49 74 65 6d 46 6f 72 28 65 6c 65 6d 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ndItemFor(element);.............
3c60 20 69 66 20 28 69 74 65 6d 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .if.(item.==.null)..............
3c80 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 6e 28 ....throw.new.ArgumentException(
3ca0 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 69 74 65 6d 20 66 6f 72 20 70 72 6f 70 65 72 74 79 20 $"Cannot.find.item.for.property.
3cc0 70 61 74 68 20 27 7b 65 6c 65 6d 65 6e 74 2e 70 72 6f 70 65 72 74 79 50 61 74 68 7d 27 22 2c 20 path.'{element.propertyPath}'",.
3ce0 6e 61 6d 65 6f 66 28 65 6c 65 6d 65 6e 74 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nameof(element));...............
3d00 20 53 65 6c 65 63 74 49 74 65 6d 28 69 74 65 6d 2c 20 61 64 64 69 74 69 76 65 29 3b 0d 0a 20 20 .SelectItem(item,.additive);....
3d20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 ......}............public.void.S
3d40 65 6c 65 63 74 49 74 65 6d 28 73 74 72 69 6e 67 20 70 61 74 68 2c 20 62 6f 6f 6c 20 61 64 64 69 electItem(string.path,.bool.addi
3d60 74 69 76 65 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 tive.=.false)..........{........
3d80 20 20 20 20 20 20 69 66 20 28 21 54 72 79 53 65 6c 65 63 74 49 74 65 6d 28 70 61 74 68 2c 20 61 ......if.(!TrySelectItem(path,.a
3da0 64 64 69 74 69 76 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 dditive))..................throw
3dc0 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 6e 6f 74 20 .new.ArgumentException($"Cannot.
3de0 66 69 6e 64 20 69 74 65 6d 20 77 69 74 68 20 70 61 74 68 20 27 70 61 74 68 27 22 2c 20 6e 61 6d find.item.with.path.'path'",.nam
3e00 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 eof(path));..........}..........
3e20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 53 65 6c 65 63 74 49 74 65 6d 28 73 74 72 69 ..public.bool.TrySelectItem(stri
3e40 6e 67 20 70 61 74 68 2c 20 62 6f 6f 6c 20 61 64 64 69 74 69 76 65 20 3d 20 66 61 6c 73 65 29 0d ng.path,.bool.additive.=.false).
3e60 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d .........{..............var.item
3e80 20 3d 20 46 69 6e 64 49 74 65 6d 42 79 50 61 74 68 28 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 .=.FindItemByPath(path);........
3ea0 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 ......if.(item.==.null).........
3ec0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 .........return.false;..........
3ee0 20 20 20 20 20 20 53 65 6c 65 63 74 49 74 65 6d 28 69 74 65 6d 2c 20 61 64 64 69 74 69 76 65 29 ......SelectItem(item,.additive)
3f00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 ;..............return.true;.....
3f20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 .....}............public.void.Se
3f40 6c 65 63 74 49 74 65 6d 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d lectItem(ActionTreeItemBase.item
3f60 2c 20 62 6f 6f 6c 20 61 64 64 69 74 69 76 65 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 ,.bool.additive.=.false)........
3f80 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 64 64 69 74 69 76 65 29 0d 0a ..{..............if.(additive)..
3fa0 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 76 ............{..................v
3fc0 61 72 20 73 65 6c 65 63 74 69 6f 6e 20 3d 20 6e 65 77 20 4c 69 73 74 3c 69 6e 74 3e 28 29 3b 0d ar.selection.=.new.List<int>();.
3fe0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 6c 65 63 74 69 6f 6e 2e 41 64 64 52 61 .................selection.AddRa
4000 6e 67 65 28 47 65 74 53 65 6c 65 63 74 69 6f 6e 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 nge(GetSelection());............
4020 20 20 20 20 20 20 73 65 6c 65 63 74 69 6f 6e 2e 41 64 64 28 69 74 65 6d 2e 69 64 29 3b 0d 0a 20 ......selection.Add(item.id);...
4040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 53 65 6c 65 63 74 69 6f 6e 28 73 65 6c 65 ...............SetSelection(sele
4060 63 74 69 6f 6e 2c 20 54 72 65 65 56 69 65 77 53 65 6c 65 63 74 69 6f 6e 4f 70 74 69 6f 6e 73 2e ction,.TreeViewSelectionOptions.
4080 46 69 72 65 53 65 6c 65 63 74 69 6f 6e 43 68 61 6e 67 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 FireSelectionChanged);..........
40a0 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.........
40c0 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 65 74 53 65 6c 65 63 .....{..................SetSelec
40e0 74 69 6f 6e 28 6e 65 77 5b 5d 20 7b 20 69 74 65 6d 2e 69 64 20 7d 2c 20 54 72 65 65 56 69 65 77 tion(new[].{.item.id.},.TreeView
4100 53 65 6c 65 63 74 69 6f 6e 4f 70 74 69 6f 6e 73 2e 46 69 72 65 53 65 6c 65 63 74 69 6f 6e 43 68 SelectionOptions.FireSelectionCh
4120 61 6e 67 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 anged);..............}..........
4140 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c }............public.IEnumerable<
4160 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 3e 20 47 65 74 53 65 6c 65 63 74 65 64 49 ActionTreeItemBase>.GetSelectedI
4180 74 65 6d 73 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 66 tems()..........{..............f
41a0 6f 72 65 61 63 68 20 28 76 61 72 20 69 64 20 69 6e 20 47 65 74 53 65 6c 65 63 74 69 6f 6e 28 29 oreach.(var.id.in.GetSelection()
41c0 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 )..............{................
41e0 20 20 69 66 20 28 46 69 6e 64 49 74 65 6d 28 69 64 2c 20 72 6f 6f 74 49 74 65 6d 29 20 69 73 20 ..if.(FindItem(id,.rootItem).is.
4200 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 ActionTreeItemBase.item)........
4220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 69 74 65 6d 3b ..............yield.return.item;
4240 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 ..............}..........}......
4260 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ......///.<summary>..........///
4280 20 53 61 6d 65 20 61 73 20 3c 73 65 65 20 63 72 65 66 3d 22 47 65 74 53 65 6c 65 63 74 65 64 49 .Same.as.<see.cref="GetSelectedI
42a0 74 65 6d 73 22 2f 3e 20 62 75 74 20 77 69 74 68 20 69 74 65 6d 73 20 74 68 61 74 20 61 72 65 20 tems"/>.but.with.items.that.are.
42c0 73 65 6c 65 63 74 65 64 20 62 75 74 20 61 72 65 20 63 68 69 6c 64 72 65 6e 20 6f 66 20 6f 74 68 selected.but.are.children.of.oth
42e0 65 72 20 69 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 61 6c 73 6f 20 er.items..........///.that.also.
4300 73 65 6c 65 63 74 65 64 20 62 65 69 6e 67 20 66 69 6c 74 65 72 65 64 20 6f 75 74 2e 0d 0a 20 20 selected.being.filtered.out.....
4320 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f ......///.</summary>..........//
4340 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 /.<remarks>..........///.This.is
4360 20 75 73 65 66 75 6c 20 66 6f 72 20 6f 70 65 72 61 74 69 6f 6e 73 20 73 75 63 68 20 61 73 20 63 .useful.for.operations.such.as.c
4380 6f 70 79 2d 70 61 73 74 65 20 77 68 65 72 65 20 63 6f 70 79 20 61 20 70 61 72 65 6e 74 20 77 69 opy-paste.where.copy.a.parent.wi
43a0 6c 6c 20 69 6d 70 6c 69 63 69 74 6c 79 20 63 6f 70 79 20 74 68 65 20 63 68 69 6c 64 2e 0d 0a 20 ll.implicitly.copy.the.child....
43c0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 .......///.</remarks>..........p
43e0 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d ublic.IEnumerable<ActionTreeItem
4400 42 61 73 65 3e 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 57 69 74 68 43 68 69 6c 64 72 Base>.GetSelectedItemsWithChildr
4420 65 6e 46 69 6c 74 65 72 65 64 4f 75 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 enFilteredOut()..........{......
4440 20 20 20 20 20 20 20 20 76 61 72 20 73 65 6c 65 63 74 65 64 49 74 65 6d 73 20 3d 20 47 65 74 53 ........var.selectedItems.=.GetS
4460 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 20 20 20 20 20 electedItems().ToArray();.......
4480 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 69 74 65 6d 20 69 6e 20 73 65 6c 65 .......foreach.(var.item.in.sele
44a0 63 74 65 64 49 74 65 6d 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ctedItems)..............{.......
44c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 6c 65 63 74 65 64 49 74 65 6d 73 2e 41 6e 79 ...........if.(selectedItems.Any
44e0 28 78 20 3d 3e 20 78 2e 49 73 50 61 72 65 6e 74 4f 66 28 69 74 65 6d 29 29 29 0d 0a 20 20 20 20 (x.=>.x.IsParentOf(item)))......
4500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 ................continue;.......
4520 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 69 74 65 6d 3b 0d 0a 20 ...........yield.return.item;...
4540 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 20 20 20 ...........}..........}.........
4560 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 49 74 65 6d 3e 20 47 65 74 ...public.IEnumerable<TItem>.Get
4580 53 65 6c 65 63 74 65 64 49 74 65 6d 73 4f 72 50 61 72 65 6e 74 73 4f 66 54 79 70 65 3c 54 49 74 SelectedItemsOrParentsOfType<TIt
45a0 65 6d 3e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 49 74 65 6d 20 3a em>()..............where.TItem.:
45c0 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a .ActionTreeItemBase..........{..
45e0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 72 65 20 69 73 20 6e 6f 20 73 65 ............//.If.there.is.no.se
4600 6c 65 63 74 69 6f 6e 20 61 6e 64 20 74 68 65 20 72 6f 6f 74 20 69 74 65 6d 20 68 61 73 20 74 68 lection.and.the.root.item.has.th
4620 65 20 74 79 70 65 20 77 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 2c 0d 0a 20 20 20 20 20 e.type.we're.looking.for,.......
4640 20 20 20 20 20 20 20 2f 2f 20 63 6f 6e 73 69 64 65 72 20 69 74 20 73 65 6c 65 63 74 65 64 2e 20 .......//.consider.it.selected..
4660 54 68 69 73 20 61 6c 6c 6f 77 73 20 61 64 64 69 6e 67 20 69 74 65 6d 73 20 61 74 20 74 68 65 20 This.allows.adding.items.at.the.
4680 74 6f 70 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 48 61 73 53 toplevel...............if.(!HasS
46a0 65 6c 65 63 74 69 6f 6e 28 29 20 26 26 20 72 6f 6f 74 49 74 65 6d 20 69 73 20 54 49 74 65 6d 20 election().&&.rootItem.is.TItem.
46c0 72 6f 6f 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 20 root)..............{............
46e0 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 72 6f 6f 74 3b 0d 0a 20 20 20 20 20 20 ......yield.return.root;........
4700 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 ......}..............else.......
4720 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 66 6f 72 65 61 63 .......{..................foreac
4740 68 20 28 76 61 72 20 69 64 20 69 6e 20 47 65 74 53 65 6c 65 63 74 69 6f 6e 28 29 29 0d 0a 20 20 h.(var.id.in.GetSelection())....
4760 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 20 20 ..............{.................
4780 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 46 69 6e 64 49 74 65 6d 28 69 64 2c 20 72 6f 6f .....var.item.=.FindItem(id,.roo
47a0 74 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 tItem);......................whi
47c0 6c 65 20 28 69 74 65 6d 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 le.(item.!=.null)...............
47e0 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 20 20 .......{........................
4800 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 54 49 74 65 6d 20 69 74 65 6d 4f 66 54 79 70 65 29 0d ..if.(item.is.TItem.itemOfType).
4820 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 .............................yie
4840 6c 64 20 72 65 74 75 72 6e 20 69 74 65 6d 4f 66 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 ld.return.itemOfType;...........
4860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 20 3d 20 69 74 65 6d 2e 70 61 72 65 6e ...............item.=.item.paren
4880 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 t;......................}.......
48a0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ...........}..............}.....
48c0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 .....}............public.void.Se
48e0 6c 65 63 74 46 69 72 73 74 54 6f 70 6c 65 76 65 6c 49 74 65 6d 28 29 0d 0a 20 20 20 20 20 20 20 lectFirstToplevelItem().........
4900 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 6f 6f 74 49 74 65 6d 2e 63 68 69 .{..............if.(rootItem.chi
4920 6c 64 72 65 6e 2e 41 6e 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 ldren.Any())..................Se
4940 74 53 65 6c 65 63 74 69 6f 6e 28 6e 65 77 5b 5d 20 7b 72 6f 6f 74 49 74 65 6d 2e 63 68 69 6c 64 tSelection(new[].{rootItem.child
4960 72 65 6e 5b 30 5d 2e 69 64 7d 2c 20 54 72 65 65 56 69 65 77 53 65 6c 65 63 74 69 6f 6e 4f 70 74 ren[0].id},.TreeViewSelectionOpt
4980 69 6f 6e 73 2e 46 69 72 65 53 65 6c 65 63 74 69 6f 6e 43 68 61 6e 67 65 64 29 3b 0d 0a 20 20 20 ions.FireSelectionChanged);.....
49a0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 .....}............protected.over
49c0 72 69 64 65 20 76 6f 69 64 20 53 65 6c 65 63 74 69 6f 6e 43 68 61 6e 67 65 64 28 49 4c 69 73 74 ride.void.SelectionChanged(IList
49e0 3c 69 6e 74 3e 20 73 65 6c 65 63 74 65 64 49 64 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 <int>.selectedIds)..........{...
4a00 20 20 20 20 20 20 20 20 20 20 20 6f 6e 53 65 6c 65 63 74 69 6f 6e 43 68 61 6e 67 65 64 3f 2e 49 ...........onSelectionChanged?.I
4a20 6e 76 6f 6b 65 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 20 23 nvoke();..........}............#
4a40 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 52 65 6e endregion............#region.Ren
4a60 61 6d 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6e 65 77 20 76 6f 69 64 aming............public.new.void
4a80 20 42 65 67 69 6e 52 65 6e 61 6d 65 28 54 72 65 65 56 69 65 77 49 74 65 6d 20 69 74 65 6d 29 0d .BeginRename(TreeViewItem.item).
4aa0 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 20 49 66 20 61 20 .........{..............//.If.a.
4ac0 72 65 6e 61 6d 65 20 69 73 20 61 6c 72 65 61 64 79 20 69 6e 20 70 72 6f 67 72 65 73 73 2c 20 66 rename.is.already.in.progress,.f
4ae0 6f 72 63 65 20 69 74 20 74 6f 20 65 6e 64 20 66 69 72 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 orce.it.to.end.first............
4b00 20 20 20 45 6e 64 52 65 6e 61 6d 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e 42 ...EndRename();..............onB
4b20 65 67 69 6e 52 65 6e 61 6d 65 3f 2e 49 6e 76 6f 6b 65 28 28 41 63 74 69 6f 6e 54 72 65 65 49 74 eginRename?.Invoke((ActionTreeIt
4b40 65 6d 42 61 73 65 29 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 2e emBase)item);..............base.
4b60 42 65 67 69 6e 52 65 6e 61 6d 65 28 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d BeginRename(item);..........}...
4b80 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 62 6f 6f 6c .........protected.override.bool
4ba0 20 43 61 6e 52 65 6e 61 6d 65 28 54 72 65 65 56 69 65 77 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 .CanRename(TreeViewItem.item)...
4bc0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 .......{..............return.ite
4be0 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 61 63 74 69 6f 6e 54 72 m.is.ActionTreeItemBase.actionTr
4c00 65 65 49 74 65 6d 20 26 26 20 61 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 2e 63 61 6e 52 65 6e 61 eeItem.&&.actionTreeItem.canRena
4c20 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 me;..........}............protec
4c40 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 52 65 6e 61 6d 65 45 6e 64 65 64 28 52 65 ted.override.void.RenameEnded(Re
4c60 6e 61 6d 65 45 6e 64 65 64 41 72 67 73 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a nameEndedArgs.args)..........{..
4c80 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 28 46 69 6e 64 49 74 65 6d 28 61 72 67 73 2e ............if.(!(FindItem(args.
4ca0 69 74 65 6d 49 44 2c 20 72 6f 6f 74 49 74 65 6d 29 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 itemID,.rootItem).is.ActionTreeI
4cc0 74 65 6d 42 61 73 65 20 61 63 74 69 6f 6e 49 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 temBase.actionItem))............
4ce0 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ......return;................if.
4d00 28 21 28 61 72 67 73 2e 61 63 63 65 70 74 65 64 52 65 6e 61 6d 65 20 7c 7c 20 6d 5f 46 6f 72 63 (!(args.acceptedRename.||.m_Forc
4d20 65 41 63 63 65 70 74 52 65 6e 61 6d 65 29 20 7c 7c 20 61 72 67 73 2e 6f 72 69 67 69 6e 61 6c 4e eAcceptRename).||.args.originalN
4d40 61 6d 65 20 3d 3d 20 61 72 67 73 2e 6e 65 77 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ame.==.args.newName)............
4d60 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 ......return;................Deb
4d80 75 67 2e 41 73 73 65 72 74 28 61 63 74 69 6f 6e 49 74 65 6d 2e 63 61 6e 52 65 6e 61 6d 65 2c 20 ug.Assert(actionItem.canRename,.
4da0 22 43 61 6e 6e 6f 74 20 72 65 6e 61 6d 65 20 22 20 2b 20 61 63 74 69 6f 6e 49 74 65 6d 29 3b 0d "Cannot.rename.".+.actionItem);.
4dc0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 49 74 65 6d 2e 52 65 6e 61 6d 65 ...............actionItem.Rename
4de0 28 61 72 67 73 2e 6e 65 77 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 53 (args.newName);..............OnS
4e00 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 28 29 3b 0d 0a 20 20 20 20 erializedObjectModified();......
4e20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 ....}............public.void.End
4e40 52 65 6e 61 6d 65 28 62 6f 6f 6c 20 66 6f 72 63 65 41 63 63 65 70 74 29 0d 0a 20 20 20 20 20 20 Rename(bool.forceAccept)........
4e60 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 72 63 65 41 63 63 65 70 74 52 65 ..{..............m_ForceAcceptRe
4e80 6e 61 6d 65 20 3d 20 66 6f 72 63 65 41 63 63 65 70 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 name.=.forceAccept;.............
4ea0 20 45 6e 64 52 65 6e 61 6d 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 72 .EndRename();..............m_For
4ec0 63 65 41 63 63 65 70 74 52 65 6e 61 6d 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 ceAcceptRename.=.false;.........
4ee0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 .}............protected.override
4f00 20 76 6f 69 64 20 44 6f 75 62 6c 65 43 6c 69 63 6b 65 64 49 74 65 6d 28 69 6e 74 20 69 64 29 0d .void.DoubleClickedItem(int.id).
4f20 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 21 28 46 69 .........{..............if.(!(Fi
4f40 6e 64 49 74 65 6d 28 69 64 2c 20 72 6f 6f 74 49 74 65 6d 29 20 69 73 20 41 63 74 69 6f 6e 54 72 ndItem(id,.rootItem).is.ActionTr
4f60 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 eeItemBase.item))...............
4f80 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 ...return;................//.If.
4fa0 77 65 20 68 61 76 65 20 61 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 20 68 61 6e 64 6c 65 72 2c 20 we.have.a.double-click.handler,.
4fc0 67 69 76 65 20 69 74 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 77 68 61 74 20 68 61 70 70 65 6e give.it.control.over.what.happen
4fe0 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 6e 44 6f 75 62 6c 65 43 6c 69 63 s...............if.(onDoubleClic
5000 6b 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 k.!=.null)..............{.......
5020 20 20 20 20 20 20 20 20 20 20 20 6f 6e 44 6f 75 62 6c 65 43 6c 69 63 6b 28 69 74 65 6d 29 3b 0d ...........onDoubleClick(item);.
5040 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 65 6c 73 65 .............}..............else
5060 20 69 66 20 28 69 74 65 6d 2e 63 61 6e 52 65 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .if.(item.canRename)............
5080 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 74 68 65 72 77 69 73 ..{..................//.Otherwis
50a0 65 2c 20 70 65 72 66 6f 72 6d 20 61 20 72 65 6e 61 6d 65 20 62 79 20 64 65 66 61 75 6c 74 2e 0d e,.perform.a.rename.by.default..
50c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 65 67 69 6e 52 65 6e 61 6d 65 28 69 74 65 .................BeginRename(ite
50e0 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d m);..............}..........}...
5100 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 .........#endregion............#
5120 72 65 67 69 6f 6e 20 44 72 61 67 26 44 72 6f 70 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 region.Drag&Drop............prot
5140 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 62 6f 6f 6c 20 43 61 6e 53 74 61 72 74 44 72 61 67 ected.override.bool.CanStartDrag
5160 28 43 61 6e 53 74 61 72 74 44 72 61 67 41 72 67 73 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 (CanStartDragArgs.args).........
5180 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 .{..............return.true;....
51a0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 ......}............protected.ove
51c0 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 75 70 44 72 61 67 41 6e 64 44 72 6f 70 28 53 65 74 75 rride.void.SetupDragAndDrop(Setu
51e0 70 44 72 61 67 41 6e 64 44 72 6f 70 41 72 67 73 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 20 pDragAndDropArgs.args)..........
5200 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 67 41 6e 64 44 72 6f 70 2e 50 72 65 70 61 {..............DragAndDrop.Prepa
5220 72 65 53 74 61 72 74 44 72 61 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 67 reStartDrag();..............Drag
5240 41 6e 64 44 72 6f 70 2e 53 65 74 47 65 6e 65 72 69 63 44 61 74 61 28 22 69 74 65 6d 49 44 73 22 AndDrop.SetGenericData("itemIDs"
5260 2c 20 61 72 67 73 2e 64 72 61 67 67 65 64 49 74 65 6d 49 44 73 2e 54 6f 41 72 72 61 79 28 29 29 ,.args.draggedItemIDs.ToArray())
5280 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 67 41 6e 64 44 72 6f 70 2e 53 65 74 47 65 ;..............DragAndDrop.SetGe
52a0 6e 65 72 69 63 44 61 74 61 28 22 74 72 65 65 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 nericData("tree",.this);........
52c0 20 20 20 20 20 20 44 72 61 67 41 6e 64 44 72 6f 70 2e 53 74 61 72 74 44 72 61 67 28 73 74 72 69 ......DragAndDrop.StartDrag(stri
52e0 6e 67 2e 4a 6f 69 6e 28 22 2c 22 2c 20 61 72 67 73 2e 64 72 61 67 67 65 64 49 74 65 6d 49 44 73 ng.Join(",",.args.draggedItemIDs
5300 2e 53 65 6c 65 63 74 28 69 64 20 3d 3e 20 46 69 6e 64 49 74 65 6d 28 69 64 2c 20 72 6f 6f 74 49 .Select(id.=>.FindItem(id,.rootI
5320 74 65 6d 29 2e 64 69 73 70 6c 61 79 4e 61 6d 65 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d tem).displayName)));..........}.
5340 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 44 72 ...........protected.override.Dr
5360 61 67 41 6e 64 44 72 6f 70 56 69 73 75 61 6c 4d 6f 64 65 20 48 61 6e 64 6c 65 44 72 61 67 41 6e agAndDropVisualMode.HandleDragAn
5380 64 44 72 6f 70 28 44 72 61 67 41 6e 64 44 72 6f 70 41 72 67 73 20 61 72 67 73 29 0d 0a 20 20 20 dDrop(DragAndDropArgs.args).....
53a0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 6f 75 72 63 65 54 72 .....{..............var.sourceTr
53c0 65 65 20 3d 20 44 72 61 67 41 6e 64 44 72 6f 70 2e 47 65 74 47 65 6e 65 72 69 63 44 61 74 61 28 ee.=.DragAndDrop.GetGenericData(
53e0 22 74 72 65 65 22 29 20 61 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 54 72 65 65 56 69 65 77 3b 0d "tree").as.InputActionTreeView;.
5400 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 6f 75 72 63 65 54 72 65 65 20 3d 3d 20 6e .............if.(sourceTree.==.n
5420 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 72 61 ull)..................return.Dra
5440 67 41 6e 64 44 72 6f 70 56 69 73 75 61 6c 4d 6f 64 65 2e 52 65 6a 65 63 74 65 64 3b 0d 0a 0d 0a gAndDropVisualMode.Rejected;....
5460 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 49 64 73 20 3d 20 28 69 6e 74 5b 5d ............var.itemIds.=.(int[]
5480 29 44 72 61 67 41 6e 64 44 72 6f 70 2e 47 65 74 47 65 6e 65 72 69 63 44 61 74 61 28 22 69 74 65 )DragAndDrop.GetGenericData("ite
54a0 6d 49 44 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 6c 74 4b 65 79 49 mIDs");..............var.altKeyI
54c0 73 44 6f 77 6e 20 3d 20 45 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 61 6c 74 3b 0d 0a 0d 0a 20 20 sDown.=.Event.current.alt;......
54e0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6a 65 63 74 20 74 68 65 20 64 72 61 67 20 69 66 20 ..........//.Reject.the.drag.if.
5500 74 68 65 20 70 61 72 65 6e 74 20 69 74 65 6d 20 64 6f 65 73 20 6e 6f 74 20 61 63 63 65 70 74 20 the.parent.item.does.not.accept.
5520 74 68 65 20 64 72 6f 70 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 72 67 73 2e the.drop...............if.(args.
5540 70 61 72 65 6e 74 49 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 parentItem.is.ActionTreeItemBase
5560 20 70 61 72 65 6e 74 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .parentItem)..............{.....
5580 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 49 64 73 2e 41 6e 79 28 69 64 20 .............if.(itemIds.Any(id.
55a0 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 70 61 72 65 6e 74 49 =>......................!parentI
55c0 74 65 6d 2e 41 63 63 65 70 74 73 44 72 6f 70 28 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 tem.AcceptsDrop((ActionTreeItemB
55e0 61 73 65 29 73 6f 75 72 63 65 54 72 65 65 2e 46 69 6e 64 49 74 65 6d 28 69 64 2c 20 73 6f 75 72 ase)sourceTree.FindItem(id,.sour
5600 63 65 54 72 65 65 2e 72 6f 6f 74 49 74 65 6d 29 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ceTree.rootItem)))).............
5620 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 72 61 67 41 6e 64 44 72 6f 70 56 69 73 75 61 .........return.DragAndDropVisua
5640 6c 4d 6f 64 65 2e 52 65 6a 65 63 74 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a lMode.Rejected;..............}..
5660 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d ............else..............{.
5680 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 72 6f 6f 74 20 .................//.If.the.root.
56a0 69 74 65 6d 20 69 73 6e 27 74 20 61 6e 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 item.isn't.an.ActionTreeItemBase
56c0 2c 20 77 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 20 74 72 65 65 20 74 68 61 74 20 73 ,.we're.looking.at.a.tree.that.s
56e0 74 61 72 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 6c 6c 20 74 68 tarts..................//.all.th
5700 65 20 77 61 79 20 75 70 20 61 74 20 74 68 65 20 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 e.way.up.at.the.InputActionAsset
5720 2e 20 52 65 71 75 69 72 65 20 74 68 65 20 64 72 6f 70 20 74 6f 20 62 65 20 61 6c 6c 20 61 63 74 ..Require.the.drop.to.be.all.act
5740 69 6f 6e 20 6d 61 70 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 ion.maps...................if.(i
5760 74 65 6d 49 64 73 2e 41 6e 79 28 69 64 20 3d 3e 20 21 28 73 6f 75 72 63 65 54 72 65 65 2e 46 69 temIds.Any(id.=>.!(sourceTree.Fi
5780 6e 64 49 74 65 6d 28 69 64 2c 20 73 6f 75 72 63 65 54 72 65 65 2e 72 6f 6f 74 49 74 65 6d 29 20 ndItem(id,.sourceTree.rootItem).
57a0 69 73 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 29 29 29 0d 0a 20 20 20 20 20 20 20 is.ActionMapTreeItem))).........
57c0 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 72 61 67 41 6e 64 44 72 6f 70 56 .............return.DragAndDropV
57e0 69 73 75 61 6c 4d 6f 64 65 2e 52 65 6a 65 63 74 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 isualMode.Rejected;.............
5800 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 64 72 6f 70 .}................//.Handle.drop
5820 20 75 73 69 6e 67 20 63 6f 70 79 2d 70 61 73 74 65 2e 20 54 68 69 73 20 61 6c 6c 6f 77 73 20 68 .using.copy-paste..This.allows.h
5840 61 6e 64 6c 69 6e 67 20 61 6c 6c 20 74 68 65 20 76 61 72 69 6f 75 73 20 6f 70 65 72 61 74 69 6f andling.all.the.various.operatio
5860 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 75 73 69 6e 67 20 61 20 73 69 6e 67 6c ns..............//.using.a.singl
5880 65 20 63 6f 64 65 20 70 61 74 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 e.code.path...............var.is
58a0 4d 6f 76 65 20 3d 20 21 61 6c 74 4b 65 79 49 73 44 6f 77 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 Move.=.!altKeyIsDown;...........
58c0 20 20 20 69 66 20 28 61 72 67 73 2e 70 65 72 66 6f 72 6d 44 72 6f 70 29 0d 0a 20 20 20 20 20 20 ...if.(args.performDrop)........
58e0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 70 79 ......{..................//.Copy
5900 20 69 74 65 6d 20 64 61 74 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 .item.data...................var
5920 20 63 6f 70 79 42 75 66 66 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 .copyBuffer.=.new.StringBuilder(
5940 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 73 20 3d 20 );..................var.items.=.
5960 69 74 65 6d 49 64 73 2e 53 65 6c 65 63 74 28 69 64 20 3d 3e 20 28 41 63 74 69 6f 6e 54 72 65 65 itemIds.Select(id.=>.(ActionTree
5980 49 74 65 6d 42 61 73 65 29 73 6f 75 72 63 65 54 72 65 65 2e 46 69 6e 64 49 74 65 6d 28 69 64 2c ItemBase)sourceTree.FindItem(id,
59a0 20 73 6f 75 72 63 65 54 72 65 65 2e 72 6f 6f 74 49 74 65 6d 29 29 3b 0d 0a 20 20 20 20 20 20 20 .sourceTree.rootItem));.........
59c0 20 20 20 20 20 20 20 20 20 43 6f 70 79 49 74 65 6d 73 28 69 74 65 6d 73 2c 20 63 6f 70 79 42 75 .........CopyItems(items,.copyBu
59e0 66 66 65 72 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 49 66 20 ffer);....................//.If.
5a00 77 65 27 72 65 20 6d 6f 76 69 6e 67 20 69 74 65 6d 73 20 77 69 74 68 69 6e 20 74 68 65 20 73 61 we're.moving.items.within.the.sa
5a20 6d 65 20 74 72 65 65 2c 20 6e 6f 20 6e 65 65 64 20 74 6f 20 67 65 6e 65 72 61 74 65 20 6e 65 77 me.tree,.no.need.to.generate.new
5a40 20 49 44 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 73 73 69 67 .IDs...................var.assig
5a60 6e 4e 65 77 49 44 73 20 3d 20 21 28 69 73 4d 6f 76 65 20 26 26 20 73 6f 75 72 63 65 54 72 65 65 nNewIDs.=.!(isMove.&&.sourceTree
5a80 20 3d 3d 20 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .==.this);....................//
5aa0 20 44 65 74 65 72 6d 69 6e 65 20 77 68 65 72 65 20 77 65 20 61 72 65 20 6d 6f 76 69 6e 67 2f 63 .Determine.where.we.are.moving/c
5ac0 6f 70 79 69 6e 67 20 74 68 65 20 64 61 74 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 opying.the.data.................
5ae0 20 20 76 61 72 20 74 61 72 67 65 74 20 3d 20 61 72 67 73 2e 70 61 72 65 6e 74 49 74 65 6d 20 3f ..var.target.=.args.parentItem.?
5b00 3f 20 72 6f 6f 74 49 74 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 ?.rootItem;..................int
5b20 3f 20 63 68 69 6c 64 49 6e 64 65 78 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ?.childIndex.=.null;............
5b40 20 20 20 20 20 20 69 66 20 28 61 72 67 73 2e 64 72 61 67 41 6e 64 44 72 6f 70 50 6f 73 69 74 69 ......if.(args.dragAndDropPositi
5b60 6f 6e 20 3d 3d 20 44 72 61 67 41 6e 64 44 72 6f 70 50 6f 73 69 74 69 6f 6e 2e 42 65 74 77 65 65 on.==.DragAndDropPosition.Betwee
5b80 6e 49 74 65 6d 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 69 nItems)......................chi
5ba0 6c 64 49 6e 64 65 78 20 3d 20 61 72 67 73 2e 69 6e 73 65 72 74 41 74 49 6e 64 65 78 3b 0d 0a 0d ldIndex.=.args.insertAtIndex;...
5bc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 61 6c 74 20 69 73 6e 27 74 .................//.If.alt.isn't
5be0 20 64 6f 77 6e 20 28 69 2e 65 2e 20 77 65 27 72 65 20 6e 6f 74 20 64 75 70 6c 69 63 61 74 69 6e .down.(i.e..we're.not.duplicatin
5c00 67 29 2c 20 64 65 6c 65 74 65 20 6f 6c 64 20 69 74 65 6d 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 g),.delete.old.items............
5c20 20 20 20 20 20 20 20 2f 2f 20 44 6f 20 74 68 69 73 20 2a 62 65 66 6f 72 65 2a 20 70 61 73 74 69 .......//.Do.this.*before*.pasti
5c40 6e 67 20 73 6f 20 74 68 61 74 20 61 73 73 69 67 6e 69 6e 67 20 6e 65 77 20 6e 61 6d 65 73 20 77 ng.so.that.assigning.new.names.w
5c60 69 6c 6c 20 6e 6f 74 20 63 61 75 73 65 20 6e 61 6d 65 73 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 ill.not.cause.names.to..........
5c80 20 20 20 20 20 20 20 20 2f 2f 20 63 68 61 6e 67 65 20 77 68 65 6e 20 6a 75 73 74 20 6d 6f 76 69 ........//.change.when.just.movi
5ca0 6e 67 20 69 74 65 6d 73 20 61 72 6f 75 6e 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng.items.around.................
5cc0 20 20 69 66 20 28 69 73 4d 6f 76 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b ..if.(isMove)..................{
5ce0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 6f 6e 27 74 20 75 ......................//.Don't.u
5d00 73 65 20 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 20 61 se.DeleteDataOfSelectedItems().a
5d20 73 20 74 68 61 74 20 77 69 6c 6c 20 72 65 63 6f 72 64 20 61 73 20 61 20 73 65 70 61 72 61 74 65 s.that.will.record.as.a.separate
5d40 20 6f 70 65 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .operation......................
5d60 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 69 74 65 6d 20 69 6e 20 69 74 65 6d 73 29 0d 0a 20 20 .foreach.(var.item.in.items)....
5d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
5da0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 27 72 65 20 64 72 6f 70 70 69 6e .............//.If.we're.droppin
5dc0 67 20 2a 62 65 74 77 65 65 6e 2a 20 69 74 65 6d 73 20 6f 6e 20 74 68 65 20 73 61 6d 65 20 70 61 g.*between*.items.on.the.same.pa
5de0 72 65 6e 74 20 61 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 74 65 6d 20 61 6e 64 20 74 68 65 rent.as.the.current.item.and.the
5e00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 64 ..........................//.ind
5e20 65 78 20 77 65 27 72 65 20 64 72 6f 70 70 69 6e 67 20 61 74 20 28 69 6e 20 74 68 65 20 70 61 72 ex.we're.dropping.at.(in.the.par
5e40 65 6e 74 2c 20 4e 4f 54 20 69 6e 20 74 68 65 20 61 72 72 61 79 29 20 69 73 20 63 6f 6d 69 6e 67 ent,.NOT.in.the.array).is.coming
5e60 20 2a 61 66 74 65 72 2a 20 74 68 69 73 20 69 74 65 6d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .*after*.this.item,.............
5e80 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 6e 20 64 65 6c 65 74 69 6e 67 20 74 68 .............//.then.deleting.th
5ea0 65 20 69 74 65 6d 20 77 69 6c 6c 20 73 68 69 66 74 20 74 68 65 20 74 61 72 67 65 74 20 69 6e 64 e.item.will.shift.the.target.ind
5ec0 65 78 20 64 6f 77 6e 20 62 79 20 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ex.down.by.one..................
5ee0 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 2e 70 61 72 65 6e 74 20 3d 3d 20 74 61 72 67 .........if.(item.parent.==.targ
5f00 65 74 20 26 26 20 63 68 69 6c 64 49 6e 64 65 78 20 21 3d 20 6e 75 6c 6c 20 26 26 20 63 68 69 6c et.&&.childIndex.!=.null.&&.chil
5f20 64 49 6e 64 65 78 20 3e 20 74 61 72 67 65 74 2e 63 68 69 6c 64 72 65 6e 2e 49 6e 64 65 78 4f 66 dIndex.>.target.children.IndexOf
5f40 28 69 74 65 6d 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 (item)).........................
5f60 20 20 20 20 20 2d 2d 63 68 69 6c 64 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 .....--childIndex;..............
5f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 2e 44 65 6c 65 74 65 44 61 74 61 28 29 3b ..............item.DeleteData();
5fa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
5fc0 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 .........}....................//
5fe0 20 50 61 73 74 65 20 69 74 65 6d 73 20 6f 6e 74 6f 20 74 61 72 67 65 74 2e 0d 0a 20 20 20 20 20 .Paste.items.onto.target........
6000 20 20 20 20 20 20 20 20 20 20 20 50 61 73 74 65 49 74 65 6d 73 28 63 6f 70 79 42 75 66 66 65 72 ...........PasteItems(copyBuffer
6020 2e 54 6f 53 74 72 69 6e 67 28 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .ToString(),....................
6040 20 20 6e 65 77 5b 5d 20 7b 20 6e 65 77 20 49 6e 73 65 72 74 4c 6f 63 61 74 69 6f 6e 20 7b 69 74 ..new[].{.new.InsertLocation.{it
6060 65 6d 20 3d 20 74 61 72 67 65 74 2c 20 63 68 69 6c 64 49 6e 64 65 78 20 3d 20 63 68 69 6c 64 49 em.=.target,.childIndex.=.childI
6080 6e 64 65 78 7d 20 7d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 73 ndex}.},......................as
60a0 73 69 67 6e 4e 65 77 49 44 73 3a 20 61 73 73 69 67 6e 4e 65 77 49 44 73 29 3b 0d 0a 0d 0a 20 20 signNewIDs:.assignNewIDs);......
60c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 67 41 6e 64 44 72 6f 70 2e 41 63 63 65 70 74 ..............DragAndDrop.Accept
60e0 44 72 61 67 28 29 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 Drag();..............}..........
6100 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 73 4d 6f 76 65 20 3f 20 44 72 61 67 41 6e 64 44 72 6f ......return.isMove.?.DragAndDro
6120 70 56 69 73 75 61 6c 4d 6f 64 65 2e 4d 6f 76 65 20 3a 20 44 72 61 67 41 6e 64 44 72 6f 70 56 69 pVisualMode.Move.:.DragAndDropVi
6140 73 75 61 6c 4d 6f 64 65 2e 43 6f 70 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 sualMode.Copy;..........}.......
6160 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 .....#endregion............#regi
6180 6f 6e 20 43 6f 70 79 26 50 61 73 74 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 65 73 on.Copy&Paste............//.Thes
61a0 65 20 6e 65 65 64 20 74 6f 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 77 68 61 74 20 74 68 65 e.need.to.correspond.to.what.the
61c0 20 65 64 69 74 6f 72 20 69 73 20 73 65 6e 64 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 22 45 64 69 .editor.is.sending.from.the."Edi
61e0 74 22 20 6d 65 6e 75 2e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 t".menu...........public.const.s
6200 74 72 69 6e 67 20 6b 5f 43 6f 70 79 43 6f 6d 6d 61 6e 64 20 3d 20 22 43 6f 70 79 22 3b 0d 0a 20 tring.k_CopyCommand.=."Copy";...
6220 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 50 61 73 .......public.const.string.k_Pas
6240 74 65 43 6f 6d 6d 61 6e 64 20 3d 20 22 50 61 73 74 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 teCommand.=."Paste";..........pu
6260 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 44 75 70 6c 69 63 61 74 65 43 6f 6d blic.const.string.k_DuplicateCom
6280 6d 61 6e 64 20 3d 20 22 44 75 70 6c 69 63 61 74 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 mand.=."Duplicate";..........pub
62a0 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 43 75 74 43 6f 6d 6d 61 6e 64 20 3d 20 lic.const.string.k_CutCommand.=.
62c0 22 43 75 74 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 "Cut";..........public.const.str
62e0 69 6e 67 20 6b 5f 44 65 6c 65 74 65 43 6f 6d 6d 61 6e 64 20 3d 20 22 44 65 6c 65 74 65 22 3b 0d ing.k_DeleteCommand.=."Delete";.
6300 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 48 61 6e 64 6c 65 43 6f 70 ...........public.void.HandleCop
6320 79 50 61 73 74 65 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 45 76 65 6e 74 20 75 69 45 76 65 6e 74 yPasteCommandEvent(Event.uiEvent
6340 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 75 69 )..........{..............if.(ui
6360 45 76 65 6e 74 2e 74 79 70 65 20 3d 3d 20 45 76 65 6e 74 54 79 70 65 2e 56 61 6c 69 64 61 74 65 Event.type.==.EventType.Validate
6380 43 6f 6d 6d 61 6e 64 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 Command)..............{.........
63a0 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 75 69 45 76 65 6e 74 2e 63 6f 6d 6d 61 6e 64 .........switch.(uiEvent.command
63c0 4e 61 6d 65 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 Name)..................{........
63e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 43 6f 70 79 43 6f 6d 6d 61 6e 64 ..............case.k_CopyCommand
6400 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 43 75 :......................case.k_Cu
6420 74 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 tCommand:......................c
6440 61 73 65 20 6b 5f 44 75 70 6c 69 63 61 74 65 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 ase.k_DuplicateCommand:.........
6460 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 44 65 6c 65 74 65 43 6f 6d 6d 61 6e .............case.k_DeleteComman
6480 64 3a 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 69 66 20 28 d:..........................if.(
64a0 48 61 73 53 65 6c 65 63 74 69 6f 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 HasSelection()).................
64c0 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 45 76 65 6e 74 2e 55 73 65 28 29 3b 0d 0a 20 20 20 .............uiEvent.Use();.....
64e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 .....................break;.....
6500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 50 61 73 74 65 43 ...................case.k_PasteC
6520 6f 6d 6d 61 6e 64 3a 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 ommand:.........................
6540 20 76 61 72 20 73 79 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 20 3d 20 45 64 69 74 6f 72 48 65 .var.systemCopyBuffer.=.EditorHe
6560 6c 70 65 72 73 2e 47 65 74 53 79 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 43 6f 6e 74 65 6e 74 lpers.GetSystemCopyBufferContent
6580 73 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 20 20 20 20 69 66 s();..........................if
65a0 20 28 73 79 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 20 21 3d 20 6e 75 6c 6c 20 26 26 20 73 79 .(systemCopyBuffer.!=.null.&&.sy
65c0 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 2e 53 74 61 72 74 73 57 69 74 68 28 6b 5f 43 6f 70 79 stemCopyBuffer.StartsWith(k_Copy
65e0 50 61 73 74 65 4d 61 72 6b 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 PasteMarker))...................
6600 20 20 20 20 20 20 20 20 20 20 20 75 69 45 76 65 6e 74 2e 55 73 65 28 29 3b 0d 0a 20 20 20 20 20 ...........uiEvent.Use();.......
6620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 ...................break;.......
6640 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ...........}..............}.....
6660 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 75 69 45 76 65 6e 74 2e 74 79 70 65 20 3d .........else.if.(uiEvent.type.=
6680 3d 20 45 76 65 6e 74 54 79 70 65 2e 45 78 65 63 75 74 65 43 6f 6d 6d 61 6e 64 29 0d 0a 20 20 20 =.EventType.ExecuteCommand).....
66a0 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 73 77 69 74 .........{..................swit
66c0 63 68 20 28 75 69 45 76 65 6e 74 2e 63 6f 6d 6d 61 6e 64 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 ch.(uiEvent.commandName)........
66e0 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 ..........{.....................
6700 20 63 61 73 65 20 6b 5f 43 6f 70 79 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 .case.k_CopyCommand:............
6720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 54 ..............CopySelectedItemsT
6740 6f 43 6c 69 70 62 6f 61 72 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 oClipboard();...................
6760 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......break;...................
6780 20 20 20 63 61 73 65 20 6b 5f 50 61 73 74 65 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 ...case.k_PasteCommand:.........
67a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 61 73 74 65 44 61 74 61 46 72 6f 6d 43 6c .................PasteDataFromCl
67c0 69 70 62 6f 61 72 64 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 ipboard();......................
67e0 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....break;......................
6800 63 61 73 65 20 6b 5f 43 75 74 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 case.k_CutCommand:..............
6820 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 54 6f 43 ............CopySelectedItemsToC
6840 6c 69 70 62 6f 61 72 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lipboard();.....................
6860 20 20 20 20 20 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 .....DeleteDataOfSelectedItems()
6880 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b ;..........................break
68a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 44 75 ;......................case.k_Du
68c0 70 6c 69 63 61 74 65 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 plicateCommand:.................
68e0 20 20 20 20 20 20 20 20 20 44 75 70 6c 69 63 61 74 65 53 65 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a .........DuplicateSelection();..
6900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a ........................break;..
6920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 44 65 6c 65 74 ....................case.k_Delet
6940 65 43 6f 6d 6d 61 6e 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eCommand:.......................
6960 20 20 20 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 3b 0d ...DeleteDataOfSelectedItems();.
6980 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 62 72 65 61 6b 3b 0d .........................break;.
69a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 3a 0d 0a 20 .....................default:...
69c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a .......................return;..
69e0 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 20 20 ................}...............
6a00 20 20 20 75 69 45 76 65 6e 74 2e 55 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d ...uiEvent.Use();..............}
6a20 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 ..........}............private.v
6a40 6f 69 64 20 44 75 70 6c 69 63 61 74 65 53 65 6c 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 oid.DuplicateSelection()........
6a60 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 66 66 65 72 20 3d 20 6e 65 ..{..............var.buffer.=.ne
6a80 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 20 w.StringBuilder();..............
6aa0 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 61 20 6d 75 6c 74 69 2d 73 65 6c 65 63 74 69 6f ..//.If.we.have.a.multi-selectio
6ac0 6e 2c 20 77 65 20 77 61 6e 74 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 20 64 75 70 6c 69 63 n,.we.want.to.perform.the.duplic
6ae0 61 74 69 6f 6e 20 61 73 20 69 66 20 65 61 63 68 20 69 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 20 ation.as.if.each.item...........
6b00 20 20 20 2f 2f 20 77 61 73 20 64 75 70 6c 69 63 61 74 65 64 20 69 6e 64 69 76 69 64 75 61 6c 6c ...//.was.duplicated.individuall
6b20 79 2e 20 4d 65 61 6e 69 6e 67 20 77 65 20 70 61 73 74 65 20 65 61 63 68 20 64 75 70 6c 69 63 61 y..Meaning.we.paste.each.duplica
6b40 74 65 20 72 69 67 68 74 20 61 66 74 65 72 20 74 68 65 20 69 74 65 6d 0d 0a 20 20 20 20 20 20 20 te.right.after.the.item.........
6b60 20 20 20 20 20 2f 2f 20 69 74 20 77 61 73 20 64 75 70 6c 69 63 61 74 65 64 20 66 72 6f 6d 2e 20 .....//.it.was.duplicated.from..
6b80 53 6f 20 69 66 2c 20 73 61 79 2c 20 61 6e 20 61 63 74 69 6f 6e 20 69 73 20 73 65 6c 65 63 74 65 So.if,.say,.an.action.is.selecte
6ba0 64 20 61 74 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f 66 20 74 68 65 0d 0a 20 20 20 20 20 d.at.the.beginning.of.the.......
6bc0 20 20 20 20 20 20 20 2f 2f 20 74 72 65 65 20 61 6e 64 20 6f 6e 65 20 69 73 20 73 65 6c 65 63 74 .......//.tree.and.one.is.select
6be0 65 64 20 66 72 6f 6d 20 74 68 65 20 65 6e 64 20 6f 66 20 69 74 2c 20 77 65 20 73 74 69 6c 6c 20 ed.from.the.end.of.it,.we.still.
6c00 70 61 73 74 65 20 74 68 65 20 63 6f 70 69 65 73 20 69 6e 74 6f 20 74 68 65 0d 0a 20 20 20 20 20 paste.the.copies.into.the.......
6c20 20 20 20 20 20 20 20 2f 2f 20 74 77 6f 20 73 65 70 61 72 61 74 65 20 6c 6f 63 61 74 69 6f 6e 73 .......//.two.separate.locations
6c40 20 63 6f 72 72 65 63 74 6c 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 .correctly...............//.....
6c60 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 63 68 6e 69 63 61 6c 6c 79 2c 20 69 66 20 62 6f 74 68 .........//.Technically,.if.both
6c80 20 70 61 72 65 6e 74 73 20 61 6e 64 20 63 68 69 6c 64 72 65 6e 20 61 72 65 20 73 65 6c 65 63 74 .parents.and.children.are.select
6ca0 65 64 2c 20 77 65 27 72 65 20 6f 72 64 65 72 20 64 65 70 65 6e 64 65 6e 74 20 68 65 72 65 0d 0a ed,.we're.order.dependent.here..
6cc0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 75 74 20 6e 6f 74 20 73 75 72 65 20 77 65 20 72 ............//.but.not.sure.we.r
6ce0 65 61 6c 6c 79 20 6e 65 65 64 20 74 6f 20 63 61 72 65 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 eally.need.to.care..............
6d00 20 20 20 76 61 72 20 73 65 6c 65 63 74 69 6f 6e 20 3d 20 47 65 74 53 65 6c 65 63 74 69 6f 6e 28 ...var.selection.=.GetSelection(
6d20 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6c 65 61 72 53 65 6c 65 63 74 69 6f 6e 28 29 );..............ClearSelection()
6d40 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 70 79 2d 70 61 73 74 65 20 65 ;................//.Copy-paste.e
6d60 61 63 68 20 73 65 6c 65 63 74 65 64 20 69 74 65 6d 20 69 6e 20 74 75 72 6e 2e 0d 0a 20 20 20 20 ach.selected.item.in.turn.......
6d80 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 49 74 65 6d 49 64 73 20 3d 20 6e 65 77 20 4c 69 73 ........var.newItemIds.=.new.Lis
6da0 74 3c 69 6e 74 3e 28 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 t<int>();..............foreach.(
6dc0 76 61 72 20 69 64 20 69 6e 20 73 65 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 var.id.in.selection)............
6de0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 53 65 6c 65 63 74 69 6f ..{..................SetSelectio
6e00 6e 28 6e 65 77 5b 5d 20 7b 20 69 64 20 7d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 n(new[].{.id.});................
6e20 20 20 20 20 62 75 66 66 65 72 2e 4c 65 6e 67 74 68 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 ....buffer.Length.=.0;..........
6e40 20 20 20 20 20 20 20 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 54 6f 28 62 75 66 66 ........CopySelectedItemsTo(buff
6e60 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 61 73 74 65 44 61 74 61 46 er);..................PasteDataF
6e80 72 6f 6d 28 62 75 66 66 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 rom(buffer.ToString());.........
6ea0 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 49 74 65 6d 49 64 73 2e 41 64 64 52 61 6e 67 65 28 47 ...........newItemIds.AddRange(G
6ec0 65 74 53 65 6c 65 63 74 69 6f 6e 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a etSelection());..............}..
6ee0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 53 65 6c 65 63 74 69 6f 6e 28 6e 65 77 49 74 ..............SetSelection(newIt
6f00 65 6d 49 64 73 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 69 6e emIds);..........}............in
6f20 74 65 72 6e 61 6c 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 43 6f 70 79 50 61 73 74 65 4d ternal.const.string.k_CopyPasteM
6f40 61 72 6b 65 72 20 3d 20 22 49 4e 50 55 54 41 53 53 45 54 20 22 3b 0d 0a 20 20 20 20 20 20 20 20 arker.=."INPUTASSET.";..........
6f60 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 53 74 61 72 74 4f 66 54 65 private.const.string.k_StartOfTe
6f80 78 74 20 3d 20 22 5c 75 30 30 30 32 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 xt.=."\u0002";..........private.
6fa0 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 20 3d 20 const.string.k_StartOfHeading.=.
6fc0 22 5c 75 30 30 30 31 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 "\u0001";..........private.const
6fe0 20 73 74 72 69 6e 67 20 6b 5f 45 6e 64 4f 66 54 72 61 6e 73 6d 69 73 73 69 6f 6e 20 3d 20 22 5c .string.k_EndOfTransmission.=."\
7000 75 30 30 30 34 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 u0004";..........private.const.s
7020 74 72 69 6e 67 20 6b 5f 45 6e 64 4f 66 54 72 61 6e 73 6d 69 73 73 69 6f 6e 42 6c 6f 63 6b 20 3d tring.k_EndOfTransmissionBlock.=
7040 20 22 5c 75 30 30 31 37 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 ."\u0017";............///.<summa
7060 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 6f 70 79 20 74 68 65 20 63 75 72 72 65 6e ry>..........///.Copy.the.curren
7080 74 6c 79 20 73 65 6c 65 63 74 65 64 20 69 74 65 6d 73 20 74 6f 20 74 68 65 20 63 6c 69 70 62 6f tly.selected.items.to.the.clipbo
70a0 61 72 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ard...........///.</summary>....
70c0 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 45 64 69 74 6f 72 47 ......///.<seealso.cref="EditorG
70e0 55 49 55 74 69 6c 69 74 79 2e 73 79 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 22 2f 3e 0d 0a 20 UIUtility.systemCopyBuffer"/>...
7100 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 .......public.void.CopySelectedI
7120 74 65 6d 73 54 6f 43 6c 69 70 62 6f 61 72 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 temsToClipboard()..........{....
7140 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 70 79 42 75 66 66 65 72 20 3d 20 6e 65 77 20 53 ..........var.copyBuffer.=.new.S
7160 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 70 tringBuilder();..............Cop
7180 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 54 6f 28 63 6f 70 79 42 75 66 66 65 72 29 3b 0d 0a 20 ySelectedItemsTo(copyBuffer);...
71a0 20 20 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 48 65 6c 70 65 72 73 2e 53 65 74 53 79 73 74 ...........EditorHelpers.SetSyst
71c0 65 6d 43 6f 70 79 42 75 66 66 65 72 43 6f 6e 74 65 6e 74 73 28 63 6f 70 79 42 75 66 66 65 72 2e emCopyBufferContents(copyBuffer.
71e0 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ToString());..........}.........
7200 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 ...public.void.CopySelectedItems
7220 54 6f 28 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 62 75 66 66 65 72 29 0d 0a 20 20 20 20 20 20 To(StringBuilder.buffer)........
7240 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 70 79 49 74 65 6d 73 28 47 65 74 53 65 ..{..............CopyItems(GetSe
7260 6c 65 63 74 65 64 49 74 65 6d 73 57 69 74 68 43 68 69 6c 64 72 65 6e 46 69 6c 74 65 72 65 64 4f lectedItemsWithChildrenFilteredO
7280 75 74 28 29 2c 20 62 75 66 66 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ut(),.buffer);..........}.......
72a0 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 20 43 6f 70 79 49 74 65 6d .....public.static.void.CopyItem
72c0 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 s(IEnumerable<ActionTreeItemBase
72e0 3e 20 69 74 65 6d 73 2c 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 62 75 66 66 65 72 29 0d 0a >.items,.StringBuilder.buffer)..
7300 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 ........{..............buffer.Ap
7320 70 65 6e 64 28 6b 5f 43 6f 70 79 50 61 73 74 65 4d 61 72 6b 65 72 29 3b 0d 0a 20 20 20 20 20 20 pend(k_CopyPasteMarker);........
7340 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 69 74 65 6d 20 69 6e 20 69 74 65 6d 73 ......foreach.(var.item.in.items
7360 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 )..............{................
7380 20 20 43 6f 70 79 49 74 65 6d 44 61 74 61 28 69 74 65 6d 2c 20 62 75 66 66 65 72 29 3b 0d 0a 20 ..CopyItemData(item,.buffer);...
73a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 6b 5f 45 ...............buffer.Append(k_E
73c0 6e 64 4f 66 54 72 61 6e 73 6d 69 73 73 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ndOfTransmission);..............
73e0 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 72 69 76 61 74 65 20 }..........}............private.
7400 73 74 61 74 69 63 20 76 6f 69 64 20 43 6f 70 79 49 74 65 6d 44 61 74 61 28 41 63 74 69 6f 6e 54 static.void.CopyItemData(ActionT
7420 72 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d 2c 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 reeItemBase.item,.StringBuilder.
7440 62 75 66 66 65 72 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 buffer)..........{..............
7460 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 29 3b buffer.Append(k_StartOfHeading);
7480 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 69 74 65 6d ..............buffer.Append(item
74a0 2e 47 65 74 54 79 70 65 28 29 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 .GetType().Name);..............b
74c0 75 66 66 65 72 2e 41 70 70 65 6e 64 28 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 29 3b 0d 0a 20 20 uffer.Append(k_StartOfText);....
74e0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 73 20 68 61 76 ..........//.InputActionMaps.hav
7500 65 20 62 61 63 6b 2d 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 49 6e 70 75 74 41 63 74 69 6f 6e e.back-references.to.InputAction
7520 41 73 73 65 74 73 2e 20 4d 61 6b 65 20 73 75 72 65 20 77 65 20 69 67 6e 6f 72 65 20 74 68 6f 73 Assets..Make.sure.we.ignore.thos
7540 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 69 74 e...............buffer.Append(it
7560 65 6d 2e 70 72 6f 70 65 72 74 79 2e 43 6f 70 79 54 6f 4a 73 6f 6e 28 69 67 6e 6f 72 65 4f 62 6a em.property.CopyToJson(ignoreObj
7580 65 63 74 52 65 66 65 72 65 6e 63 65 73 3a 20 74 72 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ectReferences:.true));..........
75a0 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 6b 5f 45 6e 64 4f 66 54 72 61 6e 73 6d 69 ....buffer.Append(k_EndOfTransmi
75c0 73 73 69 6f 6e 42 6c 6f 63 6b 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f ssionBlock);................////
75e0 46 49 58 4d 45 3a 20 52 65 6c 79 69 6e 67 20 6f 6e 20 73 65 72 69 61 6c 69 7a 61 74 69 6f 6e 20 FIXME:.Relying.on.serialization.
7600 74 68 69 73 20 77 61 79 20 74 6f 20 73 6e 61 70 73 68 6f 74 20 61 6e 20 65 6e 74 69 72 65 20 6f this.way.to.snapshot.an.entire.o
7620 62 6a 65 63 74 20 68 61 73 20 74 68 65 20 64 6f 77 6e 73 69 64 65 20 74 68 61 74 0d 0a 20 20 20 bject.has.the.downside.that.....
7640 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 74 68 65 73 65 20 69 74 65 6d 73 20 .........////.......these.items.
7660 77 6f 72 6b 20 64 69 66 66 65 72 65 6e 74 6c 79 20 66 6f 72 20 63 6f 70 79 2d 70 61 73 74 65 20 work.differently.for.copy-paste.
7680 74 68 61 6e 20 6f 74 68 65 72 73 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 63 6f 70 79 69 6e than.others..For.example,.copyin
76a0 67 20 61 6e 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 g.an.action..............////...
76c0 20 20 20 20 6d 61 70 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 63 6f 70 79 20 69 74 73 20 65 6e 74 ....map.will.always.copy.its.ent
76e0 69 72 65 20 64 61 74 61 2c 20 72 65 67 61 72 64 6c 65 73 73 20 6f 66 20 74 68 65 20 63 75 72 72 ire.data,.regardless.of.the.curr
7700 65 6e 74 20 66 69 6c 74 65 72 20 73 74 61 74 65 2e 20 49 6e 20 63 6f 6e 74 72 61 73 74 2c 0d 0a ent.filter.state..In.contrast,..
7720 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 63 6f 70 79 69 6e 67 20 61 ............////.......copying.a
7740 6e 20 61 63 74 69 6f 6e 20 77 69 6c 6c 20 6f 6e 6c 79 20 63 6f 70 79 20 74 68 65 20 62 69 6e 64 n.action.will.only.copy.the.bind
7760 69 6e 67 73 20 74 68 61 74 20 61 72 65 20 76 69 73 69 62 6c 65 20 61 63 63 6f 72 64 69 6e 67 20 ings.that.are.visible.according.
7780 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f to.the.current..............////
77a0 20 20 20 20 20 20 20 76 69 65 77 20 66 69 6c 74 65 72 2e 20 54 68 69 73 20 63 6f 75 6c 64 20 62 .......view.filter..This.could.b
77c0 65 20 66 69 78 65 64 20 62 79 20 72 65 6d 6f 76 69 6e 67 20 73 65 72 69 61 6c 69 7a 65 64 44 61 e.fixed.by.removing.serializedDa
77e0 74 61 49 6e 63 6c 75 64 65 73 43 68 69 6c 64 72 65 6e 20 61 6e 64 20 61 6c 6c 6f 77 69 6e 67 0d taIncludesChildren.and.allowing.
7800 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 43 6f 70 79 54 6f 4a 73 .............////.......CopyToJs
7820 6f 6e 28 29 20 74 6f 20 6f 70 74 69 6f 6e 61 6c 6c 79 20 69 67 6e 6f 72 65 20 63 68 69 6c 64 20 on().to.optionally.ignore.child.
7840 70 72 6f 70 65 72 74 69 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 74 properties...............if.(!it
7860 65 6d 2e 73 65 72 69 61 6c 69 7a 65 64 44 61 74 61 49 6e 63 6c 75 64 65 73 43 68 69 6c 64 72 65 em.serializedDataIncludesChildre
7880 6e 20 26 26 20 69 74 65 6d 2e 68 61 73 43 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 n.&&.item.hasChildren)..........
78a0 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 69 74 ........foreach.(var.child.in.it
78c0 65 6d 2e 63 68 69 6c 64 72 65 6e 2e 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 em.children.OfType<ActionTreeIte
78e0 6d 42 61 73 65 3e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 mBase>())......................C
7900 6f 70 79 49 74 65 6d 44 61 74 61 28 63 68 69 6c 64 2c 20 62 75 66 66 65 72 29 3b 0d 0a 20 20 20 opyItemData(child,.buffer);.....
7920 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d .....}............///.<summary>.
7940 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 65 20 74 68 65 20 64 61 74 61 20 66 72 6f .........///.Remove.the.data.fro
7960 6d 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 73 65 6c 65 63 74 65 64 20 69 74 65 6d 73 20 66 m.the.currently.selected.items.f
7980 72 6f 6d 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a rom.the.<see.cref="SerializedObj
79a0 65 63 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 66 65 72 65 6e 63 65 64 20 62 ect"/>..........///.referenced.b
79c0 79 20 74 68 65 20 74 72 65 65 27 73 20 64 61 74 61 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 y.the.tree's.data...........///.
79e0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 </summary>..........public.void.
7a00 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 0d 0a 20 20 20 DeleteDataOfSelectedItems().....
7a20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 68 65 6e 20 64 65 6c 65 .....{..............//.When.dele
7a40 74 69 6e 67 20 64 61 74 61 2c 20 69 6e 64 69 63 65 73 20 77 69 6c 6c 20 73 68 69 66 74 20 61 72 ting.data,.indices.will.shift.ar
7a60 6f 75 6e 64 2e 20 48 6f 77 65 76 65 72 2c 20 77 65 20 64 6f 20 6e 6f 74 20 64 65 6c 65 74 65 20 ound..However,.we.do.not.delete.
7a80 65 6c 65 6d 65 6e 74 73 20 62 79 20 61 72 72 61 79 20 69 6e 64 69 63 65 73 0d 0a 20 20 20 20 20 elements.by.array.indices.......
7aa0 20 20 20 20 20 20 20 2f 2f 20 64 69 72 65 63 74 6c 79 20 62 75 74 20 72 61 74 68 65 72 20 62 79 .......//.directly.but.rather.by
7ac0 20 47 55 49 44 73 20 77 68 69 63 68 20 61 72 65 20 75 73 65 64 20 74 6f 20 6c 6f 6f 6b 20 75 70 .GUIDs.which.are.used.to.look.up
7ae0 20 61 72 72 61 79 20 69 6e 64 69 63 65 73 20 64 79 6e 61 6d 69 63 61 6c 6c 79 2e 20 54 68 69 73 .array.indices.dynamically..This
7b00 20 6d 65 61 6e 73 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 63 .means.that..............//.we.c
7b20 61 6e 20 73 61 66 65 6c 79 20 64 65 6c 65 74 65 20 74 68 65 20 69 74 65 6d 73 20 77 69 74 68 6f an.safely.delete.the.items.witho
7b40 75 74 20 77 6f 72 72 79 69 6e 67 20 61 62 6f 75 74 20 6f 6e 65 20 64 65 6c 65 74 69 6f 6e 20 61 ut.worrying.about.one.deletion.a
7b60 66 66 65 63 74 69 6e 67 20 74 68 65 20 6e 65 78 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ffecting.the.next...............
7b80 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 49 74 20 69 73 20 69 //..............//.NOTE:.It.is.i
7ba0 6d 70 6f 72 74 61 6e 74 20 74 68 61 74 20 77 65 20 66 69 72 73 74 20 66 65 74 63 68 20 2a 61 6c mportant.that.we.first.fetch.*al
7bc0 6c 2a 20 6f 66 20 74 68 65 20 73 65 6c 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 65 64 20 66 6f 72 l*.of.the.selection.filtered.for
7be0 20 70 61 72 65 6e 74 2f 63 68 69 6c 64 20 64 75 70 6c 69 63 61 74 65 73 2e 0d 0a 20 20 20 20 20 .parent/child.duplicates........
7c00 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 49 66 20 77 65 20 64 6f 6e 27 74 20 64 6f 20 73 .......//.......If.we.don't.do.s
7c20 6f 20 75 70 20 66 72 6f 6e 74 2c 20 74 68 65 20 64 65 6c 65 74 69 6f 6e 73 20 68 61 70 70 65 6e o.up.front,.the.deletions.happen
7c40 69 6e 67 20 6c 61 74 65 72 20 6d 61 79 20 73 74 61 72 74 20 69 6e 74 65 72 61 63 74 69 6e 67 20 ing.later.may.start.interacting.
7c60 77 69 74 68 20 6f 75 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 70 with.our..............//.......p
7c80 61 72 65 6e 74 2f 63 68 69 6c 64 20 74 65 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 arent/child.test...............v
7ca0 61 72 20 73 65 6c 65 63 74 69 6f 6e 20 3d 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 57 ar.selection.=.GetSelectedItemsW
7cc0 69 74 68 43 68 69 6c 64 72 65 6e 46 69 6c 74 65 72 65 64 4f 75 74 28 29 2e 54 6f 41 72 72 61 79 ithChildrenFilteredOut().ToArray
7ce0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 6f 75 72 20 ();................//.Clear.our.
7d00 63 75 72 72 65 6e 74 20 73 65 6c 65 63 74 69 6f 6e 2e 20 49 66 20 77 65 20 64 6f 6e 27 74 20 64 current.selection..If.we.don't.d
7d20 6f 20 74 68 69 73 20 66 69 72 73 74 2c 20 54 72 65 65 56 69 65 77 20 77 69 6c 6c 20 69 6d 70 6c o.this.first,.TreeView.will.impl
7d40 69 63 69 74 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 6c 65 61 72 20 74 68 65 icitly..............//.clear.the
7d60 20 73 65 6c 65 63 74 69 6f 6e 20 61 73 20 69 74 65 6d 73 20 64 69 73 61 70 70 65 61 72 20 62 75 .selection.as.items.disappear.bu
7d80 74 20 77 65 20 77 69 6c 6c 20 6e 6f 74 20 73 65 65 20 61 20 73 65 6c 65 63 74 69 6f 6e 20 63 68 t.we.will.not.see.a.selection.ch
7da0 61 6e 67 65 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ange.notification............../
7dc0 2f 20 62 65 69 6e 67 20 74 72 69 67 67 65 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 /.being.triggered...............
7de0 43 6c 65 61 72 53 65 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ClearSelection();...............
7e00 20 44 65 6c 65 74 65 49 74 65 6d 73 28 73 65 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 .DeleteItems(selection);........
7e20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 44 65 6c 65 74 ..}............public.void.Delet
7e40 65 49 74 65 6d 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 eItems(IEnumerable<ActionTreeIte
7e60 6d 42 61 73 65 3e 20 69 74 65 6d 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 mBase>.items)..........{........
7e80 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 69 74 65 6d 20 69 6e 20 69 74 65 6d 73 ......foreach.(var.item.in.items
7ea0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 2e 44 65 6c 65 74 65 44 61 )..................item.DeleteDa
7ec0 74 61 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 53 65 72 69 61 6c 69 7a 65 ta();................OnSerialize
7ee0 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d dObjectModified();..........}...
7f00 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 61 73 74 65 44 61 74 61 46 72 .........public.void.PasteDataFr
7f20 6f 6d 43 6c 69 70 62 6f 61 72 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 omClipboard()..........{........
7f40 20 20 20 20 20 20 50 61 73 74 65 44 61 74 61 46 72 6f 6d 28 45 64 69 74 6f 72 48 65 6c 70 65 72 ......PasteDataFrom(EditorHelper
7f60 73 2e 47 65 74 53 79 73 74 65 6d 43 6f 70 79 42 75 66 66 65 72 43 6f 6e 74 65 6e 74 73 28 29 29 s.GetSystemCopyBufferContents())
7f80 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 ;..........}............public.v
7fa0 6f 69 64 20 50 61 73 74 65 44 61 74 61 46 72 6f 6d 28 73 74 72 69 6e 67 20 63 6f 70 79 42 75 66 oid.PasteDataFrom(string.copyBuf
7fc0 66 65 72 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ferString)..........{...........
7fe0 20 20 20 69 66 20 28 21 63 6f 70 79 42 75 66 66 65 72 53 74 72 69 6e 67 2e 53 74 61 72 74 73 57 ...if.(!copyBufferString.StartsW
8000 69 74 68 28 6b 5f 43 6f 70 79 50 61 73 74 65 4d 61 72 6b 65 72 29 29 0d 0a 20 20 20 20 20 20 20 ith(k_CopyPasteMarker)).........
8020 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .........return;................
8040 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 66 69 6c 74 65 72 69 6e 67 20 6f 75 74 20 63 68 69 6c 64 72 ////REVIEW:.filtering.out.childr
8060 65 6e 20 6d 61 79 20 72 65 6d 6f 76 65 20 74 68 65 20 76 65 72 79 20 69 74 65 6d 20 77 65 20 6e en.may.remove.the.very.item.we.n
8080 65 65 64 20 74 6f 20 67 65 74 20 74 68 65 20 72 69 67 68 74 20 6d 61 74 63 68 20 66 6f 72 20 61 eed.to.get.the.right.match.for.a
80a0 20 63 6f 70 79 20 62 6c 6f 63 6b 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 61 73 74 65 49 .copy.block?..............PasteI
80c0 74 65 6d 73 28 63 6f 70 79 42 75 66 66 65 72 53 74 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 tems(copyBufferString,..........
80e0 20 20 20 20 20 20 20 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 57 69 74 68 43 68 69 6c ........GetSelectedItemsWithChil
8100 64 72 65 6e 46 69 6c 74 65 72 65 64 4f 75 74 28 29 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 6e 65 drenFilteredOut().Select(x.=>.ne
8120 77 20 49 6e 73 65 72 74 4c 6f 63 61 74 69 6f 6e 20 7b 69 74 65 6d 20 3d 20 78 7d 29 29 3b 0d 0a w.InsertLocation.{item.=.x}));..
8140 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 ........}............public.stru
8160 63 74 20 49 6e 73 65 72 74 4c 6f 63 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ct.InsertLocation..........{....
8180 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 69 74 ..........public.TreeViewItem.it
81a0 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 3f 20 63 68 69 em;..............public.int?.chi
81c0 6c 64 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 ldIndex;..........}............p
81e0 75 62 6c 69 63 20 76 6f 69 64 20 50 61 73 74 65 49 74 65 6d 73 28 73 74 72 69 6e 67 20 63 6f 70 ublic.void.PasteItems(string.cop
8200 79 42 75 66 66 65 72 53 74 72 69 6e 67 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 73 65 72 yBufferString,.IEnumerable<Inser
8220 74 4c 6f 63 61 74 69 6f 6e 3e 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 62 6f 6f 6c 20 61 73 73 69 67 tLocation>.locations,.bool.assig
8240 6e 4e 65 77 49 44 73 20 3d 20 74 72 75 65 2c 20 62 6f 6f 6c 20 73 65 6c 65 63 74 4e 65 77 49 74 nNewIDs.=.true,.bool.selectNewIt
8260 65 6d 73 20 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ems.=.true)..........{..........
8280 20 20 20 20 76 61 72 20 6e 65 77 49 74 65 6d 50 72 6f 70 65 72 74 79 50 61 74 68 73 20 3d 20 6e ....var.newItemPropertyPaths.=.n
82a0 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ew.List<string>();..............
82c0 20 20 2f 2f 20 53 70 6c 69 74 20 62 75 66 66 65 72 20 69 6e 74 6f 20 74 72 61 6e 73 6d 69 73 73 ..//.Split.buffer.into.transmiss
82e0 69 6f 6e 73 20 61 6e 64 20 74 68 65 6e 20 69 6e 74 6f 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 20 ions.and.then.into.transmission.
8300 62 6c 6f 63 6b 73 2e 20 45 61 63 68 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 20 69 73 20 61 6e 20 blocks..Each.transmission.is.an.
8320 69 74 65 6d 20 73 75 62 74 72 65 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6d 65 61 item.subtree..............//.mea
8340 6e 74 20 74 6f 20 62 65 20 70 61 73 74 65 64 20 61 73 20 61 20 77 68 6f 6c 65 20 61 6e 64 20 65 nt.to.be.pasted.as.a.whole.and.e
8360 61 63 68 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 20 62 6c 6f 63 6b 20 69 73 20 61 20 73 69 6e 67 ach.transmission.block.is.a.sing
8380 6c 65 20 63 68 75 6e 6b 20 6f 66 20 73 65 72 69 61 6c 69 7a 65 64 20 64 61 74 61 2e 0d 0a 20 20 le.chunk.of.serialized.data.....
83a0 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 74 72 61 6e 73 6d 69 73 73 ..........foreach.(var.transmiss
83c0 69 6f 6e 20 69 6e 20 63 6f 70 79 42 75 66 66 65 72 53 74 72 69 6e 67 2e 53 75 62 73 74 72 69 6e ion.in.copyBufferString.Substrin
83e0 67 28 6b 5f 43 6f 70 79 50 61 73 74 65 4d 61 72 6b 65 72 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 g(k_CopyPasteMarker.Length).....
8400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 53 70 6c 69 74 28 6e 65 77 5b 5d 20 7b ...................Split(new[].{
8420 6b 5f 45 6e 64 4f 66 54 72 61 6e 73 6d 69 73 73 69 6f 6e 7d 2c 20 53 74 72 69 6e 67 53 70 6c 69 k_EndOfTransmission},.StringSpli
8440 74 4f 70 74 69 6f 6e 73 2e 52 65 6d 6f 76 65 45 6d 70 74 79 45 6e 74 72 69 65 73 29 29 0d 0a 20 tOptions.RemoveEmptyEntries))...
8460 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 66 6f ...........{..................fo
8480 72 65 61 63 68 20 28 76 61 72 20 6c 6f 63 61 74 69 6f 6e 20 69 6e 20 6c 6f 63 61 74 69 6f 6e 73 reach.(var.location.in.locations
84a0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 61 73 74 65 42 6c 6f 63 )......................PasteBloc
84c0 6b 73 28 74 72 61 6e 73 6d 69 73 73 69 6f 6e 2c 20 6c 6f 63 61 74 69 6f 6e 2c 20 61 73 73 69 67 ks(transmission,.location,.assig
84e0 6e 4e 65 77 49 44 73 2c 20 6e 65 77 49 74 65 6d 50 72 6f 70 65 72 74 79 50 61 74 68 73 29 3b 0d nNewIDs,.newItemPropertyPaths);.
8500 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 4f 6e .............}................On
8520 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 28 29 3b 0d 0a 0d 0a 20 SerializedObjectModified();.....
8540 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 69 6e 73 74 72 75 63 74 65 64 20 74 6f 20 64 ...........//.If.instructed.to.d
8560 6f 20 73 6f 2c 20 67 6f 20 61 6e 64 20 73 65 6c 65 63 74 20 61 6c 6c 20 6e 65 77 6c 79 20 61 64 o.so,.go.and.select.all.newly.ad
8580 64 65 64 20 69 74 65 6d 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 6c 65 ded.items...............if.(sele
85a0 63 74 4e 65 77 49 74 65 6d 73 20 26 26 20 6e 65 77 49 74 65 6d 50 72 6f 70 65 72 74 79 50 61 74 ctNewItems.&&.newItemPropertyPat
85c0 68 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 hs.Count.>.0)..............{....
85e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6d 61 79 20 68 61 76 65 20 70 61 73 ..............//.We.may.have.pas
8600 74 65 64 20 69 6e 74 6f 20 61 20 64 69 66 66 65 72 65 6e 74 20 74 72 65 65 20 76 69 65 77 2e 20 ted.into.a.different.tree.view..
8620 4f 6e 6c 79 20 73 65 6c 65 63 74 20 74 68 65 20 69 74 65 6d 73 20 69 66 20 77 65 20 63 61 6e 20 Only.select.the.items.if.we.can.
8640 66 69 6e 64 20 74 68 65 6d 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f find.them.in..................//
8660 20 6f 75 72 20 63 75 72 72 65 6e 74 20 74 72 65 65 20 76 69 65 77 2e 0d 0a 20 20 20 20 20 20 20 .our.current.tree.view..........
8680 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 49 74 65 6d 73 20 3d 20 6e 65 77 49 74 65 6d 50 .........var.newItems.=.newItemP
86a0 72 6f 70 65 72 74 79 50 61 74 68 73 2e 53 65 6c 65 63 74 28 46 69 6e 64 49 74 65 6d 42 79 50 72 ropertyPaths.Select(FindItemByPr
86c0 6f 70 65 72 74 79 50 61 74 68 29 2e 57 68 65 72 65 28 78 20 3d 3e 20 78 20 21 3d 20 6e 75 6c 6c opertyPath).Where(x.=>.x.!=.null
86e0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 77 49 74 65 6d 73 );..................if.(newItems
8700 2e 41 6e 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 6c .Any())......................Sel
8720 65 63 74 49 74 65 6d 73 28 6e 65 77 49 74 65 6d 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ectItems(newItems);.............
8740 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 72 69 76 61 74 65 .}..........}............private
8760 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 41 63 74 69 6f 6e 4d 61 70 54 61 67 20 3d 20 6b .const.string.k_ActionMapTag.=.k
8780 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 20 2b 20 22 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 _StartOfHeading.+."ActionMapTree
87a0 49 74 65 6d 22 20 2b 20 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 Item".+.k_StartOfText;..........
87c0 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 41 63 74 69 6f 6e 54 61 67 private.const.string.k_ActionTag
87e0 20 3d 20 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 20 2b 20 22 41 63 74 69 6f 6e 54 72 65 .=.k_StartOfHeading.+."ActionTre
8800 65 49 74 65 6d 22 20 2b 20 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 eItem".+.k_StartOfText;.........
8820 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 42 69 6e 64 69 6e 67 54 .private.const.string.k_BindingT
8840 61 67 20 3d 20 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 20 2b 20 22 42 69 6e 64 69 6e 67 ag.=.k_StartOfHeading.+."Binding
8860 54 72 65 65 49 74 65 6d 22 20 2b 20 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 3b 0d 0a 20 20 20 20 TreeItem".+.k_StartOfText;......
8880 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 43 6f 6d 70 6f ....private.const.string.k_Compo
88a0 73 69 74 65 42 69 6e 64 69 6e 67 54 61 67 20 3d 20 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e siteBindingTag.=.k_StartOfHeadin
88c0 67 20 2b 20 22 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 22 20 2b g.+."CompositeBindingTreeItem".+
88e0 20 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 .k_StartOfText;..........private
8900 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 6b 5f 50 61 72 74 4f 66 43 6f 6d 70 6f 73 69 74 65 42 .const.string.k_PartOfCompositeB
8920 69 6e 64 69 6e 67 54 61 67 20 3d 20 6b 5f 53 74 61 72 74 4f 66 48 65 61 64 69 6e 67 20 2b 20 22 indingTag.=.k_StartOfHeading.+."
8940 50 61 72 74 4f 66 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 22 20 PartOfCompositeBindingTreeItem".
8960 2b 20 6b 5f 53 74 61 72 74 4f 66 54 65 78 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 +.k_StartOfText;............priv
8980 61 74 65 20 76 6f 69 64 20 50 61 73 74 65 42 6c 6f 63 6b 73 28 73 74 72 69 6e 67 20 74 72 61 6e ate.void.PasteBlocks(string.tran
89a0 73 6d 69 73 73 69 6f 6e 2c 20 49 6e 73 65 72 74 4c 6f 63 61 74 69 6f 6e 20 6c 6f 63 61 74 69 6f smission,.InsertLocation.locatio
89c0 6e 2c 20 62 6f 6f 6c 20 61 73 73 69 67 6e 4e 65 77 49 44 73 2c 20 4c 69 73 74 3c 73 74 72 69 6e n,.bool.assignNewIDs,.List<strin
89e0 67 3e 20 6e 65 77 49 74 65 6d 50 72 6f 70 65 72 74 79 50 61 74 68 73 29 0d 0a 20 20 20 20 20 20 g>.newItemPropertyPaths)........
8a00 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 6c 6f ..{..............Debug.Assert(lo
8a20 63 61 74 69 6f 6e 2e 69 74 65 6d 20 21 3d 20 6e 75 6c 6c 2c 20 22 53 68 6f 75 6c 64 20 68 61 76 cation.item.!=.null,."Should.hav
8a40 65 20 64 72 6f 70 20 74 61 72 67 65 74 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.drop.target");................
8a60 76 61 72 20 62 6c 6f 63 6b 73 20 3d 20 74 72 61 6e 73 6d 69 73 73 69 6f 6e 2e 53 70 6c 69 74 28 var.blocks.=.transmission.Split(
8a80 6e 65 77 5b 5d 20 7b 6b 5f 45 6e 64 4f 66 54 72 61 6e 73 6d 69 73 73 69 6f 6e 42 6c 6f 63 6b 7d new[].{k_EndOfTransmissionBlock}
8aa0 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 53 70 6c 69 74 4f 70 ,..................StringSplitOp
8ac0 74 69 6f 6e 73 2e 52 65 6d 6f 76 65 45 6d 70 74 79 45 6e 74 72 69 65 73 29 3b 0d 0a 20 20 20 20 tions.RemoveEmptyEntries);......
8ae0 20 20 20 20 20 20 20 20 69 66 20 28 62 6c 6f 63 6b 73 2e 4c 65 6e 67 74 68 20 3c 20 31 29 0d 0a ........if.(blocks.Length.<.1)..
8b00 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 20 20 ................return;.........
8b20 20 20 20 20 20 20 20 54 79 70 65 20 43 6f 70 79 54 61 67 54 6f 54 79 70 65 28 73 74 72 69 6e 67 .......Type.CopyTagToType(string
8b40 20 74 61 67 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .tagName)..............{........
8b60 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 74 61 67 4e 61 6d 65 29 0d 0a 20 20 20 20 ..........switch.(tagName)......
8b80 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
8ba0 20 20 20 63 61 73 65 20 6b 5f 41 63 74 69 6f 6e 4d 61 70 54 61 67 3a 20 72 65 74 75 72 6e 20 74 ...case.k_ActionMapTag:.return.t
8bc0 79 70 65 6f 66 28 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 ypeof(ActionMapTreeItem);.......
8be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 41 63 74 69 6f 6e 54 61 67 3a ...............case.k_ActionTag:
8c00 20 72 65 74 75 72 6e 20 74 79 70 65 6f 66 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 29 3b 0d .return.typeof(ActionTreeItem);.
8c20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 42 69 6e 64 .....................case.k_Bind
8c40 69 6e 67 54 61 67 3a 20 72 65 74 75 72 6e 20 74 79 70 65 6f 66 28 42 69 6e 64 69 6e 67 54 72 65 ingTag:.return.typeof(BindingTre
8c60 65 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 eItem);......................cas
8c80 65 20 6b 5f 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 61 67 3a 20 72 65 74 75 72 6e 20 e.k_CompositeBindingTag:.return.
8ca0 74 79 70 65 6f 66 28 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 29 typeof(CompositeBindingTreeItem)
8cc0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 6b 5f 50 61 ;......................case.k_Pa
8ce0 72 74 4f 66 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 61 67 3a 20 72 65 74 75 72 6e 20 rtOfCompositeBindingTag:.return.
8d00 74 79 70 65 6f 66 28 50 61 72 74 4f 66 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 typeof(PartOfCompositeBindingTre
8d20 65 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 eItem);......................def
8d40 61 75 6c 74 3a 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 74 ault:..........................t
8d60 68 72 6f 77 20 6e 65 77 20 45 78 63 65 70 74 69 6f 6e 28 24 22 55 6e 72 65 63 6f 67 6e 69 7a 65 hrow.new.Exception($"Unrecognize
8d80 64 20 63 6f 70 79 20 62 6c 6f 63 6b 20 74 61 67 20 27 7b 74 61 67 4e 61 6d 65 7d 27 22 29 3b 0d d.copy.block.tag.'{tagName}'");.
8da0 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 20 .................}..............
8dc0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 70 6c 69 74 54 61 67 41 6e 64 44 61 74 61 }................SplitTagAndData
8de0 28 62 6c 6f 63 6b 73 5b 30 5d 2c 20 6f 75 74 20 76 61 72 20 74 61 67 2c 20 6f 75 74 20 76 61 72 (blocks[0],.out.var.tag,.out.var
8e00 20 64 61 74 61 29 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 .data);................//.Determ
8e20 69 6e 65 20 77 68 65 72 65 20 74 6f 20 64 72 6f 70 20 74 68 65 20 69 74 65 6d 2e 0d 0a 20 20 20 ine.where.to.drop.the.item......
8e40 20 20 20 20 20 20 20 20 20 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 72 72 61 .........SerializedProperty.arra
8e60 79 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 72 72 61 79 y.=.null;..............var.array
8e80 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 Index.=.-1;..............var.ite
8ea0 6d 54 79 70 65 20 3d 20 43 6f 70 79 54 61 67 54 6f 54 79 70 65 28 74 61 67 29 3b 0d 0a 20 20 20 mType.=.CopyTagToType(tag);.....
8ec0 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 6f 63 61 74 69 6f 6e 2e 69 74 65 6d 20 69 73 20 41 63 .........if.(location.item.is.Ac
8ee0 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 64 72 6f 70 54 61 72 67 65 74 29 0d 0a 20 20 tionTreeItemBase.dropTarget)....
8f00 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 69 66 20 ..........{..................if.
8f20 28 21 64 72 6f 70 54 61 72 67 65 74 2e 47 65 74 44 72 6f 70 4c 6f 63 61 74 69 6f 6e 28 69 74 65 (!dropTarget.GetDropLocation(ite
8f40 6d 54 79 70 65 2c 20 6c 6f 63 61 74 69 6f 6e 2e 63 68 69 6c 64 49 6e 64 65 78 2c 20 72 65 66 20 mType,.location.childIndex,.ref.
8f60 61 72 72 61 79 2c 20 72 65 66 20 61 72 72 61 79 49 6e 64 65 78 29 29 0d 0a 20 20 20 20 20 20 20 array,.ref.arrayIndex)).........
8f80 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .............return;............
8fa0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 61 67 20 3d 3d ..}..............else.if.(tag.==
8fc0 20 6b 5f 41 63 74 69 6f 6e 4d 61 70 54 61 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d .k_ActionMapTag)..............{.
8fe0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 73 74 65 20 69 6e 74 6f 20 49 .................//.Paste.into.I
9000 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nputActionAsset.................
9020 20 20 61 72 72 61 79 20 3d 20 73 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 2e 46 69 6e 64 50 ..array.=.serializedObject.FindP
9040 72 6f 70 65 72 74 79 28 22 6d 5f 41 63 74 69 6f 6e 4d 61 70 73 22 29 3b 0d 0a 20 20 20 20 20 20 roperty("m_ActionMaps");........
9060 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 49 6e 64 65 78 20 3d 20 6c 6f 63 61 74 69 6f 6e 2e ..........arrayIndex.=.location.
9080 63 68 69 6c 64 49 6e 64 65 78 20 3f 3f 20 61 72 72 61 79 2e 61 72 72 61 79 53 69 7a 65 3b 0d 0a childIndex.??.array.arraySize;..
90a0 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 65 6c 73 65 0d ............}..............else.
90c0 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 .............{..................
90e0 74 68 72 6f 77 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 throw.new.InvalidOperationExcept
9100 69 6f 6e 28 24 22 43 61 6e 6e 6f 74 20 70 61 73 74 65 20 7b 74 61 67 7d 20 69 6e 74 6f 20 7b 6c ion($"Cannot.paste.{tag}.into.{l
9120 6f 63 61 74 69 6f 6e 2e 69 74 65 6d 2e 64 69 73 70 6c 61 79 4e 61 6d 65 7d 22 29 3b 0d 0a 20 20 ocation.item.displayName}");....
9140 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 20 49 66 ..........}................//.If
9160 20 6e 6f 74 20 67 69 76 65 6e 20 61 20 73 70 65 63 69 66 69 63 20 69 6e 64 65 78 2c 20 77 65 20 .not.given.a.specific.index,.we.
9180 70 61 73 74 65 20 6f 6e 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 61 72 72 61 79 2e paste.onto.the.end.of.the.array.
91a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 72 72 61 79 49 6e 64 65 78 20 3d 3d 20 ..............if.(arrayIndex.==.
91c0 2d 31 20 7c 7c 20 61 72 72 61 79 49 6e 64 65 78 20 3e 20 61 72 72 61 79 2e 61 72 72 61 79 53 69 -1.||.arrayIndex.>.array.arraySi
91e0 7a 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 49 6e 64 65 78 20 ze)..................arrayIndex.
9200 3d 20 61 72 72 61 79 2e 61 72 72 61 79 53 69 7a 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 =.array.arraySize;..............
9220 20 20 76 61 72 20 61 63 74 69 6f 6e 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 20 3d 20 6c 6f 63 ..var.actionForNewBindings.=.loc
9240 61 74 69 6f 6e 2e 69 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 20 61 63 74 ation.item.is.ActionTreeItem.act
9260 69 6f 6e 49 74 65 6d 20 3f 20 61 63 74 69 6f 6e 49 74 65 6d 2e 6e 61 6d 65 20 3a 20 6e 75 6c 6c ionItem.?.actionItem.name.:.null
9280 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 73 74 65 20 6e 65 77 20 65 6c ;................//.Paste.new.el
92a0 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 45 6c 65 6d 65 ement...............var.newEleme
92c0 6e 74 20 3d 20 50 61 73 74 65 42 6c 6f 63 6b 28 74 61 67 2c 20 64 61 74 61 2c 20 61 72 72 61 79 nt.=.PasteBlock(tag,.data,.array
92e0 2c 20 61 72 72 61 79 49 6e 64 65 78 2c 20 61 73 73 69 67 6e 4e 65 77 49 44 73 2c 20 61 63 74 69 ,.arrayIndex,.assignNewIDs,.acti
9300 6f 6e 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 onForNewBindings);..............
9320 6e 65 77 49 74 65 6d 50 72 6f 70 65 72 74 79 50 61 74 68 73 2e 41 64 64 28 6e 65 77 45 6c 65 6d newItemPropertyPaths.Add(newElem
9340 65 6e 74 2e 70 72 6f 70 65 72 74 79 50 61 74 68 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ent.propertyPath);..............
9360 20 20 2f 2f 20 49 66 20 74 68 65 20 65 6c 65 6d 65 6e 74 20 63 61 6e 20 68 61 76 65 20 63 68 69 ..//.If.the.element.can.have.chi
9380 6c 64 72 65 6e 2c 20 72 65 61 64 20 77 68 61 74 65 76 65 72 20 62 6c 6f 63 6b 73 20 61 72 65 20 ldren,.read.whatever.blocks.are.
93a0 66 6f 6c 6c 6f 77 69 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 20 6f 6e 65 20 28 69 66 20 61 6e following.the.current.one.(if.an
93c0 79 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 61 67 20 3d 3d 20 6b 5f 41 y)...............if.((tag.==.k_A
93e0 63 74 69 6f 6e 54 61 67 20 7c 7c 20 74 61 67 20 3d 3d 20 6b 5f 43 6f 6d 70 6f 73 69 74 65 42 69 ctionTag.||.tag.==.k_CompositeBi
9400 6e 64 69 6e 67 54 61 67 29 20 26 26 20 62 6c 6f 63 6b 73 2e 4c 65 6e 67 74 68 20 3e 20 31 29 0d ndingTag).&&.blocks.Length.>.1).
9420 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 .............{..................
9440 76 61 72 20 62 69 6e 64 69 6e 67 41 72 72 61 79 20 3d 20 61 72 72 61 79 3b 0d 0a 0d 0a 20 20 20 var.bindingArray.=.array;.......
9460 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 61 67 20 3d 3d 20 6b 5f 41 63 74 69 6f 6e .............if.(tag.==.k_Action
9480 54 61 67 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 Tag)..................{.........
94a0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 64 6f 6e 27 74 20 73 75 70 70 6f 72 74 .............//.We.don't.support
94c0 20 70 61 73 74 69 6e 67 20 61 63 74 69 6f 6e 73 20 73 65 70 61 72 61 74 65 6c 79 20 69 6e 74 6f .pasting.actions.separately.into
94e0 20 61 63 74 69 6f 6e 20 6d 61 70 73 20 69 6e 20 74 68 65 20 73 61 6d 65 20 70 61 73 74 65 20 6f .action.maps.in.the.same.paste.o
9500 70 65 72 61 74 69 6f 6e 73 20 73 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 perations.so....................
9520 20 20 2f 2f 20 74 68 65 72 65 20 6d 75 73 74 20 62 65 20 61 6e 20 41 63 74 69 6f 6e 4d 61 70 54 ..//.there.must.be.an.ActionMapT
9540 72 65 65 49 74 65 6d 20 69 6e 20 74 68 65 20 68 69 65 72 61 72 63 68 79 20 77 65 20 70 61 73 74 reeItem.in.the.hierarchy.we.past
9560 65 64 20 69 6e 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 ed.into.......................va
9580 72 20 61 63 74 69 6f 6e 4d 61 70 49 74 65 6d 20 3d 20 6c 6f 63 61 74 69 6f 6e 2e 69 74 65 6d 2e r.actionMapItem.=.location.item.
95a0 54 72 79 46 69 6e 64 49 74 65 6d 49 6e 48 69 65 72 61 72 63 68 79 3c 41 63 74 69 6f 6e 4d 61 70 TryFindItemInHierarchy<ActionMap
95c0 54 72 65 65 49 74 65 6d 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 TreeItem>();....................
95e0 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 61 63 74 69 6f 6e 4d 61 70 49 74 65 6d 20 21 3d 20 ..Debug.Assert(actionMapItem.!=.
9600 6e 75 6c 6c 2c 20 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 null,."Cannot.find.ActionMapTree
9620 49 74 65 6d 20 69 6e 20 68 69 65 72 61 72 63 68 79 20 6f 66 20 70 61 73 74 65 64 20 61 63 74 69 Item.in.hierarchy.of.pasted.acti
9640 6f 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 69 6e 64 69 on");......................bindi
9660 6e 67 41 72 72 61 79 20 3d 20 61 63 74 69 6f 6e 4d 61 70 49 74 65 6d 2e 62 69 6e 64 69 6e 67 73 ngArray.=.actionMapItem.bindings
9680 41 72 72 61 79 50 72 6f 70 65 72 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ArrayProperty;..................
96a0 20 20 20 20 61 63 74 69 6f 6e 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 20 3d 20 49 6e 70 75 74 ....actionForNewBindings.=.Input
96c0 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 47 65 74 4e 61 ActionSerializationHelpers.GetNa
96e0 6d 65 28 6e 65 77 45 6c 65 6d 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 me(newElement);.................
9700 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 .}....................for.(var.i
9720 20 3d 20 31 3b 20 69 20 3c 20 62 6c 6f 63 6b 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a 20 .=.1;.i.<.blocks.Length;.++i)...
9740 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 20 ...............{................
9760 20 20 20 20 20 20 53 70 6c 69 74 54 61 67 41 6e 64 44 61 74 61 28 62 6c 6f 63 6b 73 5b 69 5d 2c ......SplitTagAndData(blocks[i],
9780 20 6f 75 74 20 76 61 72 20 62 6c 6f 63 6b 54 61 67 2c 20 6f 75 74 20 76 61 72 20 62 6c 6f 63 6b .out.var.blockTag,.out.var.block
97a0 44 61 74 61 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 61 Data);........................Pa
97c0 73 74 65 42 6c 6f 63 6b 28 62 6c 6f 63 6b 54 61 67 2c 20 62 6c 6f 63 6b 44 61 74 61 2c 20 62 69 steBlock(blockTag,.blockData,.bi
97e0 6e 64 69 6e 67 41 72 72 61 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ndingArray,.....................
9800 20 20 20 20 20 74 61 67 20 3d 3d 20 6b 5f 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 61 .....tag.==.k_CompositeBindingTa
9820 67 20 3f 20 61 72 72 61 79 49 6e 64 65 78 20 2b 20 69 20 3a 20 2d 31 2c 0d 0a 20 20 20 20 20 20 g.?.arrayIndex.+.i.:.-1,........
9840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 73 73 69 67 6e 4e 65 77 49 44 73 2c 0d ..................assignNewIDs,.
9860 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 61 63 74 69 6f 6e 46 .........................actionF
9880 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 orNewBindings);.................
98a0 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 7d 0d 0a 0d 0a .}..............}..........}....
98c0 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 53 70 6c 69 ........private.static.void.Spli
98e0 74 54 61 67 41 6e 64 44 61 74 61 28 73 74 72 69 6e 67 20 62 6c 6f 63 6b 2c 20 6f 75 74 20 73 74 tTagAndData(string.block,.out.st
9900 72 69 6e 67 20 74 61 67 2c 20 6f 75 74 20 73 74 72 69 6e 67 20 64 61 74 61 29 0d 0a 20 20 20 20 ring.tag,.out.string.data)......
9920 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 4f 66 53 74 ....{..............var.indexOfSt
9940 61 72 74 4f 66 54 65 78 74 43 68 61 72 20 3d 20 62 6c 6f 63 6b 2e 49 6e 64 65 78 4f 66 28 6b 5f artOfTextChar.=.block.IndexOf(k_
9960 53 74 61 72 74 4f 66 54 65 78 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 StartOfText);..............if.(i
9980 6e 64 65 78 4f 66 53 74 61 72 74 4f 66 54 65 78 74 43 68 61 72 20 3d 3d 20 2d 31 29 0d 0a 20 20 ndexOfStartOfTextChar.==.-1)....
99a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 ..............throw.new.Argument
99c0 45 78 63 65 70 74 69 6f 6e 28 24 22 49 6e 63 6f 72 72 65 63 74 20 63 6f 70 79 20 64 61 74 61 20 Exception($"Incorrect.copy.data.
99e0 66 6f 72 6d 61 74 3a 20 45 78 70 65 63 74 69 6e 67 20 27 7b 6b 5f 53 74 61 72 74 4f 66 54 65 78 format:.Expecting.'{k_StartOfTex
9a00 74 7d 27 20 69 6e 20 27 7b 62 6c 6f 63 6b 7d 27 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 t}'.in.'{block}'",..............
9a20 20 20 20 20 20 20 20 20 6e 61 6d 65 6f 66 28 62 6c 6f 63 6b 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 ........nameof(block));.........
9a40 20 20 20 20 20 20 20 74 61 67 20 3d 20 62 6c 6f 63 6b 2e 53 75 62 73 74 72 69 6e 67 28 30 2c 20 .......tag.=.block.Substring(0,.
9a60 69 6e 64 65 78 4f 66 53 74 61 72 74 4f 66 54 65 78 74 43 68 61 72 20 2b 20 31 29 3b 0d 0a 20 20 indexOfStartOfTextChar.+.1);....
9a80 20 20 20 20 20 20 20 20 20 20 64 61 74 61 20 3d 20 62 6c 6f 63 6b 2e 53 75 62 73 74 72 69 6e 67 ..........data.=.block.Substring
9aa0 28 69 6e 64 65 78 4f 66 53 74 61 72 74 4f 66 54 65 78 74 43 68 61 72 20 2b 20 31 29 3b 0d 0a 20 (indexOfStartOfTextChar.+.1);...
9ac0 20 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 53 65 72 69 .......}............private.Seri
9ae0 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 50 61 73 74 65 42 6c 6f 63 6b 28 73 74 72 69 6e 67 alizedProperty.PasteBlock(string
9b00 20 74 61 67 2c 20 73 74 72 69 6e 67 20 64 61 74 61 2c 20 53 65 72 69 61 6c 69 7a 65 64 50 72 6f .tag,.string.data,.SerializedPro
9b20 70 65 72 74 79 20 61 72 72 61 79 2c 20 69 6e 74 20 61 72 72 61 79 49 6e 64 65 78 2c 0d 0a 20 20 perty.array,.int.arrayIndex,....
9b40 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 61 73 73 69 67 6e 4e 65 77 49 44 73 2c 20 73 74 72 ..........bool.assignNewIDs,.str
9b60 69 6e 67 20 61 63 74 69 6f 6e 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 20 3d 20 6e 75 6c 6c 29 ing.actionForNewBindings.=.null)
9b80 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 20 41 64 64 20 ..........{..............//.Add.
9ba0 61 6e 20 65 6c 65 6d 65 6e 74 20 74 6f 20 74 68 65 20 61 72 72 61 79 2e 20 54 68 65 6e 20 72 65 an.element.to.the.array..Then.re
9bc0 61 64 20 74 68 65 20 73 65 72 69 61 6c 69 7a 65 64 20 70 72 6f 70 65 72 74 69 65 73 20 73 74 6f ad.the.serialized.properties.sto
9be0 72 65 64 20 69 6e 20 74 68 65 20 63 6f 70 79 20 64 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 red.in.the.copy.data............
9c00 20 20 2f 2f 20 62 61 63 6b 20 69 6e 74 6f 20 74 68 65 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 ..//.back.into.the.element......
9c20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 72 6f 70 65 72 74 79 20 3d 20 49 6e 70 75 74 41 63 74 .........var.property.=.InputAct
9c40 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 41 64 64 45 6c 65 6d 65 ionSerializationHelpers.AddEleme
9c60 6e 74 28 61 72 72 61 79 2c 20 22 74 65 6d 70 4e 61 6d 65 22 2c 20 61 72 72 61 79 49 6e 64 65 78 nt(array,."tempName",.arrayIndex
9c80 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 70 65 72 74 79 2e 52 65 73 74 6f 72 65 );..............property.Restore
9ca0 46 72 6f 6d 4a 73 6f 6e 28 64 61 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 FromJson(data);..............if.
9cc0 28 74 61 67 20 3d 3d 20 6b 5f 41 63 74 69 6f 6e 54 61 67 20 7c 7c 20 74 61 67 20 3d 3d 20 6b 5f (tag.==.k_ActionTag.||.tag.==.k_
9ce0 41 63 74 69 6f 6e 4d 61 70 54 61 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 ActionMapTag)..................I
9d00 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 45 nputActionSerializationHelpers.E
9d20 6e 73 75 72 65 55 6e 69 71 75 65 4e 61 6d 65 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 nsureUniqueName(property);......
9d40 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 69 67 6e 4e 65 77 49 44 73 29 0d 0a 20 20 20 20 20 ........if.(assignNewIDs).......
9d60 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 73 73 .......{..................//.Ass
9d80 69 67 6e 20 6e 65 77 20 49 44 73 20 74 6f 20 74 68 65 20 65 6c 65 6d 65 6e 74 20 61 73 20 77 65 ign.new.IDs.to.the.element.as.we
9da0 6c 6c 20 61 73 20 74 6f 20 61 6e 79 20 65 6c 65 6d 65 6e 74 73 20 69 74 20 63 6f 6e 74 61 69 6e ll.as.to.any.elements.it.contain
9dc0 73 2e 20 54 68 69 73 20 6d 65 61 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f s..This.means................../
9de0 2f 20 74 68 61 74 20 66 6f 72 20 61 63 74 69 6f 6e 20 6d 61 70 73 2c 20 77 65 20 77 69 6c 6c 20 /.that.for.action.maps,.we.will.
9e00 61 6c 73 6f 20 61 73 73 69 67 6e 20 6e 65 77 20 49 44 73 20 74 6f 20 65 76 65 72 79 20 61 63 74 also.assign.new.IDs.to.every.act
9e20 69 6f 6e 20 61 6e 64 20 62 69 6e 64 69 6e 67 20 69 6e 20 74 68 65 20 6d 61 70 2e 0d 0a 20 20 20 ion.and.binding.in.the.map......
9e40 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a .............InputActionSerializ
9e60 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 41 73 73 69 67 6e 55 6e 69 71 75 65 49 44 73 28 70 72 6f ationHelpers.AssignUniqueIDs(pro
9e80 70 65 72 74 79 29 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 perty);..............}..........
9ea0 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 65 6c 65 6d 65 6e 74 20 69 73 20 61 20 62 69 6e ......//.If.the.element.is.a.bin
9ec0 64 69 6e 67 2c 20 75 70 64 61 74 65 20 69 74 73 20 61 63 74 69 6f 6e 20 74 61 72 67 65 74 20 61 ding,.update.its.action.target.a
9ee0 6e 64 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 2c 20 69 66 20 6e 65 63 65 73 73 61 72 79 2e 0d nd.binding.group,.if.necessary..
9f00 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 61 67 20 3d 3d 20 6b 5f 42 69 6e 64 69 6e .............if.(tag.==.k_Bindin
9f20 67 54 61 67 20 7c 7c 20 74 61 67 20 3d 3d 20 6b 5f 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e gTag.||.tag.==.k_CompositeBindin
9f40 67 54 61 67 20 7c 7c 20 74 61 67 20 3d 3d 20 6b 5f 50 61 72 74 4f 66 43 6f 6d 70 6f 73 69 74 65 gTag.||.tag.==.k_PartOfComposite
9f60 42 69 6e 64 69 6e 67 54 61 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 BindingTag)..............{......
9f80 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 75 73 65 20 7b 69 64 7d 20 72 ............////TODO:.use.{id}.r
9fa0 61 74 68 65 72 20 74 68 61 6e 20 70 6c 61 69 6e 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 ather.than.plain.name...........
9fc0 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 20 61 63 74 69 6f 6e 20 74 6f 20 72 65 66 65 72 .......//.Update.action.to.refer
9fe0 20 74 6f 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .to.given.action................
a000 20 20 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 ...InputActionSerializationHelpe
a020 72 73 2e 43 68 61 6e 67 65 42 69 6e 64 69 6e 67 28 70 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f rs.ChangeBinding(property,.actio
a040 6e 3a 20 61 63 74 69 6f 6e 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 0d 0a 20 20 20 n:.actionForNewBindings);.......
a060 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 61 20 62 69 6e .............//.If.we.have.a.bin
a080 64 69 6e 67 20 67 72 6f 75 70 20 74 6f 20 73 65 74 20 66 6f 72 20 6e 65 77 20 62 69 6e 64 69 6e ding.group.to.set.for.new.bindin
a0a0 67 73 2c 20 6f 76 65 72 77 72 69 74 65 20 74 68 65 20 62 69 6e 64 69 6e 67 27 73 0d 0a 20 20 20 gs,.overwrite.the.binding's.....
a0c0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 67 72 6f 75 70 20 77 69 74 68 20 69 74 2e 0d 0a .............//.group.with.it...
a0e0 20 20 20 20 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 75 ................if.(!string.IsNu
a100 6c 6c 4f 72 45 6d 70 74 79 28 62 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 llOrEmpty(bindingGroupForNewBind
a120 69 6e 67 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 ings))......................Inpu
a140 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 43 68 61 6e tActionSerializationHelpers.Chan
a160 67 65 42 69 6e 64 69 6e 67 28 70 72 6f 70 65 72 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 geBinding(property,.............
a180 20 20 20 20 20 20 20 20 20 20 20 20 20 67 72 6f 75 70 73 3a 20 62 69 6e 64 69 6e 67 47 72 6f 75 .............groups:.bindingGrou
a1a0 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d pForNewBindings);..............}
a1c0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 6f 70 65 72 74 79 3b ................return.property;
a1e0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f ..........}............#endregio
a200 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 43 6f 6e 74 65 78 74 20 4d 65 6e n............#region.Context.Men
a220 75 73 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 42 75 69 6c 64 43 us............public.void.BuildC
a240 6f 6e 74 65 78 74 4d 65 6e 75 46 6f 72 28 54 79 70 65 20 69 74 65 6d 54 79 70 65 2c 20 47 65 6e ontextMenuFor(Type.itemType,.Gen
a260 65 72 69 63 4d 65 6e 75 20 6d 65 6e 75 2c 20 62 6f 6f 6c 20 6d 75 6c 74 69 53 65 6c 65 63 74 29 ericMenu.menu,.bool.multiSelect)
a280 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 61 6e ..........{..............var.can
a2a0 52 65 6e 61 6d 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 Rename.=.false;..............if.
a2c0 28 69 74 65 6d 54 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 41 63 74 69 6f 6e 4d 61 70 54 72 65 (itemType.==.typeof(ActionMapTre
a2e0 65 49 74 65 6d 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 20 20 eItem))..............{..........
a300 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 41 64 64 41 63 74 69 6f 6e ........menu.AddItem(s_AddAction
a320 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 41 64 64 4e 65 77 41 63 74 69 6f 6e 29 3b 0d 0a 20 20 Label,.false,.AddNewAction);....
a340 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 ..........}..............else.if
a360 20 28 69 74 65 6d 54 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 41 63 74 69 6f 6e 54 72 65 65 49 .(itemType.==.typeof(ActionTreeI
a380 74 65 6d 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 20 20 20 20 tem))..............{............
a3a0 20 20 20 20 20 20 63 61 6e 52 65 6e 61 6d 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 ......canRename.=.true;.........
a3c0 20 20 20 20 20 20 20 20 20 42 75 69 6c 64 4d 65 6e 75 54 6f 41 64 64 42 69 6e 64 69 6e 67 73 28 .........BuildMenuToAddBindings(
a3e0 6d 65 6e 75 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 menu);..............}...........
a400 20 20 20 65 6c 73 65 20 69 66 20 28 69 74 65 6d 54 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 43 ...else.if.(itemType.==.typeof(C
a420 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 29 29 0d 0a 20 20 20 20 20 ompositeBindingTreeItem)).......
a440 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 63 61 6e 52 65 6e .......{..................canRen
a460 61 6d 65 20 3d 20 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 ame.=.true;..............}......
a480 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 6d 6f 6e 20 6d 65 6e 75 20 65 6e 74 72 69 65 73 ..........//.Common.menu.entries
a4a0 20 73 68 61 72 65 64 20 62 79 20 61 6c 6c 20 74 79 70 65 73 20 6f 66 20 69 74 65 6d 73 2e 0d 0a .shared.by.all.types.of.items...
a4c0 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 53 65 70 61 72 61 74 6f 72 28 22 22 ............menu.AddSeparator(""
a4e0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 43 );..............menu.AddItem(s_C
a500 75 74 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 28 29 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 utLabel,.false,.().=>...........
a520 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 70 79 53 65 6c 65 63 74 ...{..................CopySelect
a540 65 64 49 74 65 6d 73 54 6f 43 6c 69 70 62 6f 61 72 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 edItemsToClipboard();...........
a560 20 20 20 20 20 20 20 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 6d 73 .......DeleteDataOfSelectedItems
a580 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ();..............});............
a5a0 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 43 6f 70 79 4c 61 62 65 6c 2c 20 66 61 6c 73 ..menu.AddItem(s_CopyLabel,.fals
a5c0 65 2c 20 43 6f 70 79 53 65 6c 65 63 74 65 64 49 74 65 6d 73 54 6f 43 6c 69 70 62 6f 61 72 64 29 e,.CopySelectedItemsToClipboard)
a5e0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 50 61 ;..............menu.AddItem(s_Pa
a600 73 74 65 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 50 61 73 74 65 44 61 74 61 46 72 6f 6d 43 6c steLabel,.false,.PasteDataFromCl
a620 69 70 62 6f 61 72 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 53 ipboard);..............menu.AddS
a640 65 70 61 72 61 74 6f 72 28 22 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 eparator("");..............if.(c
a660 61 6e 52 65 6e 61 6d 65 20 26 26 20 21 6d 75 6c 74 69 53 65 6c 65 63 74 29 0d 0a 20 20 20 20 20 anRename.&&.!multiSelect).......
a680 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 6d 65 6e 75 2e 41 .......{..................menu.A
a6a0 64 64 49 74 65 6d 28 73 5f 52 65 6e 61 6d 65 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 28 29 20 ddItem(s_RenameLabel,.false,.().
a6c0 3d 3e 20 42 65 67 69 6e 52 65 6e 61 6d 65 28 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 =>.BeginRename(GetSelectedItems(
a6e0 29 2e 46 69 72 73 74 28 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ).First()));..............}.....
a700 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 63 61 6e 52 65 6e 61 6d 65 29 0d 0a 20 20 .........else.if.(canRename)....
a720 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 6d 65 6e ..........{..................men
a740 75 2e 41 64 64 44 69 73 61 62 6c 65 64 49 74 65 6d 28 73 5f 52 65 6e 61 6d 65 4c 61 62 65 6c 29 u.AddDisabledItem(s_RenameLabel)
a760 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 ;..............}..............me
a780 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 44 75 70 6c 69 63 61 74 65 4c 61 62 65 6c 2c 20 66 61 6c nu.AddItem(s_DuplicateLabel,.fal
a7a0 73 65 2c 20 44 75 70 6c 69 63 61 74 65 53 65 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 se,.DuplicateSelection);........
a7c0 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 44 65 6c 65 74 65 4c 61 62 65 6c ......menu.AddItem(s_DeleteLabel
a7e0 2c 20 66 61 6c 73 65 2c 20 44 65 6c 65 74 65 44 61 74 61 4f 66 53 65 6c 65 63 74 65 64 49 74 65 ,.false,.DeleteDataOfSelectedIte
a800 6d 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 54 79 70 65 ms);................if.(itemType
a820 20 21 3d 20 74 79 70 65 6f 66 28 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 29 29 0d 0a .!=.typeof(ActionMapTreeItem))..
a840 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 6d ............{..................m
a860 65 6e 75 2e 41 64 64 53 65 70 61 72 61 74 6f 72 28 22 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 enu.AddSeparator("");...........
a880 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 45 78 70 61 6e 64 41 6c 6c 4c .......menu.AddItem(s_ExpandAllL
a8a0 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 45 78 70 61 6e 64 41 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 abel,.false,.ExpandAll);........
a8c0 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 43 6f 6c 6c 61 70 73 ..........menu.AddItem(s_Collaps
a8e0 65 41 6c 6c 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 20 43 6f 6c 6c 61 70 73 65 41 6c 6c 29 3b 0d eAllLabel,.false,.CollapseAll);.
a900 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 20 .............}..........}.......
a920 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 42 75 69 6c 64 4d 65 6e 75 54 6f 41 64 64 42 .....public.void.BuildMenuToAddB
a940 69 6e 64 69 6e 67 73 28 47 65 6e 65 72 69 63 4d 65 6e 75 20 6d 65 6e 75 2c 20 41 63 74 69 6f 6e indings(GenericMenu.menu,.Action
a960 54 72 65 65 49 74 65 6d 20 61 63 74 69 6f 6e 49 74 65 6d 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 TreeItem.actionItem.=.null).....
a980 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 65 6e 74 72 79 .....{..............//.Add.entry
a9a0 20 74 6f 20 61 64 64 20 22 6e 6f 72 6d 61 6c 22 20 62 69 6e 64 69 6e 67 73 2e 0d 0a 20 20 20 20 .to.add."normal".bindings.......
a9c0 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 6d 28 73 5f 41 64 64 42 69 6e 64 69 6e ........menu.AddItem(s_AddBindin
a9e0 67 4c 61 62 65 6c 2c 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gLabel,.false,..................
aa00 28 29 20 3d 3e 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 ().=>..................{........
aa20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 49 74 65 6d 20 21 3d 20 ..............if.(actionItem.!=.
aa40 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 null)..........................A
aa60 64 64 4e 65 77 42 69 6e 64 69 6e 67 28 61 63 74 69 6f 6e 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 ddNewBinding(actionItem.property
aa80 2c 20 61 63 74 69 6f 6e 49 74 65 6d 2e 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 3b ,.actionItem.actionMapProperty);
aaa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 ......................else......
aac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 42 69 6e 64 69 6e ....................AddNewBindin
aae0 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 0d 0a 20 20 20 g();..................});.......
ab00 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6f 6e 65 20 65 6e 74 72 79 20 66 6f 72 20 65 61 .........//.Add.one.entry.for.ea
ab20 63 68 20 72 65 67 69 73 74 65 72 65 64 20 74 79 70 65 20 6f 66 20 63 6f 6d 70 6f 73 69 74 65 20 ch.registered.type.of.composite.
ab40 62 69 6e 64 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 78 70 65 63 74 binding...............var.expect
ab60 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 20 3d 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 edControlLayout.=.new.InternedSt
ab80 72 69 6e 67 28 61 63 74 69 6f 6e 49 74 65 6d 3f 2e 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c ring(actionItem?.expectedControl
aba0 4c 61 79 6f 75 74 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 Layout);..............foreach.(v
abc0 61 72 20 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 20 69 6e 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 ar.compositeName.in.InputBinding
abe0 43 6f 6d 70 6f 73 69 74 65 2e 73 5f 43 6f 6d 70 6f 73 69 74 65 73 2e 69 6e 74 65 72 6e 65 64 4e Composite.s_Composites.internedN
ac00 61 6d 65 73 2e 57 68 65 72 65 28 78 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ames.Where(x.=>.................
ac20 20 21 49 6e 70 75 74 42 69 6e 64 69 6e 67 43 6f 6d 70 6f 73 69 74 65 2e 73 5f 43 6f 6d 70 6f 73 .!InputBindingComposite.s_Compos
ac40 69 74 65 73 2e 61 6c 69 61 73 65 73 2e 43 6f 6e 74 61 69 6e 73 28 78 29 29 2e 4f 72 64 65 72 42 ites.aliases.Contains(x)).OrderB
ac60 79 28 78 20 3d 3e 20 78 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 y(x.=>.x))..............{.......
ac80 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 61 63 74 69 6f 6e 20 69 73 20 65 ...........//.If.the.action.is.e
aca0 78 70 65 63 74 65 64 20 61 20 73 70 65 63 69 66 69 63 20 63 6f 6e 74 72 6f 6c 20 6c 61 79 6f 75 xpected.a.specific.control.layou
acc0 74 2c 20 63 68 65 63 6b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 68 65 t,.check..................//.whe
ace0 74 68 65 72 20 74 68 65 20 76 61 6c 75 65 20 74 79 70 65 20 75 73 65 20 62 79 20 74 68 65 20 63 ther.the.value.type.use.by.the.c
ad00 6f 6d 70 6f 73 69 74 65 20 6d 61 74 63 68 65 73 20 74 68 61 74 20 6f 66 0d 0a 20 20 20 20 20 20 omposite.matches.that.of........
ad20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 ..........//.the.layout.........
ad40 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 ..........if.(!expectedControlLa
ad60 79 6f 75 74 2e 49 73 45 6d 70 74 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 yout.IsEmpty()).................
ad80 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 76 61 6c 75 .{......................var.valu
ada0 65 54 79 70 65 20 3d 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 43 6f 6d 70 6f 73 69 74 65 2e 47 65 eType.=.InputBindingComposite.Ge
adc0 74 56 61 6c 75 65 54 79 70 65 28 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 tValueType(compositeName);......
ade0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 54 79 70 65 20 21 3d ................if.(valueType.!=
ae00 20 6e 75 6c 6c 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .null.&&........................
ae20 20 20 21 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e ..!InputControlLayout.s_Layouts.
ae40 56 61 6c 75 65 54 79 70 65 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 65 78 70 65 63 74 ValueTypeIsAssignableFrom(expect
ae60 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2c 20 76 61 6c 75 65 54 79 70 65 29 29 0d 0a 20 20 edControlLayout,.valueType))....
ae80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d ......................continue;.
aea0 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 20 20 20 20 20 .................}..............
aec0 20 20 20 20 20 20 76 61 72 20 6e 69 63 65 4e 61 6d 65 20 3d 20 4f 62 6a 65 63 74 4e 61 6d 65 73 ......var.niceName.=.ObjectNames
aee0 2e 4e 69 63 69 66 79 56 61 72 69 61 62 6c 65 4e 61 6d 65 28 63 6f 6d 70 6f 73 69 74 65 4e 61 6d .NicifyVariableName(compositeNam
af00 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 41 64 64 49 74 65 e);..................menu.AddIte
af20 6d 28 6e 65 77 20 47 55 49 43 6f 6e 74 65 6e 74 28 24 22 41 64 64 20 7b 6e 69 63 65 4e 61 6d 65 m(new.GUIContent($"Add.{niceName
af40 7d 20 43 6f 6d 70 6f 73 69 74 65 22 29 2c 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 }.Composite"),.false,...........
af60 20 20 20 20 20 20 20 20 20 20 20 28 29 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........().=>................
af80 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 20 20 20 ......{.........................
afa0 20 69 66 20 28 61 63 74 69 6f 6e 49 74 65 6d 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 .if.(actionItem.!=.null)........
afc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 43 6f 6d 70 ......................AddNewComp
afe0 6f 73 69 74 65 28 61 63 74 69 6f 6e 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f osite(actionItem.property,.actio
b000 6e 49 74 65 6d 2e 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 2c 20 63 6f 6d 70 6f 73 69 nItem.actionMapProperty,.composi
b020 74 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 20 20 20 20 20 20 teName);........................
b040 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..else..........................
b060 20 20 20 20 41 64 64 4e 65 77 43 6f 6d 70 6f 73 69 74 65 28 63 6f 6d 70 6f 73 69 74 65 4e 61 6d ....AddNewComposite(compositeNam
b080 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 20 20 e);......................});....
b0a0 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 20 20 20 20 ..........}..........}..........
b0c0 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 50 6f 70 55 70 43 6f 6e 74 65 78 74 4d 65 6e 75 28 ..private.void.PopUpContextMenu(
b0e0 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 20 53 65 65 )..........{..............//.See
b100 20 69 66 20 77 65 20 68 61 76 65 20 61 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 6d 69 78 65 64 .if.we.have.a.selection.of.mixed
b120 20 74 79 70 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 69 78 65 64 53 65 .types...............var.mixedSe
b140 6c 65 63 74 69 6f 6e 20 3d 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 2e 53 65 6c lection.=.GetSelectedItems().Sel
b160 65 63 74 28 78 20 3d 3e 20 78 2e 47 65 74 54 79 70 65 28 29 29 2e 44 69 73 74 69 6e 63 74 28 29 ect(x.=>.x.GetType()).Distinct()
b180 2e 43 6f 75 6e 74 28 29 20 3e 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 .Count().>.1;................//.
b1a0 43 72 65 61 74 65 20 61 6e 64 20 70 6f 70 20 75 70 20 63 6f 6e 74 65 78 74 20 6d 65 6e 75 2e 0d Create.and.pop.up.context.menu..
b1c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 6e 75 20 3d 20 6e 65 77 20 47 65 6e 65 .............var.menu.=.new.Gene
b1e0 72 69 63 4d 65 6e 75 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 69 78 65 ricMenu();..............if.(mixe
b200 64 53 65 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 75 69 dSelection)..................Bui
b220 6c 64 43 6f 6e 74 65 78 74 4d 65 6e 75 46 6f 72 28 74 79 70 65 6f 66 28 41 63 74 69 6f 6e 54 72 ldContextMenuFor(typeof(ActionTr
b240 65 65 49 74 65 6d 42 61 73 65 29 2c 20 6d 65 6e 75 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 eeItemBase),.menu,.true);.......
b260 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 20 20 20 20 42 75 69 .......else..................Bui
b280 6c 64 43 6f 6e 74 65 78 74 4d 65 6e 75 46 6f 72 28 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d ldContextMenuFor(GetSelectedItem
b2a0 73 28 29 2e 46 69 72 73 74 28 29 2e 47 65 74 54 79 70 65 28 29 2c 20 6d 65 6e 75 2c 20 47 65 74 s().First().GetType(),.menu,.Get
b2c0 53 65 6c 65 63 74 69 6f 6e 28 29 2e 43 6f 75 6e 74 20 3e 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 Selection().Count.>.1);.........
b2e0 20 20 20 20 20 6d 65 6e 75 2e 53 68 6f 77 41 73 43 6f 6e 74 65 78 74 28 29 3b 0d 0a 20 20 20 20 .....menu.ShowAsContext();......
b300 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 ....}............protected.overr
b320 69 64 65 20 76 6f 69 64 20 43 6f 6e 74 65 78 74 43 6c 69 63 6b 65 64 49 74 65 6d 28 69 6e 74 20 ide.void.ContextClickedItem(int.
b340 69 64 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 20 57 id)..........{..............//.W
b360 68 65 6e 20 72 69 67 68 74 2d 63 6c 69 63 6b 69 6e 67 20 61 6e 20 75 6e 73 65 6c 65 63 74 65 64 hen.right-clicking.an.unselected
b380 20 69 74 65 6d 2c 20 54 72 65 65 56 69 65 77 20 64 6f 65 73 20 63 68 61 6e 67 65 20 74 68 65 20 .item,.TreeView.does.change.the.
b3a0 73 65 6c 65 63 74 69 6f 6e 20 74 6f 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f selection.to.the..............//
b3c0 20 63 6c 69 63 6b 65 64 20 69 74 65 6d 20 62 75 74 20 74 68 65 20 76 69 73 75 61 6c 20 66 65 65 .clicked.item.but.the.visual.fee
b3e0 64 62 61 63 6b 20 6f 6e 6c 79 20 63 6f 6d 65 73 20 69 6e 20 74 68 65 20 2a 6e 65 78 74 2a 20 72 dback.only.comes.in.the.*next*.r
b400 65 70 61 69 6e 74 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 epaint..This.means.that.........
b420 20 20 20 20 20 2f 2f 20 69 66 20 77 65 20 70 6f 70 20 75 70 20 61 20 63 6f 6e 74 65 78 74 20 6d .....//.if.we.pop.up.a.context.m
b440 65 6e 75 20 72 69 67 68 74 20 61 77 61 79 20 68 65 72 65 2c 20 74 68 65 20 75 73 65 72 20 64 6f enu.right.away.here,.the.user.do
b460 65 73 20 6e 6f 74 20 63 6f 72 72 65 63 74 6c 79 20 73 65 65 20 77 68 69 63 68 20 69 74 65 6d 0d es.not.correctly.see.which.item.
b480 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 73 20 61 66 66 65 63 74 65 64 2e 0d 0a 20 20 .............//.is.affected.....
b4a0 20 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6f 2c ..........//..............//.So,
b4c0 20 69 6e 73 74 65 61 64 20 77 65 20 66 6f 72 63 65 20 61 20 72 65 70 61 69 6e 74 20 61 6e 64 20 .instead.we.force.a.repaint.and.
b4e0 6f 70 65 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 20 6d 65 6e 75 20 6f 6e 20 74 68 65 20 6e 65 78 open.the.context.menu.on.the.nex
b500 74 20 4f 6e 47 55 49 28 29 20 63 61 6c 6c 2e 20 4e 6f 74 65 0d 0a 20 20 20 20 20 20 20 20 20 20 t.OnGUI().call..Note............
b520 20 20 2f 2f 20 74 68 61 74 20 77 65 20 63 61 6e 27 74 20 75 73 65 20 73 6f 6d 65 74 68 69 6e 67 ..//.that.we.can't.use.something
b540 20 6c 69 6b 65 20 45 64 69 74 6f 72 41 70 70 6c 69 63 61 74 69 6f 6e 2e 64 65 6c 61 79 43 61 6c .like.EditorApplication.delayCal
b560 6c 20 68 65 72 65 20 61 73 20 53 68 6f 77 41 73 43 6f 6e 74 65 78 74 28 29 0d 0a 20 20 20 20 20 l.here.as.ShowAsContext().......
b580 20 20 20 20 20 20 20 2f 2f 20 63 61 6e 20 6f 6e 6c 79 20 62 65 20 63 61 6c 6c 65 64 20 66 72 6f .......//.can.only.be.called.fro
b5a0 6d 20 55 49 20 63 61 6c 6c 62 61 63 6b 73 20 28 6f 74 68 65 72 77 69 73 65 20 69 74 20 77 69 6c m.UI.callbacks.(otherwise.it.wil
b5c0 6c 20 73 69 6d 70 6c 79 20 62 65 20 69 67 6e 6f 72 65 64 29 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 l.simply.be.ignored)............
b5e0 20 20 20 20 20 6d 5f 49 6e 69 74 69 61 74 65 43 6f 6e 74 65 78 74 4d 65 6e 75 4f 6e 4e 65 78 74 .....m_InitiateContextMenuOnNext
b600 52 65 70 61 69 6e 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 Repaint.=.true;..............Rep
b620 61 69 6e 74 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 20 23 65 aint();..........}............#e
b640 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 41 64 64 20 ndregion............#region.Add.
b660 4e 65 77 20 49 74 65 6d 73 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 New.Items............///.<summar
b680 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 64 64 20 61 20 6e 65 77 20 61 63 74 69 6f 6e y>..........///.Add.a.new.action
b6a0 20 6d 61 70 20 74 6f 20 74 68 65 20 74 6f 70 6c 65 76 65 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 .map.to.the.toplevel.<see.cref="
b6c0 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f InputActionAsset"/>...........//
b6e0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 /.</summary>..........public.voi
b700 64 20 41 64 64 4e 65 77 41 63 74 69 6f 6e 4d 61 70 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a d.AddNewActionMap()..........{..
b720 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 50 72 6f 70 65 72 74 ............var.actionMapPropert
b740 79 20 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 y.=.InputActionSerializationHelp
b760 65 72 73 2e 41 64 64 41 63 74 69 6f 6e 4d 61 70 28 73 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 ers.AddActionMap(serializedObjec
b780 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 50 72 6f 70 65 t);..............var.actionPrope
b7a0 72 74 79 20 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 rty.=.InputActionSerializationHe
b7c0 6c 70 65 72 73 2e 41 64 64 41 63 74 69 6f 6e 28 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 lpers.AddAction(actionMapPropert
b7e0 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 y);..............InputActionSeri
b800 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 41 64 64 42 69 6e 64 69 6e 67 28 61 63 74 69 alizationHelpers.AddBinding(acti
b820 6f 6e 50 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 2c 20 67 onProperty,.actionMapProperty,.g
b840 72 6f 75 70 73 3a 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 roups:.bindingGroupForNewBinding
b860 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 4e 65 77 49 74 65 6d 41 64 64 65 64 28 s);..............OnNewItemAdded(
b880 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a actionMapProperty);..........}..
b8a0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........///.<summary>.........
b8c0 20 2f 2f 2f 20 41 64 64 20 6e 65 77 20 61 63 74 69 6f 6e 20 74 6f 20 74 68 65 20 63 75 72 72 65 .///.Add.new.action.to.the.curre
b8e0 6e 74 6c 79 20 61 63 74 69 76 65 20 61 63 74 69 6f 6e 20 6d 61 70 28 73 29 2e 0d 0a 20 20 20 20 ntly.active.action.map(s).......
b900 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c ....///.</summary>..........publ
b920 69 63 20 76 6f 69 64 20 41 64 64 4e 65 77 41 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 ic.void.AddNewAction()..........
b940 7b 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 61 63 74 69 {..............foreach.(var.acti
b960 6f 6e 4d 61 70 49 74 65 6d 20 69 6e 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 4f 72 50 onMapItem.in.GetSelectedItemsOrP
b980 61 72 65 6e 74 73 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 3e 28 arentsOfType<ActionMapTreeItem>(
b9a0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 41 63 74 69 6f 6e ))..................AddNewAction
b9c0 28 61 63 74 69 6f 6e 4d 61 70 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 (actionMapItem.property);.......
b9e0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 4e ...}............public.void.AddN
ba00 65 77 41 63 74 69 6f 6e 28 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 ewAction(SerializedProperty.acti
ba20 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 onMapProperty)..........{.......
ba40 20 20 20 20 20 20 20 69 66 20 28 6f 6e 48 61 6e 64 6c 65 41 64 64 4e 65 77 41 63 74 69 6f 6e 20 .......if.(onHandleAddNewAction.
ba60 21 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 6f 6e 48 61 6e 64 !=.null)..................onHand
ba80 6c 65 41 64 64 4e 65 77 41 63 74 69 6f 6e 28 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 leAddNewAction(actionMapProperty
baa0 29 3b 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 20 20 20 );..............else............
bac0 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 61 63 74 69 6f 6e 50 ..{..................var.actionP
bae0 72 6f 70 65 72 74 79 20 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 roperty.=.InputActionSerializati
bb00 6f 6e 48 65 6c 70 65 72 73 2e 41 64 64 41 63 74 69 6f 6e 28 61 63 74 69 6f 6e 4d 61 70 50 72 6f onHelpers.AddAction(actionMapPro
bb20 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 41 63 perty);..................InputAc
bb40 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 41 64 64 42 69 6e 64 tionSerializationHelpers.AddBind
bb60 69 6e 67 28 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 4d 61 70 50 72 6f ing(actionProperty,.actionMapPro
bb80 70 65 72 74 79 2c 20 67 72 6f 75 70 73 3a 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 perty,.groups:.bindingGroupForNe
bba0 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 4e wBindings);..................OnN
bbc0 65 77 49 74 65 6d 41 64 64 65 64 28 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 ewItemAdded(actionProperty);....
bbe0 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 20 20 20 20 ..........}..........}..........
bc00 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 4e 65 77 42 69 6e 64 69 6e 67 28 29 0d 0a 20 ..public.void.AddNewBinding()...
bc20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 .......{..............foreach.(v
bc40 61 72 20 61 63 74 69 6f 6e 49 74 65 6d 20 69 6e 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d ar.actionItem.in.GetSelectedItem
bc60 73 4f 72 50 61 72 65 6e 74 73 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 3e sOrParentsOfType<ActionTreeItem>
bc80 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 42 69 6e 64 69 ())..................AddNewBindi
bca0 6e 67 28 61 63 74 69 6f 6e 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 49 74 ng(actionItem.property,.actionIt
bcc0 65 6d 2e 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 em.actionMapProperty);..........
bce0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 4e 65 77 42 }............public.void.AddNewB
bd00 69 6e 64 69 6e 67 28 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 6f 6e inding(SerializedProperty.action
bd20 50 72 6f 70 65 72 74 79 2c 20 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 20 61 63 74 Property,.SerializedProperty.act
bd40 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ionMapProperty)..........{......
bd60 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 50 72 6f 70 65 72 74 79 20 3d 20 49 6e ........var.bindingProperty.=.In
bd80 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 48 65 6c 70 65 72 73 2e 41 64 putActionSerializationHelpers.Ad
bda0 64 42 69 6e 64 69 6e 67 28 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 4d dBinding(actionProperty,.actionM
bdc0 61 70 50 72 6f 70 65 72 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 72 6f apProperty,..................gro
bde0 75 70 73 3a 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 ups:.bindingGroupForNewBindings)
be00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 4e 65 77 49 74 65 6d 41 64 64 65 64 28 62 69 ;..............OnNewItemAdded(bi
be20 6e 64 69 6e 67 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ndingProperty);..........}......
be40 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 4e 65 77 43 6f 6d 70 6f 73 69 74 ......public.void.AddNewComposit
be60 65 28 73 74 72 69 6e 67 20 63 6f 6d 70 6f 73 69 74 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 e(string.compositeType).........
be80 20 7b 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 61 63 74 .{..............foreach.(var.act
bea0 69 6f 6e 49 74 65 6d 20 69 6e 20 47 65 74 53 65 6c 65 63 74 65 64 49 74 65 6d 73 4f 72 50 61 72 ionItem.in.GetSelectedItemsOrPar
bec0 65 6e 74 73 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 3e 28 29 29 0d 0a 20 entsOfType<ActionTreeItem>())...
bee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 43 6f 6d 70 6f 73 69 74 65 28 61 ...............AddNewComposite(a
bf00 63 74 69 6f 6e 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 2c 20 61 63 74 69 6f 6e 49 74 65 6d 2e 61 ctionItem.property,.actionItem.a
bf20 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 2c 20 63 6f 6d 70 6f 73 69 74 65 54 79 70 65 29 ctionMapProperty,.compositeType)
bf40 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 ;..........}............public.v
bf60 6f 69 64 20 41 64 64 4e 65 77 43 6f 6d 70 6f 73 69 74 65 28 53 65 72 69 61 6c 69 7a 65 64 50 72 oid.AddNewComposite(SerializedPr
bf80 6f 70 65 72 74 79 20 61 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 53 65 72 69 61 6c 69 7a 65 operty.actionProperty,.Serialize
bfa0 64 50 72 6f 70 65 72 74 79 20 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 2c 20 73 74 72 dProperty.actionMapProperty,.str
bfc0 69 6e 67 20 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 ing.compositeName)..........{...
bfe0 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6d 70 6f 73 69 74 65 54 79 70 65 20 3d 20 49 ...........var.compositeType.=.I
c000 6e 70 75 74 42 69 6e 64 69 6e 67 43 6f 6d 70 6f 73 69 74 65 2e 73 5f 43 6f 6d 70 6f 73 69 74 65 nputBindingComposite.s_Composite
c020 73 2e 4c 6f 6f 6b 75 70 54 79 70 65 52 65 67 69 73 74 72 61 74 69 6f 6e 28 63 6f 6d 70 6f 73 69 s.LookupTypeRegistration(composi
c040 74 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6d 70 6f 73 teName);..............if.(compos
c060 69 74 65 54 79 70 65 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 iteType.==.null)................
c080 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 6e 28 24 22 ..throw.new.ArgumentException($"
c0a0 43 61 6e 6e 6f 74 20 66 69 6e 64 20 63 6f 6d 70 6f 73 69 74 65 20 72 65 67 69 73 74 72 61 74 69 Cannot.find.composite.registrati
c0c0 6f 6e 20 66 6f 72 20 7b 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 7d 22 2c 0d 0a 20 20 20 20 20 20 on.for.{compositeName}",........
c0e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 6f 66 28 63 6f 6d 70 6f 73 69 74 65 4e 61 ..............nameof(compositeNa
c100 6d 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6d 70 6f 73 69 74 65 me));..............var.composite
c120 50 72 6f 70 65 72 74 79 20 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 72 69 61 6c 69 7a 61 74 Property.=.InputActionSerializat
c140 69 6f 6e 48 65 6c 70 65 72 73 2e 41 64 64 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 28 61 ionHelpers.AddCompositeBinding(a
c160 63 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ctionProperty,..................
c180 61 63 74 69 6f 6e 4d 61 70 50 72 6f 70 65 72 74 79 2c 20 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 actionMapProperty,.compositeName
c1a0 2c 20 63 6f 6d 70 6f 73 69 74 65 54 79 70 65 2c 20 67 72 6f 75 70 73 3a 20 62 69 6e 64 69 6e 67 ,.compositeType,.groups:.binding
c1c0 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 GroupForNewBindings);...........
c1e0 20 20 20 4f 6e 4e 65 77 49 74 65 6d 41 64 64 65 64 28 63 6f 6d 70 6f 73 69 74 65 50 72 6f 70 65 ...OnNewItemAdded(compositePrope
c200 72 74 79 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 70 72 69 76 rty);..........}............priv
c220 61 74 65 20 76 6f 69 64 20 4f 6e 4e 65 77 49 74 65 6d 41 64 64 65 64 28 53 65 72 69 61 6c 69 7a ate.void.OnNewItemAdded(Serializ
c240 65 64 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d edProperty.property)..........{.
c260 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 4d .............OnSerializedObjectM
c280 6f 64 69 66 69 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 6c 65 63 74 49 74 odified();..............SelectIt
c2a0 65 6d 41 6e 64 42 65 67 69 6e 52 65 6e 61 6d 65 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 emAndBeginRename(property);.....
c2c0 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 76 6f 69 64 20 53 .....}............private.void.S
c2e0 65 6c 65 63 74 49 74 65 6d 41 6e 64 42 65 67 69 6e 52 65 6e 61 6d 65 28 53 65 72 69 61 6c 69 7a electItemAndBeginRename(Serializ
c300 65 64 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d edProperty.property)..........{.
c320 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 46 69 6e 64 49 74 65 6d .............var.item.=.FindItem
c340 46 6f 72 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 For(property);..............if.(
c360 69 74 65 6d 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 item.==.null)..............{....
c380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 66 20 77 65 20 63 6f 75 6c 64 20 6e 6f 74 ..............//.if.we.could.not
c3a0 20 66 69 6e 64 20 74 68 65 20 69 74 65 6d 2c 20 74 72 79 20 63 6c 65 61 72 69 6e 67 20 73 65 61 .find.the.item,.try.clearing.sea
c3c0 72 63 68 20 66 69 6c 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6c rch.filters...................Cl
c3e0 65 61 72 49 74 65 6d 53 65 61 72 63 68 46 69 6c 74 65 72 41 6e 64 52 65 6c 6f 61 64 28 29 3b 0d earItemSearchFilterAndReload();.
c400 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 20 3d 20 46 69 6e 64 49 74 65 6d .................item.=.FindItem
c420 46 6f 72 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 For(property);..............}...
c440 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 69 74 65 6d 20 21 3d 20 ...........Debug.Assert(item.!=.
c460 6e 75 6c 6c 2c 20 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 6e 65 77 6c 79 20 63 72 65 61 74 65 null,.$"Cannot.find.newly.create
c480 64 20 69 74 65 6d 20 66 6f 72 20 7b 70 72 6f 70 65 72 74 79 2e 70 72 6f 70 65 72 74 79 50 61 74 d.item.for.{property.propertyPat
c4a0 68 7d 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 45 78 70 61 6e 64 65 64 52 65 h}");..............SetExpandedRe
c4c0 63 75 72 73 69 76 65 28 69 74 65 6d 2e 69 64 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 cursive(item.id,.true);.........
c4e0 20 20 20 20 20 53 65 6c 65 63 74 49 74 65 6d 28 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 .....SelectItem(item);..........
c500 20 20 20 20 53 65 74 46 6f 63 75 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 72 61 ....SetFocus();..............Fra
c520 6d 65 49 74 65 6d 28 69 74 65 6d 2e 69 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 meItem(item.id);..............if
c540 20 28 69 74 65 6d 2e 63 61 6e 52 65 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .(item.canRename)...............
c560 20 20 20 42 65 67 69 6e 52 65 6e 61 6d 65 28 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d ...BeginRename(item);..........}
c580 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 ............#endregion..........
c5a0 20 20 23 72 65 67 69 6f 6e 20 44 72 61 77 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 ..#region.Drawing............pub
c5c0 6c 69 63 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 47 55 49 28 52 65 63 74 20 72 65 63 lic.override.void.OnGUI(Rect.rec
c5e0 74 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 6d t)..........{..............if.(m
c600 5f 49 6e 69 74 69 61 74 65 43 6f 6e 74 65 78 74 4d 65 6e 75 4f 6e 4e 65 78 74 52 65 70 61 69 6e _InitiateContextMenuOnNextRepain
c620 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 20 20 20 20 t)..............{...............
c640 20 20 20 6d 5f 49 6e 69 74 69 61 74 65 43 6f 6e 74 65 78 74 4d 65 6e 75 4f 6e 4e 65 78 74 52 65 ...m_InitiateContextMenuOnNextRe
c660 70 61 69 6e 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 paint.=.false;..................
c680 50 6f 70 55 70 43 6f 6e 74 65 78 74 4d 65 6e 75 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 PopUpContextMenu();.............
c6a0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 52 65 6c 6f 61 64 49 66 53 65 .}................if.(ReloadIfSe
c6c0 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 48 61 73 42 65 65 6e 43 68 61 6e 67 65 64 28 29 29 0d rializedObjectHasBeenChanged()).
c6e0 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 20 .................return;........
c700 20 20 20 20 20 20 20 20 2f 2f 20 44 72 61 77 20 62 6f 72 64 65 72 20 72 65 63 74 2e 0d 0a 20 20 ........//.Draw.border.rect.....
c720 20 20 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 47 55 49 2e 4c 61 62 65 6c 46 69 65 6c 64 28 72 ..........EditorGUI.LabelField(r
c740 65 63 74 2c 20 47 55 49 43 6f 6e 74 65 6e 74 2e 6e 6f 6e 65 2c 20 53 74 79 6c 65 73 2e 62 61 63 ect,.GUIContent.none,.Styles.bac
c760 6b 67 72 6f 75 6e 64 57 69 74 68 42 6f 72 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 kgroundWithBorder);.............
c780 20 72 65 63 74 2e 78 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e .rect.x.+=.1;..............rect.
c7a0 79 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e 68 65 69 67 68 74 y.+=.1;..............rect.height
c7c0 20 2d 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e 77 69 64 74 68 20 2d .-=.1;..............rect.width.-
c7e0 3d 20 32 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 72 61 77 48 65 61 64 =.2;................if.(drawHead
c800 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 48 65 61 64 65 72 28 er)..................DrawHeader(
c820 72 65 66 20 72 65 63 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 2e 4f ref.rect);................base.O
c840 6e 47 55 49 28 72 65 63 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 48 61 6e 64 6c nGUI(rect);................Handl
c860 65 43 6f 70 79 50 61 73 74 65 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 45 76 65 6e 74 2e 63 75 72 eCopyPasteCommandEvent(Event.cur
c880 72 65 6e 74 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 70 72 69 rent);..........}............pri
c8a0 76 61 74 65 20 76 6f 69 64 20 44 72 61 77 48 65 61 64 65 72 28 72 65 66 20 52 65 63 74 20 72 65 vate.void.DrawHeader(ref.Rect.re
c8c0 63 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 ct)..........{..............var.
c8e0 68 65 61 64 65 72 52 65 63 74 20 3d 20 72 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 headerRect.=.rect;..............
c900 68 65 61 64 65 72 52 65 63 74 2e 68 65 69 67 68 74 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 headerRect.height.=.EditorGUIUti
c920 6c 69 74 79 2e 73 69 6e 67 6c 65 4c 69 6e 65 48 65 69 67 68 74 20 2b 20 45 64 69 74 6f 72 47 55 lity.singleLineHeight.+.EditorGU
c940 49 55 74 69 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 63 69 6e 67 IUtility.standardVerticalSpacing
c960 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e 79 20 2b 3d 20 68 65 61 64 65 ;................rect.y.+=.heade
c980 72 52 65 63 74 2e 68 65 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e rRect.height;..............rect.
c9a0 68 65 69 67 68 74 20 2d 3d 20 68 65 61 64 65 72 52 65 63 74 2e 68 65 69 67 68 74 3b 0d 0a 0d 0a height.-=.headerRect.height;....
c9c0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 72 61 77 20 6c 61 62 65 6c 2e 0d 0a 20 20 20 20 ............//.Draw.label.......
c9e0 20 20 20 20 20 20 20 20 45 64 69 74 6f 72 47 55 49 2e 4c 61 62 65 6c 46 69 65 6c 64 28 68 65 61 ........EditorGUI.LabelField(hea
ca00 64 65 72 52 65 63 74 2c 20 6d 5f 54 69 74 6c 65 2c 20 53 74 79 6c 65 73 2e 63 6f 6c 75 6d 6e 48 derRect,.m_Title,.Styles.columnH
ca20 65 61 64 65 72 4c 61 62 65 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 eaderLabel);................//.D
ca40 72 61 77 20 6d 69 6e 75 73 20 62 75 74 74 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 raw.minus.button...............v
ca60 61 72 20 62 75 74 74 6f 6e 52 65 63 74 20 3d 20 68 65 61 64 65 72 52 65 63 74 3b 0d 0a 20 20 20 ar.buttonRect.=.headerRect;.....
ca80 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 74 2e 77 69 64 74 68 20 3d 20 45 64 69 74 .........buttonRect.width.=.Edit
caa0 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 69 6e 67 6c 65 4c 69 6e 65 48 65 69 67 68 74 3b 0d 0a orGUIUtility.singleLineHeight;..
cac0 20 20 20 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 74 2e 78 20 2b 3d 20 72 65 63 74 ............buttonRect.x.+=.rect
cae0 2e 77 69 64 74 68 20 2d 20 62 75 74 74 6f 6e 52 65 63 74 2e 77 69 64 74 68 20 2d 20 45 64 69 74 .width.-.buttonRect.width.-.Edit
cb00 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 orGUIUtility.standardVerticalSpa
cb20 63 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 72 61 77 4d 69 6e 75 73 cing;..............if.(drawMinus
cb40 42 75 74 74 6f 6e 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 Button)..............{..........
cb60 20 20 20 20 20 20 20 20 76 61 72 20 6d 69 6e 75 73 42 75 74 74 6f 6e 44 69 73 61 62 6c 65 64 20 ........var.minusButtonDisabled.
cb80 3d 20 21 48 61 73 53 65 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 =.!HasSelection();..............
cba0 20 20 20 20 75 73 69 6e 67 20 28 6e 65 77 20 45 64 69 74 6f 72 47 55 49 2e 44 69 73 61 62 6c 65 ....using.(new.EditorGUI.Disable
cbc0 64 53 63 6f 70 65 28 6d 69 6e 75 73 42 75 74 74 6f 6e 44 69 73 61 62 6c 65 64 29 29 0d 0a 20 20 dScope(minusButtonDisabled))....
cbe0 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 20 20 ..............{.................
cc00 20 20 20 20 20 69 66 20 28 47 55 49 2e 42 75 74 74 6f 6e 28 62 75 74 74 6f 6e 52 65 63 74 2c 20 .....if.(GUI.Button(buttonRect,.
cc20 6d 69 6e 75 73 49 63 6f 6e 2c 20 47 55 49 53 74 79 6c 65 2e 6e 6f 6e 65 29 29 0d 0a 20 20 20 20 minusIcon,.GUIStyle.none))......
cc40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 6c 65 74 65 44 61 74 61 4f 66 ....................DeleteDataOf
cc60 53 65 6c 65 63 74 65 64 49 74 65 6d 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 SelectedItems();................
cc80 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 ..}....................buttonRec
cca0 74 2e 78 20 2d 3d 20 62 75 74 74 6f 6e 52 65 63 74 2e 77 69 64 74 68 20 2b 20 45 64 69 74 6f 72 t.x.-=.buttonRect.width.+.Editor
ccc0 47 55 49 55 74 69 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 63 69 GUIUtility.standardVerticalSpaci
cce0 6e 67 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 20 20 ng;..............}..............
cd00 20 20 2f 2f 20 44 72 61 77 20 70 6c 75 73 20 62 75 74 74 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 ..//.Draw.plus.button...........
cd20 20 20 20 20 69 66 20 28 64 72 61 77 50 6c 75 73 42 75 74 74 6f 6e 29 0d 0a 20 20 20 20 20 20 20 ....if.(drawPlusButton).........
cd40 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 70 6c 75 73 .....{..................var.plus
cd60 49 63 6f 6e 44 69 73 61 62 6c 65 64 20 3d 20 6f 6e 42 75 69 6c 64 54 72 65 65 20 3d 3d 20 6e 75 IconDisabled.=.onBuildTree.==.nu
cd80 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 6e 65 77 20 ll;..................using.(new.
cda0 45 64 69 74 6f 72 47 55 49 2e 44 69 73 61 62 6c 65 64 53 63 6f 70 65 28 70 6c 75 73 49 63 6f 6e EditorGUI.DisabledScope(plusIcon
cdc0 44 69 73 61 62 6c 65 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 Disabled))..................{...
cde0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 47 55 49 2e 42 75 74 74 6f ...................if.(GUI.Butto
ce00 6e 28 62 75 74 74 6f 6e 52 65 63 74 2c 20 70 6c 75 73 49 63 6f 6e 2c 20 47 55 49 53 74 79 6c 65 n(buttonRect,.plusIcon,.GUIStyle
ce20 2e 6e 6f 6e 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a .none))......................{..
ce40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 6f 6f 74 ........................if.(root
ce60 49 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 6d 20 6d 61 70 49 74 65 Item.is.ActionMapTreeItem.mapIte
ce80 6d 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 7b 0d 0a 20 m)..........................{...
cea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 ...........................AddNe
cec0 77 41 63 74 69 6f 6e 28 6d 61 70 49 74 65 6d 2e 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 wAction(mapItem.property);......
cee0 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 20 ....................}...........
cf00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 72 6f 6f 74 49 74 65 6d ...............else.if.(rootItem
cf20 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 20 61 63 74 69 6f 6e 49 74 65 6d 29 0d 0a .is.ActionTreeItem.actionItem)..
cf40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........................{.......
cf60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 69 6e 67 .......................//.Adding
cf80 20 61 20 63 6f 6d 70 6f 73 69 74 65 20 68 61 73 20 6d 75 6c 74 69 70 6c 65 20 6f 70 74 69 6f 6e .a.composite.has.multiple.option
cfa0 73 2e 20 50 6f 70 20 75 70 20 61 20 6d 65 6e 75 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 s..Pop.up.a.menu................
cfc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 6e 75 20 3d 20 6e 65 77 20 47 65 ...............var.menu.=.new.Ge
cfe0 6e 65 72 69 63 4d 65 6e 75 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nericMenu();....................
d000 20 20 20 20 20 20 20 20 20 20 42 75 69 6c 64 4d 65 6e 75 54 6f 41 64 64 42 69 6e 64 69 6e 67 73 ..........BuildMenuToAddBindings
d020 28 6d 65 6e 75 2c 20 61 63 74 69 6f 6e 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 (menu,.actionItem);.............
d040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 53 68 6f 77 41 73 43 6f 6e 74 .................menu.ShowAsCont
d060 65 78 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 20 20 20 20 ext();..........................
d080 7d 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 65 6c 73 65 0d }..........................else.
d0a0 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 7b 0d 0a 20 20 20 20 .........................{......
d0c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 41 63 ........................AddNewAc
d0e0 74 69 6f 6e 4d 61 70 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 tionMap();......................
d100 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ....}......................}....
d120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 74 2e 78 ....................buttonRect.x
d140 20 2d 3d 20 62 75 74 74 6f 6e 52 65 63 74 2e 77 69 64 74 68 20 2b 20 45 64 69 74 6f 72 47 55 49 .-=.buttonRect.width.+.EditorGUI
d160 55 74 69 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 63 69 6e 67 3b Utility.standardVerticalSpacing;
d180 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 ..................}.............
d1a0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 72 61 77 20 61 63 74 69 6f 6e .}................//.Draw.action
d1c0 20 70 72 6f 70 65 72 74 69 65 73 20 62 75 74 74 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .properties.button..............
d1e0 20 69 66 20 28 64 72 61 77 41 63 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 42 75 74 74 6f 6e 20 .if.(drawActionPropertiesButton.
d200 26 26 20 72 6f 6f 74 49 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 20 69 74 &&.rootItem.is.ActionTreeItem.it
d220 65 6d 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 em)..............{..............
d240 20 20 20 20 69 66 20 28 47 55 49 2e 42 75 74 74 6f 6e 28 62 75 74 74 6f 6e 52 65 63 74 2c 20 73 ....if.(GUI.Button(buttonRect,.s
d260 5f 41 63 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 49 63 6f 6e 2c 20 47 55 49 53 74 79 6c 65 2e _ActionPropertiesIcon,.GUIStyle.
d280 6e 6f 6e 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e 44 6f none))......................onDo
d2a0 75 62 6c 65 43 6c 69 63 6b 3f 2e 49 6e 76 6f 6b 65 28 69 74 65 6d 29 3b 0d 0a 20 20 20 20 20 20 ubleClick?.Invoke(item);........
d2c0 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 2f 2f ......}..........}............//
d2e0 20 46 6f 72 20 65 61 63 68 20 69 74 65 6d 2c 20 77 65 20 64 72 61 77 0d 0a 20 20 20 20 20 20 20 .For.each.item,.we.draw.........
d300 20 2f 2f 20 20 31 29 20 63 6f 6c 6f 72 20 74 61 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 32 .//..1).color.tag..........//..2
d320 29 20 66 6f 6c 64 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 33 29 20 64 69 73 70 6c 61 ).foldout..........//..3).displa
d340 79 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 34 29 20 4c 69 6e 65 20 75 6e 64 65 y.name..........//..4).Line.unde
d360 72 6e 65 61 74 68 20 69 74 65 6d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 63 rneath.item............private.c
d380 6f 6e 73 74 20 69 6e 74 20 6b 43 6f 6c 6f 72 54 61 67 57 69 64 74 68 20 3d 20 36 3b 0d 0a 20 20 onst.int.kColorTagWidth.=.6;....
d3a0 20 20 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 69 6e 74 20 6b 46 6f 6c 64 6f 75 74 ......private.const.int.kFoldout
d3c0 57 69 64 74 68 20 3d 20 31 35 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 4d 45 Width.=.15;............////FIXME
d3e0 3a 20 66 6f 6c 64 6f 75 74 20 68 6f 76 65 72 20 72 65 67 69 6f 6e 20 69 73 20 77 61 79 20 74 6f :.foldout.hover.region.is.way.to
d400 6f 20 6c 61 72 67 65 3b 20 70 61 72 74 6c 79 20 6f 76 65 72 6c 61 70 73 20 74 68 65 20 74 65 78 o.large;.partly.overlaps.the.tex
d420 74 20 6f 66 20 69 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c t.of.items..........private.bool
d440 20 44 72 61 77 46 6f 6c 64 6f 75 74 28 52 65 63 74 20 70 6f 73 69 74 69 6f 6e 2c 20 62 6f 6f 6c .DrawFoldout(Rect.position,.bool
d460 20 65 78 70 61 6e 64 65 64 53 74 61 74 65 2c 20 47 55 49 53 74 79 6c 65 20 73 74 79 6c 65 29 0d .expandedState,.GUIStyle.style).
d480 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 20 57 65 20 64 6f .........{..............//.We.do
d4a0 6e 27 74 20 67 65 74 20 74 68 65 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 69 74 65 6d 20 77 65 n't.get.the.depth.of.the.item.we
d4c0 27 72 65 20 64 72 61 77 69 6e 67 20 74 68 65 20 66 6f 6c 64 6f 75 74 20 66 6f 72 20 62 75 74 20 're.drawing.the.foldout.for.but.
d4e0 77 65 20 63 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 66 65 72 20 69 74 20 we.can..............//.infer.it.
d500 62 79 20 74 68 65 20 61 6d 6f 75 6e 74 20 74 68 61 74 20 74 68 65 20 67 69 76 65 6e 20 72 65 63 by.the.amount.that.the.given.rec
d520 74 61 6e 67 6c 65 20 77 61 73 20 69 6e 64 65 6e 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 tangle.was.indented.............
d540 20 20 76 61 72 20 69 6e 64 65 6e 74 20 3d 20 28 69 6e 74 29 28 70 6f 73 69 74 69 6f 6e 2e 78 20 ..var.indent.=.(int)(position.x.
d560 2f 20 6b 46 6f 6c 64 6f 75 74 57 69 64 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 /.kFoldoutWidth);..............p
d580 6f 73 69 74 69 6f 6e 2e 78 20 3d 20 66 6f 6c 64 6f 75 74 4f 66 66 73 65 74 20 2b 20 28 69 6e 64 osition.x.=.foldoutOffset.+.(ind
d5a0 65 6e 74 20 2b 20 31 29 20 2a 20 6b 43 6f 6c 6f 72 54 61 67 57 69 64 74 68 20 2b 20 32 3b 0d 0a ent.+.1).*.kColorTagWidth.+.2;..
d5c0 20 20 20 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 2e 77 69 64 74 68 20 3d 20 6b 46 6f ............position.width.=.kFo
d5e0 6c 64 6f 75 74 57 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ldoutWidth;..............return.
d600 45 64 69 74 6f 72 47 55 49 2e 46 6f 6c 64 6f 75 74 28 70 6f 73 69 74 69 6f 6e 2c 20 65 78 70 61 EditorGUI.Foldout(position,.expa
d620 6e 64 65 64 53 74 61 74 65 2c 20 47 55 49 43 6f 6e 74 65 6e 74 2e 6e 6f 6e 65 2c 20 74 72 75 65 ndedState,.GUIContent.none,.true
d640 2c 20 73 74 79 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 20 ,.style);..........}............
d660 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 6f 77 47 55 49 28 52 protected.override.void.RowGUI(R
d680 6f 77 47 55 49 41 72 67 73 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 owGUIArgs.args)..........{......
d6a0 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 28 41 63 74 69 6f 6e 54 72 65 65 49 74 ........var.item.=.(ActionTreeIt
d6c0 65 6d 42 61 73 65 29 61 72 67 73 2e 69 74 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 emBase)args.item;..............v
d6e0 61 72 20 69 73 52 65 70 61 69 6e 74 20 3d 20 45 76 65 6e 74 2e 63 75 72 72 65 6e 74 2e 74 79 70 ar.isRepaint.=.Event.current.typ
d700 65 20 3d 3d 20 45 76 65 6e 74 54 79 70 65 2e 52 65 70 61 69 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 e.==.EventType.Repaint;.........
d720 20 20 20 20 20 20 20 2f 2f 20 43 6f 6c 6f 72 20 74 61 67 20 61 74 20 62 65 67 69 6e 6e 69 6e 67 .......//.Color.tag.at.beginning
d740 20 6f 66 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6c 6f 72 .of.line...............var.color
d760 54 61 67 52 65 63 74 20 3d 20 61 72 67 73 2e 72 6f 77 52 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 TagRect.=.args.rowRect;.........
d780 20 20 20 20 20 63 6f 6c 6f 72 54 61 67 52 65 63 74 2e 78 20 2b 3d 20 69 74 65 6d 2e 64 65 70 74 .....colorTagRect.x.+=.item.dept
d7a0 68 20 2a 20 6b 43 6f 6c 6f 72 54 61 67 57 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 h.*.kColorTagWidth;.............
d7c0 20 63 6f 6c 6f 72 54 61 67 52 65 63 74 2e 77 69 64 74 68 20 3d 20 6b 43 6f 6c 6f 72 54 61 67 57 .colorTagRect.width.=.kColorTagW
d7e0 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 52 65 70 61 69 6e 74 idth;..............if.(isRepaint
d800 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 2e 63 6f 6c 6f 72 54 61 67 )..................item.colorTag
d820 53 74 79 6c 65 2e 44 72 61 77 28 63 6f 6c 6f 72 54 61 67 52 65 63 74 2c 20 47 55 49 43 6f 6e 74 Style.Draw(colorTagRect,.GUICont
d840 65 6e 74 2e 6e 6f 6e 65 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 2c 20 66 ent.none,.false,.false,.false,.f
d860 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 78 74 2e 0d 0a alse);................//.Text...
d880 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 68 65 6e 20 72 65 6e 61 6d 69 ............//.NOTE:.When.renami
d8a0 6e 67 2c 20 74 68 65 20 72 65 6e 61 6d 69 6e 67 20 6f 76 65 72 6c 61 79 20 67 65 74 73 20 64 72 ng,.the.renaming.overlay.gets.dr
d8c0 61 77 6e 20 6f 75 74 73 69 64 65 20 6f 66 20 6f 75 72 20 63 6f 6e 74 72 6f 6c 20 73 6f 20 64 6f awn.outside.of.our.control.so.do
d8e0 6e 27 74 20 64 72 61 77 20 74 68 65 20 6c 61 62 65 6c 20 69 6e 20 74 68 61 74 20 63 61 73 65 0d n't.draw.the.label.in.that.case.
d900 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 61 73 20 6f 74 68 65 72 77 69 .............//.......as.otherwi
d920 73 65 20 69 74 20 77 69 6c 6c 20 70 65 61 6b 20 6f 75 74 20 66 72 6f 6d 20 75 6e 64 65 72 6e 65 se.it.will.peak.out.from.underne
d940 61 74 68 20 74 68 65 20 6f 76 65 72 6c 61 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 ath.the.overlay...............if
d960 20 28 21 61 72 67 73 2e 69 73 52 65 6e 61 6d 69 6e 67 20 26 26 20 69 73 52 65 70 61 69 6e 74 29 .(!args.isRenaming.&&.isRepaint)
d980 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 ..............{.................
d9a0 20 76 61 72 20 74 65 78 74 20 3d 20 69 74 65 6d 2e 64 69 73 70 6c 61 79 4e 61 6d 65 3b 0d 0a 20 .var.text.=.item.displayName;...
d9c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 52 65 63 74 20 3d 20 47 65 ...............var.textRect.=.Ge
d9e0 74 54 65 78 74 52 65 63 74 28 61 72 67 73 2e 72 6f 77 52 65 63 74 2c 20 69 74 65 6d 29 3b 0d 0a tTextRect(args.rowRect,.item);..
da00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 79 6c 65 20 3d 20 61 72 ..................var.style.=.ar
da20 67 73 2e 73 65 6c 65 63 74 65 64 20 3f 20 53 74 79 6c 65 73 2e 73 65 6c 65 63 74 65 64 54 65 78 gs.selected.?.Styles.selectedTex
da40 74 20 3a 20 53 74 79 6c 65 73 2e 74 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.:.Styles.text;................
da60 20 20 73 74 79 6c 65 2e 44 72 61 77 28 74 65 78 74 52 65 63 74 2c 20 74 65 78 74 2c 20 66 61 6c ..style.Draw(textRect,.text,.fal
da80 73 65 2c 20 66 61 6c 73 65 2c 20 61 72 67 73 2e 73 65 6c 65 63 74 65 64 2c 0d 0a 20 20 20 20 20 se,.false,.args.selected,.......
daa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 67 73 2e 66 6f 63 75 73 65 64 29 3b 0d 0a 20 ...............args.focused);...
dac0 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 20 42 ...........}................//.B
dae0 6f 74 74 6f 6d 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 69 6e ottom.line...............var.lin
db00 65 52 65 63 74 20 3d 20 61 72 67 73 2e 72 6f 77 52 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 eRect.=.args.rowRect;...........
db20 20 20 20 6c 69 6e 65 52 65 63 74 2e 79 20 2b 3d 20 6c 69 6e 65 52 65 63 74 2e 68 65 69 67 68 74 ...lineRect.y.+=.lineRect.height
db40 20 2d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 6e 65 52 65 63 74 2e 68 65 69 67 .-.1;..............lineRect.heig
db60 68 74 20 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 52 65 70 61 69 ht.=.1;..............if.(isRepai
db80 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 79 6c 65 73 2e 62 6f 72 64 nt)..................Styles.bord
dba0 65 72 2e 44 72 61 77 28 6c 69 6e 65 52 65 63 74 2c 20 47 55 49 43 6f 6e 74 65 6e 74 2e 6e 6f 6e er.Draw(lineRect,.GUIContent.non
dbc0 65 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 29 3b 0d e,.false,.false,.false,.false);.
dbe0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 6f 72 20 61 63 74 69 6f 6e 20 69 74 65 ...............//.For.action.ite
dc00 6d 73 2c 20 61 64 64 20 61 20 64 72 6f 70 64 6f 77 6e 20 6d 65 6e 75 20 74 6f 20 61 64 64 20 62 ms,.add.a.dropdown.menu.to.add.b
dc20 69 6e 64 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 indings...............if.(item.i
dc40 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 20 61 63 74 69 6f 6e 49 74 65 6d 29 0d 0a 20 20 s.ActionTreeItem.actionItem)....
dc60 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 72 ..........{..................var
dc80 20 62 75 74 74 6f 6e 52 65 63 74 20 3d 20 61 72 67 73 2e 72 6f 77 52 65 63 74 3b 0d 0a 20 20 20 .buttonRect.=.args.rowRect;.....
dca0 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 74 2e 78 20 3d 20 62 75 74 74 .............buttonRect.x.=.butt
dcc0 6f 6e 52 65 63 74 2e 77 69 64 74 68 20 2d 20 28 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 onRect.width.-.(EditorGUIUtility
dce0 2e 73 69 6e 67 6c 65 4c 69 6e 65 48 65 69 67 68 74 20 2b 20 45 64 69 74 6f 72 47 55 49 55 74 69 .singleLineHeight.+.EditorGUIUti
dd00 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 63 69 6e 67 29 3b 0d 0a lity.standardVerticalSpacing);..
dd20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 74 74 6f 6e 52 65 63 74 2e 77 69 64 74 68 ................buttonRect.width
dd40 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 69 6e 67 6c 65 4c 69 6e 65 48 65 .=.EditorGUIUtility.singleLineHe
dd60 69 67 68 74 20 2b 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 74 61 6e 64 61 72 64 ight.+.EditorGUIUtility.standard
dd80 56 65 72 74 69 63 61 6c 53 70 61 63 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 VerticalSpacing;................
dda0 20 20 69 66 20 28 47 55 49 2e 42 75 74 74 6f 6e 28 62 75 74 74 6f 6e 52 65 63 74 2c 20 73 5f 50 ..if.(GUI.Button(buttonRect,.s_P
ddc0 6c 75 73 42 69 6e 64 69 6e 67 49 63 6f 6e 2c 20 47 55 49 53 74 79 6c 65 2e 6e 6f 6e 65 29 29 0d lusBindingIcon,.GUIStyle.none)).
dde0 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 .................{..............
de00 20 20 20 20 20 20 20 20 76 61 72 20 6d 65 6e 75 20 3d 20 6e 65 77 20 47 65 6e 65 72 69 63 4d 65 ........var.menu.=.new.GenericMe
de20 6e 75 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 42 75 69 6c 64 nu();......................Build
de40 4d 65 6e 75 54 6f 41 64 64 42 69 6e 64 69 6e 67 73 28 6d 65 6e 75 2c 20 61 63 74 69 6f 6e 49 74 MenuToAddBindings(menu,.actionIt
de60 65 6d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6e 75 2e 53 em);......................menu.S
de80 68 6f 77 41 73 43 6f 6e 74 65 78 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 howAsContext();.................
dea0 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 7d 0d 0a 0d 0a .}..............}..........}....
dec0 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 66 6c 6f 61 74 ........protected.override.float
dee0 20 47 65 74 43 75 73 74 6f 6d 52 6f 77 48 65 69 67 68 74 28 69 6e 74 20 72 6f 77 2c 20 54 72 65 .GetCustomRowHeight(int.row,.Tre
df00 65 56 69 65 77 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 eViewItem.item)..........{......
df20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 31 38 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ........return.18;..........}...
df40 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 52 65 63 74 .........protected.override.Rect
df60 20 47 65 74 52 65 6e 61 6d 65 52 65 63 74 28 52 65 63 74 20 72 6f 77 52 65 63 74 2c 20 69 6e 74 .GetRenameRect(Rect.rowRect,.int
df80 20 72 6f 77 2c 20 54 72 65 65 56 69 65 77 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 .row,.TreeViewItem.item)........
dfa0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 52 65 63 74 20 3d 20 ..{..............var.textRect.=.
dfc0 47 65 74 54 65 78 74 52 65 63 74 28 72 6f 77 52 65 63 74 2c 20 69 74 65 6d 29 3b 0d 0a 20 20 20 GetTextRect(rowRect,.item);.....
dfe0 20 20 20 20 20 20 20 20 20 74 65 78 74 52 65 63 74 2e 78 20 2b 3d 20 32 3b 0d 0a 20 20 20 20 20 .........textRect.x.+=.2;.......
e000 20 20 20 20 20 20 20 74 65 78 74 52 65 63 74 2e 68 65 69 67 68 74 20 2d 3d 20 32 3b 0d 0a 20 20 .......textRect.height.-=.2;....
e020 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 65 78 74 52 65 63 74 3b 0d 0a 20 20 20 20 ..........return.textRect;......
e040 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 63 20 ....}............private.static.
e060 52 65 63 74 20 47 65 74 54 65 78 74 52 65 63 74 28 52 65 63 74 20 72 6f 77 52 65 63 74 2c 20 54 Rect.GetTextRect(Rect.rowRect,.T
e080 72 65 65 56 69 65 77 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 reeViewItem.item)..........{....
e0a0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 6e 74 20 3d 20 28 69 74 65 6d 2e 64 65 70 ..........var.indent.=.(item.dep
e0c0 74 68 20 2b 20 31 29 20 2a 20 6b 43 6f 6c 6f 72 54 61 67 57 69 64 74 68 20 2b 20 6b 46 6f 6c 64 th.+.1).*.kColorTagWidth.+.kFold
e0e0 6f 75 74 57 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 52 outWidth;..............var.textR
e100 65 63 74 20 3d 20 72 6f 77 52 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 ect.=.rowRect;..............text
e120 52 65 63 74 2e 78 20 2b 3d 20 69 6e 64 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 Rect.x.+=.indent;..............r
e140 65 74 75 72 6e 20 74 65 78 74 52 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 eturn.textRect;..........}......
e160 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 55 ......#endregion............//.U
e180 6e 64 6f 20 69 73 20 61 20 70 72 6f 62 6c 65 6d 2e 20 57 68 65 6e 20 61 6e 20 75 6e 64 6f 20 6f ndo.is.a.problem..When.an.undo.o
e1a0 72 20 72 65 64 6f 20 69 73 20 70 65 72 66 6f 72 6d 65 64 2c 20 74 68 65 20 53 65 72 69 61 6c 69 r.redo.is.performed,.the.Seriali
e1c0 7a 65 64 4f 62 6a 65 63 74 20 6d 61 79 20 63 68 61 6e 67 65 20 62 65 68 69 6e 64 0d 0a 20 20 20 zedObject.may.change.behind.....
e1e0 20 20 20 20 20 2f 2f 20 6f 75 72 20 62 61 63 6b 73 20 77 68 69 63 68 20 6d 65 61 6e 73 20 74 68 .....//.our.backs.which.means.th
e200 61 74 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 73 68 6f 77 6e 20 69 6e 20 74 68 65 20 at.the.information.shown.in.the.
e220 74 72 65 65 20 6d 61 79 20 62 65 20 6f 75 74 64 61 74 65 64 20 6e 6f 77 2e 0d 0a 20 20 20 20 20 tree.may.be.outdated.now........
e240 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 64 6f 20 68 61 76 65 20 74 68 65 ...//..........//.We.do.have.the
e260 20 55 6e 64 6f 2e 75 6e 64 6f 52 65 64 6f 50 65 72 66 6f 72 6d 65 64 20 67 6c 6f 62 61 6c 20 63 .Undo.undoRedoPerformed.global.c
e280 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 63 61 75 73 65 20 50 72 6f 70 65 72 74 79 44 72 61 77 allback.but.because.PropertyDraw
e2a0 65 72 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 68 61 76 65 20 6e 6f 20 6f 62 73 65 72 76 61 62 ers..........//.have.no.observab
e2c0 6c 65 20 6c 69 66 65 20 63 79 63 6c 65 2c 20 77 65 20 63 61 6e 6e 6f 74 20 61 6c 77 61 79 73 20 le.life.cycle,.we.cannot.always.
e2e0 65 61 73 69 6c 79 20 68 6f 6f 6b 20 69 6e 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 6e easily.hook.into.the.callback.an
e300 64 20 66 6f 72 63 65 20 61 20 72 65 6c 6f 61 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 6f 66 20 d.force.a.reload..........//.of.
e320 74 68 65 20 74 72 65 65 2e 20 41 6c 73 6f 2c 20 77 68 69 6c 65 20 72 65 74 75 72 6e 69 6e 67 20 the.tree..Also,.while.returning.
e340 66 61 6c 73 65 20 66 72 6f 6d 20 50 72 6f 70 65 72 74 79 44 72 61 77 65 72 2e 43 61 6e 43 61 63 false.from.PropertyDrawer.CanCac
e360 68 65 49 6e 73 70 65 63 74 6f 72 47 55 49 28 29 20 6d 69 67 68 74 20 6f 6e 65 20 6d 61 6b 65 20 heInspectorGUI().might.one.make.
e380 73 75 73 70 65 63 74 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 61 20 50 72 6f 70 65 suspect.that..........//.a.Prope
e3a0 72 74 79 44 72 61 77 65 72 20 77 6f 75 6c 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 62 65 rtyDrawer.would.automatically.be
e3c0 20 74 68 72 6f 77 6e 20 61 77 61 79 20 61 6e 64 20 72 65 63 72 65 61 74 65 64 20 69 66 20 74 68 .thrown.away.and.recreated.if.th
e3e0 65 20 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 69 e.SerializedObject..........//.i
e400 73 20 6d 6f 64 69 66 69 65 64 20 62 79 20 75 6e 64 6f 2c 20 74 68 61 74 20 64 6f 65 73 20 6e 6f s.modified.by.undo,.that.does.no
e420 74 20 68 61 70 70 65 6e 20 69 6e 20 70 72 61 63 74 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f t.happen.in.practice.........../
e440 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 63 6f 75 6c 64 20 6a 75 73 74 20 52 65 6c 6f /..........//.We.could.just.Relo
e460 61 64 28 29 20 74 68 65 20 74 72 65 65 20 61 6c 6c 20 74 68 65 20 74 69 6d 65 20 62 75 74 20 54 ad().the.tree.all.the.time.but.T
e480 72 65 65 56 69 65 77 2e 52 65 6c 6f 61 64 28 29 20 69 74 73 65 6c 66 20 66 6f 72 63 65 73 20 61 reeView.Reload().itself.forces.a
e4a0 20 72 65 70 61 69 6e 74 20 61 6e 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 68 69 73 20 77 69 .repaint.and..........//.this.wi
e4c0 6c 6c 20 74 68 75 73 20 65 61 73 69 6c 79 20 6c 65 61 64 20 74 6f 20 69 6e 66 69 6e 69 74 65 20 ll.thus.easily.lead.to.infinite.
e4e0 72 65 70 61 69 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f repaints...........//........../
e500 2f 20 53 6f 2c 20 77 68 61 74 20 77 65 20 64 6f 20 69 73 20 6d 61 6b 65 20 75 73 65 20 6f 66 20 /.So,.what.we.do.is.make.use.of.
e520 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 64 69 72 74 79 20 63 6f 75 6e 74 20 77 65 20 63 61 6e 20 the.built-in.dirty.count.we.can.
e540 67 65 74 20 66 6f 72 20 55 6e 69 74 79 20 6f 62 6a 65 63 74 73 2e 20 49 66 20 74 68 65 20 63 6f get.for.Unity.objects..If.the.co
e560 75 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 63 68 61 6e 67 65 73 20 61 6e 64 20 69 74 20 77 unt..........//.changes.and.it.w
e580 61 73 6e 27 74 20 63 61 75 73 65 64 20 62 79 20 75 73 2c 20 77 65 20 72 65 6c 6f 61 64 20 74 68 asn't.caused.by.us,.we.reload.th
e5a0 65 20 74 72 65 65 2e 20 4d 65 61 6e 73 20 77 65 20 73 74 69 6c 6c 20 72 65 6c 6f 61 64 20 75 6e e.tree..Means.we.still.reload.un
e5c0 6e 65 63 65 73 73 61 72 69 6c 79 20 69 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 73 6f 6d 65 20 necessarily.if..........//.some.
e5e0 6f 74 68 65 72 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 61 20 63 6f 6d 70 6f 6e 65 6e 74 20 63 68 other.property.on.a.component.ch
e600 61 6e 67 65 73 20 62 75 74 20 61 74 20 6c 65 61 73 74 20 77 65 20 64 6f 6e 27 74 20 72 65 6c 6f anges.but.at.least.we.don't.relo
e620 61 64 20 61 6c 6c 20 74 68 65 20 74 69 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 ad.all.the.time...........//....
e640 20 20 20 20 20 20 2f 2f 20 41 20 70 6f 73 69 74 69 76 65 20 73 69 64 65 2d 65 66 66 65 63 74 20 ......//.A.positive.side-effect.
e660 69 73 20 74 68 61 74 20 77 65 20 77 69 6c 6c 20 63 61 74 63 68 20 2a 61 6e 79 2a 20 63 68 61 6e is.that.we.will.catch.*any*.chan
e680 67 65 20 74 6f 20 74 68 65 20 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 2c 20 6e 6f 74 20 ge.to.the.SerializedObject,.not.
e6a0 6a 75 73 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 75 6e 64 6f 2f 72 65 64 6f 20 61 6e 64 20 77 just..........//.undo/redo.and.w
e6c0 65 20 63 61 6e 20 64 6f 20 73 6f 20 77 69 74 68 6f 75 74 20 68 61 76 69 6e 67 20 74 6f 20 68 6f e.can.do.so.without.having.to.ho
e6e0 6f 6b 20 69 6e 74 6f 20 55 6e 64 6f 2e 75 6e 64 6f 52 65 64 6f 50 65 72 66 6f 72 6d 65 64 20 61 ok.into.Undo.undoRedoPerformed.a
e700 6e 79 77 68 65 72 65 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 nywhere.............private.void
e720 20 4f 6e 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 28 29 0d 0a 20 .OnSerializedObjectModified()...
e740 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 72 69 61 6c 69 7a 65 64 .......{..............serialized
e760 4f 62 6a 65 63 74 2e 41 70 70 6c 79 4d 6f 64 69 66 69 65 64 50 72 6f 70 65 72 74 69 65 73 28 29 Object.ApplyModifiedProperties()
e780 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 53 65 72 69 61 6c 69 7a 65 64 4f ;..............UpdateSerializedO
e7a0 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 bjectDirtyCount();..............
e7c0 52 65 6c 6f 61 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e 53 65 72 69 61 6c 69 Reload();..............onSeriali
e7e0 7a 65 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 3f 2e 49 6e 76 6f 6b 65 28 29 3b 0d 0a 20 20 zedObjectModified?.Invoke();....
e800 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 55 ......}............public.void.U
e820 70 64 61 74 65 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 28 pdateSerializedObjectDirtyCount(
e840 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 6d 5f 53 65 72 69 )..........{..............m_Seri
e860 61 6c 69 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 20 3d 20 45 64 69 74 6f 72 55 alizedObjectDirtyCount.=.EditorU
e880 74 69 6c 69 74 79 2e 47 65 74 44 69 72 74 79 43 6f 75 6e 74 28 73 65 72 69 61 6c 69 7a 65 64 4f tility.GetDirtyCount(serializedO
e8a0 62 6a 65 63 74 2e 74 61 72 67 65 74 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d bject.targetObject);..........}.
e8c0 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 52 65 6c 6f 61 64 49 66 ...........private.bool.ReloadIf
e8e0 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 48 61 73 42 65 65 6e 43 68 61 6e 67 65 64 28 29 SerializedObjectHasBeenChanged()
e900 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c 64 ..........{..............var.old
e920 43 6f 75 6e 74 20 3d 20 6d 5f 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 Count.=.m_SerializedObjectDirtyC
e940 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 53 65 72 69 61 6c 69 ount;..............UpdateSeriali
e960 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 zedObjectDirtyCount();..........
e980 20 20 20 20 69 66 20 28 6f 6c 64 43 6f 75 6e 74 20 21 3d 20 6d 5f 53 65 72 69 61 6c 69 7a 65 64 ....if.(oldCount.!=.m_Serialized
e9a0 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ObjectDirtyCount)..............{
e9c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6c 6f 61 64 28 29 3b 0d 0a 20 20 20 ..................Reload();.....
e9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e 53 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 4d .............onSerializedObjectM
ea00 6f 64 69 66 69 65 64 3f 2e 49 6e 76 6f 6b 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 odified?.Invoke();..............
ea20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ....return.true;..............}.
ea40 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 .............return.false;......
ea60 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 53 65 72 69 61 6c 69 7a ....}............public.Serializ
ea80 65 64 4f 62 6a 65 63 74 20 73 65 72 69 61 6c 69 7a 65 64 4f 62 6a 65 63 74 20 7b 20 67 65 74 3b edObject.serializedObject.{.get;
eaa0 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 62 69 6e 64 69 6e .}..........public.string.bindin
eac0 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 73 20 7b 20 67 65 74 3b 20 73 65 74 3b gGroupForNewBindings.{.get;.set;
eae0 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6e 65 77 20 54 72 65 65 56 69 65 77 49 .}..........public.new.TreeViewI
eb00 74 65 6d 20 72 6f 6f 74 49 74 65 6d 20 3d 3e 20 62 61 73 65 2e 72 6f 6f 74 49 74 65 6d 3b 0d 0a tem.rootItem.=>.base.rootItem;..
eb20 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 20 6f 6e 53 65 72 69 61 6c ..........public.Action.onSerial
eb40 69 7a 65 64 4f 62 6a 65 63 74 4d 6f 64 69 66 69 65 64 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d izedObjectModified.{.get;.set;.}
eb60 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 20 6f 6e 53 65 6c 65 63 74 ..........public.Action.onSelect
eb80 69 6f 6e 43 68 61 6e 67 65 64 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 ionChanged.{.get;.set;.}........
eba0 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 ..public.Action<ActionTreeItemBa
ebc0 73 65 3e 20 6f 6e 44 6f 75 62 6c 65 43 6c 69 63 6b 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d se>.onDoubleClick.{.get;.set;.}.
ebe0 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 3c 41 63 74 69 6f 6e 54 72 65 .........public.Action<ActionTre
ec00 65 49 74 65 6d 42 61 73 65 3e 20 6f 6e 42 65 67 69 6e 52 65 6e 61 6d 65 20 7b 20 67 65 74 3b 20 eItemBase>.onBeginRename.{.get;.
ec20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 46 75 6e 63 3c 54 72 65 65 set;.}..........public.Func<Tree
ec40 56 69 65 77 49 74 65 6d 3e 20 6f 6e 42 75 69 6c 64 54 72 65 65 20 7b 20 67 65 74 3b 20 73 65 74 ViewItem>.onBuildTree.{.get;.set
ec60 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 64 72 61 77 48 ;.}............public.bool.drawH
ec80 65 61 64 65 72 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 eader.{.get;.set;.}..........pub
eca0 6c 69 63 20 62 6f 6f 6c 20 64 72 61 77 50 6c 75 73 42 75 74 74 6f 6e 20 7b 20 67 65 74 3b 20 73 lic.bool.drawPlusButton.{.get;.s
ecc0 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 64 72 61 77 4d et;.}..........public.bool.drawM
ece0 69 6e 75 73 42 75 74 74 6f 6e 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 inusButton.{.get;.set;.}........
ed00 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 64 72 61 77 41 63 74 69 6f 6e 50 72 6f 70 65 72 74 69 ..public.bool.drawActionProperti
ed20 65 73 42 75 74 74 6f 6e 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 esButton.{.get;.set;.}..........
ed40 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 66 6f 6c 64 6f 75 74 4f 66 66 73 65 74 20 7b 20 67 65 74 public.float.foldoutOffset.{.get
ed60 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f ;.set;.}............public.Actio
ed80 6e 3c 53 65 72 69 61 6c 69 7a 65 64 50 72 6f 70 65 72 74 79 3e 20 6f 6e 48 61 6e 64 6c 65 41 64 n<SerializedProperty>.onHandleAd
eda0 64 4e 65 77 41 63 74 69 6f 6e 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 dNewAction.{.get;.set;.}........
edc0 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 74 69 74 6c 65 0d 0a 20 20 20 20 20 20 20 20 7b ..public.string.title..........{
ede0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 54 69 74 6c 65 3f 2e 74 65 ..............get.=>.m_Title?.te
ee00 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 3d 3e 20 6d 5f 54 69 74 6c 65 20 xt;..............set.=>.m_Title.
ee20 3d 20 6e 65 77 20 47 55 49 43 6f 6e 74 65 6e 74 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 =.new.GUIContent(value);........
ee40 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6e 65 77 20 66 6c 6f 61 74 20 ..}............public.new.float.
ee60 74 6f 74 61 6c 48 65 69 67 68 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 totalHeight..........{..........
ee80 20 20 20 20 67 65 74 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 ....get..............{..........
eea0 20 20 20 20 20 20 20 20 76 61 72 20 68 65 69 67 68 74 20 3d 20 62 61 73 65 2e 74 6f 74 61 6c 48 ........var.height.=.base.totalH
eec0 65 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 72 61 77 eight;..................if.(draw
eee0 48 65 61 64 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 65 69 Header)......................hei
ef00 67 68 74 20 2b 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 69 6e 67 6c 65 4c 69 ght.+=.EditorGUIUtility.singleLi
ef20 6e 65 48 65 69 67 68 74 20 2b 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 73 74 61 6e neHeight.+.EditorGUIUtility.stan
ef40 64 61 72 64 56 65 72 74 69 63 61 6c 53 70 61 63 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 dardVerticalSpacing;............
ef60 20 20 20 20 20 20 68 65 69 67 68 74 20 2b 3d 20 31 3b 20 2f 2f 20 42 6f 72 64 65 72 2e 0d 0a 20 ......height.+=.1;.//.Border....
ef80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 68 65 69 67 68 74 3b 0d 0a 20 ...............return.height;...
efa0 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 20 20 20 ...........}..........}.........
efc0 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 74 68 69 ...public.ActionTreeItemBase.thi
efe0 73 5b 73 74 72 69 6e 67 20 70 61 74 68 5d 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 s[string.path]..........{.......
f000 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .......get..............{.......
f020 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 74 65 6d 20 3d 20 46 69 6e 64 49 74 65 6d 42 79 ...........var.item.=.FindItemBy
f040 50 61 74 68 28 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 Path(path);..................if.
f060 28 69 74 65 6d 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 (item.==.null)..................
f080 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4b 65 79 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 ....throw.new.KeyNotFoundExcepti
f0a0 6f 6e 28 70 61 74 68 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 on(path);..................retur
f0c0 6e 20 69 74 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 n.item;..............}..........
f0e0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 47 55 49 43 6f 6e 74 65 6e 74 20 }............private.GUIContent.
f100 70 6c 75 73 49 63 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 plusIcon..........{.............
f120 20 67 65 74 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 .get..............{.............
f140 20 20 20 20 20 69 66 20 28 72 6f 6f 74 49 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 4d 61 70 54 72 .....if.(rootItem.is.ActionMapTr
f160 65 65 49 74 65 6d 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 eeItem)......................ret
f180 75 72 6e 20 73 5f 50 6c 75 73 41 63 74 69 6f 6e 49 63 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 urn.s_PlusActionIcon;...........
f1a0 20 20 20 20 20 20 20 69 66 20 28 72 6f 6f 74 49 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 .......if.(rootItem.is.ActionTre
f1c0 65 49 74 65 6d 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 eItem)......................retu
f1e0 72 6e 20 73 5f 50 6c 75 73 42 69 6e 64 69 6e 67 49 63 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 rn.s_PlusBindingIcon;...........
f200 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 5f 50 6c 75 73 41 63 74 69 6f 6e 4d 61 70 49 63 6f .......return.s_PlusActionMapIco
f220 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 20 7d 0d 0a 0d 0a n;..............}..........}....
f240 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 47 55 49 43 6f 6e 74 65 6e 74 20 6d 69 6e 75 73 ........private.GUIContent.minus
f260 49 63 6f 6e 20 3d 3e 20 73 5f 44 65 6c 65 74 65 53 65 63 74 69 6f 6e 49 63 6f 6e 3b 0d 0a 0d 0a Icon.=>.s_DeleteSectionIcon;....
f280 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 5b ........private.FilterCriterion[
f2a0 5d 20 6d 5f 49 74 65 6d 46 69 6c 74 65 72 43 72 69 74 65 72 69 61 3b 0d 0a 20 20 20 20 20 20 20 ].m_ItemFilterCriteria;.........
f2c0 20 70 72 69 76 61 74 65 20 47 55 49 43 6f 6e 74 65 6e 74 20 6d 5f 54 69 74 6c 65 3b 0d 0a 20 20 .private.GUIContent.m_Title;....
f2e0 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 49 6e 69 74 69 61 74 65 43 6f 6e ......private.bool.m_InitiateCon
f300 74 65 78 74 4d 65 6e 75 4f 6e 4e 65 78 74 52 65 70 61 69 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 textMenuOnNextRepaint;..........
f320 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 46 6f 72 63 65 41 63 63 65 70 74 52 65 6e 61 6d 65 private.bool.m_ForceAcceptRename
f340 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6d 5f 53 65 72 69 61 6c 69 ;..........private.int.m_Seriali
f360 7a 65 64 4f 62 6a 65 63 74 44 69 72 74 79 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 zedObjectDirtyCount;............
f380 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 private.static.readonly.GUIConte
f3a0 6e 74 20 73 5f 41 64 64 42 69 6e 64 69 6e 67 4c 61 62 65 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 nt.s_AddBindingLabel.=.EditorGUI
f3c0 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 22 41 64 64 20 42 69 6e 64 69 Utility.TrTextContent("Add.Bindi
f3e0 6e 67 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 ng");..........private.static.re
f400 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 41 64 64 41 63 74 69 6f 6e 4c 61 62 adonly.GUIContent.s_AddActionLab
f420 65 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 el.=.EditorGUIUtility.TrTextCont
f440 65 6e 74 28 22 41 64 64 20 41 63 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 ent("Add.Action");..........priv
f460 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 ate.static.readonly.GUIContent.s
f480 5f 50 6c 75 73 42 69 6e 64 69 6e 67 49 63 6f 6e 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c _PlusBindingIcon.=.EditorGUIUtil
f4a0 69 74 79 2e 54 72 49 63 6f 6e 43 6f 6e 74 65 6e 74 28 22 54 6f 6f 6c 62 61 72 20 50 6c 75 73 20 ity.TrIconContent("Toolbar.Plus.
f4c0 4d 6f 72 65 22 2c 20 22 41 64 64 20 42 69 6e 64 69 6e 67 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 More",."Add.Binding");..........
f4e0 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 private.static.readonly.GUIConte
f500 6e 74 20 73 5f 50 6c 75 73 41 63 74 69 6f 6e 49 63 6f 6e 20 3d 20 45 64 69 74 6f 72 47 55 49 55 nt.s_PlusActionIcon.=.EditorGUIU
f520 74 69 6c 69 74 79 2e 54 72 49 63 6f 6e 43 6f 6e 74 65 6e 74 28 22 54 6f 6f 6c 62 61 72 20 50 6c tility.TrIconContent("Toolbar.Pl
f540 75 73 22 2c 20 22 41 64 64 20 41 63 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 us",."Add.Action");..........pri
f560 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 vate.static.readonly.GUIContent.
f580 73 5f 50 6c 75 73 41 63 74 69 6f 6e 4d 61 70 49 63 6f 6e 20 3d 20 45 64 69 74 6f 72 47 55 49 55 s_PlusActionMapIcon.=.EditorGUIU
f5a0 74 69 6c 69 74 79 2e 54 72 49 63 6f 6e 43 6f 6e 74 65 6e 74 28 22 54 6f 6f 6c 62 61 72 20 50 6c tility.TrIconContent("Toolbar.Pl
f5c0 75 73 22 2c 20 22 41 64 64 20 41 63 74 69 6f 6e 20 4d 61 70 22 29 3b 0d 0a 20 20 20 20 20 20 20 us",."Add.Action.Map");.........
f5e0 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 .private.static.readonly.GUICont
f600 65 6e 74 20 73 5f 44 65 6c 65 74 65 53 65 63 74 69 6f 6e 49 63 6f 6e 20 3d 20 45 64 69 74 6f 72 ent.s_DeleteSectionIcon.=.Editor
f620 47 55 49 55 74 69 6c 69 74 79 2e 54 72 49 63 6f 6e 43 6f 6e 74 65 6e 74 28 22 54 6f 6f 6c 62 61 GUIUtility.TrIconContent("Toolba
f640 72 20 4d 69 6e 75 73 22 2c 20 22 44 65 6c 65 74 65 20 53 65 6c 65 63 74 69 6f 6e 22 29 3b 0d 0a r.Minus",."Delete.Selection");..
f660 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 ........private.static.readonly.
f680 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 41 63 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 49 63 6f GUIContent.s_ActionPropertiesIco
f6a0 6e 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 49 63 6f 6e 43 6f 6e 74 65 n.=.EditorGUIUtility.TrIconConte
f6c0 6e 74 28 22 53 65 74 74 69 6e 67 73 22 2c 20 22 41 63 74 69 6f 6e 20 50 72 6f 70 65 72 74 69 65 nt("Settings",."Action.Propertie
f6e0 73 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 s");............private.static.r
f700 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 43 75 74 4c 61 62 65 6c 20 3d 20 eadonly.GUIContent.s_CutLabel.=.
f720 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 22 EditorGUIUtility.TrTextContent("
f740 43 75 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 Cut");..........private.static.r
f760 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 43 6f 70 79 4c 61 62 65 6c 20 3d eadonly.GUIContent.s_CopyLabel.=
f780 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 .EditorGUIUtility.TrTextContent(
f7a0 22 43 6f 70 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 "Copy");..........private.static
f7c0 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 50 61 73 74 65 4c 61 62 65 .readonly.GUIContent.s_PasteLabe
f7e0 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 l.=.EditorGUIUtility.TrTextConte
f800 6e 74 28 22 50 61 73 74 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 nt("Paste");..........private.st
f820 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 44 65 6c 65 74 atic.readonly.GUIContent.s_Delet
f840 65 4c 61 62 65 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 eLabel.=.EditorGUIUtility.TrText
f860 43 6f 6e 74 65 6e 74 28 22 44 65 6c 65 74 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 Content("Delete");..........priv
f880 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 ate.static.readonly.GUIContent.s
f8a0 5f 44 75 70 6c 69 63 61 74 65 4c 61 62 65 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 _DuplicateLabel.=.EditorGUIUtili
f8c0 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 22 44 75 70 6c 69 63 61 74 65 22 29 3b 0d 0a ty.TrTextContent("Duplicate");..
f8e0 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 ........private.static.readonly.
f900 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 52 65 6e 61 6d 65 4c 61 62 65 6c 20 3d 20 45 64 69 74 6f GUIContent.s_RenameLabel.=.Edito
f920 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 22 52 65 6e 61 6d rGUIUtility.TrTextContent("Renam
f940 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 72 65 61 e");..........private.static.rea
f960 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f 45 78 70 61 6e 64 41 6c 6c 4c 61 62 65 donly.GUIContent.s_ExpandAllLabe
f980 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 l.=.EditorGUIUtility.TrTextConte
f9a0 6e 74 28 22 45 78 70 61 6e 64 20 41 6c 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 nt("Expand.All");..........priva
f9c0 74 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 43 6f 6e 74 65 6e 74 20 73 5f te.static.readonly.GUIContent.s_
f9e0 43 6f 6c 6c 61 70 73 65 41 6c 6c 4c 61 62 65 6c 20 3d 20 45 64 69 74 6f 72 47 55 49 55 74 69 6c CollapseAllLabel.=.EditorGUIUtil
fa00 69 74 79 2e 54 72 54 65 78 74 43 6f 6e 74 65 6e 74 28 22 43 6f 6c 6c 61 70 73 65 20 41 6c 6c 22 ity.TrTextContent("Collapse.All"
fa20 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 );............public.static.stri
fa40 6e 67 20 53 68 61 72 65 64 52 65 73 6f 75 72 63 65 73 50 61 74 68 20 3d 20 22 50 61 63 6b 61 67 ng.SharedResourcesPath.=."Packag
fa60 65 73 2f 63 6f 6d 2e 75 6e 69 74 79 2e 69 6e 70 75 74 73 79 73 74 65 6d 2f 49 6e 70 75 74 53 79 es/com.unity.inputsystem/InputSy
fa80 73 74 65 6d 2f 45 64 69 74 6f 72 2f 41 73 73 65 74 45 64 69 74 6f 72 2f 52 65 73 6f 75 72 63 65 stem/Editor/AssetEditor/Resource
faa0 73 2f 22 3b 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 s/";..........public.static.stri
fac0 6e 67 20 52 65 73 6f 75 72 63 65 73 50 61 74 68 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ng.ResourcesPath..........{.....
fae0 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .........get..............{.....
fb00 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 45 64 69 74 6f 72 47 55 49 55 74 69 6c 69 74 .............if.(EditorGUIUtilit
fb20 79 2e 69 73 50 72 6f 53 6b 69 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 y.isProSkin)....................
fb40 20 20 72 65 74 75 72 6e 20 53 68 61 72 65 64 52 65 73 6f 75 72 63 65 73 50 61 74 68 20 2b 20 22 ..return.SharedResourcesPath.+."
fb60 70 72 6f 2f 22 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 53 pro/";..................return.S
fb80 68 61 72 65 64 52 65 73 6f 75 72 63 65 73 50 61 74 68 20 2b 20 22 70 65 72 73 6f 6e 61 6c 2f 22 haredResourcesPath.+."personal/"
fba0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ;..............}..........}.....
fbc0 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 46 69 6c 74 65 72 43 72 69 74 65 .......public.struct.FilterCrite
fbe0 72 69 6f 6e 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 70 75 62 rion..........{..............pub
fc00 6c 69 63 20 65 6e 75 6d 20 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 lic.enum.Type..............{....
fc20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 79 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 ..............ByName,...........
fc40 20 20 20 20 20 20 20 42 79 42 69 6e 64 69 6e 67 47 72 6f 75 70 2c 0d 0a 20 20 20 20 20 20 20 20 .......ByBindingGroup,..........
fc60 20 20 20 20 20 20 20 20 42 79 44 65 76 69 63 65 4c 61 79 6f 75 74 2c 0d 0a 20 20 20 20 20 20 20 ........ByDeviceLayout,.........
fc80 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 65 6e 75 .....}................public.enu
fca0 6d 20 4d 61 74 63 68 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 m.Match..............{..........
fcc0 20 20 20 20 20 20 20 20 53 75 63 63 65 73 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........Success,................
fce0 20 20 46 61 69 6c 75 72 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 6f 6e 65 ..Failure,..................None
fd00 2c 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 20 20 20 20 ,..............}................
fd20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 74 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 public.string.text;.............
fd40 20 70 75 62 6c 69 63 20 54 79 70 65 20 74 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 .public.Type.type;..............
fd60 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 6b 5f 42 69 6e 64 69 6e 67 ..public.static.string.k_Binding
fd80 47 72 6f 75 70 54 61 67 20 3d 20 22 67 3a 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 GroupTag.=."g:";..............pu
fda0 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 6b 5f 44 65 76 69 63 65 4c 61 79 6f 75 blic.static.string.k_DeviceLayou
fdc0 74 54 61 67 20 3d 20 22 64 3a 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c tTag.=."d:";................publ
fde0 69 63 20 4d 61 74 63 68 20 4d 61 74 63 68 65 73 28 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 ic.Match.Matches(ActionTreeItemB
fe00 61 73 65 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ase.item)..............{........
fe20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 69 74 65 6d 20 21 3d 20 6e ..........Debug.Assert(item.!=.n
fe40 75 6c 6c 2c 20 22 49 74 65 6d 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 22 29 3b 0d 0a 0d 0a ull,."Item.cannot.be.null");....
fe60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 74 79 70 65 29 0d 0a 20 ................switch.(type)...
fe80 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 20 ...............{................
fea0 20 20 20 20 20 20 63 61 73 65 20 54 79 70 65 2e 42 79 4e 61 6d 65 3a 0d 0a 20 20 20 20 20 20 20 ......case.Type.ByName:.........
fec0 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 20 20 20 .............{..................
fee0 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 43 6f 6d 70 6f 73 69 74 65 20 69 74 65 6d 73 ........//.NOTE:.Composite.items
ff00 20 68 61 76 65 20 6e 61 6d 65 73 20 28 61 6e 64 20 70 61 72 74 20 62 69 6e 64 69 6e 67 73 20 69 .have.names.(and.part.bindings.i
ff20 6e 20 61 20 77 61 79 2c 20 74 6f 6f 29 20 62 75 74 20 77 65 20 64 6f 6e 27 74 20 66 69 6c 74 65 n.a.way,.too).but.we.don't.filte
ff40 72 20 6f 6e 20 74 68 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r.on.them.......................
ff60 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 4d 61 70 54 72 65 65 49 74 65 ....if.(item.is.ActionMapTreeIte
ff80 6d 20 7c 7c 20 69 74 65 6d 20 69 73 20 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 29 0d 0a 20 20 m.||.item.is.ActionTreeItem)....
ffa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
ffc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 74 63 68 65 73 .....................var.matches
ffe0 53 65 6c 66 20 3d 20 69 74 65 6d 2e 64 69 73 70 6c 61 79 4e 61 6d 65 2e 43 6f 6e 74 61 69 6e 73 Self.=.item.displayName.Contains
10000 28 74 65 78 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e (text,.StringComparison.Invarian
10020 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 tCultureIgnoreCase);............
10040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 61 6d 65 20 66 69 6c 74 ....................//.Name.filt
10060 65 72 73 20 62 65 68 61 76 65 20 72 65 63 75 72 73 69 76 65 6c 79 2e 20 49 2e 65 2e 20 69 66 20 ers.behave.recursively..I.e..if.
10080 61 6e 79 20 69 74 65 6d 20 69 6e 20 74 68 65 20 73 75 62 74 72 65 65 20 69 73 20 6d 61 74 63 68 any.item.in.the.subtree.is.match
100a0 65 64 20 62 79 20 74 68 65 20 6e 61 6d 65 20 66 69 6c 74 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 ed.by.the.name.filter,..........
100c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 69 74 65 6d 20 ....................//.the.item.
100e0 69 73 20 69 6e 63 6c 75 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 is.included.....................
10100 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 61 74 63 68 65 73 53 65 6c 66 20 26 26 20 43 68 ..........if.(!matchesSelf.&&.Ch
10120 65 63 6b 43 68 69 6c 64 72 65 6e 46 6f 72 28 4d 61 74 63 68 2e 53 75 63 63 65 73 73 2c 20 69 74 eckChildrenFor(Match.Success,.it
10140 65 6d 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 20 20 em))............................
10160 20 20 20 20 20 20 72 65 74 75 72 6e 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 3b 0d 0a 0d 0a 20 ......return.Match.Success;.....
10180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ...........................retur
101a0 6e 20 6d 61 74 63 68 65 73 53 65 6c 66 20 3f 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 20 3a 20 n.matchesSelf.?.Match.Success.:.
101c0 4d 61 74 63 68 2e 46 61 69 6c 75 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Match.Failure;..................
101e0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........}.......................
10200 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ...break;......................}
10220 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 79 70 ........................case.Typ
10240 65 2e 42 79 42 69 6e 64 69 6e 67 47 72 6f 75 70 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 e.ByBindingGroup:...............
10260 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 20 20 .......{........................
10280 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 20 62 69 ..if.(item.is.BindingTreeItem.bi
102a0 6e 64 69 6e 67 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ndingItem)......................
102c0 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 20 20 20 20 20 ....{...........................
102e0 20 20 20 2f 2f 20 46 6f 72 20 63 6f 6d 70 6f 73 69 74 65 73 2c 20 73 75 63 63 65 65 64 20 74 68 ...//.For.composites,.succeed.th
10300 65 20 6d 61 74 63 68 20 69 66 20 61 6e 79 20 63 68 69 6c 64 72 65 6e 20 6d 61 74 63 68 2e 0d 0a e.match.if.any.children.match...
10320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 ............................if.(
10340 69 74 65 6d 20 69 73 20 43 6f 6d 70 6f 73 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d item.is.CompositeBindingTreeItem
10360 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 20 20 20 20 20 )...............................
10380 20 20 20 72 65 74 75 72 6e 20 43 68 65 63 6b 43 68 69 6c 64 72 65 6e 46 6f 72 28 4d 61 74 63 68 ...return.CheckChildrenFor(Match
103a0 2e 53 75 63 63 65 73 73 2c 20 69 74 65 6d 29 20 3f 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 20 .Success,.item).?.Match.Success.
103c0 3a 20 4d 61 74 63 68 2e 46 61 69 6c 75 72 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 :.Match.Failure;................
103e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 74 65 6d 73 20 74 68 61 74 20 61 72 ................//.Items.that.ar
10400 65 20 69 6e 20 6e 6f 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 20 6d 61 74 63 68 20 61 6e 79 20 e.in.no.binding.group.match.any.
10420 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 binding.group...................
10440 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
10460 6d 70 74 79 28 62 69 6e 64 69 6e 67 49 74 65 6d 2e 67 72 6f 75 70 73 29 29 0d 0a 20 20 20 20 20 mpty(bindingItem.groups)).......
10480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ...........................retur
104a0 6e 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 n.Match.Success;................
104c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 67 72 6f 75 70 73 20 3d 20 62 69 6e ................var.groups.=.bin
104e0 64 69 6e 67 49 74 65 6d 2e 67 72 6f 75 70 73 2e 53 70 6c 69 74 28 49 6e 70 75 74 42 69 6e 64 69 dingItem.groups.Split(InputBindi
10500 6e 67 2e 53 65 70 61 72 61 74 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng.Separator);..................
10520 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 20 3d 20 74 ............var.bindingGroup.=.t
10540 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ext;............................
10560 20 20 72 65 74 75 72 6e 20 67 72 6f 75 70 73 2e 41 6e 79 28 78 20 3d 3e 20 78 2e 45 71 75 61 6c ..return.groups.Any(x.=>.x.Equal
10580 73 28 62 69 6e 64 69 6e 67 47 72 6f 75 70 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e s(bindingGroup,.StringComparison
105a0 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 .InvariantCultureIgnoreCase))...
105c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3f ...............................?
105e0 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Match.Success..................
10600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 4d 61 74 63 68 2e 46 61 69 6c 75 72 65 3b ................:.Match.Failure;
10620 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 7d 0d 0a 20 20 20 ..........................}.....
10640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 .....................break;.....
10660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 .................}..............
10680 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 79 70 65 2e 42 79 44 65 76 69 63 65 4c 61 79 6f ..........case.Type.ByDeviceLayo
106a0 75 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ut:......................{......
106c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 ....................if.(item.is.
106e0 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 20 62 69 6e 64 69 6e 67 49 74 65 6d 29 0d 0a 20 20 BindingTreeItem.bindingItem)....
10700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
10720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 6f 72 20 63 6f 6d 70 .....................//.For.comp
10740 6f 73 69 74 65 73 2c 20 73 75 63 63 65 65 64 20 74 68 65 20 6d 61 74 63 68 20 69 66 20 61 6e 79 osites,.succeed.the.match.if.any
10760 20 63 68 69 6c 64 72 65 6e 20 6d 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .children.match.................
10780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 43 6f 6d 70 6f 73 ..............if.(item.is.Compos
107a0 69 74 65 42 69 6e 64 69 6e 67 54 72 65 65 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 iteBindingTreeItem).............
107c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 43 68 65 63 .....................return.Chec
107e0 6b 43 68 69 6c 64 72 65 6e 46 6f 72 28 4d 61 74 63 68 2e 53 75 63 63 65 73 73 2c 20 69 74 65 6d kChildrenFor(Match.Success,.item
10800 29 20 3f 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 20 3a 20 4d 61 74 63 68 2e 46 61 69 6c 75 72 ).?.Match.Success.:.Match.Failur
10820 65 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 20 20 20 20 20 20 e;..............................
10840 20 20 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 74 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f ..var.deviceLayout.=.InputContro
10860 6c 50 61 74 68 2e 54 72 79 47 65 74 44 65 76 69 63 65 4c 61 79 6f 75 74 28 62 69 6e 64 69 6e 67 lPath.TryGetDeviceLayout(binding
10880 49 74 65 6d 2e 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Item.path);.....................
108a0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 71 75 61 6c 73 28 64 65 .........return.string.Equals(de
108c0 76 69 63 65 4c 61 79 6f 75 74 2c 20 74 65 78 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 viceLayout,.text,.StringComparis
108e0 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 0d 0a on.InvariantCultureIgnoreCase)..
10900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
10920 7c 7c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e ||.InputControlLayout.s_Layouts.
10940 49 73 42 61 73 65 64 4f 6e 28 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 64 65 76 IsBasedOn(new.InternedString(dev
10960 69 63 65 4c 61 79 6f 75 74 29 2c 20 6e 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 74 iceLayout),.new.InternedString(t
10980 65 78 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 20 ext))...........................
109a0 20 20 20 20 20 20 20 3f 20 4d 61 74 63 68 2e 53 75 63 63 65 73 73 0d 0a 20 20 20 20 20 20 20 20 .......?.Match.Success..........
109c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 4d 61 74 63 68 2e ........................:.Match.
109e0 46 61 69 6c 75 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Failure;........................
10a00 20 20 7d 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 62 72 65 ..}..........................bre
10a20 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ak;......................}......
10a40 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 ............}...................
10a60 20 72 65 74 75 72 6e 20 4d 61 74 63 68 2e 4e 6f 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .return.Match.None;.............
10a80 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 43 .}................private.bool.C
10aa0 68 65 63 6b 43 68 69 6c 64 72 65 6e 46 6f 72 28 4d 61 74 63 68 20 6d 61 74 63 68 2c 20 41 63 74 heckChildrenFor(Match.match,.Act
10ac0 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 20 69 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 ionTreeItemBase.item)...........
10ae0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 74 65 6d 2e ...{..................if.(!item.
10b00 68 61 73 43 68 69 6c 64 72 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hasChildren)....................
10b20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..return.false;.................
10b40 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 69 74 65 6d 2e 63 68 ...foreach.(var.child.in.item.ch
10b60 69 6c 64 72 65 6e 2e 4f 66 54 79 70 65 3c 41 63 74 69 6f 6e 54 72 65 65 49 74 65 6d 42 61 73 65 ildren.OfType<ActionTreeItemBase
10b80 3e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 4d 61 >())......................if.(Ma
10ba0 74 63 68 65 73 28 63 68 69 6c 64 29 20 3d 3d 20 6d 61 74 63 68 29 0d 0a 20 20 20 20 20 20 20 20 tches(child).==.match)..........
10bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a ................return.true;....
10be0 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 65 3b 0d 0a 20 ................return.false;...
10c00 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 70 75 62 6c ...........}................publ
10c20 69 63 20 73 74 61 74 69 63 20 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 20 42 79 4e 61 6d 65 ic.static.FilterCriterion.ByName
10c40 28 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 (string.name)..............{....
10c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 46 69 6c 74 65 72 43 ..............return.new.FilterC
10c80 72 69 74 65 72 69 6f 6e 20 7b 74 65 78 74 20 3d 20 6e 61 6d 65 2c 20 74 79 70 65 20 3d 20 54 79 riterion.{text.=.name,.type.=.Ty
10ca0 70 65 2e 42 79 4e 61 6d 65 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 pe.ByName};..............}......
10cc0 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 46 69 6c 74 65 72 43 72 ..........public.static.FilterCr
10ce0 69 74 65 72 69 6f 6e 20 42 79 42 69 6e 64 69 6e 67 47 72 6f 75 70 28 73 74 72 69 6e 67 20 67 72 iterion.ByBindingGroup(string.gr
10d00 6f 75 70 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 oup)..............{.............
10d20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 20 .....return.new.FilterCriterion.
10d40 7b 74 65 78 74 20 3d 20 67 72 6f 75 70 2c 20 74 79 70 65 20 3d 20 54 79 70 65 2e 42 79 42 69 6e {text.=.group,.type.=.Type.ByBin
10d60 64 69 6e 67 47 72 6f 75 70 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 dingGroup};..............}......
10d80 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 46 69 6c 74 65 72 43 72 ..........public.static.FilterCr
10da0 69 74 65 72 69 6f 6e 20 42 79 44 65 76 69 63 65 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6c 61 iterion.ByDeviceLayout(string.la
10dc0 79 6f 75 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 20 yout)..............{............
10de0 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e ......return.new.FilterCriterion
10e00 20 7b 74 65 78 74 20 3d 20 6c 61 79 6f 75 74 2c 20 74 79 70 65 20 3d 20 54 79 70 65 2e 42 79 44 .{text.=.layout,.type.=.Type.ByD
10e20 65 76 69 63 65 4c 61 79 6f 75 74 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a eviceLayout};..............}....
10e40 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 4c 69 73 74 3c 46 ............public.static.List<F
10e60 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 3e 20 46 72 6f 6d 53 74 72 69 6e 67 28 73 74 72 69 6e ilterCriterion>.FromString(strin
10e80 67 20 63 72 69 74 65 72 69 61 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 g.criteria)..............{......
10ea0 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
10ec0 6d 70 74 79 28 63 72 69 74 65 72 69 61 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 mpty(criteria)).................
10ee0 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 20 .....return.null;...............
10f00 20 20 20 20 20 76 61 72 20 6c 69 73 74 20 3d 20 6e 65 77 20 4c 69 73 74 3c 46 69 6c 74 65 72 43 .....var.list.=.new.List<FilterC
10f20 72 69 74 65 72 69 6f 6e 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f riterion>();..................fo
10f40 72 65 61 63 68 20 28 76 61 72 20 73 75 62 73 74 72 69 6e 67 20 69 6e 20 63 72 69 74 65 72 69 61 reach.(var.substring.in.criteria
10f60 2e 54 6f 6b 65 6e 69 7a 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d .Tokenize())..................{.
10f80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 75 62 73 74 72 69 .....................if.(substri
10fa0 6e 67 2e 53 74 61 72 74 73 57 69 74 68 28 6b 5f 44 65 76 69 63 65 4c 61 79 6f 75 74 54 61 67 29 ng.StartsWith(k_DeviceLayoutTag)
10fc0 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 6c 69 73 74 2e )..........................list.
10fe0 41 64 64 28 42 79 44 65 76 69 63 65 4c 61 79 6f 75 74 28 73 75 62 73 74 72 69 6e 67 2e 53 75 62 Add(ByDeviceLayout(substring.Sub
11000 73 74 72 28 32 29 2e 55 6e 65 73 63 61 70 65 28 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 str(2).Unescape()));............
11020 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 73 75 62 73 74 72 69 6e 67 2e 53 74 61 ..........else.if.(substring.Sta
11040 72 74 73 57 69 74 68 28 6b 5f 42 69 6e 64 69 6e 67 47 72 6f 75 70 54 61 67 29 29 0d 0a 20 20 20 rtsWith(k_BindingGroupTag)).....
11060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 73 74 2e 41 64 64 28 42 79 .....................list.Add(By
11080 42 69 6e 64 69 6e 67 47 72 6f 75 70 28 73 75 62 73 74 72 69 6e 67 2e 53 75 62 73 74 72 28 32 29 BindingGroup(substring.Substr(2)
110a0 2e 55 6e 65 73 63 61 70 65 28 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Unescape()));..................
110c0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....else........................
110e0 20 20 6c 69 73 74 2e 41 64 64 28 42 79 4e 61 6d 65 28 73 75 62 73 74 72 69 6e 67 2e 54 6f 53 74 ..list.Add(ByName(substring.ToSt
11100 72 69 6e 67 28 29 2e 55 6e 65 73 63 61 70 65 28 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ring().Unescape()));............
11120 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 72 65 74 75 72 ......}....................retur
11140 6e 20 6c 69 73 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 n.list;..............}..........
11160 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 54 6f 53 74 72 ......public.static.string.ToStr
11180 69 6e 67 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 69 6c 74 65 72 43 72 69 74 65 72 69 6f 6e 3e ing(IEnumerable<FilterCriterion>
111a0 20 63 72 69 74 65 72 69 61 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .criteria)..............{.......
111c0 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 65 77 20 53 74 72 ...........var.builder.=.new.Str
111e0 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 ingBuilder();..................f
11200 6f 72 65 61 63 68 20 28 76 61 72 20 63 72 69 74 65 72 69 6f 6e 20 69 6e 20 63 72 69 74 65 72 69 oreach.(var.criterion.in.criteri
11220 61 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 a)..................{...........
11240 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 75 69 6c 64 65 72 2e 4c 65 6e 67 74 68 20 3e 20 ...........if.(builder.Length.>.
11260 30 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 62 75 69 6c 0)..........................buil
11280 64 65 72 2e 41 70 70 65 6e 64 28 27 20 27 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 der.Append('.');................
112a0 20 20 20 20 20 20 20 20 69 66 20 28 63 72 69 74 65 72 69 6f 6e 2e 74 79 70 65 20 3d 3d 20 54 79 ........if.(criterion.type.==.Ty
112c0 70 65 2e 42 79 42 69 6e 64 69 6e 67 47 72 6f 75 70 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 pe.ByBindingGroup)..............
112e0 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 6b 5f 42 69 6e ............builder.Append(k_Bin
11300 64 69 6e 67 47 72 6f 75 70 54 61 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dingGroupTag);..................
11320 20 20 20 20 65 6c 73 65 20 69 66 20 28 63 72 69 74 65 72 69 6f 6e 2e 74 79 70 65 20 3d 3d 20 54 ....else.if.(criterion.type.==.T
11340 79 70 65 2e 42 79 44 65 76 69 63 65 4c 61 79 6f 75 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ype.ByDeviceLayout).............
11360 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 6b 5f 44 65 .............builder.Append(k_De
11380 76 69 63 65 4c 61 79 6f 75 74 54 61 67 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 viceLayoutTag);.................
113a0 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 72 69 74 65 72 69 6f 6e 2e .......builder.Append(criterion.
113c0 74 65 78 74 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 text);..................}.......
113e0 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 6f 53 74 72 69 ...........return.builder.ToStri
11400 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d ng();..............}..........}.
11420 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 53 ...........public.static.class.S
11440 74 79 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 tyles..........{..............pu
11460 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 74 65 blic.static.readonly.GUIStyle.te
11480 78 74 20 3d 20 6e 65 77 20 47 55 49 53 74 79 6c 65 28 22 4c 61 62 65 6c 22 29 2e 57 69 74 68 41 xt.=.new.GUIStyle("Label").WithA
114a0 6c 69 67 6e 6d 65 6e 74 28 54 65 78 74 41 6e 63 68 6f 72 2e 4d 69 64 64 6c 65 4c 65 66 74 29 3b lignment(TextAnchor.MiddleLeft);
114c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 ..............public.static.read
114e0 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 73 65 6c 65 63 74 65 64 54 65 78 74 20 3d 20 6e 65 77 only.GUIStyle.selectedText.=.new
11500 20 47 55 49 53 74 79 6c 65 28 22 4c 61 62 65 6c 22 29 2e 57 69 74 68 41 6c 69 67 6e 6d 65 6e 74 .GUIStyle("Label").WithAlignment
11520 28 54 65 78 74 41 6e 63 68 6f 72 2e 4d 69 64 64 6c 65 4c 65 66 74 29 2e 57 69 74 68 4e 6f 72 6d (TextAnchor.MiddleLeft).WithNorm
11540 61 6c 54 65 78 74 43 6f 6c 6f 72 28 43 6f 6c 6f 72 2e 77 68 69 74 65 29 3b 0d 0a 20 20 20 20 20 alTextColor(Color.white);.......
11560 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 .......public.static.readonly.GU
11580 49 53 74 79 6c 65 20 62 61 63 6b 67 72 6f 75 6e 64 57 69 74 68 6f 75 74 42 6f 72 64 65 72 20 3d IStyle.backgroundWithoutBorder.=
115a0 20 6e 65 77 20 47 55 49 53 74 79 6c 65 28 22 4c 61 62 65 6c 22 29 0d 0a 20 20 20 20 20 20 20 20 .new.GUIStyle("Label")..........
115c0 20 20 20 20 20 20 20 20 2e 57 69 74 68 4e 6f 72 6d 61 6c 42 61 63 6b 67 72 6f 75 6e 64 28 41 73 .........WithNormalBackground(As
115e0 73 65 74 44 61 74 61 62 61 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 50 61 74 68 3c 54 65 78 74 setDatabase.LoadAssetAtPath<Text
11600 75 72 65 32 44 3e 28 52 65 73 6f 75 72 63 65 73 50 61 74 68 20 2b 20 22 61 63 74 69 6f 6e 54 72 ure2D>(ResourcesPath.+."actionTr
11620 65 65 42 61 63 6b 67 72 6f 75 6e 64 57 69 74 68 6f 75 74 42 6f 72 64 65 72 2e 70 6e 67 22 29 29 eeBackgroundWithoutBorder.png"))
11640 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 ;..............public.static.rea
11660 64 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 62 6f 72 64 65 72 20 3d 20 6e 65 77 20 47 55 49 53 donly.GUIStyle.border.=.new.GUIS
11680 74 79 6c 65 28 22 4c 61 62 65 6c 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e tyle("Label")...................
116a0 57 69 74 68 4e 6f 72 6d 61 6c 42 61 63 6b 67 72 6f 75 6e 64 28 41 73 73 65 74 44 61 74 61 62 61 WithNormalBackground(AssetDataba
116c0 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 50 61 74 68 3c 54 65 78 74 75 72 65 32 44 3e 28 52 65 se.LoadAssetAtPath<Texture2D>(Re
116e0 73 6f 75 72 63 65 73 50 61 74 68 20 2b 20 22 61 63 74 69 6f 6e 54 72 65 65 42 61 63 6b 67 72 6f sourcesPath.+."actionTreeBackgro
11700 75 6e 64 2e 70 6e 67 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 und.png"))...................Wit
11720 68 42 6f 72 64 65 72 28 6e 65 77 20 52 65 63 74 4f 66 66 73 65 74 28 30 2c 20 30 2c 20 30 2c 20 hBorder(new.RectOffset(0,.0,.0,.
11740 31 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 1));..............public.static.
11760 72 65 61 64 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 62 61 63 6b 67 72 6f 75 6e 64 57 69 74 68 readonly.GUIStyle.backgroundWith
11780 42 6f 72 64 65 72 20 3d 20 6e 65 77 20 47 55 49 53 74 79 6c 65 28 22 4c 61 62 65 6c 22 29 0d 0a Border.=.new.GUIStyle("Label")..
117a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 4e 6f 72 6d 61 6c 42 61 63 6b 67 .................WithNormalBackg
117c0 72 6f 75 6e 64 28 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 50 round(AssetDatabase.LoadAssetAtP
117e0 61 74 68 3c 54 65 78 74 75 72 65 32 44 3e 28 52 65 73 6f 75 72 63 65 73 50 61 74 68 20 2b 20 22 ath<Texture2D>(ResourcesPath.+."
11800 61 63 74 69 6f 6e 54 72 65 65 42 61 63 6b 67 72 6f 75 6e 64 2e 70 6e 67 22 29 29 0d 0a 20 20 20 actionTreeBackground.png")).....
11820 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 42 6f 72 64 65 72 28 6e 65 77 20 52 65 63 ..............WithBorder(new.Rec
11840 74 4f 66 66 73 65 74 28 33 2c 20 33 2c 20 33 2c 20 33 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 tOffset(3,.3,.3,.3))............
11860 20 20 20 20 20 20 2e 57 69 74 68 4d 61 72 67 69 6e 28 6e 65 77 20 52 65 63 74 4f 66 66 73 65 74 .......WithMargin(new.RectOffset
11880 28 34 2c 20 34 2c 20 34 2c 20 34 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c (4,.4,.4,.4));..............publ
118a0 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 47 55 49 53 74 79 6c 65 20 63 6f 6c 75 ic.static.readonly.GUIStyle.colu
118c0 6d 6e 48 65 61 64 65 72 4c 61 62 65 6c 20 3d 20 6e 65 77 20 47 55 49 53 74 79 6c 65 28 45 64 69 mnHeaderLabel.=.new.GUIStyle(Edi
118e0 74 6f 72 53 74 79 6c 65 73 2e 74 6f 6f 6c 62 61 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 torStyles.toolbar)..............
11900 20 20 20 20 2e 57 69 74 68 41 6c 69 67 6e 6d 65 6e 74 28 54 65 78 74 41 6e 63 68 6f 72 2e 4d 69 .....WithAlignment(TextAnchor.Mi
11920 64 64 6c 65 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 ddleLeft)...................With
11940 46 6f 6e 74 53 74 79 6c 65 28 46 6f 6e 74 53 74 79 6c 65 2e 42 6f 6c 64 29 0d 0a 20 20 20 20 20 FontStyle(FontStyle.Bold).......
11960 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 50 61 64 64 69 6e 67 28 6e 65 77 20 52 65 63 74 ............WithPadding(new.Rect
11980 4f 66 66 73 65 74 28 31 30 2c 20 36 2c 20 30 2c 20 30 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d Offset(10,.6,.0,.0));..........}
119a0 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 23 65 6e 64 69 66 20 2f 2f 20 55 4e 49 54 59 5f 45 44 49 54 ......}..}..#endif.//.UNITY_EDIT
119c0 4f 52 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 00 00 00 49 6e 70 75 OR..........................Inpu
119e0 74 41 63 74 69 6f 6e 54 72 65 65 56 69 65 77 00 1e 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e tActionTreeView.....UnityEngine.
11a00 49 6e 70 75 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 00 00 InputSystem.Editor..