- Home /
How to create coin templates for spawning in 2D game
I'm developing a 2D game. And now as usual i need to spawn coin templates. How can i create these templates faster then creating without any tools.I know about tilemaps but using this tool i'll create a "sprite" not a detached gameobjects(coins). So i can't take them
Something like this
Answer by paezrice · Nov 17, 2018 at 04:43 PM
You can use prefabs for the coins (Unity Prefab Documentation) which you can then instantiate.
Oh wait... you probably mean the pattern for their transform!? I'm not sure, but maybe you could place your coins by hand -> declare them alltogether as a child of an empty gameobject and use this empy gameobject as a prefab.
Thank you, i've been doing it like you said before)) I thought that there is better way to do it but unfortunately no
Well, thinking of it again, i guess you couid create an array of Transforms, and then reject or accept those array-elements as a spawn-position depending on a custom mathematical/logical pattern you come up with.