浏览代码

Merging from main to check compatibility

/main/staging/429_cooldown_implementation
当前提交
8957a190
共有 8 个文件被更改,包括 24 次插入45 次删除
  1. 19
      Assets/Prefabs/UI/CreateContent.prefab
  2. 14
      Assets/Prefabs/UI/LobbyGameCanvas.prefab
  3. 12
      Assets/Prefabs/UI/RenamePopup.prefab
  4. 1
      Assets/Scripts/Lobby/LobbyAsyncRequests.cs
  5. 1
      Assets/Scripts/Relay/RelayUtpClient.cs
  6. 13
      Assets/Scripts/Relay/RelayUtpSetup.cs
  7. 7
      Assets/Scripts/Tests/PlayMode/LobbyRoundtripTests.cs
  8. 2
      Assets/Scripts/Tests/PlayMode/RelayRoundTripTests.cs

19
Assets/Prefabs/UI/CreateContent.prefab


m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3939988936382120653}
m_RootOrder: 1

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3939988936382120653}
m_RootOrder: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3818918250242346738}
m_Father: {fileID: 0}

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
--- !u!1 &4576592091429739648
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4388255649222666380}
m_RootOrder: 0

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSize: 29.35
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4903988224507325461}
m_Father: {fileID: 8663650026319491498}

m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3818918250242346738}
m_RootOrder: 3

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8533460643281418118}
- {fileID: 5962604622760643426}

m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8663650026319491498}
m_RootOrder: 1

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4702713106716681505}
- {fileID: 8866965904304086500}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3818918250242346738}
m_RootOrder: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8677466241086514681}
- {fileID: 7623034069078291411}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2914824860568159748}
m_Father: {fileID: 3818918250242346738}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3939988936382120653}
m_Father: {fileID: 3818918250242346738}

m_CharacterValidation: 0
m_RegexValue:
m_GlobalPointSize: 35
m_CharacterLimit: 0
m_CharacterLimit: 20
m_OnEndEdit:
m_PersistentCalls:
m_Calls: []

m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4702713106716681505}
m_RootOrder: 0

14
Assets/Prefabs/UI/LobbyGameCanvas.prefab


m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1, y: 5}
m_SizeDelta: {x: 300, y: 50}
m_SizeDelta: {x: 500, y: 50}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2177115228008557851
CanvasRenderer:

m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'ServerName
m_text: 'LobbyName
'
m_isRightToLeft: 0

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSize: 35.8
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_enableAutoSizing: 1
m_fontSizeMin: 20
m_fontSizeMax: 36
m_VerticalAlignment: 256
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0

12
Assets/Prefabs/UI/RenamePopup.prefab


m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4299827590990313863}
m_RootOrder: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 754765198059719065}
- {fileID: 4300767933049215827}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4582680168689072900}
m_Father: {fileID: 1113109783147550039}

m_CharacterValidation: 0
m_RegexValue:
m_GlobalPointSize: 30
m_CharacterLimit: 32
m_CharacterLimit: 24
m_OnEndEdit:
m_PersistentCalls:
m_Calls:

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1205332528783832187}
- {fileID: 4299827590990313863}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4582680168689072900}
m_RootOrder: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4582680168689072900}
m_RootOrder: 1

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8624457953407905706}
m_Father: {fileID: 0}

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
--- !u!1 &8624457953407905705
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1113109783147550039}
m_Father: {fileID: 8624457953394683849}

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 557953118367534400}
m_Father: {fileID: 1113109783147550039}

1
Assets/Scripts/Lobby/LobbyAsyncRequests.cs


{
m_currentLobbyId = null;
m_lastKnownLobby = null;
m_heartbeatTime = 0;
}
private void UpdateLobby(float unused)

1
Assets/Scripts/Relay/RelayUtpClient.cs


m_localUser.onChanged -= OnLocalChange;
Leave();
Locator.Get.UpdateSlow.Unsubscribe(UpdateSlow);
m_networkDriver.Dispose();
}
public void OnDestroy()
{

13
Assets/Scripts/Relay/RelayUtpSetup.cs


}
}
#endregion
private void OnDestroy()
{
if (!m_isRelayConnected && m_networkDriver.IsCreated)
m_networkDriver.Dispose();
}
}
/// <summary>

}
else
{
RelayUtpClient watcher = gameObject.AddComponent<RelayUtpClient>();
watcher.Initialize(m_networkDriver, m_connections, m_localUser, m_localLobby);
m_onJoinComplete(true, watcher);
m_isRelayConnected = true;
RelayUtpClient client = gameObject.AddComponent<RelayUtpClient>();
client.Initialize(m_networkDriver, m_connections, m_localUser, m_localLobby);
m_onJoinComplete(true, client);
LobbyAsyncRequests.Instance.UpdatePlayerRelayInfoAsync(m_allocation.AllocationId.ToString(), m_localLobby.RelayCode, null);
}
}

7
Assets/Scripts/Tests/PlayMode/LobbyRoundtripTests.cs


using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Unity.Services.Lobbies;
using Unity.Services.Lobbies.Models;
using UnityEngine;

public void Teardown()
{
m_auth?.Dispose();
LogAssert.ignoreFailingMessages = false;
}
/// <summary>

public IEnumerator DoRoundtrip()
{
#region Setup
LogAssert.ignoreFailingMessages = true; // Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
// Wait a reasonable amount of time for sign-in to complete.
if (!m_didSigninComplete)
yield return new WaitForSeconds(3);

// Some error messages might be asynchronous, so to reduce spillover into other tests, just wait here for a bit before proceeding.
yield return new WaitForSeconds(3);
LogAssert.ignoreFailingMessages = false;
}
/// <summary>

public IEnumerator OnCompletesOnFailure()
{
LogAssert.ignoreFailingMessages = true;
LogAssert.Expect(LogType.Exception, new Regex(".*400 Bad Request.*"));
if (!m_didSigninComplete)
yield return new WaitForSeconds(3);
if (!m_didSigninComplete)

2
Assets/Scripts/Tests/PlayMode/RelayRoundTripTests.cs


public void Teardown()
{
m_auth?.Dispose();
LogAssert.ignoreFailingMessages = false;
}
/// <summary>

[UnityTest]
public IEnumerator DoBaseRoundTrip()
{
LogAssert.ignoreFailingMessages = true;
if (!m_didSigninComplete)
yield return new WaitForSeconds(3);
if (!m_didSigninComplete)

正在加载...
取消
保存