Tuesday, March 15, 2011

Search Objects based on Layer in Unity3D

This is an editor script for Unity3D.
This tool will help you, if you are working on a large scale project & you often need to search for objects with specific layer. Unity3D searches objects based on Name & Type. This helps you search for objects based on Layer.

How To Use:
  • Press CTRL+SHIFT+L to launch the tool on PC. On MAC use CMD+SHIFT+L.
  • You can also find it in MyTools->Layer Search.
  • Choose Layer name from the drop down list.
  • The objects with the selcted layer are listed.
  • Click on the object, it will frame the object.
You can download the files from here.

Hope it helps someone.

Wednesday, January 13, 2010

Quick Find

Quick Find V1.1

This utility is a freeware for personal and commercial use. Its a very handy tool to search files.

Motivation : Recently I was working on a Wii game which had 856 files(art assets). I was having a hard time searching files. Windows searech is not handy & takes time to search. So I developed this tool to help me search my required files much faster. Hope it helps you guys as well :)











Click here to download the latest version

How To Use:

After installing the software right click on any folder and click "Open Quick Find Here".

Enter the name of file you are searching for.

Features:

  1. The Recursive Search option will search all underlying directories for the given file. This option is disabled by default.
  2. If Instant Search is enabled, the tool will start searching the file as soon as you start typing the file name. It is recommended to disable it in case if you have too many files in the given directory. This feature is enabled by default.
  3. Right click on the seached file to activate the context menu. From this context menu you can either Open, Cut, Copy, Delete, Open Containing Folder or Choose application to use to open the selected file(s).

If you find any bug or crash, or if you have any feature request please do mail me on altaf.navalur@gmail.com

Note:

Use this software on your own risk. I am not responsible for any loss of data or what so ever.

Tuesday, July 7, 2009

Visual Studio Add-In : OpenFiles

Finally...
Last year I was working on Flex Builder. This IDE had a very cool feature. Using this tool you can browse through files & resources in the project. I wanted this feature In Visual Studio badly. The reason being in my game engine I had more than 700 files. If I want to open a file I have to navigate through the solution file. Which is extrmely boring. If we have filetrs, this gets worse. So I decided to write one for me. Initially I thought of writing a MACRO. But MACRO`s in Visual Studio have certain limitation. A MACRO cannot have UI. So I started writing an Add-In. I call this Add-In as "OpenFiles".

What this Add-In does is, It Pop`s in a dialog box, Where in you can type the initial characters of the file you are looking for.
The list gets filled with the matching file(s) in the solution. Navigate through the files using Up & down arrow keys. Either hit Enter key or Double click to open the selected file.
Press CTRL + Click to select multiple files. Pretty Simple is`nt it...

Now lets see how to use this. The Add-In supports VS 2005 & VS 2008 IDE`s.
Download Installers : VS 2005, VS 2008.

When you run the installer, it will warn you for security iossues. Just click next, there is no rik in any way. If you are still not sure, click on "View files in Windows Explorer..." button. It will show you the file that are going to be installed.

Once you are done with the installation,
Start visual studio, Create/Open any project you want.
To use the Add-In, go to Tool. Here you will see a Smiley face Icon with the Text "OpenFiles".
Click on it, a dialog box will pop up, type in the first few characters of the file you are looking for.

If you are a kind of programmer who hates using mouse. I suggest you assign a short cut key for it.
To Assign a short cut key, do the following,
> Tools->Options->Environment->Keyboard.
> In the text box type : OpenFiles.
> In the list select : openFiles.Connect.OpenFiles.
> Choose any short cut key you want & click Assign.

I have set it to : Ctrl + Shift + Alt + O.

Hope you guys like it. Drop me a mail or write a comment if you have any suggestions.
Have fun Coding...

Note: Add-In are not supported by Express Editions.

Tuesday, June 30, 2009

Visual Studio Macro to open Partner files.

