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 - Shawn Kilian

Pages: [1] 2 3
1
Playmaker Help / Re: Unity lost all extensions
« on: October 17, 2017, 04:12:25 AM »
My project never had errors.  After Unity asked if I would like to update and I said "No Thanks" it stripped all extensions (not just PlayMaker) from my project, so I have over 999+ errors now because my project has no idea what to do with all the PlayMaker assets that are now missing from my project.

I opened an older version of my project from last week and PlayMaker is in that version and I have no errors.  It appears just this project scene has been corrupted completely and no extensions exist in it.

2
Playmaker Help / Unity lost all extensions
« on: October 16, 2017, 10:34:22 AM »
I have been working on my project for months with no problems.  Today, in the middle of working on the project, Unity asked if I would like to upgrade (which it NEVER does) and I said "NO THANKS" and it re-imported all of my assets (but it did NOT update, since my Unity version has remained unchanged).  As a result, it removed PlayMaker and all other extensions I was using and my project is completely broken.

Is there any way to fix this?

3
Figured out a solution.  Download Easy XML Parser from the Asset Store:

https://www.assetstore.unity3d.com/en/#!/content/6976

It doesn't work straight out of the box for Unity 5, but with some tweaks I was able to get it working in Unity 5 and was able to pull XML data from a URL and then manipulate those values with an FSM in PlayMaker.  Here's the things you need to tweak to fix Easy XML Parser for Unity 5:

1) Open the included "MyComponent.cs" script and rename the "public class MyComponent" to be the same name as the value you are seeking from your XML. For me, I wanted the "datavalues" from my XML document so I named my script "datavalues.cs" and re-named my public class to "public class datavalues"

2) Add "public" variables to the "MyComponent.cs" for any values you are trying to access within your respective class. In my case, the "public class datavalues" had 2 variables I wanted to access: "relay1" and "relay3". So I added these two variables to my "datavalues.cs" script by typing "public int relay1;" and "public int relay3;". That way when the datavalues.cs component script creates the instanced Game Object, it has my values already filled in.

3) You can then access these values by making a GameObject --> UI --> Text and naming it "GUI Text".  Now your values will display in the text field of the "GUI Text" Game Object and you can pull those values into Variables using the Get Property action in PlayMaker.

The asset should really be priced at $5 since you have to manually fix it to work in Unity 5, but it IS fixable if you are willing to make the changes I pointed out above.

You really have no other choice for getting real-time URL based XML values to work on Android.

4
Playmaker Help / Re: Making a sliding menu.. help please :)
« on: August 28, 2017, 04:10:32 AM »
The way I make sliding menus is to go under Game Object --> UI --> Slider.  This creates a slider with various options such as Horizontal Slider or Vertical Slider.

You can parent objects underneath the slider so they move when the slider does.  If you want to get fancy you can even use the optional "On Value Changed" option which comes built in to the Slider to send remote FSM events when certain values are reached.

5
Bump.  Still looking for an Android solution to the WWW Object since it doesn't work on mobile.

6
Thank you.  I downloaded and imported it into my project, but it still doesn't show up in my Action Browser.  I'm guessing this is because I am working on an Android project.

Is there an Android compatible version of the WWW Object?

7
Hmmm I don't have WWW Object listed in my PlayMaker actions.  I do remember it being there a few versions ago, but it's not here anymore.  I just tried to re-import it from the Asset store and it's not there either.

How can I get the WWW object action back so I can test this out?

8
Playmaker Help / Get XML data from URL and store as String (Data Maker)
« on: August 25, 2017, 07:37:42 AM »
Hello  :)

I am using Data Maker actions in PlayMaker and would like to get XML data located at a URL.  The URL displays the XML data in the browser without me downloading it.  (see below)



Is it possible to store this data as a String in PlayMaker?

I've tried all the actions that come in Data Maker, but none of them seem to do what I need...or maybe I'm using them incorrectly.  Please guide me in the right direction.  Thank you.

9
Playmaker Help / Re: Playmaker global variables to C# script
« on: August 24, 2017, 06:56:40 AM »
This post really helped me to understand how to tell my script to reach out to an FSM and grab a variable.  Thank you.

10
Android Help / Re: Global Variables missing when published to Android
« on: August 23, 2017, 08:49:43 AM »
I figured out what it was!  I had "Split Application Binary" checked in the Player Settings --> Publishing Settings, which caused my Android app to publish an .apk file AND an .obb file.  Global Variables are stored in the .obb file, so when I side-loaded the .apk file onto my phone, I forgot to include the .obb file so it never had any Global Variables to reference.

The solution was to UNCHECK "Split Application Binary" so the .obb file is never created.  Now everything works (side-loaded or not).

Thank you for your help, I appreciate it =)

11
Android Help / Re: No android device found unity..
« on: August 23, 2017, 05:38:56 AM »
Whenever I get this error it's because the Android device I have plugged into my PC is missing the correct drivers.  Make sure you download the correct Android USB driver for your device before you try to make Unity look for it.

12
Android Help / Re: Global Variables missing when published to Android
« on: August 23, 2017, 05:36:08 AM »
Yes I am using Get/Set Property actions to save String Values as Global Variables.

If I change my variables to local variables (instead of Global) they work on Android as an APK file even when I sideload.

Somehow the Global Variables are being stripped when I sideload the app to my phone.

13
I am using Global Variables to Get/Set Strings.  This works fine in the Editor.  It also works fine when I "Build & Run" as an Android app while my phone is plugged into my PC.  However, if I manually install the APK file via side-loading, my Global String Variables are no longer recognized.

Why would this be happening?

14
Playmaker Help / How can I access a property from within a script?
« on: August 17, 2017, 12:07:13 PM »
Hello,

How can I access the url string from this script?  I can't seem to access it using Get Property, Set Property or Call Method like I usually can from other scripts.

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

public class MomentaryOpen: MonoBehaviour {
void Start()
{
StartCoroutine(GetText());
}

string authenticate(string username, string password)
{
string auth = username + ":" + password;
auth = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(auth));
auth = "Basic " + auth;
return auth;
}

IEnumerator GetText()
{
string authorization = authenticate("none", "password");
while (true)
{
string url = "http://myURLexample.com";


UnityWebRequest www = UnityWebRequest.Get(url);
www.SetRequestHeader("AUTHORIZATION", authorization);
yield return www.Send();

}
}
}

15
Android Help / Re: Gesture Scrolling Limit on Android
« on: August 16, 2017, 06:20:08 AM »
I figured out how to do it.  You don't need PlayMaker to achieve this functionality.  In fact you don't even need to use the Gesture Action at all.

Simply add an Image (Script) component in combination with a Mask (Script) component to the CONTENT (not the canvas), effectively limiting the scrolling of the view-port to whatever the mask can see within that canvas. It's perfect!

Note:  Make sure your CONTENT is a child of the CANVAS.  The CANVAS needs a Scroll Rect (Script) component where you reference the "Content" and "Viewport".

You can watch a video tutorial here https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-scroll-rect

Pages: [1] 2 3