• Stars
    star
    555
  • Rank 80,213 (Top 2 %)
  • Language ShaderLab
  • Created almost 5 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example Project for the new Unity Input System

Unity Input System - 'Warriors' Example Project

warriors.png

Overview

Description

This Unity example project has been created to demonstrate a variety of tools and functionality with Unity's Input System.

You can learn more about the Input System here: https://unity.com/features/input-system

Input System Demonstrated Scenarios

  • Input Action Control Scheme for basic Player Controls (Directional Axis for Movement, Button press for Attack)
  • Setting up Keyboard and Generic Gamepad bindings to the Control Scheme
    • Tested with the follwing controllers: PlayStation Dualshock 4, Xbox One and Nintendo Switch Pro
  • Instancing multiple Player Controllers for a local multiplayer setup
  • UI Input (Virtual Joystick and Virtual Button) for Touchscreen Controls
  • Runtime switching between Player Control and Menu Control Action Maps
  • UI for rebdining action controls to new buttons and joysticks
  • Displaying connected device data in both Screen Space and World Space UI
  • Callbacks for an Input Device runtime disconnecting and reconnecting

Other Demonstrated Scenarios

  • Universal Render Pipeline's Camera Stacking for Overlay UI
  • Universal Render Pipeline's Scriptable Render Pass for Scene Blur UI Overlay
  • Universal Render Pipeline's Integrated Post-Processing for Tonemapping
  • Nested UI Prefab for Displaying Input Device Information
  • Shader Graph for filtering a Mask Map for Team Colors
  • TextMesh Pro for rendering Screen Space and World Space UI Text
  • Scriptable Object for storing Device Display Colors and Display Names

Project Versions and Branches

Important: The project is in continuous development and improvement! Branches are used as 'time-stamps' for project states for Webinars.

Tech Info

Unity Version

Packages

  • com.unity.inputsystem: 1.0.0
  • com.unity.textmeshpro: 2.0.1
  • com.unity.render-pipelines.universal: 7.3.1

Hardware

This example project has been developed and tested with the following input devices:

  • Keyboard
  • PlayStation 4 Dualshock Controller
  • Xbox One Controller
  • Nintendo Switch Pro Controller
  • Android Samsung Galaxy S9 (Touchscreen for Virtual Joystick and Virtual Button)
  • Mouse (For simulating touchscreen input in the Unity Editor)

Software

This example project was developed and tested on Windows 10.

Usage

This example project is publicly available for you to:

  • Use as a learning resource for the Input System or any other implemented feature & tool
  • Use as a foundation for building your own projects
  • Extract code, assets and information for your own projects

If you do use this example project in some form, please feel free to contact Andy Touch (andyt[at]unity3d.com); he'd love to hear from you about your your experience with it!

Credits & Feedback

This example project is developed by Unity Technologies and has involvement from R&D, Product Management, Product Marketing and Evangelism.

If you have any feedback or questions about Unity's Input System, you are invited to join us on the forums: https://forum.unity.com/forums/new-input-system.103/

If you have any issues, errors or feedback about the example project; you can open an issue on this repository or send an email to andyt[at]unity3d.com

Technical Disclaimers & Known Issues

  • The GameManager script has a toggle for spawning a group of Warriors at Runtime.

    • The number of warriors that is spawned is based on a fixed integer variable (manually set in the Inspector), and is not based on the number of input devices connected and detected.
  • When opening the project for the first time, the Pause Menu Screen Blur Effect might not be rendering.

    • To fix this, locate the UniversalRenderPipeline_Renderer_MenuBlur asset and add the Kawase Blur Render Pass to the Renderer Features

More Repositories

1

open-project-1

Unity Open Project #1: Chop Chop
C#
5,672
star
2

ShaderGraph_ExampleLibrary

A library of Shaders created using Unity's Shader Graph.
ShaderLab
1,756
star
3

ATerribleKingdom

Scripting the Timeline for games in creative ways. Includes a small RTS game build on the 'A Mighty Kingdom' assets
C#
786
star
4

AngryBots_ECS

The DOTS project used for the presentation Converting Your Game to DOTS
C#
666
star
5

MinecraftECS

This is a Workshop Project that made for a User group talk in Taiwan, It's about how to create a Minecraft like environment with huge number of blocks using ECS
C#
550
star
6

