Custom Fonts: Difference between revisions

From Eco - English Wiki
[unchecked revision][checked revision]
Created page with "Starting in Eco 9.5 you can add custom fonts to the game using the new '''FontContainer''' object inside the Eco Modkit. These fonts can be used almost anywhere in Eco that ac..."
 
 
Line 7: Line 7:




The rest of the process is the same as any other mod. Create and build your asset bundle and load it up into Eco. There is no code requirements for adding custom fonts to Eco. To demo how to use your new font place a sign and enter the <pre><font="nameofyourfont">Testing<nowiki></font></nowiki></pre>. In the case of the example the final text should be <pre><font="Clip">Testing<nowiki></font></nowiki></pre>. This will result in the following being displayed on the sign.
The rest of the process is the same as any other mod. Create and build your asset bundle and load it up into Eco. There is no code requirements for adding custom fonts to Eco. To demo how to use your new font place a sign and enter the following tag with the name of your font. <pre><font="nameofyourfont">Testing<nowiki></font></nowiki></pre>In the case of the example the final text should be <pre><font="Clip">Testing<nowiki></font></nowiki></pre>. This will result in the following being displayed on the sign.


[[File:FontSignExample.png|none|thumb|620x620px]]
[[File:FontSignExample.png|none|thumb|620x620px]]
[[Category:Modding]]
[[Category:Modding]]

Latest revision as of 02:26, 16 January 2023

Starting in Eco 9.5 you can add custom fonts to the game using the new FontContainer object inside the Eco Modkit. These fonts can be used almost anywhere in Eco that accepts text. Signs, Ecopedia, Tooltips, ect.

Adding a Custom Font[edit | edit source]

To add a custom font create a new "Fonts" GameObject in your mod scene and attach the FontContainer component to it. Inside this component there is a list of "Registered Fonts". You can attach any valid Font Unity accepts to this list. In this example I will add the Clip font. The mod made in this example can be found here for reference.


The rest of the process is the same as any other mod. Create and build your asset bundle and load it up into Eco. There is no code requirements for adding custom fonts to Eco. To demo how to use your new font place a sign and enter the following tag with the name of your font.

<font="nameofyourfont">Testing</font>

In the case of the example the final text should be

<font="Clip">Testing</font>

. This will result in the following being displayed on the sign.