|
| 19 Jan 2013 09:37 AM |
| Cloning a script or coroutine? |
|
|
| Report Abuse |
|
8SunTzu8
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 8199 |
|
|
| 19 Jan 2013 10:09 AM |
Cloning will add another thread and use more memory since the script object takes up some memory.
A coroutine just adds another thread.
My best bet, is that using a coroutine is better. Also, calling the function to clone, though small, might be a little less efficient.
But, I don't know how coroutines work under the hood, so I can't say for sure. This is just a guess.
"If you want to become a Developer or Innovator for CSA, contact me." |
|
|
| Report Abuse |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 19 Jan 2013 10:33 AM |
| Both would cause lag but I would say making a coroutine is better |
|
|
| Report Abuse |
|