javascript - Mouse click object unity 5.3 UI? -


i'm working on project due monday school. i've been working on while, when comes coding unable solve errors since i'm practically beginner. how should format code every time click object gui appears? i'm using unity version 5.3.

code:

#pragma strict   var scanners : uitext //variable gui text   function start () //scanner not clicked   {      scanners.enabled=false; }   function onmousedown() //scanner clicked   {      scanners.enabled=true; }   function onmouseup() //scanner unclicked   {       scanners.enabled=false; } 

gui elements drawn inside ongui() function. old way of doing things. since unity 5 can add ui text element (rightclick hierarchy > ui > text) or use 3d text, , gameobject.setactive(true/false); on text when run onmousedown/up() functions.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -