forum.boolean.name

forum.boolean.name (http://forum.boolean.name/index.php)
-   2D/GUI (http://forum.boolean.name/forumdisplay.php?f=167)
-   -   Проблема испорта GUI (http://forum.boolean.name/showthread.php?t=17941)

mepihin 26.02.2013 23:25

Проблема испорта GUI
 
есть скрипт:
PHP код:

using UnityEngine;
using System.Collections;

public class 
GUIHelp MonoBehaviour {
    
    private 
GUIText help;
    
    
void Start()
    {
        
help GameObject.Find("Help").guiText;
        
RandomText();
    }
    
    
void RandomText()
    {
        
help.text "Press R to restart the game";
        yield return new 
WaitForSeconds (3);
        
help.text "Choose red or blue player to bet";
        yield return new 
WaitForSeconds (3);
        
help.text "Play with your friends and win their";
        yield return new 
WaitForSeconds (3);
        
help.text "The victory of a player you can at the top of the screen";
    }
    


Пишет:
Цитата:

Assets/Scripts/GUIHelp.cs(14,14): error CS1624: The body of `GUIHelp.RandomText()' cannot be an iterator block because `void' is not an iterator interface type
Что сделать, напишите пожалуйста

pie 26.02.2013 23:52

Ответ: Проблема испорта GUI
 
http://forum.boolean.name/showthread.php?t=13315

Lestar 26.02.2013 23:52

Ответ: Проблема испорта GUI
 
yield return использовать в корутинах.


Часовой пояс GMT +4, время: 12:58.

vBulletin® Version 3.6.5.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot