docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method Update

    Update()

    See MonoBehaviour.

    Declaration
    protected virtual void Update()
    Remarks

    Processing is postponed from earlier in the frame (EventSystem has a script execution order of -1000) until this Update to allow other systems to update the poses that will be used to generate the ray casts used by this input module.
    For Ray Interactor, it must wait until after the Controller pose updates and Locomotion moves the Rig in order to generate the current sample points used to create the rays used for this frame. Those positions will be determined during DoProcess(). Ray Interactor needs the UI ray casts to be completed by the time XRInteractionManager calls into GetValidTargets(List<IXRInteractable>) since that is dependent on whether a UI hit was closer than a 3D hit. This processing must therefore be done between Locomotion and PreprocessInteractor(UpdatePhase) to minimize latency.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)