This commit is contained in:
Даниил Заикин
2026-06-17 20:44:53 +03:00
parent 9d153773c2
commit b133e7c656
1880 changed files with 244545 additions and 0 deletions
@@ -0,0 +1,24 @@
using Unity.Services.Multiplayer;
using UnityEngine;
namespace Blocks.Sessions
{
[CreateAssetMenu(fileName = nameof(QuickJoinSettings), menuName = "Services/Blocks/Session/" + nameof(QuickJoinSettings))]
public class QuickJoinSettings : ScriptableObject
{
[Header("QuickJoinSettings")]
[Tooltip("The timeout in seconds for the quick join to stop trying to join and either fail or create its own session is createSession is true.")]
public float timeout = 5f;
[Tooltip("If true, the quick join will create a session if it cannot find one to join withing the given timeout time frame.")]
public bool createSession = true;
public QuickJoinOptions ToQuickJoinOptions()
{
return new QuickJoinOptions
{
Timeout = System.TimeSpan.FromSeconds(timeout),
CreateSession = createSession
};
}
}
}