public void StartLateUpdateCall(Component _component) { currentUpdateProfile = GetComponentProfileFromList(_component); currentUpdateProfile.lateUpdateCalls++; currentUpdateProfile.updateStopwatch.Start(); }
private ComponentUpdateProfile GetComponentProfileFromList(Component _component) { for (int i = 0; i < componentUpdateProfiles.Count; i++) { if (componentUpdateProfiles[i].component.GetType() == _component.GetType()) { return(componentUpdateProfiles[i]); } } ComponentUpdateProfile updateProfile = new ComponentUpdateProfile(_component); componentUpdateProfiles.Add(updateProfile); return(updateProfile); }
public ComponentUpdateProfile GetWorst() { ComponentUpdateProfile worst = new ComponentUpdateProfile(null); /*for (int i = 0; i < componentUpdateProfiles.Count; i++) * { * if (componentUpdateProfiles[i].totalTicks > worst.totalTicks) * { * worst = componentUpdateProfiles[i]; * } * }*/ //if (worst.name == null) //{ // Debug.Log("whuaa"); //} if (componentUpdateProfiles.Count == 0) { return(new ComponentUpdateProfile()); } return(componentUpdateProfiles[0]); }