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 Feedback
»
Feature Requests
(Moderator:
600
) »
Get (public, monobehaviour) Class Variable Value from GameObject[SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Get (public, monobehaviour) Class Variable Value from GameObject[SOLVED] (Read 3279 times)
Duffer
Playmaker Newbie
Posts: 26
Get (public, monobehaviour) Class Variable Value from GameObject[SOLVED]
«
on:
March 10, 2017, 04:37:09 AM »
I must admit I thought the Unity.Object Get Property action did this... but i dont think it does now. Nor does the Get Component action.
If I am wrong on this and/or there is an easy way to achieve this (rather than putting Fsm Variables on the GO in the first place) then please someone explain (in detail please!).
Otherwise, I think variations of this potential Action are a must-have enhancement?
«
Last Edit: March 11, 2017, 02:26:56 AM by jeanfabre
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Get (public, monobehaviour) Class Variable Value from GameObject
«
Reply #1 on:
March 10, 2017, 04:49:24 AM »
Hi,
GetProperty and SetProperty work fine as far as I can see.
can you be more precise on what component and property you are trying to reach?
Bye,
Jean
Logged
Duffer
Playmaker Newbie
Posts: 26
Re: Get (public, monobehaviour) Class Variable Value from GameObject
«
Reply #2 on:
March 10, 2017, 04:57:38 AM »
Maybe im not using it correctly.
So I've created a monobehavior class called RPGBaseInfo.
Within that class I've created a public string title; variable.
I've dragged that on to a empty gameobject I've created in scene.
I've created an fsm on the go and in the first state I want to add an action to garner the value of that string to an fsm string variable (keeping it simple).
But Get Property doesn't seem to recognise either the above class or title public variable when i drag in the go at the start of the Get Property action?
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Get (public, monobehaviour) Class Variable Value from GameObject
«
Reply #3 on:
March 10, 2017, 05:01:08 AM »
Hi,
can you show me your getproperty action screensho, likely you are dragging the go, which gives you access to the gameobject property, but you need to drag the actual component!
Bye,
Jean
Logged
Duffer
Playmaker Newbie
Posts: 26
Re: Get (public, monobehaviour) Class Variable Value from GameObject
«
Reply #4 on:
March 10, 2017, 07:05:26 AM »
Hi Jean,
Forgive my dumbness! Now see how to lift those variables from the relevant GO monobehavior class.... thanks!
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Get (public, monobehaviour) Class Variable Value from GameObject
«
Reply #5 on:
March 11, 2017, 02:26:42 AM »
Hi,
no worries!!
Bye,
Jean
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Feedback
»
Feature Requests
(Moderator:
600
) »
Get (public, monobehaviour) Class Variable Value from GameObject[SOLVED]