コード例 #1
0
        private void OnEnable()
        {
            // Ensure the settings are loaded (if available)
            KnetikCloudEditorConfigurationManager.Initialize();
            mUserCredentials = KnetikUserCredentials.Load();

            mProjectSettingsHeaderLabel = new GUIContent("Project Configuration", "Project wide settings that should be checked into source control (if used).");
            mAppName          = new GUIContent("App Name", "The App Name for your project as configured in the KnetikCloud Web interface.  E.g. 'my-first-game' (without quotes).");
            mClientId         = new GUIContent("Client ID", "The client ID as configured in the KnetikCloud Web interface.");
            mProductionToggle = new GUIContent("Production Environment", "Should the client connect to the production environment or staging environment?");

            mClientCredentialsHeaderLabel = new GUIContent("Client Credentials", "Optional: Settings that apply if the grant type is 'client_credentials'.\nShould be checked into source control (if used).");
            mClientSecret = new GUIContent("Client Secret", "Optional: Must match the secret configured in the KnetikCloud Web interface.");

            mUserCredentialsHeaderLabel = new GUIContent("User Credentials", "Optional: Per developer settings that apply if the grant type is 'password'.");
            mUserCredentialsId          = new GUIContent("User Id", "Optional: Per developer user account to use.");
            mUserCredentialsPassword    = new GUIContent("Password", "Optional: Per developer account password to use.");

            mSaveButton = new GUIContent("Save");
        }
コード例 #2
0
        private void OnGUI()
        {
            Rect displayRect = new Rect(0, 0, Screen.width, Screen.height - ControlButtonLayoutHeight);

            GUILayout.BeginArea(displayRect);

            DisplayProjectSettingsGUI();
            DisplayClientCredentialsGUI();
            DisplayUserCredentialsGUI();

            GUILayout.EndArea();

            if (GUI.changed)
            {
                KnetikCloudEditorConfigurationManager.SetDirty();
            }

            DisplayControlButtons();

            Repaint();
        }
コード例 #3
0
 static KnetikCloudEditorMenu()
 {
     KnetikCloudEditorConfigurationManager.Initialize();
 }