Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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?
-
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
-
How do I know if one of my scripts extends the monobehaviour?
That's this line of code, right?
public class MyClass : MonoBehaviour {}
-
Hi,
Exactly. And of course, all the built Unity component you can get ( they are listed in the drop down)
bye,
Jean
-
Actually FsmObject supports anything derived from UnityEngine.Object (including MonoBehaviour).
-
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