- Home /
what is the best way to create many squares (like chess squares), and each square has one animation, itween? shader? particle? which one?
Hi everybody i want to create many square to fill the screen like a chess squares, and i need add one animation on most squares depend on my purpose, for example each square should scale to 0 after a specific time depend on its number and some should not be animate like below image: i tried to create squares this way: quad [i] = GameObject.CreatePrimitive (PrimitiveType.Quad); and add animation by itween: iTween.ScaleTo(initGame.quad [i], iTween.Hash("delay", 0.04f*(i),"x", 0,"y", 0,"time", 0 )); but performance and FPS is very slow (almost 5-9 frame per second) is there a better way to rich this purpuse with better performance? (may be by shader programing or particle system)
Hi !
How much square do you want to create (to have an idea of what do you call many)? And could you provide the behaviour you use to check exactly what you are doing?
Creating a primitive and an animation should not be time consum$$anonymous$$g, and if it is, you would have a FPS drop on creation ins$$anonymous$$d of be slow... Unless you instanciate millions of primitives, or a couple at each frame.