- Home /
If i disable a GameObject does all it's components get disabled also?
As the title says if i disable a GameObject does all it's components get disabled also?
Unity Profiler is telling me that AudioManager.Update
, MonoBehaviour.OnMouse_
(and more) are taking CPU even though the GameObject is disabled and so should it's components (AudioManager) and scripts (The mouse stuff) right?
@kiloblargh "Neither of these should be causing performance issues for you." could you please point to documentation confir$$anonymous$$g this or explain what makes you sure that this is the case? What do you define as an 'issue'? We have up to 2ms spikes on both iOS and Android from On$$anonymous$$ouse_, making it the 3rd highest CPU consu$$anonymous$$g task for those frames.
Have tried setting camera.event$$anonymous$$ask = 0; with no success.
@sovredcat did you ever find a solution?
Answer by Kiloblargh · Feb 20, 2014 at 04:32 PM
Yes, it is supposed to, but- you should not have a component called AudioManager
attached to a gameObject. There already is such a thing. Also, I think Unity detects mouse input whether or not any script is actually using it at the time.
Neither of these should be causing performance issues for you.
I have an audio source attached not an audio manager. Anyway it looks like unity detects mouse input no matter what (like you said) and the audio manager is just that, so thanks.