Author Topic: UIButton OnClick function with a string parameter shows as "object"  (Read 2917 times)

Mastro

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 8
    • View Profile
I wanted by button to call a function in a script to load the next scene.

Not sure if this is the best way but I created an empty gameobject and dragged my script on it. It has a public function and a parameter for string levelName.  However when I point to that object in the UIButton and that method, the arg0 wants an object and I can't type in the value in the designer. Using nGui 3.6.0
« Last Edit: May 20, 2014, 11:46:32 AM by Mastro »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You can only find it to a property, such as game object's name. You can't specify a value directly by typing it.