public virtual void Init(PostProcessParam param) { m_mgr = param.mgr; m_mainCamera = param.mainCamera; m_LodLevel = param.lodLevel; m_enable = false; }
void OnLodChanged(LODMgr.LOD_LEVEL lodLevel) { for (int i = 0; i < m_PostProcessList.Length; ++i) { m_PostProcessList[i].SetLodLevel(lodLevel); } m_flipPostProcess.SetLodLevel(lodLevel); }
void Start() { LODMgr.LOD_LEVEL lodLevel = LODMgr.LOD_LEVEL.LOD_LEVEL_HIGH; if (LODMgr.GetInstance() != null) { lodLevel = LODMgr.GetInstance().GetLODLevel(); OnLodChanged(lodLevel); LODMgr.GetInstance().AddLODChangedListener(OnLodChanged); } }
void Awake() { m_MainCamera = gameObject.GetComponent <Camera>(); if (m_MainCamera == null) { Debug.LogError("this script must be main camera component!"); } LODMgr.LOD_LEVEL lodLevel = LODMgr.LOD_LEVEL.LOD_LEVEL_HIGH; m_flipPostProcess = gameObject.AddComponent <FlipPostProcess>(); GenPostProcessChain(); PostProcessParam param = new PostProcessParam(); param.mgr = this; param.mainCamera = m_MainCamera; param.lodLevel = lodLevel; for (int i = 0; i < m_PostProcessList.Length; ++i) { m_PostProcessList[i].Init(param); } m_flipPostProcess.Init(param); Regist(this); }
public void SetLodLevel(LODMgr.LOD_LEVEL lod) { m_LodLevel = lod; }