playMaker

Author Topic: What is the different between a FsmObject and FsmGameObject?  (Read 4775 times)

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • Disastercake
What is the different between a FsmObject and FsmGameObject?

Is a FsmObject a generic object variable that can hold any type of component?
Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What is the different between a FsmObject and FsmGameObject?
« Reply #1 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


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


bye,

 Jean

Disastercake

  • Full Member
  • ***
  • Posts: 101
  • www.disastercake.com
    • Disastercake
Re: What is the different between a FsmObject and FsmGameObject?
« Reply #2 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 {}
Soul Saga - Anime themed adventure RPG by Disastercake

http://www.disastercake.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What is the different between a FsmObject and FsmGameObject?
« Reply #3 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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: What is the different between a FsmObject and FsmGameObject?
« Reply #4 on: June 08, 2012, 01:58:33 PM »
Actually FsmObject supports anything derived from UnityEngine.Object (including MonoBehaviour).

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What is the different between a FsmObject and FsmGameObject?
« Reply #5 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