I’m just trying to figure out how to run scripts in Unity and how it’s all organized. I am trying to run this script.
using UnityEngine;
using System.Collections;
public class SetupGameboard : MonoBehaviour {
private int myInt = 5;
void Start ()
{
myInt = MultiplyByTwo(myInt);
Debug.Log (myInt);
Debug.LogError ("error");
Debug.LogWarning ("warning");
}
int MultiplyByTwo (int number)
{
int ret;
ret = number * 2;
return ret;
}
public void Update () {
Debug.Log("Test");
}
}
When I press play, nothing appears in the console. I’ve tried turning the info/warn/error flags on/off in the right side of the console, tried collapsing it (based on another answer). I’ve made sure my script is attached to an object in my game(I think it’s in my game, it appears when I press play). I tried to use the debugger, and it hit the breakpoint in the start method, but when I stepped over nothing happened. I wasn’t able to hit a breakpoint in the update method because it was greyed out for some reason.
I’m probably missing something very simple, so any help would be very appreciated.