Debug.Log();
to help you identify errors or to gain helpful information about your scriptsDebug.Log("Hello");
String welcomeString = "Hello";
Debug.Log(welcomeString);
You can also debug any value just as the welcomeString
variable from above.
Vector3 alphaVector = Vector3.one;
Debug.Log(alphaVector.x);
LogWarning();
and LogError();
for important logsDebug.LogWarning("Warning");
Debug.LogError("Error");
Will force the editor to ⏯️Pause
at end of that frame.
if(Input.GetMouseButtonDown(0)){
//FireRocket
Instantiate(rocketPrefab);
Debug.Log("<color=orange>RocketFired!</color>");
Debug.Break();
}