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 - tcmeric

Pages: 1 [2] 3
16
Unitys built in NavMeshAgent.remainingDistance can return the result of infinity (instead of the correct distance) when two or more corners (path points) have been calculated. This means the playmaker action "Get Agent Remaining Distance" is not reliable in many cases (as it is using NavMeshAgent.remainingDistance).

An alternative method is calculating the corners (path points) distance instead. An example is given in the unity documentation. I used the documentation to create an action to do so.

https://github.com/dumbgamedev/general-playmaker/blob/master/path/calculateAgentDistanceByCorners.cs

Ive tested it out several times and it returns the same result as the action Get Agent Remaining Distance, except it never returns infinity (good!).

Maybe this action plus the path debug action I posted should be added to the playmaker navmesh package? (Might need name changes/ different category).

17
Share New Actions / Debug Navmesh Agent Path Action
« on: April 30, 2017, 03:52:08 AM »
This action debugs the navmesh agent path.

A navmesh path can be complete, partial (in which can it will try to recalculate if you have that option set to true on your agent component), or incomplete.

This action will check your calculated agent path and check to see if it is complete, partial or incomplete and then fire a a corresponding event.

You can download it from my github account, under MIT (free to use, no need to attribute) license. https://github.com/dumbgamedev/general-playmaker/blob/master/path/debugAgentPath.cs


18
Share New Actions / Line Renderer Set Gradient
« on: April 29, 2017, 01:17:16 AM »
So in 5.5, you cannot set a color to a line renderer anymore because it now uses a gradient. (I think its from 5.5 forward).

I needed a 2 color gradient for my lines, so I wrote this. Of course it could also work for 1 color, if you just set both colors to be the same. It also allows you to set the color location, alpha amount and alpha location (time). Basically everything you need to set a color gradient on a line renderer.

Enjoy: https://github.com/dumbgamedev/general-playmaker/tree/master/lineRenderer

19
Playmaker Help / Custom Action - Either or Component
« on: April 25, 2017, 11:07:49 AM »
I have a playmaker action that could be for 1 of 2 different component (scripts). In this case

1. textmeshpro
2. textmeshpro UGUI

My script does a simple check and then runs the nessesary function if/else the script is attached (I will improve this with an error check after, and use if, if else, else).

However, the problem is that

A. Its ugly. Is there a better way to do this? If else is ok, but I feel I am doing too much code in the if else?

For void update(), I need to do the check again? (for everyframe options).

Any ideas?

Code: [Select]
// (c) Eric Vander Wal, 2017 All rights reserved.
// Custom Action by DumbGameDev
// www.dumbgamedev.com

using UnityEngine;
using TMPro;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory("TextMesh Pro Basic")]
    [Tooltip("Set Text Mesh Pro Text.")]

public class  setTextmeshProText : FsmStateAction
{
[RequiredField]
[Tooltip("Textmesh Pro component is required.")]
public FsmOwnerDefault gameObject;

[RequiredField]
[UIHint(UIHint.TextArea)]
[TitleAttribute("Textmesh Pro Text")]
[Tooltip("The text for Textmesh Pro.")]
public FsmString textString;

[Tooltip("Check this box to preform this action every frame.")]
public FsmBool everyFrame;

// for textmesh pro
TextMeshPro meshproScript;
// for textmesh pro UGUI
TextMeshProUGUI meshproUguiScript;

public override void Reset()
{

gameObject = null;
textString = null;
everyFrame = false;
}

public override void OnEnter()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);

TextMeshPro tmp = go.GetComponent<TextMeshPro>();

// if textmesh pro normal script attached, do this
if (tmp != null)
{
Debug.Log("TextMesh Pro Script Attached");
meshproScript = go.GetComponent<TextMeshPro>();

if (!everyFrame.Value)
{
DoMeshChange();
Finish();
}

}

// if textmesh pro Ugui is attached
else
{
Debug.Log ("TextMesh Pro UGUI Script Attached");
meshproUguiScript = go.GetComponent<TextMeshProUGUI>();

if (!everyFrame.Value)
{
DoMeshChangeUgui();
Finish();
}
}

}


