Hey guys, I have made a script with the correct listeners and everything but it is not detecting the script? I ripped this out of another project that was working.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Collections;
public class PlanetSelect : MonoBehaviour {
[Serializable]
public class Planets
{
public GameObject Planet_Obj;
public string Planet_Name;
public int Planet_Number;
public Vector3 OffSet;
}
public Text PlanetNameText;
public List Planet = new List();
public int CurrentPlanetNumber = 0;
void Start () {
Camera.main.transform.position = Planet [CurrentPlanetNumber].OffSet;
CurrentPlanetNumber = 0;
}
void Update () {
Camera.main.transform.position = Planet [CurrentPlanetNumber].OffSet;
PlanetNameText.text = Planet[CurrentPlanetNumber].Planet_Name;
}
public void ButtonClick (bool Up)
{
if (Up) {
CurrentPlanetNumber++;
Debug.Log (CurrentPlanetNumber);
} else {
CurrentPlanetNumber–;
}
}
}
