Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: stigma on March 08, 2015, 01:02:50 PM

Title: problem with Unity 5
Post by: stigma on March 08, 2015, 01:02:50 PM
Hello,
Many things do not work since I upgraded to version 5.
Set Property: More Audio.mute, renderer.material.shader, sefl-Illumine / Diffuse etc ....
I'm 1.7.7.f6 and I installed the 1.7.8 extension but the number always indicates 1.7.7.f6
May Day.
thank you
(http://www.maximages.fr/forums/3D/playmaker/renderer.jpg)
Title: Re: problèmes avec Unity 5
Post by: jeanfabre on March 08, 2015, 02:27:54 PM
Hi,

 Yes, the version number remains 1.7.7 even if it's 1.8. This is unfortunate, I agree.

you have to target the component itself, not the Gameobject, everything is fine with Set Property, even in Unity 5. you simply dragged the GameObject instead of the component you wanted to set property.

watch this to understand how to work with Set Property


Bye,

 Jean

 Bye,

 Jean
Title: Re: problèmes avec Unity 5
Post by: stigma on March 09, 2015, 04:55:36 AM
It's not work. I drag the componant but I don't find "Light.Enabled" for a light !!!!
I saw the video but i'm lost!!!! grrrr
Title: Re: problèmes avec Unity 5
Post by: jeanfabre on March 10, 2015, 02:34:58 AM
Hi,

 We'll solve this, don't worry :)

Ok, first off, for "Enabling" a component, you have an action ready made for this "Enable Behavior", so don't use "set property" is there is an action covering this case.

 Where are you lost in the video? are you able to drag the light component onto the "Set Property" action field? does it properly inform you that you are now setting the properties of a light component?

 Bye,

 Jean
Title: Re: problem with Unity 5
Post by: stigma on March 10, 2015, 03:35:06 AM
I really tried to fix it but I can not find the actions I need. I have over 100 "set property" anywhere in my project (2 years of work). If I need to change in hand, I'm depressed. I hope everything will be fine in a future update.
Title: Re: problem with Unity 5
Post by: jeanfabre on March 10, 2015, 06:00:14 AM
Hi,

Ok, let's take one problem at a time.

Can you locate "Enable Behavior" action? can you make it work in place of the set property you used to enabled disable components?

 100 places is really nothing to update when you move to a new version of a system. Trust me... so take it one step at a time, and you'll get over this.

now, once this enabling behavior is fixed, what other set property isn't working?

 Bye,

 Jean
Title: Re: problem with Unity 5
Post by: Lane on March 10, 2015, 10:14:22 AM
Always backup before upgrading. Determine if it is even worth the trouble after taking a look at the problems that the upgrade presents. Versioning is critical.

With your actions here that have lost their references... What type of components are you targeting? And are you targeting the GameObject, then navigating to a sub component or targeting the component directly like we outline in the video tutorials? It's possible that the way Unity 5 changed component references that the way you're trying to do this that 4.x would allow is no longer allowed in 5.0.
Title: Re: problem with Unity 5
Post by: stigma on March 10, 2015, 10:47:39 AM
as said above, it lacks
Audio.mute, renderer.material.shader, sefl-Illumine / diffuse
Title: Re: problem with Unity 5
Post by: Lane on March 10, 2015, 11:00:59 AM
Unfortunately Unity has removed those and they can't be accessed through the GameObject but rather must be accessed the same way that all other components are accessed.

You can do so by directly dragging the component into the field or dynamically using Get Component on a GameObject. For instance if you want the renderer component, you have to target the renderer component and not the GameObject that hosts it. This is an API change in Unity 5.

You can see how it works in this video (https://www.youtube.com/watch?v=bel6xkUuKqQ).
Title: Re: problem with Unity 5
Post by: stigma on March 11, 2015, 03:40:06 AM
I understand the problem. Thank you for the explanations