Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: turritom on March 10, 2015, 06:39:05 AM

Title: Set Property in Unity 5
Post by: turritom on March 10, 2015, 06:39:05 AM
i try to convert my Unity 4 Projekt to Unity 5 .. here i use the Set Property often.

you will see in the screenshots ..that in unity 5 the set property choice are diferent ..and in unity 5 the set property content are not assumed

unity 4

https://dl.dropboxusercontent.com/u/514672/unity4_property.JPG

unity 5

https://dl.dropboxusercontent.com/u/514672/unity5_property.jpg

where are the rigidbody propertys ;) ???

thank you very much
Thomas
Title: Re: Set Property in Unity 5
Post by: Alex Chouls on March 10, 2015, 10:11:02 AM
Unity 5 removed these properties  :-\

Instead you now have to drag the component itself into the Target Object field (not the GameObject)

These component properties were removed to make the engine more modular. With GameObject always referencing all these components it would be impossible to do things like strip out Physics if it's not used etc.

So it's a good thing in the long run, but will definitely cause some confusion in the short term!
Title: Re: Set Property in Unity 5
Post by: turritom on March 10, 2015, 10:25:24 AM
okay thanks for your reply

i have found a solution: if you want to set property in a gameobject from another gameobject ... you must add first a fsm to the gameobject do you want to set , for example the gravity, then drag and drop the rigidbody to the state ..then set property ..and then copy and paste this to the gameobject from where you want to activate or deactivate the gravity :) i hope this is understandable ....my english ist not the best :D
Title: Re: Set Property in Unity 5
Post by: jeanfabre on March 11, 2015, 03:14:24 AM
Hi,

 Made a troubleShoot (https://hutonggames.fogbugz.com/default.asp?W624) entry for this, as it will create lots of frustration and confusion.

 Bye,

 Jean
Title: Re: Set Property in Unity 5
Post by: Lane on March 11, 2015, 07:16:34 AM
okay thanks for your reply

i have found a solution: if you want to set property in a gameobject from another gameobject ... you must add first a fsm to the gameobject do you want to set , for example the gravity, then drag and drop the rigidbody to the state ..then set property ..and then copy and paste this to the gameobject from where you want to activate or deactivate the gravity :) i hope this is understandable ....my english ist not the best :D

Use the Lock button at the top center of the Fsm Graph View to lock the view to that GameObject, then you can freely select a different GameObject and drag the component to the Fsm.
Title: Re: Set Property in Unity 5
Post by: turritom on March 12, 2015, 04:57:57 AM
thanks a Lot! i will try it today at the evening :)
Title: Re: Set Property in Unity 5
Post by: szomaza on July 09, 2015, 01:32:23 AM
Hi,

I am using set property in a prefab.
(After the prefab is created I get the rigid body component of a game object stored in a global variable. Then I get the HingeJoint component of the prefab just created and finally set property of the prefabs' Hinge Joint's connectedBody to the RigidBody of the object stored in the global variable.)
I hope this is understandable.  :-)

In short: spawning prefabs and connecting them, physically, to an already existing game object.

Am I right that in Unity 5 I will not be able to fix this?
I can't drag components of other game objects into an FSM of a prefab , as the prefab will not store these.

Please clarify this for me and help in figuring out a workaround.

Thanks in advance,
szomaza
Title: Re: Set Property in Unity 5
Post by: szomaza on July 25, 2015, 04:58:16 AM
So going from Unity 4 to 5 it is pretty hard to locate all the Set and Get Properties that have gone missing. Se attached image.
Could there be an error or warning message from playmaker that would help you jump to the states with such problems?

Of course sometimes you want to set properties to "none", so it won't always be an error.

In the troubleshoot entry you write: "... Components like RigidBodies have been removed from the Default GameObject set of properties"

An exact list of things that are now removed might also help in locating them.

But a list of warnings would be the best:
Property not set (set to "none"). Are you sure? Click to jump to state.

Br,
szomaza