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 - AbsurdInteractive

Pages: [1] 2
We have this tk2dAnimationAdapter script on a Sprite in our scene, and when we run it on iOS and  look at the profiler it says this script takes up 25% of the game loop. IS there something we're doing wrong with this script? I thought it was just to modify animation color of sprites and text in Unity animations.

Any idea if Unity fixed this, or if there's a better solution for this problem?

Was just wondering if you had a chance to look at the Repro?

Here you go. Here's the repro. Just open the scene textMeshRepro. I imported 2DToolkit 2.4.0. As per common sense I did NOT include your 2DToolkit plugin in the repro package. My default camera size was 640 by 960, and I had iOS, build, but that did not affect anything as the problem seems to be in all the build types.

My Unity sprites are using the Default-Sprite shader for sprites, and my tk2dtextmesh is using the BlendVertexColor shader that comes with 2D Toolkit. I'll try to make a UnityPackage for you.

Ok, so I had the tk2dtextmesh on the Default SortingLayer with OrderInLayer to 1. I had other Unity sprites behind the tk2dtextmesh. The sprites were in SortingLayer Default and had OrderInLayer 0.

Then I changed the SortingLayer for the tk2dtextmesh to the SortingLayer that is in front of the Default, which for me is Foreground SortingLayer with OrderInLayer as 1. The tk2dtextmesh did not show up again. But when I kept the tk2dtextmesh's SortingLater to Foreground, and then changed the OrderInLayer to 0, then the tk2dtextmesh showed up in front of the sprites.

I'm using Unity 4.3.4f1 with 2DToolkit 2.4.0.

We have our Camera set at z Position 0 and all of our sprites and meshes within our game set at z Position 0 as well. The camera is orthographic and has a Near Plane of 0, and a Far Plane of 10. So far we've had no issues displaying anything in our 2D game by using SortingLayers.

Just today we noticed when we created a tk2dTextMesh at z Position 0, that the tk2dTextMesh was not showing up in the Game View despite the SortingLayer being setup in front of all our sprites. It did show up in our Scene View correctly though. After tweaking many different things, the only way I could get the tk2dTextMesh to show in the Game View was to actually change my Game View camera's Near Plane to -1 to display the tk2dTextMesh. So I was wondering how is the tk2dTextMesh being rendered differently from the rest of the meshes because that is the only 2D Toolkit object that seems to have this issue.

Also, is there a file I should look in to possibly see if I can try to fix this issue?

Releases / Re: 2D Toolkit 2.4.0
« on: March 17, 2014, 09:29:18 pm »
My guess would be that it would save processing time to use the 2D raycasting? Or not necessarily?

Releases / Re: 2D Toolkit 2.4.0
« on: March 17, 2014, 07:39:06 pm »
Was just wondering how the 2D Raycast option works for the UI? Or when would we want to do the 2D raycast instead of 3D?

Support / Re: Unity 4.3 sorting layers
« on: February 01, 2014, 12:09:52 am »
It seems the issue is that in Unity, when SortingLayerName is set to Default, instead of the SortingLayerName string on the renderer being set to the direct string "Default", it is set to the string "", which must mean somewhere Unity is wiping the string when we do this. So I modified tk2dEditorUtility, which seems to work for now. Here's what I did.

Code: [Select]
public static string SortingLayerNamePopup( string label, string value ) {
string[] names = GetSortingLayerNames();

               //BEGIN MY MODIFIED CODE
               //If value is not in the array set it to Default
int hasValueInArray = Array.IndexOf(names, value);
if(hasValueInArray == -1)
value = "Default";
                //END MY MODIFIED CODE

if (names.Length == 0) {
return EditorGUILayout.TextField(label, value);
else {
int sel = 0;
for (int i = 0; i < names.Length; ++i) {
if (names[i] == value) {
sel = i;
sel = EditorGUILayout.Popup(label, sel, names);
return names[sel];

It's a bit hacky, but it seems to do the trick until a better solution is made.

Support / Re: Unity 4.3 sorting layers
« on: January 31, 2014, 11:36:43 pm »
BTW: beyond the mentioned issue that I can't assign a tk2d-sprite to the "Default" layer (which would mean to set the renderers sortingLayerName property to null, but clicking on "Default" switches to the first entry only and does not stick to "Default"), it seems that the setting for the t2kdSprite layer assignment is not stable. Once I change the sorting layer setup (adding or deleting sorting layers), the layer assignment for the existing sprites change even if the initially set layer still exists.

Was this issue fixed? This is causing an issue with our main character and other sprites, as we need the main character on the Default Sorting Layer?

Releases / Re: 2D Toolkit 2.3.3
« on: December 20, 2013, 04:41:27 am »
I believe you mentioned this somewhere else, but I wanted to confirm with you. For the 2D Toolkit UI, you're still sticking with 3D UI elements to detect button presses, correct? Will you update this at a later date if so?

Releases / Re: 2D Toolkit 2.3 beta 1
« on: November 10, 2013, 07:09:58 pm »
I don't suppose the  Lists & snapping to list items" will be implemented anytime soon? This would be really helpful for UI on mobile devices. Otherwise, I'd have to get another UI toolkit, which I'd prefer not to since 2D Toolkit is so fantastic.

Support / Re: How to import a .tmx file??
« on: August 27, 2013, 10:24:44 pm »
I was using the latest 2.1 2D Toolkit and followed the TileMap tutorial on the website. I created the TileMapTutorial Spritesheet. Next, I used the Tiled app to design my level in 2D and export the level in .tmx format. When I now click on Import TMX, the tile id's seem to be incorrect, even though I used the same original spritesheet for both. I was wondering if you had any suggestions on how to get this to work, or how to change tile id numbers?

Pages: [1] 2