diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs b/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs new file mode 100644 index 00000000..2ebc8cdd --- /dev/null +++ b/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); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta b/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs.meta new file mode 100644 index 00000000..c537a0b9 --- /dev/null +++ b/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: