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.


Topics - HAIRGROW

Pages: [1]
1
PlayMaker Help / Get/Set String Property Only returns Length
« on: January 07, 2021, 02:58:05 PM »
So I have a custom script with 3 Get/Set properties. 2 Ints and 1 String. I can use the normal Get Property on all 3 but I noticed that the string value is only showing the Length of the string in PlayMaker. If I re-write the string value as a typical Public string, then the Get Property action will provide the actual string.

Does PlayMaker not allow for Get/Set Properties on string values? Or is there another way I need to implement it?

2
VR Help / Frame Rate Drop in Headset when testing in Editor
« on: April 29, 2019, 07:22:07 PM »
So I've been developing a VR game for the past year using the HTC Vive and was wondering if anyone else experiences drops in frame rate when using PlayMaker and testing within the editor?

It seems that whenever I have the PlayMaker editor opened, I get a huge drop in FPS. It's even worse if I have an active FSM selected. The only way I can get around this is by closing/hiding the PlayMaker window, deselect any game objects, and make sure the Game window has focus. I'm mentioning it now because it's starting to become a hindrance. In order for me to test FSMs and makes sure things are working correctly, I want to test in the Editor instead of making a build for each little change.

Has anyone experienced this and if so, what steps did you take to overcome this?

3
General Discussion / Is it possible to Find Game Object by Type?
« on: December 20, 2018, 03:07:28 PM »
So instead using Find Game Object by Tag or Name, I'm wondering if it's possible to find a Game Object by Component. I'm trying to write my own custom action for this and have looked at the Get Component action as a reference but unfortunately I can't use FindObjectOfType within the HutongGame.PlayMaker.Actions namespace. Any help would be appreciated.

4
So I'm working on a VR game and I wanted a better way to control the particle systems with PlayMaker. I've created a pretty extensive set to do what I want, but I was curious as to what features / actions others would be interested in. I've created a few other VR related actions as well such as a VR FSM Inspector, which allows you to see that state changes for FSMs in VR. Before I put something like this out, I wanted to see if there was any interest in such a thing. Thanks.

5
PlayMaker Help / Get Active State Color [SOLVED]
« on: October 10, 2018, 01:51:19 PM »
So I'm working on creating a custom action for debugging purposes. And I'm trying to figure out how to get the color of the Active Fsm State. I'm able to get the name of the Fsm and Active State name, but I'm not seeing a direct way to get the color of the active state. I'm working on a VR game and for debugging purposes, I created an action that set's a Unity Text Mesh to the active state name. The part I'm having problems with is getting the color of the active state in PlayMaker. Essentially I would color code all my states in PlayMaker and set the color of the Unity Text Mesh to the active state color. Thanks in advance.

6
PlayMaker Help / Custom Action Editor [SOLVED]
« on: May 29, 2018, 02:09:19 AM »
So I'm in the process of creating a custom action and I wanted to know if its possible to create a single action from multiple script files?

First, let me say that I'm an artist who's still learning C#, but I understand all the basics. Enough to be able to successfully write a single working custom action. The action that I'm writing is comprised of several "settings" such as check boxes, public variables, and drop drown menus. I've got each section of the action working separately (as it own "Action" for testing purposes), but instead of writing one long gigantic script file for the whole action, which would ultimately work, I would like to break it down in to smaller chunks of code (classes) that then get compiled together via the Custom Action Editor.

After studying the Quaternion Actions, I saw how each action was a child to the parent class QuaternionActionBase. Then, each action, as well as QuaternionActionBase, has it's own Custom Action Editor script, which are all children of the QuaternionCustomEditorBase class. So, with the concept of Inheritance in mind and to prevent my script from becoming massively long, I want to know if it's possible to write the entire action in separate classes. So that way I can focus on each section of the code, get it working, and then use Action Editor to arrange all the fields.

As I'm learning more about the Custom Action Editor, I'm wondering if I could write each section of the action as a separate script file, with each script using it's on custom editor, and then create a parent editor that bring all the children (fields) together in one action. Is this possible or am I going about this the wrong way?

