From 8a10475f5963f3e504c0a6cf17c932f80afc3ad6 Mon Sep 17 00:00:00 2001 From: "sz.sahaj" <43649755+saszer@users.noreply.github.com> Date: Fri, 20 May 2022 01:18:06 +1000 Subject: [PATCH] refactor : updates for 0.2 --- Editor/NFTPortSettings.cs | 13 ++++--------- .../Internal/models/MetadataToUpload_model.cs.meta | 11 ----------- ...d_model.cs => Storage_MetadataToUpload_model.cs} | 2 +- .../models/Storage_MetadataToUpload_model.cs.meta | 3 +++ Runtime/Storage_UploadFile.cs | 2 +- Runtime/Storage_UploadMetadata.cs | 4 ++-- 6 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 Runtime/Internal/models/MetadataToUpload_model.cs.meta rename Runtime/Internal/models/{MetadataToUpload_model.cs => Storage_MetadataToUpload_model.cs} (95%) create mode 100644 Runtime/Internal/models/Storage_MetadataToUpload_model.cs.meta diff --git a/Editor/NFTPortSettings.cs b/Editor/NFTPortSettings.cs index 5cb48ee..7fa3c6a 100644 --- a/Editor/NFTPortSettings.cs +++ b/Editor/NFTPortSettings.cs @@ -1,11 +1,7 @@ using System; -using System.Drawing; -using System.IO; using UnityEngine; using UnityEditor; using Newtonsoft.Json; -using UnityEditor.PackageManager; -using UnityEngine.SocialPlatforms; namespace NFTPort.Editor { using Internal; @@ -13,7 +9,7 @@ namespace NFTPort.Editor public class NFTPortSettings : EditorWindow { - static string myAPIString = PortConstants.DefaultAPIKey; + static string myAPIString = PortConstants.DefaultAPIKey; protected static Type WindowType = typeof(NFTPortSettings); private static bool windowopen = false; @@ -82,12 +78,13 @@ void OnGUI() if (userModel != null) { - EditorGUILayout.LabelField(" Welcome " + userModel.profile.name); + EditorGUILayout.LabelField(" Welcome " + userModel.profile.name + "."); } EditorGUILayout.LabelField(""); GuiLine(); + GUILayout.BeginHorizontal("box"); EditorGUILayout.LabelField("installed version: " + PkgInfo.GetPackageVer()); @@ -190,10 +187,8 @@ void WriteToUserPrefs() static void UserStats() { userModel = null; - //User_Settings a = new User_Settings(); - User_Settings + User_Settings .Initialize(true) - // .OnError(error=> a.End()) .OnComplete(usermodel=> userModel = usermodel) .Run(); } diff --git a/Runtime/Internal/models/MetadataToUpload_model.cs.meta b/Runtime/Internal/models/MetadataToUpload_model.cs.meta deleted file mode 100644 index 326eacd..0000000 --- a/Runtime/Internal/models/MetadataToUpload_model.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ff320b2cb4299c8428b1e2959cceb18c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/Internal/models/MetadataToUpload_model.cs b/Runtime/Internal/models/Storage_MetadataToUpload_model.cs similarity index 95% rename from Runtime/Internal/models/MetadataToUpload_model.cs rename to Runtime/Internal/models/Storage_MetadataToUpload_model.cs index fa792a3..b1ec9b8 100644 --- a/Runtime/Internal/models/MetadataToUpload_model.cs +++ b/Runtime/Internal/models/Storage_MetadataToUpload_model.cs @@ -8,7 +8,7 @@ namespace NFTPort { [System.Serializable] - public class MetadataToUpload_model + public class Storage_MetadataToUpload_model { [Tooltip("Main NFT File URL, use 'Storage File Upload' to get url")] public string file_url = "Required Field"; diff --git a/Runtime/Internal/models/Storage_MetadataToUpload_model.cs.meta b/Runtime/Internal/models/Storage_MetadataToUpload_model.cs.meta new file mode 100644 index 0000000..544c320 --- /dev/null +++ b/Runtime/Internal/models/Storage_MetadataToUpload_model.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 25669f14e7484e768fb5b71069c9401c +timeCreated: 1652958434 \ No newline at end of file diff --git a/Runtime/Storage_UploadFile.cs b/Runtime/Storage_UploadFile.cs index 75776d1..91e7f6f 100644 --- a/Runtime/Storage_UploadFile.cs +++ b/Runtime/Storage_UploadFile.cs @@ -74,7 +74,7 @@ public static Storage_UploadFile Initialize(bool destroyAtEnd = true) return _this; } - public Storage_UploadFile SetFilePatth(string _filePath) + public Storage_UploadFile SetFilePath(string _filePath) { filePath = _filePath; return this; diff --git a/Runtime/Storage_UploadMetadata.cs b/Runtime/Storage_UploadMetadata.cs index 97381ed..a3f667d 100644 --- a/Runtime/Storage_UploadMetadata.cs +++ b/Runtime/Storage_UploadMetadata.cs @@ -18,7 +18,7 @@ public class Storage_UploadMetadata : MonoBehaviour { #region Parameter Defines - public MetadataToUpload_model metadata; + public Storage_MetadataToUpload_model metadata; [Space(20)] [ReadOnly]public float uploadProgress = 0; @@ -87,7 +87,7 @@ public static Storage_UploadMetadata Initialize(bool destroyAtEnd = true) /// Set MetaData properties, This will override any values set in metadata in the editor ≧◔◡◔≦ . /// /// metadata. - public Storage_UploadMetadata SetMetadata(MetadataToUpload_model _metadata) + public Storage_UploadMetadata SetMetadata(Storage_MetadataToUpload_model _metadata) { metadata = _metadata; return this;