Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
609 commits
Select commit Hold shift + click to select a range
52e3697
feature: Edgegap Relay from https://github.com/edgegap/distributed-re…
miwarnec Oct 5, 2023
c312b6b
feature: ConnectionQuality details
Oct 6, 2023
0c5eba7
fix: NetworkTime creates it's own frame time in 2019 (#3624)
imerr Oct 8, 2023
3bf180c
ILPostProcessorLogger: TODO fix
Oct 12, 2023
809f7a4
feature: kcp2k exposes LocalEndPoint (credits: Whale)
Oct 13, 2023
f56394a
Scenes renamed, see description. (#3625)
JesusLuvsYooh Oct 18, 2023
1ff2b02
chore(CI): RunUnityTests - updated unityVersions
MrGadget1024 Oct 18, 2023
95e15f0
Showcase: Unleased ❤️
miwarnec Oct 18, 2023
de25a5e
Update README.md
miwarnec Oct 18, 2023
a3ec844
Update README.md (#3626)
miwarnec Oct 18, 2023
906626f
chore(CI): main.yml - updatd paths-ignore
MrGadget1024 Oct 18, 2023
6b4bac7
Unity updated prefab
MrGadget1024 Oct 22, 2023
5cc090a
MultiSceneNetManager - fixed comment
MrGadget1024 Oct 22, 2023
64f2f10
Reward - removed erroneous comments
MrGadget1024 Oct 22, 2023
2bf9bcd
Portal - improved comments
MrGadget1024 Oct 22, 2023
76bab63
AdditiveLevelsNetworkManager - fixed comment
MrGadget1024 Oct 22, 2023
36c93d0
CanvasController - reordered methods and callers
MrGadget1024 Oct 22, 2023
334e20d
Billiards example: fix ForceMode and add maxForce
Oct 25, 2023
c5abaef
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Oct 25, 2023
5d1b041
LatencySimulation: syntax / readonly
Oct 25, 2023
9fe1d06
fix: LatencySimulation now always applies latency to both channels. F…
miwarnec Oct 27, 2023
993ae8d
fix: KCP V1.38 [2023-10-29] (#3629)
miwarnec Oct 29, 2023
97dc02e
fix: Add missing GetHashCode method for older Unity (#3631)
MrGadget1024 Oct 29, 2023
bdb6cd8
fix: #3528, #3529 NetworkBehaviour.authority now evaluates correctly …
Oct 29, 2023
6a8b4be
breaking: Removed older Obsoletes (#3633)
MrGadget1024 Oct 29, 2023
64cb1a0
fix: Fix Unity 2023 obsoletes (#3635)
MrGadget1024 Oct 29, 2023
2ab395c
NetworkBehaviour.authority test coverage from #3495
Oct 29, 2023
b434d00
change Debug.Assert to Assert.That
Oct 29, 2023
a195a07
kcp V1.39:
Oct 31, 2023
00b9a96
chore(CI): RunUnityTests - updated unityVersions
MrGadget1024 Nov 1, 2023
a6304de
TransformSnapshot: add ToString for easier debugging
Nov 1, 2023
a432b7f
fix: #3632 disable EdgegapKcpTransport OnGUI 'new' warning
Nov 1, 2023
631b8e0
fix: #3588 NetworkTransform OnTeleport doesn't call Reset() anymore, …
Nov 1, 2023
05e9ca4
feature: Edgegap Hosting Plugin (#3636)
miwarnec Nov 3, 2023
5aca20f
Edgegap Plugin: link to our custom documentation instead
Nov 3, 2023
7e80464
NetworkManagerTemplate - simplified singleton
MrGadget1024 Nov 4, 2023
075f250
NetworkBehaviour Template - Added Awake and Start with comments
MrGadget1024 Nov 4, 2023
8cd6cb1
Renamed Network Authenticator and Interest Mgmt templates
MrGadget1024 Nov 4, 2023
1cda803
feat(Templates): Added Script Templates with Actions
MrGadget1024 Nov 4, 2023
c66f40f
fix(NetworkManager): CalculateConnectionQuality and OnConnectionQuali…
MrGadget1024 Nov 4, 2023
2d3776d
Edgegap Plugin: detailed error message & solution for 'project not fo…
Nov 5, 2023
ec548a6
fix: Edgegap Plugin: Multiple precompiled assemblies with the same na…
Nov 5, 2023
68d768b
fix: Edgegap Plugin 'InvalidOperationException: This instance has alr…
Nov 5, 2023
bd85c74
NetworkManagerWithActions template - made actions non-static
MrGadget1024 Nov 5, 2023
bccebc6
Revert "fix: Edgegap Plugin 'InvalidOperationException: This instance…
Nov 6, 2023
4193d75
fix: Edgegap Plugin now creates Dedicated Server instead of Headless …
Nov 6, 2023
38c3781
feat: NetworkManagerHUD exposes configurable Port field if Transport …
Nov 6, 2023
113f810
Edgegap Plugin: remove unnecessary target switching
miwarnec Nov 6, 2023
1641bba
fix: NetworkManager autoStartServerBuild now only auto starts a serve…
Nov 6, 2023
b195cc0
fix: Port log for when Server has started and is listening. (#3642)
JesusLuvsYooh Nov 6, 2023
54309b5
fix(MultiplexTransport): Add Server listening output
MrGadget1024 Nov 6, 2023
bb9bf76
fix: Edgegap plugin now detects and warns about ARM CPUs instead of d…
Nov 6, 2023
57d412c
Consolidated Server Listening output
MrGadget1024 Nov 6, 2023
7d91f9a
Edgegap Plugin: move IsArmCPU to BuildUtils
Nov 6, 2023
b2f2e1c
fixed indentation
MrGadget1024 Nov 6, 2023
fd758a8
fix:(NetworkServer) Added check for UNITY_EDITOR in Listen
MrGadget1024 Nov 6, 2023
005319a
breaking: Edgegap Plugin: remove EdgegapToolScript+Editor for now - t…
Nov 6, 2023
7916f39
Edgegap Plugin: EdgegapServerDataManagerUtils merged into EdgegapServ…
Nov 6, 2023
e1d9604
breaking: Edgegap Plugin: ServerDataManager UI code moved into Edegap…
Nov 6, 2023
eab8609
fix: EdgegapPlugin EdgegapWindow.cs UIToolkit stylesheet paths aren't…
Nov 6, 2023
1b5f963
fix: EdgegapPlugin now builds properly on ARM machines instead of dep…
Nov 7, 2023
3f31cbd
fix: EdgegapPlugin Unity 2019/2020 support
miwarnec Nov 7, 2023
42a89a7
fix: Headless / Dedicated Server detection now works on Unity 2019/20…
miwarnec Nov 7, 2023
ee76c6a
Added Shattered Lands (#3641)
JesusLuvsYooh Nov 7, 2023
0a3368a
fix: EdgegapPlugin progress bar getting stuck when returning early wi…
Nov 7, 2023
b73c5ea
indentation
Nov 7, 2023
7bcaae9
fix(EdgegapWindow): Simplify clearing ProgressBar (#3645)
MrGadget1024 Nov 8, 2023
db0adfa
Update Showcase README.md (#3644)
JesusLuvsYooh Nov 8, 2023
9979745
fix: Edgegap Plugin 'InvalidOperationException: This instance has alr…
Nov 8, 2023
bcea211
fix: EdgegapPlugin typo
Nov 8, 2023
acda90a
syntax
Nov 8, 2023
0877e1f
EdgegapPlugin: comment
Nov 8, 2023
9deff7e
fix: EdgegapPlugin now shows detailed progress bar title and indicate…
Nov 8, 2023
6453db1
PreprocessorDefine - moved comments up
MrGadget1024 Nov 8, 2023
6eaf7cb
Added CreateRelease workflow and script
MrGadget1024 Nov 8, 2023
cf5d803
CreateAsset.cs - fix version format
MrGadget1024 Nov 8, 2023
764842d
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
243a896
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
2f7578e
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
56fe836
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
b9a97e6
Update CreateRelease.yml
MrGadget1024 Nov 8, 2023
bcb91af
Update CreateRelease.yml
MrGadget1024 Nov 8, 2023
ddacf99
Update CreateRelease.yml
MrGadget1024 Nov 8, 2023
ad0b50d
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
2283b44
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
d0c3fe0
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
c24ee77
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
5729548
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
ee83362
Updated CreateRelease.cs
MrGadget1024 Nov 8, 2023
fc6a6e0
Updated CreateRelease.cs
MrGadget1024 Nov 8, 2023
7b76fea
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
4f93bf0
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
5e1be44
Updated CreateRelease.yml
MrGadget1024 Nov 8, 2023
d4734c0
fix: EdgegapHosting connect uses passed-in name/version (#3646)
imerr Nov 8, 2023
d90b6ba
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
cd7f163
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
49a1ef9
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
66e0fa8
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
6ed44b7
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
c7e151a
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
5bc9f31
Updated CreateRelease
MrGadget1024 Nov 9, 2023
026c046
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
f94af66
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
c02ef5d
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
e2b36db
Renamed CreateRelease.cs > .csx
MrGadget1024 Nov 9, 2023
18a9b4a
Added ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
d96ccfe
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
f2849cd
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
22a1bed
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
f73581a
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
777cc95
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
883f5c7
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
0233b04
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
ffa5ff3
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
8edba73
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
8ee132b
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
0a53a72
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
b935bf9
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
08aa2a9
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
5ae11f2
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
8893c1d
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
300175d
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
a8e2a1c
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
4f59491
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
2afb2dd
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
1417365
Updated CreateRelease.yml
MrGadget1024 Nov 9, 2023
b8c82b2
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
26246f1
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
391f465
Updated ModPreprocessorDefine.csx
MrGadget1024 Nov 9, 2023
dff404e
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Nov 10, 2023
d1c6084
fix: Telepathy V1.9
Nov 10, 2023
5c82baf
Update README.md (#3647)
miwarnec Nov 10, 2023
993953e
Updated main.yml
MrGadget1024 Nov 12, 2023
7514e9b
feat: Prediction October Progress [don't use this yet!]
Nov 13, 2023
77898df
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Nov 14, 2023
63f0fe4
fix(PredictedState): Remove public accessors (#3649)
MrGadget1024 Nov 14, 2023
c2fb271
predictedTime: comments
Nov 14, 2023
9d94adb
syntax
Nov 14, 2023
d90b913
PredictedRigidbody: smoothCorrection tooltip
Nov 14, 2023
19d5fb4
chore(CI): Updated package versions
MrGadget1024 Nov 14, 2023
f5599fa
Room Example: update readme for new scene names
Nov 15, 2023
7a69c42
Extensions: GetStableHashCode16 from NetworkMessages.CalculateId for …
Nov 15, 2023
c729fe1
fix: #3576 Pings are now stamped with a scene hash so we can drop mes…
miwarnec Nov 15, 2023
95f3ac5
Examples/Common renamed to Examples/_Common to be more obvious
Nov 15, 2023
d6c43a3
Tanks/FaceCamera moved to Examples/Common
Nov 15, 2023
8ec937d
LocalConnectionToClient: update comments
Nov 16, 2023
d4c0f20
breaking: fix: #3652 host [Command]s are now simulated over a message…
miwarnec Nov 17, 2023
816b775
Revert "fix: #3576 Pings are now stamped with a scene hash so we can …
Nov 17, 2023
0c81663
fix(AdditiveLevels): Fixed Portal label generation
MrGadget1024 Nov 19, 2023
1113e45
fix(CanvasNetworkManagerHUD): added namespace
MrGadget1024 Nov 19, 2023
ec35774
fix(PhysicsSimulator): Consolidated to Common
MrGadget1024 Nov 19, 2023
55e8ca5
fix(RandomColor): Consolidated to Common
MrGadget1024 Nov 19, 2023
0655f77
PredictedRigidbody: CorrectionMode instead of bool to support more mo…
Nov 17, 2023
40953aa
Added plunder readme showcase (#3657)
PirateNick Nov 20, 2023
3367ed9
ProjectSettings resaved with latest Unity version
Nov 20, 2023
a24103b
PredictedRigidbody: comment out unused positionSensitivity for now
Nov 20, 2023
582a9c9
fix failing test
Nov 20, 2023
ab7c153
fix failing test
Nov 20, 2023
b5d6d77
Updated Compiler Symbols
MrGadget1024 Nov 20, 2023
e42217a
PredictedRigidbody: show inserted correction too
Nov 20, 2023
8086527
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Nov 20, 2023
dbe9874
breaking: remove PredictedRigidbody auto generated namespace
Nov 20, 2023
2425898
feat: [SimpleWebTransport] Add ability to specify a custom client por…
aallbrig Nov 20, 2023
36a78ff
SWT: Code formatting and syntax
MrGadget1024 Nov 21, 2023
0aef642
fix(ClientWebsocketSettingsDrawer): Syntax Error
MrGadget1024 Nov 21, 2023
fd049fc
fix(PlayerPredicted): Fixed deprecated FindObjectOfType
MrGadget1024 Nov 21, 2023
eb66d81
feat(Reader/Writer): Added LayerMask Support
MrGadget1024 Nov 21, 2023
b9b80c4
fix(SWT): silenced silly error logs
MrGadget1024 Nov 22, 2023
a420e20
NetworkManagerHUD: formatting & syntax
MrGadget1024 Nov 22, 2023
d559676
fix: TanksCoop example, reset host values. (#3660)
JesusLuvsYooh Nov 22, 2023
f83d568
feat(HUD): Better HUD for WebGL (#3659)
MrGadget1024 Nov 22, 2023
8cf499e
SWT: Added ToString override
MrGadget1024 Nov 23, 2023
9f9957e
SWT: Added console color comments
MrGadget1024 Nov 23, 2023
20faa4e
SWT: Added Help URL
MrGadget1024 Nov 24, 2023
36382bd
SWT: Syntax
MrGadget1024 Nov 24, 2023
5b71136
SWT: Removed stray blank lines
MrGadget1024 Nov 24, 2023
cab133c
SWT: Syntax
MrGadget1024 Nov 24, 2023
fc5f68a
SWT: Renamed handshakeMaxSize to maxHandshakeSize
MrGadget1024 Nov 24, 2023
7ae2e0b
Renamed _logLevels to minimumLogLevel
MrGadget1024 Nov 24, 2023
8c1825d
SWT: Renamed Log.level to minLogLevel
MrGadget1024 Nov 24, 2023
3d32470
SWT: renamed clientMaxMessagesPerTick to clientMaxMsgsPerTick
MrGadget1024 Nov 24, 2023
0f17071
SWT: Renamed serverMaxMessagesPerTick to serverMaxMsgsPerTick
MrGadget1024 Nov 24, 2023
b79b2dd
SWT: Renamed Log Levels
MrGadget1024 Nov 24, 2023
ba100dc
SWT: Rearranged Inspector fields
MrGadget1024 Nov 24, 2023
8bb713c
SWT(Connection): Return remoteAddress in ToString if available
MrGadget1024 Nov 24, 2023
bfe95af
SWT(BufferPool): Grammar in exception
MrGadget1024 Nov 24, 2023
dfec9a7
feat(SWT): Logging System Overhaul (#3663)
MrGadget1024 Nov 24, 2023
11dc4a9
fix(NetworkManager): Move networkAddress check up in StartClient
MrGadget1024 Nov 24, 2023
28a876c
fix(NetworkIdentity): Made clientStarted public and moved it up
MrGadget1024 Nov 24, 2023
74df250
fix(Multiplex): ToString all on one line
MrGadget1024 Nov 24, 2023
5ac3cdb
fix(NetworkClient): GUILayout tiny bit wider
MrGadget1024 Nov 25, 2023
21bc42f
feat: Added NetworkDiagnosticsDebugger to log messages sent and recei…
aallbrig Nov 25, 2023
75951df
SWT: port changed to Port, WebGL Platform handling
MrGadget1024 Nov 26, 2023
e72f85e
Revert "SWT: port changed to Port, WebGL Platform handling"
MrGadget1024 Nov 26, 2023
7b3b730
fix(SWT): Improve OnClientError / OnServerError
MrGadget1024 Nov 27, 2023
dcccaa9
fix(SWT): Use server port in ClientConnect
MrGadget1024 Nov 27, 2023
af5627e
fix(SWT): Port get/set based on platform
MrGadget1024 Nov 27, 2023
6a27496
fix(SWT): Removed Console.Clear from ServerSslHelper
MrGadget1024 Nov 27, 2023
5e33b03
fix(SWT): Changed two logs to Verbose in WebSocketServer
MrGadget1024 Nov 27, 2023
d6c0c17
fix(KCP): Use Log.Info instead of Debug.Log (#3671)
MrGadget1024 Nov 27, 2023
843d265
fix(Telepathy): Shorter Simpler ToString (#3669)
MrGadget1024 Nov 27, 2023
447e96d
feat(NetworkManager): Refactor Headless Start (#3664)
MrGadget1024 Nov 27, 2023
b0e7703
fix(EdgegapHosting): registry/image name/tag whitespaces are trimmed …
Nov 27, 2023
5b73df8
Readme: Badge Styling V2 (#3672)
miwarnec Nov 27, 2023
77155b8
Update README.md
miwarnec Nov 27, 2023
c621049
fix(NetworkManager): Remove check for editor in Start (#3670)
MrGadget1024 Nov 27, 2023
b7bfee3
Added comments as requested
MrGadget1024 Nov 27, 2023
35d9d65
chore(CI): RunUnityTests - updated unityVersions
MrGadget1024 Nov 27, 2023
f863b27
fix(MultiplexTransport): OnValidate check that SimpleWebTransport is …
MrGadget1024 Nov 28, 2023
e955d34
Revert "fix(MultiplexTransport): OnValidate check that SimpleWebTrans…
Nov 29, 2023
acd6b61
feature: PredictedRigidbody visual interpolation object (#3675)
miwarnec Dec 1, 2023
2885752
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Dec 2, 2023
98dcffb
fix(Telepathy): Use compiler symbols in Available (#3667)
MrGadget1024 Dec 3, 2023
93d7bd1
fix(KCP): Use compiler symbols in Available (#3668)
MrGadget1024 Dec 3, 2023
3136e6e
Code Formatting in NT scripts (#3681)
MrGadget1024 Dec 3, 2023
f0b4694
fix: Reset walls
MrGadget1024 Dec 3, 2023
eb08396
fix(MultipleAdditiveScenes): Fixed missing RandomColor script on Player
MrGadget1024 Dec 3, 2023
16dbeb1
feat: NetworkTransform obsolete define removal. (#3687)
JesusLuvsYooh Dec 3, 2023
c1699f8
fix(KCP): Added port to ToString (#3683)
MrGadget1024 Dec 3, 2023
f701ae1
fix(Utils): Fix IsHeadless to work in editor for Unity 2021+ (#3680)
MrGadget1024 Dec 3, 2023
02d12c1
Remove 'Empty' files that are older than 1 year (#3682)
aallbrig Dec 3, 2023
c980fd9
feat(Utils): Add IsWebGL and IsDebug (#3688)
MrGadget1024 Dec 3, 2023
49e5f76
feat: Compress network transform rotation boolean. (#3677)
JesusLuvsYooh Dec 3, 2023
d7d82f8
Update README.md
miwarnec Dec 4, 2023
5eb877a
Update README.md
miwarnec Dec 4, 2023
c834c22
Removed leftover empty folder metas
MrGadget1024 Dec 4, 2023
2625fe4
chore(CI): RunUnityTests - updated unityVersion
MrGadget1024 Dec 4, 2023
e2d63a8
fix(Examples): Updated scenes and lighting
MrGadget1024 Dec 5, 2023
f1bb7e4
feature: Stinkysteak benchmark (#3690)
miwarnec Dec 5, 2023
77e79de
Readme: added Features Matrix (#3691)
miwarnec Dec 5, 2023
7b55fe9
HUD: make wdith a variable
MrGadget1024 Dec 5, 2023
65fc3db
fix(GUIConsole): default hotkey changed to tick (Back Quote)
MrGadget1024 Dec 5, 2023
a3cb760
fix(GUIConsole): Changed position / layout
MrGadget1024 Dec 5, 2023
f05fcd0
Removed GUI Console from Basic example
MrGadget1024 Dec 5, 2023
2ddbf8c
NetworkPingDisplay: Changed connectionQuality to hyphens
MrGadget1024 Dec 5, 2023
c85f591
NetworkPingDisplay: Changed width to 100
MrGadget1024 Dec 5, 2023
f04a2a9
fix(ConnectionQuality): reordered enums
MrGadget1024 Dec 5, 2023
b6f86ac
Revert "fix(Examples): Updated scenes and lighting"
MrGadget1024 Dec 5, 2023
d477189
fix(StinkySteak): Cannot use shortened new() in older Unity
MrGadget1024 Dec 5, 2023
dd1923e
fix: Reset Scenes for 2019+
MrGadget1024 Dec 5, 2023
92b9933
fix(ConnectionQuality): Move Connection Quality to Network Client (#3…
MrGadget1024 Dec 6, 2023
ab99215
feat(NetworkManager): Ability to toggle auto-start in Editor (#3694)
MrGadget1024 Dec 6, 2023
608429c
perf: SyncVar hook invocations no longer instantiate a new action del…
cshunsinger Dec 6, 2023
67f32f2
feature: Edgegap Plugin V2 (#3692)
miwarnec Dec 9, 2023
3e30c44
Examples/Common: scripts moved into Scripts/
Dec 11, 2023
a27a0ae
fix script icons
Dec 11, 2023
c1be7b3
fix(Edgegap Plugin): fix NRE when reloading assets
Dec 11, 2023
b2d2cae
perf(PlayerController): Changed 4 examples to NT-Reliable
MrGadget1024 Dec 11, 2023
5132fa8
feat(HUD): Support for MultiplexTransport Port (#3662)
MrGadget1024 Dec 12, 2023
91e028f
MIRROR_86_OR_NEWER
Dec 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions .github/CreateRelease.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

// Modify PreprocessorDefine.cs
string path = "Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs";
string text = File.ReadAllText(path);

// Find the whole line of the first define ending with "MIRROR_n_OR_NEWER,"
string pattern = @"\s+\""(MIRROR_(\d+)_OR_NEWER)\""\,\n";
Match match = Regex.Matches(text, pattern).First();

// Remove the first define
text = text.Replace(match.Value, "");

// Find the highest version number entry, not having a comma at the end
pattern = @"\""(MIRROR_(\d+)_OR_NEWER)\""\n";
MatchCollection matches = Regex.Matches(text, pattern);
int maxVersion = matches.Max(m => int.Parse(m.Groups[2].Value));

// Find the last define ending with "MIRROR_n_OR_NEWER"
pattern = @"(\s+)\""(MIRROR_(\d+)_OR_NEWER)\""";
matches = Regex.Matches(text, pattern);
Match lastMatch = matches.Last();

// Add a new define for the next full version, used here and in ProjectSettings and version.txt
string newDefine = $"MIRROR_{maxVersion + 1}_OR_NEWER";

// Add the new define to the end of the hashset entries, with a comma after the previous entry and properly indented
text = text.Insert(lastMatch.Index + lastMatch.Length, $",\n{match.Groups[1].Value}\"{newDefine}\"");

File.WriteAllText(path, text);

// Modify ProjectSettings.asset
path = "ProjectSettings/ProjectSettings.asset";
text = File.ReadAllText(path);

// Define a regular expression pattern for finding the sections
pattern = @"(Server|Standalone|WebGL):(.+?)(?=(Server|Standalone|WebGL)|$)";
MatchCollection sectionMatches = Regex.Matches(text, pattern, RegexOptions.Singleline);

if (sectionMatches.Count > 0)
{
foreach (Match sectionMatch in sectionMatches)
{
string sectionName = sectionMatch.Groups[1].Value.Trim();
string sectionContent = sectionMatch.Groups[2].Value.Trim();

// Now, you can work with sectionName and sectionContent
// to locate and update the defines within each section.
// For example, you can use Regex to modify defines within sectionContent.

// For simplicity, let's assume you want to add the newDefine to the end of each section.
pattern = @"(MIRROR_(\d+)_OR_NEWER);";
MatchCollection defineMatches = Regex.Matches(sectionContent, pattern);

if (defineMatches.Count > 0)
{
Match lastDefineMatch = defineMatches[defineMatches.Count - 1];
int lastIndex = lastDefineMatch.Index + lastDefineMatch.Length;
sectionContent = sectionContent.Insert(lastIndex, $";{newDefine}");
}

// Replace the section in the original text with the modified section content
text = text.Remove(sectionMatch.Index, sectionMatch.Length);
text = text.Insert(sectionMatch.Index, $"{sectionName}:{sectionContent}");
}
}

File.WriteAllText(path, text);

// Update version.txt with newDefine, e.g. MIRROR_84_OR_NEWER, replacing _ with .
File.WriteAllText("Assets/Mirror/version.txt", newDefine.Replace("_", "."));
113 changes: 113 additions & 0 deletions .github/ModPreprocessorDefine.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
using System;
using System.IO;
using System.Text.RegularExpressions;

Console.WriteLine("ModPreprocessorDefine Started");
// Console.Out.Flush();

ModPreprocessorDefine.DoSomething();

Console.WriteLine("ModPreprocessorDefine Finished");
// Console.Out.Flush();

class ModPreprocessorDefine
{
public static void DoSomething()
{
// Define the path to the PreprocessorDefine.cs file
string filePath = "Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs";

// Read the contents of the file
string fileContents = File.ReadAllText(filePath);
Console.WriteLine("ModPreprocessorDefine File read");
// Console.Out.Flush();

// Find and remove the first entry ending with "_OR_NEWER"
fileContents = RemoveFirstOrNewerEntry(fileContents);
Console.WriteLine("ModPreprocessorDefine Old entry removed");
// Console.Out.Flush();

// Find the last entry and capture the version number
string versionNumber = GetLastVersionNumber(fileContents);
Console.WriteLine($"ModPreprocessorDefine current version {versionNumber}");
// Console.Out.Flush();

// Append a new entry with the correct indentation and next version number
fileContents = AppendNewEntry(fileContents, versionNumber);
Console.WriteLine("ModPreprocessorDefine New entry appended");
// Console.Out.Flush();

// Write the modified contents back to the file
File.WriteAllText(filePath, fileContents);
}

static string RemoveFirstOrNewerEntry(string input)
{
// Regex pattern to match the first entry ending with "_OR_NEWER"
string pattern = @"^\s*""[^""]*_OR_NEWER""\s*,\s*$";

// Find the first match
Match match = Regex.Match(input, pattern, RegexOptions.Multiline);

// If a match is found, remove the entire line
if (match.Success)
{
input = input.Remove(match.Index, match.Length);
}

return input;
}

static string GetLastVersionNumber(string input)
{
// Regex pattern to match the last entry and capture the version number
string pattern = @"^\s*""([^""]*)_OR_NEWER""\s*,\s*$";

// Find all matches
MatchCollection matches = Regex.Matches(input, pattern, RegexOptions.Multiline);

// Capture the version number from the last match
string versionNumber = matches.Count > 0 ? matches[matches.Count - 1].Groups[1].Value : "";

return versionNumber;
}

static string AppendNewEntry(string input, string versionNumber)
{
// Calculate the next version number (increment by 1)
int nextVersion = int.TryParse(versionNumber, out int currentVersion) ? currentVersion + 1 : 1;

// Get the indentation of the "HashSet<string> defines = new HashSet<string>" line
string indentation = GetHashSetIndentation(input);

// Create the new entry with the correct indentation and next version number
string newEntry = indentation + $" \"MIRROR_{nextVersion}_OR_NEWER\"";
Console.WriteLine($"New entry: {newEntry}");

// Find the position of the "defines" HashSet and insert the new entry into it
int definesStartIndex = input.IndexOf("HashSet<string> defines = new HashSet<string>");
int definesEndIndex = input.IndexOf("};", definesStartIndex) + 1;

// Insert the comma and new entry into the "defines" HashSet
input = input.Remove(definesEndIndex - 2, 2); // Remove the trailing "};"
input = input.Insert(definesEndIndex - 2, $",\n{newEntry}\n{indentation}}};");

Console.WriteLine(input);

return input;
}

static string GetHashSetIndentation(string input)
{
// Regex pattern to match the indentation of "HashSet<string> defines = new HashSet<string>"
string pattern = @"^\s*HashSet<string> defines = new HashSet<string>";

// Find the first match
Match match = Regex.Match(input, pattern, RegexOptions.Multiline);

// If a match is found, capture the indentation and add 4 spaces
string indentation = match.Success ? Regex.Match(match.Value, @"^\s*").Value : "";

return indentation;
}
}
46 changes: 46 additions & 0 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create Release

on:
workflow_dispatch:

jobs:
CreateRelease:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Merge Master into AssetStoreRelease
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: AssetStoreRelease
message: "Merged master"
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout AssetStoreRelease
run: |
git checkout -b AssetStoreRelease
git pull origin AssetStoreRelease

- name: Set up .NET Core
uses: actions/setup-dotnet@v3

- name: Install dotnet-script
run: |
dotnet tool install -g dotnet-script
dotnet script --version

- name: Run ModPreprocessorDefine.csx
run: dotnet script .github/ModPreprocessorDefine.csx

- name: Commit and Push
run: |
git config user.name ${{ secrets.COMMITTER_NAME }}
git config user.email ${{ secrets.COMMITTER_EMAIL }}
git commit -m "release!: Asset Store Release" -a
git push origin AssetStoreRelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 5 additions & 4 deletions .github/workflows/RunUnityTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ jobs:
matrix:
unityVersion:
- 2019.4.40f1
- 2020.3.46f1
- 2021.3.20f1
- 2022.2.10f1
- 2020.3.48f1
- 2021.3.33f1
- 2022.3.14f1
- 2023.2.2f1

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Do Not Enable Caching --- Library needs to be recompiled every time because Weaver
# Leaving this here for posterity to ensure we never turn this on.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
path: Mirror.unitypackage

- name: Release
uses: cycjimmy/semantic-release-action@v3
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/exec
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: Main
on:
workflow_dispatch:
pull_request:
branches:
- master
paths-ignore:
- 'Packages/**'
- 'ProjectSettings/**'
- '.github/**'
- '.gitattributes'
- '.gitignore'
- '.editorconfig'
- 'LICENSE'
- '**.md'
- '**.yml'
- '**.txt'
- '**.ps1'
push:
branches:
- master
Expand All @@ -14,10 +28,10 @@ on:
- '.gitignore'
- '.editorconfig'
- 'LICENSE'
- '*.md'
- '*.yml'
- '*.txt'
- '*.ps1'
- '**.md'
- '**.yml'
- '**.txt'
- '**.ps1'

jobs:
RunUnityTests:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ UserSettings/Search.settings
# ===================================== #
Database.sqlite
Database/
Builds/

# ===================================== #
# Visual Studio / MonoDevelop / Rider #
Expand Down
34 changes: 23 additions & 11 deletions Assets/Mirror/CompilerSymbols/PreprocessorDefine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,41 @@ static class PreprocessorDefine
[InitializeOnLoadMethod]
public static void AddDefineSymbols()
{
#if UNITY_2021_2_OR_NEWER
string currentDefines = PlayerSettings.GetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup));
#else
// Deprecated in Unity 2023.1
string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
#endif
// Remove oldest when adding next month's symbol.
// Keep a rolling 12 months of symbols.
HashSet<string> defines = new HashSet<string>(currentDefines.Split(';'))
{
"MIRROR",
"MIRROR_57_0_OR_NEWER",
"MIRROR_58_0_OR_NEWER",
"MIRROR_65_0_OR_NEWER",
"MIRROR_66_0_OR_NEWER",
"MIRROR_2022_9_OR_NEWER",
"MIRROR_2022_10_OR_NEWER",
"MIRROR_70_0_OR_NEWER",
"MIRROR_71_0_OR_NEWER",
"MIRROR_73_OR_NEWER"
// Remove oldest when adding next month's symbol.
// Keep a rolling 12 months of symbols.
"MIRROR_70_OR_NEWER",
"MIRROR_71_OR_NEWER",
"MIRROR_73_OR_NEWER",
"MIRROR_78_OR_NEWER",
"MIRROR_79_OR_NEWER",
"MIRROR_81_OR_NEWER",
"MIRROR_82_OR_NEWER",
"MIRROR_83_OR_NEWER",
"MIRROR_84_OR_NEWER",
"MIRROR_85_OR_NEWER",
"MIRROR_86_OR_NEWER"
};

// only touch PlayerSettings if we actually modified it,
// otherwise it shows up as changed in git each time.
string newDefines = string.Join(";", defines);
if (newDefines != currentDefines)
{
#if UNITY_2021_2_OR_NEWER
PlayerSettings.SetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup), newDefines);
#else
// Deprecated in Unity 2023.1
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, newDefines);
#endif
}
}
}
Expand Down
Loading