Notifications
Article
Tutorial : how create output message in Smart keys console
Published 2 months ago
14
0
It is so easy, in tutorial i answer how use class Cons to send messages to Smart keys console.

Class Cons

How i can use it?

It class was wrote to send colored messages to Smart keys console.

It's easier than Console.UIOutputText.text?

Yes, it's more easy and shorter to write.
public string MyText; GameObject.Find("Console").GetComponent<ConsoleLogic>().UIOutputText.text += MyText;
VS
public string MyText; Cons.Hook(MyText);
In two examples you will see simple text output like in picture:




How use it with Colors?

To do this you need use command:
public string MyText; Cons.Hook(MyText,"ffffff");
ffffff-it is color of message in web-colors.
Wubba, lubba dub dub!(I use green color "00ff00")




Another variants?

Yes i have 2 another variants!
Variant A
Cons.Color Clr = Cons.Color.red; Cons.Hook("FirstMessage",Clr); Cons.Hook("SecondMessage",Clr);
Two messages with changed color! It is cool!





Variant B
string Clr = "00ff00";//green Cons.Hook("FirstMessage",Clr); Cons.Hook("SecondMessage",Clr);
Result:





That's all!

Yes, it was compact and easy tutorial! Have a good day!

Pixel Guy
Pixel Studio Games - Programmer
4
Comments