Hi all,
I got a problem, I need to know how many monitors the computer has in my unity projet, but I understand Unity doesn’t like System.Windows.Forms. I wanted to use the Screen.AllScreens function because it’s really what I want.
Is there a way to do the same thing from Screen.AllScreens in Unity 5 ? I tried to create a DLL which using Screen.AllScreens and I import the dll in my project
public class AllScreens
{
public System.Windows.Forms.Screen[] screens;
public int GetAllScreens()
{
screens = System.Windows.Forms.Screen.AllScreens;
return screens.Length;
}
}
but apparently doesn’t work in my unity projet. My object is null all the time when I initialize it when I use System.Windows.Forms but the system works when I use my DLL for whatever else like :
public int AddValue(int a)
{
return a + a;
}
Anyone have idea for do that ?
Thanks