Skip to content

Commit 653a699

Browse files
committed
Disable Steamworks
1 parent 589a663 commit 653a699

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

FizzySteamworks.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !DISABLESTEAMWORKS
12
using Steamworks;
23
using System;
34
using System.IO;
@@ -298,4 +299,5 @@ private void OnDestroy()
298299
Shutdown();
299300
}
300301
}
301-
}
302+
}
303+
#endif // !DISABLESTEAMWORKS

LegacyClient.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Steamworks;
1+
#if !DISABLESTEAMWORKS
2+
using Steamworks;
23
using System;
34
using System.Threading;
45
using System.Threading.Tasks;
@@ -166,4 +167,5 @@ protected override void OnReceiveInternalData(InternalMessages type, CSteamID cl
166167
protected override void OnConnectionFailed(CSteamID remoteId) => OnDisconnected.Invoke();
167168
public void FlushData() { }
168169
}
169-
}
170+
}
171+
#endif // !DISABLESTEAMWORKS

LegacyCommon.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Steamworks;
1+
#if !DISABLESTEAMWORKS
2+
using Steamworks;
23
using System;
34
using System.Collections;
45
using UnityEngine;
@@ -146,4 +147,5 @@ public void ReceiveData()
146147
protected abstract void OnReceiveData(byte[] data, CSteamID clientSteamID, int channel);
147148
protected abstract void OnConnectionFailed(CSteamID remoteId);
148149
}
149-
}
150+
}
151+
#endif // !DISABLESTEAMWORKS

LegacyServer.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Steamworks;
1+
#if !DISABLESTEAMWORKS
2+
using Steamworks;
23
using System;
34
using System.Collections.Generic;
45
using UnityEngine;
@@ -150,4 +151,5 @@ protected override void OnConnectionFailed(CSteamID remoteId)
150151
}
151152
public void FlushData() { }
152153
}
153-
}
154+
}
155+
#endif // !DISABLESTEAMWORKS

NextClient.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !DISABLESTEAMWORKS
12
using Steamworks;
23
using System;
34
using System.Collections.Generic;
@@ -216,4 +217,5 @@ public void FlushData()
216217
SteamNetworkingSockets.FlushMessagesOnConnection(HostConnection);
217218
}
218219
}
219-
}
220+
}
221+
#endif // !DISABLESTEAMWORKS

NextCommon.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !DISABLESTEAMWORKS
12
using Mirror;
23
using Steamworks;
34
using System;
@@ -39,3 +40,4 @@ protected EResult SendSocket(HSteamNetConnection conn, byte[] data, int channelI
3940
return (managedArray, channel);
4041
}
4142
}
43+
#endif // !DISABLESTEAMWORKS

NextServer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !DISABLESTEAMWORKS
12
using Steamworks;
23
using System;
34
using System.Linq;
@@ -202,4 +203,5 @@ public void Shutdown()
202203
}
203204
}
204205
}
205-
}
206+
}
207+
#endif // !DISABLESTEAMWORKS

0 commit comments

Comments
 (0)