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

Pages: [1]
1
Showcase / Fast-paced, skill-based sidescroller for iOS
« on: December 11, 2012, 04:23:22 pm »
Hi Guys,

We just released Wacky Dragons, it was our first time using Unity for game development and 2DToolKit has been a major player in making our game possible!

There are 3 different dragons with unique abilities that help them on their way and the game is all about getting a highscore.
We optimized it for all resolutions and devices and this was really a challenge, but we actually ended up pulling it off :)

We would really like to hear from all you fellow developers what you think of the game, and let us know if you have any questions with regard to how we used 2DToolkit :)

Oh, and let us know how high you get on the leaderboards! ;)

Sincerely
Peter
Pixeleap

2
Support / Re: Taking a picture and adding it as a texture to a tk2dsprite
« on: October 16, 2012, 10:52:08 am »
Hi Unikron,

Thanks for the help, this might be a silly question, but how will I go about registering my product?

Peter

3
Support / Taking a picture and adding it as a texture to a tk2dsprite
« on: October 14, 2012, 02:14:54 pm »
Hi guys,

I recently started working with 2DToolkit and it is great! :)

Right now I am working on a game that utilizes the camera on the iPad and I would like to be able to at runtime, to take a picture and then add a small version as a thumbnail on a sprite.

What I am doing right now is I have four sprites loaded in with a placeholder texture on, and then as I take a picture I would like to replace that placeholder with the picture that I take. The picture that I take is in 600x600 resolution and the thumbnails is in 100x100 resolution.

The problem that I am facing right now is that when I chance the texture of the tk2dsprite at runtime it becomes stretches and blurry and doesn't fit.
The wierd thing is, if I use a normal unity plane the picture will resize perfectly to fit, but I would like to use the tk2dsprite, because I am in need of some of the functionality.

So my question is: How do I change the texture of a tk2dsprite at runtime and make sure that texture resizes to fit?

Here is the code where I change it:

Code: [Select]
thumbnailBoxes[currentActiveThumbnail].gameObject.renderer.material.mainTexture = frontCamTex;
Where ThumbnailBoxes is an array of 4 tk2dsprites.
I have also tried to change the texture using this command: sprite.GetCurrentSpriteDef().material.mainTexture
but that is giving me the same result as the other.

Hope my question is clear and that there is a solution :)

Thank you in advance
Peter

Pages: [1]