Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iOS 7.1.0, BitmapData.draw

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
545 Views, 11 Replies

iOS 7.1.0, BitmapData.draw

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?

11 REPLIES 11
Message 2 of 12
RichMC
in reply to: Anonymous

Greetings lightstriker. I have forwarded this post to development. Please provide any additional details that might aid us in solving the problem.

Richard Mc
Autodesk Gameware
Scaleform Division
Message 3 of 12
RichMC
in reply to: Anonymous

From Scaleform\Unity Develpment:
 
If nothing else changed in between (SF Plugin/Unity 4.5.2), then this sounds like a driver issue introduced in iOS 7.1.0.
Depending upon when you plan to release the product, the number will likely only fall from its current adoption in favor of newer iOS updates (and later, iOS 8).
 
Richard Mc
Autodesk Gameware
Scaleform Division
Message 4 of 12
Anonymous
in reply to: RichMC

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.

Message 5 of 12
Anonymous
in reply to: Anonymous

This issue is very blocking.

 

We still haven't found a fix or a workaround.

Message 6 of 12
Anonymous
in reply to: Anonymous

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?

Message 7 of 12
RichMC
in reply to: Anonymous

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.

Richard Mc
Autodesk Gameware
Scaleform Division
Message 8 of 12
adam.petrone
in reply to: RichMC

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

Message 9 of 12
Anonymous
in reply to: adam.petrone

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 ":".

Message 10 of 12
Anonymous
in reply to: Anonymous

Still horribly stuck. How do people build shops in Scaleform?! Do all their icons has to be in the SWF?
Message 11 of 12
Anonymous
in reply to: Anonymous

We updated to the latest (July) version of Scaleform, and the issue appeared fixed on iOS 7.1.1... at least on one device. We will test other os version and other device to verify this.
Message 12 of 12
Anonymous
in reply to: Anonymous

Nevermind. Reproduced on iPad Air 7.1.1

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report