UnityEventVisualizer icon indicating copy to clipboard operation
UnityEventVisualizer copied to clipboard

3D scene Event Visualizer is offset

Open satolas opened this issue 4 years ago • 9 comments

In the 3D view (Scene view) The lines representing the events are offset or nonexistent, they fly somewhere. Expected behavior : connect the objects with events together. It seems to be bug in the way they are draw in front of the camera.

Maybe in EventGraphWindow.cs in the WorldToGUIPoint Method ?

INFOS : Blank Unity 2019.3.1f project with UnityEventVisualizer 1.3 and 1.4

EventVisualizerBug

satolas avatar Apr 27 '20 02:04 satolas

Thanks for the report? Whicj version of unity are you using? Maybe I screw up in the latest build

On Mon, 27 Apr 2020 at 04:07, satolas [email protected] wrote:

The lines representing the events are offset. They should connect the objects together but they fly somewhere It seems to be bug in the way they are draw in front of the camera.

Maybe in EventGraphWindow.cs in the WorldToGUIPoint Method ?

[image: EventVisualizerBug] https://user-images.githubusercontent.com/29286385/80327286-de2a8d00-883b-11ea-8bab-1563b740f3f4.gif

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MephestoKhaan/UnityEventVisualizer/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF7BKXU7455GCKETPMDZU3ROTSGPANCNFSM4MRQRRMQ .

MephestoKhaan avatar Apr 27 '20 08:04 MephestoKhaan

Unity 2019.3.1f :-)

satolas avatar Apr 27 '20 17:04 satolas

Some news ? By the way I wrote a comment there as well : https://forum.unity.com/threads/github-unityevent-visualizer.498768/

Can't wait to tryout this amazing feature :-) Cheers, Stay safe.

satolas avatar Apr 28 '20 21:04 satolas

Hey had a quick look today but can't reproduce in 2017. I am a bit swamped with work but will try to upgrade tomorrow to 2019

On Tue, 28 Apr 2020 at 23:16, satolas [email protected] wrote:

Some news ? By the way I wrote a comment there as well : https://forum.unity.com/threads/github-unityevent-visualizer.498768/

Can't wait to tryout this amazing feature :-) Cheers, Stay safe.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MephestoKhaan/UnityEventVisualizer/issues/17#issuecomment-620859264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF7BKXFBIRX25NS3STAVZ3RO5BRHANCNFSM4MRQRRMQ .

MephestoKhaan avatar Apr 28 '20 21:04 MephestoKhaan

I upgraded the demo to 2019.3.3f1 and cannot reproduce your issue: image

Are you seeing this problem in the provided demo scene? Have you tried downloading the repo directly? (It should be pretty much version 1.4 anyway)

MephestoKhaan avatar Apr 30 '20 15:04 MephestoKhaan

Ah nevermind! I think I know what your problem is, do you have your Screen set to 150% or something like that for example?

MephestoKhaan avatar Apr 30 '20 15:04 MephestoKhaan

Let me look at it I’ll tell you :-)

On 30 Apr 2020, at 17:15, Luca Mefisto [email protected] wrote:



Ah nevermind! I think I know what your problem is, do you have your Screen set to 150% or something like that for example?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MephestoKhaan/UnityEventVisualizer/issues/17#issuecomment-621918590, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AG7N74PYSMAQB7XE54I3PNDRPGIYJANCNFSM4MRQRRMQ.

satolas avatar Apr 30 '20 15:04 satolas

cannot find so far a "general" solution. Since it seems that Unity really has problems with scaling and different DPIs.

While I fix this try this:

In EventGraphWindows.cs at the VERY END

replace the return of the method WorldToGUIPoint with;

			float scaleFactor = Screen.dpi / 160f;
			return new Vector2(
				viewPos.x *  cam.scaledPixelWidth,
				(1 - viewPos.y) * cam.scaledPixelHeight) * scaleFactor;

Where 160 should be the default dpi of your screen (maybe it is 160 maybe it is 96). Or maybe you can set the scaleFactor entirely to 0.75 for example (if you are running Windows at 1.25x scale)

In the mean time I will keep reading on how to get the proper value from Windows.

MephestoKhaan avatar Apr 30 '20 15:04 MephestoKhaan

Some related issues I have found: https://forum.unity.com/threads/editor-dpi-scaling-issues.689980/ https://forum.unity.com/threads/editor-ui-needs-to-improve-and-support-high-dpi.527501/

Seems like they don;t properly support scaling windows unless it is rounded scales like 200% or 400%

MephestoKhaan avatar Apr 30 '20 15:04 MephestoKhaan