How to create a 2D sprite from an array of Vector3[] vertices

So im currently creating a top down shooter that plays around fog of war, the reason i want to create a sprite this way is because i want to use the sprite mask feature, basically i only want enemies to appear when they are in my FOV, and by creating a sprite dynamically during runtime, i can set the sprite mask to act as my vision cone and render enemies only when they are in the vision cone.

so far i have succeeded in creating a vision coneScreenshot 2023-07-13 052021.png, but i just cant use the existing data to create a sprite with it. Any pointers would be appreciated and thanks in advance :slight_smile:

this method is too cost intensive, you would need to use texture2d.setpixels and texture2d.apply, it would lag your game to hell