UnityEngine.MaterialPropertyBlock.SetVector C# (CSharp) Method

SetVector() public method

Set a vector property.

public SetVector ( int nameID, Vector4 value ) : void
nameID int The name ID of the property retrieved by Shader.PropertyToID.
value Vector4 The Vector4 value to set.
return void
        public void SetVector(int nameID, Vector4 value)
        {
            INTERNAL_CALL_SetVector(this, nameID, ref value);
        }

Same methods

MaterialPropertyBlock::SetVector ( string name, Vector4 value ) : void

Usage Example

コード例 #1
0
    static int SetVector(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes <int, UnityEngine.Vector4>(L, 2))
            {
                UnityEngine.MaterialPropertyBlock obj = (UnityEngine.MaterialPropertyBlock)ToLua.CheckObject(L, 1, typeof(UnityEngine.MaterialPropertyBlock));
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.Vector4 arg1 = ToLua.ToVector4(L, 3);
                obj.SetVector(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.Vector4>(L, 2))
            {
                UnityEngine.MaterialPropertyBlock obj = (UnityEngine.MaterialPropertyBlock)ToLua.CheckObject(L, 1, typeof(UnityEngine.MaterialPropertyBlock));
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.Vector4 arg1 = ToLua.ToVector4(L, 3);
                obj.SetVector(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.MaterialPropertyBlock.SetVector"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of UnityEngine.MaterialPropertyBlock::SetVector