- Home /
Question about setting layers.
Hello,
I got a simple question :
My project is getting bigger, and I need to think about a lot of thing right now ... so now, when I want to add a new enemy/wall in the game, I need to set the layer and the tag of the GameObject. So i'm wondering if it's fine to define in Awake those tags/layers in a class that the GameObject will handle ?
Or is it better to use a custom editor to create a new enemy/wall tool ?
by new enemy/ wall you mean create a new prefab? or are they all completely individuals?
Answer by s_awali · Nov 08, 2018 at 01:51 PM
You could use a combinaison of Prefabs and ScriptableObjects. Each different enemy and wall will have a specific ScriptableObject containing data, or even specific behaviour. Then create components that will consume each type of ScriptableObjects and create a Prefab out of it.