Added Picture Functionality
Implemented functionality for the profile picture in the textbox for this demo. I used the Image class as the image display, then created a sprite array of pictures of Rick Astley singing, then set the Image sprite to the designated sprite in the sprite array. Since I already have a similar system in the text display section, where I use an array of strings to set the text in the text box, I just added on numbers at the end of the dialogue strings that I then use to determine what sprite is used for the profile picture. For example, one of the strings in the string array could be "never gonna give you up3", so the text box scrolls the text "never gonna give you up" and the profile picture displays rick astley image #3. This system should make it very easy for me to modify the text and the image displays at the same time, although I will need to constantly reference the sprite arrays to make sure I am setting the correct sprite for the right text.
Files
Get Text Scrolling Demo
Text Scrolling Demo
A short demonstration of text scrolling in a text box using C# in Unity2D
Status | In development |
Author | TT6022 |
Tags | Experimental, Narrative, Unity |
Leave a comment
Log in with itch.io to leave a comment.