protected void DrawDevelopmentSettings() { EditorUiUtility.DrawBoldFoldout(developmentAnimation, "Development Settings"); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(developmentAnimation.faded)) { if (scope.visible == true) { // Show the enabled bool debugEnable.boolValue = EditorGUILayout.Toggle("Enable Debugging", debugEnable.boolValue); debugAnimation.target = debugEnable.boolValue; // Draw the rest of the controls using (new EditorGUI.IndentLevelScope()) using (EditorGUILayout.FadeGroupScope fadeScope = new EditorGUILayout.FadeGroupScope(debugAnimation.faded)) { if (fadeScope.visible == true) { debugEnableScriptDebugging.boolValue = EditorGUILayout.Toggle("Debug Script", debugEnableScriptDebugging.boolValue); debugBuildScriptOnly.boolValue = EditorGUILayout.Toggle("Build Scripts Only", debugBuildScriptOnly.boolValue); } } // Draw checkboxes EditorGUILayout.PropertyField(enableStrictMode); EditorGUILayout.PropertyField(enableAssertions); } } }
public override void OnInspectorGUI() { // Update the serialized object serializedObject.Update(); // Display all fields EditorGUILayout.PropertyField(passwordHash); EditorGUILayout.PropertyField(saltKey); EditorGUILayout.PropertyField(viKey); // Display a button to randomize all fields EditorGUILayout.Space(); if (GUILayout.Button("Randomize all fields") == true) { passwordHash.stringValue = StringCryptographer.GetRandomPassword(RandomPasswordLength); saltKey.stringValue = StringCryptographer.GetRandomPassword(RandomPasswordLength); viKey.stringValue = StringCryptographer.GetRandomPassword(StringCryptographer.ViKeyBlockSize); } // Display test encryption EditorGUILayout.Space(); EditorUiUtility.DrawBoldFoldout(encryptionGroup, "Test Encryption"); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(encryptionGroup.faded)) { if (scope.visible == true) { testEncryption = EditorGUILayout.DelayedTextField("Input", testEncryption); string output = null; if (string.IsNullOrEmpty(testEncryption) == false) { output = ((StringCryptographer)target).Encrypt(testEncryption); } EditorGUILayout.TextField("Output", output); } } // Display test decryption EditorGUILayout.Space(); EditorUiUtility.DrawBoldFoldout(decryptionGroup, "Test Decryption"); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(decryptionGroup.faded)) { if (scope.visible == true) { testDecryption = EditorGUILayout.DelayedTextField("Input", testDecryption); string output = null; if (string.IsNullOrEmpty(testDecryption) == false) { output = ((StringCryptographer)target).Decrypt(testDecryption); } EditorGUILayout.TextField("Output", output); } } // Apply modifications serializedObject.ApplyModifiedProperties(); }
protected void DrawBuildFile(System.Action drawPath, AdjustText adjustPreviewPath, string foldoutLabel) { // Draw the build folder EditorUiUtility.DrawBoldFoldout(folderAnimation, foldoutLabel); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(folderAnimation.faded)) { if (scope.visible == true) { DrawFileNamePreview(drawPath, adjustPreviewPath); } } }
private void DrawInterruptions() { EditorUiUtility.DrawBoldFoldout(interruptionsAnimation, "Interruptions"); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(interruptionsAnimation.faded)) { if (scope.visible == true) { EditorGUILayout.PropertyField(onBuildFailed); EditorGUILayout.PropertyField(onBuildCancelled); } } }
protected void DrawCustomSettings() { // Draw foldout EditorUiUtility.DrawBoldFoldout(customSettingsAnimation, "Custom Build Settings"); using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(customSettingsAnimation.faded)) { if (scope.visible == true) { DrawPlatformSpecificSettings(); EditorGUILayout.PropertyField(customScriptDefineSymbols); EditorGUILayout.PropertyField(customScenes); } } }
private void DrawArchiveSettings() { EditorUiUtility.DrawBoldFoldout(archiveAnimation, "Archive File Name"); // Draw the rest of the controls using (EditorGUILayout.FadeGroupScope fadeScope = new EditorGUILayout.FadeGroupScope(archiveAnimation.faded)) { if (fadeScope.visible == true) { // Draw the rest of the controls DrawFileNamePreview(DrawArchiveControls, AppendArchiveFileName); } } }
private void DrawDomainListLocation() { EditorUiUtility.DrawBoldFoldout(domainListLocationAnimation, "Domain List Location"); // Draw the rest of the controls using (EditorGUILayout.FadeGroupScope fadeScope = new EditorGUILayout.FadeGroupScope(domainListLocationAnimation.faded)) { if (fadeScope.visible == true) { // Draw the rest of the controls DrawFileNamePreview(DrawDomainListLocationControls, AppendDomainListLocation); } } }
private void DrawBuildSettingList() { // Draw foldout EditorUiUtility.DrawBoldFoldout(buildSettingsAnimation, "Platforms"); // Draw the list using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(buildSettingsAnimation.faded)) { if (scope.visible == true) { childBuildSettingsList.List.DoLayoutList(); } } }
protected override void DrawExtraSettings() { EditorGUILayout.Space(); // Draw foldout EditorUiUtility.DrawBoldFoldout(allArchivesAnimation, "Host Specific Archive Settings"); // Draw the list using (EditorGUILayout.FadeGroupScope scope = new EditorGUILayout.FadeGroupScope(allArchivesAnimation.faded)) { if (scope.visible == true) { allArchiveList.List.DoLayoutList(); } } }
private void DrawArchiveContents() { EditorUiUtility.DrawBoldFoldout(contentAnimation, "Archive Contents"); // Draw the rest of the controls using (EditorGUILayout.FadeGroupScope fadeScope = new EditorGUILayout.FadeGroupScope(contentAnimation.faded)) { if (fadeScope.visible == true) { // Draw the rest of the controls EditorGUILayout.PropertyField(includeIndexHtml); EditorGUILayout.PropertyField(domainEncrypter); domainList.DoLayoutList(); // Draw the import stuff EditorGUILayout.Space(); UnityEngine.Object testAsset = null; testAsset = EditorGUILayout.ObjectField("Import Domain List", testAsset, typeof(UnityEngine.Object), false); if (testAsset != null) { AssetBundle bundle = null; try { // Load the bundle, and convert it to a domain list bundle = AssetBundle.LoadFromFile(AssetDatabase.GetAssetPath(testAsset)); DomainList domainList = Utility.GetDomainList(bundle); // Decrypt the domain list HostArchiveSetting setting = ((HostArchiveSetting)target); setting.AcceptedDomains = DomainList.Decrypt(domainList, setting.DomainEncrypter); } finally { if (bundle != null) { // Clean-up bundle.Unload(true); } } } } } }