Tools
The scene context and tools used to interact with and place instances.
Last updated
The scene context and tools used to interact with and place instances.
Last updated
The InstanceToolContext
is the primary method for interacting with instances within the scene. You can activate this context by clicking the icon (three yellow dots) above the built-in toolbar. The InstanceToolContext
enables manipulation of instances using built-in tools such as Move, Rotate, and Scale, and also provides a suite of placement tools for creating new instances.
To activate the InstanceToolContext
, click the icon (three yellow dots) above the built-in toolbar. This context is ideal for modifying instances within an InstancedMeshContainer
or for creating new instances. Note that instances managed by this context do not have associated GameObject
s and are not visible in the scene hierarchy. The context allows you to treat these instances as part of the scene, offering full control over their placement and manipulation.
Activation:
Ensure your Unity project has Flora installed and set up.
Open the SceneView and locate the built-in toolbar.
Click the InstanceToolContext
icon (three yellow dots) to activate the context.
The InstanceToolContext
extends Unity's EditorToolContext
class and offers the following built-in manipulation tools:
Move Tool: Move instances within the scene.
Rotate Tool: Rotate instances to the desired orientation.
Scale Tool: Scale instances to the appropriate size.
Transform Tool: Transform instances by combining movement, rotation, and scaling.
When the instance context is active and one of Unity's built-in tools is selected, you can interact with instances just like any other scene object. Even without a GameObject
attached, you can select instances using picking or the rect selection tool and adjust them with the built-in tools.
Tips for Effective Selection:
Use the picking tool (left-click) for precise selections.
Use the rect selection tool (click and drag) for bulk selection of multiple instances.
Remember that selected instances can be manipulated just like regular scene objects.
Upon selecting an instance, the instance inspector overlay appears, displaying the transform properties of the instance. This inspector allows for precise adjustments, including position, rotation, and scale.
The InstanceToolContext
also provides specialized placement tools for creating and modifying instances:
Place Tool: Place instances one a time in the scene.
Paint Brush: Place many instances within a brush based on settings in the prefab's InstancedPrototype
.
Erase Brush: Remove unwanted instances from the scene.
Fill Tool: Populate a mesh or terrain with instances.
Scale Brush: Scale groups of instances up or down within a brush.
Instanced Property Brush: Modify instanced material properties directly.
Common Workflows:
Place Tool: Ideal for placing individual instances in specific locations.
Paint Brush: Efficient for scattering instances like foliage or rocks across a terrain.
Erase Brush: Quickly remove misplaced or unnecessary instances.
Fill Tool: Useful for evenly distributing instances across a surface.
The placement options overlay is visible when any placement tool is active. This overlay provides additional settings that influence how the tools behave, allowing for fine-tuned control over instance placement.
Layer Mask: Defines which layers are considered when ray-casting against surfaces. Adjust this to exclude certain layers.
Object Mask: Determines which objects can be painted on. By default, both MeshRenderer
and Terrain
objects are included. You can customize this mask and include the LinkedObject
mask for painting on instances with linked GameObjects.
Some tools will offer additional options and you will see them and modify them in the options overlay.
The prototype overlay lists the prefabs available for painting. You can add prefabs to this list using the plus icon, provided they are MeshRenderer
or LODGroup
prefabs.
Managing Prefabs:
Adding Prefabs: Click the plus icon to add a new prefab to the list.
Activating Prefabs: Use the checkbox at the top-left to activate prefabs for painting. Multiple prefabs can be active simultaneously.
Filtering: Use the search box or asset labels to filter the list of prefabs, making it easier to find specific assets.
Here are the default shortcuts for quickly accessing various tools and functions within the InstanceToolContext
Key | Action |
---|---|
Tab
Enters or exits the instance context.
Esc
Exits the instance context.
F1
Activates the placement tool.
F2
Activates the paint brush.
F3
Activates the erase brush.
F4
Activates the scale brush.
F5
Activates the instanced property brush.
A
Hold to change the strength of the tool.
S
Hold to change the size of the tool.
D
Hold to change the adjustment of the tool.