public void Awake() { screenRect = new Rect(0f, 0f, Screen.width, Screen.height); if (instance == null) { instance = this; } else { Destroy(this); } DontDestroyOnLoad(gameObject); // Setup Custom GUI Windows toggleWindow = new ToggleWindow(this); toggleWindow.isVisible = true; profilerWindow = new SummaryWindow(this, listResourceGroups); detailsWindow = new DetailsWindow(this, "Memory Details"); // Setup the resources groups that you want to have in the profiler at run-time listResourceGroups.Add(new ProfilerResourcesGroup <Texture>()); listResourceGroups.Add(new ProfilerResourcesGroup <AudioClip>()); listResourceGroups.Add(new ProfilerResourcesGroup <Mesh>()); listResourceGroups.Add(new ProfilerResourcesGroup <Material>()); listResourceGroups.Add(new ProfilerResourcesGroup <GameObject>()); }
public void Awake() { screenRect = new Rect(0f, 0f, Screen.width, Screen.height); if(instance == null) { instance = this; } else { Destroy(this); } DontDestroyOnLoad(gameObject); // Setup Custom GUI Windows toggleWindow = new ToggleWindow(this); toggleWindow.isVisible = true; profilerWindow = new SummaryWindow(this, listResourceGroups); detailsWindow = new DetailsWindow(this, "Memory Details"); // Setup the resources groups that you want to have in the profiler at run-time listResourceGroups.Add( new ProfilerResourcesGroup<Texture>() ); listResourceGroups.Add( new ProfilerResourcesGroup<AudioClip>() ); listResourceGroups.Add( new ProfilerResourcesGroup<Mesh>() ); listResourceGroups.Add( new ProfilerResourcesGroup<Material>() ); listResourceGroups.Add( new ProfilerResourcesGroup<GameObject>() ); }