playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Zyxil

Pages: [1]
1
I figured it out.  I'll write this out in detail.  Hopefully it will help future seekers.

As with other users on the forum, when the menu doesn't appear or actions don't compile correctly, you need to check for code exceptions or bad syntax in saved code.  These errors can be anywhere in your code; they are not necessarily in the code you are having trouble with.

In my case, the Unity console window wasn't showing a compile exception.  I had to hunt in Visual Studio for the exception there.

2
So I have a custom action that is used in a few places.  I added a new FsmInt public field to the action and when I switch back to Unity everything compiles like normal, but the new field does not appear on the action.  

Why would a new field not show up on the action?

3
Community Wiki Suggestions / Re: Editing Wiki?
« on: August 28, 2012, 06:41:36 PM »
posted in forum.

thanks, jean.

4
Share New Actions / DestroyChildren
« on: August 28, 2012, 06:36:46 PM »
Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory(ActionCategory.GameObject)]
    [Tooltip("Destroy all children on the Game Object.")]
    public class DestroyChildren : FsmStateAction
    {
        [RequiredField]
        public FsmOwnerDefault gameObject;

        public override void Reset()
        {
            gameObject = null;
        }

        public override void OnEnter()
        {
            DoDestroyChildren(Fsm.GetOwnerDefaultTarget(gameObject));

            Finish();
        }

        static void DoDestroyChildren(GameObject go)
        {
            if (go != null)
            {
                for (int i = 0; i < go.transform.GetChildCount(); i++)
                    GameObject.Destroy(go.transform.GetChild(0).gameObject);
            }
        }
    }
}

5
Community Wiki Suggestions / Editing Wiki?
« on: August 27, 2012, 07:56:41 PM »
I don't see a way to log in to edit the wiki.  

I was going to add this simple action:

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory(ActionCategory.GameObject)]
    [Tooltip("Destroy all children on the Game Object.")]
    public class DestroyChildren : FsmStateAction
    {
        [RequiredField]
        public FsmOwnerDefault gameObject;

        public override void Reset()
        {
            gameObject = null;
        }

        public override void OnEnter()
        {
            DoDestroyChildren(Fsm.GetOwnerDefaultTarget(gameObject));

            Finish();
        }

        static void DoDestroyChildren(GameObject go)
        {
            if (go != null)
            {
                for (int i = 0; i < go.transform.GetChildCount(); i++)
                    GameObject.Destroy(go.transform.GetChild(0).gameObject);
            }
        }
    }
}

6
Playmaker Help / Re: Set Property color, Playmaker 1.3.2
« on: August 16, 2012, 06:47:04 PM »
I'm having this same exact issue.   :(

I can set the Color field when running in the editor to the correct variable and it works as it is supposed to.  The field variable is reset when the editor is started up.  It could happen when the Start transition fires on the FSM or earlier.

7
Share New Actions / ObjectIsNull
« on: May 09, 2012, 07:28:33 PM »
Not rocket science, just a copy of GameObjectIsNull with the GO switched to Object.

Code: [Select]
namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory(ActionCategory.Logic)]
    [Tooltip("Tests if an Object Variable has a null value.")]
    public class ObjectIsNull : FsmStateAction
    {
        [RequiredField]
        [UIHint(UIHint.Variable)]
        public FsmObject theObject;
        public FsmEvent isNull;
        public FsmEvent isNotNull;
        [UIHint(UIHint.Variable)]
        public FsmBool storeResult;
        public bool everyFrame;

        public override void Reset()
        {
            theObject = null;
            isNull = null;
            isNotNull = null;
            storeResult = null;
            everyFrame = false;
        }

        public override void OnEnter()
        {
            DoIsObjectNull();

            if (!everyFrame)
                Finish();
        }

        public override void OnUpdate()
        {
            DoIsObjectNull();
        }

        void DoIsObjectNull()
        {
            bool oIsNull = theObject == null;

            if (storeResult != null)
                storeResult.Value = oIsNull;

            Fsm.Event(oIsNull ? isNull : isNotNull);
        }
    }
}

8
Share New Actions / Re: ArrayMaker is now available
« on: April 17, 2012, 06:24:17 PM »
Jean, I checked the ArrayListGet action and it works!

Thank you for the great support!

9
Share New Actions / Re: ArrayMaker is now available
« on: April 15, 2012, 12:47:39 PM »
It works for the Materials that Unity can make, whether from model import, made manually within the editor or imported from asset packages like the Gem Shader package.

Thanks for looking at this, Jean!

10
Share New Actions / Re: ArrayMaker is now available
« on: April 14, 2012, 08:53:13 PM »
ArrayMaker is excellent!  Thank you for releasing it to everybody.

I have an issue with an ArrayList of Materials.  I am using the Free Substances from the Asset Store and they are supposed to work exactly like a Material in Unity, they're just generated inside the editor.  The ArrayList allows adding them in the editor, but they disappear when running.

If my array is 10 elements and elements 5 and 6 are substances, then the proxy will show elements 0 through 4 and 7 through 9.  And when referenced by the Array List Get action, the action does not fail, but also does not retrieve the Substance from the array.  It works on a normal Material, even oddball ones like the Gem Shaders.

Any idea on what's going on here?

Thanks!

Pages: [1]