private void CreatBillBoard() { if (!bInit) { return; } if (null == BloodMaterial) { BloodMaterial = new Material(AssetBundleManager.GetShader("Effect/BillBorad")); BloodMaterial.SetTexture("_MainTex", UBloodManager.Instance.BloodRenderTexture); BloodMaterial.name = "BloodMaterial"; //BloodMaterial.hideFlags = HideFlags.HideAndDontSave; } else { BloodMaterial.SetTexture("_MainTex", UBloodManager.Instance.BloodRenderTexture); } if (null == m_BillBoard) { m_BillBoard = UBillBoard.CreateBillBorad((int)m_CanvasNode.vSize.x, (int)m_CanvasNode.vSize.y, BloodMaterial, "Blood -- temp"); } if (null != m_BillBoard) { m_BillBoard.gameObject.SetActive(m_FinalVisible); } }
public void Clear(bool fullClear = false) { if (fullClear) { m_ID = -1; resNode = null; } if (m_BillBoard) { m_BillBoard.Clear(); m_BillBoard = null; } }
public void Clear() { if (!bInit) { return; } ResetData(); if (m_BillBoard) { m_BillBoard.Clear(); m_BillBoard = null; } m_ID = -1; resNode = null; bInit = false; }
public void CreatBillBoard() { if (null == TopNameMaterial) { TopNameMaterial = new Material(AssetBundleManager.GetShader("Effect/BillBorad")); TopNameMaterial.SetTexture("_MainTex", UTopNameManager.Instance.TopNameRenderTexture); TopNameMaterial.name = "TopNameMaterial"; //TopNameMaterial.hideFlags = HideFlags.HideAndDontSave; } else { TopNameMaterial.SetTexture("_MainTex", UTopNameManager.Instance.TopNameRenderTexture); } if (m_BillBoard == null) { m_BillBoard = UBillBoard.CreateBillBorad((int)m_CanvasNode.vSize.x, (int)m_CanvasNode.vSize.y, TopNameMaterial, "TopName -- temp"); } }
public void RefreshTexture() { if (null != m_BillBoard) { m_BillBoard.Clear(); m_BillBoard = null; } if (!EntityView.isNullOrEmpty(m_Entity)) { CreatBillBoard(); ChangeCanvasNode(); bool bShow = m_bVisible && !m_IsOutOfVisibleDistance && m_bEnable && !m_IsClosed && !m_bDead; if (m_BillBoard != null) { m_BillBoard.gameObject.SetActive(bShow); } } }