Debugging trouble; C#
Hi, first time posting here, so please let me know if I'm violating any board rules or conventions.
I'm building a simple turn-based game, but I'm having trouble with some extremely basic debugging. The following code when executed does not output to debug log.
public class GameController : MonoBehaviour { public int turnMinTime; %|-1558955396_2|% %|-1463626505_3|% public Cult playerInstance; private float nextTurn; public float turnTime; public ArrayList regionNeighbors; // Use this for initialization void Start() { %|-996796450_11|% gameScore = 0; /* %|922789404_14|% %|387567164_15|% * */ %|1579185841_17|% Debug.Log("Enter"); // start our IEnumerator StartCoroutine(Turns()); } %|-1587691539_22|% { } /* * Code to be executed every turn * %|933489953_29|% IEnumerator Turns() { while (true) %|-217831537_33|% %|-808236179_34|% { //signal victory Debug.Log("Victory!"); %|-1579613339_38|% else if (playerInstance.LossCondition()) { Console.WriteLine("Defeat!"); } %|-1365641363_43|% %|-1950525721_44|% %|1551728546_45|% playerInstance.totalResources += 1; yield return new WaitForSecondsRealtime(turnTime); %|1942868746_48|% %|1165219743_49|% } }
Your answer
![](https://koobas.hobune.stream/wayback/20220612093716im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Assigning Values In Start () That Will Change 1 Answer
Why debugging menu is grayed 0 Answers
Is there a way to "Dubug.Log" which gameobject called a certain function? 3 Answers
How do you execute code every X angles reliably? 2 Answers
change a created transform in a script from another one 1 Answer