I have this code that does not work:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class inmortal : MonoBehaviour {
float a;
void awake(){
DontDestroyOnLoad(gameObject);
iniciobutom ball2 = GetComponent ();
a = ball2.ball1;
}
}
but this one work :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class inmortal:MonoBehaviour{
void Awake () {
DontDestroyOnLoad(gameObject);
Debug.Log (“awake called”);
}
}
WHY ? what can I change to make it work P.S I’m new