Custom script functions can be called from ActionLists using either the Object: Call event or Object: Send message Actions.
This script, OpenLink.cs, can be used to open a link defined in its Inspector:
using UnityEngine;
public class OpenLink : MonoBehaviour
{
public string url;
public void Interact ()
{
Application.OpenURL (url);
}
}
To have it be triggered by AC, attach it to a GameObject in your scene, or a prefab, and use AC's Object: Send message Action to run its Interact function.
Comments
Custom script functions can be called from ActionLists using either the Object: Call event or Object: Send message Actions.
This script, OpenLink.cs, can be used to open a link defined in its Inspector:
To have it be triggered by AC, attach it to a GameObject in your scene, or a prefab, and use AC's Object: Send message Action to run its Interact function.
More info on Application.OpenURL here: https://docs.unity3d.com/ScriptReference/Application.OpenURL.html
I was inspired to try and make a custom action for opening a URL. Here's what I made:
This gives you an action you can then use in an action list:
Note:
Application.OpenURL()
will open the website in your default web browser. It won't be in the game.Here's the end result:
Really cool Thankyou!