Answer the question
In order to leave comments, you need to log in
Why doesn't the script work if it's correct?
I'm trying to imitate real programming, so I break everything into different scripts, but here's the problem. The simplest code works if it is in a script with a character control, but if I write it in another script and also hang it on the character object, like the controller, then it stops working, there is no call to it, as far as I understand. The code is the simplest. (prefab substituted in unity)
public class PutDown : MonoBehaviour
{
public GameObject prefab;
public void start() {
Instantiate(prefab);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question