Skip to content

Commit bc6118d

Browse files
authored
Merge pull request #215 from MidLevel/mlapi-9
2 parents b0817e9 + ba7cff2 commit bc6118d

File tree

98 files changed

+4409
-4219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4409
-4219
lines changed

MLAPI-Editor/MLAPIProfiler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void StopRecording()
7676

7777
private void StartRecording()
7878
{
79-
if (NetworkProfiler.isRunning)
79+
if (NetworkProfiler.IsRunning)
8080
StopRecording();
8181

8282
if (NetworkProfiler.Ticks != null && NetworkProfiler.Ticks.Count >= 2)
@@ -97,15 +97,15 @@ private void ClearDrawing()
9797

9898
private void ChangeRecordState()
9999
{
100-
if (NetworkProfiler.isRunning) StopRecording();
100+
if (NetworkProfiler.IsRunning) StopRecording();
101101
else StartRecording();
102102
}
103103

104104
TickEvent eventHover = null;
105105
double lastSetup = 0;
106106
private void OnGUI()
107107
{
108-
bool recording = NetworkProfiler.isRunning;
108+
bool recording = NetworkProfiler.IsRunning;
109109
float deltaTime = (float)(EditorApplication.timeSinceStartup - lastSetup);
110110
lastSetup = EditorApplication.timeSinceStartup;
111111

@@ -174,7 +174,7 @@ private void OnGUI()
174174
if (prevHis != captureCount) StartRecording();
175175

176176
//Cache
177-
if (NetworkProfiler.isRunning)
177+
if (NetworkProfiler.IsRunning)
178178
{
179179
if (Time.unscaledTime - lastDrawn > updateDelay)
180180
{

MLAPI-Editor/TrackedObjectEditor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using MLAPI;
2+
using MLAPI.LagCompensation;
23

34
namespace UnityEditor
45
{

MLAPI-Examples/ConvenienceMessagingPermission.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using MLAPI;
2+
using MLAPI.Messaging;
23

34
namespace MLAPI_Examples
45
{

MLAPI-Examples/ConvenienceMessagingPing.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using MLAPI;
2+
using MLAPI.Messaging;
23
using UnityEngine;
34

45
namespace MLAPI_Examples

MLAPI-Examples/ManagerExamples.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using MLAPI;
2-
using MLAPI.Components;
3-
#if !DISABLE_CRYPTOGRAPHY
4-
using MLAPI.Cryptography;
5-
#endif
6-
using MLAPI.Data;
2+
using MLAPI.Connection;
3+
using MLAPI.Security;
4+
using MLAPI.Spawning;
75

86
namespace MLAPI_Examples
97
{

MLAPI-Examples/NetworkedBehaviourCallbacks.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,5 @@ public override void NetworkStart(Stream payload)
1212
// The NetWorkStart can be used with or without the "Stream payload" parameter
1313
// If it's included it will contain the payload included in the Spawn method if applicable.
1414
}
15-
16-
public override void OnEnabled()
17-
{
18-
// Use this instead of OnEnabled, that is because the OnEnable method is stolen by the NetworkedBehaviour class
19-
// Usage of OnEnable will throw a error pointing you to this method and WILL break the behaviour
20-
}
21-
22-
public override void OnDisabled()
23-
{
24-
// Use this instead of OnDisable, that is because the OnDisable method is stolen by the NetworkedBehaviour class
25-
// Usage of OnDisable will throw a error pointing you to this method and WILL break the behaviour
26-
}
27-
28-
public override void OnDestroyed()
29-
{
30-
// Use this instead of OnDestroy, that is because the OnDestroy method is stolen by the NetworkedBehaviour class
31-
// Usage of OnDestroy will throw a error pointing you to this method and WILL break the behaviour
32-
}
3315
}
3416
}

MLAPI-Tests/Data/HashCodeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
namespace MLAPI_Tests.Data
33
{
4-
using MLAPI.Data;
4+
using MLAPI.Hashing;
55
using NUnit.Framework;
66

77

File renamed without changes.

MLAPI/Configuration/HashSize.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace MLAPI.Configuration
2+
{
3+
/// <summary>
4+
/// Represents the length of a var int encoded hash
5+
/// Note that the HashSize does not say anything about the actual final output due to the var int encoding
6+
/// It just says how many bytes the maximum will be
7+
/// </summary>
8+
public enum HashSize
9+
{
10+
/// <summary>
11+
/// Two byte hash
12+
/// </summary>
13+
VarIntTwoBytes,
14+
/// <summary>
15+
/// Four byte hash
16+
/// </summary>
17+
VarIntFourBytes,
18+
/// <summary>
19+
/// Eight byte hash
20+
/// </summary>
21+
VarIntEightBytes
22+
}
23+
}

MLAPI/Data/MLAPIConstants.cs renamed to MLAPI/Configuration/MLAPIConstants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
namespace MLAPI.Data
1+
namespace MLAPI.Configuration
22
{
33
/// <summary>
44
/// A static class containing MLAPI constants
55
/// </summary>
66
internal static class MLAPIConstants
77
{
8-
internal const string MLAPI_PROTOCOL_VERSION = "6.0.1";
8+
internal const string MLAPI_PROTOCOL_VERSION = "9.0.0";
99

1010
internal const byte MLAPI_CERTIFICATE_HAIL = 0;
1111
internal const byte MLAPI_CERTIFICATE_HAIL_RESPONSE = 1;

0 commit comments

Comments
 (0)