Hello.
I’m developing an Android application that is supposed to interact with an external server through websockets (implemented here using websocketsharp).
Currently, I’m implementing a simple autentication screen that also serves as the place to initialize the client’s websocket:
The idea is:
The user fills in with the login credentials and presses login which in turn initializes the websocket connection with the remote server. The communication establishment between client and server works as intended (so far), triggering the following handler method for it:
private void _OnSocketOpen(object sender, EventArgs e)
{
Debug.Log("Connection Confirmed!");
AutenticationScreen.instance.loginStatusText.text = "Evaluating Credentials...";
CredentialsMessage message = new CredentialsMessage { ID = "Credentials", Credentials = AutenticationScreen.instance.credentials };
socket.Send(JsonUtility.ToJson(message));
}
As you may deduce, this accesses the singleton for the Autentication Screen’s controller script to fetch the credentials. This also works properly.
The problem I’m currently having is with Line 4. I’m trying to modify the text content of the login status UI Text through the script and while it updates the value on the Inspector, it simply does not visually update while also halting the function with no errors thrown at that same line. The code works fine if I remove it (only for it to halt once again when the login evaluation result is returned from the server and I want to set that text to tell whether or not it was successfull). Updating any value on the Text component’s inspector makes it appear which leads me to believe that this is a similar error to this although the issue still seems unresolved and then code does not seem to be halting there
Am I missing something in the way the UI functions here? Is this a bug?
