Skip to content

Commit

Permalink
fix: did not realize there was changes not pushed to the branch got f…
Browse files Browse the repository at this point in the history
…rom master now and fixed it all up again.

Signed-off-by: dragonslaya <dragonslaya.ss@gmail.com>
  • Loading branch information
dragonslaya84 committed Sep 3, 2021
2 parents d8d28f9 + 65d1034 commit 988641f
Show file tree
Hide file tree
Showing 562 changed files with 21,722 additions and 4,990 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/docs.yml
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
# available list of containers here:
# https://hub.docker.com/r/unityci/editor/tags?page=1&ordering=last_updated&name=ubuntu-2020.1.17f1-base
container: unityci/editor:ubuntu-2020.1.17f1-base-0.10.0
container: unityci/editor:ubuntu-2020.3.17f1-base-0.15.0

steps:
- name: Activate unity
# exit code is 1 for manual activation
continue-on-error: true
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE2 }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2020_3_17 }}
run: |
echo "$UNITY_LICENSE" | tr -d '\r' > UnityLicenseFile.ulf
unity-editor -nographics -logFile /dev/stdout -manualLicenseFile UnityLicenseFile.ulf -quit
Expand All @@ -27,15 +27,22 @@ jobs:
uses: actions/cache@v2
with:
path: Library
key: Library-2020.1.17
key: Library-Library-2020.3.17

- name: Generate Solution
run: unity-editor -nographics -logFile /dev/stdout -customBuildName Mirage -projectPath . -executeMethod UnityEditor.SyncVS.SyncSolution -quit

- name: Install docfx
uses: MirageNet/setup-docfx@v1

- name: Generate API
# Unity2020.3+Linux seems to check for meta data in wrong order, No idea why
# So for metadata we have to run twice so that it correctly finds references to other c# projects
# First run we do without warningsAsErrors, (it will give warning for cref not found)
# Second run we do it with warningsAsErrors, (it should find cref and not give warning)
- name: Generate API 1
run: docfx metadata --logLevel Warning doc/docfx.json

- name: Generate API 2
run: docfx metadata --logLevel Warning --warningsAsErrors doc/docfx.json

- name: Build Docs
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -46,15 +46,15 @@ jobs:
apt install -y openjdk-11-jre-headless=11.0.11+9-0ubuntu2~18.04
- name: Run editor Tests
run: unity-editor -nographics -logFile /dev/stdout -runTests -testPlatform editmode -testResults Tests/editmode-results.xml -enableCodeCoverage -coverageResultsPath Tests
run: unity-editor -nographics -logFile /dev/stdout -runTests -testPlatform editmode -testResults Tests/editmode-results.xml -enableCodeCoverage -coverageResultsPath Tests -debugCodeOptimization
timeout-minutes: 20

- name: Run play Tests
run: unity-editor -nographics -logFile /dev/stdout -runTests -testPlatform playmode -testResults Tests/playmode-results.xml -enableCodeCoverage -coverageResultsPath Tests
run: unity-editor -nographics -logFile /dev/stdout -runTests -testPlatform playmode -testResults Tests/playmode-results.xml -enableCodeCoverage -coverageResultsPath Tests -debugCodeOptimization
timeout-minutes: 20

- name: Archive test results
uses: actions/upload-artifact@v2.2.3
uses: actions/upload-artifact@v2.2.4
if: always()
with:
name: Test results
Expand Down Expand Up @@ -100,6 +100,7 @@ jobs:
/d:sonar.verbose=false \
/d:sonar.login=$SONAR_TOKEN \
/d:sonar.host.url=https://sonarcloud.io \
/d:sonar.exclusions=Assets/Mirage/Runtime/Sockets/Udp/NanoSockets/** \
/d:sonar.cpd.exclusions=Assets/Tests/** \
/d:sonar.coverage.exclusions=Assets/Tests/** \
${{ steps.semantic.outputs.new_release_published == 'true' && format('/v:{0}',steps.semantic.outputs.new_release_version) || '' }} \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/request-activation-file.yml
Expand Up @@ -6,17 +6,17 @@ on:
jobs:
requestActivationFile:
runs-on: ubuntu-latest
container: unityci/editor:ubuntu-2020.1.17f1-base-0.10.0
container: unityci/editor:ubuntu-2020.3.17f1-base-0.15.0
steps:
- name: Request manual activation file
continue-on-error: true
run: unity-editor -logFile /dev/stdout -createManualActivationFile -quit

- name: Upload License Request
uses: actions/upload-artifact@v2.2.3
uses: actions/upload-artifact@v2.2.4
with:
name: Manual Activation File
path: Unity_v2020.1.17f1.alf
path: Unity_v2020.3.17f1.alf

- name: Next Steps
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
# Created by weaver tests
Assets/Tests/Weaver/**/CompilationLog.txt

# Created by performance test
Assets/StreamingAssets/
Assets/StreamingAssets.meta
Expand Down
1 change: 1 addition & 0 deletions .releaserc.yml
Expand Up @@ -7,6 +7,7 @@ plugins:
Assets/Mirage/Authenticators/AssemblyInfo.cs
Assets/Mirage/Components/AssemblyInfo.cs
Assets/Mirage/Runtime/AssemblyInfo.cs
Assets/Mirage/Editor/AssemblyInfo.cs
Assets/Mirage/Runtime/SocketLayer/AssemblyInfo.cs
Assets/Mirage/Samples~/AssemblyInfo.cs
Assets/Mirage/Samples~/RigidbodyPhysics/Scripts/AssemblyInfo.cs
Expand Down
2 changes: 1 addition & 1 deletion Assets/Mirage/Authenticators/AssemblyInfo.cs
@@ -1,3 +1,3 @@
using System.Reflection;

[assembly: AssemblyVersion("96.3.1")]
[assembly: AssemblyVersion("102.0.0")]
24 changes: 17 additions & 7 deletions Assets/Mirage/Authenticators/BasicAuthenticator.cs
Expand Up @@ -33,7 +33,7 @@ public class BasicAuthenticator : NetworkAuthenticator
/// </para>
/// <para>
/// You might want to use an accessToken or passwords. Be aware that the normal connection
/// in mirror is not encrypted so sending secure information directly is not adviced
/// in Mirage is not encrypted so sending secure information directly is not adviced
/// </para>
/// </summary>

Expand All @@ -53,13 +53,17 @@ struct AuthResponseMessage

#region Server Authenticate

/*
This region should is need to validate the client connection and auth messages sent by the client
*/
public override void ServerSetup(NetworkServer server)
{
// register messsage for Auth when server starts
// this will ensure the handlers are ready when client connects (even in host mode)

server.MessageHandler.RegisterHandler<AuthRequestMessage>(OnAuthRequestMessage);
}

public override void ServerAuthenticate(INetworkPlayer player)
{
// wait for AuthRequestMessage from client
player.RegisterHandler<AuthRequestMessage>(OnAuthRequestMessage);
}


Expand Down Expand Up @@ -107,10 +111,16 @@ IEnumerator DelayedDisconnect(INetworkPlayer player, float waitTime)

#region Client Authenticate

public override void ClientAuthenticate(INetworkPlayer player)
public override void ClientSetup(NetworkClient client)
{
player.RegisterHandler<AuthResponseMessage>(OnAuthResponseMessage);
// register messsage for Auth when client starts
// this will ensure the handlers are ready when client connects (even in host mode)

client.MessageHandler.RegisterHandler<AuthResponseMessage>(OnAuthResponseMessage);
}

public override void ClientAuthenticate(INetworkPlayer player)
{
// The serverCode should be set on the client before connection to the server.
// When the client connects it sends the code and the server checks that it is correct
player.Send(new AuthRequestMessage
Expand Down
20 changes: 15 additions & 5 deletions Assets/Mirage/Authenticators/TimeoutAuthenticator.cs
Expand Up @@ -40,6 +40,14 @@ private void HandleClientAuthenticated(INetworkPlayer player)
ClientAccept(player);
}

public override void ServerAuthenticate(INetworkPlayer player)
{
pendingAuthentication.Add(player);
Authenticator.ServerAuthenticate(player);
if (Timeout > 0)
StartCoroutine(BeginAuthentication(player, ServerReject));
}

public override void ClientAuthenticate(INetworkPlayer player)
{
pendingAuthentication.Add(player);
Expand All @@ -49,12 +57,14 @@ public override void ClientAuthenticate(INetworkPlayer player)
StartCoroutine(BeginAuthentication(player, ClientReject));
}

public override void ServerAuthenticate(INetworkPlayer player)
public override void ServerSetup(NetworkServer server)
{
pendingAuthentication.Add(player);
Authenticator.ServerAuthenticate(player);
if (Timeout > 0)
StartCoroutine(BeginAuthentication(player, ServerReject));
Authenticator.ServerSetup(server);
}

public override void ClientSetup(NetworkClient client)
{
Authenticator.ClientSetup(client);
}

IEnumerator BeginAuthentication(INetworkPlayer player, Action<INetworkPlayer> reject)
Expand Down

0 comments on commit 988641f

Please sign in to comment.