Script wont execute unless selected in editor - Unity 2018.3.6
I have a script in my scene that is logically sound but does not execute. This issue stops occurring if the GameObject containing the script is selected in the hierarchy at the time the code was supposed to be executed. Has anyone ever experienced this issue? If so how did you get around it?
Answer by Bunny83 · Aug 14, 2019 at 11:26 PM
"scripts" do not run because a script represents a class. That class might contain callback methods which might be called by Unity. Your question is way too vague to be answered, Do you actually talk about a common runtime callback like Update, Start or Awake? Or do you talk about something else like the ISerializationCallbackReceiver interface or anything else related to editor code? What have you tried to narrow down your issue? Can you reproduce it with a simple script in an otherwise empty project? What kind of answers do you expect to get with such an unspecific question?
Please edit your question and be more precise about your issue.
Your answer
Follow this Question
Related Questions
Making an object drop when screen is touched 1 Answer
Add object using other scene,Change something in scene from the menu 2 Answers
How to add a script to a parent object and not every individual child object. 1 Answer
How do I change a int from a different script? 0 Answers
How to make a ladder script 0 Answers