This little snippet allows you to see which objects you are hovering over in the Unity3D hierarchy pane. It also shows which objects are being dragged.
Here’s the script. You will need to place this script into your Assets directory, inside the ‘Editor’ folder. If the ‘Editor’ folder does not exist, you need to create it.
How it works:
When the Unity3D editor loads, it calls the static constructor of this script. Then, the HighlighHelper hooks on to the scene view’s GUI callbacks, editor update callbacks, as well as the editor’s Hierarchy Pane’s item callbacks.
Whenever the Unity3D editor updates, the script checks whether the user is hovering over the hierarchy pane or not. If so, then it allows the window to get MouseMove callbacks. It’s hacky, but it works! Then, during the MouseMove events, the script checks if the mouse is inside the rectangle of the name label for any gameobject in the hierarchy, and if so, it notes down which object’s name is hovered over.
The scene view gui method then looks up if any gameobjects match that ‘instance ID’, and draws some circles around them. It does the same for dragged objects. I hope it helps! If you have any questions, please write it in the comments.
Update: I have just created a repository for the script here: https://github.com/toxicFork/Unity3D-HighlightHelper so it will be easier to track any changes or allow any pull requests.
Recently I have donated to the KenneyLand crowdfund and Kenney (www.kenney.nl) has sent me an asset pack containing a lot of spritesheets and other great assets. The spritesheets also came with XML files next to them. I currently use Unity3D as my main development tool and wanted to use these spritesheets for some of my game ideas.
I will now explain how I wrote a script to let me easily slice 2D sprites.
Site was down for a while, this was caused by an update to WordPress which revealed that I had installed a bad plugin or theme. After a fresh install, it’s back! Please do let me know if there are any broken links (there probably will be).
There are no restrictions, you can finish any game you were working on, or even make one from scratch! There is a very useful guide (posted in 2010, but still relevant) “to get a new game for sale somewhere”.
I have recently purchased McPixel for $10. It’s a great point&click game, a lot of silly fun.
The developer had a promo with The Pirate Bay today. For a few days, it’s having a “pay any amount you want” deal, from $0(free download from ThePiratebay) to $9001 (or more). This resulted in a lot of traffic to his site. I did not know that he had a “Highest Tips” section, until I took a look at my site’s stats on Statcounter.
I realized that I was #4 on the contributors list, and that resulted in a lot of clickthrough. That’s only in a few hours. I think it will gradually decrease, though, since people are tipping higher than me already. After 2 more people tip more than $10, I will be off the list.
So if you’re interested in gaining some clicks to your blog, you could do it by tipping sos more than $25 (the highest tip as of now).
Or just buy or download the game and have a great time.
Flash 11.2 came out and it has two very awesome features: right click events and mouse locking. So, I had to test it out. However, (as of this post) FlashDevelop (my preferred environment) doesn’t officially support 11.2.
I have looked around the web to find a tutorial of some sorts to configure flashdevelop for 11.2 but all I could find were separate small for other versions, so I decided to find the way myself. I’ll be writing this tutorial to help others who are in my situation.
Get the files.
You can find the installation links here.
Download the “playerglobal.swc to target the 11.2 APIs”:
into “\FlashDevelop\Tools\flexsdk\frameworks\libs\player\11.2\” (create the 11.2 folder as it won’t exist)
save as “playerglobal.swc”.
Download the “Flash Player 11.2 Projector content debugger”:
into “\FlashDevelop\Tools\flexlibs\runtimes\player\11.2\win\” (create the 11.2\win folders inside “player”)
save as “FlashPlayerDebugger.exe”.
Go to Tools -> Program Settings
Click on the “FlashViewer” plugin settings page
Set the “External Player Path” to point to your recently downloaded “11.2\win\FlashPlayerDebugger.exe” file.
Configure your projects
Go to project properties by right clicking the project’s name.
Set the platform version to 11.2.
Add the following line to “Additional Compiler Options”: