Example #1
0
    public PhotonSocket(PhotonPlatform platform, UdpPlatform udpPlatform)
    {
        _platform    = platform;
        _udpPlatform = udpPlatform;

        if (_udpPlatform != null)
        {
            _udpSocket = _udpPlatform.CreateSocket();
        }
    }
Example #2
0
    public PhotonPlatform(PhotonPlatformConfig config)
    {
        _config = config;

        if (_config.UsePunchThrough)
        {
            // create platform
            _platform = BoltLauncher.CreateUdpPlatform();
        }
    }
Example #3
0
    // Platform Settings

    /// <summary>
    /// Set a custom UDP platform. Use this method only to set custom properties
    /// to your desired platform. By default, there is no need to change
    /// the platform, this is handled internally by Bolt.
    /// </summary>
    /// <param name="platform">Custom UdpPlatform</param>
    /// <example>
    /// This example show how to set a custom PhotonPlatform:
    /// <code>
    /// BoltLauncher.SetUdpPlatform(new PhotonPlatform(new PhotonPlatformConfig
    /// {
    ///     AppId = "your-app-id",
    ///     RegionMaster = "your-region",
    ///     UsePunchThrough = true, // set to false, to disable PunchThrough
    ///     MaxConnections = 32
    /// }));
    /// </code>
    /// </example>
    public static void SetUdpPlatform(UdpPlatform platform)
    {
        TargetPlatform = platform;
    }
Example #4
0
 public static void SetUdpPlatform(UdpPlatform platform)
 {
     BoltLauncher.UserAssignedPlatform = platform;
 }
Example #5
0
 public static void SetUdpPlatform(UdpPlatform platform)
 {
     UserAssignedPlatform = platform;
 }