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 - 9TOFRIDAY

Pages: [1] 2 3
1
Pre-release Discussion / Re: Unity 5.4 beta PlayMaker errors
« on: September 12, 2016, 12:47:20 PM »
Hey Jean,

I can confirm that the project just needed cleaning up. I had similar problems with unity 5.4. After deleting the playmaker folder and re-importing playmaker fixed the SetLogCallbackDefined is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'FsmEditorWindow' for me.

Thanks
Rock on!

2
Playmaker Help / Re: New Ecosystem Sample: IOS View animations
« on: April 04, 2016, 02:59:21 AM »
Thanks Jean works perfectly

3
Playmaker Help / Re: New Ecosystem Sample: IOS View animations
« on: April 04, 2016, 01:44:24 AM »
Hi,

 Can you try the package I attached to this thread.

 Let me know if that works without a problem, If it's all good on your end, I'll push on the Ecosystem.

The sample was package under PlayMaker 1.7.8.4 and Unity 4.7.1. Make sure you backup before testing this.

 Bye,

 Jean

Hey jean thanks will do, just can't find the download link?

4
Playmaker Help / Re: New Ecosystem Sample: IOS View animations
« on: March 31, 2016, 07:36:14 AM »
thank you so so so so so so much!

5
Playmaker Help / Re: New Ecosystem Sample: IOS View animations
« on: March 31, 2016, 06:00:02 AM »
Hey Jean

Thank you so much for assisting me. Unfortunately i am unable to understand how to solve this.
 
I disabled the run template fsm, and then obviously nothing happens when you click the button because i am assuming thats where i should handle the animation, right?
Now here is where the noob comes in, i don't know what i should do or how to do it. I've included another image to show what happens. so the "view b prefab" anchor position is already stretched so why is it creating it at those coords? which is 0,0 in the inspector in this case, confusing right? or just me?

honestly if you could provide a fix that would really help me out, as I'm really a very beginner at this.

Thanks

6
Playmaker Help / Re: New Ecosystem Sample: IOS View animations
« on: March 31, 2016, 04:03:58 AM »
Hey Jean

This is an awesome template and is exactly what we need for our current project.
Im just experience some issues. which is very weird. firstly when i create a new project them sample scene works perfectly. but when i add it to my own project i get a couple of errors, I've included an image that shows them.

Now the other weird things is that first time i installed the actions from the website, this literally cases unity to pause. so i then tried the ecosystem and that only displays the errors and doesn't pause unity.

Any assistance will be appreciated.

kind regards
luke

7
Playmaker Help / Re: Facebook Audience Network custom script help please
« on: February 18, 2016, 06:50:12 AM »
Thanks for getting back to me and thanks for pointing me in the right direction!!!!


8
Playmaker Help / Facebook Audience Network custom script help please
« on: February 18, 2016, 05:57:27 AM »
Hey peeps

so I'm trying to write custom action for Facebook audience network.

here is the script I'm trying to replicate in a playmaker action:
Code: [Select]
using System.Collections;
using System.Collections.Generic;
using AudienceNetwork;

[RequireComponent (typeof(CanvasRenderer))]
[RequireComponent (typeof(RectTransform))]
public class NativeAdTest : MonoBehaviour
{
    private NativeAd nativeAd;

    // UI elements in scene
    [Header("Text:")]
    public Text title;
    public Text socialContext;
    [Header("Images:")]
    public Image coverImage;
    public Image iconImage;
    [Header("Buttons:")]
    public Text callToAction;
    public Button callToActionButton;

public Text errorHandle;


    void Awake ()
    {
        // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).
        // Use different ID for each ad placement in your app.
NativeAd nativeAd = new AudienceNetwork.NativeAd ("319403784850492_327199570737580");
        this.nativeAd = nativeAd;

        // Wire up GameObject with the native ad; the specified buttons will be clickable.
        nativeAd.RegisterGameObjectForImpression (gameObject, new Button[] { callToActionButton });

        // Set delegates to get notified on changes or when the user interacts with the ad.
        nativeAd.NativeAdDidLoad = (delegate() {
            Debug.Log ("Native ad loaded.");

            Debug.Log ("Loading images...");
            // Use helper methods to load images from native ad URLs
            StartCoroutine (nativeAd.LoadIconImage (nativeAd.IconImageURL));
            StartCoroutine (nativeAd.LoadCoverImage (nativeAd.CoverImageURL));
            Debug.Log ("Images loaded.");
            title.text = nativeAd.Title;
            socialContext.text = nativeAd.SocialContext;
            callToAction.text = nativeAd.CallToAction;
errorHandle.text = ("Loaded");

        });
        nativeAd.NativeAdDidFailWithError = (delegate(string error) {
            Debug.Log ("Native ad failed to load with error: " + error);
errorHandle.text = ("error");


        });
        nativeAd.NativeAdWillLogImpression = (delegate() {
            Debug.Log ("Native ad logged impression.");
        });
        nativeAd.NativeAdDidClick = (delegate() {
            Debug.Log ("Native ad clicked.");
        });

        // Initiate a request to load an ad.
        nativeAd.LoadAd ();
    }

