Chapter 8: Windows

lesson 8: Windows

In this lesson on “Windows” we’ll look at the distinction between Windows and Views. Some of Unity’s Layout configurability will be briefly revisited. Layout management will be addressed, as will be the remainder of Views.

Fig. 8.1 Shows the Windows drop-down menu with the Layouts sub-menu exposed

The drop-down menu “Window” is a bit of a misnomer as everything contained within it is, strictly speaking, a View. The terms Windows and Views are often used interchangeably, however. In addition to having the ability to be opened, closed, resized, and repostioned, a View has a tab and can be docked. A Window can be opened, closed, resized, and repositioned, but it has no tab and cannot be docked.

When not docked, a View or Window is said to be “floating.” With multiple Views floating around, it’s inevitable that they will eventually overlap with one obscuring the other. Next Window will select the overlapped View. Previous Window will select the previously overlapping View.

The item in the next divisor, Layouts, was explored in the previous lesson. Here you have the option to select from several pre-configured Layouts and any custom Layouts you’ve created. As seen previously, you can Save Layouts and Delete Layouts. Finally, if things get really, REALLY out of hand, you can select Revert Factory Settings to roll-back Unity to a simpler, trouble-free time.

It is advised that you backup custom Layouts. Since a Layout is not an asset, it cannot be backed up as part of a package. It can be located and duplicated through your OS however.

  • In Windows, select Start>Control panel>Appearance and personalization>Folder Options>View
  • Un-check Hide extensions for known file types
  • Download Agent Ransack from tinyurl.com/agentRansack for free
  • After scanning it for malware, install and run Agent Ransack
  • In Agent Ransack’s File name: field, type *.wlt which is the extension for Layouts.
  • In Agent Ransack’s Look in: field, select Local Hard Drives
  • playmakerLayout.wlt should return as a result; right-click it and select Copy
  • Create/open a back-up folder from within Windows, select the negative space within its window, right-click and select Paste

When you have occasion to re-use the Layout in a fresh install of Unity you can use Agent Ransack or other file-finding application to locate where Unity Layouts are stored. This would be accomplished by once again using the search term “*.wlt” and navigating to the relevant file location within Unity (typically this path is “C:\Program Files (x86)\Unity\Editor\Data\Resources\Layouts“). You would then copy and paste the playMakerLayout.wlt (or other custom Layout file) from the back-up location to the appropriate folder within Unity as identified through the file search procedure delineated above. While the rule is that you not move files into and out of Unity within your OS, Layouts are an exception.

In keeping with a theme of exceptions, the View selection hotkeys (eg Ctrl + 1) are excepted from the advice that you use hotkeys whenever possible. It is typically necessary to select a GameObject in a particular View which does double-duty of selecting the View as well. As a result, hotkey selection of Views becomes redundant, perhaps even slowing. That being said, should you determine otherwise from personal experience, the hotkeys are listed here in the Windows drop-down menu along with all of Unity’s standard Views (note once again that Playmaker Views are selected from the Playmaker drop-down).

Vuforia Configuration relates almost exclusively to Augmented Reality development.

Asset Store opens the Asset Store View. The View is by default docked to the right of the Game View. Package Manager allows you to see which Unity-authored Packages you have installed, their version, documentation, licenses, and changelog. Alternately you can view all of the available official Unity Packages. Currently installed Packages have a version number that appears as a button. Clicking the button elicits a drop-down. You can view the drop-down to see if there are any updated versions to choose from. If you select a different (ideally more recent) version, it will give you the option to update the Package. Always be sure to create a back-up .unitypackage of your Project before upgrading (or downgrading) anything!

Asset Management opens access to Collab History and Version Control. These options help development teams share resources in such a way that ensures everyone is on the same page in terms of software, Project, Assets, and the Versions thereof. Once again, as a novice, the scope of your Project should be limited to the extent that you shouldn’t have to make use of Version Control systems. These Views only come into play when working with a team of developers.

Most of the Views you can select from in the following divisor are all aptly named and self-explanatory. If, for example, you need to work with Text Mesh Pro tools, open the View named Text Mesh Pro. We have worked inside many of the Views listed here already. The most useful of these Views will be discussed in greater detail in upcoming lessons. Important Views that are not relevant to our project will be summarily defined. Those Views that are irrelevant to our objectives will be touched upon only briefly.

General collects all of the default Views into a drop-down menu. Again, it is not especially useful to select these Views from here as they are already in play in the default layout. Test Runner opens a debugging View. Since we will be using Playmaker for most of our debugging, this View is not especially useful to us.

