Quantcast
Channel: Answers by "ThePersister"
Viewing all articles
Browse latest Browse all 99

Answer by ThePersister

$
0
0
Hi @Kennyist, This code ran fine for me: using UnityEngine; using System.Collections; namespace aNameSpace { public class Test : MonoBehaviour { private bool debug = true; void Update() { if( debug ) Debug.Log( "TEST" ); } } } The only thing I can imagine, although it's silly, is that you didn't **attach the monoBehaviour to any gameObject in the scene**. For Monobehaviour code to run, it must be active in the scene. If you know it's on a gameObject, check whether the gameObject as well as the script are enabled. And if that doesn't work, like @tanoshimi mentioned, **remove the dneTime constructor or add void**, but since you're not getting any errors, it's probably the former. I hope that helps out. If not, share more details and I'd be happy to help. If it did, please accept this answer, it'd be much appreciated! Have a nice day :)

Viewing all articles
Browse latest Browse all 99

Trending Articles