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
»
How to get a component variable from a GameObject variable?[SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How to get a component variable from a GameObject variable?[SOLVED] (Read 1997 times)
Mupp
Full Member
Posts: 167
How to get a component variable from a GameObject variable?[SOLVED]
«
on:
July 19, 2018, 09:23:28 AM »
I want to get the X size of a box collider on the object that is currently stored in a GameObject variable. How do I do that?
«
Last Edit: July 22, 2018, 02:51:28 PM by djaydino
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: How to get a component variable from a GameObject variable?
«
Reply #1 on:
July 19, 2018, 09:57:51 AM »
Hi,
you either do this using GetProperty action, or you get the dedicated custom action GetBoxColliderSize from the Ecosystem.
Bye,
Jean
Logged
Mupp
Full Member
Posts: 167
Re: How to get a component variable from a GameObject variable?
«
Reply #2 on:
July 19, 2018, 10:54:29 AM »
Thanks, the GetBoxColliderSize should work, but for future reference, how do you use GetProperty with a GameObject variable? Can you give me an example how to store a variable from a component on an unknown object?
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: How to get a component variable from a GameObject variable?
«
Reply #3 on:
July 19, 2018, 02:25:37 PM »
Hi,
simply drop the Component onto the Action stack.
//www.youtube.com/watch?v=ERCw7CECOKc
Bye,
Jean
Logged
Mupp
Full Member
Posts: 167
Re: How to get a component variable from a GameObject variable?
«
Reply #4 on:
July 19, 2018, 03:27:02 PM »
Um, I don't think you understand. I can't drag the object because it is stored in a variable. It's unknown, otherwise it would been really easy.
Logged
Mupp
Full Member
Posts: 167
Re: How to get a component variable from a GameObject variable?
«
Reply #5 on:
July 21, 2018, 09:04:23 PM »
Bump.
Logged
Fat Pug Studio
Beta Group
Hero Member
Posts: 1294
Re: How to get a component variable from a GameObject variable?
«
Reply #6 on:
July 22, 2018, 04:15:03 AM »
Did you save the component as object variable? I'll make a small gif later.
Logged
Available for Playmaker work
Mupp
Full Member
Posts: 167
Re: How to get a component variable from a GameObject variable?
«
Reply #7 on:
July 22, 2018, 08:06:27 AM »
Yeah, that's what I tried to do, but it's at that point it gets tricky for me.
Logged
Fat Pug Studio
Beta Group
Hero Member
Posts: 1294
Re: How to get a component variable from a GameObject variable?
«
Reply #8 on:
July 22, 2018, 10:00:12 AM »
There you go
//www.youtube.com/watch?v=nhP7y2RPPLo
Logged
Available for Playmaker work
Mupp
Full Member
Posts: 167
Re: How to get a component variable from a GameObject variable?
«
Reply #9 on:
July 22, 2018, 11:42:18 AM »
That's excellent. That's what I was looking for. Thanks a lot man.
Logged
Fat Pug Studio
Beta Group
Hero Member
Posts: 1294
Re: How to get a component variable from a GameObject variable?
«
Reply #10 on:
July 22, 2018, 12:26:11 PM »
Great
Logged
Available for Playmaker work
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
How to get a component variable from a GameObject variable?[SOLVED]