把uiinfo分离到loader里面
parent
359003969c
commit
4888fd3700
|
@ -1,24 +0,0 @@
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace ZC
|
|
||||||
{
|
|
||||||
class UIInfo : MonoBehaviour
|
|
||||||
{
|
|
||||||
[SerializeField] public IUI ui;
|
|
||||||
public TMP_FontAsset font;
|
|
||||||
|
|
||||||
public void SetStart(IUI ui, TMP_FontAsset font)
|
|
||||||
{
|
|
||||||
this.ui = ui;
|
|
||||||
this.font = font;
|
|
||||||
|
|
||||||
return;
|
|
||||||
var findChildDeeps = this.transform.FindChildDeeps<TMP_Text>();
|
|
||||||
foreach (var tmpText in findChildDeeps)
|
|
||||||
{
|
|
||||||
tmpText.font = font;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: aa6c9b462319459ca494d7979967fc65
|
|
||||||
timeCreated: 1712128595
|
|
|
@ -71,8 +71,8 @@ namespace ZC
|
||||||
|
|
||||||
//#if UNITY_EDITOR
|
//#if UNITY_EDITOR
|
||||||
// view
|
// view
|
||||||
var addComponent = gameObject.GetComponent<UIInfo>();
|
// var addComponent = gameObject.GetComponent<UIInfo>();
|
||||||
addComponent.SetStart(ui, this.font);
|
// addComponent.SetStart(ui, this.font);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
return ui;
|
return ui;
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c36d07c6939d47cab6cf3c3da4a0e014
|
||||||
|
timeCreated: 1721358085
|
|
@ -0,0 +1,24 @@
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace ZC
|
||||||
|
{
|
||||||
|
class UIInfo : MonoBehaviour
|
||||||
|
{
|
||||||
|
// [SerializeField] public IUI ui;
|
||||||
|
// public TMP_FontAsset font;
|
||||||
|
//
|
||||||
|
// public void SetStart(IUI ui, TMP_FontAsset font)
|
||||||
|
// {
|
||||||
|
// this.ui = ui;
|
||||||
|
// this.font = font;
|
||||||
|
//
|
||||||
|
// return;
|
||||||
|
// var findChildDeeps = this.transform.FindChildDeeps<TMP_Text>();
|
||||||
|
// foreach (var tmpText in findChildDeeps)
|
||||||
|
// {
|
||||||
|
// tmpText.font = font;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5100ab94e5c4164e9a1e9bb2ed65adb
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue