In UWP, transparent backgrounds are done with Acrylic Brushes
See Acrylic material
How can I make transparent background UWP app in Unity with user32.dll?
Evan
6
Reputation points
Hello. I'm developing UWP(Win10) program in Unity.
I need to develop transparent background UWP app, so I add user32.dll in script just like this
public class test : MonoBehaviour
{
[DllImport("user32.dll")]
public static extern IntPtr GetActiveWindow();
....
private void Start()
{
IntPtr hWnd = GetActiveWindow();
...
}
}
but after I build my project and run, error occurs just like this
DllNotFoundException: Unable to load DLL 'user32.dll'. Tried the load the following dynamic libraries: Unable to load dynamic library 'user32.dll' because of 'Failed to open the requested dynamic library (0x06000000)
So I changed my project setting to Windows standalone, and build it.
After that, It works perfectly.
I want to make this program to UWP app, so I need to build it with user32.dll in UWP project.
Can I make transparent background UWP app in Unity with user32.dll?
If not, How can I use user32.dll in UWP project?
1 answer
Sort by: Most helpful
-
Castorix31 86,316 Reputation points
2022-04-08T09:59:04+00:00