File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ impl ProfilerMarkerDataType {
167167pub enum ProfilerMarkerDataUnit {
168168 Undefined = UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitUndefined as u8 ,
169169 TimeNanoseconds =
170- UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitTimeNanoseconds as u8 ,
170+ UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitTimeNanoseconds as u8 ,
171171 Bytes = UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitBytes as u8 ,
172172 Count = UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitCount as u8 ,
173173 Percent = UnityProfilerMarkerDataUnit__kUnityProfilerMarkerDataUnitPercent as u8 ,
@@ -378,6 +378,18 @@ define_unity_interface!(
378378macro_rules! impl_profiler_v2 {
379379 ( ) => {
380380 impl_profiler!( ) ;
381+
382+ pub fn create_category( & self , name: & std:: ffi:: CStr , unused: u32 ) -> Option <ProfilerCategoryId > {
383+ unsafe {
384+ let mut category: UnityProfilerCategoryId = std:: mem:: zeroed( ) ;
385+ let r = self . interface( ) . CreateCategory . expect( "CreateCategory" ) ( & mut category as * mut UnityProfilerCategoryId , name. as_ptr( ) , unused) ;
386+ if r > 0 {
387+ Some ( category)
388+ } else {
389+ None
390+ }
391+ }
392+ }
381393 }
382394}
383395
You can’t perform that action at this time.
0 commit comments