- Home /
Debug.Log() not working?
Hi guys, Im currently making a project using the latest version of unity and I have started to make my game based around servers using Photon Unity Networking, I have entered the following script into a CSharp Script and this is what it looks like:
**using UnityEngine;
using System.Collections;
public class NetworkManager : MonoBehaviour {
void Start () {
Connect ();
}
void Connect() {
PhotonNetwork.ConnectUsingSettings ( "v1.0.1" );
}
void OnGUI() {
GUILayout.Label( PhotonNetwork.connectionStateDetailed.ToString() );
}
void OnJoinedLobby() {
Debug.Log("OnJoinedLobby");
PhotonNetwork.JoinRandomRoom();
}
void OnPhotonRandomJoinFailed() {
Debug.Log("OnPhotonRandomJoinFailed");
PhotonNetwork.CreateRoom( null );
}
void OnJoinedRoom() {
Debug.Log("OnJoinedRoom");
}
}**
I know this is pretty basic but whenever I run this the script all works except the 'Debug.Log' parts where it simply does not log anything.
Thank you for helping!
P.S. At the start there are gaps between the 1st and 2nd line and inbetween all lines from 3rd to 6th, I did not out that into the script intentionally however the preview is a little bit strange and inconsistant (I'm a little OCD)
I made changes to check that the functions were called just to double check and they were called so no problem there, and I will soon check Debug.LogError!
Thanks for your help
EDIT: Just tried Debug.LogError and it also does not work? Sorry for this inconvenience!
It solved my problem though I didn't put question. Thanks anyway...!
Already were, but double checked anyway, still no result :?
Have you tried through the executable ? What does the output_log.txt say ?
Is this what you are looking for?:
04/08/2015 18:14:07.936 Console[73218]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable