Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
19. June 2018


At Unite Berlin 2018, Unity announced much improved prefab support in Unity.  The release is available in a special preview download version that is available here.  This new approach to prefabs gives you a lower level of granularity in how you split your scene up.  Perhaps most impressive to the new functionality to enable prefabs to be made up of other prefabs that in turn are made up of other prefabs.

Details of the preview prefab workflow from https://unity3d.com/prefabs:

Improved workflow

The new Prefab workflows, which are now available as previews, allow you to split up scenes and Prefabs on a granular level. This gives you greater flexibility, increases your productivity and enables you to work confidently without worrying about making time-consuming errors.

The improvements are based on surveys with more than 150 enterprise customers, numerous interviews, several usability tests and two game jams. The long-term goal has been not only to implement support for nesting, but to rethink the core Prefab workflows so different team members can simultaneously edit Prefabs confidently and efficiently.

Nesting

Greater flexibility

Previously, users were forced to choose between creating large monolithic Prefabs, like buildings, or more granular ones, like pieces of furniture, but they couldn't do both.

Now with support for nested Prefabs, a large building can be made up of many smaller room Prefabs, which in turn can be made up of multiple pieces of furniture Prefabs, and so on.

Productivity booster

This makes it easier for teams of all sizes to:

  • Split up Prefabs into multiple entities for greater efficiency
  • Reuse any content, from small to large
  • Work on different parts of content simultaneously

Prefab Variants

Flexible properties increase efficiency

As a default, a Prefab Variant inherits the objects and properties of the Prefab it is a variant of, but at the same time, you have the possibility to override those properties. This is similar to the concept of inheritance in object-oriented programming.

For example, if you had multiple door Prefabs, you could choose to make some of them a different color, while allowing the rest to inherit the existing Prefab color property. Any change made to the original door Prefab will affect the variants of it as well, except those properties which have been overridden.

Prefab Mode

Avoid time-consuming mistakes

A cornerstone of the new workflows, Prefab Mode enables you to edit in isolation. While this means that you will have to approach Prefab editing in a slightly different way, you can feel secure that any errors made will not have negative consequences.


You can learn more about the new prefab system in the prefab documentation.  There is also a sample project available for download here.

GameDev News


19. June 2018


After more than a year of development GitHub for Unity 1.0 is finally here.  GitHub for Unity enables you to fully support git version control directly inside the Unity editor, including support for large media files using GitHub LFS (Large File Support). 


Details of the release from the GitHub blog:

What’s new in 1.0

Since releasing the beta version in March 2018, we’ve made new improvements to the user experience and shipped several bug fixes. Version 1.0 also includes:

  • File locking improvements: File locking management is now a top-level view within the GitHub window, giving you the ability to lock or unlock multiple files
  • Diffing support: Visualize changes to files with the diffing program of your choice (set in the “Unity Preferences” area) directly from the “Changes” view in the GitHub window

  • Reduced package size: Previously, the package included full portable installations of Git and Git LFS. These are now downloaded when needed, reducing the package size to 1.6MB and allowing us to distribute critical Git and Git LFS updates and patches to you faster and in a more flexible way

  • Notification of updates: Get a notification within Unity whenever a new version is available. You can choose to download or skip the current update

  • Email sign-in: Sign in to your GitHub account with your GitHub username or the email address associated with your account

  • Improved Git and Git LFS support for Mac

  • A Git action bar for essential operations

  • And many bug fixes and improvements throughout


You can download GitHub for Unity directly from GitHub or on the Unity asset store.

GameDev News


29. May 2018


If you are a pixel artist, one of the most challenging tasks you have to deal with is handling multiple resolutions and aspect ratios that your game might run at.  Thankfully if you are using the newest (Unity 2018.2b3 or later) version of Unity there is now a new component that makes this job borderline trivial.

Announced in the following tweet:

image


You can download the component and a couple sample scenes here on Github, and you can read more about it here.

The 2D Pixel Perfect package contains the Pixel Perfect Camera component which ensures your pixel art remains crisp and clear at different resolutions, and stable in motion.


It is a single component that makes all the calculations needed to scale the viewport with resolution changes, removing the hassle from the user. The user can adjust the definition of the pixel art rendered within the camera viewport through the component settings, as well preview any changes immediately in Game view by using the Run in Edit Mode feature.

Using the camera is simple, once the package is installed, it’s simply added to a camera and configure:

image

Your game should now scale gracefully across resolutions and aspect ratios.  To see the Pixel Perfect Camera in action be sure to watch this video, also embedded below.

GameDev News Art Programming


7. May 2018


Hot on the heels of the Unity 2018.1 release, the next beta Unity 2018.2 has just been made available.  There are several new features in this release, a lot building on the new functionality in 2018.1 that is still in preview mode, and one new feature that is absolutely game changing for me.

High DPI Monitor Support

If you are an owner of a 4K monitor, you can now enjoy High-DPI scaling support on both Linux and Windows in the Unity Editor.


