yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
Main/System/PhantasmPavilion/AvatarCell.cs
@@ -13,7 +13,6 @@
        {
            if (m_button == null)
            {
                LoadPrefab();
                m_button = this.GetComponent<ButtonEx>("AvatarCell/Img_FaceBG");
            }
            return m_button;
@@ -27,7 +26,6 @@
        {
            if (m_FaceBGImage == null)
            {
                LoadPrefab();
                m_FaceBGImage = this.GetComponent<ImageEx>("AvatarCell/Img_FaceBG");
            }
            return m_FaceBGImage;
@@ -41,7 +39,6 @@
        {
            if (m_FaceMask == null)
            {
                LoadPrefab();
                m_FaceMask = this.GetComponent<EllipseMask>("AvatarCell/Img_FaceBG/Mask_Face");
            }
            return m_FaceMask;
@@ -55,7 +52,6 @@
        {
            if (m_FaceUIFrame == null)
            {
                LoadPrefab();
                m_FaceUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_FaceBG/Mask_Face/Img_Face");
            }
            return m_FaceUIFrame;
@@ -69,7 +65,6 @@
        {
            if (m_FaceImage == null)
            {
                LoadPrefab();
                m_FaceImage = this.GetComponent<ImageEx>("AvatarCell/Img_FaceBG/Mask_Face/Img_Face");
            }
            return m_FaceImage;
@@ -83,7 +78,6 @@
        {
            if (m_faceSpine == null)
            {
                LoadPrefab();
                m_faceSpine = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_FaceBG/Mask_Face/Img_Face/Spine_Face");
            }
            return m_faceSpine;
@@ -98,7 +92,6 @@
        {
            if (m_FacePicImage == null)
            {
                LoadPrefab();
                m_FacePicImage = this.GetComponent<ImageEx>("AvatarCell/Img_FaceBG/Img_FacePic");
            }
            return m_FacePicImage;
@@ -112,7 +105,6 @@
        {
            if (m_FacePicUIFrame == null)
            {
                LoadPrefab();
                m_FacePicUIFrame = this.GetComponent<UIFrame>("AvatarCell/Img_FaceBG/Img_FacePic");
            }
            return m_FacePicUIFrame;
@@ -126,7 +118,6 @@
        {
            if (m_facePicSpine == null)
            {
                LoadPrefab();
                m_facePicSpine = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_FaceBG/Img_FacePic/Spine_FacePic");
            }
            return m_facePicSpine;
@@ -140,7 +131,6 @@
        {
            if (m_redpoint == null)
            {
                LoadPrefab();
                m_redpoint = this.GetComponent<RedpointBehaviour>("AvatarCell/Img_FaceBG/RedPoint");
            }
            return m_redpoint;
@@ -154,7 +144,7 @@
    private void Awake()
    {
        LoadPrefab();
        LoadPrefab().Forget();
    }
    public void SetOnLoaded(Action _onloaded)
@@ -202,17 +192,21 @@
            prefab = tmp.gameObject;
            return;
        }
        prefab = await UIUtility.CreateWidget("AvatarCell", "AvatarCell");
        var inst = await UIUtility.CreateWidget("AvatarCell", "AvatarCell");
        if (this == null)
        {
            if (prefab != null)
            {
                GameObject.DestroyImmediate(prefab);
                return;
            }
            if (inst != null) GameObject.DestroyImmediate(inst);
            return;
        }
        if (prefab != null)
        {
            GameObject.DestroyImmediate(inst);
            return;
        }
        prefab = inst;
        prefab.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
        prefab.transform.SetAsFirstSibling();