Skip to content

Commit ba5de3f

Browse files
committed
refactor: Refactored namespaces
BREAKING CHANGE: This changes some of the common namespaces. Update all your usings
1 parent b0817e9 commit ba5de3f

File tree

85 files changed

+1666
-1629
lines changed

Some content is hidden

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

85 files changed

+1666
-1629
lines changed

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-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MLAPI.Data
1+
namespace MLAPI.Configuration
22
{
33
/// <summary>
44
/// A static class containing MLAPI constants

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
using System.Collections.Generic;
33
using UnityEngine;
44
using System.Linq;
5-
using MLAPI.Data;
6-
using MLAPI.Serialization;
75
using MLAPI.Transports;
86
using BitStream = MLAPI.Serialization.BitStream;
7+
#if !DISABLE_CRYPTOGRAPHY
98
using System.Security.Cryptography.X509Certificates;
9+
#endif
10+
using MLAPI.Hashing;
11+
using MLAPI.Serialization.Pooled;
1012
using UnityEngine.Serialization;
1113

1214
namespace MLAPI.Configuration

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using MLAPI.Logging;
33
using UnityEngine;
44

5-
namespace MLAPI.Data
5+
namespace MLAPI.Configuration
66
{
77
/// <summary>
88
/// A class that represents a NetworkedPrefab

0 commit comments

Comments
 (0)