    void OnGUI ()
    {
        // Update GUI from native ad
        coverImage.sprite = nativeAd.CoverImage;
        iconImage.sprite = nativeAd.IconImage;
    }
}

This is how far I've gotten:
Code: [Select]

namespace HutongGames.PlayMaker.Actions {

[ActionCategory("Facebook Adverts")]
[Tooltip("Load adverts")]

//[RequireComponent (typeof(CanvasRenderer))]
//[RequireComponent (typeof(RectTransform))]

public class LoadFBAdvert : FsmStateAction {

[Header("Images:")]
[RequiredFieldAttribute]
public FsmString title;
[RequiredFieldAttribute]
public FsmString socialContext;

[RequiredFieldAttribute]
[CheckForComponent(typeof(Image))]
public FsmObject coverImage;

[RequiredFieldAttribute]
[CheckForComponent(typeof(Image))]
public FsmObject iconImage;

[RequiredFieldAttribute]
public FsmString callToAction;
[RequiredFieldAttribute]
[CheckForComponent(typeof(Button))]
public FsmObject callToActionButton;

private NativeAd nativeAd;




[RequiredFieldAttribute]
public FsmEvent AdvertSuccessful;
[RequiredFieldAttribute]
public FsmEvent AdvertFailed;


public override void OnEnter()
{

// Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).
// Use different ID for each ad placement in your app.
NativeAd nativeAd = new AudienceNetwork.NativeAd ("319403784850492_327199570737580");
this.nativeAd = nativeAd;

// Wire up GameObject with the native ad; the specified buttons will be clickable.

nativeAd.RegisterGameObjectForImpression (gameObject, new Button[] { callToActionButton });

}

}
}

I don't know what this means:
Code: [Select]
nativeAd.RegisterGameObjectForImpression (gameObject, new Button[] { callToActionButton });

i know I'm doing something wrong here saving the variables - but i don't understand the basics. game object gives a red error.
can anyone pleaser assist me? maybe even explain what exactly one needs to do in an instance like this.

thanks

9
Playmaker Help / Re: how to create objects in a foreach loop
« on: December 30, 2015, 02:08:29 AM »
Hi,

 Have you tried to base your code on my Parse support for PlayMaker on the wiki?

 I think I bumped on this as well, and so I would suggest you study the actions I created and maybe you'll find a good base to expand on the missing features on my package.


 Bye,

 Jean

actually what happened was i wrote the parse stuff myself, and only discovered your parse support yesterday. i will take a look at them and see if how you solved it. thanks so much for getting back to me.

10
Playmaker Help / Re: how to create objects in a foreach loop
« on: December 30, 2015, 02:07:01 AM »
It seems like this is an issue with async which runs in a separate thread. Instantiate can only be called from the main thread.

Some more info:
http://stackoverflow.com/questions/24441501/main-thread-issue-with-parse-com-queries

EDIT: This might mean you need a Monobehaviour proxy to run the Coroutine. The action could then call that Monobehaviour as needed...

thanks for getting back to me. i will looks at your suggestion today.

11
Playmaker Help / how to create objects in a foreach loop[SOLVED]
« on: December 29, 2015, 03:58:05 AM »
hey peeps

I'm trying to create an object in a foreach loop but get this error:
"INTERNAL_CALL_Internal_InstantiateSingle can only be called from the main thread."

here is my code:
Code: [Select]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
//using Facebook.Unity;
using Parse;

