Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: zelmund on January 28, 2016, 06:08:09 AM

Title: UGui proxy component not working[SOLVED]
Post by: zelmund on January 28, 2016, 06:08:09 AM
started by this tutorial and noticed that after attaching playmaker UGui component proxy i git this error: "UI Target is not a valid UI component"

what i should to do?

working in unity 5.3.1 with playmaker 1.8
Title: Re: UGui proxy component not working
Post by: zelmund on January 28, 2016, 06:41:02 AM
its working with toggle ui
but button is dead for some reason
maby its a naming convention somewhere?
Title: Re: UGui proxy component not working
Post by: zelmund on January 28, 2016, 10:40:19 AM
anyone got this problem? cant fix it still  :( project stuck
Title: Re: UGui proxy component not working
Post by: zelmund on January 29, 2016, 08:55:50 AM
any news about proxy?
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 01, 2016, 04:42:00 AM
Hi,

 It works here, on all versions I tests and work with, the screenshot is from 5.3.1 f1

(http://i.imgur.com/0OrW43A.png)

Can you start a fresh project, with just playmaker and uGui package and see how it behaves?

Bye,

 Jean

Title: Re: UGui proxy component not working
Post by: zelmund on February 01, 2016, 04:51:55 AM
ok. it working on Unity 5.3.2p1 with PM 1.8.0 rc41
testing in project now.
Title: Re: UGui proxy component not working
Post by: zelmund on February 01, 2016, 05:04:33 AM
tested in project... not working. maybe i deleted previous version not correctly? i deleted all playmaker files and reimported it, but useless.
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 01, 2016, 05:35:30 AM
Hi,

 ok, this is 5.3.2 so maybe there's a change in that version, I only have 5.3.1

 check back on 5.3.1 and let me know. meanwhile I'll install 5.3.2 ( will take time, not before tomorow, my connection is slow...)

 Bye,

 Jean
Title: Re: UGui proxy component not working
Post by: zelmund on February 01, 2016, 06:04:49 AM
it happens from 5.3.1f1 to current patch. checked it while we did upgrade project.
cant do screenshots with that but, because i need to convert all project back to that version. project is very heavy (around 70 gigs).

but again. its ok in clear project. all works fine.
dont understand what can affect on playmaker that can brake proxy.
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 01, 2016, 06:16:47 AM
Hi,

The proxy is not related to PlayMaker directly, I am not sure what can cause the proxy to fail to catch a Unity UI Button...

like so:

(http://i.imgur.com/i7DB2gT.png)


Bye,

 Jean
Title: Re: UGui proxy component not working
Post by: zelmund on February 01, 2016, 07:26:23 AM
yes. that what i saw in unity4 some time ago. will try to import in clear project some tools from main project. will see what happens and when it will broke.

btw, i opened plamaker UI changelog, version is 1.1.3, is that correct?
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 01, 2016, 09:14:22 AM
Hi,

 it should be 1.1.4 but it won't make a difference for your problem I feel.

Bye,

 Jean
Title: Re: UGui proxy component not working
Post by: zelmund on February 02, 2016, 06:27:48 AM
hi again.
yesterday i had some strange warnings from playmaker. something about reflections. cant repropduce it now, but seems our own scripts and dlls causing problems. our programmers blaming everything exept their code (because they are programmers...). but maybe you can tell, could it be problems with reflections in code?
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 02, 2016, 10:18:33 AM
Hi,

 could be that they created a "Button" class and it clashes with UnityEngine.UI.Buttom class.

 but it's unlikely, I am puzzled indeed. I am not too sure however if you tested this in a clean project, because you mentionned your own scripts.

Bye,

 Jean
Title: Re: UGui proxy component not working
Post by: zelmund on February 02, 2016, 10:49:13 AM
i suspect the same about button conflict. will try to get this info from programmers.
Title: Re: UGui proxy component not working
Post by: zelmund on February 03, 2016, 10: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
Title: Re: UGui proxy component not working
Post by: Alex Chouls on February 03, 2016, 10: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...
Title: Re: UGui proxy component not working
Post by: jeanfabre on February 04, 2016, 01:42:13 AM
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
Title: Re: UGui proxy component not working[SOLVED]
Post by: zelmund on February 04, 2016, 04: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.