Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by zia_kayani · Jun 04, 2014 at 04:34 AM · webplayervisualstudiodeployment

Embed .Unity3D file in MVC4 Applicatin in Visual Studio, ASP.NET

Hi, When I built my project as Web Application, it gives two files one is .html and other is .unity3D I open the .html file and can see my running application, I've to use this in my site, So for checking purposes, I created simple WEB Application in Visual Studio 2012 and add both files in that project, Also add MIME type in .config file, it works fine.

Now I've to add these files in my MVC4 (actual) Application. I've replaced the contents of index.cshtml by the contents of .html provided by unity3D, and place that .unity3D file in same directory, i.e. VIEW but it shows download error of data file... MIME type is also set but same ERROR ... :( kindly help me

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by johandanforth · Oct 29, 2015 at 11:31 AM

Not sure what got wrong for you, because it all worked at once for me.

  1. Create new ASP.MVC website

  2. Build your Unity Project, and Point at the same directory as your website root, so that the files and up in the root of your MVC Project

  3. Now include all the generated files into your Project

  4. Open up web.config and add these lines somewere inside the section:

'

 <system.webServer>
   <staticContent>
     <mimeMap fileExtension=".unity3d" mimeType="application/vnd.unity" />
   </staticContent>
 </system.webServer>
   
  1. Add a link to the .html file with the player and you should now be able to run the game perfectly inside your Project.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Missing Unity Installation Components: WebPlayer , StandardAssets , VisualStudio 2 Answers

Unity WebPlayer deployment? 0 Answers

Web-server configuration to correctly serve Unity webplayers 4 Answers

How can I resolve System.MethodAccessException: Attempt to access a private/protected method failed. in Unity WebPlayer Deployment? 1 Answer

unity web hosting 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges