zoukankan      html  css  js  c++  java
  • SecurityException: No read access to the texture data. Unity WWW

    Exceptions

    In order to find the right balance between protecting Web Player users and making life of content developers easy, we have implemented an exception to the security mechanism described above:

    You are allowed to download images from servers that do not have a crossdomain.xml file. However, the only thing you are allowed to do with these images is use them as textures in your scene. You are not allowed to use GetPixel() on them. You are also not allowed to read back from the screen. Both attempts will result in a SecurityException being thrown:

    SecurityException: No read access to the texture data: 
      at (wrapper managed-to-native) UnityEngine.Texture2D:GetPixel (int,int)
    

    The reasoning is here is that it's okay to download the image, as long as the content developer gets no access to it. So you can display it to the user, but you cannot send the bytes of the image back to some other server. If you need access to the pixel data then place an crossdomain.xml file on the server where the images are fetched from.

    本博客所有博文,若无专门说明皆为原创,转载请注明作者和出处!
  • 相关阅读:
    webpack loader和插件的编写原理
    vue和react原理性知识点
    详谈Javascript类与继承
    vue项目中要实现展示markdown文件[转载]
    前端知识总结--2 js部分
    前端知识总结--html
    react相关知识点总结
    优秀文章
    项目部署服务器2
    项目部署服务器
  • 原文地址:https://www.cnblogs.com/ifinver/p/3327240.html
Copyright © 2011-2022 走看看