Hi guys,
i have a strange error…
Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.TypeLoadException: Could not load type ‘System.Func`1’ from assembly ‘mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’.
the code is:
using UnityEngine;
using System.Collections;
public class NetworkManager : MonoBehaviour {
public Camera standbyCamera;
SpawnSpot[] spawnSpots;
// Use this for initialization
void Start ()
{
spawnSpots = GameObject.FindObjectsOfType<SpawnSpot>();
Connect ();
}
// Update is called once per frame
void Connect ()
{
PhotonNetwork.ConnectUsingSettings ("1.0");
}
void OnGUI ()
{
GUILayout.Label (PhotonNetwork.connectionStateDetailed.ToString ());
}
void OnJoinedLobby ()
{
PhotonNetwork.JoinRandomRoom ();
}
void OnPhotonRandomJoinFailed()
{
PhotonNetwork.CreateRoom (null);
}
void OnJoinedRoom()
{
SpawnMyPlayer ();
}
void SpawnMyPlayer ()
{
if (spawnSpots == null)
{
Debug.LogError ("HellStarted");
}
SpawnSpot mySpawnSpot = spawnSpots [Random.Range (0, spawnSpots.Length)];
PhotonNetwork.Instantiate("PlayerController", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation , 0);
standbyCamera.enabled = false;
}
}
i´d be very nice if you could help me <3