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

Pages: [1] 2
1
Support / Re: vertical progress bar
« on: January 18, 2014, 09:53:02 pm »
I was trying to think how to make a vertical progress bar, and thinking I was going to have to write my own, until I saw your simple obvious answer: rotate it.  Doh!  How did I not think of that! ;D


2
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: November 05, 2013, 06:23:35 pm »
Yes, that did it, thanks.

I had to drag the OldSansBlack text file into that sprite collection and commit it.  I had recently upgraded both tk2d and unity.

I still couldn't see anything, so I selected the text of the button and clicked the 1:1 button, and then I could see the text.

3
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: October 25, 2013, 09:04:36 pm »
Well, i'm seeing something now, but it ain't english!

Is that Atlas0 material correct, or shouldn't that be the font texture?
Right now I'm seeing weird shapes that are coming from that atlas0 material.


4
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: October 25, 2013, 04:45:52 pm »
Yes, it is orthographic.

Yes there is a text mesh under the button graphic:


Do I have to resize that too?

5
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: October 24, 2013, 06:15:11 pm »
Sure thing:

Here is the designer view with the button properties in the inspector:


Here is the camera setup:


Here is the game running, with the UI manager in the inspector:


Here is me clicking on the button, it responds to clicks and makes sound, i just can't see the text on the button


6
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: October 24, 2013, 01:58:29 am »
Hmmm... tried that.  Doesn't matter if Z is 2, 3, or 135 still no text.

I can interact with the button, it clicks and makes a noise and such, just no text.

I can't even see in the inspector where I change the text on the button!

7
Support / Re: How to add UI elements to existing tk2dcamera scene?
« on: October 23, 2013, 09:59:18 pm »
Thanks, I got the button part to show by doing the ppm to the sprite collection (and adjusting the Z to be within the range of my camera).  Now just the font on the button isn't showing.

Is that somewhere else?

8
Support / How to add UI elements to existing tk2dcamera scene?
« on: October 23, 2013, 08:01:43 pm »
I have a really simple scene with one sprite and one tk2dcamera (set to pixel meter of 1:1).
I am now trying to add a button to the screen.
The manual says to add the tk2duimanager to my tk2dcamera.  I did.
I run the game, I do not see my button.
I do see a UIManager objects while running the game and it has nothing attached for the camera field.

How do I get my button to show?

9
Support / Re: Help! I lost my text shader!
« on: July 30, 2013, 07:24:11 pm »
Thanks, got it.

For anyone else as dumb as me the answer is:
Base (RGB) Trans (A) is the text font "test_0"
Gradient (RGBA) is the coloring "grad"

10
Support / Re: Help! I lost my text shader!
« on: July 30, 2013, 03:05:50 am »
And the name of the texture would be... ????

I found a folder called demogradientfont with a grad texture.  I dragged that into Base and Gradient texture but it is all messed up multi colored blocks.


11
Support / Help! I lost my text shader!
« on: July 29, 2013, 11:17:01 pm »
I accidentally added a 2dtk text mesh to an object I didn't want it on. 
I then proceeded to remove the components, but hit Reset on the GradientFontMaterial instead of removing it.

Now my text mesh material is messed up whenever I try to add any text mesh, everything is just white.  Attached is a screenshot.

What do I set this too so I can see my fonts again?


12
Support / Re: A way to get current frame size?
« on: July 29, 2013, 11:10:27 pm »
Thanks! ;D

13
Support / A way to get current frame size?
« on: July 29, 2013, 10:42:45 pm »
I have two objects: a player and a door.  The player can be differently sized based on player type chosen.  I want to know the size difference between the player and the door at run time so I can do some appropriate calulations.

Is this even possible to get access to the current animation's current frame's source size?

My player object and door object have scales of 1,1,1 on an ortho camera so knowing the GO  size doesn't help me.





14
Support / Re: Sprite Collision Detection without physics?
« on: July 06, 2013, 02:38:58 am »
Where is the big tutorial?  I've looked around the documentation and haven't seen one.

15
Support / Sprite Collision Detection without physics?
« on: July 05, 2013, 07:56:58 pm »
Hi,

I have a point and click adventure game.  I have a main character and some doors on the screen.
I want to know when the character "collides" with a door object so I can programatically do something.

I added a "Box Trimmed" collider to the door object.  Under sprite settings put collider depth to 1.
I added a "Box Trimmed" collider to my player object.  Under sprite settings put collider depth to 1.
All objects have 0 z position.

In the editor, both objects have box colliders with a Z size of 2 with a nice green outline on them.
I turned on Is Trigger

In my player object script I added:
void OnTriggerEnter(Collider other)
   {
      Debug.Log("OnTriggerEnter " + other.name);
   }

I move my player through Transform.position updates in a coroutine.  No physics/forces/etc.

The trigger is never called. My character can walk all over the door object.

Am I missing something?  Do I have to use rigid bodies for colliders to work?

Edit:
After trying many things (raycasting) I added rigid bodies to my door and player objects. 
At first they started falling (which I don't want), then I discovered IsKinematic = false which tells the physics engine not to touch my object.  Now I have my triggers working with the colliders without physics, which is what I was trying to do.

It sure would have been great if:
a) The 2d toolkit documentation/tutorial had told me I had to add a rigid body to my sprite that I added a box collider too
b) The 2d toolkit when adding a box colllider saw I didn't have a rigid body and added it for me. 

Maybe every other unity developer knows to do this, but I didn't.  :'(

Pages: [1] 2