Hey! I am working on a moba-like project and currently I got started to work on something that will make it easier in future, kinda like layered architecture in web dev.
UnitInfo.cs, where i hold general information
public abstract class UnitInfo : MonoBehaviour
{
...
}
And
DummyUnit.cs, where i hold the specific details and functions.
public class DummyUnit : UnitInfo
{
...
}
So ideally I give my GameObject “DummyUnit.cs” script, But since that script doesn’t inherit MonoBehaviour directly, unity doesn’t allow me to create a prefab of the GameObject.
I have seen on my research that some people keep all unit types in one script which is not ideal and I am not even sure how it could work. Also would cause problems when there is too many units.
How can I create a prefab for this object, with an organized layers of architectury.
I am pretty new to unity, so any advice is appreciated. Thank you!
Edit: The process and the error.
[ATTACH=full]768061[/ATTACH[/ATTACH]