From past one year I have been working on Wii games. I was using CodeWarrior IDE. This IDE was not as good as Visual Studio, I used to hate it. But things changed. As I started using it more and more I got to see some really good features like. Pre-Processing a file by context menu. Class hierarchy diagram & few other features. Ofcourse we can Pre-Process a file in VS as well, but we have to go to project settings tab for that. Also, it Pre-Processes all files in the project. Another features which is "open the partner file". You can open c, cpp or cc file if you are in a header file and vice-verse. This small feature is really handy. So I wrote a MACRO for it.

Steps to add this MACRO to your VS IDE,
  • Open VS IDE.
  • Press Alt+F11 or go to Tools->Macros->Macros IDE.
  • Right click on MyMacros->Add->Add New Item.
  • Select Module in the dialog box and name it OpenPartnerFile.
  • Paste the following code.

Public Module OpenPartnerFile
' if this file is a .cpp then open up the .h

' or vice versa

Sub OpenPartnerFile()

Dim filename As String

Dim partnerFilename As String

filename = DTE.ActiveDocument.FullName

If (filename.EndsWith(".h")) Then

partnerFilename = filename.Substring(0, filename.Length() - 2) ' + ".cpp"

If System.IO.File.Exists(
partnerFilename + ".cpp") Then

partnerFilename += ".cpp"

End If

If System.IO.File.Exists(partnerFilename + ".cc") Then

partnerFilename += ".cc"

End If

If System.IO.File.Exists(partnerFilename + ".c") Then

partnerFilename += ".c"

End If



End If

If (filename.EndsWith(".cpp")) Then

partnerFilename = filename.Substring(0, filename.Length() - 4) + ".h"

End If

If (filename.EndsWith(".cc")) Then

partnerFilename = filename.Substring(0, filename.Length() - 3) + ".h"

End If

If (filename.EndsWith(".c")) Then

partnerFilename = filename.Substring(0, filename.Length() - 2) + ".h"

End If

'MsgBox(partnerFilename)


'See if the file exists & open it
If System.IO.File.Exists(partnerFilename) Then
DTE.ItemOperations.OpenFile(partnerFilename)
End If

End Sub

End Module


You are done with the MACRO now. Save and exit the Macro IDE. Now its the time to execute the macro on a keyboard shortcut. Steps are,
  1. Tools->Options->Environment->Keyboard.
  2. Select Visual C++ 6 in the first drop down list.
  3. In the next input box, type : OpenPartnerFile.
  4. You will get a Macro in the list box below, Click on it.
  5. Type a short cut of your choice & click assign. I feel "ctrl+` " more convenient.
Hope you guys like it.

Sunday, December 14, 2008

Visual Studio MACRO

I have been using Visual Studio IDE`s from a long time. I just love Visual Studio IDE. It is the best thing from MS.

I just love tools. I create tools to make my work faster. This MACRO that I have written will help you google your doubts just by right clicking in the IDE. is`nt it easy

Follow the following steps to add this MACRO to your VS IDE,
  • Open VS IDE.
  • Press Alt+F11 or go to Tools->Macros->Macros IDE.
  • Right click on MyMacros->Add->Add New Item.
  • Select Module in the dialog box and name it WebLookUp.
  • Paste the following code between
Public Module WebLookUp
// Code goes here
End Module

  • Once you are done, your MACRO code should look like this,
Public Module WebLookUp
Sub LookUpOnTheWeb()
Dim selectedText As TextSelection = DTE.ActiveDocument.Selection
If selectedText.Text.Length = 0 Then
Return
End If
Dim args As String = """http://www.google.com/search?q=" + selectedText.Text + """"
Dim commandString = "c:\Program Files\Mozilla Firefox\firefox.exe -url " + args
Shell(commandString, AppWinStyle.MaximizedFocus, True, 100)
End Sub
End Module

This MACRO use firefox as the web browser. If you need to use some other browser just replace firefox with path for your loved browser.

Once you are done with the MACRO, now is the time to add it to the Context Menu,
to do this follow these links, Link1, Link2, Link3

Hope you guys like it. Have fun googling :)