Quantcast
Channel: Answers for "In Game Notepad"
Viewing all articles
Browse latest Browse all 5

Answer by wherr

$
0
0
When using OnGUI(), the gui has to be rendered every frame. So, if you have it render when you press a button, it will only render for a very slight amount of time. I think something like this will help: var stringToEdit : String = "Notes:"; var menuOpen : boolean = false; function OnGUI () { if (Input.GetKeyDown ("n")) { menuOpen =! menuOpen; } if (menuOpen) { stringToEdit = GUI.TextArea (Rect (400, 400, 200, 100), stringToEdit, 200); } } Sorry if my syntax is incorrect, I am used to C#.

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>