UnityEngine.Material.SetMatrix C# (CSharp) Method

SetMatrix() public method

Set a named matrix for the shader.

public SetMatrix ( int nameID, Matrix4x4 matrix ) : void
nameID int Property name ID, use Shader.PropertyToID to get it.
matrix Matrix4x4 Matrix value to set.
return void
        public void SetMatrix(int nameID, Matrix4x4 matrix)
        {
            INTERNAL_CALL_SetMatrix(this, nameID, ref matrix);
        }

Same methods

Material::SetMatrix ( string propertyName, Matrix4x4 matrix ) : void

Usage Example

コード例 #1
0
 static public int SetMatrix(IntPtr l)
 {
     try{
         if (matchType(l, 2, typeof(System.String), typeof(UnityEngine.Matrix4x4)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             UnityEngine.Matrix4x4 a2;
             checkType(l, 3, out a2);
             self.SetMatrix(a1, a2);
             return(0);
         }
         else if (matchType(l, 2, typeof(System.Int32), typeof(UnityEngine.Matrix4x4)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.Int32         a1;
             checkType(l, 2, out a1);
             UnityEngine.Matrix4x4 a2;
             checkType(l, 3, out a2);
             self.SetMatrix(a1, a2);
             return(0);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
All Usage Examples Of UnityEngine.Material::SetMatrix