How to create a file (png) using Unity Flash?

Hi,

I am trying to develop the flash version of my iOS/Android game. On the mobile versions, I just create a file using System.IO.File.Create but it doesn’t seem to be supported in Unity Flash.

I found out that it was possible to link C# code and Actionscript code, so I wanted to try that. However, I didn’t find any way to create and save a file in Actionscript (without using Air and flash.filesystem). So I wanted if there was any way to do what I want for the flash version of my game, or I should just give up and remove this feature from the flash version?

Thanks

In any flash application you don’t have any access to the users filesystem except cookies and flash browser objects. The AIR platform is not the flash player. The flashplayer as well as the UnityWebplayer doesn’t allow any fileaccess since this would be a huge security issue.

The only alternative is to send the file to your webserver and start a regular download from your server. I’m not sure if this works in a Flash build.