General And Unity Game Related programming tutorials and code repository

Expandmenu Shrunk

  • Human Life Tip #3

    Human Life Tip #3

    Don’t do it for love, nor money. Do it for you: If you spend your life trying to fill you heart or pockets, you will never be happy. You have to find a way to fill your soul. If you expect to share from your cup of life, You must first make sure it is full.

    Life is just a series of moments. If you spend all of those moments trying to make others happy and neglect yourself, you will find relationships strained.. And strained relationships cannot be fixed by someone that has no love for theirself.


    – The Lazy Coder

  • Human Life Tip #2

    Human Life Tip #2

    What one man can do, another can do: The only way to fail is to stop trying. (This goes for women too. No Sexism Here)

    If a person sets their mind to something, the only limiting factor is time. How much will you invest into accomplishing your goal.

    If failure is not an option than you will always succeed. Because giving up is the only real failure.


    – The Lazy Coder

  • Human Life Tip #1

    Human Life Tip #1

    Mind over matter: If you don’t mind, It doesn’t matter.

    This essentially translates to. If you always worry about things you will be forever worrying. But if you just don’t care, and instead do the things that make you happy regardless of what others do or think. You will live a much better, and much fuller life.


    – The Lazy Coder

  • Unity Plugin Project Code.

    In my haste to get code up for you guys, I found the folder that I was sure contained the completed projects for my videos.

    I pushed it up to github, thinking that would give everyone what they needed… Boy was I wrong.

    the OSX code seems to have been omitted because it had a .git repo of its own. And I apparently dont have the C# version anymore at all.

    I have posted up the latest code for the projects that I was able to locate, Unfortunately I have not had the chance to test them.

    I did however notice that the project did not include the OSX Callback code that emulates “SendMessage” which means I will need to relocate, or redevelop the code for the repo.

    I apologize for the issues, The machine I originally developed it on I have been relieved of.

    Here is the link to the existing code.

  • Unity Plugins on Mac OSX

    I have been building plugins for a lot of different needs, but my biggest headache with mac OSX has been that whenever I use a plugin, Whether through dlopen or DllImport the application hangs when closed. the only way I could close the app was to “Force Quit” and wait.

    Well no longer. I’m really tired of mac getting the better of me. So I built a “Destroy” method on my plugins.

    No need to destroy each plugin, this destroy method is for when I am about to close the application.


    I was really trying to avoid this type of fix, but there’s not much else I can think of.

    Here is a sample of my plugin.

    Exports Header file.

    Exports Implementation file.

    As you can see I called exit right int the C++ implementation file.

    as for HookWindow, In case you were interested.

    HookWindow Header file

    HookWindow Implementation File

    Finally is the Unity Scripts.. First we will do the Dll Bridge implementation.

    And finally the Static Script that will get the application exiting message.

    you will see the Destroy call on Line 17.

    but you will also see on line 10 that I told it no to destroy. This will keep this script floating around on the game object it is attached to until you close the application.

    Im sure there is a better way than this, but this fixed the problem for me. I hope this can help others.