UnityEngine.UI.Outline.ModifyMesh C# (CSharp) Method

ModifyMesh() public method

public ModifyMesh ( Mesh mesh ) : void
mesh Mesh
return void
        public override void ModifyMesh(Mesh mesh)
        {
            if (this.IsActive())
            {
                List<UIVertex> stream = new List<UIVertex>();
                using (VertexHelper helper = new VertexHelper(mesh))
                {
                    helper.GetUIVertexStream(stream);
                }
                int num = stream.Count * 5;
                if (stream.Capacity < num)
                {
                    stream.Capacity = num;
                }
                int start = 0;
                int count = stream.Count;
                base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, base.effectDistance.x, base.effectDistance.y);
                start = count;
                count = stream.Count;
                base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, base.effectDistance.x, -base.effectDistance.y);
                start = count;
                count = stream.Count;
                base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, -base.effectDistance.x, base.effectDistance.y);
                start = count;
                count = stream.Count;
                base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, -base.effectDistance.x, -base.effectDistance.y);
                using (VertexHelper helper2 = new VertexHelper())
                {
                    helper2.AddUIVertexTriangleStream(stream);
                    helper2.FillMesh(mesh);
                }
            }
        }
    }

Usage Example

    static int ModifyMesh(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.UI.Outline), typeof(UnityEngine.Mesh)))
            {
                UnityEngine.UI.Outline obj  = (UnityEngine.UI.Outline)ToLua.ToObject(L, 1);
                UnityEngine.Mesh       arg0 = (UnityEngine.Mesh)ToLua.ToObject(L, 2);
                obj.ModifyMesh(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.UI.Outline), typeof(UnityEngine.UI.VertexHelper)))
            {
                UnityEngine.UI.Outline      obj  = (UnityEngine.UI.Outline)ToLua.ToObject(L, 1);
                UnityEngine.UI.VertexHelper arg0 = (UnityEngine.UI.VertexHelper)ToLua.ToObject(L, 2);
                obj.ModifyMesh(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.Outline.ModifyMesh"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of UnityEngine.UI.Outline::ModifyMesh