I cant tell whether im just being stupid or my unity is broken. I’ve watched almost every tutorial i can find and this always seems to work for them. here is my script;
using UnityEngine;
using System.Collections;
public class collectables : MonoBehaviour {
public bool test;
// Use this for initialization
void Start ()
{
test = false;
}
// Update is called once per frame
void Update ()
{
}
void OnCollisionEnter(Collision other)
{
if (other.gameObject.name == ("Cube"))
{
test = true;
}
}
}
thanks
Brilliant checklist :D
– LeoGurung