public static GameObject createLetter(string letter, UIFont currentFont)
{
GameObject newLetter = GameObject.Instantiate(Edit_SceneManager.prefabUsedLetterStatic) as GameObject;
newLetter.name = "Used Letter";
newLetter.AddComponent<Rigidbody>();
newLetter.rigidbody.useGravity = false;
GameObject text
= new GameObject
(); text.transform.parent = newLetter.transform;
UILabel label = text.AddComponent<UILabel>();
//label.panel = Edit_SceneManager.dragPanelStatic.GetComponent<UIPanel>();
label.font = currentFont;
label.text = letter;
label.MakePixelPerfect();
label.name = "UILabel";
label
.transform.localPosition = new Vector3
(0f,
-10f,
-0
.1f
); label
.transform.localScale = new Vector3
(150f,150f,
1);
newLetter.AddComponent<Edit_DragItem>().init (false, currentFont, letter);
return newLetter;
}