Skip to content

Simple Unity component implementing stack of text messages

Notifications You must be signed in to change notification settings

ruzicka/StackTextBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

StackTextBox

StackTextBox is simple Unity 3D component implementing stack of text messages.

Installation

Download the project and copy content of the Assets directory to your Unity project's Assets directory.

How to use

	//Get StackTextBox instance of the prefab droped in the scene
	StackTextBox msgBox = GameObject.Find("StackTextBox")
		.GetComponent<StackTextBox>();
		
	// add some messages	
	msgBox.AddText("Hello, world!");
	msgBox.AddText("By, world!");

	// AddText method returns StackText instance
	StackText msg = msgBox.AddText("Hello, world!");
	...
	// it can be used later to hide message. Hiding message effectively 
	// removes it from the stack.
	msg.Hide();
	
	// text message can be hidden automatically after specified time (miliseconds) 
	msgBox.AddText("This message will self-desctruct in 5 seconds", 5000);
	

About

Simple Unity component implementing stack of text messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages