Question by
clay53_clayton · Jul 04, 2016 at 01:04 AM ·
bugbugsbug report
When using a Gameobject variable in a public void in C# it does not show up in button(script)
How do I fix this?
Comment
Answer by Jessespike · Jul 04, 2016 at 06:34 PM
This works, so you must be missing something. Did you set up the OnClick Object reference correctly? Is the OnClick object reference linked to an existing GameObject or are you referencing the script directly? Typos or scripting errors maybe?
this is how I set it up
public void Translate (GameObject outputGameObject) {
}
but when I go into the button(script) component and go under the script class my public void Translate doesn't show up, but when I take out the GameObject variable it does.
Your answer
Follow this Question
Related Questions
Is this a bug or im doing something wrong? 2 Answers
Unity 5.6.2f1 Crashes on loading a project [FIXED] 3 Answers
unity start but doesnt open 0 Answers
Big bug in all materials 0 Answers