top of page

Grantey Group

Public·38 members

Code Pre Gfx.ff MW2 Dir File CPY


then we get to work. we open our png file, open a new textasset, and then look for the first chunk. we find it, open the data, and then copy the hexadecimal text using text.substring(0,26). in hex, 0 is the beginning of the string, so 0, is just the first character. youll notice that the hex value of the text string is the same as the name of the chunk, so we immediately know that is the name of the chunk. this is very useful. next, we open the chunk and copy out its hex value; then we will use this hex value as an index into a unity datastructure to find the fontinfo.

before we get into the editor, we have to deal with the compiler. note that this will not compile the file at the moment, which is why we included the png extension to the file name. now, the compiler will take our source code and look for any errors. there will be three errors; you can just ignore those and keep your eye on the four up with a green error icon. we expect the errors we see, as we are modifying and compiling an asset that we have imported with the png extension. once the code compiles, we can get to work in the editor.

go to inspector, change the text component to use our new fontinfo, and assign a new name for it in the inspector. then, we click the little gear menu at the top right of the text editor and assign our fontinfo to the font, which is the only available container for text in unity 2d. next, we drag in our png file to the scene and open it in the asset inspector. the png assets for our game are stored in the assets/resources/png folder. select the png file and we get our additional source code to display the actual png data. we also get the chunk information we need. it could be useful to look at the compiled png file just in case, but we just want to use our new object to manipulate a text object, so we ignore this. 3d9ccd7d82


Welcome to the group! You can connect with other members, ge...
Group Page: Groups_SingleGroup
bottom of page