简体   繁体   中英

Unity3D database retrieves in editor but not when compiled C#. Retrieves fine in other places

So I have a game built in Unity3D that has database access. Most of the URLS I have work fine in both editing and built versions. However, one type (a panel to display the player's current score of a level and the top 3 scores of that level) works perfectly in the editor, but when I compile it to anything else (web, standalone, droid...) it the panel loads and the name displays, but nothing is retrieved.

The only difference I can think of is that this panel opens up on a mouse over a button, while the other retrievals are automatic. Remember that when built, OTHER url retrievals work fine and display everything correctly, it's just this one panel that doesn't seem to work right. Any thoughts on what could be causing this?

The code is in C# if that matters. The database is MySQL with php.

Add Missing canCallRoutine

public void showScorePanal(){
    scorePanel.gameObject.SetActive (true);
    canCallCoroutine = true;
}

Without setting canCallCoroutine to true, you would not be guaranteed to fill the score field.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM