Useful Unity3D Stuff

I work quite extensively with Unity3D and over these past few years I've come across a ton of problems. Usually I managed to find a solution for them, but I don't always keep a record of those solutions. If I do, it ends up being a bookmark or a note somewhere. So I decided to make a post to keep track of useful stuff for Unity3D. I can finally clean up my mess! And who knows. It might help other people as well.

Unity3D Useful Tools, Scripts, Shaders


Unity3D Fixes and Workarounds for Bugs and Other Wacky Things


Unity3D Features & C# Explanations

Articles and links that explain how certain features and coding principles actually work.

 


[HOW] WordPress: Re-enable Comment Form After Using Disable Comments Plugin

I've been using the Disable Comments WordPress plugin for some of my websites. It works great in disabling and hiding the comment sections in posts and pages. However, I decided to re-enable the comments and the comment form didn't show up anymore. I tried disabling and deleting the plugin and made sure everything was on in the Discussion section was enabled, but without nothing worked. Took me ages until I found a solution on the plugin support forum.

To fix the comment form in the posts and pages:
- From the Posts Screen, check the boxes next to all the posts you want to edit, select Bulk Actions -> Edit, and click Apply.
- In the bulk edit area that appears, check the box for comment status and click Update.

allow-comments


UXPin's UX Design Knowledge & Tool Kits

UXPin has a very neat section where they share knowledge and tool kits with thoughtful content on mobile & web prototyping, wireframing, mockups, usability testing, project management, design process & more. It's basically free! All you have to do is enter your email :)

uxpin


[FIX] Unity3D - Allow Animator Triggering Same State

For a recent project, I was trying to trigger the same state from the Any State in the Mecanim Animator in Unity. When doing so, the transition did trigger, but it failed to flag the trigger back to "false". This was causing some animation bugs, since the game was setup so the user can replay that level. Upon replay, the animation would get triggered twice or since the trigger was still flagged "true" before it could reset back to the original state. To fix this problem, there's a check box called "Can Transition To Self" in the inspector which you need to turn on (it's unchecked by default). Check it and you're done!
unity-animator-trigger
Source: http://answers.unity3d.com/questions/877897/trigger-the-same-state-again.html


Copywriting Tips & Design Process

I've been working on some designs recently, which involves some copywriting. With no real prior experience in writing copy, it gets kind of tricky sometimes, especially when you have to start with a clean slate. While doing some reading and research on how to write copy, I came across these articles which provide tips and explanations on how copywriting fits in the design process. Writing copy should be an integral part throughout the entire design process, and doesn't just belong at the beginning, middle, or end. The Fast Company Design articles below, written by John Zeratsky, take lessons from Google Venture and summarize them into must-read list and how all those things fit inside the (interface) design process. There's also a cool article about how Google Venture makes design decisions with dots... lots of sticky dots! The Dead Simple Way Google Ventures Unlocks Great Ideas.

From Google Ventures: 5 Rules For Writing Great Interface Copy

  1. CLARITY IS KING
  2. PERSONALITY DOESN'T MATTER AS MUCH AS YOU THINK
  3. JUST TELL ME
  4. BY THE WAY, PEOPLE DO READ
  5. WRITING IS PART OF THE DESIGN PROCESS

How To Master Copywriting

  1. SKETCH: NOUNS, VERBS, AND HEADLINES
  2. CRITIQUE: DECIDE WHAT TO PROTOTYPE
  3. PROTOTYPE: DETAILED, REALISTIC TEXT
  4. USER RESEARCH: LISTEN FOR WHAT WORKS

 


Adobe Illustrator - Script Export Artboard to iOS App Icons

Here's an Illustrator automation script to export an artboard to all the sizes needed for iOS apps. The Script includes exports for iPhone 6 and iPhone 6 Plus. You can grab the script here --> SaveIconsForiOSIcons

Script Exports:

  • 120 x 120px - iPhone Icon (iPhone 4s, 5, 6)
  • 180 x 180px - iPhone Icon (iPhone 6 Plus)
  • 76 x 76px - iPad Icon (iPad 2, iPad mini)
  • 152 x 152px - iPad Icon (iPad, iPad mini)
  • 512 x 512px - AppStore Icon
  • 1024 x 1024px - AppStore Icon

To install the script, depending on your Illustrator version and OS, go to "Program Files\Adobe\Adobe Illustrator\Presets\en_US\Scripts\" and just put the script there. Then launch Illustrator and you can find the script under File --> Scripts.

The script is based and expanded upon jeremieweldin's script https://gist.github.com/jeremieweldin/577775.


[FIX] Unity3D - 4.5 Hierarchy Sorting By Name

Ever since the release of Unity3D 4.5 they changed the sorting of the GameObjects in the Hierarchy window to be based on the based on transform order instead of object's name. Although I do see some some causes where sorting it by transform order might be useful, but generally I would prefer to find my GameObjects based on the name. In Unity3D 4.5, there's no option anymore to sort it by name by default. You can use the search at the top of the hierarchy window, but it's a pain in the ass in my opinion.

There's actually a way to re-enable the alphanumerical sorting again. Simply download this little script (Unity3D-AlphaNumericSort) and place it in the Assets>Editor folder and you're done! An option will appear in the hierarchy window where you can switch between sorting it by transform order or by name.

HierarchySort

Source: http://forum.unity3d.com/threads/unity-4-5-new-hierarchy-window-sorting.248298/


[FIX] Unity3D Black Screen on iOS Devices

unity-clearflags

We were trying to run a build of Puzzle Football on iPad yesterday to see how the game would look from an iPhone5 aspect ratio (16:9) to an iPad aspect ratio (4:3). But when we tried to run it the screen goes black. The game launches and the buttons were working so the game wasn't stuck. The weird thing was that it runs fine on the iPad2, but it shows a black screen on the iPad Mini.

I found a fix on the Unity forum which mentions changing the Clear Flags property on the Camera object by setting it to "Solid Color" (it was on "Don't Clear" before). Not sure why it needs to be on Solid Color, but it's working now! No more black screen on the iPad Mini!


Create Bitmap Fonts for Unity3D

I used to use BMFont to generate bitmap fonts for Unity3D when my Windows laptop was still working. It's still out at the repair center waiting to be fixed, so I've been working on a Macbook ever since. Unfortunately, BMFont is only available for Windows, but I found a great alternative called Littera. It's a web application to generate bitmap fonts and it has numerous awesome extra features such as adding gradient, stroke, shadow, bevel, etc. Generating a bitmap font is very straightforward. You just upload a font set the desired size, resolution and format, and export it!

Littera


[fix] Scaling Smart Objects With Nearest Neighbor in Photoshop

I've been creating a lot of pixel art lately and started to use Smart Objects in Photoshop to increase my productivity and layer organization. Scaling pixel art in regular layers is pretty straightforward with the "Free Transform" (Ctrl+T / Command+T) by setting the Interpolation to "Nearest Neighbor". When using Smart Objects, the Free Transform doesn't show the Interpolation setting for some reason. If you try to scale your pixel art Smart Object, it will use a Bilinear interpolation making your art all blurry and fuzzy.

Apparently, Photoshop has a single setting to determine the scaling interpolation globally across the application. You can change this setting by going to Preferences > General > Image Interpolation. Changing this from "Bilinear" (default) to "Nearest Neighbor" will allow you to scale Smart Objects without it become blurry.

PS-smartobjects-nearest