Skip to content

Commit

Permalink
5.3 compatibility fix..
Browse files Browse the repository at this point in the history
  • Loading branch information
slipster216 committed Feb 9, 2017
1 parent ebbbec0 commit 9ddb222
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/VertexPainterWindow_Painting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2128,8 +2128,11 @@ void OnSceneGUI(SceneView sceneView)
// finding this, and even the paid Unity support my company pays many thousands of dollars for had no idea
// after several weeks of back and forth. If your going to fake the coordinates for some reason, please do
// it everywhere to not just randomly break things everywhere you don't multiply some new value in.
#if UNITY_5_3
float mult = 1;
#else
float mult = EditorGUIUtility.pixelsPerPoint;

#endif
mousePosition.y = sceneView.camera.pixelHeight - mousePosition.y * mult;
mousePosition.x *= mult;
Vector3 fakeMP = mousePosition;
Expand Down

0 comments on commit 9ddb222

Please sign in to comment.