[Unity3D] Copy to Clipboard Script for iOS & Android

I was looking for a way to copy a piece of text to the clipboard on iOS and Android devices the other day. There are ways to do it for Windows and Mac computers, but getting that to work for mobile devices seemed a bit trickier. There were some solutions on the Unity3D Community forums, but they were always either for iOS OR Android and required additional extra steps to make it actually work. Luckily, I found this handy script by Wataru Sanuki which handles cross platform copy to clipboard in a single class.Read more


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


[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


[FIX] AoE II HD Won't Start

aoe2launcher

Age of Empires 2 HD won't launch through Steam? Stuck in the infinite launcher-loop? Try closing Steam and delete the "appcache" folder in your Steam folder. Restart Steam and play AoE2!

Source: http://www.reddit.com/r/Steam/comments/1cag4h/aoe_ii_hd_wont_start/

 


[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!


[FIX] Unity3D - Animation Must be marked as Legacy Warning

unity-animation-legacy01
I ran into this warning the other day when I tried adding an animation clip to an object "Animation Component must be marked as legacy", and there was no obvious way to find and fix the legacy problem... After searching a little bit on the internet, I found this solution to fix the warning:

Select the animation clip in your Project > Go to the Inspector tab and clip on the "hamburger" button > Then select "Debug".

The inspector options will change into debugging mode and there set the "Animation Type" from 2 to 1. Set the inspector mode back to "Normal" through the hamburger button and it's fixed! No more legacy warnings!

unity-animation-legacy02
unity-animation-legacy03


Finding old AMD ATI Graphics Drivers

AMD-ATI-v2

My laptop motherboard/graphics card was broken a few months back, so I had to ship it to the ASUS repair center to have it fixed. When I got my laptop back, the graphics card drivers for my ATI Radeon Mobility HD 5730 were reverted back to the factory's drivers. It tried updating it to the latest drivers through the AMD ATI website, but every time I rebooted my computer after the installation, my screen wouldn't turn on anymore after the initial boot-up. The display works on an external monitor, but the laptop screen remains black no matter what I tried.

I wanted to install the older AMD Catalyst drivers, but I couldn't find them anywhere on the AMD website! Guru3D has a huge list of old drivers, but all the download links redirected me to dead or broken links. After looking through numerous websites, I finally found one with working download links on MorderHQ. Now everything is working again with the older graphics drivers.

 


[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