namespace HutongGames.PlayMaker.Actions {

[ActionCategory("DataParse")]
[Tooltip("Parse Scripts")]

public class DataParseSelect : FsmStateAction {
public FsmString UserID_, UserName_, UserGeoXLongitude_, UserGeoYLatitude_, UserVideoID_, UserVideoURL_;
string UserID, UserName, UserGeoXLongitude, UserGeoYLatitude, UserVideoID, UserVideoURL;

//luke

//public Transform prefab;


//playmaker stuff
[Tooltip("GameObject to create. Usually a Prefab.")]
public FsmGameObject gameObject;

[Tooltip("Position. If a Spawn Point is defined, this is used as a local offset from the Spawn Point position.")]
public FsmVector3 position;

[Tooltip("Optionally store the created object.")]
public FsmGameObject storeObject;




public FsmInt row;

public override void OnEnter()
{
row = 0;
DataParseQuerySelect ();

Finish ();

}

void DataParseQuerySelect()
{
try{
var query = ParseObject.GetQuery("hwsh_user_data");
query.FindAsync().ContinueWith(t =>
                               {
IEnumerable<ParseObject> results = t.Result;
foreach (var obj in results)
{
UserID = obj.Get<string>("User_ID");
UserName = obj.Get<string>("User_Name");
UserGeoXLongitude = obj.Get<string>("User_GeoX_Longitude");
UserGeoYLatitude = obj.Get<string>("User_GeoY_Latitude");
UserVideoID = obj.Get<string>("User_Video_ID");
UserVideoURL = obj.Get<string>("User_Video_URL");

Debug.Log(UserID.ToString() + " - " + UserName.ToString() + " - " + UserGeoXLongitude.ToString() + " - " + UserGeoYLatitude.ToString() + " - " + UserVideoID.ToString());

UserID_.Value = UserID;
UserName_.Value = UserName;
UserGeoXLongitude_.Value = UserGeoXLongitude;
UserGeoYLatitude_.Value = UserGeoYLatitude;
UserVideoID_.Value = UserVideoID;
UserVideoURL_.Value = UserVideoURL;
CreateMyMarkerObject();




//row.Value = row.Value + 1;
}
});
}
catch
{
Debug.Log ("Database query failed.");
}
}

public void CreateMyMarkerObject()
{
Debug.Log ("create my marker object");

var go = gameObject.Value;

if (go != null) {
var spawnPosition = Vector3.zero;
var spawnRotation = Vector3.zero;

var newObject = (GameObject)Object.Instantiate(go, spawnPosition, Quaternion.Euler(spawnRotation));


}
row.Value = row.Value + 1;

}
}
}

So the idea is that i am pulling information from parse. i then want to create a game object with the values. so where i am stuck at the moment is just creating a object for each entry.

please can anyone assist.


12
Playmaker Help / help with writing custom action for Facebook sdk
« on: November 28, 2015, 11:14:01 AM »
Hey peeps

I'm trying to write a custom action that will get the profile image and store it in a variable here i have provided the code. I'm a complete noob so i know i just need some assistance here. but how can i make my ProfileImage = UserAvatar or must i only use Fsm objects?

Code: [Select]
using UnityEngine;
using System.Collections;
using Facebook.Unity;
using UnityEngine.UI;



namespace HutongGames.PlayMaker.Actions {

[ActionCategory("Facebook")]
[Tooltip("Facebook Login")]

public class Facebook_Login : FsmStateAction {

[UIHint(UIHint.Variable)]
public FsmObject ProfileImage;

[UIHint(UIHint.Variable)]
public FsmInt FsmPublicIntTest;
//public FsmI

[UIHint(UIHint.Variable)]
private GameObject UIFBAvatar;

[UIHint(UIHint.Variable)]
private int privateIntTest;


public override void Reset() {

}

public override void OnEnter()
{
DoMyAction();
}

void DoMyAction()
{

FB.LogInWithReadPermissions ();
AreWeLoggedIn ();


}

void GetFacebookProfilePicture(){

Debug.Log("GetFacebookProfilePicture");

FB.API (Util.GetPictureURL ("/me", 128, 128), HttpMethod.GET, ProfilePhotoCallback);
}

private void ProfilePhotoCallback (IGraphResult result)
{
Debug.Log("FProfilePhotoCallback");

Image UserAvatar = UIFBAvatar.GetComponent<Image>();
UserAvatar.sprite = Sprite.Create (result.Texture, new Rect (0, 0, 128, 128), new Vector2 (0, 0));

ProfileImage = UserAvatar;

}


public void AreWeLoggedIn(){

Debug.Log("AreWeLoggedIn");

if (FB.IsLoggedIn) {

Debug.Log ("going to get picture");
GetFacebookProfilePicture ();

} else {
Debug.Log ("error");

}
}

}

}

thanks in advance

13
Playmaker Help / Re: How to access the device camera?
« on: November 22, 2015, 01:49:53 PM »
is this still the recommended asset to use to access camera with playmaker?

14
Playmaker Help / Help with if statement && operand
« on: November 01, 2015, 01:04:17 AM »
Im trying to follow the new tank tutorial on the unity website by re creating it with playmaker and I'm stuck with some logic.

here is an if statement that i just don't know how to translate back into playmaker can anyone please assist me.

if (Mathf.Abs (m_MovementInputValue) < 0.1f && Mathf.Abs (m_TurnInputValue) < 0.1f)

thanks in advance

15
ok last note and then i will wait for a reply.

looks like its just a lag that happens. the only work around that I've now implemented is having a set procedural float value to 0.1 and then having that load in the begging of the scene. and then flowing back into it after the value change. i provided a image.

I'm really thinking I'm missing something here. should i set property for cache sizes? completely noob here (i don't even know what property really does).

maybe could we get an action that solves this? one that maybe handles all the settings for us or whatever however it works.

ok rock on peeps!

Pages: [1] 2 3