1

It shows the messagebox in unity editor without a problem but it doesn't show anything in windows app. Here's the code:

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();
}
derHugo
  • 83,094
  • 9
  • 75
  • 115
Reza
  • 21
  • 4
  • 1
    DisplayDialog is an Editor only feature and not only should it not work in a build, it should compiler either. The duplicate linked a tutorial to build your own pop up Window. – Programmer Apr 09 '18 at 20:22

0 Answers0