- Home /
Is the C# Profiler class available for the Personal edition of Unity?
It seems that the Profiler is available now in the Personal edition of Unity, however VS can't seem to find the Profiler C# class.
https://docs.unity3d.com/ScriptReference/Profiling.Profiler.BeginSample.html
Since I can't find any mention of this begin a Pro feature in the documentation I wonder if it is a bug.
Answer by Casiell · Nov 20, 2019 at 11:56 AM
UnityEngine.Profiling.Profiler.BeginSample("some string param");
Is a perfectly valid line of code in my project. Are you sure you are not using an old Unity version? I checked this using 2018.3.0f2
Ah, ok, that solved it: you need to include the Profiling namespace`using UnityEngine.Profiling;`, then you can use Profiler.BeginSample("foo")
without the full path..
It is actually better to use Unity.Profiling.Profiler$$anonymous$$arker since that carries less overhead. And yes, the Profiler and it's API became available along with all other engine features in Version 5 I believe.