Search Unity

Question Instead of destroying reycling objects

Discussion in 'Scripting' started by kader1081, Jan 8, 2023.

  1. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    Hi I read that instead of destroying reycycling is more cost-friendly if it is how can I do it
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,935
    Look up Object Pooling.

    And prepare yourself for the inevitable posts about why or why not you should use it.
     
  3. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    optimization is hard that's for sure
     
  4. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    I don't understand Instead of Instatiating a new object just use old ones is that it