Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

DontDestroyOnLoad problem

$
0
0
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

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>