void OnDestroy() { if (m_logic != null) { m_logic.Release(); m_logic = null; } }
// Use this for initialization void Start() { if (m_logic == null) { m_logic = new BackgroundLogic(); } m_logic.Initialize(this); }