Problem with Application.dataPath?

Hey folks,

I’m running a web player locally and I’m having some issues with Application.dataPath.

On most of my machines it returns the proper value: “file:///C:/Program Files/Project/contents/app/unityfile.unity3d”, but on some Windows XP machines it is returning “file:/” (on some XP machines it is fine)

Has anyone else experienced this problem? Does anyone have any ideas for a solution?

Thanks,
Jared

The machines that it is not working right on, make sure they have framework 2.0 installed and not just 1.1, see if that helps.

Thanks for the idea.

I checked out the machine and it seems to have .NET Framework 3.5 installed.

I tried putting the same content up on a web server and Application.dataPath seems to work correctly. So, it must have something to do with running it locally, but I’m not sure what.

Could be many things, add a debug scene to your program that shows the datapath and stats for the machine with issues, if the Application.dataPath is null or empty, then something within Unity either did not deploy or is blocked by system security settings. I am not sure that the Unity devs could chime in with any scenario where the path does not exist or is a bug. This sounds to me like some security bug to me.