

- Texturepacker unity update#
- Texturepacker unity code#
- Texturepacker unity download#
- Texturepacker unity free#
UPDATE, : UIToolkit currently doesn’t support TexturePacker Pro’s rotated sprites (“Allow rotation” checkbox). It’s tempting to use it because it cuts the overall size of the sprite sheet but looks like Unity ends up flipping out and stretches the resultant image, forcing it into value it recognizes like 256, 512, 1024, 2048.
Texturepacker unity free#
UPDATE, : Unit圓D doesn’t allow TexturePacker Pro’s “Allow free sizes” checkbox to do it’s thing. Note: the free version of Texture Packer won’t allow you to efficiently size the image to minimize empty space. png file generated by TexturePacker has the “2x” in it’s file name, UIToolkit will grab the correct image size automatically. txt JSON files generated by TexturePacker will have the 2 sizes named the same and as long as the retina sprite sheet. CORRECTION: When creating the individual graphic slices in GIMP or Photoshop, make sure to name the regular and “2x” versions of the same slice the same exact file name (no “2x”). The 2nd texture map had the “2x” added to each file name, for iPhone retina display.

Make the texture atlases for your buttonsĬreated 2 texture maps for the buttons containing Up and Down states for the 4 buttons using the free version of TexturePacker. Also note, UIToolkit-based UI can’t be animated with iTween, as far as I’ve seen. NOTE: don’t expect TweenLite or iTween style performance from UIToolkit’s built-in animation engine.
Texturepacker unity code#
Just remember, to add UIToolkit elements via code you also have to create a public var in your script & use the Inspector to assign a one of the UIToolkit instances under the UI GameObject in your Hierarchy. You can also try this quick “how to” from UnityAnswers.
Texturepacker unity download#
the code examples in the demo scenes that come with the package download (Github).“Setup” instructions on their Github page.I mostly followed the developer’s instructions, using a mix of: unitypackage from UIToolkit’s downloads page on GitHub.Ģ. Draws excessive processing power when using GUI, even worse with GUILayout… In-game GUI still requires high performance, and the overhead of calling GUI, or GUILayout are just too big to overlook even on today’s high-powered phones.ġ.Here’s a good summary of why Unit圓D’s default GUI is not a good choice for mobile devices, key ones being: UIToolkit is an open source Unity plugin specifically created for optimized performance on mobile devices (via reduced number of draw calls). UIVerticalPanel vPanel = UIVerticalPanel.create( "panelTop2x.png", "panelMid2x.png", "panelBotm2x.png" ) Var vPanel:UIVerticalPanel = UIVerticalPanel.create( "panelTop2x.png", "panelMid2x.png", "panelBotm2x.png" ) UIVerticalPanel vPanel = UIVerticalPanel.create( "panelTopFPO2x.png", "panelMidFPO2x.png", "panelBotmFPO2x.png" ) Īdding the correctly named files in Texture Packer, republishing the texture atlas to my Unity project’s Resources folder and updating the code that calls these assets fixed the problem: Var vPanel:UIVerticalPanel = UIVerticalPanel.create( "panelTopFPO2x.png", "panelMidFPO2x.png", "panelBotmFPO2x.png" ) The actual file name was “panelTop2x.png”:

png file names when adding files to Texture Packer, so “panelTopFPO2x.png” didn’t exist in the. UIVerticalPanel.create (System.String topFilename, System.String middleFilename, System.String bottomFilename) (at Assets/Plugins/UIToolkit/Containers/UIVerticalPanel.cs:48)ĮndGameScript+$animateIn$14+$.MoveNext () (at Assets/Scripts/MyPageScript.js:63) UIVerticalPanel.create (.UIToolkit manager, System.String topFilename, System.String middleFilename, System.String bottomFilename) (at Assets/Plugins/UIToolkit/Containers/UIVerticalPanel.cs:54) UIVerticalPanel.ctor (.UIToolkit manager, System.String topFilename, System.String middleFilename, System.String bottomFilename) (at Assets/Plugins/UIToolkit/Containers/UIVerticalPanel.cs:60) UISpriteManager.textureInfoForFilename (System.String filename) (at Assets/Plugins/UIToolkit/BaseElements/UISpriteManager.cs:154)
Texturepacker unity update#
I got this error the today when trying to update my Texture Atlas for a UIToolkit asset:Įxception: can't find texture details for texture packer sprite:panelTopFPO2x.png
