Browse Source

Merge pull request #383 from FungusGames/open-url

Open URL command #382
master
Chris Gregan 9 years ago
parent
commit
c7e29a4834
  1. 34
      Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs
  2. 12
      Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta

34
Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs

@ -0,0 +1,34 @@
using UnityEngine;
using System.Collections;
using Fungus;
namespace Fungus
{
[CommandInfo("Scripting",
"Open URL",
"Opens the specified URL in the browser.")]
public class LinkToWebsite : Command
{
[Tooltip("URL to open in the browser")]
public string url;
public override void OnEnter()
{
Application.OpenURL(url);
Continue();
}
public override string GetSummary()
{
return url;
}
public override Color GetButtonColor()
{
return new Color32(235, 191, 217, 255);
}
}
}

12
Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1447088810b484e0a9cf0237b2e96b82
timeCreated: 1456439090
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save