// textmesh pro normal script
void DoMeshChange()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

meshproScript.text = textString.Value;
}


// textmesh pro ugui script
void DoMeshChangeUgui()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

meshproUguiScript.text = textString.Value;
}

}
}

20
Share New Actions / Textmesh Pro Playmaker Actions (free)
« on: April 24, 2017, 12:50:16 AM »
The Textmesh Pro playmaker action set has now been released for free under a MIT/LGPL license (free to use in your game, no need to add into credits) by myself (Dumb Game Dev).

https://github.com/dumbgamedev/TextMeshPro_Playmaker

As well, I have made a basic intro video for these actions. I highly suggest you check out Textmesh Pro, which is now free on the asset store. This is really a big step-up for text in Unity. It is all free, and if you are not already using it in your project, you should now!!!

https://www.youtube.com/watch?v=G7l-qPeZteE&feature=youtu.be

One last thing to note, is that this project was funded through my Patreon account. If you do use this asset, or would like to see more free playmaker actions, please consider contributing a few dollars a month. https://www.patreon.com/playmaker

The next releases in the pipeline for my Patreon account are actions for Post Processing Stack (free on the asset store), Beautify (another great post processing asset that I use myself often) and Liquid Volume (by the same authors as Beautify).

To Note: There are still a few issues with the actions for mobile shaders. If you run into any bugs, please report them so I can make corrections. (Shaders are tricky and this asset comes with a whole bunch).

21
I am trying to create a custom action that listens for a c# delegate event and returns an event argument (event payload). Unfortunately I am having some difficulty here. This is my first time working with unity delegates and events. If there are some playmaker actions that are already do this, maybe it will help me work it out.

This is the documentation here: https://vrtoolkit.readme.io/docs/vrtk_destinationmarker

And I am trying to get the event payload "Vector3 destinationPosition".


22
Playmaker Help / NavMesh Remaining Distance
« on: April 21, 2017, 07:38:46 AM »
I am using the pathfinding package for playmaker. I am using the action "get agent remaining distance", which works well.

However, I would like to set a destination without starting movement (so I can calculate the distance before I choose to move or not). Ie, if it is too far, my player may decide not to move.

When using the "Set Agent Destination as Game Object", it begins to move towards the destination right away. It does not wait for the "Agent Move" action.

I can use "Agent Pause" and then choose "Agent Resume" when I am ready to move. But, is there a way to calculate a navmesh path without movement the starting on my gameobject?

Lastly, how is this path stored? (I plan on writing a script that will allow the player to see the possible path and distance before committing to it). I dont think there is a way in playmaker to display the saved path (correct?)

Thanks!

23
Share New Actions / Free Playmaker Actions for Xweapon Trails
« on: April 19, 2017, 07:40:13 AM »
I have created free playmaker actions for xweapon trails. You can download them from my github account here: https://github.com/dumbgamedev/XWeaponTrail_Playmaker

The Xweapon Trails asset is about 8$ now on the asset store. It creates nice smooth weapon trails after swinging your weapons around (can be 3d, 2d or VR). You can add trails to add kinds of objects (doesnt need to be weapons). Anything you want a swoosh movement after. I choose this one because it has a 5 star rating and tons of buys.
https://www.assetstore.unity3d.com/en/#!/content/20972

I created a tutorial how to set it up in VR and use my actions (however the same principle applies for 3d or 2d). https://www.youtube.com/watch?v=1pBK8OB0r8o&t=539s

24
Share New Actions / Outline Effect - Custom Playmaker Actions (Free)
« on: April 19, 2017, 07:01:05 AM »
I have created some free playmaker actions for the store asset Outline Effect (which is also free). This asset allows you to add a outline effect to objects (game objects, text, sprites, etc). It can change color, width, etc. With my playmaker actions you can do things like change colors on the fly (during game time), enable/disable highlight, etc.

