using UnityEngine;
using System.Collections;
[AddComponentMenu("Camera-Control/Keyboard Orbit")]
public class Guikeys : MonoBehaviour {
private info myscript;
void OnGUI(){
if(GUI.RepeatButton(new Rect(1115,470,56,29),"",uptexture))
{
GUIVertical1 = 1;
myscript = this.GetComponent();
myscript.image2 = true; // error here
}
}
}
Error is
---------------------------------------------------------
Static member `info.image2' cannot be accessed with an instance reference, qualify it with a type name instead
---------------------------------------------------------
can u guys tell me where am i doing it wrong ??
thanx
regards
↧