Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fahrettin on May 27, 2015, 07:38:05 AM

Title: Set Property Reset (SOLVED)
Post by: Fahrettin on May 27, 2015, 07:38:05 AM
I use Set Property action with dropping "Text Component" to the State area. It works without problem. When i close unity and reopen it i see my Set Property action is empty. Same scene, same prefab, same variables. I dont destroy that object.
Unity version 4.6.4f1
Playmaker 1.7.8.3
Title: Re: Set Property Reset
Post by: Lane on May 27, 2015, 07:46:04 AM
Are you trying to target the Prefab? You cannot edit prefabs like that, you have to actually create something in the scene, then target that.
Title: Re: Set Property Reset
Post by: Fahrettin on May 27, 2015, 03:56:42 PM
Yes it is a prefab but my prefab is on the scene. FSM Component is on the prefab. I am changing a Text on nonprefab gameobject. It is on the scene too.
Title: Re: Set Property Reset
Post by: Lane on May 27, 2015, 04:12:03 PM
So do you get a reference to the scene object after you put your prefab in the scene? Whats the flow here?

If you spawn a prefab in at runtime then you have to also get any references to scene objects at runtime. If you tell a prefab (in the scene) to target a scene object in editor mode then it is no longer a prefab, it is an Instance of a prefab. If you Applied those changes to the Prefab in the project hierarchy then the connection between the live scene object and the Prefab would break. Unity sometimes allows the connections to exist in appearance, but it always breaks them when they are actually processed.
Title: Re: Set Property Reset
Post by: Fahrettin on May 27, 2015, 04:29:01 PM
I got it now. I changed my prefab on scene view with edit instance. Now it stays there. Connection isnt broken :) It works on scene but when i click apply it shows empty on project view but it isnt important i think.
Thanks Lane