Вы находитесь на странице: 1из 23

Major Components

• Full 2D & 3D support


• Terrain building & SpeedTree support
• Physics
– Nvidia Physx3 & Box2D
• Over 22 platforms supported
• Real time GI & Physically based shaders
• Mechanim Animation system
• Asset Store
Visual Studio Tools for Unity
• Use Visual Studio to edit & debug code
• Integrates VS with Unity
• Provides
– Shader syntax highlighting
– Code templates
– Intellisense
– Full debugging support
– Better debug visualization
VSTU
Game Design Document
• Start with one
• Blueprint of your game
• Living document, provides reference point
• Some prefer a single page
• Describes game play, mechanics, story line, and more
• Easy to get lost without one
Standard Shader

• Why another shader?


• Two types – default (metallic), specular is other
• You can customize the shader
– Source available
• All new materials use it by default
• Caution when importing models
– Legacy textures may be set
New Skybox

• Skybox is a material, with a skybox shader


– 6-Sided
– Cube Map
– Procedural
• HDRI Support (High Dynamic Range Image)
• Can dynamically control properties
Lighting

• 4 types of lights
– Directional, point, spot, area
• Lighting is expensive
• What’s baking?
Global Illumination

• Real time system powered by Enlighten


• Cache can grow large, note size
Reflection Probes

• A tool for creating high-quality, localized reflections.


• Captures surround environment on sphere, reprojects as
cubemap on relflective objects.
• Place as needed through scene, smaller high-detailed objects up
close.
• Blend Probes and Box projection for hallways type
environments.
• Lightmap static
Animation

• Unity supports two animation systems


– Legacy
– Mechanim – Uses .ani file and animation controllers
• New features targeted at Mechanim
– AnimationStateBehaviors
– No more:
• animator.GetCurrentAnimatorStateInfo(0).isName(“Attack")

• 2D Root Motion
• Can use API to create animation controllers
Zombie Animations

• New AnimationStateBehaviors
• New Any State & Exit State

Entry
Walk
Any State Exit
Died
Idle
Audio

• Previously, all audio played through single AudioSource


• No control over various levels, mixing, controlling groups
• New mixer allows precise control, signal routing, effects
• Can edit in play mode
• Unity supports custom plugins
– http://docs.unity3d.com/Manual/AudioMixerNativeAudioPlugin.html
• Profiler supports audio
Coin pickup

• Typical process is check trigger, increment score


• A PlayerScore component tracks score
• Simply a variable to track inventory
• Challenges of UI / Rotation
Zombie Score

• Get references to player score


• If we hit the player, tell someone about it.
– Some will check on the player for a hit
Enabling Mobile Input

• Input system reads values (button, keys, controller, arrows)


• Input.GetButtonDown(“Fire1”)
– Works on Mobile for touch only!
• Input.GetAxis(“Horizontal”) works with keyboard
– Doesn’t work on mobile (no keyboard)
• Solution – track image position on screen and read virtual values
• Third party assets like EasyTouch
• Code exists in CrossPlatformInput
Perspective

• Default Camera Mode


• Viewing area defined by field of view
• Clipping planes define min and max viewing distance
Orthographic

• Common for 2D
• Further away objects = same size
• orthographicSize is how many units = ½ height
• Fixed height, width variable by aspect ratio
Unity UI

• Allows placement of one or more Canvas game objects


• Can overlay or project from other areas onto screen
• Allows for scaling, pixel perfect, even measurement based
drawing
• Text & Image components + script form bulk of UI components
• Based off NGUI initially, completely separate though
Canvas

• Various canvas modes


• UI Elements MUST be in a canvas
• Event system detects actions to send to components in canvas
• Three modes
The RectTransform

• Critical portion of Unity UI, used instead of Transform for UI


• Defines
– location, rotation
– Defines anchors for positioning, pivot for rotation, and size
Enhancing the game

• Pickup text
• Other effects
• Particles
– Optimized system
– Can include animations and physics
Windows 10 powers a huge range of hardware…
Phone Phablet Small Large 2-in-1s Classic Desktops
Tablet Tablet (Tablet or Laptop) Laptop & All-in-Ones

Surface Hub Xbox Holographic IoT


The Build
• Windows 10 supports device families
• Will ship with Mobile and Desktop families
• Additional will come
– Xbox, HoloLens, etc.
• Multiple builds still work
• Can use Asset Bundles to dynamically load assets
• Requires Unity 5.2 (currently in private beta)

Вам также может понравиться