Пример #1
0
        internal Texture2D _resizeTexture(string propertyName, Texture2D t, int w, int h)
        {
            Texture2D tx = MB_Utility.resampleTexture(t, w, h);

            tx.name = string.Format("tmpResampled{0}_{1}x{2}", _temporaryTextures.Count, w, h);
            TemporaryTexture txx = new TemporaryTexture(propertyName, tx);

            _temporaryTextures.Add(txx);
            return(tx);
        }
Пример #2
0
        internal Texture2D _createTextureCopy(string propertyName, Texture2D t)
        {
            Texture2D tx = MB_Utility.createTextureCopy(t);

            tx.name = string.Format("tmpCopy{0}_{1}x{2}", _temporaryTextures.Count, tx.width, tx.height);
            TemporaryTexture txx = new TemporaryTexture(propertyName, tx);

            _temporaryTextures.Add(txx);
            return(tx);
        }
Пример #3
0
        //used to track temporary textures that were created so they can be destroyed
        public Texture2D _createTemporaryTexture(string propertyName, int w, int h, TextureFormat texFormat, bool mipMaps)
        {
            Texture2D t = new Texture2D(w, h, texFormat, mipMaps);

            t.name = string.Format("tmp{0}_{1}x{2}", _temporaryTextures.Count, w, h);
            MB_Utility.setSolidColor(t, Color.clear);
            TemporaryTexture txx = new TemporaryTexture(propertyName, t);

            _temporaryTextures.Add(txx);
            return(t);
        }
Пример #4
0
 internal void AddTemporaryTexture(TemporaryTexture tt)
 {
     _temporaryTextures.Add(tt);
 }