Relevant VE2 documentation is linked at the bottom of this page

Introduction

In this course, we’ll be building a simple 2-player game. One player will shoot a target with a ping-pong gun, earning points for each hit within the time limit. The other player will be tasked with moving the target, with the aim of making it difficult to hit accurately.

Lesson One

VE2’s Plugin/Framework Architecture

Throughout this course, you’ll be building a VE2 Plugin that will slot into the VE2 Platform. To understand the relationship between these two systems, so the following page in the docs:

Plugin/Framework

VE2 Setup

As with any software project, the first step is to install the required development tools, and set up your project. Instructions for this are found in the Installations and Setup page, linked below

Installations and Setup

<aside> 📝 Exercise One - Set up a VE2 scene

V_ToggleActivatables

VE2 builds on Unity’s component system by providing a number of additional, configurable components. The first and simplest of these is the V_ToggleActivatable. These function as “switches” that are toggled between “on” and “off” when the player clicks on them. When this happens, the activatable will emit events, that you can use to trigger behaviours on gameobjects, or other monobehaviours, including your own scripts.

<aside> ℹ️

As you’ll see throughout the course, these configurable components provided by VE2 have a V_ at the start of their name, to distinguish them from Unity’s own built-in components. During the course we may refer to them interchangeably with and without the V_, but the component name in Unity will have the V_!

</aside>

Your scene should already include an example of a V_ToggleActivatable (on the far left) This is pre-built with a particular style, meaning it already has a model, sound effects, and animations. None of these are required for an activatable to work - simply attaching a V_ToggleActivatable to any gameobject with a non-trigger collider will give you the on/off functionality, so you can use your own models and styling.

image.png

You can click here to read about V_ToggleActivatables in more detail on the docs page to understand all their configuration options. The most important thing to understand, however, are the OnActivate and OnDeactivate events. The toggle activatable in your scene is set up to animate (via the V_PositionTwener) and play a sound (via the AudioSource) when it activates and deactivates. These are purely for style and audiovisual feedback, rather than achieving actual functionality in the scene, so you will want to add more listeners of your own to these events if you actually want it the button to do something

image.png