- 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
![](https://koobas.hobune.stream/wayback/20220613125547im_/https://answers.unity.com/themes/thub/images/avi.jpg)
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