Il will start a script while i press a Button
Il will start a script while i press a Button Please help Thank you in advance.
Answer by adnanshaukat-uol · Mar 01, 2017 at 11:35 AM
take an empty gameObject and apply a script on it which you want to run. turn that gameobject off from the hierarchy. now make a button and in onclick of this button pass that empty gameobject and select gameobject.setactive booean and check the box. i hope it helps
Your answer
Follow this Question
Related Questions
Using downloaded image as UI Image's source image? 1 Answer
Best way to simplify this code 1 Answer
Unity 5.3 UI Button wont set Select state via script after the parent has been set inactive 0 Answers
Better way to edit RawImage texture data?,Better way to edit a RawImage texture? 0 Answers
Pause menu done exactly according to tutorial doesen't work 2 Answers