2D Toolkit Forum

2D Toolkit => Support => Topic started by: OnlineCop on October 10, 2012, 12:16:07 am

Title: Adding tk2dTextMesh before font created causes IndexOutOfRangeException
Post by: OnlineCop on October 10, 2012, 12:16:07 am
I just created a new Unity project, and imported 2D Toolkit version 1.8b1. I created a new GameObject and selected it, then tried to add a tk2dTextMesh component to it. This caused an IndexOutOfRangeException error in the Unity console.

It turns out that I had not yet created a font.

I was able to fix this by importing a .fnt and .png file, creating a Font from the Project->Create->tk2d->Font.

It would be helpful if we could get a "Whoa there; you need to create a font first!" popup (or even a Debug.Log() message) to explain that the developer (us, not you) forgot to do that step.
Title: Re: Adding tk2dTextMesh before font created causes IndexOutOfRangeException
Post by: unikronsoftware on October 10, 2012, 12:28:09 am
Good point. Added to todo.

You must've downloaded the source only version, right?