• Amit Prakash

Halau - Information System

Halau, is a small system giving information about the various Gods which can be seen by the players/user upon some event (yet to be defined). This was little unconventional for me to work on it as I never worked with UI system of Unity. Although, Unity UI system is very easy to use, I had to spend some hours to learn especially about placement of the anchors and pivots for UI objets.

Every UI element in Unity have two important settings, Anchors and Pivots. Achors actually defines the positioning of the UI Object with respect to the Unity UI Canvas. If these anchors are not placed correctly, the UI elements will may not stay at exact placed position upon change of the game resolution or resizing of game window.

This system was very simple and contains four buttons for four Gods and upon clicking it gives it's information. I designed the system in such a way that these descriptions can be set from the editor itself so that the level designer may not have to worry about background coding (which is very small).

Interesting part of the system was not coding, it was good flow design - giving more abstract design to the level editors. I created an empty game (Info Manager) object which handles all of the underlying things. This also gives an opportunity to extend the number of Gods (buttons) which would be easy to do from the editor itself. Just we have to set the button function to the Info Manager and rest will be taken care of.

public Text description; public Image godImage; public void onClick(GameObject button) { description.gameObject.SetActive(true); godImage.gameObject.SetActive(true); description.text = button.GetComponent<Info_Image>().description; godImage.sprite = button.GetComponent<Info_Image>().image; }

Below is the very basic demo of the system with arbitrary message.

78 views0 comments

Recent Posts

See All

Game Engineering Blog Posts

Visual Studio Solution Setup and Asset Build System Lua Integration with C++, OpenGL and DirectX Difference Index/Vertex Buffer and Cross - Platform Implementation Mesh Loading Using Lua and shared Sh


T: 385-225-5721  

  • LinkedIn Clean
  • Facebook Clean
  • Twitter Clean
  • Google+ Clean

Follow me


© 2015 by Amit Prakash

This site was designed with the
website builder. Create your website today.
Start Now