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 cone, but i just cant use the existing data to create a sprite with it. Any pointers would be appreciated and thanks in advance