示例#1
0
        public static bool IsMarkedToDestroy(this Component p_component, bool p_checkGameObjectToo = false)
        {
            bool v_sucess = MarkedToDestroy.IsMarked(p_component);

            if (!v_sucess && p_checkGameObjectToo)
            {
                try
                {
                    v_sucess = MarkedToDestroy.IsMarked(p_component.gameObject);
                }
                catch { }
            }
            return(v_sucess);
        }
示例#2
0
 private void CheckIfNeedUnloadImage()
 {
     if (!string.IsNullOrEmpty(Error) && (m_sprite != null || m_texture != null))
     {
         var v_texture = m_sprite != null? m_sprite.texture : null;
         //Destroy SpriteTexture
         if (v_texture != null)
         {
             DestroyUtils.DestroyImmediate(m_sprite.texture);
         }
         //Destroy Object Texture
         if (m_texture != null && !MarkedToDestroy.IsMarked(m_texture))
         {
             DestroyUtils.DestroyImmediate(m_texture);
         }
         if (m_sprite != null)
         {
             DestroyUtils.DestroyImmediate(m_sprite);
         }
         m_texture = null;
         m_sprite  = null;
     }
 }
示例#3
0
        public static bool IsMarkedToDestroy(this GameObject p_object)
        {
            bool v_sucess = MarkedToDestroy.IsMarked(p_object);

            return(v_sucess);
        }