Unity: Difference between revisions
Line 34: | Line 34: | ||
Do not attach scripts to thousands of objects. Instead use one script on one object.<br> | Do not attach scripts to thousands of objects. Instead use one script on one object.<br> | ||
If you need thousands of simple objects, one way is to use a mesh with one vertex per object and expand them in the geometry shader.<br> | If you need thousands of simple objects, one way is to use a mesh with one vertex per object and expand them in the geometry shader.<br> | ||
You can use one compute shader to animate and move the objects instead of using Unity scripts. The compute shader edits | You can use one compute shader to animate and move the objects instead of using Unity scripts. The compute shader edits a single compute buffer which can be read by your vertex or geometry shader.<br> | ||
==References== | ==References== | ||
* [https://docs.unity3d.com/Manual/index.html Unity User Manual] | * [https://docs.unity3d.com/Manual/index.html Unity User Manual] | ||
* [https://www.udemy.com/course/the-ultimate-guide-to-game-development-with-unity/ Basic Game Dev Course (Paid)] | * [https://www.udemy.com/course/the-ultimate-guide-to-game-development-with-unity/ Basic Game Dev Course (Paid)] |