Показать сообщение отдельно
Старый 15.01.2015, 00:44   #5
pax
Unity/C# кодер
 
Аватар для pax
 
Регистрация: 03.10.2005
Адрес: Россия, Рязань
Сообщений: 7,568
Написано 3,006 полезных сообщений
(для 5,323 пользователей)
Ответ: скачать файл в js и преобразовать в base64

Смысл в том, что у WebPlayer'a есть так называемый Security Sandbox. Загружая и отображая на экране текстуру, с не разрешенного места происходит блокировака чтения данных с экрана или рендертекстур. В результате скриншот не сделать.

http://docs.unity3d.com/Manual/SecuritySandbox.html

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)
__________________
Blitz3d to Unity Wiki
(Offline)
 
Ответить с цитированием