Free program Unity Helper C#

Hey guys, I made a little program that I’ll be giving away for free.
I’m gonna also try to submit it to the Asset Store.

But, as this isn’t a Unity related (built in unity) feature, I’m not exactly where to put this.

You may Download it at
www.warhead-designz.com/FreeStuff/UnityHelperLiteEdition.zip

But I made this free program called Unity Helper.
This is for C# code, and will only run on Windows based machines.

Pretty much it’s a time saver, the video will explain what this does exactly.
But pretty much you click a button, it copies the corresponding code to your clip board,
and provides the code in the preview window.

It has Code Snippets for some stuff I know I always use, and some complete scripts.

Here is a video of it guys.
(It’s free so don’t hate too much LOL).

[Newest Video]

You may Download it at
www.warhead-designz.com/FreeStuff/UnityHelperLiteEdition.zip

Dloaded it,tried it, does what it says. I like these kinds of tools as I write them myself or end up copying and pasting from 15 other Methods from other C# scripts that I’ve written.(pain in the butt) Although as of this moment there isn’t a snip from this program that I need on this tool, still a good job! THANK YOU for making it!

King

EDIT: I use Win 7 64 bit, Phenom X4, 6gb ram. (thought Id list what platform I used it on )

Thank you @KingTooTall

I wanted to get some user feed back on this, I plan on eventually making a better basic version, then I’ll make an advanced version that will cost like 5 bucks. But that’s gonna be an entire evolution from this version.

I just put a bunch of stuff I commonly use, I’m not sure what the most common things people use is.
Would be helpful if everyone would tell me the most used type of function that you use.

That way for the next basic version I can make it more suitable for everyone.

Again, thank you buddy!
Glad you liked it!

I tend to use Regions ALOT. Lol Hence if you look at any of my posts with my source code in them, you will see I have a “standard” rule that I follow is:
#region VARIABLES
#endregion

#region ENUMS
#endregion

#region HELPERMETHODS
#endregion

Thanks
King

I’ve used them a few times, but I never seen a difference made, I could just put

// Floats
public float Speed;
public float jumpPower;
// End of floats

// bools
public bool canJump;
public bool isRunning;
// End of bools

Kind of thing lol.

1 Like

Correct, however, the + appears next to the regions so I can collapse the WHOLE region… So if in my CoreGameManager (which is true as of right now lol) I have ALOT of variables, I don’t have to scroll through enums, variables, etc that don’t change much looking for Methods or Routines. Yeah I know you can just put variables at the “top” of the code, but ctrl+shift+a in MONO collapses ALL and it just seems quicker and easier for me to scroll or scan through…

Thanks
King

Oh wow, that’s cool, I’m gonna star doing that probably lol.

It’s not letting me collapse anything lol.

Cool! I actually learned that from one of the tutorials from 3DBuzz I think. They were joking on one of the videos how “you sure like your regions”… So I was like what the heck is a region? HAHA Now I cant live without em…
N1warhead take a Look at THIS posts source for my example…

in MONO
Edit/Folding->ToggleAllFolds is not working?

Nope - it’s greyed out.

ahhh ok… here try THIS:
In Mono Develop, go to the “Tools” menu, select “Options…”, find the “text editor” section, select “general”, then check all three of the code folding options.
Hope that works. I must have “enabled it” once upon a time? lol

YES that works :slight_smile:

Thanks buddy!

Wow this really does help!

I’m making a complete C&C RTS Kit (to sell), and instead of making a script for every living thing, I’m making all in one scripts (All types of Infantry, etc) so I’ll end up with SO many lines of code, these regions are going to help!

That’s a nice and simple tool. If you are looking for a more integrated solution with Visual Studio, you might want to look into custom code snippets (Code Snippets - Visual Studio 2015 | Microsoft Learn). They are a little more work/management, but you can activate them on the fly (type the first few letters, then double tab) and more.

1 Like

Here’s a quick example. Type ‘pray’ and double tab to insert (or use the ‘surrounds with’ context menu to wrap existing code). It will have you tab between variables, only one in this case (distance), so you can fill them in, then hit enter to accept and it puts you at the end tag.

Steps:

  1. Save the snippet(xml) to disk.
  2. Tools->Code Snippets Manager…
  3. Language: C#
  4. Select ‘My Code Snippets’
  5. Import…
  6. Select your .snippet file
  7. Be more productive :slight_smile:

You can take a look at the snippets they ship with VS by having a look at the snippets directory that’s shown when selecting the ‘Visual C#’ folder in the manager to get an idea on what you can do with them.

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Plane Raycast</Title>
            <Shortcut>pray</Shortcut>
            <Description>Plane Raycast</Description>
            <Author>tango209</Author>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
                <SnippetType>SurroundsWith</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>distance</ID>
                    <ToolTip>Ray distance.</ToolTip>
                    <Default>100f</Default>
                </Literal>
            </Declarations>
            <Code Language="csharp">
                <![CDATA[ 
            var ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            float distance = $distance$;
            if (plane.Raycast(ray, out distance))
            {
                Vector3 hitPoint = ray.GetPoint(distance);
                hitPoint -= World.instance.transform.position;
         
                $selected$ $end$
        }]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

Edit: lost the ‘Expansion’ node somehow.

Seems like umm, more complicated than saving everything that you want into a database lol.
I’ve never messed with xml before lol.

Downloaded and gonna check it out. Thanks!

Agreed, as like EVERYTHING to do with visual studio, you have to configure the crap outta it, THEN you can use it. MonoDevelop I find (at this point) much quicker and easier to setup. Now, that said, I am doing smaller projects, so I assume that VS may be a better benefit once configured for snips when projects get bigger, but then again, I don’t like VS that much…

King

I’m curious, what do you have configure to use Visual Studio?

Oh wow, Thanks for making this! It’s sooo great, as it has common functions that I usually forget a piece or two for, and have to manually lookup the piece I’m missing in my head!

Also, I think $5 is perfect for an advanced version of this tool. This free version will certainly get the word out there!

For the advanced version, can you please add a feature, so I can add my own script scraps and save them for later use and handy reference? This would seal the deal for me!

Thanks again! :wink: