UnregisterFont() public static method

public static UnregisterFont ( BaseFont font ) : void
font BaseFont
return void
Exemplo n.º 1
0
        public void Dispose()
        {
            int cnt = _items.Count;

            for (int i = 0; i < cnt; i++)
            {
                PackageItem pi = _items[i];
                if (pi.texture != null)
                {
                    if (pi.texture.alphaTexture != null)
                    {
                        Object.Destroy(pi.texture.alphaTexture);
                    }
                    pi.texture.Dispose();
                }
                else if (pi.audioClip != null)
                {
                    Object.Destroy(pi.audioClip);
                }
                else if (pi.bitmapFont != null)
                {
                    FontManager.UnregisterFont(pi.bitmapFont);
                }
            }

            if (_resBundle != null)
            {
                _resBundle.Unload(true);
            }
        }
Exemplo n.º 2
0
        void Dispose()
        {
            int cnt = _items.Count;

            for (int i = 0; i < cnt; i++)
            {
                PackageItem pi = _items[i];
                if (pi.texture != null)
                {
                    pi.texture.alphaTexture = null;
                    if (pi.texture != NTexture.Empty)
                    {
                        pi.texture.Dispose();
                    }
                    else
                    {
                        pi.texture.DestroyMaterials();
                    }
                }
                else if (pi.audioClip != null)
                {
                    pi.audioClip = null;
                }
                else if (pi.bitmapFont != null)
                {
                    FontManager.UnregisterFont(pi.bitmapFont);
                }
            }
            _items.Clear();

            if (_resBundle != null)
            {
                _resBundle.Unload(true);
            }
        }
Exemplo n.º 3
0
		void Dispose()
		{
			int cnt = _items.Count;
			for (int i = 0; i < cnt; i++)
			{
				PackageItem pi = _items[i];
				if (pi.texture != null)
				{
					if (Application.isPlaying)
					{
						if (pi.texture.alphaTexture != null)
							Texture.Destroy(pi.texture.alphaTexture);
						if (pi.texture != NTexture.Empty)
							pi.texture.Dispose();
					}
					else
						pi.texture.DestroyMaterials();
				}
				else if (pi.audioClip != null)
				{
					if (Application.isPlaying)
						AudioClip.Destroy(pi.audioClip);
				}
				else if (pi.bitmapFont != null)
					FontManager.UnregisterFont(pi.bitmapFont);
			}

			if (_resBundle != null)
				_resBundle.Unload(true);
		}
Exemplo n.º 4
0
        void Dispose(bool allowDestroyingAssets)
        {
            int cnt = _items.Count;

            for (int i = 0; i < cnt; i++)
            {
                PackageItem pi = _items[i];
                if (pi.texture != null)
                {
                    if (pi.texture.alphaTexture != null)
                    {
                        pi.texture.alphaTexture.Dispose(allowDestroyingAssets);
                        pi.texture.alphaTexture = null;
                    }

                    if (pi.texture != NTexture.Empty)
                    {
                        pi.texture.Dispose(allowDestroyingAssets);
                    }
                    else
                    {
                        pi.texture.DestroyMaterials();
                    }
                    pi.texture = null;
                }
                else if (pi.audioClip != null)
                {
                    if (allowDestroyingAssets)
                    {
                        if (_fromBundle)
                        {
                            AudioClip.DestroyImmediate(pi.audioClip);
                        }
                        else
                        {
                            Resources.UnloadAsset(pi.audioClip);
                        }
                    }
                    pi.audioClip = null;
                }
                else if (pi.bitmapFont != null)
                {
                    FontManager.UnregisterFont(pi.bitmapFont);
                }
            }
            _items.Clear();

            if (_resBundle != null)
            {
                _resBundle.Unload(true);
            }
        }