Unity file won't load in CodeIgniter [SOLVED]


I’m a web developer and don’t know unity.

But for a school assignment my colleague student’s had to make a unity game. Unity Web Player | LodeRunner

But when I want to insert this game (a html file and a unity3D file) into CodeIgniter it won’t work.
Even if I paste his two files into CodeIgniter that also won’t work.

I get the following view : Unity - Imgur

And when I look at my inspect element console I get the following errors :

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/verkeersland/CodeIgniter/street/frogger1.unity3d

Failed to load resource: The requested URL was not found on this server.

Does anybody knows what I am doing wrong?

Thanks :wink:

Looks as though CodeIgniter doesn’t know that a unity3d file is something it’s meant to serve. Although it’s conceptually simple to think of a web server as something that throws whatever file you ask for at you, in reality, they need to be configured carefully. Perhaps find a CodeIgniter forum and ask for help how to configure it.

(The way you check that this is actually the problem is to enter your URL to the unity3d file into your browser. If the browser gets a 404, it means the web server has said that that resource doesn’t exist. This will show that the problem is a config one, and not related to Unity.)

Found the answer myself!

I placed the unity file in the view folder of CodeIgniter.

But you have to place the unity file in the public folder of CodeIgniter (where you place your images, css, js, …).

Otherwise CodeIgniter thinks your unity file is a view!