x


A finite state machine for game objects

I was about to sit down and do it, but I'd like to know whether it makes sense to sit down and write a FSM from scratch, but one that fully utilizes Unity's strengths, for instance the drag & drop /declarative building of components. The way I see it, every state will extend MonoBehavior, to which one would be able to attach a set of other behaviors and tweak their properties using the Unity IDE, Separately, another behavior, the so called state machine will be responsible for switching between the states whenever needed.

more ▼

asked Oct 24 '11 at 03:59 AM

user-8657 (google) gravatar image

user-8657 (google)
3 4 4 7

I think you could do that, yes- I've done something similar, using a MonoBehaviour to control all the interfacing with Unity's gameworld, and then putting the [System.Serializable] attribute at the top of all my member object classes so that I could use the drag-n-drop and other useful inspector features.

Oct 24 '11 at 04:45 AM syclamoth

Theres a couple FSM's on the asset store. Playmaker seems to be the most popular

Oct 24 '11 at 10:23 AM timsk
(comments are locked)
10|3000 characters needed characters left

0 answers: sort newest
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x21
x9

asked: Oct 24 '11 at 03:59 AM

Seen: 1079 times

Last Updated: Oct 24 '11 at 10:23 AM