Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

Are you working on a large project but dislike how many objects you have to weed through in the hierarchy window? You can create editor scripts that change the objects Object.hideFlags property to hide or show the object in the hierarchy window.

var item = Selection.activeGameObject;
if ((item.hideFlags & HideFlags.HideInHierarchy) == HideFlags.HideInHierarchy)
{
                item.hideFlags = item.hideFlags ^ HideFlags.HideInHierarchy;
                item.active = !item.active;
                item.active = !item.active;
}

Notice that item.active = !item.active is specified twice. Currently in unity 3.5 you need those 2 lines of code for the game object to hide and show properly in the hierarchy window.


Wondering how to save player preferences across sessions or save settings for an editor script to use? Check out EditorPrefs & PlayerPrefs.


If you are writing custom editors for unity and you need to have a way of editing the tools settings you can have those settings show up in the Unity Preferences Window "Edit -> Preferences...".

Just create a new editor script that has a public class and add the fallowing lines of code ...

// Add preferences section named "cbxTools" to the Preferences Window
    [PreferenceItem("cbxTools")]
    public static void PreferencesGUI()
    {
        // Preferences GUI
        cbxToolPreferencesConfig.Instance.DrawGUI();
    }


If you are creating custom editors for unity but only want the gui for that editor to be drawn in the currently active scene view try this ...    

if (SceneView.mouseOverWindow.GetInstanceID() == SceneView.currentDrawingSceneView.GetInstanceID())
        {
            this.DrawGUI(SceneView.currentDrawingSceneView);
        }

If your suddenly finding that Unity will instanty terminate while running your code, check if you are invoking any infinite recusion loops. This has recently happened to me and it was a bit of a pain to track down with Unity 3.5 instantly terminating. Hopfully the Unity team will handle the infinite recustion issue in a future version.


You can visually tag your game objects with icons by selecting the object and clicking the Red/Green/Blue colored cube in the upper left of the inspector window.

You can select a colored Label, Dot, or a Texture from your assets.


I have still been learning the in and outs of Unity for the past few weeks. I've been thinking that because I have not been making any regular posts on this site that I would start posting a series of quick unity tips as I learn of them.

Tip #1 - Prevent config dialog from showing when running your compiled game.

When you build your unity game using "File -> Build & Run" and then run the *.exe that was generated you will see a dialog pop up.

To prevent the configuration window from being shown select "File -> Build Settings..." in unity and click the "Player Settings" button at the bottom of the window. The Unity inspector window will contain a number of options. Find the drop down titled "Display Resolution Dialog" and set it to "Disabled". Rebuild your game and run the generated *.exe. No more dialog pop up!


Unity, Deleted posts, and updates

Published 4/27/2012 by createdbyx in News
Tags:

I have been working on working on a few things these past few weeks. First is that I am in the process of redesigning the www.createdbyx.com website with my own custom built MVC like solution. This will provide me with a familiar MVC coding experience but in a extremely simplified and lightweight manner.It will also be built around System.IO.Stream so it should be able to run on almost anything not just asp.net.

Second thing is that I have come back to learning about the Unity game engine. It can be a real pain learning a new platform some times. I find myself having difficulties doing the simplest of things, but I know that eventually with more experience it will become child's play.

I also deleted my previous post titled "Guilty!". I deleted it because the video was from Break.com and apparently the video is no longer available. This is why I hate linking to crap in the internet. Links are fickle and websites change too often.

I have not posted too many updates lately on this site as I simply have not had the motivation to do so. Maybe when I start doing more with Unity I will post more on that.


Steve Jobs

Published 10/10/2011 by createdbyx in News
Tags:

Was just back in town for two days and was catching up on some emails and rss feeds when I learned Steve Jobs has passed away. I've never been a apple user, never really used or owned an apple product other then brief uses of an iPod and iTunes, but I still tip my hat to Steve and Apple for creating the slickest & sleekest tech around.

It's widly accepted that Apple is Steve Jobs and Steve Jobs is Apple, so it is interesting times for the future of apple. Personally I think long term Apple's future may be bleek without steve being there as the moral center guiding Apple's direction.


Unity 3 Weeks later

Published 10/2/2011 by createdbyx in News | Unity

I admit I have not spent as much time using Unity as I'd like to these last three weeks. I have been working out of town and have no internet where I am so I only have the Unity documentation to tie me over. Without internet access I can't gain access to more reading material on Unity so have not made much progress. But I think I am begining to understand it better from what little time I have spent with it. I still have about another two weeks or so of working out of town so I won't be able to dive much deeper into Unity until until I get back.

On the other hand I have been working on my Zider project and have been making some progress here and there.


Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume