void OnGUI() { GUILayout.Space(20); ExportPath = EditorGUILayout.TextField("Export Path: ", ExportPath); GUILayout.Space(10); BundleName = EditorGUILayout.TextField("Custom Stage Name: ", BundleName); GUILayout.Space(10); IsForSpinMode = EditorGUILayout.Toggle("For spin mode?", IsForSpinMode); GUILayout.Space(70); if (GUILayout.Button("Export PC")) { if (BundleName == null || BundleName.Equals(string.Empty)) { Debug.LogError("Please set the bundle name"); } else { Debug.Log($"Bundle Name set to {BundleName}"); string extention = "stage"; if (IsForSpinMode) { extention = "spinstage"; } string sanitizeBundleName = SanitizeString(BundleName); AssetImporter.GetAtPath(AssetsPath).SetAssetBundleNameAndVariant($"{sanitizeBundleName}.{extention}", ""); string bundleExportPath = $"{Application.dataPath}/../{ExportPath}/{sanitizeBundleName}/"; if (!Directory.Exists(bundleExportPath)) { Directory.CreateDirectory(bundleExportPath); } BuildPipeline.BuildAssetBundles(bundleExportPath, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows); EditorUtility.RevealInFinder($"{bundleExportPath}"); Debug.Log($"Export complete, to directory {bundleExportPath}"); this.Close(); } } if (GUILayout.Button("Export Quest")) { if (BundleName == null || BundleName.Equals(string.Empty)) { Debug.LogError("Please set the bundle name"); } else { Debug.Log($"Bundle Name set to {BundleName}"); string extention = "stagequest"; if (IsForSpinMode) { extention = "spinstagequest"; } string sanitizeBundleName = SanitizeString(BundleName); AssetImporter.GetAtPath(AssetsPath).SetAssetBundleNameAndVariant($"{sanitizeBundleName}.{extention}", ""); string bundleExportPath = $"{Application.dataPath}/../{ExportPath}/{sanitizeBundleName}/"; if (!Directory.Exists(bundleExportPath)) { Directory.CreateDirectory(bundleExportPath); } BuildPipeline.BuildAssetBundles(bundleExportPath, BuildAssetBundleOptions.None, BuildTarget.Android); EditorUtility.RevealInFinder($"{bundleExportPath}"); Debug.Log($"Export complete, to directory {bundleExportPath}"); this.Close(); } } if (GUILayout.Button("Cancel")) { this.Close(); } this.Repaint(); }
void OnGUI() { GUILayout.Space(20); ExportPath = EditorGUILayout.TextField("Export Path: ", ExportPath); GUILayout.Space(10); BundleName = EditorGUILayout.TextField("Custom Stage Name: ", BundleName); GUILayout.Space(10); IsForSpinMode = EditorGUILayout.Toggle("For spin mode?", IsForSpinMode); GUILayout.Space(70); if (GUILayout.Button("Export PC")) { if (BundleName == null || BundleName.Equals(string.Empty)) { Debug.LogError("Please set the bundle name"); EditorUtility.DisplayDialog("Custom Stage Name Empty", "The Custom Stage name must not be empty", "Ok"); } else { Debug.Log($"Bundle Name set to {BundleName}"); string extention = "stage"; if (IsForSpinMode) { extention = "spinstage"; } string sanitizeBundleName = SanitizeString(BundleName); AssetImporter.GetAtPath(AssetsPath).SetAssetBundleNameAndVariant($"{sanitizeBundleName}.{extention}", ""); string bundleExportPath = $"{Application.dataPath}/../{ExportPath}/{sanitizeBundleName}/"; if (!Directory.Exists(bundleExportPath)) { Directory.CreateDirectory(bundleExportPath); } BuildPipeline.BuildAssetBundles(bundleExportPath, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows); EditorUtility.RevealInFinder($"{bundleExportPath}"); Debug.Log($"Export complete, to directory {bundleExportPath}"); this.Close(); } } if (GUILayout.Button("Export Quest")) { if (BundleName == null || BundleName.Equals(string.Empty)) { Debug.LogError("Please set the bundle name"); EditorUtility.DisplayDialog("Custom Stage Name Empty", "The Custom Stage name must not be empty", "Ok"); } else { Debug.Log($"Bundle Name set to {BundleName}"); string extention = "stagequest"; if (IsForSpinMode) { extention = "spinstagequest"; } string sanitizeBundleName = SanitizeString(BundleName); AssetImporter.GetAtPath(AssetsPath).SetAssetBundleNameAndVariant($"{sanitizeBundleName}.{extention}", ""); string bundleExportPath = $"{Application.dataPath}/../{ExportPath}/{sanitizeBundleName}/"; //Check if Android Build support is install before exporting so that people //do not get confused when it doesn't export when Android SDK isn't installed //Debug.Log(BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.Android, BuildTarget.Android)); if (BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.Android, BuildTarget.Android) == true) { Debug.Log("Andriod is Supported meaning Android SDK is INSTALLED!"); if (!Directory.Exists(bundleExportPath)) { Directory.CreateDirectory(bundleExportPath); } try { BuildPipeline.BuildAssetBundles(bundleExportPath, BuildAssetBundleOptions.None, BuildTarget.Android); EditorUtility.RevealInFinder($"{bundleExportPath}"); Debug.Log($"Export complete, to directory {bundleExportPath}"); } catch (Exception E) { Debug.LogError("FAILED TO EXPORT! Caused by: " + E); } } else { Debug.LogError("ANDROID SDK NOT INSTALLED!"); EditorUtility.DisplayDialog("EXPORT FAILED!", "Exporting to Quest failed because the Android SDK is not installed! Install it from Unity Hub and restart the editor to continue", "Ok"); } this.Close(); } } if (GUILayout.Button("Cancel")) { this.Close(); } this.Repaint(); }
/// <summary> /// Returns true if BankingAccountDetail instances are equal /// </summary> /// <param name="other">Instance of BankingAccountDetail to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankingAccountDetail other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Bsb == other.Bsb || Bsb != null && Bsb.Equals(other.Bsb) ) && ( AccountNumber == other.AccountNumber || AccountNumber != null && AccountNumber.Equals(other.AccountNumber) ) && ( BundleName == other.BundleName || BundleName != null && BundleName.Equals(other.BundleName) ) && ( SpecificAccountUType == other.SpecificAccountUType || SpecificAccountUType != null && SpecificAccountUType.Equals(other.SpecificAccountUType) ) && ( TermDeposit == other.TermDeposit || TermDeposit != null && TermDeposit.Equals(other.TermDeposit) ) && ( CreditCard == other.CreditCard || CreditCard != null && CreditCard.Equals(other.CreditCard) ) && ( Loan == other.Loan || Loan != null && Loan.Equals(other.Loan) ) && ( Features == other.Features || Features != null && Features.SequenceEqual(other.Features) ) && ( Fees == other.Fees || Fees != null && Fees.SequenceEqual(other.Fees) ) && ( DepositRates == other.DepositRates || DepositRates != null && DepositRates.SequenceEqual(other.DepositRates) ) && ( LendingRates == other.LendingRates || LendingRates != null && LendingRates.SequenceEqual(other.LendingRates) ) && ( Address == other.Address || Address != null && Address.Equals(other.Address) )); }