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 ... 447 448 [449] 450
6721
FAQs / Is there a trial?
« on: January 26, 2012, 07:09:12 pm »
Due to the nature of the product, creating a trial version will take up significant resources which we would rather spend improving the product at this moment. We will, however, be doing a webplayer demo with the runtime portion of the code, which you can download and play with.

6722
Sure! Feel free to do so. The data from the back end is available for you to consume in any way you wish. Check tk2dSprite.cs and tk2dTextMesh.cs on how the data is used. As almost everything is precomputed, you can almost use the data as is!

6723
FAQs / Unity crashes occasionaly when I click on a Sprite.
« on: January 26, 2012, 07:08:53 pm »
Prior to version 1.10, 2d Toolkit went through your project and loaded all prefabs to find 2d Toolkit objects. As you can imagine, this can be a very slow and memory hungry process when you have a large number of prefabs. 2d Toolkit 1.10 creates an index of all your 2d Toolkit objects the first time you use it. Version 1.10 uses significantly less memory. We recommend you upgrade to the latest version as soon as you can.

6724
FAQs / What is .tk2d / -tk2d in my project window?
« on: January 26, 2012, 07:08:45 pm »
And why does it keep coming back when I delete it?

.tk2d (-tk2d from version 1.55) is a global index of all sprite collections, animations and fonts. This is used to speed up operations which need to find these objects. You should not delete this, as it is generated when it is missing.

6725
You need to call Commit on the textmesh for your changes to be committed. The reason for this is you may change text and color and/or size in the same frame, and each of these will invalidate the mesh data, and by calling Commit yourself, you are saving the system from regenerating data multiple times.

6726
By default, 2d Toolkit will insert 2 pixels of padding around your texture to support automatic downsampling for iPhone 3g(s). This is also required when linear filtering is used to have correct edge seams. If you are drawing pixel art and are not going to have filtering enabled, tick Pixel Perfect Point Sampled in the Sprite Collection set-up. This will remove the padding around your texture, and the size will be exactly the same as your source image. However, when you do this, you will not be able to have smooth filtering when upscaling your sprites.

6727
FAQs / How do I create a Sprite in script?
« on: January 26, 2012, 07:07:01 pm »
The sprite classes aren't meant to be instantiated in code. This is still possible, check tk2dSpriteEditor.DoCreateSpriteObject() for how a sprite is created in the interface.

We recommend you set up prefabs for the sprites you need to instantiate in game and instantiate them instead. That way, you can visually set up your sprite, and you'll be guaranteed everything is set up correctly when you instantiate it in game.

If you need to generate large numbers of sprites by name, simply create one prefab for your sprite collection, instantiate it, and use GetSpriteIdByName() and switch the sprite. This way, you can pool one sprite type per Sprite Collection, and instantiate them the way you need it.

6728
The mesh on each sprite is built up at runtime. This means that even thought the data is very optimal and very few transformations are actually performed on this data, there is still a performance hit doing this. In order to get around this problem, you should preallocate and pool your objects at the start of the game. This is generally a good idea on mobile platforms to avoid allocations and garbage collections even when not using this system.

6729
FAQs / How much performance do all the options cost?
« on: January 26, 2012, 07:06:08 pm »
A base sprite is simply a mesh in Unity, and it would be no different if you built the polygons in your favourite 3d program.
You only incur a cost when you update the sprite or text mesh, i.e. change the sprite id, color, text, etc.

Certain operations are more expensive than others and these are listed below:

  • Switching sprite ids with different vertex counts requires memory allocation. This is not a good idea at runtime. You will be shown a warning in the SpriteAnimation editor if you do this to alert you to the potential problem.
  • Changing maxChars on a TextMesh will reallocate memory. This is bad at runtime.


Switching sprite ids with the same vertex counts, changing scale or colors incur about the same cost.
No allocation is performed here, but vertex buffers need to be updated.

Changing scale and color is dependent on the number of vertices. You should avoid doing this at runtime on massively diced sprites, and doing this on text meshes is directly a function of the number of characters in the mesh.

Collider overheads - if you have colliders set up, and you move/scale/rotate the sprite, make sure to have a kinematic rigidbody set. That is unless you have very few of them that it doesn't matter.

GameObject overhead - you are very likely to run into GameObject/Unity object overheads if you have too many GameObjects / tk2dSprites / etc. Use the static sprite batcher where you can to merge static background sprites efficiently.

6730
FAQs / Why is there a separate scale for sprites and text meshes?
« on: January 26, 2012, 07:06:01 pm »
Dynamic batching stops working when you scale your sprites using the built in Unity transform. For this reason, there is a separate scale variable on these components. Using this built in scale parameter means dynamic batching will work with your sprites.

6731
This usually happens when you have more than one camera in the scene. In most cases, the solution to this is to set up your sprite collection with the parameters of the camera viewing the sprite. When this is done, the sprite will be Pixel Perfect with the scale of (1,1,1). Click the Reset button on the scale to do this.

6732
FAQs / What do target ortho size and target height mean?
« on: January 26, 2012, 07:05:36 pm »
2D Toolkit preprocesses sprites and text mesh data to a target size to reduce the amount of work required at runtime. These parameters tell the system what the target viewing resolution and camera are. Target Ortho Size refers to the ortho size of the camera viewing the sprite Target Height refers to the height of the target resolution In most cases, all you will need to do is set up these parameters correctly, and every sprite you create will be Pixel Perfect by default. Sometimes, you may have more than one camera in your scene with different parameters. In this case, enter the details of the camera which will view the sprite, and every created sprite will be pixel perfect.

6733
Releases / 2D Toolkit 1.55 FINAL
« on: January 24, 2012, 11:36:00 pm »
  • FEATURE: Sliced sprites (9 slice)
  • Secondary character padding to change spacing on instances.
  • Bug fixes with alignment, right and center alignment now works as expected.
  • Fixes and deprecation warnings in Unity 3.5
  • Workarounds for Flash exporter
  • Text serialization in Unity 3.5 now works properly
  • Supports larger character sets
  • JavaScript 1 click install (2D Toolkit Main Menu > Set Up For JavaScript)
  • Bake scale option (recursively bakes scale for all children too)
  • Static sprite batcher works as expected with sprites scaled using Unitys Transform widget
  • Random animation wrap modes (Random Single and Random Looped, both start from a random frame in the series)
  • Custom pad amounts for sprite collection and individual sprites within the collection
  • API: Get trimmed & untrimmed bounds from sprite
  • GUIButton down and up events, also autofire event which fires every frame while the button is held down
  • API: Animation API improvements, multiple forms of Play, also override start time
  • Multiline textmesh works and aligns as expected now, each line is aligned correctly
  • API: More API improvements and helper functions

6734
Releases / 2D Toolkit 1.51a FINAL
« on: January 24, 2012, 11:32:59 pm »
Bug with tk2dIndex, contained code which shouldn't have been built outside the editor

6735
Releases / 2D Toolkit 1.51 FINAL
« on: January 24, 2012, 11:31:15 pm »
Gradient support in TextMeshes and inline style changes. Check here for more details.

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