@exsa1det

Не могу понять почему ошибка cs1003?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;

public class lobby : MonoBehaviourPunCallbacks;
{

public class Launcher : MonoBehaviour
{
#region Private Serializable Fields

#endregion

#region Private Fields

/// <summary>
/// This client's version number. Users are separated from each other by gameVersion (which allows you to make breaking changes).
/// </summary>
string gameVersion = "1";

#endregion

#region MonoBehaviour CallBacks

/// <summary>
/// MonoBehaviour method called on GameObject by Unity during early initialization phase.
/// </summary>
void Awake()
{
// #Critical
// this makes sure we can use PhotonNetwork.LoadLevel() on the master client and all clients in the same room sync their level automatically
PhotonNetwork.AutomaticallySyncScene = true;
}

/// <summary>
/// MonoBehaviour method called on GameObject by Unity during initialization phase.
/// </summary>
void Start()
{
Connect();
}

#endregion

#region Public Methods

/// <summary>
/// Start the connection process.
/// - If already connected, we attempt joining a random room
/// - if not yet connected, Connect this application instance to Photon Cloud Network
/// </summary>
public void Connect()
{
// we check if we are connected or not, we join if we are , else we initiate the connection to the server.
if (PhotonNetwork.IsConnected)
{
// #Critical we need at this point to attempt joining a Random Room. If it fails, we'll get notified in OnJoinRandomFailed() and we'll create one.
PhotonNetwork.JoinRandomRoom();
}
else
{
// #Critical, we must first and foremost connect to Photon Online Server.
PhotonNetwork.ConnectUsingSettings();
PhotonNetwork.GameVersion = gameVersion;
}
}

#endregion

}

}
  • Вопрос задан
  • 36 просмотров
Пригласить эксперта
Ответы на вопрос 1
@Ezekiel4
Охотник на пиратов и сборщик монолитов
В следующий раз, пожалуйста, оформите код при помощи соответствующего тега и приведите текст ошибки. Пока что могу сказать, что вот в этой строке содержится лишняя точка с запятой:
public class lobby : MonoBehaviourPunCallbacks; {
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы