playMaker

Author Topic: Open Web Page  (Read 4160 times)

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Open Web Page
« 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 ();
}
}
}
« Last Edit: March 11, 2014, 09:11:50 AM by Marsh »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Open Web Page
« Reply #1 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

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Open Web Page
« Reply #2 on: March 11, 2014, 07:46:04 AM »
Thanks! @Marsh is very nice...just share the code.  :D

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
Re: Open Web Page
« Reply #3 on: March 11, 2014, 09:12:09 AM »
np!

Fixed the code up a bit

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Open Web Page
« Reply #4 on: March 11, 2014, 01:27:04 PM »
Hi,

 Excellent :)

 Bye,

 Jean