Hello there.
I have recently started learning Unity and have come across a very frustrating problem. I was learning some basic scripting on built in default game objects and thought I’d try them on imported 3D objects. So I switched over to Cinema 4D, created a simple sphere and exported it as a .obj
I imported the 3D object to unity, dragged the object to my scene and attached a very simple script to it.
function OnMouseDown () {
Debug.Log("It works!");
}
The problem is, it doesn’t work. Unity isn’t calling the click. The script worked perfectly fine attached to built in game objects provided by Unity, but attached to anything else and it’s like the script freezes. I tried exporting the Cinema 4D object as a simple .fbx , and that didn’t work. I even tried importing the object as a .c4d and unfortunately didn’t fix the problem, either.
What did I miss?
Any help would be much appreciated.
Ps. I’m using Unity Pro.