I am trying to make a script to open a URL when pressed.
I made a GUI Texture, (Not sure if that can be used as a button or not.)
I have 2 errors
(9,46): error CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected
(10,28): error CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected
I know Im supposed to have var. but not sure what.
This is the script so far
Any help will be appreciated
using UnityEngine;
using System.Collections;
public class info : MonoBehaviour {
// Use this for initialization
void Start () {
//Draw info button
Texture infoButton = GUITexture;
if(GUITexture(new GUIContent(infoButton),"trans_button"))
{
Application.OpenURL("http://www.Facebook.com/MSheriGames");
}
}
// Update is called once per frame
void Update () {
}
}