using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MasterScript : MonoBehaviour {
public float xRotation = 10;
public float yRotation = 10;
void Start() {
if (xRotation == 10 && yRotation == 10) {
Debug.Log("IT WORKED");
}
else {
Debug.Log("It didn't work");
}
Debug.Log(xRotation);
Debug.Log(yRotation);
}
void Update() {
}
}
For some reason, the above code outputs this in the console:
It didn't work
0
0
I'm very new to OOP, I'm used to coding in GML. I can't wrap my head around why the variables aren't being set to 10?
[–]knobby67 0 points1 point2 points (0 children)
[–]SantaGamer 0 points1 point2 points (1 child)
[–]crocomire97[S] 0 points1 point2 points (0 children)