Search Unity

[SOLVED] Where does Physics.Raycast appear in the Profiler?

Discussion in 'Physics' started by ArachnidAnimal, Sep 28, 2015.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    Hello,
    I'm generating some Physics.Raycasts and I want to check the profiler for performance, but I'm not exactly sure what section to look for. Under CPU usage there is about 15 different categories for Physics-related tasks. Does anyone know what to look for related to Raycasts?

    Thanks.
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Depends where you call it from. Normally you will see it under Behaviour.Update if you raycast in Update. There are similar lines for FixedUpdate, Awake, Start and so forth.

    For even more precision place the raycast between BeginSample and EndSample calls.
     
    ArachnidAnimal likes this.