├── .gitattributes ├── .gitignore ├── App.config ├── Assets ├── background.png ├── icon.png ├── icon_localhoster.ico └── logo_localhoster.png ├── FolderPicker.cs ├── LICENSE ├── Localhoster.ico ├── MainPage.Designer.cs ├── MainPage.cs ├── MainPage.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── UnityWebGl_LocalHoster.csproj ├── UnityWebGl_LocalHoster.sln ├── icon.ico └── icon_localhoster.ico /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Assets/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/Assets/background.png -------------------------------------------------------------------------------- /Assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/Assets/icon.png -------------------------------------------------------------------------------- /Assets/icon_localhoster.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/Assets/icon_localhoster.ico -------------------------------------------------------------------------------- /Assets/logo_localhoster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/Assets/logo_localhoster.png -------------------------------------------------------------------------------- /FolderPicker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Runtime.InteropServices; 4 | using System.Runtime.InteropServices.ComTypes; 5 | 6 | namespace UnityWebGl_LocalHoster 7 | { 8 | public class FolderPicker 9 | { 10 | public virtual string ResultPath { get; protected set; } 11 | public virtual string ResultName { get; protected set; } 12 | public virtual string InputPath { get; set; } 13 | public virtual bool ForceFileSystem { get; set; } 14 | public virtual string Title { get; set; } 15 | public virtual string OkButtonLabel { get; set; } 16 | public virtual string FileNameLabel { get; set; } 17 | 18 | protected virtual int SetOptions(int options) 19 | { 20 | if (ForceFileSystem) 21 | { 22 | options |= (int)FOS.FOS_FORCEFILESYSTEM; 23 | } 24 | return options; 25 | } 26 | 27 | // for all .NET 28 | public virtual bool? ShowDialog(IntPtr owner, bool throwOnError = false) 29 | { 30 | var dialog = (IFileOpenDialog)new FileOpenDialog(); 31 | if (!string.IsNullOrEmpty(InputPath)) 32 | { 33 | if (CheckHr(SHCreateItemFromParsingName(InputPath, null, typeof(IShellItem).GUID, out var item), throwOnError) != 0) 34 | return null; 35 | 36 | dialog.SetFolder(item); 37 | } 38 | 39 | var options = FOS.FOS_PICKFOLDERS; 40 | options = (FOS)SetOptions((int)options); 41 | dialog.SetOptions(options); 42 | 43 | if (Title != null) 44 | { 45 | dialog.SetTitle(Title); 46 | } 47 | 48 | if (OkButtonLabel != null) 49 | { 50 | dialog.SetOkButtonLabel(OkButtonLabel); 51 | } 52 | 53 | if (FileNameLabel != null) 54 | { 55 | dialog.SetFileName(FileNameLabel); 56 | } 57 | 58 | if (owner == IntPtr.Zero) 59 | { 60 | owner = Process.GetCurrentProcess().MainWindowHandle; 61 | if (owner == IntPtr.Zero) 62 | { 63 | owner = GetDesktopWindow(); 64 | } 65 | } 66 | 67 | var hr = dialog.Show(owner); 68 | if (hr == ERROR_CANCELLED) 69 | return null; 70 | 71 | if (CheckHr(hr, throwOnError) != 0) 72 | return null; 73 | 74 | if (CheckHr(dialog.GetResult(out var result), throwOnError) != 0) 75 | return null; 76 | 77 | if (CheckHr(result.GetDisplayName(SIGDN.SIGDN_DESKTOPABSOLUTEPARSING, out var path), throwOnError) != 0) 78 | return null; 79 | 80 | ResultPath = path; 81 | 82 | if (CheckHr(result.GetDisplayName(SIGDN.SIGDN_DESKTOPABSOLUTEEDITING, out path), false) == 0) 83 | { 84 | ResultName = path; 85 | } 86 | return true; 87 | } 88 | 89 | private static int CheckHr(int hr, bool throwOnError) 90 | { 91 | if (hr != 0) 92 | { 93 | if (throwOnError) 94 | Marshal.ThrowExceptionForHR(hr); 95 | } 96 | return hr; 97 | } 98 | 99 | [DllImport("shell32")] 100 | private static extern int SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [MarshalAs(UnmanagedType.LPStruct)] Guid riid, out IShellItem ppv); 101 | 102 | [DllImport("user32")] 103 | private static extern IntPtr GetDesktopWindow(); 104 | 105 | #pragma warning disable IDE1006 // Naming Styles 106 | private const int ERROR_CANCELLED = unchecked((int)0x800704C7); 107 | #pragma warning restore IDE1006 // Naming Styles 108 | 109 | [ComImport, Guid("DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7")] // CLSID_FileOpenDialog 110 | private class FileOpenDialog 111 | { 112 | } 113 | 114 | [ComImport, Guid("42f85136-db7e-439c-85f1-e4075d135fc8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 115 | private interface IFileOpenDialog 116 | { 117 | [PreserveSig] int Show(IntPtr parent); // IModalWindow 118 | [PreserveSig] int SetFileTypes(); // not fully defined 119 | [PreserveSig] int SetFileTypeIndex(int iFileType); 120 | [PreserveSig] int GetFileTypeIndex(out int piFileType); 121 | [PreserveSig] int Advise(); // not fully defined 122 | [PreserveSig] int Unadvise(); 123 | [PreserveSig] int SetOptions(FOS fos); 124 | [PreserveSig] int GetOptions(out FOS pfos); 125 | [PreserveSig] int SetDefaultFolder(IShellItem psi); 126 | [PreserveSig] int SetFolder(IShellItem psi); 127 | [PreserveSig] int GetFolder(out IShellItem ppsi); 128 | [PreserveSig] int GetCurrentSelection(out IShellItem ppsi); 129 | [PreserveSig] int SetFileName([MarshalAs(UnmanagedType.LPWStr)] string pszName); 130 | [PreserveSig] int GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); 131 | [PreserveSig] int SetTitle([MarshalAs(UnmanagedType.LPWStr)] string pszTitle); 132 | [PreserveSig] int SetOkButtonLabel([MarshalAs(UnmanagedType.LPWStr)] string pszText); 133 | [PreserveSig] int SetFileNameLabel([MarshalAs(UnmanagedType.LPWStr)] string pszLabel); 134 | [PreserveSig] int GetResult(out IShellItem ppsi); 135 | [PreserveSig] int AddPlace(IShellItem psi, int alignment); 136 | [PreserveSig] int SetDefaultExtension([MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); 137 | [PreserveSig] int Close(int hr); 138 | [PreserveSig] int SetClientGuid(); // not fully defined 139 | [PreserveSig] int ClearClientData(); 140 | [PreserveSig] int SetFilter([MarshalAs(UnmanagedType.IUnknown)] object pFilter); 141 | [PreserveSig] int GetResults([MarshalAs(UnmanagedType.IUnknown)] out object ppenum); 142 | [PreserveSig] int GetSelectedItems([MarshalAs(UnmanagedType.IUnknown)] out object ppsai); 143 | } 144 | 145 | [ComImport, Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 146 | private interface IShellItem 147 | { 148 | [PreserveSig] int BindToHandler(); // not fully defined 149 | [PreserveSig] int GetParent(); // not fully defined 150 | [PreserveSig] int GetDisplayName(SIGDN sigdnName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszName); 151 | [PreserveSig] int GetAttributes(); // not fully defined 152 | [PreserveSig] int Compare(); // not fully defined 153 | } 154 | 155 | #pragma warning disable CA1712 // Do not prefix enum values with type name 156 | private enum SIGDN : uint 157 | { 158 | SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000, 159 | SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000, 160 | SIGDN_FILESYSPATH = 0x80058000, 161 | SIGDN_NORMALDISPLAY = 0, 162 | SIGDN_PARENTRELATIVE = 0x80080001, 163 | SIGDN_PARENTRELATIVEEDITING = 0x80031001, 164 | SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001, 165 | SIGDN_PARENTRELATIVEPARSING = 0x80018001, 166 | SIGDN_URL = 0x80068000 167 | } 168 | 169 | [Flags] 170 | private enum FOS 171 | { 172 | FOS_OVERWRITEPROMPT = 0x2, 173 | FOS_STRICTFILETYPES = 0x4, 174 | FOS_NOCHANGEDIR = 0x8, 175 | FOS_PICKFOLDERS = 0x20, 176 | FOS_FORCEFILESYSTEM = 0x40, 177 | FOS_ALLNONSTORAGEITEMS = 0x80, 178 | FOS_NOVALIDATE = 0x100, 179 | FOS_ALLOWMULTISELECT = 0x200, 180 | FOS_PATHMUSTEXIST = 0x800, 181 | FOS_FILEMUSTEXIST = 0x1000, 182 | FOS_CREATEPROMPT = 0x2000, 183 | FOS_SHAREAWARE = 0x4000, 184 | FOS_NOREADONLYRETURN = 0x8000, 185 | FOS_NOTESTFILECREATE = 0x10000, 186 | FOS_HIDEMRUPLACES = 0x20000, 187 | FOS_HIDEPINNEDPLACES = 0x40000, 188 | FOS_NODEREFERENCELINKS = 0x100000, 189 | FOS_OKBUTTONNEEDSINTERACTION = 0x200000, 190 | FOS_DONTADDTORECENT = 0x2000000, 191 | FOS_FORCESHOWHIDDEN = 0x10000000, 192 | FOS_DEFAULTNOMINIMODE = 0x20000000, 193 | FOS_FORCEPREVIEWPANEON = 0x40000000, 194 | FOS_SUPPORTSTREAMABLEITEMS = unchecked((int)0x80000000) 195 | } 196 | #pragma warning restore CA1712 // Do not prefix enum values with type name 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Yahya LAZREK 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 | -------------------------------------------------------------------------------- /Localhoster.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/Localhoster.ico -------------------------------------------------------------------------------- /MainPage.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace UnityWebGl_LocalHoster 3 | { 4 | partial class MainPage 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.components = new System.ComponentModel.Container(); 33 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainPage)); 34 | this.title_L = new System.Windows.Forms.Label(); 35 | this.gamePath_L = new System.Windows.Forms.Label(); 36 | this.gamePath_BTN = new System.Windows.Forms.Button(); 37 | this.port_L = new System.Windows.Forms.Label(); 38 | this.port_TB = new System.Windows.Forms.TextBox(); 39 | this.start_BTN = new System.Windows.Forms.Button(); 40 | this.folderPathName_L = new System.Windows.Forms.Label(); 41 | this.version_L = new System.Windows.Forms.Label(); 42 | this.localhostLink_L = new System.Windows.Forms.Label(); 43 | this.gamePath_toolTip = new System.Windows.Forms.ToolTip(this.components); 44 | this.SuspendLayout(); 45 | // 46 | // title_L 47 | // 48 | this.title_L.AutoSize = true; 49 | this.title_L.BackColor = System.Drawing.Color.Transparent; 50 | this.title_L.Font = new System.Drawing.Font("Source Sans Pro", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 51 | this.title_L.ForeColor = System.Drawing.Color.White; 52 | this.title_L.Location = new System.Drawing.Point(34, 33); 53 | this.title_L.Name = "title_L"; 54 | this.title_L.Size = new System.Drawing.Size(435, 47); 55 | this.title_L.TabIndex = 0; 56 | this.title_L.Text = "Unity WebGl Local Hoster"; 57 | // 58 | // gamePath_L 59 | // 60 | this.gamePath_L.AutoSize = true; 61 | this.gamePath_L.BackColor = System.Drawing.Color.Transparent; 62 | this.gamePath_L.Font = new System.Drawing.Font("Source Sans Pro", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 63 | this.gamePath_L.ForeColor = System.Drawing.Color.White; 64 | this.gamePath_L.Location = new System.Drawing.Point(46, 135); 65 | this.gamePath_L.Name = "gamePath_L"; 66 | this.gamePath_L.Size = new System.Drawing.Size(182, 28); 67 | this.gamePath_L.TabIndex = 1; 68 | this.gamePath_L.Text = "WebGl Game Path*"; 69 | // 70 | // gamePath_BTN 71 | // 72 | this.gamePath_BTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(56)))), ((int)(((byte)(76))))); 73 | this.gamePath_BTN.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 74 | this.gamePath_BTN.Font = new System.Drawing.Font("Source Sans Pro", 8.999999F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 75 | this.gamePath_BTN.ForeColor = System.Drawing.Color.White; 76 | this.gamePath_BTN.Location = new System.Drawing.Point(231, 135); 77 | this.gamePath_BTN.Name = "gamePath_BTN"; 78 | this.gamePath_BTN.Size = new System.Drawing.Size(92, 30); 79 | this.gamePath_BTN.TabIndex = 2; 80 | this.gamePath_BTN.Text = "browse"; 81 | this.gamePath_BTN.UseVisualStyleBackColor = false; 82 | this.gamePath_BTN.Click += new System.EventHandler(this.gamePath_BTN_Click); 83 | // 84 | // port_L 85 | // 86 | this.port_L.AutoSize = true; 87 | this.port_L.BackColor = System.Drawing.Color.Transparent; 88 | this.port_L.Font = new System.Drawing.Font("Source Sans Pro", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 89 | this.port_L.ForeColor = System.Drawing.Color.White; 90 | this.port_L.Location = new System.Drawing.Point(46, 198); 91 | this.port_L.Name = "port_L"; 92 | this.port_L.Size = new System.Drawing.Size(51, 28); 93 | this.port_L.TabIndex = 3; 94 | this.port_L.Text = "Port"; 95 | // 96 | // port_TB 97 | // 98 | this.port_TB.BackColor = System.Drawing.Color.White; 99 | this.port_TB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 100 | this.port_TB.Font = new System.Drawing.Font("Source Sans Pro", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 101 | this.port_TB.ForeColor = System.Drawing.Color.Black; 102 | this.port_TB.Location = new System.Drawing.Point(231, 200); 103 | this.port_TB.MaxLength = 4; 104 | this.port_TB.Name = "port_TB"; 105 | this.port_TB.Size = new System.Drawing.Size(92, 26); 106 | this.port_TB.TabIndex = 4; 107 | this.port_TB.Text = "8000"; 108 | this.port_TB.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 109 | // 110 | // start_BTN 111 | // 112 | this.start_BTN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(56)))), ((int)(((byte)(76))))); 113 | this.start_BTN.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 114 | this.start_BTN.Font = new System.Drawing.Font("Source Sans Pro", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 115 | this.start_BTN.ForeColor = System.Drawing.Color.White; 116 | this.start_BTN.Location = new System.Drawing.Point(128, 333); 117 | this.start_BTN.Name = "start_BTN"; 118 | this.start_BTN.Size = new System.Drawing.Size(120, 40); 119 | this.start_BTN.TabIndex = 5; 120 | this.start_BTN.Text = "start localhost"; 121 | this.start_BTN.UseVisualStyleBackColor = false; 122 | this.start_BTN.Click += new System.EventHandler(this.start_BTN_Click); 123 | // 124 | // folderPathName_L 125 | // 126 | this.folderPathName_L.AutoSize = true; 127 | this.folderPathName_L.BackColor = System.Drawing.Color.Transparent; 128 | this.folderPathName_L.Font = new System.Drawing.Font("Source Sans Pro", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 129 | this.folderPathName_L.ForeColor = System.Drawing.Color.White; 130 | this.folderPathName_L.Location = new System.Drawing.Point(330, 141); 131 | this.folderPathName_L.Name = "folderPathName_L"; 132 | this.folderPathName_L.Size = new System.Drawing.Size(0, 18); 133 | this.folderPathName_L.TabIndex = 6; 134 | // 135 | // version_L 136 | // 137 | this.version_L.AutoSize = true; 138 | this.version_L.BackColor = System.Drawing.Color.Transparent; 139 | this.version_L.Font = new System.Drawing.Font("Source Sans Pro", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 140 | this.version_L.ForeColor = System.Drawing.Color.White; 141 | this.version_L.Location = new System.Drawing.Point(46, 263); 142 | this.version_L.Name = "version_L"; 143 | this.version_L.Size = new System.Drawing.Size(80, 28); 144 | this.version_L.TabIndex = 8; 145 | this.version_L.Text = "Version"; 146 | // 147 | // localhostLink_L 148 | // 149 | this.localhostLink_L.AutoSize = true; 150 | this.localhostLink_L.BackColor = System.Drawing.Color.Transparent; 151 | this.localhostLink_L.Font = new System.Drawing.Font("Source Sans Pro", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 152 | this.localhostLink_L.ForeColor = System.Drawing.Color.White; 153 | this.localhostLink_L.Location = new System.Drawing.Point(122, 387); 154 | this.localhostLink_L.Name = "localhostLink_L"; 155 | this.localhostLink_L.Size = new System.Drawing.Size(0, 18); 156 | this.localhostLink_L.TabIndex = 9; 157 | this.localhostLink_L.Click += new System.EventHandler(this.localhostLink_L_Click); 158 | // 159 | // gamePath_toolTip 160 | // 161 | this.gamePath_toolTip.ShowAlways = true; 162 | // 163 | // MainPage 164 | // 165 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F); 166 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 167 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(56)))), ((int)(((byte)(76))))); 168 | this.BackgroundImage = global::UnityWebGl_LocalHoster.Properties.Resources.background; 169 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; 170 | this.ClientSize = new System.Drawing.Size(1264, 733); 171 | this.Controls.Add(this.localhostLink_L); 172 | this.Controls.Add(this.version_L); 173 | this.Controls.Add(this.folderPathName_L); 174 | this.Controls.Add(this.start_BTN); 175 | this.Controls.Add(this.port_TB); 176 | this.Controls.Add(this.port_L); 177 | this.Controls.Add(this.gamePath_BTN); 178 | this.Controls.Add(this.gamePath_L); 179 | this.Controls.Add(this.title_L); 180 | this.Font = new System.Drawing.Font("Source Sans Pro", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 181 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 182 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 183 | this.MinimumSize = new System.Drawing.Size(960, 540); 184 | this.Name = "MainPage"; 185 | this.Text = "Unity WebGl Local Hoster"; 186 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainPage_FormClosing); 187 | this.Load += new System.EventHandler(this.MainPage_Load); 188 | this.ResumeLayout(false); 189 | this.PerformLayout(); 190 | 191 | } 192 | 193 | #endregion 194 | 195 | private System.Windows.Forms.Label title_L; 196 | private System.Windows.Forms.Label gamePath_L; 197 | private System.Windows.Forms.Button gamePath_BTN; 198 | private System.Windows.Forms.Label port_L; 199 | private System.Windows.Forms.TextBox port_TB; 200 | private System.Windows.Forms.Button start_BTN; 201 | private System.Windows.Forms.Label folderPathName_L; 202 | private System.Windows.Forms.Label version_L; 203 | private System.Windows.Forms.Label localhostLink_L; 204 | private System.Windows.Forms.ToolTip gamePath_toolTip; 205 | } 206 | } 207 | 208 | -------------------------------------------------------------------------------- /MainPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Drawing; 4 | using System.IO; 5 | using System.Threading; 6 | using System.Windows.Forms; 7 | 8 | namespace UnityWebGl_LocalHoster 9 | { 10 | public partial class MainPage : Form 11 | { 12 | string processName; 13 | ComboBox version_CB; 14 | private string folderPath = ""; 15 | bool isStart = true; 16 | 17 | public MainPage() 18 | { 19 | InitializeComponent(); 20 | } 21 | private void MainPage_Load(object sender, EventArgs e) 22 | { 23 | // Creating and setting the properties of comboBox 24 | version_CB = new ComboBox(); 25 | version_CB.Location = new Point(231, 265); 26 | version_CB.Size = new Size(92, 22); 27 | version_CB.Name = "version_CB"; 28 | version_CB.DropDownStyle = ComboBoxStyle.DropDownList; 29 | 30 | //Get all unity versions 31 | string rootPath = @"C:\Program Files\Unity\Hub\Editor"; 32 | string[] dirs = Directory.GetDirectories(rootPath, "*", SearchOption.TopDirectoryOnly); 33 | 34 | foreach (string dir in dirs) 35 | { 36 | if(!Directory.Exists(dir + @"\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools")) 37 | { 38 | continue; 39 | } 40 | 41 | var version = dir.Remove(0, rootPath.Length + 1); 42 | version_CB.Items.Add(version); 43 | } 44 | 45 | // Adding this ComboBox to the form 46 | this.Controls.Add(version_CB); 47 | 48 | //tool tip 49 | gamePath_toolTip.SetToolTip(gamePath_L, "required | Choose your WebGl game folder"); 50 | gamePath_toolTip.SetToolTip(gamePath_BTN, "required | Choose your WebGl game folder"); 51 | gamePath_toolTip.SetToolTip(port_L, "optional | Port number by default is 8000"); 52 | gamePath_toolTip.SetToolTip(port_TB, "optional | Port number by default is 8000"); 53 | gamePath_toolTip.SetToolTip(version_L, "optional | unity webgl build version"); 54 | gamePath_toolTip.SetToolTip(version_CB, "optional | unity webgl build version"); 55 | } 56 | private void gamePath_BTN_Click(object sender, EventArgs e) 57 | { 58 | var dlg = new FolderPicker(); 59 | dlg.InputPath = @"C:\Users\"; 60 | if (dlg.ShowDialog(Handle) == true) 61 | { 62 | folderPath = dlg.ResultPath; 63 | folderPathName_L.Text = folderPath; 64 | folderPath = " \"" + folderPath + "\" "; 65 | } 66 | } 67 | 68 | private void start_BTN_Click(object sender, EventArgs e) 69 | { 70 | if (folderPathName_L.Text == "") 71 | { 72 | MessageBox.Show("No WebGl folder was selected!\nselect a folder and try again", "No folder selected", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); 73 | return; 74 | } 75 | 76 | isStart = !isStart; 77 | 78 | if (isStart) 79 | { 80 | start_BTN.Text = "start localhost"; 81 | localhostLink_L.Text = ""; 82 | StopHost(); 83 | return; 84 | } 85 | start_BTN.Text = "stop localhost"; 86 | 87 | string unityWebGlHosterPath; 88 | 89 | if (version_CB.Text == "") 90 | { 91 | unityWebGlHosterPath = "SimpleWebServer.exe"; 92 | } 93 | else 94 | { 95 | unityWebGlHosterPath = $"C:\\\"Program Files\"\\Unity\\Hub\\Editor\\{version_CB.Text}\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\SimpleWebServer.exe"; 96 | } 97 | 98 | var command = unityWebGlHosterPath + folderPath + GetPort(); 99 | 100 | Process process = new Process(); 101 | ProcessStartInfo startInfo = new ProcessStartInfo(); 102 | startInfo.WindowStyle = ProcessWindowStyle.Hidden; 103 | startInfo.FileName = "cmd.exe"; 104 | startInfo.Arguments = "/C " + command; 105 | process.StartInfo = startInfo; 106 | process.Start(); 107 | processName = process.ProcessName; 108 | 109 | //show localhost link 110 | localhostLink_L.Text = "http://localhost:" + port_TB.Text; 111 | localhostLink_L_Click(null, null); 112 | } 113 | private void localhostLink_L_Click(object sender, EventArgs e) 114 | { 115 | Process.Start(localhostLink_L.Text); 116 | } 117 | 118 | private string GetPort() 119 | { 120 | //Default port 8000 121 | //if no or wrong port provided 122 | if(int.TryParse(port_TB.Text, out var num)) 123 | return port_TB.Text; 124 | return "8000"; 125 | } 126 | 127 | private void MainPage_FormClosing(object sender, FormClosingEventArgs e) 128 | { 129 | StopHost(); 130 | } 131 | 132 | private void StopHost() 133 | { 134 | foreach (Process current in Process.GetProcessesByName(processName)) 135 | { 136 | current.Kill(); 137 | current.WaitForExit(); 138 | } 139 | foreach (Process current in Process.GetProcessesByName("SimpleWebServer")) 140 | { 141 | current.Kill(); 142 | current.WaitForExit(); 143 | } 144 | } 145 | 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace UnityWebGl_LocalHoster 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainPage()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("UnityWebGl_LocalHoster")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("UnityWebGl_LocalHoster")] 13 | [assembly: AssemblyCopyright("Copyright © 2022")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7dffa1f0-41c0-409a-9f6c-a17ebe15eabe")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace UnityWebGl_LocalHoster.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UnityWebGl_LocalHoster.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap background { 67 | get { 68 | object obj = ResourceManager.GetObject("background", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Assets\background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | 12 | namespace UnityWebGl_LocalHoster.Properties 13 | { 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 17 | { 18 | 19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 20 | 21 | public static Settings Default 22 | { 23 | get 24 | { 25 | return defaultInstance; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityWebGl_LocalHoster 2 | A windows application to host your WebGl build in localhost. 3 | -------------------------------------------------------------------------------- /UnityWebGl_LocalHoster.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE} 8 | WinExe 9 | UnityWebGl_LocalHoster 10 | UnityWebGl_LocalHoster 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | false 16 | C:\Users\hp\Downloads\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | true 27 | 0 28 | 1.0.0.%2a 29 | false 30 | true 31 | 32 | 33 | AnyCPU 34 | true 35 | full 36 | false 37 | bin\Debug\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | 42 | 43 | AnyCPU 44 | pdbonly 45 | true 46 | bin\Release\ 47 | TRACE 48 | prompt 49 | 4 50 | 51 | 52 | UnityWebGl_LocalHoster.Program 53 | 54 | 55 | icon_localhoster.ico 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Form 75 | 76 | 77 | MainPage.cs 78 | 79 | 80 | 81 | 82 | MainPage.cs 83 | 84 | 85 | ResXFileCodeGenerator 86 | Resources.Designer.cs 87 | Designer 88 | 89 | 90 | True 91 | Resources.resx 92 | True 93 | 94 | 95 | SettingsSingleFileGenerator 96 | Settings.Designer.cs 97 | 98 | 99 | True 100 | Settings.settings 101 | True 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | False 118 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29 119 | true 120 | 121 | 122 | False 123 | .NET Framework 3.5 SP1 124 | false 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /UnityWebGl_LocalHoster.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32106.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityWebGl_LocalHoster", "UnityWebGl_LocalHoster.csproj", "{7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7DFFA1F0-41C0-409A-9F6C-A17EBE15EABE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F6A47054-37BD-42A9-8E27-DFB680EB05EE} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/icon.ico -------------------------------------------------------------------------------- /icon_localhoster.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UUinc/UnityWebGl_LocalHoster/e60df7d4fef03cb8c743a69f39ab91f503ca72e1/icon_localhoster.ico --------------------------------------------------------------------------------