You can download the playmaker actions here: https://github.com/dumbgamedev/outlineEffect_Playmaker

You can download the asset here: https://www.assetstore.unity3d.com/en/#!/content/78608

You can watch my tutorial on how to use this asset with or without playmaker here: https://www.youtube.com/watch?v=0nLzMHOtc4E&feature=youtu.be

25
For my 30 actions in 30 days, i created a new VRTK playmaker action called "get controller velocity". It can be downloaded for free under MIT license from my github account. Protip: VRTK can be used for HTC vive, Rift and Google Daydream.

Download here: https://github.com/dumbgamedev/VRTK_Playmaker3x
Loop counter used in this tutorial: https://github.com/dumbgamedev/general-playmaker/blob/master/Math/simpleLoopCounter.cs

Tutorial Video:
https://www.youtube.com/watch?v=C71AYcmaVz4&feature=youtu.be

26
Day 3. This is a rewrite from ground up of an action recently posted here.

"Create Material"
My action has options to set the shader, choose a main texture and albedo color from this one action. In my tutorial I briefly show how you can add more textures or other options to your material as well.


Action here: https://github.com/dumbgamedev/general-playmaker/blob/master/Materials/createMaterial.cs

Tutorial video: https://www.youtube.com/watch?v=xtB4Gb3heck&feature=youtu.be

27
General Discussion / Next Action Package to Complete?
« on: April 01, 2017, 08:46:25 AM »
So, i have essentially finish the Textmesh Pro Actions for Playmaker. You can see details here on my Patreon account: patreon.com/playmaker

I am considering on which package to complete next.

Currently it seems there are no Playmaker supported localization assets with playmaker actions.
This one seems the most popular: I2 Localization
https://www.assetstore.unity3d.com/en/#!/content/14884

Or maybe Trigger Pro: https://www.assetstore.unity3d.com/en/#!/content/11330

Inventory Master - uGUI: https://www.assetstore.unity3d.com/en/#!/content/26310

Thoughs? Ideas?

Past packages have been (avaliable through my Patreon account).
VRTK (free) - https://www.assetstore.unity3d.com/en/#!/content/64131
Beautify - https://www.assetstore.unity3d.com/en/#!/content/61730
Liquid Volume- https://www.assetstore.unity3d.com/en/#!/content/70992
X-Weapon Trails- https://www.assetstore.unity3d.com/en/#!/content/20972
VR Weapons- https://www.assetstore.unity3d.com/en/#!/content/66387

28
Day 2 of Thirty Custom Actions in Thirty Days.

Today is "set string case". This action does as it sounds. It can set a string variable to uppercase, lowercase and textcase (first letter of every word to be uppercase).



The action is available here on github: https://github.com/dumbgamedev/general-playmaker/blob/master/String/SetStringCase.cs

Here is a short video tutorial on how to use this action: https://www.youtube.com/watch?v=XTFpaHMsLDY&feature=youtu.be


29
Over the next thirty days, I am going to try and write thirty custom actions (as a way to help improve my own coding skills). Hopefully I will have time to also make youtube videos to go along with them.

First days action can be downloaded here: https://github.com/dumbgamedev/general-playmaker/blob/master/Math/simpleLoopCounter.cs

Its a simple loop counter. While you can make your own loop counter in playmaker, this one works out of the box. Set a max count number, the current count number and even the count amount (can count by 2, 3, 4, etc). Events exist for different outcomes.



Ive created a short video explaining the action and give an example of how to use it: https://www.youtube.com/watch?v=935OiYj1uU8&t=7s

If you like the video, please don't forget to "like" it on youtube. Thanks!  8)

30
A beginners tutorial. Right from the very start.

Title: ELI5 - A Basic Introduction to Playmaker Essentials - Actions, States and Events

Short Title: Introduction to Actions, States and Events

Difficulty: 1 star

Length: 27 minutes

Video: https://www.youtube.com/watch?v=D3qj2hzXj1M&t=71s

Pages: 1 [2] 3