Templates

Overview

Templates are a way to create convenient and reusable packages in Core. They can be modified 3D objects, complex models, scripts, completely scripted objects, or collections of all of these. Templates can be identified in the Project Content window by this icon: TemplateIcon

When to Use Templates

  • Saving templates locally allows you to make changes across every copy of the template across a project. When one template is updated, it updates every instance of the template.
  • Publishing a template privately allows you to import the template into other projects, re-using assets across games.
  • Spawn an object from a script to add a new instance of your template in your game.
  • Publicly publishing templates adds them to Community Content for others to use and modify for their own projects. This allows multiple creators to work on a template, adding different variations, or more functionality. This publishing feature is covered in the next lesson.

Creating Templates

Create a Template from a Group

  1. Right click the group and select Create New Template from This.
  2. Name your template and click the New Template button.

Create a Template from Separate Objects

  1. If the assets are not in the Hierarchy, drag them from Project Content onto the Hierarchy or Main Viewport.
  2. Select the assets to be added to the template in the Hierarchy window using Ctrl + left click.
  3. Right click on one of the objects and select Group and Create New Template from These.
  4. Name your template and click the New Template button.
TemplateTut2

Once a group becomes a template, it will be blue in the Hierarchy. New templates can be found in Project Content > My Templates. From there you can drag out as many copies of the template as needed.

Hands-on: Create a template from the parent folder of your kitbashed bed.

Updating Templates in a Project

Once a 3D model is made into a template, it will resist changes besides positioning and resizing all of its dimensions together to preserve its basic shape. To make changes to the materials, dimensions, or individual pieces of a template, it will need to be deinstanced.

What is an instance?

A template can be understood as a recipe. Each time the recipe is made, that product is an instance of the template. Deinstancing would be making a change in the final product of the recipe, so that it is now different from the exact copies of the recipe. Changing the recipe itself — updating the template — should change every single instance of the recipe.

Deinstance a Template

To make changes to a template, you will need to first deinstance it. This can be done automatically by making a change to the template.

  1. Make a change to a component or property of an object in the template.
  2. Click Yes when the prompt appears asking if you want to deinstance the template.

Update all the instances of the same template

The first screenshot is a deinstanced template that has been modified. The other two templates at the back are not yet updated. The second screenshot was taken after right-clicking on the deinstanced template and selecting Update Template From This. The deinstanced template is now an instance of the template and all the other instances are updated.

The closest instance of the template is deinstanced to change the materials.
This new style has been applied to all the instances of the same template.

Post a comment

Leave a Comment

Scroll to Top