FairyGUI.NGraphics.SetShaderAndTexture C# (CSharp) Method

SetShaderAndTexture() public method

public SetShaderAndTexture ( string shader, NTexture texture ) : void
shader string
texture NTexture
return void
        public void SetShaderAndTexture(string shader, NTexture texture)
        {
            _shader = shader;
            _texture = texture;
            if (_customMatarial && _material != null)
                _material.mainTexture = _texture != null ? _texture.nativeTexture : null;
            UpdateManager();
        }

Usage Example

 static public int SetShaderAndTexture(IntPtr l)
 {
     try {
         FairyGUI.NGraphics self = (FairyGUI.NGraphics)checkSelf(l);
         System.String      a1;
         checkType(l, 2, out a1);
         FairyGUI.NTexture a2;
         checkType(l, 3, out a2);
         self.SetShaderAndTexture(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }