void InitializeBlackCubemapArray()
        {
            if (m_BlackCubemapArray == null)
            {
                m_BlackCubemapArray = new CubemapArray(1, m_IBLFilterArray.Length, TextureFormat.RGBA32, false)
                {
                    hideFlags  = HideFlags.HideAndDontSave,
                    wrapMode   = TextureWrapMode.Repeat,
                    wrapModeV  = TextureWrapMode.Clamp,
                    filterMode = FilterMode.Trilinear,
                    anisoLevel = 0,
                    name       = "BlackCubemapArray"
                };

                Color32[] black = { new Color32(0, 0, 0, 0) };

                for (int element = 0; element < m_IBLFilterArray.Length; ++element)
                {
                    for (int i = 0; i < 6; i++)
                    {
                        m_BlackCubemapArray.SetPixels32(black, (CubemapFace)i, element);
                    }
                }

                m_BlackCubemapArray.Apply();
            }
        }
    public static int SetPixels32(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 4)
            {
                CubemapArray cubemapArray = (CubemapArray)LuaObject.checkSelf(l);
                Color32[]    colors;
                LuaObject.checkArray <Color32>(l, 2, out colors);
                CubemapFace face;
                LuaObject.checkEnum <CubemapFace>(l, 3, out face);
                int arrayElement;
                LuaObject.checkType(l, 4, out arrayElement);
                cubemapArray.SetPixels32(colors, face, arrayElement);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 5)
            {
                CubemapArray cubemapArray2 = (CubemapArray)LuaObject.checkSelf(l);
                Color32[]    colors2;
                LuaObject.checkArray <Color32>(l, 2, out colors2);
                CubemapFace face2;
                LuaObject.checkEnum <CubemapFace>(l, 3, out face2);
                int arrayElement2;
                LuaObject.checkType(l, 4, out arrayElement2);
                int miplevel;
                LuaObject.checkType(l, 5, out miplevel);
                cubemapArray2.SetPixels32(colors2, face2, arrayElement2, miplevel);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function SetPixels32 to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }