playMaker

Author Topic: UGui proxy component not working[SOLVED]  (Read 4108 times)

zelmund

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: UGui proxy component not working
« Reply #15 on: February 03, 2016, 08:50:44 AM »
i found the problem by deleting scripts. will try to explain.

we have a script with this stroke:
public class Button : MonoBehaviour, IDigitalInputDevice{.....

and your script PlayMakerUGuiComponentProxyInspector.cs have this stroke:
if (_target.UiTarget.GetComponent<Button>() != null)


our programmers said that proxy will not wok because of namespace. so we need to change in plamaker script this:
if (_target.UiTarget.GetComponent<Button>() != null)
to this:
if (_target.UiTarget.GetComponent<UnityEngine.UI.Button>() != null)

then doesnt matter who will add any classes with same name, your proxy will work in any cases.

what do you think about it? i tried this option and its finaly woking now  ;D

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: UGui proxy component not working
« Reply #16 on: February 03, 2016, 08:06:26 PM »
Quote
we have a script with this stroke:
public class Button : MonoBehaviour, IDigitalInputDevice{.....

This script should really be using a namespace. Button is too generic to live in the global namespace, it's only going to cause more problems down the line...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: UGui proxy component not working
« Reply #17 on: February 03, 2016, 11:42:13 PM »
Hi,

 Yes, Typical names like Button will always be tricky to handle.

 I will change it on my side, but As Alex said, I strongly suggest you also create your own namespace for your project's specific classes to avoid clashes with other assets.

Bye,

 Jean

zelmund

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: UGui proxy component not working[SOLVED]
« Reply #18 on: February 04, 2016, 02:44:52 AM »
im not programmer myself, but i dont understand why our programmers not using their own namespace also.
i will ask them about it too.