UnityEngine.Material.GetMatrix C# (CSharp) Method

GetMatrix() public method

Get a named matrix value from the shader.

public GetMatrix ( int nameID ) : Matrix4x4
nameID int The name ID of the property retrieved by Shader.PropertyToID.
return Matrix4x4
        public Matrix4x4 GetMatrix(int nameID)
        {
            Matrix4x4 matrixx;
            INTERNAL_CALL_GetMatrix(this, nameID, out matrixx);
            return matrixx;
        }

Same methods

Material::GetMatrix ( string propertyName ) : Matrix4x4

Usage Example

示例#1
0
 static public int GetMatrix(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(int)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.Int32         a1;
             checkType(l, 2, out a1);
             var ret = self.GetMatrix(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(string)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             var ret = self.GetMatrix(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of UnityEngine.Material::GetMatrix