Question by
cIammy · Aug 03, 2020 at 08:14 AM ·
scripting problemdesignmanagerdesign-patternsorganization
Best practice for organizing subclasses in Unity?
Hi,
I'm creating my first Unity project and was wondering if my design so far is considered good practice.
I have a parent class called PlayerManager which two subclasses, SpawnManager and SelectManager derive from. I changed the Awake(), Start(), and Update() methods in PlayerManager to virtual methods so they can be overridden in SpawnManager and SelectManager.
In SpawnManager and SelectManager, I do some input handling in Update() and add some additional methods. Finally, I attach all three scripts to a GameObject prefab in the scene. My question is, is this a good method of organizing my scripts/objects?
screenshot-2020-07-29-063505.png
(97.0 kB)
Comment