Search Unity

Question A question about Console Tab: Debug.Log()

Discussion in 'Scripting' started by Unitkiv, Feb 11, 2024.

  1. Unitkiv

    Unitkiv

    Joined:
    Jun 14, 2022
    Posts:
    71
    I have this script attached to the player:
    Code (CSharp):
    1.  private void OnTriggerExit2D(Collider2D collision)
    2. {
    3.      if (collision.tag == "OBJ")
    4.      {
    5.          Debug.Log("EXIT Collision");
    6.      }
    7. }
    "EXIT Collision" pops up only once in the Console tab with specific hour but the second change every 5 seconds as the player moves in and out from the resource. What does it mean? (I guess the second updates every 5 seconds when player moves out from the resource.)
     

    Attached Files:

  2. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,322
    Do you have Collapse enabled in the top bar of the Console?
     
    Unitkiv likes this.
  3. Unitkiv

    Unitkiv

    Joined:
    Jun 14, 2022
    Posts:
    71
    I fixed it. thank you so much...
     
    SisusCo likes this.