void OnDestroy() { // FOWEffect may destory first if (m_PlayerData != null && FOWEffect.instance != null) { FOWEffect.instance.RemovePlayerData(m_PlayerData); m_PlayerData = null; } }
public void Init() { if (m_PlayerData == null) { m_PlayerData = new FOWPlayerData(Vector3.negativeInfinity, m_Radius); } if (m_Transform == null) { m_Transform = transform; } }