[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/CameraProjectionCache.html [Back]  [Original]

Unity - Scripting API: CameraProjectionCache
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    CameraProjectionCache

    struct in UnityEditor

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Description

    Project points from world to screen space.

    Projection from world to screen space depends on internal camera matrices that Unity must recalculate whenever they are accessed. When accessed in a loop where the camera state does not change, these calculations are not necessary, which results in significant performance improvements.

    Constructors

    Constructor Description
    CameraProjectionCacheCreates a CameraProjectionCache with the camera's current state.

    Public Methods

    Method Description
    GUIToScreenPointConverts a point from GUI position to screen space relative to the cached camera viewport.
    ScreenToGUIPointConverts a point from screen space to GUI position relative to the viewport at the time the CameraProjectionCache was created.
    WorldToGUIPointConverts a world space point to a 2D GUI position.
    WorldToScreenPointTransforms position from world space into screen space using the cached camera projection and viewport.

    Web Proxy Viewer  |  New URL  |  Original Page