Exemplo n.º 1
0
 void Start()
 {
     Debug.Log("Program Started!");
     if (Application.isEditor)
     {
         Console.Clear();
         inputThread = new Thread(() =>
         {
             while (true)
             {
                 string input = Debug.ReadLine("Enter some text: ");
                 Debug.Log("Input received: " + input);
                 if (input == "quit")
                 {
                     Debug.Log("Stopped listening for input");
                     return;
                 }
             }
         });
         inputThread.Start();
         Debug.Log("Started Input");
     }
     else
     {
         Debug.Log("Input does not work in unity editor! Sorry!");
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     spamTimer += Time.deltaTime;
     if (spamTimer > 1f)
     {
         spamTimer -= 1f;
         Debug.Log("Heres some text");
     }
 }