Ejemplo n.º 1
0
 public Texture2DMatcher(DisposableTexture2D source, DisposableTexture2D target) : base(source, target)
 {
     this.validator.Validation += () => this.CreateTexture();
     this.validator.SetCheckers(() =>
     {
         Texture2D s = this.source;
         Texture2D t = this.target;
         return(RenderTextureTool.CheckNullAndSize(s, t) == false);
     });
 }
Ejemplo n.º 2
0
        protected void CheckTexture(RenderTexture source, string name, RenderTextureFormat format, ref RenderTexture target)
        {
            if (RenderTextureTool.CheckNullAndSize(source, target))
            {
                target?.DestoryObj();

                RenderTextureDescriptor desc = source.descriptor;
                desc.colorFormat = format;
                desc.sRGB        = false;

                target      = TextureManager.Create(desc);
                target.name = name;
            }
        }