public static SelectedTargetTips CreateInstance() { //暂时只能创建一个 if (m_SingleInstance != null) { return(m_SingleInstance); } SelectedTargetTips TempInstance = null; if (!m_TipsTexture) { m_TipsTexture = Resources.Load(m_TexturePatch) as Texture; } if (!m_TipsTexture) { return(TempInstance); } if (null == m_TipsMaterial) { m_TipsMaterial = new Material(Shader.Find("Effect/BillBorad")); m_TipsMaterial.SetTexture("_MainTex", m_TipsTexture); } BillBoard temp = BillBoard.CreateBillBorad(32, 64, m_TipsMaterial); TempInstance = temp.gameObject.AddComponent <SelectedTargetTips>(); UnityEngine.Object.DontDestroyOnLoad(TempInstance); temp.gameObject.hideFlags = HideFlags.HideAndDontSave; m_SingleInstance = TempInstance; return(TempInstance); }
void LateUpdate() { GfxUtil.CaculUIScale(); //GfxBloodManager.Update(); //TopNameManager.Update(); //FloatFontManager.Update(); SelectedTargetTips.Update(); if (windowRegistryList.Count > 0) { base.SFLateUpdate(); } }