Finally!  No more blurry fonts on High DPI monitors.  Better late than never I suppose.  Other features of this release include:

  • Texture Mipmap Streaming
  • Package Manager Update
  • Particle System Improvements
  • Camera Physical Properties
  • Animation Jobs C# API
  • Vulkan support in the Editor on Windows and Linux


There are a boatload of other fixes and improvements in this release, be sure to check the release notes for more details.  Click here to download Unity 2018.2 beta.  Of course the standard caveats apply, this is a work in progress build, so expect some bugs and do not use in production.  That said, as a High DPI monitor user, I’m tempted to ignore my own warning in this case!  You can also read more about this release on the Unity blog here.


The following video shows the new improved High DPI functionality in Unity 2018.2 in action:

GameDev News


3. May 2018


Unity 2018.1 was just released and one of the major new features is Shader Graph, a new visual programming language for creating shaders.  In this article we are going to look at how to enable and use Shader Graph.  There is also a video of this tutorial available here or embedded below.


First off, to get started using Shader Graph, be sure to be using Unity 2018.1 or later. 

Next, start Unity and create a new project.  I used the following settings:

image

Shader Graph is fully compatible with the new light weight render pipeline.  For the record, Shader Graph does NOT work with the current HD pipeline, this feature is under development. There is no need to add any new packages… yet.  Once ready, click Create Project.  Once your project is loaded, go ahead and create a new scene.

image


We need some kind of object to apply our shader to, simply right click the newly created scene in the Hierarchy view, select Create->Sphere.

image


Now we need to enable Shader Graph functionality in Unity.  Click Window, then select Package Manager.

image


In the resulting window, select All, then Shadergraph, then Install.  This will take a few seconds.

image


Now that Shadergraph is enabled, let’s create one.  In the Project panel, I created a new folder called Shaders.  Right click the newly created folder and select Create->Shader->PBR Graph.

image


I called mine MyShader, name yours whatever you want.  Except Dilbert; that’s a stupid name for a shader!

image


One more small bit of setup before we start creating shaders!  We need to create a material that we will attach our shader to and ultimately apply to our sphere mesh.  Right click the Materials folder and select Create->Material.

image


I called mine MyMaterial, again, name yours whatever you want… even Dilbert.  Make sure your shader is selected and showing in Inspector, then simply drag and drop your newly created shader on it.

ApplyingShader


Finally drag your material to the Sphere you created earlier.  Phew… ok, time to create our shader.  Simply double click the shader and the Shader Graph editor will be create.  A new project should look something like this:

image

You can zoom the design surface in and out using the mouse wheel, hold down the middle mouse button to pan the surface around.


The PBR Master can be thought of as the ultimate output of the shader.  You have a choice between Metallic and Specular by dropping down the workflow tab.  The blackboard is the section to the top left and can be used to configure parameters as we will see in a moment.  The bottom right region is a preview of the shader, this window can be resized.


Create a shader is now a matter of creating a network of nodes and connecting them together.  Let’s show a simple example of connecting a texture map to the Albedo channel.  Right click an empty point on the canvas, select Create Node->Input->Texture 2D Asset.

CreatingATextureNode


Now click on the red circle to the right of out and drag to an empty portion on the canvas.  Select Input->Sample Texture 2D, then connect the RGBA out pin to the Albedo in pin on the PBR node, like so:

ConnectingTheTexture


At this point, we have the equivalent of a diffuse texture defined in our shader, now head back to the Texture 2D Asset, click the little circle to the right of the texture field and select a texture to apply.  Pick a compatible texture from your project. 

image


You shader preview should now show the updated texture:

image


Now what if you wanted the texture to be defined as a parameter in the editor instead?  This is where the Blackboard comes in.  In the Blackboard, click the + icon to the right side, then select Texture.

image


Name it however you want, I called it SourceTexture in my case.  Also optionally provide a default texture value using the example same process we just did above.

image


Now let’s replace our hard coded texture with a parameter instead.  You can remove a node by left clicking it and hitting the delete key.

ConfigureAProperty


Now this parameter can be defined in the editor.  Select the Sphere we created then applied our material too in the Hierarchy view.  In the Inspector under the Material, you will now see a new parameter matching the name you just provided:

image


You can also easily see the source code generated by a shader by right clicking the output node and selecting Copy Shader.

image


The HLSL code of the shader will have just been copied to your clipboard.


So, that’s the basics of using Shader Graph.  Now it’s mostly a matter of creating the appropriate input nodes, modifying them and connecting them to the appropriate in pins on the PBR Master output node.  Getting into the details of how this works is beyond the scope of this tutorials, shader programming is a VAST subject and could fill many books.  I’m not going to just leave you hanging though…  now that you know how to enable and use the tools to create Shader Graphs it would be an ideal time to get your hands on some samples and dig deeper.  Thankfully Unity have provided exactly that, available for download here on Github.


The Video

Art Design


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List