Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Disastercake on June 07, 2012, 09:13:57 PM

Title: What is the different between a FsmObject and FsmGameObject?
Post by: Disastercake on June 07, 2012, 09:13:57 PM
What is the different between a FsmObject and FsmGameObject?

Is a FsmObject a generic object variable that can hold any type of component?
Title: Re: What is the different between a FsmObject and FsmGameObject?
Post by: jeanfabre on June 08, 2012, 06:16:17 AM
Hi,

 excactly, it can hold any component, including yours. But be careful, it can not reference raw classes, only the one that extend the monobehavior. It's un unfortunate downside, but as is, it will already take you a long long way,

Fsm Object are best used in conjunction with "set property" and "get property".

for a working example of an Fsm Object, look at this post.
http://hutonggames.com/playmakerforum/index.php?topic=1701.msg7467#msg7467 (http://hutonggames.com/playmakerforum/index.php?topic=1701.msg7467#msg7467)


a FsmGameObject is simply a placeHolder to reference a gameObject in the scene, nothing more.


bye,

 Jean
Title: Re: What is the different between a FsmObject and FsmGameObject?
Post by: Disastercake on June 08, 2012, 11:02:37 AM
How do I know if one of my scripts extends the monobehaviour?

That's this line of code, right?

Code: [Select]
public class MyClass : MonoBehaviour {}
Title: Re: What is the different between a FsmObject and FsmGameObject?
Post by: jeanfabre on June 08, 2012, 01:53:00 PM
Hi,

 Exactly. And of course, all the built Unity component you can get ( they are listed in the drop down)

 bye,

 Jean
Title: Re: What is the different between a FsmObject and FsmGameObject?
Post by: Alex Chouls on June 08, 2012, 01:58:33 PM
Actually FsmObject supports anything derived from UnityEngine.Object (including MonoBehaviour).
Title: Re: What is the different between a FsmObject and FsmGameObject?
Post by: jeanfabre on June 08, 2012, 04:04:14 PM
Ok, sounds actually logical from the name itself... :) thanks for the clarifications, cause I was always extending monoBehavior and found that not good because authors would get confused because they could drop it on a gameObject and it wasn't the purpose at all.

 bye,

 Jean