How to embed a unity game build of Webgl into Asp.net Core pages?
Why can’t you input Chinese ,
index.html paste in index.cshtml
copy file to wwwroot
take care MIME
add these in Configure of startup.cs
var provider = new FileExtensionContentTypeProvider();
// Add new mappings
provider.Mappings[“.unityweb”] = “application/unityweb”;
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), “wwwroot”)),
//RequestPath = “/StaticContentDir”,
ContentTypeProvider = provider
});
1 Like
Tried this for an ASP.NET MVC project, is there any additional steps that need to be taken?