- Home /
Script won't execute on assigned 3d object but on simple cube
I am trying so interact with my 3d model that i have created and imported, but it doesn't quite work. Sorry for this noob question, but i am not knowing what i am doing wrong =/
I want to script to work on Propeller_00x but it doesn't execute, even though i have added the script component to propeller_00x. When i test the script on a simple cube created inside of Unity, the script runs like a charm. What am i doing wrong?
If you want to take a look at the testScript
public class testScript : MonoBehaviour
{
public int test = 0;
void OnMouseOver() {
test++;
}
void OnMouseExit() {
test = 0;
}
}
SOLVED !!
Apparently i needed to add to my 3d model a "$$anonymous$$esh Collider".
Your answer
Follow this Question
Related Questions
how to view 3d model fully controllable in unity 5 0 Answers
how do I assign a prefab's child to another prefab's script's public variable? 1 Answer
How to keep a moving object at the height of the terrain? (script) 2 Answers
making models move correctly 1 Answer
How can I make a flexible object? (rod or cylinder type) 0 Answers