Services opens the services View. In it appear three text items that serve as tabs; SERVICES, which describes and allows you to turn on and off web-based services: Ads, Analytics, Cloud Build, Cloud Diagnostics, Collaborate, In-App Purchasing, and Multiplayer. Thereafter are AGE DESIGNATION, which when checked, will presumably augment your build with all the necessary legalese, and SETTINGS, which most importantly will allow you to change the name of your Project if necessary. SETTINGS also allows you to change the publishing organization, view the UNITY PROJECT ID (and Unlink project if need be) and links you to Project MEMBERS management, among other things. Since the scope of our Project is purposely small enough to be completed by one person, we needn’t worry ourselves with Collab or Services.

Active Tool spawns a wholly unnecessary View that corresponds to whatever Toolbar Tool you have selected. It seems entirely redundant.

Rendering exposes several light-related Views. Lighting Settings opens the Lighting View and hosts a long list of options which will be explored in upcoming lessons. Make a note now though that this is where your skybox maps go. It is also where Lightmapping parameters are set. Lightmapping is the process of calculating lighting effects and “baking” them (creating a texture map) ahead of run-time. The resulting texture map cheat sheet can then tell the game how to light a scene. The up shot is computational resource savings, savings, savings! Light Explorer serves as a perhaps easier way to select and edit Lights, Reflection and Light Probes, and Static Emissives (the Area of Effect for stationary Self-Bright Materials). This View offers an alternative to selecting and editing lighting elements in the Hierarchy and Inspector Views. Occlusion Culling is a feature that determines what the player can see, and eliminates what is occluded (blocked from view) from its rendering routine. After all, if it can’t be seen, why draw it? This too saves on resources.

Animation is a part of Unity’s legacy animation system. It is still occasionally useful for syncing sounds with animations. Animator and Animator Parameters represent an animation state-machine not unlike Playmaker. These elements will require entire lessons to explain.

Audio. As mentioned, it is probably best to edit audio outside of Unity when possible. All of our project’s audio will be imported ready-to-go and controlled through Playmaker.

Sequencing elicits Timeline, which is also selectable from the Assets drop-down and was discussed previously.

Analysis allows you access to several Views that provide important information about how your game performs. Profiler is used to analyze a game’s performance in terms of computational resources. It also allows a developer to test performance on other devices that share the editor’s local network. Frame Debugger allows you to step through your gameplay one frame at a time for the purpose of pinpointing troublesome rendering. Physics Debugger does much the same with respect to physics. Early on in your game development journey you shouldn’t seek to use Profiler extensively or proficiently, but strive instead to make a game without enough complexity to necessitate its use.

You’ll notice that the Views dedicated to optimizing performance are being glossed over. While many programmers consider it heresy not to optimize code, game developers consider it pragmatic. Our singular driving impulse is to “finish” our game’s development. All other concerns must be cast aside for the time being; see to it that your power animal is a penguin.

“Sprite” is something of a blanket term for 2d graphic elements and Sprite Editor allows you to, you guessed it, edit Sprites. Like packing clothes more tightly into a suitcase in order to save space, Sprite Packer packs 2D images more closely together to save on resources. It is greyed out and unusable by default but can be enabled through Edit>Project Settings>Editor. Tile Palette allows you to quickly and easily paint Tiles onto a grid. Both are found under the 2D menu selection.

AI relates to Navigation. Clicking Navigation spawns a Navigation View. Like Lightmapping, the Navigation View allows the developer to pre-compute an otherwise resource intensive task. In the instance of Navigation, what is being “baked” is the process of pathfinding. Many games will need GameObjects to be able to get from one side of a map to another. This is easier said than done. A Non-Playable Character, or NPC, has to be able to determine all possible paths and then “decide” on the best path according to variable criteria. There will also be occasions when the choices the NPC makes should be randomized and perhaps even faulty. These processes necessitate a relatively complex AI system. The aim of a well-engineered engine though is to provide the types of functionality commonly needed by developers, and pathfinding is one such need. Unity, being a well-engineered engine therefore provides this relatively complex functionality in Navigation View. With this View selected, a Navmesh Display window opens up in the Scene View. A NavMesh is essentially a connected network of waypoints that an AI uses to navigate.

XR reveals Holographic Emulation. It is not within the purview of this course. Likewise, the Experimental option will not be used.

UI leads to UIElements Samples. This course’s Project will rely on Playmaker for managing the User Interface. It will be covered in an upcoming lesson.

In this lesson we looked at the distinction between Windows and Views. Some of Unity’s Layout configurability was revisited. Layout management was addressed. Like any indie game developer worth his/her salt, we glossed over anything to do with optimization!

Leave Comment

Your email address will not be published. Required fields are marked *