Accessing the recycle bin without switching to UWP

I’m trying to find a way to send files to the recycle bin instead of out right deleting them. I can see in the documentation that UnityEngine.Windows.Directory does exist, and it is suggested that it will send to the recycle bin by default as opposed to System.IO.Directory which does not. However the assembly is only present with UWP targeted builds.

Is there anyway to access the Windows.Directory assembly targeting Linux, Mac, PC?

Are there downsides to publishing for UWP when you have no intention of posting to the Windows Store? I am posting to Steam, my game is NOT mobile capable, and I can certainly still post the generic build for Linux and Mac users.

I really just want to access the recycle bin =3

I don’t think UnityEngine.Windows.Directory sends stuff to recycle bin.

You’ll have to use SHFileOperation to send stuff to recycle bin. Googling it gave me this example on stack overflow: c# - Send a File to the Recycle Bin - Stack Overflow

[Flags] and IntPtr aren’t recognized natively by Unity. I tried removing [Flags] and making the IntPtr → Int and it compiled, but it didn’t do anything.

https://stackoverflow.com/questions/48189246/how-to-send-a-file-to-the-recycle-bin-in-unity3d

IntPtr and [Flags] work just fine here. Did you forget “using System;” at the top of your source file? I don’t understand why you started referencing Microsoft.VisualBasic.FileIO.FileSystem - that thing is nowhere in the post I linked.

It’s the third answer to the question your posted.
I was trying a lot of things I may have just missed the System reference, I will try it again, thanks!

I just released early access on Steam though so gimme a few days =D

Working great =D Thank you for the follow-up Tautvydas-Zilys