↧
Answer by BPR
Hi, you are comparing a gameObject and a string, try to use col.gameObject.name or col.gameObject.tag instead Regards, BPR
View ArticleAnswer by Wrymn
You need to write it like this: function OnCollisionEnter(col : Collision) { if (col.collider.name == "Player" ) { Application.LoadLevel(1); } } or if you want to use it with TAG: function...
View ArticleAnswer by AcidDreamer
Thanks both for your answers.. It seems I cant set the unity correctly to behave according to the script...What I basicly did was adding this script to the a cube i wanted to use as a winpoint.. But...
View ArticleAnswer by Alzander2001
This is what i used for the next level portal: void OnTriggerEnter2D(Collider2D other) { if(other.gameObject.tag == "Player") { DontDestroyOnLoad(other.gameObject); Application.LoadLevel("ENTER...
View Article