We transfer a texture from Unity to Scaleform using ReplaceTexture, to a symbol outside the screen named "buffer". Once received, we do a BitmapData.draw of this symbol to copy the bitmap to another symbol, so the buffer can be reused. We build a collection of icons of a shop this way.
On this specific iOS version (7.1.0), the BitmapData.draw method appear to be broken, rendering any kind of random part of any symbol on screen to the target bitmapdata. Sometimes it has parts of the buffer in it, sometimes it does not.
iOS 7.0 works well. Android also appear to work well. From our test, 7.1.2 also appear to work properly.
Is there anything we can do to fix the issue on 7.1.0 or is it a lost cause and we should just assume the player will have a broken shop on this specific iOS version?
Greetings lightstriker. I have forwarded this post to development. Please provide any additional details that might aid us in solving the problem.
Sorry, I was given false information. The issue is SINCE 7.1.0. It also occurs on 7.1.1 and 7.1.2.
So no, we can't go on with releasing any on iOS for now.
Nothing changed in Unity (we are on 4.3.4) and Scaleform (we use March? build).
The only difference is iOS. 7.0 works, 7.1+ doesn't.
Sorry for bumping this thread, but currently, this is a game breaker on iOS 7.1+
Is there any way to have some kind of direct communication?
Bump away, this is the only way we know that you havent resolved the issue on your own yet as we try to duplicate and solve the problem.
We are still working on it.
Hello,
Do you have a small repro case which clearly identifies the problem?
In the past, BitmapData has been rather finicky. It's very possible Apple either introduced a bug, or fixed a previous bug that was being worked around to achieve the desired result.
Thanks,
Adam
Frankly, we didn't check if it was "only" BitmapData.draw, or it was the mix of doing a BitmapData.Draw on a ReplaceTexture symbol.
It should be very simple to reproduce, since our code is also horribly simple.
In Unity we do;
BSFManager.Instance.SFMgr.ReplaceTexture(BSFManager.Instance.GetID(), "IconBuffer", texture);
"BSFManager" being a class that derive from "Movie" and is the representation of the SWF that hold all our ActionScript. In this SWF, we have a symbol named IconBuffer that we use for the task of the ReplaceTexture.
This is our "buffer" on the ActionScript:
public class BSFManager extends MovieClip { [Embed(source="../../../../../fla/IconBuffer.swf", symbol="IconBuffer")] public static var IconBuffer:Class;
It is added to the main stage like this;
public static function CreateBuffers():void { iconBuffer = new IconBuffer(); iconBuffer.name = "IconBuffer"; iconBuffer.x = -1024; iconBuffer.y = -1024; mainStage.addChild(iconBuffer);
Once the ReplaceTexture happened and we sent over the information related to our shop item, we do this;
var data : BitmapData = new BitmapData(128, 128, true, 0x00000000); data.draw(BSFManager.iconBuffer, new Matrix(), new ColorTransform(), "normal", new Rectangle(0, 0, 128, 128), false); var bitmap:Bitmap = new Bitmap(data); bitmap.scaleY = -1; bitmap.y = 128; shopItemInstance.addIcon(bitmap);
It creates a copy - by rendering - of the buffer towards a new BitmapData, which we assign to our shop item.
Again, this works just fine on almost every platform we tried. iOS 7.1.0+ appears to be an exception.
EDIT: **** it, for some reason, on the last snippet of code, the forum doesn't like one ":" and keeps replacing it with ":".