no definition for Rect.PointToNormalized

Hello,

I’m trying to utilize the following code:

mouseXandYNormalized = Rect.PointToNormalized(screenRect, mouseXandY);

but the editor is returning: Error 1 ‘UnityEngine.Rect’ does not contain a definition for ‘PointToNormalized’

however the docs show this: Unity - Scripting API: Rect.PointToNormalized

What am I doing wrong?

Thanks.

Doesn’t work for me either, maybe its a bug.

Hmmm… scratches head

On phone so can’t verify, history claims it was added in 4.5, are you upgraded?

1 Like

Using 4.3 here. Good catch!

Cheers.
Upgraded to 4.5 and it works.