playMaker

Author Topic: Need gui buttons  (Read 1426 times)

pakmafia

  • Playmaker Newbie
  • *
  • Posts: 6
Need gui buttons
« on: September 19, 2016, 09:47:59 AM »
I have a charecter with various animations that responds to keys such as
Code: [Select]
if(Input.GetKeyDown ("2")){
if(myAnimator.GetInteger ("CurrentAction") == 0){
myAnimator.SetInteger ("CurrentAction", 2);
} else if (myAnimator.GetInteger ("CurrentAction") == 2){
myAnimator.SetInteger ("CurrentAction", 0);
}
so when key 2 is pressed it performs a certain animation

Now i want to use touch buttons instead as i intend to make android game.

what would be the best approach for this?

if i can use send message action? if so what will be the method name from the code above?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Need gui buttons
« Reply #1 on: September 19, 2016, 11:50:33 AM »
Hi,
You should get "Ugui Proxy Full" from the Ecossystem

And here is a tutorial video you can watch :)

pakmafia

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need gui buttons
« Reply #2 on: September 19, 2016, 11:56:25 AM »
Thanks i had a quick look at the ecosystem and it looks a very useful tool I will certainly look into it more. but for now i have just edited my c#code instead not using playmaker.
Code: [Select]
if (GUI.Button(new Rect(10, 10, 100, 50), "Punch") || (Input.GetKeyUp("2")))and rest remains the same. cheers