FairyGUI.NTexture.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( bool allowDestroyingAssets ) : void
allowDestroyingAssets bool
return void
        public void Dispose(bool allowDestroyingAssets)
        {
            if (!disposed)
            {
                disposed = true;

                DestroyMaterials();
                if (root == this && nativeTexture != null && allowDestroyingAssets)
                {
                    if (storedODisk)
                        Resources.UnloadAsset(nativeTexture);
                    else
                        Texture.DestroyImmediate(nativeTexture, true);
                }
                nativeTexture = null;
                root = null;
            }
        }

Same methods

NTexture::Dispose ( ) : void

Usage Example

示例#1
0
 static int Dispose(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.NTexture obj = (FairyGUI.NTexture)ToLua.CheckObject <FairyGUI.NTexture>(L, 1);
         obj.Dispose();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
All Usage Examples Of FairyGUI.NTexture::Dispose