Skip to content

Commit d65f4b1

Browse files
committed
feat(editor): Added tooltips to NetworkConfig properties
1 parent af3d032 commit d65f4b1

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

MLAPI/Data/NetworkConfig.cs

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,105 +19,123 @@ public class NetworkConfig
1919
/// <summary>
2020
/// The protocol version. Different versions doesn't talk to each other.
2121
/// </summary>
22+
[Tooltip("Use this to make two builds incompatible with each other")]
2223
public ushort ProtocolVersion = 0;
2324
/// <summary>
2425
/// The transport hosts the sever uses
2526
/// </summary>
27+
[Tooltip("The NetworkTransport to use")]
2628
public Transport NetworkTransport = null;
2729
/// <summary>
2830
/// A list of SceneNames that can be used during networked games.
2931
/// </summary>
30-
[HideInInspector]
32+
[Tooltip("The Scenes that can be switched to by the server")]
3133
public List<string> RegisteredScenes = new List<string>();
3234
/// <summary>
3335
/// A list of spawnable prefabs
3436
/// </summary>
35-
[HideInInspector]
37+
[Tooltip("The prefabs that can be spawned across the network")]
3638
public List<NetworkedPrefab> NetworkedPrefabs = new List<NetworkedPrefab>();
3739
/// <summary>
3840
/// The default player prefab
3941
/// </summary>
4042
[SerializeField]
41-
[HideInInspector]
4243
internal ulong PlayerPrefabHash;
4344
/// <summary>
4445
/// Amount of times per second the receive queue is emptied and all messages inside are processed.
4546
/// </summary>
47+
[Tooltip("The amount of times per second the receive queue is emptied from pending incoming messages")]
4648
public int ReceiveTickrate = 64;
4749
/// <summary>
4850
/// The max amount of messages to process per ReceiveTickrate. This is to prevent flooding.
4951
/// </summary>
52+
[Tooltip("The maximum amount of Receive events to poll per Receive tick. This is to prevent flooding and freezing on the server")]
5053
public int MaxReceiveEventsPerTickRate = 500;
5154
/// <summary>
5255
/// The amount of times per second every pending message will be sent away.
5356
/// </summary>
57+
[Tooltip("The amount of times per second the pending messages are sent")]
5458
public int SendTickrate = 64;
5559
/// <summary>
5660
/// The amount of times per second internal frame events will occur, examples include SyncedVar send checking.
5761
/// </summary>
62+
[Tooltip("The amount of times per second the internal event loop will run. This includes for example SyncedVar checking and LagCompensation tracking")]
5863
public int EventTickrate = 64;
5964
/// <summary>
6065
/// The maximum amount of NetworkedBehaviour's to process per tick.
6166
/// This is useful to prevent the MLAPI from hanging a frame
6267
/// Set this to less than or equal to 0 for unlimited
6368
/// </summary>
69+
[Tooltip("The maximum amount of NetworkedBehaviour SyncedVars to process per Event tick. This is to prevent freezing")]
6470
public int MaxBehaviourUpdatesPerTick = -1;
6571
/// <summary>
6672
/// The amount of seconds to wait for handshake to complete before timing out a client
6773
/// </summary>
74+
[Tooltip("The amount of seconds to wait for the handshake to complete before the client times out")]
6875
public int ClientConnectionBufferTimeout = 10;
6976
/// <summary>
7077
/// Wheter or not to use connection approval
7178
/// </summary>
79+
[Tooltip("Whether or not to force clients to be approved before they connect")]
7280
public bool ConnectionApproval = false;
7381
/// <summary>
7482
/// The data to send during connection which can be used to decide on if a client should get accepted
7583
/// </summary>
76-
[HideInInspector]
84+
[Tooltip("The connection data sent along with connection requests")]
7785
public byte[] ConnectionData = new byte[0];
7886
/// <summary>
7987
/// The amount of seconds to keep a lag compensation position history
8088
/// </summary>
89+
[Tooltip("The amount of seconds to keep lag compensation position history")]
8190
public int SecondsHistory = 5;
8291
/// <summary>
8392
/// If your logic uses the NetworkedTime, this should probably be turned off. If however it's needed to maximize accuracy, this is recommended to be turned on
8493
/// </summary>
94+
[Tooltip("Enable this to resync the NetworkedTime after the initial sync")]
8595
public bool EnableTimeResync = false;
8696
/// <summary>
8797
/// Whether or not to enable the NetworkedVar system. This system runs in the Update loop and will degrade performance, but it can be a huge convenience.
8898
/// Only turn it off if you have no need for the NetworkedVar system.
8999
/// </summary>
100+
[Tooltip("Whether or not to enable the NetworkedVar system")]
90101
public bool EnableNetworkedVar = true;
91102
/// <summary>
92103
/// Wheter or not the MLAPI should check for differences in the prefabs at connection.
93104
/// If you dynamically add prefabs at runtime, turn this OFF
94105
/// </summary>
106+
[Tooltip("Whether or not the MLAPI should check for differences in the prefab lists at connection")]
95107
public bool ForceSamePrefabs = true;
96108
/// <summary>
97109
/// If true, all NetworkedObject's need to be prefabs and all scene objects will be replaced on server side which causes all serialization to be lost. Useful for multi project setups
98110
/// If false, Only non scene objects have to be prefabs. Scene objects will be matched using their PrefabInstanceId which can be precomputed globally for a scene at build time. Useful for single projects
99111
/// </summary>
112+
[Tooltip("If true, all NetworkedObject's need to be prefabs and all scene objects will be replaced on server side which causes all serialization to be lost. Useful for multi project setups\n" +
113+
"If false, Only non scene objects have to be prefabs. Scene objects will be matched using their PrefabInstanceId which can be precomputed globally for a scene at build time. Useful for single projects")]
100114
public bool UsePrefabSync = false;
101115
/// <summary>
102116
/// Decides how many bytes to use for Rpc messaging. Leave this to 2 bytes unless you are facing hash collisions
103117
/// </summary>
118+
[Tooltip("The maximum amount of bytes to use for RPC messages. Leave this to 2 unless you are facing hash collisions")]
104119
public HashSize RpcHashSize = HashSize.VarIntTwoBytes;
105120
/// <summary>
106-
/// Wheter or not to enable encryption
107121
/// The amount of seconds to wait on all clients to load requested scene before the SwitchSceneProgress onComplete callback, that waits for all clients to complete loading, is called anyway.
108122
/// </summary>
123+
[Tooltip("The amount of seconds to wait for all clients to load a requested scene")]
109124
public int LoadSceneTimeOut = 120;
110125
/// <summary>
111126
/// Wheter or not to enable the ECDHE key exchange to allow for encryption and authentication of messages
112127
/// </summary>
128+
[Tooltip("Whether or not to enable the ECDHE key exchange to allow for encryption and authentication of messages")]
113129
public bool EnableEncryption = false;
114130
/// <summary>
115131
/// Wheter or not to enable signed diffie hellman key exchange.
116132
/// </summary>
133+
[Tooltip("Whether or not to sign the diffie hellman key exchange to prevent MITM attacks on")]
117134
public bool SignKeyExchange = false;
118135
/// <summary>
119136
/// Pfx file in base64 encoding containing private and public key
120137
/// </summary>
138+
[Tooltip("The certificate in base64 encoded PFX format")]
121139
[TextArea]
122140
public string ServerBase64PfxCertificate;
123141
/// <summary>

0 commit comments

Comments
 (0)