UnityEngine.MaterialPropertyBlock.SetTexture C# (CSharp) Method

SetTexture() private method

private SetTexture ( int nameID, Texture value ) : void
nameID int
value Texture
return void
        public extern void SetTexture(int nameID, Texture value);
        /// <summary>

Same methods

MaterialPropertyBlock::SetTexture ( string name, Texture value ) : void

Usage Example

コード例 #1
0
 public void UpdatePropertyBlock()
 {
     MaterialPropertyBlock propBlock = new MaterialPropertyBlock();
     render.GetPropertyBlock(propBlock);
     propBlock.SetTexture("_MainTex", maskSprite.texture);
     propBlock.SetTexture("_SprTex", springSprite);
     propBlock.SetTexture("_SumTex", summerSprite);
     propBlock.SetTexture("_AutTex", autumnSprite);
     propBlock.SetTexture("_WinTex", winterSprite);
     render.SetPropertyBlock(propBlock);
 }
All Usage Examples Of UnityEngine.MaterialPropertyBlock::SetTexture