Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - aaron7090

Pages: [1]
1
Showcase / Re: Dungelot 2 [iOS]
« on: July 01, 2014, 06:01:30 am »
Great game! did you use 2dtoolkit alone or other tools as well?

2
Oh okay.

I'm testing on a 800x480 resolution in unity using a image that is 300x200. That looks fine but on some devices the resolution is 1280x720 and the 300x200 image is too small. This 300x200 graphic is centered on the screen.

What's the best thing to do in this case? Should I just show/hided the appropriate sized graphic?

3
OK so this works the graphic changes but I think there is an issue?

I have a graphic that is 100x100 which is the 1x graphic.

Then I have the 200x200 which is the 2x graphic.  The graphic switches between the 1x/2x graphics fine but the issue is that the 2x graphic isn't any bigger even when I test in unity with the preferences. It seems to replace the 1x graphic but keep its small size.

I am using the tk2dsprite script for that gameobject.

4
Ah that was it, thanks!

5
Doesn't seem to be just an editor issue. I put the build onto the phone and the 4x graphic only appears if the scene before it has the setPlatform code run. I'm just going to throw a dummy screen at the start to set the platform.

6
The preference's platform switcher is showing the correct sprite for 1x, 2x and 4x. SetPlatform is running first under script execution order.

edit: ok it looks fine if I have a scene before with the setPlatform script and then navigates to the second scene with the 2x graphic.. there must be a better way of doing it?

7
I restarted Unity3D now it shows the 1x graphic by default. The script that I'm using that I've thrown on the tk2dUIManager doesn't seem to do anything:

Code: [Select]
using UnityEngine;
using System.Collections;

public class SetPlatform: MonoBehaviour {

void Start ()
        {
            tk2dSystem.CurrentPlatform = "2x";
}

}

8
Sorry if this is a incorrect answer but wouldn't the solution for this be something like:

http://docs.unity3d.com/Documentation/ScriptReference/Screen-dpi.html

// random numbers, these arent realistic numbers i just made them up
const float HIGH_DPI = 100;
const float ULTRAHIGH_DPI = 150;

if  (Screen.DPI > ULTRAHIGH_DPI)
{
 tk2dSystem.CurrentPlatform = "4x";
}
else if (Screen.DPI > HIGH_DPI)
{
 tk2dSystem.CurrentPlatform = "2x";
} else
{
 tk2dSystem.CurrentPlatform = "1x";
}


I'm trying to do something like this in my current project but from testing this line of code doesn't do anything(I've set up the files and folders correctly and the 2x image is showing up in the editor by default - the 2x image only showed up in the editor after I compiled for android, seems like a weird bug?):

 tk2dSystem.CurrentPlatform = "2x";

9
Support / Re: center sprite
« on: November 05, 2013, 04:12:39 am »
it worked, thanks!  :D

10
Support / center sprite
« on: November 04, 2013, 01:17:31 am »
Is it possible to center a button or sprite inside a uilayout with no code? Also if this is possible is it possible to center + offset?

11
Releases / Re: 2D Toolkit 2.1 beta 1
« on: July 07, 2013, 11:02:15 pm »
There is a bug with tk2dTextMesh.Commit(); the first time it works the second time the tk2dTextMesh.Commit(); renders nothing. Only noticed this issue when I tested on a android device.

Pages: [1]