Hi,
I’m completely new to Unity - still working through tutorials etc. I’m starting to work through things in my head though and just wanted to check whether or not I’m on the right track.
I’m creating an app which will initially launch an “empty room”. It will also immediately show a form over that which requires the user to login (using a web service). If they are successful in logging in, the form will clear and certain objects will drop into the room depending on who the user is.
What I’m not sure about is where this code “sits”. All my little experiments have been attached to the main camera so far, but I’m not sure if that’s correct in the long run.
This is my basic understanding of how the logic for what I’m trying to do might look. Is this on the right track?
public var requiresLogin = true;
function Update () {
if(requiresLogin) {
Do nothing because the login screen is up
}
else {
The login form should have disappeared (?????)
Start dropping objects into the scene
}
}
function OnGUI() {
if(requiresLogin) {
Build and display the login form
If complete and login is successful then
requiresLogin = false;
}
}