Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question Instead of destroying reycling objects

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

  1. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    258
    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:
    3,969
    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:
    258
    optimization is hard that's for sure
     
  4. kader1081

    kader1081

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