What I've discovered thus far, is that the Action Editor only works on the script that it's pointed to. So for the Quaternions for example, GetQuaternionEulerAnglesCustomEditor.cs , will only work on GetQuaternionEulerAngles.cs, because of this line here:

[CustomActionEditor(typeof(GetQuaternionEulerAngles))]

If that's the case, will I have to suck it up and put everything into the main action and utilize 1 Custom Editor Script for the action?

Like I said, I'm learning more and more about C# and what's possible so it would awesome to create smaller modules that I could then bring all together.

Thanks in advance for any advice given.

Here's an example of what I'm trying to do

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// This is the parent class. It's only job is to establish the public gameobject variable.
/// All subsequent scripts will be derived from this class, so they all will have access to the parent game object.
/// </summary>

namespace HutongGames.PlayMaker.Actions
{

    public abstract class SampleActionBase : FsmStateAction
    {
        [RequiredField]
        [Tooltip("The Game Object")]
        [CheckForComponent(typeof(GameObject))]
        public FsmOwnerDefault gameObject;
        public GameObject go;


    }
}

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// This is a child to SampleActionBase.
/// It would contain most of the settings,while the rest comes from another script.
/// This would be the script that actually shows up in the Action Browser
/// </summary>

namespace HutongGames.PlayMaker.Actions
{

    [ActionCategory("Get Some")]
    [Tooltip("Tips! Tips! Tips!")]

    public class SampleAction : SampleActionBase
    {

        public FsmFloat time;
        public FsmBool looping;


        public override void Reset()
        {

            time = null;
            looping = true;
        }

        public override void OnEnter()
        {

            DoStuff();
            Finish();

        }

        public void DoStuff()
        {
            go = Fsm.GetOwnerDefaultTarget(gameObject);

            // Then do some stuff with this


        }

    }


}

Code: [Select]
using UnityEngine;
using UnityEditor;
using HutongGames.PlayMaker.Actions;
using HutongGames.PlayMakerEditor;

/// <summary>
/// Not sure what to put here. With this being the parent I thought I could
/// expose public FsmOwnerDefault gameObject; here so all children the UI would show up in a child classes,
/// but then I figured out I didn't have to do that.
/// </summary>

public class SampleActionUIBase : CustomActionEditor
{

    public override bool OnGUI()
    {
        return false;
    }

}

Code: [Select]
using UnityEngine;
using UnityEditor;
using HutongGames.PlayMaker.Actions;
using HutongGames.PlayMakerEditor;

/// <summary>
/// This script controls the interface for the SampleAction script.
/// I'd like to add Edit Fields from other scripts in this file.
/// so I could organize each section of the UI.
/// </summary>

[CustomActionEditor(typeof(SampleAction))]
public class SampleActionUI : SampleActionUIBase
{
    StartDelayUI startDelayInst;

    public override bool OnGUI()
    {

        EditField("gameObject");
        EditField("time");
        EditField("looping");


        GUILayout.Label("Next Section");

        //I'd like to place EditFields from other script files here.
        //Thus giving me more control over the layout of the interface
        // And making it easier to manage all the code.
;

        return GUI.changed;
    }
}


7
PlayMaker Help / Check if items are in Hash Table or Array
« on: April 02, 2014, 04:07:03 PM »
Hi, this is my first time posting to the forum, so I hope I'm asking this in the right place. Anyways, I'm learning how to use Array Lists and Hash Tables and was wondering, what's a good way to check if all items are contained in the List/Table. I've looked at the example Inventory scene provided by Array Maker and it's helped a lot, but I can't determine the best way to check if all items have been placed in the Inventory. I see there's a Hash Table Contain Values action, but I don't know how to use it to check for multiple items and then execute another action once all items are found.

I thought about creating a series of Bool Values which are set to True once the item has been added, and then check if All Bool Values are true and then go from there. But if there's more efficient way to check for these item's then I would rather do that. Any help with this would be greatly appreciated.

Pages: [1]