UI换了很多,spine主视觉停用
This commit is contained in:
@@ -10,6 +10,8 @@ public class UI_CharacterDialogController : MonoBehaviour
|
||||
[SerializeField] private string requiredSceneName = "UI_UI";
|
||||
[SerializeField] private string characterObjectName = "Image_Character";
|
||||
[SerializeField] private string dialogObjectName = "UI_DIALOG";
|
||||
[SerializeField] private RectTransform characterObject;
|
||||
[SerializeField] private RectTransform dialogObject;
|
||||
|
||||
[Header("Enter")]
|
||||
[SerializeField] private float enterDuration = 0.3f;
|
||||
@@ -127,7 +129,9 @@ public class UI_CharacterDialogController : MonoBehaviour
|
||||
if (!scene.IsValid() || !scene.isLoaded)
|
||||
scene = SceneManager.GetActiveScene();
|
||||
|
||||
Transform dialogTr = FindInSceneByName(scene, dialogObjectName);
|
||||
Transform dialogTr = dialogObject;
|
||||
if (dialogTr == null)
|
||||
dialogTr = FindInSceneByName(scene, dialogObjectName);
|
||||
if (dialogTr == null)
|
||||
dialogTr = FindInSceneByName(SceneManager.GetActiveScene(), dialogObjectName);
|
||||
if (dialogTr != null)
|
||||
@@ -155,7 +159,9 @@ public class UI_CharacterDialogController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
Transform characterTr = FindInSceneByName(scene, characterObjectName);
|
||||
Transform characterTr = characterObject;
|
||||
if (characterTr == null)
|
||||
characterTr = FindInSceneByName(scene, characterObjectName);
|
||||
if (characterTr == null)
|
||||
characterTr = FindInSceneByName(SceneManager.GetActiveScene(), characterObjectName);
|
||||
if (characterTr != null)
|
||||
@@ -409,6 +415,13 @@ static class UI_CharacterDialogControllerBootstrap
|
||||
if (!string.Equals(scene.name, SceneName, System.StringComparison.OrdinalIgnoreCase))
|
||||
return;
|
||||
|
||||
UI_CharacterDialogController existing = FindControllerInScene(scene);
|
||||
if (existing != null)
|
||||
{
|
||||
existing.RebindSoon();
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject host = FindHostInScene(scene, HostName);
|
||||
if (host == null)
|
||||
{
|
||||
@@ -422,6 +435,23 @@ static class UI_CharacterDialogControllerBootstrap
|
||||
controller.RebindSoon();
|
||||
}
|
||||
|
||||
private static UI_CharacterDialogController FindControllerInScene(Scene scene)
|
||||
{
|
||||
if (!scene.IsValid() || !scene.isLoaded)
|
||||
return null;
|
||||
|
||||
UI_CharacterDialogController[] controllers = UnityEngine.Object.FindObjectsByType<UI_CharacterDialogController>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
for (int i = 0; i < controllers.Length; i++)
|
||||
{
|
||||
UI_CharacterDialogController controller = controllers[i];
|
||||
if (controller == null)
|
||||
continue;
|
||||
if (controller.gameObject.scene == scene)
|
||||
return controller;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static GameObject FindHostInScene(Scene scene, string hostName)
|
||||
{
|
||||
if (!scene.IsValid() || !scene.isLoaded)
|
||||
|
||||
@@ -326,7 +326,7 @@ public class UI_Panel_Mail : MonoBehaviour
|
||||
|
||||
bool ShouldUseServerMail()
|
||||
{
|
||||
return fetchMailsFromServer && Application.isPlaying;
|
||||
return fetchMailsFromServer && Application.isPlaying && OnlineModeSettings.IsOnlineEnabled;
|
||||
}
|
||||
|
||||
void OnMailRead(mailSlotPrefab slot, mail_so mail)
|
||||
@@ -359,7 +359,7 @@ public class UI_Panel_Mail : MonoBehaviour
|
||||
{
|
||||
if (!MailRewardGrantService.TryGrantAll(mail, out string failureMessage))
|
||||
{
|
||||
gNotice.error.display(string.IsNullOrWhiteSpace(failureMessage) ? "\u90ae\u4ef6\u5956\u52b1\u9886\u53d6\u5931\u8d25" : failureMessage);
|
||||
gNotice.error.display(string.IsNullOrWhiteSpace(failureMessage) ? LocalizationService.Get("mail.claim_failed", "邮件奖励领取失败") : failureMessage);
|
||||
return;
|
||||
}
|
||||
mail.isReceived = true;
|
||||
@@ -1021,6 +1021,11 @@ public class MailHttpService : MonoBehaviour
|
||||
|
||||
public void SetServerModeEnabled(bool enabled)
|
||||
{
|
||||
if (OnlineModeSettings.IsLocalOnlyMode)
|
||||
{
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
if (_serverModeEnabled == enabled)
|
||||
{
|
||||
if (enabled && _pollCoroutine == null)
|
||||
@@ -1050,7 +1055,7 @@ public class MailHttpService : MonoBehaviour
|
||||
|
||||
public void RequestRefresh()
|
||||
{
|
||||
if (!_serverModeEnabled || _isRefreshing)
|
||||
if (!_serverModeEnabled || _isRefreshing || OnlineModeSettings.IsLocalOnlyMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1157,7 +1162,7 @@ public class MailHttpService : MonoBehaviour
|
||||
|
||||
public async System.Threading.Tasks.Task NotifyMailClaimedAsync(int mailId)
|
||||
{
|
||||
if (!_serverModeEnabled || mailId <= 0)
|
||||
if (!_serverModeEnabled || mailId <= 0 || OnlineModeSettings.IsLocalOnlyMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1193,7 +1198,7 @@ public class MailHttpService : MonoBehaviour
|
||||
|
||||
private async System.Threading.Tasks.Task SyncClaimedMailStateAsync()
|
||||
{
|
||||
if (!_serverModeEnabled || _cachedMails.Count == 0)
|
||||
if (!_serverModeEnabled || _cachedMails.Count == 0 || OnlineModeSettings.IsLocalOnlyMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,6 +162,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
[SerializeField] RectTransform top_PlayerName;
|
||||
[SerializeField] RectTransform button_Character_Set_Rect;
|
||||
[SerializeField] RectTransform launch_EzGame_Rect;
|
||||
[SerializeField] UI_CharacterDialogController character_Dialog_Controller;
|
||||
|
||||
[Header("Jiantou Loop")]
|
||||
[SerializeField] bool play_Jiantou_Loop = true;
|
||||
@@ -317,7 +318,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
button_Story.onClick.AddListener(
|
||||
() =>
|
||||
{
|
||||
gNotice.warning.display("姝ょ増鏈湭寮€鏀捐鍔熻兘");
|
||||
gNotice.warning.display("此版本未开放该功能");
|
||||
//Try_Open_Panel(ui_Panel_Story);
|
||||
});
|
||||
if (button_Idol != null)
|
||||
@@ -336,7 +337,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
worldChatObject.SetActive(false);
|
||||
if (button_worldChat != null && worldChatObject != null)
|
||||
button_worldChat.onClick.AddListener(
|
||||
() => worldChatObject.SetActive(true));
|
||||
() => OpenManagedPanel(worldChatObject));
|
||||
|
||||
|
||||
if (button_Select_Music != null)
|
||||
@@ -361,6 +362,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
enterAnim.enabled = true;
|
||||
}
|
||||
panel.SetActive(true);
|
||||
RegisterManagedPanel(panel);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -386,6 +388,7 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
}
|
||||
|
||||
panel.SetActive(true);
|
||||
RegisterManagedPanel(panel);
|
||||
}
|
||||
|
||||
GameObject Try_Open_Prefab(GameObject prefab, ref GameObject instance)
|
||||
@@ -399,9 +402,42 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
AssignPrefabCanvasCamera(instance);
|
||||
if (!instance.activeSelf) instance.SetActive(true);
|
||||
Play_Prefab_Enter(instance);
|
||||
RegisterManagedPanel(instance);
|
||||
return instance;
|
||||
}
|
||||
|
||||
void OpenManagedPanel(GameObject panel)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
panel.SetActive(true);
|
||||
RegisterManagedPanel(panel);
|
||||
}
|
||||
|
||||
void RegisterManagedPanel(GameObject panel)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UIBackStack.RegisterOrBump(
|
||||
panel,
|
||||
() => panel != null && panel.activeInHierarchy,
|
||||
() =>
|
||||
{
|
||||
if (panel != null)
|
||||
{
|
||||
panel.SetActive(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
void AssignPrefabCanvasCamera(GameObject instance)
|
||||
{
|
||||
if (instance == null) return;
|
||||
@@ -498,6 +534,16 @@ public class UI_Panel_Main : Singleton_Mono<UI_Panel_Main>
|
||||
return;
|
||||
}
|
||||
|
||||
if (character_Dialog_Controller != null)
|
||||
{
|
||||
if (!character_Dialog_Controller.enabled)
|
||||
{
|
||||
character_Dialog_Controller.enabled = true;
|
||||
}
|
||||
character_Dialog_Controller.RebindSoon();
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject host = null;
|
||||
Transform[] all = UnityEngine.Object.FindObjectsByType<Transform>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
|
||||
@@ -227,7 +227,7 @@ public class UI_Panel_Note : MonoBehaviour
|
||||
image_Character_Illustration.sprite = Resources.Load<Sprite>(data.data.image_Name);
|
||||
text_Character_RealName.text = data.data.realName;
|
||||
text_Character_StageName.text = data.data.stageName;
|
||||
text_Character_Gender.text = data.data.stageName;
|
||||
text_Character_Gender.text = data.data.gender;
|
||||
text_Character_Age.text = data.data.age.ToString();
|
||||
text_Character_Height.text = data.data.height.ToString();
|
||||
text_Character_Weight.text = data.data.weight.ToString();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -159,7 +159,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
button_Music = btn.GetComponent<Button>();
|
||||
if (button_Music == null)
|
||||
{
|
||||
var any = FindByName("Button_Music");
|
||||
var any = SceneObjectLookupCache.Find("Button_Music");
|
||||
if (any != null) button_Music = any.GetComponent<Button>();
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
instantiateShowLevel = () => { gNotice.error.display("功能即将下线,禁止访问"); };
|
||||
// instantiateShowLevel = () => ShowLevelPrefab();
|
||||
instantiateEmail = () => ShowEmailPrefab();
|
||||
instantiateNotice = () => { gNotice.warning.display("姝ょ増鏈鍔熻兘鏆備笉鍙敤"); };
|
||||
instantiateNotice = () => { gNotice.warning.display("此版本该功能暂不可用"); };
|
||||
// instantiateNotice = () => ShowNoticePrefab();
|
||||
navGuideAction = () => ToggleGuideDisplay();
|
||||
instantiateMarket = () => ShowStorePrefab();
|
||||
@@ -210,7 +210,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
UpdateSteamUserInfo();
|
||||
InitializeMailRedPot();
|
||||
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : Object.FindAnyObjectByType<BgmUiBinder>();
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : SceneObjectLookupCache.FindAny<BgmUiBinder>();
|
||||
if (binder != null && musicPicRoot != null)
|
||||
{
|
||||
binder.SetMusicRoot(musicPicRoot);
|
||||
@@ -222,7 +222,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
// Try to find existing one in scene first
|
||||
if (settingsInstance == null)
|
||||
{
|
||||
var existing = GameObject.Find(settings_prefab.name + "(Clone)");
|
||||
var existing = SceneObjectLookupCache.Find(settings_prefab.name + "(Clone)");
|
||||
if (existing != null)
|
||||
{
|
||||
settingsInstance = existing;
|
||||
@@ -267,7 +267,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
{
|
||||
if (userInfoInstance == null)
|
||||
{
|
||||
var existing = GameObject.Find(userInfo_prefab.name + "(Clone)");
|
||||
var existing = SceneObjectLookupCache.Find(userInfo_prefab.name + "(Clone)");
|
||||
if (existing != null)
|
||||
{
|
||||
userInfoInstance = existing;
|
||||
@@ -339,7 +339,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
private void ToggleMusicPic()
|
||||
{
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : Object.FindAnyObjectByType<BgmUiBinder>();
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : SceneObjectLookupCache.FindAny<BgmUiBinder>();
|
||||
if (binder != null)
|
||||
{
|
||||
binder.ToggleMusicPic();
|
||||
@@ -361,7 +361,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
musicPicRoot = child as RectTransform;
|
||||
return;
|
||||
}
|
||||
var sceneMusic = GameObject.Find("MusicPic");
|
||||
var sceneMusic = SceneObjectLookupCache.Find("MusicPic");
|
||||
if (sceneMusic != null)
|
||||
{
|
||||
musicPicRoot = sceneMusic.GetComponent<RectTransform>();
|
||||
@@ -393,7 +393,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
private void ToggleMusicPicLocal()
|
||||
{
|
||||
EnsureMusicPicRoot();
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : Object.FindAnyObjectByType<BgmUiBinder>();
|
||||
var binder = BgmUiBinder.Instance != null ? BgmUiBinder.Instance : SceneObjectLookupCache.FindAny<BgmUiBinder>();
|
||||
if (musicPicRoot == null)
|
||||
{
|
||||
if (binder != null)
|
||||
@@ -461,6 +461,8 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
GameObject FindByName(string name)
|
||||
{
|
||||
var cached = SceneObjectLookupCache.Find(name);
|
||||
if (cached != null) return cached;
|
||||
var all = Resources.FindObjectsOfTypeAll<Transform>();
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
{
|
||||
@@ -825,6 +827,15 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
EnsureSettingsLastSibling();
|
||||
BroadcastSettingsVisibility(true);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
RegisterManagedPanel(settingsInstance, () =>
|
||||
{
|
||||
if (settingsInstance != null)
|
||||
{
|
||||
settingsInstance.SetActive(false);
|
||||
BroadcastSettingsVisibility(false);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -838,6 +849,15 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (settingsInstance.activeSelf)
|
||||
{
|
||||
EnsureSettingsLastSibling();
|
||||
RegisterManagedPanel(settingsInstance, () =>
|
||||
{
|
||||
if (settingsInstance != null)
|
||||
{
|
||||
settingsInstance.SetActive(false);
|
||||
BroadcastSettingsVisibility(false);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
});
|
||||
}
|
||||
BroadcastSettingsVisibility(settingsInstance.activeSelf);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
@@ -859,6 +879,14 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
PlacePanelBelowSettings(userInfoInstance);
|
||||
userInfoInstance.SetActive(true);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
RegisterManagedPanel(userInfoInstance, () =>
|
||||
{
|
||||
if (userInfoInstance != null)
|
||||
{
|
||||
userInfoInstance.SetActive(false);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -867,6 +895,14 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (userInfoInstance.activeSelf)
|
||||
{
|
||||
PlacePanelBelowSettings(userInfoInstance);
|
||||
RegisterManagedPanel(userInfoInstance, () =>
|
||||
{
|
||||
if (userInfoInstance != null)
|
||||
{
|
||||
userInfoInstance.SetActive(false);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
});
|
||||
}
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
@@ -910,6 +946,23 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
GlobalOverlayPanelVisibilityChanged?.Invoke(visible);
|
||||
}
|
||||
|
||||
private void RegisterManagedPanel(GameObject panel, System.Action closeAction)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UIBackStack.RegisterOrBump(
|
||||
panel,
|
||||
() => panel != null && panel.activeInHierarchy,
|
||||
() =>
|
||||
{
|
||||
closeAction?.Invoke();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private void ShowLevelPrefab()
|
||||
{
|
||||
if (ToggleIfAlreadyOpen(ref showLevelInstance))
|
||||
@@ -920,6 +973,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (OpenPrefab(showLevel_prefab, ref showLevelInstance))
|
||||
{
|
||||
CloseInfoPanels(showLevelInstance);
|
||||
RegisterManagedPanel(showLevelInstance, () => CloseManagedOverlay(showLevelInstance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,6 +987,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (OpenPrefab(store_prefab, ref storeInstance))
|
||||
{
|
||||
CloseInfoPanels(storeInstance);
|
||||
RegisterManagedPanel(storeInstance, () => CloseManagedOverlay(storeInstance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -946,6 +1001,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (OpenPrefab(email_prefab, ref emailInstance))
|
||||
{
|
||||
CloseInfoPanels(emailInstance);
|
||||
RegisterManagedPanel(emailInstance, () => CloseManagedOverlay(emailInstance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -959,6 +1015,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (OpenPrefab(notice_prefab, ref noticeInstance))
|
||||
{
|
||||
CloseInfoPanels(noticeInstance);
|
||||
RegisterManagedPanel(noticeInstance, () => CloseManagedOverlay(noticeInstance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,9 +1029,21 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (OpenPrefab(userBag_prefab, ref userBagInstance))
|
||||
{
|
||||
CloseInfoPanels(userBagInstance);
|
||||
RegisterManagedPanel(userBagInstance, () => CloseManagedOverlay(userBagInstance));
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseManagedOverlay(GameObject instance)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
instance.SetActive(false);
|
||||
BroadcastOverlayPanelsVisibility();
|
||||
}
|
||||
|
||||
private bool ToggleIfAlreadyOpen(ref GameObject instance)
|
||||
{
|
||||
if (instance == null)
|
||||
@@ -1089,7 +1158,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
}
|
||||
}
|
||||
|
||||
GameObject existing = GameObject.Find(prefab.name + "(Clone)");
|
||||
GameObject existing = SceneObjectLookupCache.Find(prefab.name + "(Clone)");
|
||||
return existing;
|
||||
}
|
||||
|
||||
@@ -1262,6 +1331,11 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
if (navSceneLoading) return;
|
||||
InitializeSceneHistoryIfNeeded();
|
||||
|
||||
if (UIBackStack.TryHandleTop())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string current = SceneManager.GetActiveScene().name ?? string.Empty;
|
||||
string target = null;
|
||||
|
||||
@@ -1330,7 +1404,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
{
|
||||
Debug.LogWarning("[Steam] SteamManager not initialized.");
|
||||
if (steamStatusText != null)
|
||||
steamStatusText.text = "Unknown Server";
|
||||
steamStatusText.text = LocalizationService.Get("steam.status.unknown", "Unknown Server");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1342,7 +1416,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
steamUserNameText.text = SteamFriends.GetPersonaName();
|
||||
|
||||
if (steamUserID64Text != null)
|
||||
steamUserID64Text.text = "Uid : " + steamID.m_SteamID.ToString();
|
||||
steamUserID64Text.text = LocalizationService.GetFormat("steam.uid_format", steamID.m_SteamID.ToString());
|
||||
|
||||
// Online status check
|
||||
EPersonaState state = SteamFriends.GetPersonaState();
|
||||
@@ -1350,7 +1424,9 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
if (steamStatusText != null)
|
||||
{
|
||||
steamStatusText.text = isOffline ? "Steam Offline" : "Steam Online";
|
||||
steamStatusText.text = isOffline
|
||||
? LocalizationService.Get("steam.status.offline", "Steam Offline")
|
||||
: LocalizationService.Get("steam.status.online", "Steam Online");
|
||||
}
|
||||
|
||||
if (steamUserAvatarImage != null)
|
||||
@@ -1390,7 +1466,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
{
|
||||
Debug.LogError("[Steam] Error updating steam info: " + e);
|
||||
if (steamStatusText != null)
|
||||
steamStatusText.text = "Unknown Server";
|
||||
steamStatusText.text = LocalizationService.Get("steam.status.unknown", "Unknown Server");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class loadtopandbottomPrefab: MonoBehaviour
|
||||
Camera cam = Camera.main;
|
||||
if (cam == null)
|
||||
{
|
||||
cam = Object.FindAnyObjectByType<Camera>();
|
||||
cam = SceneObjectLookupCache.FindAny<Camera>();
|
||||
}
|
||||
canvas.worldCamera = cam;
|
||||
cam = null;
|
||||
@@ -69,7 +69,7 @@ public class loadtopandbottomPrefab: MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
UI_Panel_Main main = Object.FindAnyObjectByType<UI_Panel_Main>();
|
||||
UI_Panel_Main main = SceneObjectLookupCache.FindAny<UI_Panel_Main>();
|
||||
if (main == null)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user