Improve markeplace scripts
This commit is contained in:
@@ -4123,6 +4123,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: ac25b048bc0f6aded8697b98caef8382, type: 3}
|
m_Script: {fileID: 11500000, guid: ac25b048bc0f6aded8697b98caef8382, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
marketplaceManager: {fileID: 789608752}
|
||||||
statusText: {fileID: 1732844199}
|
statusText: {fileID: 1732844199}
|
||||||
--- !u!1 &1708620717
|
--- !u!1 &1708620717
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -5717,6 +5718,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b8133693b9ee6eec098e9cef8b719edf, type: 3}
|
m_Script: {fileID: 11500000, guid: b8133693b9ee6eec098e9cef8b719edf, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
marketplaceManager: {fileID: 789608752}
|
||||||
statusText: {fileID: 1866125040}
|
statusText: {fileID: 1866125040}
|
||||||
backButton: {fileID: 968417894}
|
backButton: {fileID: 968417894}
|
||||||
content: {fileID: 1517048288}
|
content: {fileID: 1517048288}
|
||||||
|
|||||||
@@ -6,15 +6,14 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
public class IconMarketplaceDownloadIcon : MonoBehaviour
|
public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public IconMarketplaceManager marketplaceManager;
|
||||||
public TMP_Text statusText;
|
public TMP_Text statusText;
|
||||||
public Button backButton;
|
public Button backButton;
|
||||||
private IconMarketplaceManager marketplaceManager;
|
|
||||||
public GameObject content;
|
public GameObject content;
|
||||||
public GameObject sample;
|
public GameObject sample;
|
||||||
|
|
||||||
public void Load(IconMarketplaceManager loadedFrom)
|
void Awake()
|
||||||
{
|
{
|
||||||
marketplaceManager = loadedFrom;
|
|
||||||
backButton.onClick.AddListener(() => marketplaceManager.SwitchPanel(0));
|
backButton.onClick.AddListener(() => marketplaceManager.SwitchPanel(0));
|
||||||
GetIcons();
|
GetIcons();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class IconMarketplaceManager : MonoBehaviour
|
|||||||
public Button downloadButton;
|
public Button downloadButton;
|
||||||
public Button uploadButton;
|
public Button uploadButton;
|
||||||
|
|
||||||
void Start()
|
void Awake()
|
||||||
{
|
{
|
||||||
downloadButton.onClick.AddListener(() => SwitchPanel(1));
|
downloadButton.onClick.AddListener(() => SwitchPanel(1));
|
||||||
#if !UNITY_STANDALONE_OSX && !UNITY_STANDALONE_WIN && !UNITY_STANDALONE_LINUX && !UNITY_EDITOR
|
#if !UNITY_STANDALONE_OSX && !UNITY_STANDALONE_WIN && !UNITY_STANDALONE_LINUX && !UNITY_EDITOR
|
||||||
@@ -45,13 +45,11 @@ public class IconMarketplaceManager : MonoBehaviour
|
|||||||
uploadPanel.SetActive(false);
|
uploadPanel.SetActive(false);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
downloadPanelScript.Load(this);
|
|
||||||
normalPanel.SetActive(false);
|
normalPanel.SetActive(false);
|
||||||
downloadPanel.SetActive(true);
|
downloadPanel.SetActive(true);
|
||||||
uploadPanel.SetActive(false);
|
uploadPanel.SetActive(false);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
uploadPanelScript.Load();
|
|
||||||
normalPanel.SetActive(false);
|
normalPanel.SetActive(false);
|
||||||
downloadPanel.SetActive(false);
|
downloadPanel.SetActive(false);
|
||||||
uploadPanel.SetActive(true);
|
uploadPanel.SetActive(true);
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ using UnityEngine.Networking;
|
|||||||
|
|
||||||
public class IconMarketplaceUploadIcon : MonoBehaviour
|
public class IconMarketplaceUploadIcon : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public IconMarketplaceManager marketplaceManager;
|
||||||
public TMP_Text statusText;
|
public TMP_Text statusText;
|
||||||
|
|
||||||
public void Load()
|
void Awake()
|
||||||
{
|
{
|
||||||
OpenFilePicker();
|
OpenFilePicker();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user