Hey guys…
I wonder if there is anyway to have a GUIText separate in a few lines…
I have one that shows the results of an In App Purchase, but the text is kind of long, so one line is not enough and does not look too good, but, since the results are added dinamically, after the user buys the consumable, I can´t use a regular method…
Just in case, this is the code related
private GUIText myText3;
public GameObject myPurchaseResults;
void Start()
{
myText3 = myPurchaseResults.AddComponent<GUIText>();
}
//In the void OnGUI I have some buttons, and bools, finally calling the BuyGold() function:
void buyGold()
{
if (_5G == true)
{
_5G = false;
Store.requestProductPurchase("5GoldCoin", (purchaseResults, error) =>
{
if (error != null)
{
Debug.LogError("Error purchasing item: " + error);
}
else
{
Debug.Log("product purchase result: " + purchaseResults);
myText3.text = "product purchase result: " + purchaseResults;
if (true)
{
gold = gold + 5;
}
}
});
}
}
Now, all this is the text I have to show:
product purchase result: [PurchaseResults] offerId: , receiptXml: <?xml version="1.0" encoding="utf-8"?>, status: Succeeded, transactionId: 0eba0cb0-c0a0-00f0-000d-000000cb000e
Thanks!!!