MachineLearningRoguelike

A small Roguelike game that uses Machine Learning to power its entities. Originally used in talks by Ciro & Alessia.
C#
438
star
7

LoadyDungeons

Demo for CCD+Addressables training and workshops.
C#
250
star
8

LWRPScriptableRenderPass_ExampleLibrary

ShaderLab
246
star
9

PhotoMode

A virtual photography system for creating in-game screenshots and photographic effects within Unity projects.
ShaderLab
232
star
10

Presentation

No need to switch to Power Point anymore.
C#
231
star
11

URP-Defender-Character-Demo

TressFX Hair plugin (Beta), Character Package, and Hairstyles assets for Universal
HLSL
223
star
12

Test_ShaderGraphBlog

Example Project to demonstrate Vertex Animation Shaders using Shader Graph.
C#
223
star
13

AngryBots2

C#
213
star
14

GalacticKittens

Get started making multiplayer games with Netcode for GameObjects
C#
196
star
15

PaddleGameSO

A demo project to showcase design patterns and game architecture using ScriptableObjects
C#
179
star
16

SpaceShooterECS

The ECS project originally developed with Intel for GDC 2018
C#
151
star
17

HDRP-Defender-Character-Demo

TressFX Hair plugin (Beta), Character Package, and Hairstyles assets for HDRP
C#
122
star
18

DOTS_Pong

This project is a simple creation of the classic Pong game with a DOTS implementation. The focus was on simplicity and using the latest entities syntax (as of 2019.3 beta and Entities 0.3.0-preview.4).
C#
119
star
19

ProceduralPatterns2D

C#
112
star
20

2D_IsoTilemaps

C#
87
star
21

Pre-Baked-360

Making high quality levels for mobile platform using 360 videos and images. feel free to use it by all means.
C#
81
star
22

UniteNow20-Persistent-Data

Example Scripts for the UniteNow 2020 Persistent Data talk
C#
69
star
23

Lightmapper-FPSSample-TheInspection

C#
48
star
24

PrefabWorkflows_3DGameKit

Demo Project showing the new Prefab Workflows: Prefab Mode, Editing and Nesting!
ShaderLab
35
star
25

PrefabWorkflows_SpiderRobots

Demo Project showing the new Prefab Workflows: Prefab Mode, Editing and Nesting!
C#
33
star
26

UniteNow20-RuntimeProfiler

Example scripts from the UniteNow2020 Persistent Data talk
C#
30
star
27

ParticleFeatures_2018.3

C#
30
star
28

NavMesh-Feature-Demo

The NavMesh demo for the new Unity 5.6 Navigation Features. This is the project that was used at GDC as well as Unite AMS
C#
27
star
29

Substacnce-Painter-To-Unity

C#
22
star
30

PrefabWorkflows_UIDemo

ShaderLab
20
star
31

blockyourfriends

C#
17
star
32

Unity-Entities-Dodge-the-Bullets

Unity Korea Entities(ECS) tutorial project
ShaderLab
15
star
33

AR_Industrial

AR Foundation project showing off functionality for HoloLens 2 and mobile
ShaderLab
12
star
34

PiXYZWorkShop

C#
10
star
35

BuffaloKing

Buffalo King is a Slot Machine game (demo) showcasing 2D animation and rigging workflows.
ShaderLab
9
star
36

ShaderGraph_HDRPNodes

C#
8
star
37

2D_RiggedCharacters

5
star
38

LightingWorkshop

C#
5
star
39

TankDotsWorkshop

Project used for the Unite India workshop on DOTS, similar to the one delivered at Unite CPH.
C#
4
star
40

ARFarm

ARFarm
Mask
3
star
41

SpriteRigging_ToonCharacters

2
star
42

Unity-KOR-Uday-Entities-Sample

Very Simple Sample for Unity Korea Uday - Let's dive into Entities session
Mathematica
2
star
43

DCC-RoundTripping

Digital Content Creation and round-tripping between Autodesk 3DS Max, Autodesk Maya and Unity.
C#
1
star
44

letsdev_ep1

C#
1
star
45

TooTooBaby-CartoonsUsingUnity

I will walk through how to make a cartoon show in Unity #UnityForFilm
1
star