Unity EditorUtility.DisplayDialog在独立版本中不起作用

时间:2018-04-09 17:26:51

标签: unit-testing unity3d unityscript

它在Unity编辑器中显示消息框没有问题,但它在Windows应用程序中没有显示任何内容。这是代码:

public void continueAgents()
{
    Application.OpenURL("Some link");
    #if UNITY_EDITOR
    EditorUtility.DisplayDialog("Wait!", "Please complete the survey first!", "Ok");
    #endif
    Drv.changeCondition();
    coopAgentID = 5;
    if (participantID[coopAgentID] == 'c')
        coopAgent = 21;
    else
        coopAgent = 81;
    cond = 2;
    Obj = GameObject.Find("ScriptHolder");
    SA = Obj.GetComponent<switchAnimation>();
    if (agnt % 2 == 0)
        SA.GotoAgentOne();
    else
        SA.GotoAgentTwo();
}

0 个答案:

没有答案