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.


Topics - griden

Pages: [1]
1
Support / Changing sprite makes the object overlap particle systems
« on: May 17, 2014, 11:30:41 pm »
If I change the sprite of an object with SetSprite(id), that object somehow starts to ignore the sortingOrder and overlaps objects it's not supposed to (particles in this case).

I do set its proper sortingLayer and sortingOrder AFTER the sprite switch (just to be sure) and I check if all values are correct.
And yes, if I don't change the sprite, everything behaves as expected.
The particle systems have higher sortingLayer and are way closer to the camera.

Any advice would be appreciated, thanks!

2
Support / Setting TextMesh's text makes it disappear
« on: April 07, 2014, 11:53:47 pm »
UPDATE: It's resolved. It doesn't seem to work properly if the text mesh is set to update its text upon global events. But it works if you directly modify the text from another object, without sending an event.

So I decided to give Playmaker a shot and i'm trying to change the text of a tk2dTextMesh in runtime, using a "tk2d Text Mesh Set Text" action. But it works ONLY if I check "Everyframe", otherwise the text simply disappears.

Not changing anything else (color, scale, etc) than the text. And I've checked "Commit".

I've used the same action to set the initial values without problem, so I'm sort of confused about what's happening...


3
Support / ParticleSystem textures into a Sprite Collection
« on: March 24, 2014, 12:32:50 pm »
Hello,

I'm looking for a way to reduce the "explosion" of extra draw calls whenever a particle system is played. So I've figured if I could pack all particle textures into a sprite collection, that could help. But unfortunately I don't see a way to set the particle system to get its texture from the sprite collection. Is it possible to use 2D Toolkit's powers to my advantage in this case?

4
Support / Can't make UIItem events to fire my code
« on: February 06, 2014, 11:24:43 am »
So I have a regular button (from the demo prefab) and attached the following custom script to it:

Code: [Select]

        private tk2dUIItem uiItem;

void Start () {
uiItem = GetComponent<tk2dUIItem>();
}

void OnEnable()
{
uiItem.OnDown += ButtonDown;
}

void ButtonDown()
{
Debug.Log("Button Down!");
}

... And clicking it doesn't do anything. The collider is ok, and the tk2dCamera has a tk2dUICamera component attached. What am I missing is the question? :) Thanks.

5
Support / How to get standard Input touches for UIItem's?
« on: January 25, 2014, 06:50:03 pm »
So I want to control the game character's movement with a simple two-directional pad - just two onscreen arrow elements/buttons next to each other. Tried the demo UI button examples, but the available events don't satisfy my needs unfortunately. The user should be able to slide between the two sprites without lifting her finger and the OnDown event doesn't get fired in this case. Also, it's a one time event and I need to execute some code for as long as the screen is being touched.

It would be enough if I can just get the standard unity Input touches (http://docs.unity3d.com/Documentation/ScriptReference/Input.GetTouch.html) that are applied over the sprite colliders (or just the sprites), so if you could give me some directions how to do that, I should be ok. Of course, any alternative ideas are welcome. Thanks.

PS: I saw the regular way to create such control element in Unity is by using GUITexture, but was wondering If I can utilise some of the TK2D features instead..

6
Support / After I updated Unity to 4.3 and 2D Toolkit to 2.3...
« on: November 13, 2013, 11:22:49 am »
Hello,

Probably I've messed up something but after updating both Unity and 2D Toolkit my project doesn't look like a 2d TK project at all  :o These are the symptoms:

  • All 2D Toolkit scripts that are attached to prefabs and objects display this: "The associated script cannot be loaded. Please fix any compile errors and assign a valid script."
  • Doesn't display any of the 2D Toolkit features that were previously built into the Unity menu - Create a Sprite, Create Sprite Collections, etc.

To update 2D TK I just opened the asset store window from within Unity and clicked Update, then Import.

Thanks in advance!

Pages: [1]