- Home /
Question by
convictcartel · Jan 04, 2014 at 10:15 PM ·
guiguitexturebarmacro
GUITexture Click
Im making a simple macro bar.. Im trying to access my function from my other Javascript file but cant seem to, heres my code. var normalTex : Texture2D; var hoverTex : Texture2D; var script : PlayerRelativeControl;
function OnMouseEnter(){
guiTexture.texture = hoverTex;
}
function OnMouseExit() {
guiTexture.texture = normalTex;
}
function OnMouseDown(){
script = GetComponent("PlayerRelativeControl");
script.StopCoroutine("Slap");
script.StartCoroutine("Slap");
}
Comment
is the playerRelativeControl script in the same gameobject?
im not sure I understand what ur asking but I believe so
Your answer

Follow this Question
Related Questions
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
GUI 2D Bounding Box 1 Answer
Move GUI elements. 0 Answers
Erroe when resizing GUITextures in C# file 1 Answer
GUI Transparency Changing automatically 2 Answers