Search Unity

Feedback [Bug] function overriding

Discussion in 'Project Tiny' started by developer_plus_bliss, Apr 4, 2019.

  1. developer_plus_bliss

    developer_plus_bliss

    Joined:
    Jan 10, 2017
    Posts:
    7
    I'm calling twice a function inside the update : RelocalizeFloor(), one time with true variable and the other with false, but when I run, I can see in the console that the first time is accessing into pause = true, then on pause = false, but the result is that both are paused when I run the game. What I'm doing wrong or whats happening? Captura de pantalla 2019-04-04 a la(s) 19.19.02.png Captura de pantalla 2019-04-04 a la(s) 19.17.56.png
     
  2. reallyhexln

    reallyhexln

    Joined:
    Jun 18, 2018
    Posts:
    69
    I'm not sure I pretty understand your code, but it seems there is no bug.
    You calling twice function RelocalizeFloor for each entity per frame.
    Because RelocalizeFloor with false parameter going last, all entities will have paused state for each frame.

    UPD: I mean, frame rendering will performed only after all your code will be executed.
     
    Last edited: Apr 4, 2019
    ER_Dolleman likes this.