Forum rules - please read before posting.

How to have a logo that open on your website

Hi,

Here's the script I used to open another tab in the browser when the player click on my logo in my game.

Place the script as a component on an empty GameObject named Site, and you can then use the Object: Send message Action to run this function whenever you like. 

using UnityEngine;
using System.Collections;

{
    public class ButtonOpenURL : MonoBehaviour
    {

        void OpenUrl()
        {
            //Application.OpenURL(url);
Application.ExternalEval("window.open('http://www.yoursite.com','_blank')");
        }
    }
}

Don't forget to change the name of your site in the script and be sure to set the interaction as follow :

image
I hope this will help you in your projects.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.