| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 81 00 00 4f dc 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ......O.............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 | 7c 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |?.............................. |
| 0fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 | .....................y.......... |
| 1040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1080 | 00 00 00 00 00 00 00 00 11 00 00 00 49 6e 70 75 74 53 74 61 74 65 42 75 66 66 65 72 73 00 00 00 | ............InputStateBuffers... |
| 10a0 | 07 3f 00 00 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e | .?..using.System;..using.UnityEn |
| 10c0 | 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a 75 73 69 | gine.InputSystem.Utilities;..usi |
| 10e0 | 6e 67 20 55 6e 69 74 79 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 | ng.Unity.Collections;..using.Uni |
| 1100 | 74 79 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 4c 6f 77 4c 65 76 65 6c 2e 55 6e 73 61 66 65 3b 0d | ty.Collections.LowLevel.Unsafe;. |
| 1120 | 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 43 61 6e 20 77 65 20 63 68 61 6e 67 65 20 74 68 69 | ...////REVIEW:.Can.we.change.thi |
| 1140 | 73 20 69 6e 74 6f 20 61 20 73 65 74 75 70 20 77 68 65 72 65 20 74 68 65 20 62 75 66 66 65 72 69 | s.into.a.setup.where.the.bufferi |
| 1160 | 6e 67 20 64 65 70 74 68 20 69 73 6e 27 74 20 66 69 78 65 64 20 74 6f 20 32 20 62 75 74 20 72 61 | ng.depth.isn't.fixed.to.2.but.ra |
| 1180 | 74 68 65 72 0d 0a 2f 2f 2f 2f 20 20 20 20 20 20 20 20 63 61 6e 20 62 65 20 73 65 74 20 6f 6e 20 | ther..////........can.be.set.on. |
| 11a0 | 61 20 70 65 72 20 64 65 76 69 63 65 20 62 61 73 69 73 3f 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 | a.per.device.basis?....namespace |
| 11c0 | 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 | .UnityEngine.InputSystem.LowLeve |
| 11e0 | 6c 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 20 54 68 65 20 72 61 77 20 6d 65 6d 6f 72 79 20 62 6c 6f 63 | l..{......//.The.raw.memory.bloc |
| 1200 | 6b 73 20 77 68 69 63 68 20 61 72 65 20 69 6e 64 65 78 65 64 20 62 79 20 49 6e 70 75 74 53 74 61 | ks.which.are.indexed.by.InputSta |
| 1220 | 74 65 42 6c 6f 63 6b 73 2e 0d 0a 20 20 20 20 2f 2f 0d 0a 20 20 20 20 2f 2f 20 49 6e 74 65 72 6e | teBlocks.......//......//.Intern |
| 1240 | 61 6c 6c 79 2c 20 77 65 20 70 65 72 66 6f 72 6d 20 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 63 | ally,.we.perform.only.a.single.c |
| 1260 | 6f 6d 62 69 6e 65 64 20 75 6e 6d 61 6e 61 67 65 64 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 66 6f 72 | ombined.unmanaged.allocation.for |
| 1280 | 20 61 6c 6c 20 73 74 61 74 65 0d 0a 20 20 20 20 2f 2f 20 62 75 66 66 65 72 73 20 6e 65 65 64 65 | .all.state......//.buffers.neede |
| 12a0 | 64 20 62 79 20 74 68 65 20 73 79 73 74 65 6d 2e 20 45 78 74 65 72 6e 61 6c 6c 79 2c 20 77 65 20 | d.by.the.system..Externally,.we. |
| 12c0 | 65 78 70 6f 73 65 20 74 68 65 6d 20 61 73 20 69 66 20 74 68 65 79 20 61 72 65 20 65 61 63 68 20 | expose.them.as.if.they.are.each. |
| 12e0 | 73 65 70 61 72 61 74 65 0d 0a 20 20 20 20 2f 2f 20 62 75 66 66 65 72 73 2e 0d 0a 20 20 20 20 69 | separate......//.buffers.......i |
| 1300 | 6e 74 65 72 6e 61 6c 20 75 6e 73 61 66 65 20 73 74 72 75 63 74 20 49 6e 70 75 74 53 74 61 74 65 | nternal.unsafe.struct.InputState |
| 1320 | 42 75 66 66 65 72 73 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 53 74 61 74 65 | Buffers......{..........//.State |
| 1340 | 20 62 75 66 66 65 72 73 20 61 72 65 20 73 65 74 20 75 70 20 69 6e 20 61 20 64 6f 75 62 6c 65 20 | .buffers.are.set.up.in.a.double. |
| 1360 | 62 75 66 66 65 72 69 6e 67 20 73 63 68 65 6d 65 20 77 68 65 72 65 20 74 68 65 20 22 62 61 63 6b | buffering.scheme.where.the."back |
| 1380 | 20 62 75 66 66 65 72 22 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 72 65 70 72 65 73 65 6e 74 73 20 | .buffer"..........//.represents. |
| 13a0 | 74 68 65 20 70 72 65 76 69 6f 75 73 20 73 74 61 74 65 20 6f 66 20 64 65 76 69 63 65 73 20 61 6e | the.previous.state.of.devices.an |
| 13c0 | 64 20 74 68 65 20 22 66 72 6f 6e 74 20 62 75 66 66 65 72 22 20 72 65 70 72 65 73 65 6e 74 73 0d | d.the."front.buffer".represents. |
| 13e0 | 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 65 2e 0d 0a | .........//.the.current.state... |
| 1400 | 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 45 64 69 74 20 6d 6f 64 65 | ........//..........//.Edit.mode |
| 1420 | 20 61 6e 64 20 70 6c 61 79 20 6d 6f 64 65 20 65 61 63 68 20 67 65 74 20 74 68 65 69 72 20 6f 77 | .and.play.mode.each.get.their.ow |
| 1440 | 6e 20 64 6f 75 62 6c 65 20 62 75 66 66 65 72 69 6e 67 2e 20 55 70 64 61 74 65 73 20 74 6f 20 74 | n.double.buffering..Updates.to.t |
| 1460 | 68 65 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 61 72 65 20 74 69 65 64 20 74 6f 20 66 6f 63 75 | hem..........//.are.tied.to.focu |
| 1480 | 73 20 61 6e 64 20 6f 6e 6c 79 20 6f 6e 65 20 6d 6f 64 65 20 77 69 6c 6c 20 61 63 74 75 61 6c 6c | s.and.only.one.mode.will.actuall |
| 14a0 | 79 20 72 65 63 65 69 76 65 20 73 74 61 74 65 20 65 76 65 6e 74 73 20 77 68 69 6c 65 20 74 68 65 | y.receive.state.events.while.the |
| 14c0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 6f 74 68 65 72 20 6d 6f 64 65 20 69 73 20 64 6f 72 6d 61 | ..........//.other.mode.is.dorma |
| 14e0 | 6e 74 2e 20 49 6e 20 74 68 65 20 70 6c 61 79 65 72 2c 20 77 65 20 6f 6e 6c 79 20 67 65 74 20 70 | nt..In.the.player,.we.only.get.p |
| 1500 | 6c 61 79 20 6d 6f 64 65 20 62 75 66 66 65 72 73 2c 20 6f 66 20 63 6f 75 72 73 65 2e 0d 0a 0d 0a | lay.mode.buffers,.of.course..... |
| 1520 | 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 6e 65 65 64 20 74 6f 20 63 6c 65 61 72 20 | ........////TODO:.need.to.clear. |
| 1540 | 74 68 65 20 63 75 72 72 65 6e 74 20 62 75 66 66 65 72 73 20 77 68 65 6e 20 73 77 69 74 63 68 69 | the.current.buffers.when.switchi |
| 1560 | 6e 67 20 62 65 74 77 65 65 6e 20 65 64 69 74 20 61 6e 64 20 70 6c 61 79 20 6d 6f 64 65 0d 0a 20 | ng.between.edit.and.play.mode... |
| 1580 | 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 28 69 2e 65 2e 20 69 66 20 79 6f 75 20 63 6c | .......////......(i.e..if.you.cl |
| 15a0 | 69 63 6b 20 61 6e 20 65 64 69 74 6f 72 20 77 69 6e 64 6f 77 20 77 68 69 6c 65 20 69 6e 20 70 6c | ick.an.editor.window.while.in.pl |
| 15c0 | 61 79 20 6d 6f 64 65 2c 20 74 68 65 20 70 6c 61 79 20 6d 6f 64 65 0d 0a 20 20 20 20 20 20 20 20 | ay.mode,.the.play.mode.......... |
| 15e0 | 2f 2f 2f 2f 20 20 20 20 20 20 64 65 76 69 63 65 20 73 74 61 74 65 73 20 77 69 6c 6c 20 61 6c 6c | ////......device.states.will.all |
| 1600 | 20 67 6f 20 62 61 63 6b 20 74 6f 20 64 65 66 61 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f | .go.back.to.default)..........// |
| 1620 | 2f 2f 20 20 20 20 20 20 61 63 74 75 61 6c 6c 79 2c 20 69 66 20 77 65 20 72 65 61 6c 6c 79 20 72 | //......actually,.if.we.really.r |
| 1640 | 65 73 65 74 20 6f 6e 20 6d 6f 64 65 20 63 68 61 6e 67 65 2c 20 63 61 6e 27 74 20 77 65 20 6a 75 | eset.on.mode.change,.can't.we.ju |
| 1660 | 73 74 20 6b 65 65 70 20 61 20 73 69 6e 67 6c 65 20 73 65 74 20 62 75 66 66 65 72 73 3f 0d 0a 0d | st.keep.a.single.set.buffers?... |
| 1680 | 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 73 69 7a 65 50 65 72 42 75 66 66 | .........public.uint.sizePerBuff |
| 16a0 | 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 69 6e 74 20 74 6f 74 61 6c 53 69 | er;..........public.uint.totalSi |
| 16c0 | 7a 65 3b 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 | ze;............///.<summary>.... |
| 16e0 | 20 20 20 20 20 20 2f 2f 2f 20 42 75 66 66 65 72 20 74 68 61 74 20 68 61 73 20 73 74 61 74 65 20 | ......///.Buffer.that.has.state. |
| 1700 | 66 6f 72 20 65 61 63 68 20 64 65 76 69 63 65 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 77 69 74 68 | for.each.device.initialized.with |
| 1720 | 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | .default.values...........///.</ |
| 1740 | 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 2a 20 64 | summary>..........public.void*.d |
| 1760 | 65 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f | efaultStateBuffer;............// |
| 1780 | 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 75 66 66 65 72 20 | /.<summary>..........///.Buffer. |
| 17a0 | 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 62 69 74 66 6c 61 67 73 20 66 6f 72 20 6e 6f 69 73 79 | that.contains.bitflags.for.noisy |
| 17c0 | 20 61 6e 64 20 6e 6f 6e 2d 6e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 73 2c 20 74 6f 20 69 64 65 6e | .and.non-noisy.controls,.to.iden |
| 17e0 | 74 69 66 79 20 73 69 67 6e 69 66 69 63 61 6e 74 20 64 65 76 69 63 65 20 63 68 61 6e 67 65 73 2e | tify.significant.device.changes. |
| 1800 | 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>........ |
| 1820 | 20 20 70 75 62 6c 69 63 20 76 6f 69 64 2a 20 6e 6f 69 73 65 4d 61 73 6b 42 75 66 66 65 72 3b 0d | ..public.void*.noiseMaskBuffer;. |
| 1840 | 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 53 65 63 72 65 74 6c 79 20 77 65 20 70 65 72 66 6f 72 | ...........//.Secretly.we.perfor |
| 1860 | 6d 20 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0d 0a 20 20 20 | m.only.a.single.allocation...... |
| 1880 | 20 20 20 20 20 2f 2f 20 54 68 69 73 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 61 6c 73 6f 20 63 6f 6e | .....//.This.allocation.also.con |
| 18a0 | 74 61 69 6e 73 20 74 68 65 20 64 65 76 69 63 65 2d 74 6f 2d 73 74 61 74 65 20 6d 61 70 70 69 6e | tains.the.device-to-state.mappin |
| 18c0 | 67 73 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 2a 20 6d 5f 41 6c 6c | gs...........private.void*.m_All |
| 18e0 | 42 75 66 66 65 72 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 74 61 69 6e 73 20 | Buffers;............//.Contains. |
| 1900 | 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 61 20 64 6f 75 62 6c 65 20 62 75 66 66 65 | information.about.a.double.buffe |
| 1920 | 72 20 73 65 74 75 70 2e 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 5d | r.setup...........[Serializable] |
| 1940 | 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 75 63 74 20 44 6f 75 62 6c 65 | ..........internal.struct.Double |
| 1960 | 42 75 66 66 65 72 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 | Buffers..........{.............. |
| 1980 | 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 74 6f 72 65 20 74 69 6d 65 73 74 61 6d 70 73 20 61 6c 6f | ////REVIEW:.store.timestamps.alo |
| 19a0 | 6e 67 20 77 69 74 68 20 65 61 63 68 20 64 65 76 69 63 65 2d 74 6f 2d 62 75 66 66 65 72 20 6d 61 | ng.with.each.device-to-buffer.ma |
| 19c0 | 70 70 69 6e 67 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 20 61 72 72 61 79 20 | pping?..............//.An.array. |
| 19e0 | 6f 66 20 70 6f 69 6e 74 65 72 73 20 74 68 61 74 20 6d 61 70 73 20 64 65 76 69 63 65 73 20 74 6f | of.pointers.that.maps.devices.to |
| 1a00 | 20 74 68 65 69 72 20 72 65 73 70 65 63 74 69 76 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | .their.respective............../ |
| 1a20 | 2f 20 66 72 6f 6e 74 20 61 6e 64 20 62 61 63 6b 20 62 75 66 66 65 72 2e 20 4d 61 70 70 69 6e 67 | /.front.and.back.buffer..Mapping |
| 1a40 | 20 69 73 20 5b 64 65 76 69 63 65 49 6e 64 65 78 2a 32 5d 20 69 73 20 66 72 6f 6e 74 0d 0a 20 20 | .is.[deviceIndex*2].is.front.... |
| 1a60 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 75 66 66 65 72 20 61 6e 64 20 5b 64 65 76 69 63 65 49 | ..........//.buffer.and.[deviceI |
| 1a80 | 6e 64 65 78 2a 32 2b 31 5d 20 69 73 20 62 61 63 6b 20 62 75 66 66 65 72 2e 20 45 61 63 68 20 64 | ndex*2+1].is.back.buffer..Each.d |
| 1aa0 | 65 76 69 63 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 68 61 73 20 69 74 73 20 62 75 | evice..............//.has.its.bu |
| 1ac0 | 66 66 65 72 73 20 73 77 61 70 70 65 64 20 69 6e 64 69 76 69 64 75 61 6c 6c 79 20 77 69 74 68 20 | ffers.swapped.individually.with. |
| 1ae0 | 53 77 61 70 44 65 76 69 63 65 42 75 66 66 65 72 73 28 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | SwapDeviceBuffers()............. |
| 1b00 | 20 20 70 75 62 6c 69 63 20 76 6f 69 64 2a 2a 20 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 | ..public.void**.deviceToBufferMa |
| 1b20 | 70 70 69 6e 67 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f | pping;................public.boo |
| 1b40 | 6c 20 76 61 6c 69 64 20 3d 3e 20 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 70 70 69 6e 67 | l.valid.=>.deviceToBufferMapping |
| 1b60 | 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | .!=.null;................public. |
| 1b80 | 76 6f 69 64 20 53 65 74 46 72 6f 6e 74 42 75 66 66 65 72 28 69 6e 74 20 64 65 76 69 63 65 49 6e | void.SetFrontBuffer(int.deviceIn |
| 1ba0 | 64 65 78 2c 20 76 6f 69 64 2a 20 70 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | dex,.void*.ptr)..............{.. |
| 1bc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 | ................deviceToBufferMa |
| 1be0 | 70 70 69 6e 67 5b 64 65 76 69 63 65 49 6e 64 65 78 20 2a 20 32 5d 20 3d 20 70 74 72 3b 0d 0a 20 | pping[deviceIndex.*.2].=.ptr;... |
| 1c00 | 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 |
| 1c20 | 69 63 20 76 6f 69 64 20 53 65 74 42 61 63 6b 42 75 66 66 65 72 28 69 6e 74 20 64 65 76 69 63 65 | ic.void.SetBackBuffer(int.device |
| 1c40 | 49 6e 64 65 78 2c 20 76 6f 69 64 2a 20 70 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | Index,.void*.ptr)..............{ |
| 1c60 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 | ..................deviceToBuffer |
| 1c80 | 4d 61 70 70 69 6e 67 5b 64 65 76 69 63 65 49 6e 64 65 78 20 2a 20 32 20 2b 20 31 5d 20 3d 20 70 | Mapping[deviceIndex.*.2.+.1].=.p |
| 1ca0 | 74 72 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 | tr;..............}.............. |
| 1cc0 | 20 20 70 75 62 6c 69 63 20 76 6f 69 64 2a 20 47 65 74 46 72 6f 6e 74 42 75 66 66 65 72 28 69 6e | ..public.void*.GetFrontBuffer(in |
| 1ce0 | 74 20 64 65 76 69 63 65 49 6e 64 65 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | t.deviceIndex)..............{... |
| 1d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 64 65 76 69 63 65 54 6f 42 75 | ...............return.deviceToBu |
| 1d20 | 66 66 65 72 4d 61 70 70 69 6e 67 5b 64 65 76 69 63 65 49 6e 64 65 78 20 2a 20 32 5d 3b 0d 0a 20 | fferMapping[deviceIndex.*.2];... |
| 1d40 | 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 |
| 1d60 | 69 63 20 76 6f 69 64 2a 20 47 65 74 42 61 63 6b 42 75 66 66 65 72 28 69 6e 74 20 64 65 76 69 63 | ic.void*.GetBackBuffer(int.devic |
| 1d80 | 65 49 6e 64 65 78 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 | eIndex)..............{.......... |
| 1da0 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 70 | ........return.deviceToBufferMap |
| 1dc0 | 70 69 6e 67 5b 64 65 76 69 63 65 49 6e 64 65 78 20 2a 20 32 20 2b 20 31 5d 3b 0d 0a 20 20 20 20 | ping[deviceIndex.*.2.+.1];...... |
| 1de0 | 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 69 63 20 | ........}................public. |
| 1e00 | 76 6f 69 64 20 53 77 61 70 42 75 66 66 65 72 73 28 69 6e 74 20 64 65 76 69 63 65 49 6e 64 65 78 | void.SwapBuffers(int.deviceIndex |
| 1e20 | 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 | )..............{................ |
| 1e40 | 20 20 2f 2f 20 49 67 6e 6f 72 65 20 69 66 20 74 68 65 20 64 6f 75 62 6c 65 20 62 75 66 66 65 72 | ..//.Ignore.if.the.double.buffer |
| 1e60 | 20 73 65 74 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 69 6e 69 74 69 61 6c 69 7a 65 64 2e 0d 0a | .set.has.not.been.initialized... |
| 1e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 65 61 6e 73 20 74 68 65 20 72 65 73 | ................//.Means.the.res |
| 1ea0 | 70 65 63 74 69 76 65 20 75 70 64 61 74 65 20 74 79 70 65 20 69 73 20 64 69 73 61 62 6c 65 64 2e | pective.update.type.is.disabled. |
| 1ec0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 76 61 6c 69 64 29 0d 0a 20 | ..................if.(!valid)... |
| 1ee0 | 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 0d 0a 20 20 | ...................return;...... |
| 1f00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 72 6f 6e 74 20 3d 20 47 65 74 46 72 6f | ..............var.front.=.GetFro |
| 1f20 | 6e 74 42 75 66 66 65 72 28 64 65 76 69 63 65 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 | ntBuffer(deviceIndex);.......... |
| 1f40 | 20 20 20 20 20 20 20 20 76 61 72 20 62 61 63 6b 20 3d 20 47 65 74 42 61 63 6b 42 75 66 66 65 72 | ........var.back.=.GetBackBuffer |
| 1f60 | 28 64 65 76 69 63 65 49 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (deviceIndex);.................. |
| 1f80 | 20 20 53 65 74 46 72 6f 6e 74 42 75 66 66 65 72 28 64 65 76 69 63 65 49 6e 64 65 78 2c 20 62 61 | ..SetFrontBuffer(deviceIndex,.ba |
| 1fa0 | 63 6b 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 42 61 63 6b 42 75 66 | ck);..................SetBackBuf |
| 1fc0 | 66 65 72 28 64 65 76 69 63 65 49 6e 64 65 78 2c 20 66 72 6f 6e 74 29 3b 0d 0a 20 20 20 20 20 20 | fer(deviceIndex,.front);........ |
| 1fe0 | 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 69 6e | ......}..........}............in |
| 2000 | 74 65 72 6e 61 6c 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 6d 5f 50 6c 61 79 65 72 53 74 61 | ternal.DoubleBuffers.m_PlayerSta |
| 2020 | 74 65 42 75 66 66 65 72 73 3b 0d 0a 0d 0a 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a | teBuffers;....#if.UNITY_EDITOR.. |
| 2040 | 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 6d | ........internal.DoubleBuffers.m |
| 2060 | 5f 45 64 69 74 6f 72 53 74 61 74 65 42 75 66 66 65 72 73 3b 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a | _EditorStateBuffers;..#endif.... |
| 2080 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 47 65 74 | ........public.DoubleBuffers.Get |
| 20a0 | 44 6f 75 62 6c 65 42 75 66 66 65 72 73 46 6f 72 28 49 6e 70 75 74 55 70 64 61 74 65 54 79 70 65 | DoubleBuffersFor(InputUpdateType |
| 20c0 | 20 75 70 64 61 74 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | .updateType)..........{......... |
| 20e0 | 20 20 20 20 20 73 77 69 74 63 68 20 28 75 70 64 61 74 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 | .....switch.(updateType)........ |
| 2100 | 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 73 65 20 49 6e | ......{..................case.In |
| 2120 | 70 75 74 55 70 64 61 74 65 54 79 70 65 2e 42 65 66 6f 72 65 52 65 6e 64 65 72 3a 0d 0a 20 20 20 | putUpdateType.BeforeRender:..... |
| 2140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 49 6e 70 75 74 55 70 64 61 74 65 54 79 70 | .............case.InputUpdateTyp |
| 2160 | 65 2e 46 69 78 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 49 | e.Fixed:..................case.I |
| 2180 | 6e 70 75 74 55 70 64 61 74 65 54 79 70 65 2e 44 79 6e 61 6d 69 63 3a 0d 0a 20 20 20 20 20 20 20 | nputUpdateType.Dynamic:......... |
| 21a0 | 20 20 20 20 20 20 20 20 20 63 61 73 65 20 49 6e 70 75 74 55 70 64 61 74 65 54 79 70 65 2e 4d 61 | .........case.InputUpdateType.Ma |
| 21c0 | 6e 75 61 6c 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | nual:......................retur |
| 21e0 | 6e 20 6d 5f 50 6c 61 79 65 72 53 74 61 74 65 42 75 66 66 65 72 73 3b 0d 0a 23 69 66 20 55 4e 49 | n.m_PlayerStateBuffers;..#if.UNI |
| 2200 | 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 | TY_EDITOR..................case. |
| 2220 | 49 6e 70 75 74 55 70 64 61 74 65 54 79 70 65 2e 45 64 69 74 6f 72 3a 0d 0a 20 20 20 20 20 20 20 | InputUpdateType.Editor:......... |
| 2240 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 45 64 69 74 6f 72 53 74 61 74 | .............return.m_EditorStat |
| 2260 | 65 42 75 66 66 65 72 73 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d | eBuffers;..#endif..............} |
| 2280 | 0d 0a 0d 0a 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 | ................throw.new.Argume |
| 22a0 | 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 55 6e 72 65 63 6f 67 6e 69 7a 65 64 20 49 6e 70 75 74 55 | ntException("Unrecognized.InputU |
| 22c0 | 70 64 61 74 65 54 79 70 65 3a 20 22 20 2b 20 75 70 64 61 74 65 54 79 70 65 2c 20 6e 61 6d 65 6f | pdateType:.".+.updateType,.nameo |
| 22e0 | 66 28 75 70 64 61 74 65 54 79 70 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 | f(updateType));..........}...... |
| 2300 | 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 2a 20 73 5f 44 65 | ......internal.static.void*.s_De |
| 2320 | 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 | faultStateBuffer;..........inter |
| 2340 | 6e 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 2a 20 73 5f 4e 6f 69 73 65 4d 61 73 6b 42 75 66 66 | nal.static.void*.s_NoiseMaskBuff |
| 2360 | 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 44 6f 75 | er;..........internal.static.Dou |
| 2380 | 62 6c 65 42 75 66 66 65 72 73 20 73 5f 43 75 72 72 65 6e 74 42 75 66 66 65 72 73 3b 0d 0a 0d 0a | bleBuffers.s_CurrentBuffers;.... |
| 23a0 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 2a 20 47 65 74 46 | ........public.static.void*.GetF |
| 23c0 | 72 6f 6e 74 42 75 66 66 65 72 46 6f 72 44 65 76 69 63 65 28 69 6e 74 20 64 65 76 69 63 65 49 6e | rontBufferForDevice(int.deviceIn |
| 23e0 | 64 65 78 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 72 65 74 | dex)..........{..............ret |
| 2400 | 75 72 6e 20 73 5f 43 75 72 72 65 6e 74 42 75 66 66 65 72 73 2e 47 65 74 46 72 6f 6e 74 42 75 66 | urn.s_CurrentBuffers.GetFrontBuf |
| 2420 | 66 65 72 28 64 65 76 69 63 65 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a | fer(deviceIndex);..........}.... |
| 2440 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 2a 20 47 65 74 42 | ........public.static.void*.GetB |
| 2460 | 61 63 6b 42 75 66 66 65 72 46 6f 72 44 65 76 69 63 65 28 69 6e 74 20 64 65 76 69 63 65 49 6e 64 | ackBufferForDevice(int.deviceInd |
| 2480 | 65 78 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 72 65 74 75 | ex)..........{..............retu |
| 24a0 | 72 6e 20 73 5f 43 75 72 72 65 6e 74 42 75 66 66 65 72 73 2e 47 65 74 42 61 63 6b 42 75 66 66 65 | rn.s_CurrentBuffers.GetBackBuffe |
| 24c0 | 72 28 64 65 76 69 63 65 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 | r(deviceIndex);..........}...... |
| 24e0 | 20 20 20 20 20 20 2f 2f 20 53 77 69 74 63 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 20 | ......//.Switch.the.current.set. |
| 2500 | 6f 66 20 62 75 66 66 65 72 73 20 75 73 65 64 20 62 79 20 74 68 65 20 73 79 73 74 65 6d 2e 0d 0a | of.buffers.used.by.the.system... |
| 2520 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 20 53 77 69 74 63 | ........public.static.void.Switc |
| 2540 | 68 54 6f 28 49 6e 70 75 74 53 74 61 74 65 42 75 66 66 65 72 73 20 62 75 66 66 65 72 73 2c 20 49 | hTo(InputStateBuffers.buffers,.I |
| 2560 | 6e 70 75 74 55 70 64 61 74 65 54 79 70 65 20 75 70 64 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 | nputUpdateType.update).......... |
| 2580 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 43 75 72 72 65 6e 74 42 75 66 66 65 72 73 20 | {..............s_CurrentBuffers. |
| 25a0 | 3d 20 62 75 66 66 65 72 73 2e 47 65 74 44 6f 75 62 6c 65 42 75 66 66 65 72 73 46 6f 72 28 75 70 | =.buffers.GetDoubleBuffersFor(up |
| 25c0 | 64 61 74 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 2f 2f 20 | date);..........}............//. |
| 25e0 | 41 6c 6c 6f 63 61 74 65 73 20 61 6c 6c 20 62 75 66 66 65 72 73 20 74 6f 20 73 65 72 76 65 20 74 | Allocates.all.buffers.to.serve.t |
| 2600 | 68 65 20 67 69 76 65 6e 20 75 70 64 61 74 65 73 20 61 6e 64 20 63 6f 6d 65 73 20 75 70 20 77 69 | he.given.updates.and.comes.up.wi |
| 2620 | 74 68 20 61 20 73 70 6f 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 66 6f 72 20 74 68 65 20 73 74 | th.a.spot..........//.for.the.st |
| 2640 | 61 74 65 20 62 6c 6f 63 6b 20 6f 66 20 65 61 63 68 20 64 65 76 69 63 65 2e 20 52 65 74 75 72 6e | ate.block.of.each.device..Return |
| 2660 | 73 20 74 68 65 20 6e 65 77 20 73 74 61 74 65 20 62 6c 6f 63 6b 73 20 66 6f 72 20 74 68 65 0d 0a | s.the.new.state.blocks.for.the.. |
| 2680 | 20 20 20 20 20 20 20 20 2f 2f 20 64 65 76 69 63 65 73 20 28 69 74 20 77 69 6c 6c 20 2a 4e 4f 54 | ........//.devices.(it.will.*NOT |
| 26a0 | 2a 20 69 6e 73 74 61 6c 6c 20 74 68 65 6d 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 73 29 2e 0d | *.install.them.on.the.devices).. |
| 26c0 | 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 6c 6c 6f 63 61 74 65 41 6c 6c | .........public.void.AllocateAll |
| 26e0 | 28 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 2c 20 69 6e 74 20 64 65 76 69 | (InputDevice[].devices,.int.devi |
| 2700 | 63 65 43 6f 75 6e 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 | ceCount)..........{............. |
| 2720 | 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 3d 20 43 6f 6d 70 75 74 65 53 69 7a 65 4f 66 53 69 | .sizePerBuffer.=.ComputeSizeOfSi |
| 2740 | 6e 67 6c 65 53 74 61 74 65 42 75 66 66 65 72 28 64 65 76 69 63 65 73 2c 20 64 65 76 69 63 65 43 | ngleStateBuffer(devices,.deviceC |
| 2760 | 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 69 7a 65 50 65 72 42 | ount);..............if.(sizePerB |
| 2780 | 75 66 66 65 72 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | uffer.==.0)..................ret |
| 27a0 | 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 | urn;..............sizePerBuffer. |
| 27c0 | 3d 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 2e 41 6c 69 67 6e 54 6f 4d 75 6c 74 69 70 6c 65 4f | =.sizePerBuffer.AlignToMultipleO |
| 27e0 | 66 28 34 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 69 6e | f(4);................//.Determin |
| 2800 | 65 20 68 6f 77 20 6d 75 63 68 20 6d 65 6d 6f 72 79 20 77 65 20 6e 65 65 64 2e 0d 0a 20 20 20 20 | e.how.much.memory.we.need....... |
| 2820 | 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 70 70 69 6e 67 54 61 62 6c 65 53 69 7a 65 50 65 72 42 | ........var.mappingTableSizePerB |
| 2840 | 75 66 66 65 72 20 3d 20 28 75 69 6e 74 29 28 64 65 76 69 63 65 43 6f 75 6e 74 20 2a 20 73 69 7a | uffer.=.(uint)(deviceCount.*.siz |
| 2860 | 65 6f 66 28 76 6f 69 64 2a 29 20 2a 20 32 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | eof(void*).*.2);................ |
| 2880 | 74 6f 74 61 6c 53 69 7a 65 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 6f | totalSize.=.0;................to |
| 28a0 | 74 61 6c 53 69 7a 65 20 2b 3d 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 2a 20 32 3b 0d 0a 20 | talSize.+=.sizePerBuffer.*.2;... |
| 28c0 | 20 20 20 20 20 20 20 20 20 20 20 74 6f 74 61 6c 53 69 7a 65 20 2b 3d 20 6d 61 70 70 69 6e 67 54 | ...........totalSize.+=.mappingT |
| 28e0 | 61 62 6c 65 53 69 7a 65 50 65 72 42 75 66 66 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | ableSizePerBuffer;.............. |
| 2900 | 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..#if.UNITY_EDITOR.............. |
| 2920 | 74 6f 74 61 6c 53 69 7a 65 20 2b 3d 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 2a 20 32 3b 0d | totalSize.+=.sizePerBuffer.*.2;. |
| 2940 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 74 61 6c 53 69 7a 65 20 2b 3d 20 6d 61 70 70 69 6e | .............totalSize.+=.mappin |
| 2960 | 67 54 61 62 6c 65 53 69 7a 65 50 65 72 42 75 66 66 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | gTableSizePerBuffer;............ |
| 2980 | 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 6c 75 73 20 | ..#endif................//.Plus. |
| 29a0 | 32 20 6d 6f 72 65 20 62 75 66 66 65 72 73 20 28 31 20 66 6f 72 20 64 65 66 61 75 6c 74 20 73 74 | 2.more.buffers.(1.for.default.st |
| 29c0 | 61 74 65 73 2c 20 61 6e 64 20 6f 6e 65 20 66 6f 72 20 6e 6f 69 73 65 20 6d 61 73 6b 73 29 2e 0d | ates,.and.one.for.noise.masks).. |
| 29e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 74 61 6c 53 69 7a 65 20 2b 3d 20 73 69 7a 65 50 65 | .............totalSize.+=.sizePe |
| 2a00 | 72 42 75 66 66 65 72 20 2a 20 32 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 | rBuffer.*.2;................//.A |
| 2a20 | 6c 6c 6f 63 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 6c 6c 42 75 66 66 65 | llocate...............m_AllBuffe |
| 2a40 | 72 73 20 3d 20 55 6e 73 61 66 65 55 74 69 6c 69 74 79 2e 4d 61 6c 6c 6f 63 28 74 6f 74 61 6c 53 | rs.=.UnsafeUtility.Malloc(totalS |
| 2a60 | 69 7a 65 2c 20 34 2c 20 41 6c 6c 6f 63 61 74 6f 72 2e 50 65 72 73 69 73 74 65 6e 74 29 3b 0d 0a | ize,.4,.Allocator.Persistent);.. |
| 2a80 | 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 73 61 66 65 55 74 69 6c 69 74 79 2e 4d 65 6d 43 6c 65 | ............UnsafeUtility.MemCle |
| 2aa0 | 61 72 28 6d 5f 41 6c 6c 42 75 66 66 65 72 73 2c 20 74 6f 74 61 6c 53 69 7a 65 29 3b 0d 0a 0d 0a | ar(m_AllBuffers,.totalSize);.... |
| 2ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 75 70 20 64 65 76 69 63 65 20 74 6f 20 | ............//.Set.up.device.to. |
| 2ae0 | 62 75 66 66 65 72 20 6d 61 70 70 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 | buffer.mappings...............va |
| 2b00 | 72 20 70 74 72 20 3d 20 28 62 79 74 65 2a 29 6d 5f 41 6c 6c 42 75 66 66 65 72 73 3b 0d 0a 20 20 | r.ptr.=.(byte*)m_AllBuffers;.... |
| 2b20 | 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 53 74 61 74 65 42 75 66 66 65 72 73 20 3d | ..........m_PlayerStateBuffers.= |
| 2b40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 55 70 44 65 76 69 63 65 54 6f 42 | ..................SetUpDeviceToB |
| 2b60 | 75 66 66 65 72 4d 61 70 70 69 6e 67 73 28 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 72 65 66 20 70 | ufferMappings(deviceCount,.ref.p |
| 2b80 | 74 72 2c 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | tr,.sizePerBuffer,.............. |
| 2ba0 | 20 20 20 20 20 20 20 20 6d 61 70 70 69 6e 67 54 61 62 6c 65 53 69 7a 65 50 65 72 42 75 66 66 65 | ........mappingTableSizePerBuffe |
| 2bc0 | 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 | r);................#if.UNITY_EDI |
| 2be0 | 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 64 69 74 6f 72 53 74 61 74 65 42 75 | TOR..............m_EditorStateBu |
| 2c00 | 66 66 65 72 73 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 55 70 44 65 | ffers.=..................SetUpDe |
| 2c20 | 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 70 70 69 6e 67 73 28 64 65 76 69 63 65 43 6f 75 6e 74 | viceToBufferMappings(deviceCount |
| 2c40 | 2c 20 72 65 66 20 70 74 72 2c 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 2c 20 6d 61 70 70 69 6e | ,.ref.ptr,.sizePerBuffer,.mappin |
| 2c60 | 67 54 61 62 6c 65 53 69 7a 65 50 65 72 42 75 66 66 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | gTableSizePerBuffer);........... |
| 2c80 | 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 66 61 | ...#endif................//.Defa |
| 2ca0 | 75 6c 74 20 73 74 61 74 65 20 61 6e 64 20 6e 6f 69 73 65 20 66 69 6c 74 65 72 20 62 75 66 66 65 | ult.state.and.noise.filter.buffe |
| 2cc0 | 72 73 20 67 6f 20 6c 61 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 | rs.go.last...............default |
| 2ce0 | 53 74 61 74 65 42 75 66 66 65 72 20 3d 20 70 74 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | StateBuffer.=.ptr;.............. |
| 2d00 | 6e 6f 69 73 65 4d 61 73 6b 42 75 66 66 65 72 20 3d 20 70 74 72 20 2b 20 73 69 7a 65 50 65 72 42 | noiseMaskBuffer.=.ptr.+.sizePerB |
| 2d20 | 75 66 66 65 72 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 | uffer;..........}............pri |
| 2d40 | 76 61 74 65 20 73 74 61 74 69 63 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 53 65 74 55 70 44 | vate.static.DoubleBuffers.SetUpD |
| 2d60 | 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 70 70 69 6e 67 73 28 69 6e 74 20 64 65 76 69 63 65 | eviceToBufferMappings(int.device |
| 2d80 | 43 6f 75 6e 74 2c 20 72 65 66 20 62 79 74 65 2a 20 62 75 66 66 65 72 50 74 72 2c 20 75 69 6e 74 | Count,.ref.byte*.bufferPtr,.uint |
| 2da0 | 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 2c 20 75 69 6e 74 20 6d 61 70 70 69 6e 67 54 61 62 6c | .sizePerBuffer,.uint.mappingTabl |
| 2dc0 | 65 53 69 7a 65 50 65 72 42 75 66 66 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | eSizePerBuffer)..........{...... |
| 2de0 | 20 20 20 20 20 20 20 20 76 61 72 20 66 72 6f 6e 74 20 3d 20 62 75 66 66 65 72 50 74 72 3b 0d 0a | ........var.front.=.bufferPtr;.. |
| 2e00 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 61 63 6b 20 3d 20 62 75 66 66 65 72 50 74 72 | ............var.back.=.bufferPtr |
| 2e20 | 20 2b 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 | .+.sizePerBuffer;..............v |
| 2e40 | 61 72 20 6d 61 70 70 69 6e 67 73 20 3d 20 28 76 6f 69 64 2a 2a 29 28 62 75 66 66 65 72 50 74 72 | ar.mappings.=.(void**)(bufferPtr |
| 2e60 | 20 2b 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 2a 20 32 29 3b 20 20 2f 2f 20 50 75 74 20 6d | .+.sizePerBuffer.*.2);..//.Put.m |
| 2e80 | 61 70 70 69 6e 67 20 74 61 62 6c 65 20 61 74 20 65 6e 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | apping.table.at.end............. |
| 2ea0 | 20 20 62 75 66 66 65 72 50 74 72 20 2b 3d 20 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 2a 20 32 | ..bufferPtr.+=.sizePerBuffer.*.2 |
| 2ec0 | 20 2b 20 6d 61 70 70 69 6e 67 54 61 62 6c 65 53 69 7a 65 50 65 72 42 75 66 66 65 72 3b 0d 0a 0d | .+.mappingTableSizePerBuffer;... |
| 2ee0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 75 66 66 65 72 73 20 3d 20 6e 65 77 20 44 | .............var.buffers.=.new.D |
| 2f00 | 6f 75 62 6c 65 42 75 66 66 65 72 73 20 7b 64 65 76 69 63 65 54 6f 42 75 66 66 65 72 4d 61 70 70 | oubleBuffers.{deviceToBufferMapp |
| 2f20 | 69 6e 67 20 3d 20 6d 61 70 70 69 6e 67 73 7d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ing.=.mappings};................ |
| 2f40 | 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 64 65 76 69 63 65 43 6f 75 6e 74 3b | for.(var.i.=.0;.i.<.deviceCount; |
| 2f60 | 20 2b 2b 69 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 | .++i)..............{............ |
| 2f80 | 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 49 6e 64 65 78 20 3d 20 69 3b 0d 0a 20 20 20 20 | ......var.deviceIndex.=.i;...... |
| 2fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 73 2e 53 65 74 46 72 6f 6e 74 42 75 66 66 | ............buffers.SetFrontBuff |
| 2fc0 | 65 72 28 64 65 76 69 63 65 49 6e 64 65 78 2c 20 66 72 6f 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 | er(deviceIndex,.front);......... |
| 2fe0 | 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 73 2e 53 65 74 42 61 63 6b 42 75 66 66 65 72 28 64 | .........buffers.SetBackBuffer(d |
| 3000 | 65 76 69 63 65 49 6e 64 65 78 2c 20 62 61 63 6b 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | eviceIndex,.back);.............. |
| 3020 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 75 66 66 65 72 73 3b | }................return.buffers; |
| 3040 | 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 6f | ..........}............public.vo |
| 3060 | 69 64 20 46 72 65 65 41 6c 6c 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | id.FreeAll()..........{......... |
| 3080 | 20 20 20 20 20 69 66 20 28 6d 5f 41 6c 6c 42 75 66 66 65 72 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a | .....if.(m_AllBuffers.!=.null).. |
| 30a0 | 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 55 | ............{..................U |
| 30c0 | 6e 73 61 66 65 55 74 69 6c 69 74 79 2e 46 72 65 65 28 6d 5f 41 6c 6c 42 75 66 66 65 72 73 2c 20 | nsafeUtility.Free(m_AllBuffers,. |
| 30e0 | 41 6c 6c 6f 63 61 74 6f 72 2e 50 65 72 73 69 73 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 | Allocator.Persistent);.......... |
| 3100 | 20 20 20 20 20 20 20 20 6d 5f 41 6c 6c 42 75 66 66 65 72 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 | ........m_AllBuffers.=.null;.... |
| 3120 | 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 6d 5f 50 6c 61 | ..........}................m_Pla |
| 3140 | 79 65 72 53 74 61 74 65 42 75 66 66 65 72 73 20 3d 20 6e 65 77 20 44 6f 75 62 6c 65 42 75 66 66 | yerStateBuffers.=.new.DoubleBuff |
| 3160 | 65 72 73 28 29 3b 0d 0a 0d 0a 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 | ers();....#if.UNITY_EDITOR...... |
| 3180 | 20 20 20 20 20 20 20 20 6d 5f 45 64 69 74 6f 72 53 74 61 74 65 42 75 66 66 65 72 73 20 3d 20 6e | ........m_EditorStateBuffers.=.n |
| 31a0 | 65 77 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 28 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 | ew.DoubleBuffers();..#endif..... |
| 31c0 | 20 20 20 20 20 20 20 20 20 20 20 73 5f 43 75 72 72 65 6e 74 42 75 66 66 65 72 73 20 3d 20 6e 65 | ...........s_CurrentBuffers.=.ne |
| 31e0 | 77 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | w.DoubleBuffers();.............. |
| 3200 | 20 20 69 66 20 28 73 5f 44 65 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 20 3d 3d 20 64 65 | ..if.(s_DefaultStateBuffer.==.de |
| 3220 | 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | faultStateBuffer)............... |
| 3240 | 20 20 20 73 5f 44 65 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 20 3d 20 6e 75 6c 6c 3b 0d | ...s_DefaultStateBuffer.=.null;. |
| 3260 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 | ...............defaultStateBuffe |
| 3280 | 72 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 4e | r.=.null;................if.(s_N |
| 32a0 | 6f 69 73 65 4d 61 73 6b 42 75 66 66 65 72 20 3d 3d 20 6e 6f 69 73 65 4d 61 73 6b 42 75 66 66 65 | oiseMaskBuffer.==.noiseMaskBuffe |
| 32c0 | 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 4e 6f 69 73 65 4d 61 73 6b 42 | r)..................s_NoiseMaskB |
| 32e0 | 75 66 66 65 72 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 6f 69 | uffer.=.null;................noi |
| 3300 | 73 65 4d 61 73 6b 42 75 66 66 65 72 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | seMaskBuffer.=.null;............ |
| 3320 | 20 20 20 20 74 6f 74 61 6c 53 69 7a 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ....totalSize.=.0;.............. |
| 3340 | 73 69 7a 65 50 65 72 42 75 66 66 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d | sizePerBuffer.=.0;..........}... |
| 3360 | 0a 20 20 20 20 20 20 20 20 2f 2f 20 4d 69 67 72 61 74 65 20 73 74 61 74 65 20 64 61 74 61 20 66 | .........//.Migrate.state.data.f |
| 3380 | 6f 72 20 61 6c 6c 20 64 65 76 69 63 65 73 20 66 72 6f 6d 20 61 20 70 72 65 76 69 6f 75 73 20 73 | or.all.devices.from.a.previous.s |
| 33a0 | 65 74 20 6f 66 20 62 75 66 66 65 72 73 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 | et.of.buffers.to.the.current.set |
| 33c0 | 20 6f 66 20 62 75 66 66 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 70 69 65 73 20 | .of.buffers...........//.Copies. |
| 33e0 | 61 6c 6c 20 73 74 61 74 65 20 66 72 6f 6d 20 74 68 65 69 72 20 6f 6c 64 20 6c 6f 63 61 74 69 6f | all.state.from.their.old.locatio |
| 3400 | 6e 73 20 74 6f 20 74 68 65 69 72 20 6e 65 77 20 6c 6f 63 61 74 69 6f 6e 73 20 61 6e 64 20 62 61 | ns.to.their.new.locations.and.ba |
| 3420 | 6b 65 73 20 74 68 65 20 6e 65 77 20 6f 66 66 73 65 74 73 20 69 6e 74 6f 0d 0a 20 20 20 20 20 20 | kes.the.new.offsets.into........ |
| 3440 | 20 20 2f 2f 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 68 69 65 72 61 72 63 68 69 65 73 20 6f 66 20 | ..//.the.control.hierarchies.of. |
| 3460 | 74 68 65 20 67 69 76 65 6e 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e | the.given.devices...........//.N |
| 3480 | 4f 54 45 3a 20 57 68 65 6e 20 68 61 76 69 6e 67 20 6f 6c 64 42 75 66 66 65 72 73 2c 20 74 68 69 | OTE:.When.having.oldBuffers,.thi |
| 34a0 | 73 20 6d 65 74 68 6f 64 20 6f 6e 6c 79 20 77 6f 72 6b 73 20 70 72 6f 70 65 72 6c 79 20 69 66 20 | s.method.only.works.properly.if. |
| 34c0 | 74 68 65 20 6f 6e 6c 79 20 61 6c 74 65 72 61 74 69 6f 6e 20 63 6f 6d 70 61 72 65 64 20 74 6f 20 | the.only.alteration.compared.to. |
| 34e0 | 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 6e 65 77 20 62 75 66 66 65 72 | the..........//.......new.buffer |
| 3500 | 73 20 69 73 20 74 68 61 74 20 65 69 74 68 65 72 20 64 65 76 69 63 65 73 20 68 61 76 65 20 62 65 | s.is.that.either.devices.have.be |
| 3520 | 65 6e 20 72 65 6d 6f 76 65 64 20 6f 72 20 64 65 76 69 63 65 73 20 68 61 76 65 20 62 65 65 6e 20 | en.removed.or.devices.have.been. |
| 3540 | 61 64 64 65 64 2e 20 43 61 6e 6e 6f 74 20 62 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 | added..Cannot.be..........//.... |
| 3560 | 20 20 20 61 20 6d 69 78 20 6f 66 20 74 68 65 20 74 77 6f 2e 20 41 6c 73 6f 2c 20 6e 65 77 20 64 | ...a.mix.of.the.two..Also,.new.d |
| 3580 | 65 76 69 63 65 73 20 4d 55 53 54 20 62 65 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 65 6e 64 20 | evices.MUST.be.added.to.the.end. |
| 35a0 | 61 6e 64 20 63 61 6e 6e 6f 74 20 62 65 20 69 6e 73 65 72 74 65 64 20 69 6e 20 74 68 65 20 6d 69 | and.cannot.be.inserted.in.the.mi |
| 35c0 | 64 64 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 41 6c 73 6f 2c 20 73 74 | ddle...........//.NOTE:.Also,.st |
| 35e0 | 61 74 65 20 66 6f 72 6d 61 74 73 20 4d 55 53 54 20 6e 6f 74 20 63 68 61 6e 67 65 20 66 72 6f 6d | ate.formats.MUST.not.change.from |
| 3600 | 20 62 65 66 6f 72 65 2e 20 41 20 64 65 76 69 63 65 20 74 68 61 74 20 68 61 73 20 63 68 61 6e 67 | .before..A.device.that.has.chang |
| 3620 | 65 64 20 69 74 73 20 66 6f 72 6d 61 74 20 6d 75 73 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 | ed.its.format.must..........//.. |
| 3640 | 20 20 20 20 20 62 65 20 74 72 65 61 74 65 64 20 61 73 20 61 20 6e 65 77 6c 79 20 64 65 76 69 63 | .....be.treated.as.a.newly.devic |
| 3660 | 65 20 74 68 61 74 20 64 69 64 6e 27 74 20 65 78 69 73 74 20 62 65 66 6f 72 65 2e 0d 0a 20 20 20 | e.that.didn't.exist.before...... |
| 3680 | 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4d 69 67 72 61 74 65 41 6c 6c 28 49 6e 70 75 | .....public.void.MigrateAll(Inpu |
| 36a0 | 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 2c 20 69 6e 74 20 64 65 76 69 63 65 43 6f 75 | tDevice[].devices,.int.deviceCou |
| 36c0 | 6e 74 2c 20 49 6e 70 75 74 53 74 61 74 65 42 75 66 66 65 72 73 20 6f 6c 64 42 75 66 66 65 72 73 | nt,.InputStateBuffers.oldBuffers |
| 36e0 | 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 49 66 20 | )..........{..............//.If. |
| 3700 | 77 65 20 68 61 76 65 20 6f 6c 64 20 64 61 74 61 2c 20 70 65 72 66 6f 72 6d 20 6d 69 67 72 61 74 | we.have.old.data,.perform.migrat |
| 3720 | 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 6c 64 42 75 66 66 65 72 73 | ion...............if.(oldBuffers |
| 3740 | 2e 74 6f 74 61 6c 53 69 7a 65 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | .totalSize.>.0)..............{.. |
| 3760 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 69 67 72 61 74 65 44 6f 75 62 6c 65 42 75 66 | ................MigrateDoubleBuf |
| 3780 | 66 65 72 28 6d 5f 50 6c 61 79 65 72 53 74 61 74 65 42 75 66 66 65 72 73 2c 20 64 65 76 69 63 65 | fer(m_PlayerStateBuffers,.device |
| 37a0 | 73 2c 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 6f 6c 64 42 75 66 66 65 72 73 2e 6d 5f 50 6c 61 | s,.deviceCount,.oldBuffers.m_Pla |
| 37c0 | 79 65 72 53 74 61 74 65 42 75 66 66 65 72 73 29 3b 0d 0a 0d 0a 23 69 66 20 55 4e 49 54 59 5f 45 | yerStateBuffers);....#if.UNITY_E |
| 37e0 | 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 69 67 72 61 74 65 44 6f | DITOR..................MigrateDo |
| 3800 | 75 62 6c 65 42 75 66 66 65 72 28 6d 5f 45 64 69 74 6f 72 53 74 61 74 65 42 75 66 66 65 72 73 2c | ubleBuffer(m_EditorStateBuffers, |
| 3820 | 20 64 65 76 69 63 65 73 2c 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 6f 6c 64 42 75 66 66 65 72 | .devices,.deviceCount,.oldBuffer |
| 3840 | 73 2e 6d 5f 45 64 69 74 6f 72 53 74 61 74 65 42 75 66 66 65 72 73 29 3b 0d 0a 23 65 6e 64 69 66 | s.m_EditorStateBuffers);..#endif |
| 3860 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 69 67 72 61 74 65 53 69 6e 67 6c | ....................MigrateSingl |
| 3880 | 65 42 75 66 66 65 72 28 64 65 66 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 2c 20 64 65 76 69 | eBuffer(defaultStateBuffer,.devi |
| 38a0 | 63 65 73 2c 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 6f 6c 64 42 75 66 66 65 72 73 2e 64 65 66 | ces,.deviceCount,.oldBuffers.def |
| 38c0 | 61 75 6c 74 53 74 61 74 65 42 75 66 66 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | aultStateBuffer);............... |
| 38e0 | 20 20 20 4d 69 67 72 61 74 65 53 69 6e 67 6c 65 42 75 66 66 65 72 28 6e 6f 69 73 65 4d 61 73 6b | ...MigrateSingleBuffer(noiseMask |
| 3900 | 42 75 66 66 65 72 2c 20 64 65 76 69 63 65 73 2c 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 6f 6c | Buffer,.devices,.deviceCount,.ol |
| 3920 | 64 42 75 66 66 65 72 73 2e 6e 6f 69 73 65 4d 61 73 6b 42 75 66 66 65 72 29 3b 0d 0a 20 20 20 20 | dBuffers.noiseMaskBuffer);...... |
| 3940 | 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 41 73 73 69 | ........}................//.Assi |
| 3960 | 67 6e 20 73 74 61 74 65 20 62 6c 6f 63 6b 73 2e 20 54 68 69 73 20 69 73 20 77 68 65 72 65 20 64 | gn.state.blocks..This.is.where.d |
| 3980 | 65 76 69 63 65 73 20 77 69 6c 6c 20 72 65 63 65 69 76 65 20 74 68 65 69 72 20 75 70 64 61 74 65 | evices.will.receive.their.update |
| 39a0 | 73 20 73 74 61 74 65 20 6f 66 66 73 65 74 73 2e 20 55 70 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | s.state.offsets..Up............. |
| 39c0 | 20 2f 2f 20 75 6e 74 69 6c 20 6e 6f 77 20 77 65 27 76 65 20 6c 65 66 74 20 61 6e 79 20 70 72 65 | .//.until.now.we've.left.any.pre |
| 39e0 | 76 69 6f 75 73 20 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 73 20 61 6c 6f 6e 65 2e 0d 0a 20 20 20 20 | vious.m_StateBlocks.alone....... |
| 3a00 | 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 4f 66 66 73 65 74 20 3d 20 30 75 3b 0d 0a 20 20 20 | ........var.newOffset.=.0u;..... |
| 3a20 | 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 64 65 76 | .........for.(var.i.=.0;.i.<.dev |
| 3a40 | 69 63 65 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | iceCount;.++i)..............{... |
| 3a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 64 65 76 69 | ...............var.device.=.devi |
| 3a80 | 63 65 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c 64 | ces[i];..................var.old |
| 3aa0 | 4f 66 66 73 65 74 20 3d 20 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 | Offset.=.device.m_StateBlock.byt |
| 3ac0 | 65 4f 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | eOffset;....................if.( |
| 3ae0 | 6f 6c 64 4f 66 66 73 65 74 20 3d 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 | oldOffset.==.InputStateBlock.Inv |
| 3b00 | 61 6c 69 64 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | alidOffset)..................{.. |
| 3b20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 76 69 63 65 20 69 73 | ....................//.Device.is |
| 3b40 | 20 6e 65 77 20 61 6e 64 20 68 61 73 20 6e 6f 20 6f 66 66 73 65 74 20 79 65 74 20 62 61 6b 65 64 | .new.and.has.no.offset.yet.baked |
| 3b60 | 20 69 6e 74 6f 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 | .into.it.......................d |
| 3b80 | 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 20 3d 20 | evice.m_StateBlock.byteOffset.=. |
| 3ba0 | 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 77 4f | 0;......................if.(newO |
| 3bc0 | 66 66 73 65 74 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ffset.!=.0)..................... |
| 3be0 | 20 20 20 20 20 64 65 76 69 63 65 2e 42 61 6b 65 4f 66 66 73 65 74 49 6e 74 6f 53 74 61 74 65 42 | .....device.BakeOffsetIntoStateB |
| 3c00 | 6c 6f 63 6b 52 65 63 75 72 73 69 76 65 28 6e 65 77 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 | lockRecursive(newOffset);....... |
| 3c20 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c | ...........}..................el |
| 3c40 | 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | se..................{........... |
| 3c60 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 76 69 63 65 20 69 73 20 6e 6f 74 20 6e 65 77 20 | ...........//.Device.is.not.new. |
| 3c80 | 61 6e 64 20 73 74 69 6c 6c 20 68 61 73 20 69 74 73 20 6f 6c 64 20 6f 66 66 73 65 74 20 62 61 6b | and.still.has.its.old.offset.bak |
| 3ca0 | 65 64 20 69 6e 74 6f 20 69 74 2e 20 57 65 20 63 6f 75 6c 64 20 66 69 72 73 74 20 75 6e 62 61 6b | ed.into.it..We.could.first.unbak |
| 3cc0 | 65 20 74 68 65 20 6f 6c 64 20 6f 66 66 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | e.the.old.offset................ |
| 3ce0 | 20 20 20 20 20 20 2f 2f 20 61 6e 64 20 74 68 65 6e 20 62 61 6b 65 20 74 68 65 20 6e 65 77 20 6f | ......//.and.then.bake.the.new.o |
| 3d00 | 6e 65 20 62 75 74 20 69 6e 73 74 65 61 64 20 6a 75 73 74 20 62 61 6b 65 20 61 20 72 65 6c 61 74 | ne.but.instead.just.bake.a.relat |
| 3d20 | 69 76 65 20 6f 66 66 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ive.offset...................... |
| 3d40 | 20 76 61 72 20 64 65 6c 74 61 20 3d 20 6e 65 77 4f 66 66 73 65 74 20 2d 20 6f 6c 64 4f 66 66 73 | .var.delta.=.newOffset.-.oldOffs |
| 3d60 | 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 6c | et;......................if.(del |
| 3d80 | 74 61 20 21 3d 20 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 | ta.!=.0)........................ |
| 3da0 | 20 20 64 65 76 69 63 65 2e 42 61 6b 65 4f 66 66 73 65 74 49 6e 74 6f 53 74 61 74 65 42 6c 6f 63 | ..device.BakeOffsetIntoStateBloc |
| 3dc0 | 6b 52 65 63 75 72 73 69 76 65 28 64 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | kRecursive(delta);.............. |
| 3de0 | 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 44 65 62 75 67 2e 41 | ....}....................Debug.A |
| 3e00 | 73 73 65 72 74 28 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 | ssert(device.m_StateBlock.byteOf |
| 3e20 | 66 73 65 74 20 3d 3d 20 6e 65 77 4f 66 66 73 65 74 2c 20 22 44 65 76 69 63 65 20 73 74 61 74 65 | fset.==.newOffset,."Device.state |
| 3e40 | 20 6f 66 66 73 65 74 20 6e 6f 74 20 73 65 74 20 63 6f 72 72 65 63 74 6c 79 22 29 3b 0d 0a 0d 0a | .offset.not.set.correctly");.... |
| 3e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 4f 66 66 73 65 74 20 3d 20 4e 65 78 74 | ................newOffset.=.Next |
| 3e80 | 44 65 76 69 63 65 4f 66 66 73 65 74 28 6e 65 77 4f 66 66 73 65 74 2c 20 64 65 76 69 63 65 29 3b | DeviceOffset(newOffset,.device); |
| 3ea0 | 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 | ..............}..........}...... |
| 3ec0 | 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 4d 69 67 72 61 74 | ......private.static.void.Migrat |
| 3ee0 | 65 44 6f 75 62 6c 65 42 75 66 66 65 72 28 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 6e 65 77 42 | eDoubleBuffer(DoubleBuffers.newB |
| 3f00 | 75 66 66 65 72 2c 20 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 2c 20 69 6e | uffer,.InputDevice[].devices,.in |
| 3f20 | 74 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 44 6f 75 62 6c 65 42 75 66 66 65 72 73 20 6f 6c 64 | t.deviceCount,.DoubleBuffers.old |
| 3f40 | 42 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)..........{.............. |
| 3f60 | 2f 2f 20 4e 6f 74 68 69 6e 67 20 74 6f 20 6d 69 67 72 61 74 65 20 69 66 20 77 65 20 6e 6f 20 6c | //.Nothing.to.migrate.if.we.no.l |
| 3f80 | 6f 6e 67 65 72 20 6b 65 65 70 20 61 20 62 75 66 66 65 72 20 6f 66 20 74 68 65 20 63 6f 72 72 65 | onger.keep.a.buffer.of.the.corre |
| 3fa0 | 73 70 6f 6e 64 69 6e 67 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | sponding.type...............if.( |
| 3fc0 | 21 6e 65 77 42 75 66 66 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | !newBuffer.valid)............... |
| 3fe0 | 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 57 65 20 | ...return;................//.We. |
| 4000 | 64 6f 20 74 68 65 20 73 61 6d 65 20 69 66 20 77 65 20 64 6f 6e 27 74 20 68 61 64 20 61 20 63 6f | do.the.same.if.we.don't.had.a.co |
| 4020 | 72 72 65 73 70 6f 6e 64 69 6e 67 20 62 75 66 66 65 72 20 62 65 66 6f 72 65 2e 0d 0a 20 20 20 20 | rresponding.buffer.before....... |
| 4040 | 20 20 20 20 20 20 20 20 69 66 20 28 21 6f 6c 64 42 75 66 66 65 72 2e 76 61 6c 69 64 29 0d 0a 20 | ........if.(!oldBuffer.valid)... |
| 4060 | 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 20 | ...............return;.......... |
| 4080 | 20 20 20 20 20 20 2f 2f 20 4d 69 67 72 61 74 65 20 65 76 65 72 79 20 64 65 76 69 63 65 20 74 68 | ......//.Migrate.every.device.th |
| 40a0 | 61 74 20 68 61 73 20 61 6c 6c 6f 63 61 74 65 64 20 73 74 61 74 65 20 62 6c 6f 63 6b 73 2e 0d 0a | at.has.allocated.state.blocks... |
| 40c0 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 | ............var.newStateBlockOff |
| 40e0 | 73 65 74 20 3d 20 30 75 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 | set.=.0u;..............for.(var. |
| 4100 | 69 20 3d 20 30 3b 20 69 20 3c 20 64 65 76 69 63 65 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 | i.=.0;.i.<.deviceCount;.++i).... |
| 4120 | 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 |
| 4140 | 20 64 65 76 69 63 65 20 3d 20 64 65 76 69 63 65 73 5b 69 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 | .device.=.devices[i];........... |
| 4160 | 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 70 20 61 73 20 73 6f 6f 6e 20 61 73 20 77 65 27 72 | .........//.Stop.as.soon.as.we'r |
| 4180 | 65 20 68 69 74 74 69 6e 67 20 61 20 6e 65 77 20 64 65 76 69 63 65 2e 20 4e 65 77 6c 79 20 61 64 | e.hitting.a.new.device..Newly.ad |
| 41a0 | 64 65 64 20 64 65 76 69 63 65 73 20 2a 6d 75 73 74 2a 20 62 65 20 2a 61 70 70 65 6e 64 65 64 2a | ded.devices.*must*.be.*appended* |
| 41c0 | 20 74 6f 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 72 72 61 | .to.the..................//.arra |
| 41e0 | 79 20 61 73 20 6f 74 68 65 72 77 69 73 65 20 6f 75 72 20 63 6f 6d 70 75 74 69 6e 67 20 6f 66 20 | y.as.otherwise.our.computing.of. |
| 4200 | 6f 66 66 73 65 74 73 20 69 6e 74 6f 20 74 68 65 20 6f 6c 64 20 62 75 66 66 65 72 20 6d 61 79 20 | offsets.into.the.old.buffer.may. |
| 4220 | 62 65 20 77 72 6f 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f | be.wrong...................//.NO |
| 4240 | 54 45 3a 20 54 68 69 73 20 61 6c 73 6f 20 6d 65 61 6e 73 20 74 68 61 74 20 64 65 76 69 63 65 20 | TE:.This.also.means.that.device. |
| 4260 | 69 6e 64 69 63 65 73 20 6f 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | indices.of..................if.( |
| 4280 | 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 20 3d | device.m_StateBlock.byteOffset.= |
| 42a0 | 3d 20 49 6e 70 75 74 53 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 29 | =.InputStateBlock.InvalidOffset) |
| 42c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 42e0 | 20 20 20 20 20 20 20 20 20 23 69 66 20 44 45 56 45 4c 4f 50 4d 45 4e 54 5f 42 55 49 4c 44 20 7c | .........#if.DEVELOPMENT_BUILD.| |
| 4300 | 7c 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |.UNITY_EDITOR.................. |
| 4320 | 20 20 20 20 66 6f 72 20 28 76 61 72 20 6e 20 3d 20 69 20 2b 20 31 3b 20 6e 20 3c 20 64 65 76 69 | ....for.(var.n.=.i.+.1;.n.<.devi |
| 4340 | 63 65 43 6f 75 6e 74 3b 20 2b 2b 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ceCount;.++n)................... |
| 4360 | 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 64 65 76 69 63 65 73 5b 6e 5d 2e 6d | .......Debug.Assert(devices[n].m |
| 4380 | 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 20 3d 3d 20 49 6e 70 75 74 53 | _StateBlock.byteOffset.==.InputS |
| 43a0 | 74 61 74 65 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 2c 0d 0a 20 20 20 20 20 20 | tateBlock.InvalidOffset,........ |
| 43c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 4e 65 77 20 64 65 76 69 63 | ......................"New.devic |
| 43e0 | 65 73 20 6d 75 73 74 20 62 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 65 20 61 72 72 61 79 | es.must.be.appended.to.the.array |
| 4400 | 3b 20 66 6f 75 6e 64 20 61 6e 20 6f 6c 64 20 64 65 76 69 63 65 20 63 6f 6d 69 6e 67 20 69 6e 20 | ;.found.an.old.device.coming.in. |
| 4420 | 74 68 65 20 61 72 72 61 79 20 61 66 74 65 72 20 61 20 6e 65 77 6c 79 20 61 64 64 65 64 20 64 65 | the.array.after.a.newly.added.de |
| 4440 | 76 69 63 65 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 23 65 6e | vice");......................#en |
| 4460 | 64 69 66 0d 0a 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 | dif......................break;. |
| 4480 | 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 | .................}.............. |
| 44a0 | 20 20 20 20 20 20 76 61 72 20 6f 6c 64 44 65 76 69 63 65 49 6e 64 65 78 20 3d 20 64 65 76 69 63 | ......var.oldDeviceIndex.=.devic |
| 44c0 | 65 2e 6d 5f 44 65 76 69 63 65 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | e.m_DeviceIndex;................ |
| 44e0 | 20 20 76 61 72 20 6e 65 77 44 65 76 69 63 65 49 6e 64 65 78 20 3d 20 69 3b 0d 0a 20 20 20 20 20 | ..var.newDeviceIndex.=.i;....... |
| 4500 | 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 75 6d 42 79 74 65 73 20 3d 20 64 65 76 69 63 65 | ...........var.numBytes.=.device |
| 4520 | 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 61 6c 69 67 6e 65 64 53 69 7a 65 49 6e 42 79 74 65 73 | .m_StateBlock.alignedSizeInBytes |
| 4540 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c 64 46 72 6f 6e | ;....................var.oldFron |
| 4560 | 74 50 74 72 20 3d 20 28 62 79 74 65 2a 29 6f 6c 64 42 75 66 66 65 72 2e 47 65 74 46 72 6f 6e 74 | tPtr.=.(byte*)oldBuffer.GetFront |
| 4580 | 42 75 66 66 65 72 28 6f 6c 64 44 65 76 69 63 65 49 6e 64 65 78 29 20 2b 20 28 69 6e 74 29 64 65 | Buffer(oldDeviceIndex).+.(int)de |
| 45a0 | 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 3b 20 2f 2f | vice.m_StateBlock.byteOffset;.// |
| 45c0 | 20 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 20 73 74 69 6c 6c 20 72 65 66 65 72 73 20 74 6f 20 6f 6c | .m_StateBlock.still.refers.to.ol |
| 45e0 | 64 42 75 66 66 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c | dBuffer...................var.ol |
| 4600 | 64 42 61 63 6b 50 74 72 20 3d 20 28 62 79 74 65 2a 29 6f 6c 64 42 75 66 66 65 72 2e 47 65 74 42 | dBackPtr.=.(byte*)oldBuffer.GetB |
| 4620 | 61 63 6b 42 75 66 66 65 72 28 6f 6c 64 44 65 76 69 63 65 49 6e 64 65 78 29 20 2b 20 28 69 6e 74 | ackBuffer(oldDeviceIndex).+.(int |
| 4640 | 29 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 3b | )device.m_StateBlock.byteOffset; |
| 4660 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 46 72 6f 6e 74 | ....................var.newFront |
| 4680 | 50 74 72 20 3d 20 28 62 79 74 65 2a 29 6e 65 77 42 75 66 66 65 72 2e 47 65 74 46 72 6f 6e 74 42 | Ptr.=.(byte*)newBuffer.GetFrontB |
| 46a0 | 75 66 66 65 72 28 6e 65 77 44 65 76 69 63 65 49 6e 64 65 78 29 20 2b 20 28 69 6e 74 29 6e 65 77 | uffer(newDeviceIndex).+.(int)new |
| 46c0 | 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | StateBlockOffset;............... |
| 46e0 | 20 20 20 76 61 72 20 6e 65 77 42 61 63 6b 50 74 72 20 3d 20 28 62 79 74 65 2a 29 6e 65 77 42 75 | ...var.newBackPtr.=.(byte*)newBu |
| 4700 | 66 66 65 72 2e 47 65 74 42 61 63 6b 42 75 66 66 65 72 28 6e 65 77 44 65 76 69 63 65 49 6e 64 65 | ffer.GetBackBuffer(newDeviceInde |
| 4720 | 78 29 20 2b 20 28 69 6e 74 29 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 65 74 3b 0d 0a | x).+.(int)newStateBlockOffset;.. |
| 4740 | 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 20 73 74 61 74 65 2e | ..................//.Copy.state. |
| 4760 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 73 61 66 65 55 74 69 6c 69 74 79 2e | ..................UnsafeUtility. |
| 4780 | 4d 65 6d 43 70 79 28 6e 65 77 46 72 6f 6e 74 50 74 72 2c 20 6f 6c 64 46 72 6f 6e 74 50 74 72 2c | MemCpy(newFrontPtr,.oldFrontPtr, |
| 47a0 | 20 6e 75 6d 42 79 74 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 73 | .numBytes);..................Uns |
| 47c0 | 61 66 65 55 74 69 6c 69 74 79 2e 4d 65 6d 43 70 79 28 6e 65 77 42 61 63 6b 50 74 72 2c 20 6f 6c | afeUtility.MemCpy(newBackPtr,.ol |
| 47e0 | 64 42 61 63 6b 50 74 72 2c 20 6e 75 6d 42 79 74 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | dBackPtr,.numBytes);............ |
| 4800 | 20 20 20 20 20 20 20 20 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 65 74 20 3d 20 4e 65 | ........newStateBlockOffset.=.Ne |
| 4820 | 78 74 44 65 76 69 63 65 4f 66 66 73 65 74 28 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 | xtDeviceOffset(newStateBlockOffs |
| 4840 | 65 74 2c 20 64 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 | et,.device);..............}..... |
| 4860 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 | .....}............private.static |
| 4880 | 20 76 6f 69 64 20 4d 69 67 72 61 74 65 53 69 6e 67 6c 65 42 75 66 66 65 72 28 76 6f 69 64 2a 20 | .void.MigrateSingleBuffer(void*. |
| 48a0 | 6e 65 77 42 75 66 66 65 72 2c 20 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 | newBuffer,.InputDevice[].devices |
| 48c0 | 2c 20 69 6e 74 20 64 65 76 69 63 65 43 6f 75 6e 74 2c 20 76 6f 69 64 2a 20 6f 6c 64 42 75 66 66 | ,.int.deviceCount,.void*.oldBuff |
| 48e0 | 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 2f 2f 20 4d | er)..........{..............//.M |
| 4900 | 69 67 72 61 74 65 20 65 76 65 72 79 20 64 65 76 69 63 65 20 74 68 61 74 20 68 61 73 20 61 6c 6c | igrate.every.device.that.has.all |
| 4920 | 6f 63 61 74 65 64 20 73 74 61 74 65 20 62 6c 6f 63 6b 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | ocated.state.blocks............. |
| 4940 | 20 20 76 61 72 20 6e 65 77 44 65 76 69 63 65 43 6f 75 6e 74 20 3d 20 64 65 76 69 63 65 43 6f 75 | ..var.newDeviceCount.=.deviceCou |
| 4960 | 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 53 74 61 74 65 42 6c 6f | nt;..............var.newStateBlo |
| 4980 | 63 6b 4f 66 66 73 65 74 20 3d 20 30 75 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 | ckOffset.=.0u;..............for. |
| 49a0 | 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6e 65 77 44 65 76 69 63 65 43 6f 75 6e 74 3b 20 | (var.i.=.0;.i.<.newDeviceCount;. |
| 49c0 | 2b 2b 69 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 | ++i)..............{............. |
| 49e0 | 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 64 65 76 69 63 65 73 5b 69 5d 3b 0d 0a 0d | .....var.device.=.devices[i];... |
| 4a00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 70 20 69 66 20 77 65 27 76 | .................//.Stop.if.we'v |
| 4a20 | 65 20 72 65 61 63 68 65 64 20 6e 65 77 6c 79 20 61 64 64 65 64 20 64 65 76 69 63 65 73 2e 0d 0a | e.reached.newly.added.devices... |
| 4a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 76 69 63 65 2e 6d 5f 53 74 61 | ................if.(device.m_Sta |
| 4a60 | 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 20 3d 3d 20 49 6e 70 75 74 53 74 61 74 65 | teBlock.byteOffset.==.InputState |
| 4a80 | 42 6c 6f 63 6b 2e 49 6e 76 61 6c 69 64 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | Block.InvalidOffset)............ |
| 4aa0 | 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..........break;................ |
| 4ac0 | 20 20 20 20 76 61 72 20 6e 75 6d 42 79 74 65 73 20 3d 20 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 | ....var.numBytes.=.device.m_Stat |
| 4ae0 | 65 42 6c 6f 63 6b 2e 61 6c 69 67 6e 65 64 53 69 7a 65 49 6e 42 79 74 65 73 3b 0d 0a 20 20 20 20 | eBlock.alignedSizeInBytes;...... |
| 4b00 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c 64 53 74 61 74 65 50 74 72 20 3d 20 28 62 | ............var.oldStatePtr.=.(b |
| 4b20 | 79 74 65 2a 29 6f 6c 64 42 75 66 66 65 72 20 2b 20 28 69 6e 74 29 64 65 76 69 63 65 2e 6d 5f 53 | yte*)oldBuffer.+.(int)device.m_S |
| 4b40 | 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 | tateBlock.byteOffset;........... |
| 4b60 | 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 53 74 61 74 65 50 74 72 20 3d 20 28 62 79 74 65 2a 29 | .......var.newStatePtr.=.(byte*) |
| 4b80 | 6e 65 77 42 75 66 66 65 72 20 2b 20 28 69 6e 74 29 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 | newBuffer.+.(int)newStateBlockOf |
| 4ba0 | 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 73 61 66 65 55 | fset;....................UnsafeU |
| 4bc0 | 74 69 6c 69 74 79 2e 4d 65 6d 43 70 79 28 6e 65 77 53 74 61 74 65 50 74 72 2c 20 6f 6c 64 53 74 | tility.MemCpy(newStatePtr,.oldSt |
| 4be0 | 61 74 65 50 74 72 2c 20 6e 75 6d 42 79 74 65 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | atePtr,.numBytes);.............. |
| 4c00 | 20 20 20 20 20 20 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 65 74 20 3d 20 4e 65 78 74 | ......newStateBlockOffset.=.Next |
| 4c20 | 44 65 76 69 63 65 4f 66 66 73 65 74 28 6e 65 77 53 74 61 74 65 42 6c 6f 63 6b 4f 66 66 73 65 74 | DeviceOffset(newStateBlockOffset |
| 4c40 | 2c 20 64 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 | ,.device);..............}....... |
| 4c60 | 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 75 | ...}............private.static.u |
| 4c80 | 69 6e 74 20 43 6f 6d 70 75 74 65 53 69 7a 65 4f 66 53 69 6e 67 6c 65 53 74 61 74 65 42 75 66 66 | int.ComputeSizeOfSingleStateBuff |
| 4ca0 | 65 72 28 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 2c 20 69 6e 74 20 64 65 | er(InputDevice[].devices,.int.de |
| 4cc0 | 76 69 63 65 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | viceCount)..........{........... |
| 4ce0 | 20 20 20 76 61 72 20 73 69 7a 65 49 6e 42 79 74 65 73 20 3d 20 30 75 3b 0d 0a 20 20 20 20 20 20 | ...var.sizeInBytes.=.0u;........ |
| 4d00 | 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 64 65 76 69 63 65 | ......for.(var.i.=.0;.i.<.device |
| 4d20 | 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 69 7a | Count;.++i)..................siz |
| 4d40 | 65 49 6e 42 79 74 65 73 20 3d 20 4e 65 78 74 44 65 76 69 63 65 4f 66 66 73 65 74 28 73 69 7a 65 | eInBytes.=.NextDeviceOffset(size |
| 4d60 | 49 6e 42 79 74 65 73 2c 20 64 65 76 69 63 65 73 5b 69 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | InBytes,.devices[i]);........... |
| 4d80 | 20 20 20 72 65 74 75 72 6e 20 73 69 7a 65 49 6e 42 79 74 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 | ...return.sizeInBytes;.......... |
| 4da0 | 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 75 69 6e 74 | }............private.static.uint |
| 4dc0 | 20 4e 65 78 74 44 65 76 69 63 65 4f 66 66 73 65 74 28 75 69 6e 74 20 63 75 72 72 65 6e 74 4f 66 | .NextDeviceOffset(uint.currentOf |
| 4de0 | 66 73 65 74 2c 20 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 29 0d 0a 20 20 20 20 20 | fset,.InputDevice.device)....... |
| 4e00 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 69 7a 65 4f 66 44 65 76 69 | ...{..............var.sizeOfDevi |
| 4e20 | 63 65 20 3d 20 64 65 76 69 63 65 2e 6d 5f 53 74 61 74 65 42 6c 6f 63 6b 2e 61 6c 69 67 6e 65 64 | ce.=.device.m_StateBlock.aligned |
| 4e40 | 53 69 7a 65 49 6e 42 79 74 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 69 | SizeInBytes;..............if.(si |
| 4e60 | 7a 65 4f 66 44 65 76 69 63 65 20 3d 3d 20 30 29 20 2f 2f 20 53 68 6f 75 6c 64 6e 27 74 20 68 61 | zeOfDevice.==.0).//.Shouldn't.ha |
| 4e80 | 70 70 65 6e 20 61 73 20 77 65 20 64 6f 6e 27 74 20 61 6c 6c 6f 77 20 65 6d 70 74 79 20 6c 61 79 | ppen.as.we.don't.allow.empty.lay |
| 4ea0 | 6f 75 74 73 20 62 75 74 20 6d 61 6b 65 20 73 75 72 65 20 77 65 20 63 61 74 63 68 20 74 68 69 73 | outs.but.make.sure.we.catch.this |
| 4ec0 | 20 69 66 20 73 6f 6d 65 74 68 69 6e 67 20 73 6c 69 70 73 20 74 68 72 6f 75 67 68 2e 0d 0a 20 20 | .if.something.slips.through..... |
| 4ee0 | 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 |
| 4f00 | 45 78 63 65 70 74 69 6f 6e 28 24 22 44 65 76 69 63 65 20 27 7b 64 65 76 69 63 65 7d 27 20 68 61 | Exception($"Device.'{device}'.ha |
| 4f20 | 73 20 61 20 7a 65 72 6f 2d 73 69 7a 65 20 73 74 61 74 65 20 62 75 66 66 65 72 22 2c 20 6e 61 6d | s.a.zero-size.state.buffer",.nam |
| 4f40 | 65 6f 66 28 64 65 76 69 63 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | eof(device));..............retur |
| 4f60 | 6e 20 63 75 72 72 65 6e 74 4f 66 66 73 65 74 20 2b 20 73 69 7a 65 4f 66 44 65 76 69 63 65 2e 41 | n.currentOffset.+.sizeOfDevice.A |
| 4f80 | 6c 69 67 6e 54 6f 4d 75 6c 74 69 70 6c 65 4f 66 28 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d | lignToMultipleOf(4);..........}. |
| 4fa0 | 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....}..}....................... |
| 4fc0 | 11 00 00 00 49 6e 70 75 74 53 74 61 74 65 42 75 66 66 65 72 73 00 00 00 00 00 00 00 | ....InputStateBuffers....... |