Commit 6153519
fix: RPC metrics name table is empty (#3782)
* fix
Improving our defines that determine if metrics should be gathered.
1st pass attempt at unifying this process.
The primary change is that if the __rpc_name_table is not built (yet) when an RPC is invoked that it will attempt to build it for that specific NetworkBehaviour prior to attempting to log RPC metrics.
* fix
Missed one set of defines check.
* fix
Removing reference to NetworkBehaviour.__rpc_name_table as it is not used any longer within the codegen process.
* fix
Some additional areas in codegen that requires the extended define wrap.
Wrapping the RPC invocation tests (we will need to find a better way to get the name for this test).
* refactor
Making sure we still have the NetworkManager.__rpc_name_table as that has become part of the public API.
* fix
This fixes the issue with invoking RPCs on other child NetworkBehaviours during OnNetworkSpawn.
* test
Adding a test to validate this specific issue is fixed.
* style
Removing trailing whitespace.
* update
Marking newly added methods for aggressive in-lining.
* update
Adding change log entry.
* style
Fixing a comment.
Adding additional comments.
* style
Making sure the correct ValidateRpcMessageMetrics name is used when logging an error.
* style
Updated and added some comments to the region of code that contains the primary fix.
* fix
Adding target client that is being sent to.
* update
Adding AggressiveInlining to updated method.
---------
Co-authored-by: Unity Netcode CI <[email protected]>
Co-authored-by: Noellie Vélez <[email protected]>1 parent 3f91fbc commit 6153519
File tree
15 files changed
+275
-89
lines changed- com.unity.netcode.gameobjects
- Editor/CodeGen
- Runtime
- Core
- Messaging
- Messages
- RpcTargets
- Tests/Runtime/Rpc
15 files changed
+275
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | 598 | | |
600 | | - | |
601 | 599 | | |
602 | 600 | | |
603 | 601 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
Lines changed: 128 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
| |||
275 | 269 | | |
276 | 270 | | |
277 | 271 | | |
278 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
279 | 277 | | |
280 | 278 | | |
281 | 279 | | |
| |||
755 | 753 | | |
756 | 754 | | |
757 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
| |||
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
785 | 796 | | |
786 | 797 | | |
787 | 798 | | |
788 | | - | |
| 799 | + | |
789 | 800 | | |
| 801 | + | |
790 | 802 | | |
| 803 | + | |
791 | 804 | | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
792 | 810 | | |
793 | 811 | | |
794 | 812 | | |
| |||
799 | 817 | | |
800 | 818 | | |
801 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
802 | 823 | | |
803 | 824 | | |
804 | 825 | | |
| |||
819 | 840 | | |
820 | 841 | | |
821 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
822 | 846 | | |
823 | 847 | | |
824 | 848 | | |
| |||
832 | 856 | | |
833 | 857 | | |
834 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
835 | 862 | | |
836 | 863 | | |
837 | 864 | | |
| |||
844 | 871 | | |
845 | 872 | | |
846 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
847 | 877 | | |
848 | 878 | | |
849 | 879 | | |
| |||
863 | 893 | | |
864 | 894 | | |
865 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
866 | 899 | | |
867 | 900 | | |
868 | 901 | | |
| |||
965 | 998 | | |
966 | 999 | | |
967 | 1000 | | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
972 | 1006 | | |
973 | 1007 | | |
974 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
975 | 1085 | | |
976 | 1086 | | |
977 | 1087 | | |
| |||
1014 | 1124 | | |
1015 | 1125 | | |
1016 | 1126 | | |
1017 | | - | |
| 1127 | + | |
1018 | 1128 | | |
1019 | 1129 | | |
1020 | 1130 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2556 | 2556 | | |
2557 | 2557 | | |
2558 | 2558 | | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
2559 | 2565 | | |
2560 | 2566 | | |
2561 | 2567 | | |
| |||
2565 | 2571 | | |
2566 | 2572 | | |
2567 | 2573 | | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
2568 | 2585 | | |
2569 | 2586 | | |
2570 | 2587 | | |
| |||
2578 | 2595 | | |
2579 | 2596 | | |
2580 | 2597 | | |
2581 | | - | |
2582 | 2598 | | |
2583 | 2599 | | |
2584 | 2600 | | |
| |||
Lines changed: 2 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 43 | + | |
| 44 | + | |
54 | 45 | | |
55 | 46 | | |
56 | 47 | | |
| |||
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
70 | 59 | | |
71 | 60 | | |
72 | 61 | | |
| |||
0 commit comments