Improve markeplace scripts

This commit is contained in:
2025-07-14 13:57:44 -07:00
parent fd32df4eb7
commit a642f92288
4 changed files with 7 additions and 7 deletions

View File

@@ -4123,6 +4123,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ac25b048bc0f6aded8697b98caef8382, type: 3}
m_Name:
m_EditorClassIdentifier:
marketplaceManager: {fileID: 789608752}
statusText: {fileID: 1732844199}
--- !u!1 &1708620717
GameObject:
@@ -5717,6 +5718,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b8133693b9ee6eec098e9cef8b719edf, type: 3}
m_Name:
m_EditorClassIdentifier:
marketplaceManager: {fileID: 789608752}
statusText: {fileID: 1866125040}
backButton: {fileID: 968417894}
content: {fileID: 1517048288}

View File

@@ -6,15 +6,14 @@ using UnityEngine.UI;
public class IconMarketplaceDownloadIcon : MonoBehaviour
{
public IconMarketplaceManager marketplaceManager;
public TMP_Text statusText;
public Button backButton;
private IconMarketplaceManager marketplaceManager;
public GameObject content;
public GameObject sample;
public void Load(IconMarketplaceManager loadedFrom)
void Awake()
{
marketplaceManager = loadedFrom;
backButton.onClick.AddListener(() => marketplaceManager.SwitchPanel(0));
GetIcons();
}

View File

@@ -14,7 +14,7 @@ public class IconMarketplaceManager : MonoBehaviour
public Button downloadButton;
public Button uploadButton;
void Start()
void Awake()
{
downloadButton.onClick.AddListener(() => SwitchPanel(1));
#if !UNITY_STANDALONE_OSX && !UNITY_STANDALONE_WIN && !UNITY_STANDALONE_LINUX && !UNITY_EDITOR
@@ -45,13 +45,11 @@ public class IconMarketplaceManager : MonoBehaviour
uploadPanel.SetActive(false);
break;
case 1:
downloadPanelScript.Load(this);
normalPanel.SetActive(false);
downloadPanel.SetActive(true);
uploadPanel.SetActive(false);
break;
case 2:
uploadPanelScript.Load();
normalPanel.SetActive(false);
downloadPanel.SetActive(false);
uploadPanel.SetActive(true);

View File

@@ -8,9 +8,10 @@ using UnityEngine.Networking;
public class IconMarketplaceUploadIcon : MonoBehaviour
{
public IconMarketplaceManager marketplaceManager;
public TMP_Text statusText;
public void Load()
void Awake()
{
OpenFilePicker();
}