Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: Marsh on March 09, 2014, 09:40:44 PM

Title: Open Web Page
Post by: Marsh on March 09, 2014, 09:40:44 PM
Works on all platforms.

Code: [Select]
using UnityEngine;
using System;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Mighty Professional")]
[Tooltip("Opens a Web Page")]
public class OpenWebPage : FsmStateAction
{
[Tooltip("The url you would like to open.")]
public FsmString url;

public override void OnEnter() {

Application.OpenURL(url.Value);
Finish ();
}
}
}
Title: Re: Open Web Page
Post by: jeanfabre on March 11, 2014, 06:56:08 AM
Hi,

Thanks for sharing!

 It would be good to clean up the code tho, typically the url tooltip is wrong and the debug log is not necessary.

bye,

 Jean
Title: Re: Open Web Page
Post by: xhidnoda on March 11, 2014, 07:46:04 AM
Thanks! @Marsh is very nice...just share the code.  :D
Title: Re: Open Web Page
Post by: Marsh on March 11, 2014, 09:12:09 AM
np!

Fixed the code up a bit
Title: Re: Open Web Page
Post by: jeanfabre on March 11, 2014, 01:27:04 PM
Hi,

 Excellent :)

 Bye,

 Jean