Rasagar/Library/PackageCache/com.unity.visualeffectgraph/Documentation~/sample-learningTemplates.md
2024-08-26 23:07:20 +03:00

6.8 KiB

Learning Templates Sample Content

The Learning Templates sample is a collection of VFX assets designed to help you learn about VFX Graph concepts and features. This collection will be updated based on community feedback and new features. This page provides instructions on how to install the sample, a brief overview of the content, and how to make the most of it.

Requirements

This sample content is compatible with both URP and HDRP projects, for VFX Graph versions 16.0 and later.

Installing the VFX Learning Templates

To install this sample, first install the Visual Effect Graph, then:

  1. Go to Window > Package Manager.

  2. From the Package list view, select Visual Effect Graph.

  3. If it is not there:

    1. From the Packages drop-down menu, select Unity Registry or In Project.
    2. Go to Edit > Project Settings > Package Manager
    3. In the Advanced Settings drop-down, enable Show Dependencies. Visual Effect Graph should now appear in the Packages list view.
  4. In the main window that displays the package's details, find the Samples section.

  5. To import the sample into your project, click Import. This creates a folder called Samples in your project, and imports the sample you selected into it. Unity imports any future samples into this folder.

VFX Learning Templates overview

To start exploring the content of this sample:

  1. In your Project window, navigate to the sample Scenes folder:
  2. Depending on the Render Pipeline used by your project, either select the HDRP or URP version of the VFX Learning template scene.
  3. Right-click the scene and select Open the Scene.


Scene overview

Hierarchy

  1. Sample Showcase:

    The Sample_Showcase GameObject has a script called Samples Showcase, which contains a custom Inspector and a dedicated window. Select this GameObject to view information and useful links relative to each VFX in the Inspector.

  2. VFX Prefabs:

    • Each VFX instance is part of a prefab with a display mesh and some text information.
  3. Scene Main Camera:

    • This camera is used for the game view, and its viewpoint is controlled by the Showcase script. In Play mode, you can freely move the camera around.

Views

  1. Scene View:

    • You can use the Scene view to move around freely to find a VFX that interests you. Note that some visual effects require the Editor to be in Play mode.

  2. Game View:

    • You can use the Game view to focus on each VFX separately, via the Sample Showcase actions that control the camera. If you prefer to explore freely, you can use the Main Camera.

Inspector

  1. Sample Showcase window:

    • The Sample Showcase window displays useful information and documentation related to each VFX. You can also use this window to navigate between the various visual effects, and use the quick-access links to open them.


Inspecting a VFX

Each VFX covers a feature or aspect of VFX Graph, and illustrates what you can do with those features. Each VFX is accompanied by documentation and embedded explanations to help you in your learning journey.

Sample Showcase window

To open the Sample Showcase window:

  1. In the Hierarchy, select the Sample Showcase GameObject.
  2. In the Inspector, select Open in window.

Image key:

  1. Drop-down list and button to select which VFX to display in the Sample Showcase window.
  2. Links to either highlight the VFX in the Hierarchy, or open it in the VFX editor.
  3. Description of the current VFX, and information about the feature or key aspect illustrated by the VFX.
  4. The feature or key aspect of the VFX, with links to related documentation.

Opening a VFX asset

To open a VFX asset, you can do one of the following:

  • From the Project window:

    1. Navigate to the sample project's VFX folder:
      Assets\Samples\Visual Effect Graph\17.xx\Learning Templates\VFX
    2. Select the desired VFX assets.
    3. Right-click the selected assets, and select Open.
  • From the Hierarchy window:

    1. Open the VFX Learning Templates scene.
    2. In the Hierarchy window, select the prefab that you're interested in.
    3. Unfold the Prefab hierarchy:
      Prefab > TurntableWithBackdrop_VFX > VFXGameObjectName
    4. Select the VFX GameObject.
    5. In the Inspector, find the Visual Effect component.
    6. Select Edit.
  • From the Sample Showcase window:

    1. Open the Sample Showcase window.
    2. Use the drop-down menu or arrow button to select the desired VFX.
    3. Select Open VFX.
  • From the Template window:

    1. Open the Sample Showcase window.
    2. Use the drop-down menu or arrow button to select the desired VFX.
    3. Select Open VFX.

Inside a VFX

The best way to learn and understand how a VFX has been made is to look inside. Take a look at the different parts of the Graph and the embedded notes.