I have a basic question I could not seem to find the answer for. Is there a number of scripts on an object that causes performance issues? Basically, I am wondering if I should consolidate many scripts into one/few or is it okay to have say, up to 10 scripts for certain objects such as the player and enemies?
Tentative scripts to be attached to the player:
Health - keeps track of health and manages all damage and death states.
Movement - Player movement script to move the player
Inventory - contains a list of weapons and ammo
Score - Keeps track of all stats such as # of kills, headshots etc
Interaction - controls how the player can interact with objects. This script will enable the player to pick up weapons and objects and use special things such as doors and environment objects such as buttons. Also will control action events(press “x” to not die)
GUI - used to display all GUI elements
I am trying to modularize my scripts so I can reuse them on other objects. All breakable objects will make use of the Health script for example.
Edit: Sorry if this should have gone into the scripting forum. I felt it should go under support as it deals with performance.