Search Unity

CPU Spike lag with Webgl build

Discussion in 'Editor & General Support' started by huseyincaliskan32, Jul 21, 2019.

  1. huseyincaliskan32

    huseyincaliskan32

    Joined:
    Jan 27, 2019
    Posts:
    4
    Hello,

    I tried to create a pooling system for my project. This system spawns at the start of the game more than 500 coins. The scene they are spawned only has a vase in which they are going to be dropped in with Physics.

    First, they all are disabled and with a counter, they will be activated one by one.
    I didn't have any troubles on my pc, but I did have problems with WebGL.
    Activating the coins one by one didn't cause the problem, but if I activate too many within a period, then a lag spike occurs. This happens between 5-6 seconds.
     
  2. huseyincaliskan32

    huseyincaliskan32

    Joined:
    Jan 27, 2019
    Posts:
    4
    upload_2019-7-21_22-4-4.png

    A picture of the profiler
     
  3. huseyincaliskan32

    huseyincaliskan32

    Joined:
    Jan 27, 2019
    Posts:
    4
  4. huseyincaliskan32

    huseyincaliskan32

    Joined:
    Jan 27, 2019
    Posts:
    4
    I did notice that instancing does not work after switching to WebGL.