lolp1 / Overlay.NET

An easy-to-use overlay library written in C# by Jacob Kemple.
730 stars 87 forks source link

The handle of the parent window isn't valid #31

Open HelloKitty opened 2 years ago

HelloKitty commented 2 years ago

Demo code works fine when run in a console application but when I try to copy the demo code into another application, specifically Unity3D for testing, it fails to create the overlay on the target process which is another DirectX application.

However it doesn't make sense why this would occur as there is no other error and the process name provided is identitical to what is used in the Demo.

HelloKitty commented 2 years ago

Possiblity a Unity3D/Mono issue. MainWindowHandles seem to always be 0 https://www.reddit.com/r/Unity3D/comments/6zrin4/processmainwindowhandle_is_always_0/

HelloKitty commented 2 years ago

Forking Process.NET and managing MainWindowHandle manaully solved the issue.