GUI texture size doesn't match control set with the same size
Hello I've imported a .png containing look of a button.I've set texture type to GUI and warp to clamp.The texture has 210x32 pixels. Then,I've created C# script: public class MainMenu : MonoBehaviour {...
View ArticleHow to obtain smooth scrolling by using GUI ScrollView?
Hi guys I have a script: using UnityEngine; using System.Collections; public class MainMenu : MonoBehaviour { public Texture2D aboutButton; public Texture2D optionsButton; public Texture2D helpButton;...
View ArticleMagically changed initial value
Hi folks I have a script: public class MainMenu : MonoBehaviour { bool drawOptionsMenu = false; bool drawHelpMenu = false; bool drawAboutMenu = true; void OnGUI() {...
View ArticleHow to set a keyframe of an animation iside script?
Hi I've created a simple 360o rotation animation,played in loop.When a button is pressed the animation is stopped. But I'd like to align rotation after stopping to multiply of 60o. Well,I've added in...
View Article