├── .gitignore ├── LICENSE ├── ProfilerPlugin ├── MonoFuncs.h ├── ProfilerPlugin.cpp ├── ProfilerPlugin.h ├── ProfilerPlugin.sln ├── ProfilerPlugin.vcxproj ├── ProfilerPlugin.vcxproj.filters ├── ReadMe.txt ├── dllmain.cpp ├── stdafx.cpp ├── stdafx.h └── targetver.h └── ProfilerUnityProject ├── Assets ├── Plugins.meta ├── Plugins │ ├── ProfilerPlugin.dll │ └── ProfilerPlugin.dll.meta ├── ProfilerPlugin.cs ├── ProfilerPlugin.cs.meta ├── default.unity └── default.unity.meta └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | *.VC.VC.opendb 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | # TODO: Comment the next line if you want to checkin your web deploy settings 144 | # but database connection strings (with potential passwords) will be unencrypted 145 | *.pubxml 146 | *.publishproj 147 | 148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 149 | # checkin your Azure Web App publish settings, but sensitive information contained 150 | # in these scripts will be unencrypted 151 | PublishScripts/ 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Windows Store app package directories and files 174 | AppPackages/ 175 | BundleArtifacts/ 176 | Package.StoreAssociation.xml 177 | _pkginfo.txt 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | ~$* 188 | *~ 189 | *.dbmdl 190 | *.dbproj.schemaview 191 | *.pfx 192 | *.publishsettings 193 | node_modules/ 194 | orleans.codegen.cs 195 | 196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 198 | #bower_components/ 199 | 200 | # RIA/Silverlight projects 201 | Generated_Code/ 202 | 203 | # Backup & report files from converting an old project file 204 | # to a newer Visual Studio version. Backup files are not needed, 205 | # because we have git ;-) 206 | _UpgradeReport_Files/ 207 | Backup*/ 208 | UpgradeLog*.XML 209 | UpgradeLog*.htm 210 | 211 | # SQL Server files 212 | *.mdf 213 | *.ldf 214 | 215 | # Business Intelligence projects 216 | *.rdl.data 217 | *.bim.layout 218 | *.bim_*.settings 219 | 220 | # Microsoft Fakes 221 | FakesAssemblies/ 222 | 223 | # GhostDoc plugin setting file 224 | *.GhostDoc.xml 225 | 226 | # Node.js Tools for Visual Studio 227 | .ntvs_analysis.dat 228 | 229 | # Visual Studio 6 build log 230 | *.plg 231 | 232 | # Visual Studio 6 workspace options file 233 | *.opt 234 | 235 | # Visual Studio LightSwitch build output 236 | **/*.HTMLClient/GeneratedArtifacts 237 | **/*.DesktopClient/GeneratedArtifacts 238 | **/*.DesktopClient/ModelManifest.xml 239 | **/*.Server/GeneratedArtifacts 240 | **/*.Server/ModelManifest.xml 241 | _Pvt_Extensions 242 | 243 | # Paket dependency manager 244 | .paket/paket.exe 245 | paket-files/ 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # JetBrains Rider 251 | .idea/ 252 | *.sln.iml 253 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jonathan Chambers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProfilerPlugin/MonoFuncs.h: -------------------------------------------------------------------------------- 1 | MONO_FUNC (void, mono_profiler_install, (MonoProfiler *prof, MonoProfileFunc shutdown_callback)) 2 | MONO_FUNC (void, mono_profiler_set_events, (MonoProfileFlags events)) 3 | MONO_FUNC (void, mono_profiler_install_allocation, (MonoProfileAllocFunc callback)) 4 | 5 | MONO_FUNC (const char*, mono_class_get_name, (MonoClass *klass)) 6 | MONO_FUNC (const char*, mono_class_get_namespace, (MonoClass *klass)) 7 | MONO_FUNC (int32_t, mono_class_instance_size, (MonoClass *klass)) 8 | 9 | MONO_FUNC (MonoThread*, mono_thread_current, ()) 10 | MONO_FUNC (MonoClass*, mono_object_get_class, (MonoObject *obj)) 11 | MONO_FUNC (MonoClassField*, mono_class_get_field_from_name, (MonoClass *klass, const char *name)) 12 | MONO_FUNC (uint32_t, mono_field_get_offset, (MonoClassField *field)) 13 | -------------------------------------------------------------------------------- /ProfilerPlugin/ProfilerPlugin.cpp: -------------------------------------------------------------------------------- 1 | // AllocationProfiler.cpp : Defines the exported functions for the DLL application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "ProfilerPlugin.h" 6 | #include 7 | 8 | /* Mono APIs */ 9 | 10 | typedef enum { 11 | MONO_PROFILE_NONE = 0, 12 | MONO_PROFILE_APPDOMAIN_EVENTS = 1 << 0, 13 | MONO_PROFILE_ASSEMBLY_EVENTS = 1 << 1, 14 | MONO_PROFILE_MODULE_EVENTS = 1 << 2, 15 | MONO_PROFILE_CLASS_EVENTS = 1 << 3, 16 | MONO_PROFILE_JIT_COMPILATION = 1 << 4, 17 | MONO_PROFILE_INLINING = 1 << 5, 18 | MONO_PROFILE_EXCEPTIONS = 1 << 6, 19 | MONO_PROFILE_ALLOCATIONS = 1 << 7, 20 | MONO_PROFILE_GC = 1 << 8, 21 | MONO_PROFILE_THREADS = 1 << 9, 22 | MONO_PROFILE_REMOTING = 1 << 10, 23 | MONO_PROFILE_TRANSITIONS = 1 << 11, 24 | MONO_PROFILE_ENTER_LEAVE = 1 << 12, 25 | MONO_PROFILE_COVERAGE = 1 << 13, 26 | MONO_PROFILE_INS_COVERAGE = 1 << 14, 27 | MONO_PROFILE_STATISTICAL = 1 << 15, 28 | MONO_PROFILE_METHOD_EVENTS = 1 << 16, 29 | MONO_PROFILE_MONITOR_EVENTS = 1 << 17, 30 | MONO_PROFILE_IOMAP_EVENTS = 1 << 18, /* this should likely be removed, too */ 31 | MONO_PROFILE_GC_MOVES = 1 << 19 32 | } MonoProfileFlags; 33 | 34 | 35 | struct MonoProfiler; 36 | struct MonoObject; 37 | struct MonoClass; 38 | typedef void (*MonoProfileFunc) (MonoProfiler *prof); 39 | typedef void (*MonoProfileAllocFunc) (MonoProfiler *prof, MonoObject *obj, MonoClass *klass); 40 | 41 | struct MonoThread; 42 | struct MonoClassField; 43 | 44 | #define MONO_FUNC(ret, name, sig) \ 45 | typedef ret (*name##_func) sig; \ 46 | static name##_func name; 47 | #include "MonoFuncs.h" 48 | #undef MONO_FUNC 49 | 50 | static bool initialized; 51 | 52 | static void AllocationCallback (MonoProfiler *prof, MonoObject *obj, MonoClass *klass); 53 | 54 | PROFILERPLUGIN_API int Initialize (void) 55 | { 56 | if (initialized) 57 | return 0; 58 | 59 | HMODULE hMono = LoadLibrary (L"mono.dll"); 60 | 61 | #define MONO_FUNC(ret, name, sig) \ 62 | name = (name##_func)GetProcAddress(hMono, #name); 63 | #include "MonoFuncs.h" 64 | #undef MONO_FUNC 65 | 66 | MonoThread* thread = mono_thread_current (); 67 | MonoClass* threadClass = mono_object_get_class ((MonoObject*)thread); 68 | MonoClassField* managedIdField = mono_class_get_field_from_name (threadClass, "managed_id"); 69 | uint32_t managedIdOffset = mono_field_get_offset (managedIdField); 70 | 71 | int32_t managedId = *(int32_t*)((char*)thread + managedIdOffset); 72 | 73 | mono_profiler_install (NULL, NULL); 74 | mono_profiler_install_allocation (AllocationCallback); 75 | mono_profiler_set_events (MONO_PROFILE_ALLOCATIONS); 76 | 77 | ::MessageBoxA (NULL, "Hello World!", "Allocation Profilers", MB_OK); 78 | return 1; 79 | } 80 | 81 | static void AllocationCallback (MonoProfiler *prof, MonoObject *obj, MonoClass *klass) 82 | { 83 | char buffer[1024]; 84 | 85 | const char* ns = mono_class_get_namespace (klass); 86 | if (ns == NULL) 87 | ns = ""; 88 | const char* n = mono_class_get_name (klass); 89 | int32_t size = mono_class_instance_size (klass); 90 | snprintf (buffer, sizeof (buffer), "Thread: %d Allocating: %s.%s Size: %d\n", GetCurrentThreadId (), ns, n, size); 91 | 92 | OutputDebugStringA (buffer); 93 | } 94 | -------------------------------------------------------------------------------- /ProfilerPlugin/ProfilerPlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _MSC_VER 4 | #ifdef PROFILERPLUGIN_EXPORTS 5 | #define PROFILERPLUGIN_API extern "C" __declspec(dllexport) 6 | #else 7 | #define PROFILERPLUGIN_API extern "C" __declspec(dllimport) 8 | #endif 9 | #else 10 | #define PROFILERPLUGIN_API 11 | #endif 12 | 13 | PROFILERPLUGIN_API int Initialize (void); 14 | -------------------------------------------------------------------------------- /ProfilerPlugin/ProfilerPlugin.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProfilerPlugin", "ProfilerPlugin.vcxproj", "{C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Debug|x64.ActiveCfg = Debug|x64 17 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Debug|x64.Build.0 = Debug|x64 18 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Debug|x86.ActiveCfg = Debug|Win32 19 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Debug|x86.Build.0 = Debug|Win32 20 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Release|x64.ActiveCfg = Release|x64 21 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Release|x64.Build.0 = Release|x64 22 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Release|x86.ActiveCfg = Release|Win32 23 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /ProfilerPlugin/ProfilerPlugin.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {C3FFBEFA-7C6A-4BF6-848A-950A38FDEE02} 23 | Win32Proj 24 | ProfilerPlugin 25 | 8.1 26 | 27 | 28 | 29 | DynamicLibrary 30 | true 31 | v140 32 | Unicode 33 | 34 | 35 | DynamicLibrary 36 | false 37 | v140 38 | true 39 | Unicode 40 | 41 | 42 | DynamicLibrary 43 | true 44 | v140 45 | Unicode 46 | 47 | 48 | DynamicLibrary 49 | false 50 | v140 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | true 74 | 75 | 76 | true 77 | 78 | 79 | false 80 | 81 | 82 | false 83 | 84 | 85 | 86 | 87 | 88 | Level3 89 | Disabled 90 | WIN32;_DEBUG;_WINDOWS;_USRDLL;PROFILERPLUGIN_EXPORTS;%(PreprocessorDefinitions) 91 | 92 | 93 | Windows 94 | true 95 | 96 | 97 | 98 | 99 | 100 | 101 | Level3 102 | Disabled 103 | _DEBUG;_WINDOWS;_USRDLL;PROFILERPLUGIN_EXPORTS;%(PreprocessorDefinitions) 104 | 105 | 106 | Windows 107 | true 108 | 109 | 110 | copy $(TargetPath) $(ProjectDir)..\ProfilerUnityProject\Assets\Plugins\ 111 | 112 | 113 | Copy plugin into Unity 114 | 115 | 116 | 117 | 118 | Level3 119 | 120 | 121 | MaxSpeed 122 | true 123 | true 124 | WIN32;NDEBUG;_WINDOWS;_USRDLL;PROFILERPLUGIN_EXPORTS;%(PreprocessorDefinitions) 125 | 126 | 127 | Windows 128 | true 129 | true 130 | true 131 | 132 | 133 | 134 | 135 | Level3 136 | 137 | 138 | MaxSpeed 139 | true 140 | true 141 | NDEBUG;_WINDOWS;_USRDLL;PROFILERPLUGIN_EXPORTS;%(PreprocessorDefinitions) 142 | 143 | 144 | Windows 145 | true 146 | true 147 | true 148 | 149 | 150 | copy $(TargetPath) $(ProjectDir)..\ProfilerUnityProject\Assets\Plugins\ 151 | Copy plugin into Unity 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | false 165 | 166 | 167 | false 168 | 169 | 170 | false 171 | 172 | 173 | false 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /ProfilerPlugin/ProfilerPlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /ProfilerPlugin/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : ProfilerPlugin Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this ProfilerPlugin DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your ProfilerPlugin application. 9 | 10 | 11 | ProfilerPlugin.vcxproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | ProfilerPlugin.vcxproj.filters 18 | This is the filters file for VC++ projects generated using an Application Wizard. 19 | It contains information about the association between the files in your project 20 | and the filters. This association is used in the IDE to show grouping of files with 21 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 22 | "Source Files" filter). 23 | 24 | ProfilerPlugin.cpp 25 | This is the main DLL source file. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other standard files: 29 | 30 | StdAfx.h, StdAfx.cpp 31 | These files are used to build a precompiled header (PCH) file 32 | named ProfilerPlugin.pch and a precompiled types file named StdAfx.obj. 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | Other notes: 36 | 37 | AppWizard uses "TODO:" comments to indicate parts of the source code you 38 | should add to or customize. 39 | 40 | ///////////////////////////////////////////////////////////////////////////// 41 | -------------------------------------------------------------------------------- /ProfilerPlugin/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /ProfilerPlugin/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ProfilerPlugin.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /ProfilerPlugin/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | // Windows Header Files: 12 | #include 13 | 14 | 15 | 16 | // TODO: reference additional headers your program requires here 17 | -------------------------------------------------------------------------------- /ProfilerPlugin/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8692955dd19c7a0498cbda9eaa628037 3 | folderAsset: yes 4 | timeCreated: 1478263017 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/Plugins/ProfilerPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/Assets/Plugins/ProfilerPlugin.dll -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/Plugins/ProfilerPlugin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c80c4b1de0f17e746a0e2341c45e58da 3 | timeCreated: 1478263018 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 0 13 | settings: 14 | CPU: AnyCPU 15 | Any: 16 | enabled: 1 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: x86_64 32 | LinuxUniversal: 33 | enabled: 0 34 | settings: 35 | CPU: None 36 | OSXIntel: 37 | enabled: 0 38 | settings: 39 | CPU: AnyCPU 40 | OSXIntel64: 41 | enabled: 0 42 | settings: 43 | CPU: AnyCPU 44 | OSXUniversal: 45 | enabled: 0 46 | settings: 47 | CPU: None 48 | Win: 49 | enabled: 0 50 | settings: 51 | CPU: AnyCPU 52 | Win64: 53 | enabled: 1 54 | settings: 55 | CPU: AnyCPU 56 | WindowsStoreApps: 57 | enabled: 0 58 | settings: 59 | CPU: AnyCPU 60 | DontProcess: False 61 | PlaceholderPath: 62 | SDK: AnySDK 63 | ScriptingBackend: AnyScriptingBackend 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/ProfilerPlugin.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using UnityEngine; 5 | 6 | public class ProfilerPlugin : MonoBehaviour 7 | { 8 | 9 | [DllImport("ProfilerPlugin")] 10 | static extern int Initialize(); 11 | 12 | void Start () 13 | { 14 | Initialize(); 15 | } 16 | 17 | 18 | void Update () 19 | { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/ProfilerPlugin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 286d755587c3c7645b3a4569cac590b0 3 | timeCreated: 1478263018 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/default.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/Assets/default.unity -------------------------------------------------------------------------------- /ProfilerUnityProject/Assets/default.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bd8ce9d35a6e424580cbf828712c46d 3 | timeCreated: 1478263037 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.3p2 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProfilerUnityProject/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joncham/unity-profiler-plugin/a8dda47b2affb4be4a568c771417d07d9224e653/ProfilerUnityProject/ProjectSettings/UnityConnectSettings.asset --------------------------------------------------------------------------------