-
unity input manager
- edit / project settings
-
Usual objects
-
Controllers
- Character controller
- camera controller
- Status Controller
- animation_controller
- Inventory_controller
- Death / Damage Trigger
-
coroutine
-
yield
- WaitForSecond
- WaitForFixedUpdate
- Time.deltaTime
- Destroy function
-
Gizmos
-
class
- Color
- DrawWireSphere
- DrawIcon
- DrawGUITexture
- DrawLine
- OnDrawGizmos functions
-
Scripting
-
Javascript
- Naming conventions
-
Functions
- using customs function
-
MonoBehaviour functions
- Update: every frame
- LateUpdate: every frame after Update () finishes
- FixedUpdate: every physics time-step
- Awake: when the script is loaded at run time
- Start: called after awake and before the first update
- OnTriggerEnter
- OnDrawGizmos
- OnDrawGizmosSelected
- Reset
- onGui()
- Controls
- Base syntax
-
Variable
- Variable Declaration
- Variable types
- Base operation
-
animation class
-
member variables
- animation["Name"].layer = Value
- myAnimationClip.blendmode
- animation.wraPmode
- animation.isPlaying
- clip
-
functions
- animation.Play
- animation.IsPlaying
- CrossFade
- SyncLayer
- CrossFadeQueued
- PlayQueued
-
Specials
- This --> refers the current Game Object
-
Functions of interest
- Split
- ToString
- String.format
-
Unity GUI
-
Calling the GUI
- OnGui()
-
Other functions
- Rect(left_x_corner,left_y_corner,Width,Height)
- Screen.width
-
Customize GUI
-
GUIStyle
- Any control can take one last argument ; the GUIStyle
-
GUISkin
- Create with GUI SKIN ASSET
-
Controls
-
Buttons
- Simple buttons
- Repeat Buttons
- Sliders
- label and boxes
- Text Entry
- Toggle
- Toolbars and Selection Grids
- Windows
- GUI.BeginGroup - GUI.EndGroup
- GUI are attached to Camera
- C#
- Boo
-
Meshes
-
Animation
-
Multiple animation file
- naming convention: Object@animation_name
- split animation
- Import parameters
-
Composed meshes
- 1 meshe per part
-
Root meshe
- Character "rig" data
- Animation
- Dynamic
- Static
-
Assets
-
Organisation
- Audio
- Characters
- GUI
- Editor
- Particles
-
Props
- Meshes
- Textures
- Scene
- Scripts
- Skybox
-
Terrain
- Meshes
- Textures
-
Naming conventions
-
Textures
- _DIFF : Diffuse
-
Importing Asset
- Drag'n Drop in the asset directory
-
Texture
- Options
-
Meshes
-
Blender exported FBX's : Need to flip before exporting
- edit mode
- Select all Vertices
- CTRL - F : Flip Normals
-
Materials and Shaders
-
Meshes or other assets
-
Materials
-
Water
- Basic
- Standard asset script
- FX/water(simple) shader
- Material applied to a plane
- Cube
- Reflective color --> Reflection
- Reflective color cube --> Must be a reflection/Sphere mapped texture
- Wave NormalMap
- Wave speed
-
Skyboxes
- How-to
- Created from 6 separate textures
- _Back
- _Bottom
- _Front
- _Left
- _Right
- _Top
- SkyboxPlanner
-
Shader
- Coded
- ShaderLab
- Vertex Shaders
- Families
- Normal
- Opaque
- Cloths
- Wood
- Plastic
- Reflective
- Shiny
- Grease
- Waxed Floors
- Transparent
- Water
- Ice
- Glass
- Self illuminated
- Transparent cutout
- Lightmap
- Skybox Shaders
- Toon Shaders
- Properties
- Diffuse
- Object basic color
- Bump and Parallax Bump
- Height / Depth simulation
- Specular
- Glossy
- Maps
- Bump maps
- Specular maps
- Cube maps
- Detail maps
- Pixel Shaders
- Textures
-
Prefabs
- Inheritance
-
Made from Assets or a Game object
- If object is made of multiple objects --> Create a game object
- Ideally always created from 0,0,0
- Terrain Tool
-
unity component of interest
-
Colliders
- capsule colliders
-
character colliders
- No rigidbody or physics object
- Better for moving, controlled character
- Slope limit
- Skin Width
- step offset (stairs)
-
Triggers
- collider with "IsTrigger" checked
- use OnTrigger Mono functions
-
Lighting And Shadows
-
Lightings
- Directionnal Lights
- Point Lights
- Spotlights
-
Shadows
- Requires advanced licenses
- Lightmap
- Projector-made Shadows
- Lens Flares
- Cookies
-
Particle System
-
Base
-
Particle emitter
-
Ellipsoid
- "Pre-Built"
-
Mesh
- 1 ) Mesh - Mesh Renderer - Capsule colider
- 2) Mesh Particle Emitter +
- 3) Particle animator +
- 4) PArticle renderer
- Billboards / Sprites
- attached to an object
-
Discharged from the emitter
- set rate
- velocity
- drawn layerred on top of each other
-
Visual effect
- animations
- forces
-
Particle system components
-
Particle emitter
- Emit : On / Off
- Min/Max Size : size of a sprite
- Min/Max Energy: time alive
- Min/Max Emission : Number of sprite per second
-
World Velocity: starting speed(X, Y, Z) relative to the world
- Y --> rising / Falling
- X/Z --> "Wind"
- Local Velocity: starting speed (X, Y, Z relative to the local system
- ...
-
Particle animator
- How each individual particle will behave
- Animation Color
- Rotation
- Size Grow
- Particle Renderer and Materials
-
Advanced particle components
-
World Particle Collider
- bounce factor
- Collision Energy loss
- Collide with (layer)
- Send Collision Message
- Min Kill Velocity
-
Trail renderer
- Lenght of the displayed trail (s)
- Start Width
- End Width
- Min Vertex Distance
- Material --> Particle Shader
- Non-Tiled texture, square dimension
- Line rendered