UnityEngine.Material.GetInt C# (CSharp) Method

GetInt() public method

Get a named integer value.

public GetInt ( int nameID ) : int
nameID int The name ID of the property retrieved by Shader.PropertyToID.
return int
        public int GetInt(int nameID)
        {
            return (int) this.GetFloat(nameID);
        }

Same methods

Material::GetInt ( string propertyName ) : int

Usage Example

示例#1
0
 static public int GetInt(IntPtr l)
 {
     try{
         if (matchType(l, 2, typeof(System.String)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             System.Int32 ret = self.GetInt(a1);
             pushValue(l, ret);
             return(1);
         }
         else if (matchType(l, 2, typeof(System.Int32)))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.Int32         a1;
             checkType(l, 2, out a1);
             System.Int32 ret = self.GetInt(a1);
             pushValue(l, ret);
             return(1);
         }
         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::GetInt