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

Pages: 1 ... 446 447 [448] 449 450
6706
Support / Re: tk2DAnimatedSprite.color in OnEnable()
« on: January 31, 2012, 10:15:55 pm »
What version of 2D Toolkit are you running? I just tested this on 1.55 and it seems to work fine, and change color, when called from both Awake and OnEnable.

If you're on 1.55, could you try changing the script execution order so the tk2d ones happen before everything else, especially the one which is causing the issue.

Hope that helps.
Cheers,
unikron

6707
Support / Re: Scripting Refnrence
« on: January 30, 2012, 10:55:51 pm »
I am currently in the process of revamping docs (doxygen) and documenting all the newer features on the wiki. The current API docs are quite lacking - it was OK in the first few versions as the API itself was fairly limited, but it has now expanded quite a bit. It shouldn't be too long now.


6708
Support / Re: Layer / Z-Order?
« on: January 30, 2012, 10:51:39 pm »
Assuming you're using an ortho camera, the z-distance to the camera dictates the z-order. The smaller the z value, the closer it is to the camera.

6709
Support / MOVED: [Solved] How to swap "Anim Lib"
« on: January 29, 2012, 12:22:32 am »

6710
Support / Re: tk2dButton removes tk2dSprite
« on: January 28, 2012, 11:35:56 pm »
This sounds like the button up sprite is incorrect - could you check if the button reappears when you click down on it again (while being held down). also, at which point does it disappear, is it when as soon as it registers a click?

6711
Support / Re: Bug in 1.55
« on: January 28, 2012, 11:31:26 pm »
Ok, now that we know it works properly in a standard project, we need to try and find out why this is happening in your other project. Could you check and make sure all your sprite collections are built properly. This could possibly be caused by one of your sprite collections getting broken for some reason or other.

The next thing to test is, in the project where its broken, simply load the first demo, and check if it works there, and then the multi atlas demo and test it there.

Finally, delete the -tk2d file in the root of the project to make sure it reloads it.

Let me know how it goes...

6712
Support / Re: Dynamic Asset Loading and code wise manipulation
« on: January 27, 2012, 08:09:47 pm »
When you moved the object, I am assuming you did it in the Unity Editor and not in explorer / finder? One more thing to check is that the Sprite Collection still links to the Data object, you can verify this by checking the "Sprite Collection" property.

What version of 2D Toolkit are you using, and in which version of Unity?

In any case, I've attached something to test this - it works fine on mine, and could also serve as a demo to others. Let me know how it goes...

6713
Support / Re: Bug in 1.55
« on: January 27, 2012, 06:43:34 pm »
I'm testing the package which was submitted to the asset store in 3.5 RC1, and everything seems to work properly. Could you test it in an empty project, please, just to rule out something possibly not importing correctly in your install.

6714
Support / Re: Dealing with pixel dimensions?
« on: January 27, 2012, 06:41:08 pm »
Unity has convenience functions to do these unit conversions. The two you'll need are:

camera.WorldToScreenPoint
and
camera.ScreenToWorldPoint

You can use this to calculate differences in position (eg. widths & heights) too. Make sure you pass correct z values in for this to work with a perspective camera. With an ortho camera, things are much much simpler - you simply do camera.WorldToScreenPoint(new Vector3(1,1,1)) and that gives you a conversion constant you can use to convert from world to screen space.

6715
Support / Re: Dynamic Asset Loading and code wise manipulation
« on: January 26, 2012, 11:17:11 pm »
Hi there.

You should be able to load content dynamically with no problem. I'll list the steps for a Sprite Collection, but the same concept applies to Sprite Animations too.

1. Find the data block of your sprite collection, by clicking on your Sprite Collection, and double clicking on the "Sprite Collection" field in the inspector. By default this is named "data".

2. Rename this to something sensible. This is the name you'll use to load the asset in game, so please ensure that it is unique.

3. Create a folder called "resources" in the same directory, or wherever you want, and drag this asset into that folder.

3. Load the sprite collection by doing the following:
Code: [Select]
sprite = GetComponent<tk2dSprite>();
sprite.collection = Resources.Load ("human", typeof(tk2dSpriteCollectionData)) as tk2dSpriteCollectionData;
sprite.spriteId = sprite.GetSpriteIdByName("nameofsprite");



If you need to create a sprite programmatically, all you need to do is:
Code: [Select]
GameObject go = new GameObject();
tk2dSprite sprite = go.AddComponent<tk2dSprite>();
sprite.SwitchCollectionAndSprite(spriteCollectionData, 0);
sprite.Build();

Hope that helps, and feel free to ask if you have any other questions.

6716
Support / Re: Game View cropping top and bottom
« on: January 26, 2012, 09:48:58 pm »
Hi Goom! Thanks for posting here.

I believe this is a bug (or "feature", I'm not sure) in Unity. This happens when you set the resolution to "iPad Wide (1024x768)", and the window can't display 1024x768 pixels. What this happens, Unity will start compressing the viewport vertically, which results in gaps appearing.

If your display is unable to display the window in that resolution, simply set the game window to "iPad Wide (4:3)" instead of the explicit resolution. The issue doesn't occur when running in this mode.

6717
FAQs / Register your copy and get download access.
« on: January 26, 2012, 07:58:04 pm »
Register your copy of 2D Toolkit to get download access, and access to the private support forum.

Please follow these steps:
1. Click on Profile
2. Select Modify Profile > Group Membership
3. Request membership of the 2D Toolkit group, and in the next page, enter your asset store invoice number in the "Please give a reason for joining this group:" text box.

Where to find the invoice number

If you have purchased recently, you will have received the invoice as a PDF attachment. It should look something like the attachment below - the location of the invoice number is highlighted in red.
NOTE: The invoice number is NOT the same as the filename of the PDF - you will need to open up the PDF and get the invoice number as shown in the attachment.

If you purchased prior to the time Unity started sending out PDF invoices, the invoice number will be in an email sent by Unity. The format should be something like this:

Code: [Select]
----------------------------------------------------------------
      Order Invoice
----------------------------------------------------------------
      Date: 2011/10/1
      Invoice no: [b]XXXXXXXXX[/b]
      VAT registration (CVR nr.): 30719913
      Unity Technologies A/S
      Livjaegergade 17, Baghuset, 1. sal
      DK-2100 Copenhagen
      Denmark

6718
FAQs / How do I access 2D Toolkit from JavaScript?
« on: January 26, 2012, 07:12:38 pm »
If you are on a version older than 1.55, you will have to follow the instructions here.

If you are using version 1.55 or above, simply select the "2D Toolkit > Set Up For JavaScript" menu option!

6719
FAQs / How do I position a sprite from a script?
« on: January 26, 2012, 07:09:44 pm »
Use Camera.ScreenToWorldPoint(x, y, distanceFromCamera); x and y are screen space coordinates starting at the lower left. distanceFromCamera is the distance of the sprite from the camera (for occlusion, etc). This works with perspective and ortho cameras.

6720
FAQs / How should I export my data from Glyph Designer?
« on: January 26, 2012, 07:09:38 pm »
2D Toolkit correctly supports all the export options from Glyph Designer. Due to the "Sparrow" config producing slightly different outputs, it is recommended to use the Cocos2D or EZGUI export options.

Pages: 1 ... 446 447 [448] 449 450