playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Set Property problem [SOLVED - OVERTURNED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Set Property problem [SOLVED - OVERTURNED] (Read 2989 times)
PolyMad
Hero Member
Posts: 545
Set Property problem [SOLVED - OVERTURNED]
«
on:
March 29, 2013, 05:27:49 PM »
I use EZGUI for text, I have an FSM with a Set Property on which I set the EZGUI text.
Everything works fine, but when I close Unity and reopen it, the connection to the EZGUI object/property is totally lost.
What's going on here?
«
Last Edit: March 30, 2013, 11:14:49 PM by megmaltese
»
Logged
Alex Chouls
Administrator
Hero Member
Posts: 4002
Official Playmaker Support
Re: Set Property problem
«
Reply #1 on:
March 29, 2013, 06:18:09 PM »
Are you referencing a scene object from a prefab?
Logged
PolyMad
Hero Member
Posts: 545
Re: Set Property problem
«
Reply #2 on:
March 29, 2013, 07:06:48 PM »
Yes
And the scene object referenced is a child of a prefab too
«
Last Edit: March 30, 2013, 02:06:02 PM by megmaltese
»
Logged
PolyMad
Hero Member
Posts: 545
Re: Set Property problem
«
Reply #3 on:
March 30, 2013, 11:14:12 PM »
I managed to overturn the problem and the code is even more clear!
I have moved the SET PROPERTY action INTO the object that must be changed itself, and used the SEND EVENT to activate the state with the SET PROPERTY action!
Am I a genius?
Logged
Alex Chouls
Administrator
Hero Member
Posts: 4002
Official Playmaker Support
Re: Set Property problem [SOLVED - OVERTURNED]
«
Reply #4 on:
March 31, 2013, 02:09:26 PM »
Yes
Logged
PolyMad
Hero Member
Posts: 545
Re: Set Property problem [SOLVED - OVERTURNED]
«
Reply #5 on:
March 31, 2013, 02:32:18 PM »
No really, that's the solution and it's ok.
But what if I HAVE TO reference a game object from a prefab?
Not possible?
Can you explain how to use it from prefabs?
Logged
Alex Chouls
Administrator
Hero Member
Posts: 4002
Official Playmaker Support
Re: Set Property problem [SOLVED - OVERTURNED]
«
Reply #6 on:
March 31, 2013, 02:35:10 PM »
It's a limitation of Unity. Prefabs cannot save references to scene objects. So you need to find the scene objects at runtime and store them in vairables. You can find by name, tag, child of an object, raycast etc. it depends on the situation...
Logged
PolyMad
Hero Member
Posts: 545
Re: Set Property problem [SOLVED - OVERTURNED]
«
Reply #7 on:
March 31, 2013, 08:49:36 PM »
OK, thank you
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Set Property problem [SOLVED - OVERTURNED]