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 aharris · May 29, 2015 at 12:52 PM · windows store apppermissionsbundles

Windows store app doesn't have permissions to access bundle?

Hi all, I am working on a windows store app intended to be side loaded onto a surface. I have started attempting to use bundles with the application and all works well in the unity editor, but when I build the project out to a windows store app and try to debug through visual studio, the app can't seen to access the bundles due to a permissions error.

Here is the code that the app is using to access the bundle: using UnityEngine; using System.Collections;

 public class SimpleLevelLoader : MonoBehaviour {
 
     [SerializeField] string path;
     [SerializeField] string sceneName;
 
     IEnumerator Start () 
     {
         using (WWW www = WWW.LoadFromCacheOrDownload(path, 0)) 
         {
             yield return www;
             if(!string.IsNullOrEmpty(www.error))
             {
                 Debug.Log (www.error);
                 yield break;
             }
 
             Application.LoadLevel(sceneName);
             yield return null;
 
             www.assetBundle.Unload(false);
         }
     }
 }

This is the example code from the unity 5 bundles training and it works fine in the editor. I am passing in an absolute file path for now, just as a test to see if I could get it working. When I try to load the bundle in the windows app while running/debugging in visual studio, I get the following error:

First-chance exception at 0x76DA4598 in Template.exe: Microsoft C++ exception: Concurrency::invalid_operation at memory location 0x0975F354. Error while opening 'file://C:\Users\aharris\Desktop\Spike Projects\Unity AssetBundle Test\Bundles\PC\mytestbundle' - Operation has failed with error 0x80070005: Access is denied.

Do I need to specify some permissions in the app or is there a special folder in the project I need to but the bundle?

I have tried putting the bundle in the built app's Data and Assets folders in the built app's project folder thinking it would have access, but to no avail.

Thanks

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 aharris · Jun 03, 2015 at 05:27 AM

I found what the issue was, apparently the built app's Data and Assets folders are not the place for the bundles. Through some debugging, I found that after running in Visual Studio it builds a bin with a separate data folder. Using Application.DataPath showed me the correct directory to put it in, at least for the purposes of running it in VS. Thanks

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

2 People are following this question.

avatar image avatar image

Related Questions

Which BuildTarget should use for creating UWP bundles? 0 Answers

Monodevelop-Unity on OSX still requires admin rights to run. 4 Answers

Unity 5.1 adds permission READ_PHONE_STATE automatically 1 Answer

read phone status and identity - after adding facebook SDK 0 Answers

Android Permissions API Version 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