├── .gitignore ├── Assets ├── Editor.meta ├── Editor │ ├── CrossPlatformInput.meta │ └── CrossPlatformInput │ │ ├── CrossPlatformInputInitialize.cs │ │ └── CrossPlatformInputInitialize.cs.meta ├── Resources.meta ├── Resources │ ├── default_sprite.prefab │ ├── default_sprite.prefab.meta │ ├── sprite_fading.cs │ └── sprite_fading.cs.meta ├── Snowprint.meta ├── Snowprint │ ├── Maps.meta │ ├── Maps │ │ ├── foot_print_height.png │ │ ├── foot_print_height.png.meta │ │ ├── snow_NMP.tga │ │ ├── snow_NMP.tga.meta │ │ ├── snowprint_NRM.png │ │ └── snowprint_NRM.png.meta │ ├── Materials.meta │ ├── Materials │ │ ├── distance_sprite.mat │ │ ├── distance_sprite.mat.meta │ │ ├── snowSurface.mat │ │ └── snowSurface.mat.meta │ ├── Meshes.meta │ ├── Meshes │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── lambert1.mat │ │ │ └── lambert1.mat.meta │ │ ├── bigPlane 1.fbx │ │ ├── bigPlane 1.fbx.meta │ │ ├── bigPlane.fbx │ │ └── bigPlane.fbx.meta │ ├── PainterRT.renderTexture │ ├── PainterRT.renderTexture.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── DistanceMapPainter.cs │ │ ├── DistanceMapPainter.cs.meta │ │ ├── footCollide.cs │ │ └── footCollide.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── SnowGroundShader.shader │ │ ├── SnowGroundShader.shader.meta │ │ ├── Sprites-Distance.shader │ │ └── Sprites-Distance.shader.meta │ ├── default_sprite.png │ ├── default_sprite.png.meta │ ├── footstep snow crunching.wav │ ├── footstep snow crunching.wav.meta │ ├── snowprint.unity │ └── snowprint.unity.meta ├── Standard Assets.meta ├── Standard Assets │ ├── Characters.meta │ ├── Characters │ │ ├── FirstPersonCharacter.meta │ │ ├── FirstPersonCharacter │ │ │ ├── Audio.meta │ │ │ ├── Audio │ │ │ │ ├── Footstep01.wav │ │ │ │ ├── Footstep01.wav.meta │ │ │ │ ├── Footstep02.wav │ │ │ │ ├── Footstep02.wav.meta │ │ │ │ ├── Footstep03.wav │ │ │ │ ├── Footstep03.wav.meta │ │ │ │ ├── Footstep04.wav │ │ │ │ ├── Footstep04.wav.meta │ │ │ │ ├── Jump.wav │ │ │ │ ├── Jump.wav.meta │ │ │ │ ├── Land.wav │ │ │ │ └── Land.wav.meta │ │ │ ├── FirstPersonCharacterGuidelines.txt │ │ │ ├── FirstPersonCharacterGuidelines.txt.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Prefabs │ │ │ │ ├── FPSController.prefab │ │ │ │ ├── FPSController.prefab.meta │ │ │ │ ├── RigidBodyFPSController.prefab │ │ │ │ └── RigidBodyFPSController.prefab.meta │ │ │ ├── Scripts.meta │ │ │ └── Scripts │ │ │ │ ├── FirstPersonController.cs │ │ │ │ ├── FirstPersonController.cs.meta │ │ │ │ ├── HeadBob.cs │ │ │ │ ├── HeadBob.cs.meta │ │ │ │ ├── MouseLook.cs │ │ │ │ ├── MouseLook.cs.meta │ │ │ │ ├── RigidbodyFirstPersonController.cs │ │ │ │ └── RigidbodyFirstPersonController.cs.meta │ │ ├── RollerBall.meta │ │ ├── RollerBall │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ │ ├── RollerBallGrey.mat │ │ │ │ ├── RollerBallGrey.mat.meta │ │ │ │ ├── RollerBallWhite.mat │ │ │ │ └── RollerBallWhite.mat.meta │ │ │ ├── Models.meta │ │ │ ├── Models │ │ │ │ ├── RollerBall.fbx │ │ │ │ └── RollerBall.fbx.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Prefabs │ │ │ │ ├── RollerBall.prefab │ │ │ │ └── RollerBall.prefab.meta │ │ │ ├── RollerBallGuidelines.txt │ │ │ ├── RollerBallGuidelines.txt.meta │ │ │ ├── Scripts.meta │ │ │ ├── Scripts │ │ │ │ ├── Ball.cs │ │ │ │ ├── Ball.cs.meta │ │ │ │ ├── BallUserControl.cs │ │ │ │ └── BallUserControl.cs.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ │ ├── RollerBallAlbedo.png │ │ │ │ ├── RollerBallAlbedo.png.meta │ │ │ │ ├── RollerBallSpecularGloss.png │ │ │ │ └── RollerBallSpecularGloss.png.meta │ │ ├── ThirdPersonCharacter.meta │ │ └── ThirdPersonCharacter │ │ │ ├── Animation.meta │ │ │ ├── Animation │ │ │ ├── HumanoidCrouch.fbx │ │ │ ├── HumanoidCrouch.fbx.meta │ │ │ ├── HumanoidIdle.fbx │ │ │ ├── HumanoidIdle.fbx.meta │ │ │ ├── HumanoidIdleJumpUp.fbx │ │ │ ├── HumanoidIdleJumpUp.fbx.meta │ │ │ ├── HumanoidJumpAndFall.fbx │ │ │ ├── HumanoidJumpAndFall.fbx.meta │ │ │ ├── HumanoidMidAir.fbx │ │ │ ├── HumanoidMidAir.fbx.meta │ │ │ ├── HumanoidRun.fbx │ │ │ ├── HumanoidRun.fbx.meta │ │ │ ├── HumanoidRunTurn.fbx │ │ │ ├── HumanoidRunTurn.fbx.meta │ │ │ ├── HumanoidRunTurnSharp.fbx │ │ │ ├── HumanoidRunTurnSharp.fbx.meta │ │ │ ├── HumanoidStandTurn.fbx │ │ │ ├── HumanoidStandTurn.fbx.meta │ │ │ ├── HumanoidWalk.fbx │ │ │ ├── HumanoidWalk.fbx.meta │ │ │ ├── HumanoidWalkTurn.fbx │ │ │ ├── HumanoidWalkTurn.fbx.meta │ │ │ ├── HumanoidWalkTurnSharp.fbx │ │ │ └── HumanoidWalkTurnSharp.fbx.meta │ │ │ ├── Animator.meta │ │ │ ├── Animator │ │ │ ├── ThirdPersonAnimatorController.controller │ │ │ └── ThirdPersonAnimatorController.controller.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── EthanGrey.mat │ │ │ ├── EthanGrey.mat.meta │ │ │ ├── EthanWhite.mat │ │ │ └── EthanWhite.mat.meta │ │ │ ├── Models.meta │ │ │ ├── Models │ │ │ ├── Ethan.fbx │ │ │ └── Ethan.fbx.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Prefabs │ │ │ ├── AIThirdPersonController.prefab │ │ │ ├── AIThirdPersonController.prefab.meta │ │ │ ├── ThirdPersonController.prefab │ │ │ └── ThirdPersonController.prefab.meta │ │ │ ├── Scripts.meta │ │ │ ├── Scripts │ │ │ ├── AICharacterControl.cs │ │ │ ├── AICharacterControl.cs.meta │ │ │ ├── ThirdPersonCharacter.cs │ │ │ ├── ThirdPersonCharacter.cs.meta │ │ │ ├── ThirdPersonUserControl.cs │ │ │ └── ThirdPersonUserControl.cs.meta │ │ │ ├── Textures.meta │ │ │ ├── Textures │ │ │ ├── EthanNormals.png │ │ │ ├── EthanNormals.png.meta │ │ │ ├── EthanOcclusion.png │ │ │ └── EthanOcclusion.png.meta │ │ │ ├── ThirdPersonCharacterGuidelines.txt │ │ │ └── ThirdPersonCharacterGuidelines.txt.meta │ ├── CrossPlatformInput.meta │ ├── CrossPlatformInput │ │ ├── CrossPlatformInputGuidelines.txt │ │ ├── CrossPlatformInputGuidelines.txt.meta │ │ ├── Prefabs.meta │ │ ├── Prefabs │ │ │ ├── CarTiltControls.prefab │ │ │ ├── CarTiltControls.prefab.meta │ │ │ ├── DualTouchControls.prefab │ │ │ ├── DualTouchControls.prefab.meta │ │ │ ├── MobileAircraftControls.prefab │ │ │ ├── MobileAircraftControls.prefab.meta │ │ │ ├── MobileSingleStickControl.prefab │ │ │ ├── MobileSingleStickControl.prefab.meta │ │ │ ├── MobileTiltControlRig.prefab │ │ │ └── MobileTiltControlRig.prefab.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ │ ├── AxisTouchButton.cs │ │ │ ├── AxisTouchButton.cs.meta │ │ │ ├── ButtonHandler.cs │ │ │ ├── ButtonHandler.cs.meta │ │ │ ├── CrossPlatformInputManager.cs │ │ │ ├── CrossPlatformInputManager.cs.meta │ │ │ ├── InputAxisScrollbar.cs │ │ │ ├── InputAxisScrollbar.cs.meta │ │ │ ├── Joystick.cs │ │ │ ├── Joystick.cs.meta │ │ │ ├── MobileControlRig.cs │ │ │ ├── MobileControlRig.cs.meta │ │ │ ├── PlatformSpecific.meta │ │ │ ├── PlatformSpecific │ │ │ │ ├── MobileInput.cs │ │ │ │ ├── MobileInput.cs.meta │ │ │ │ ├── StandaloneInput.cs │ │ │ │ └── StandaloneInput.cs.meta │ │ │ ├── TiltInput.cs │ │ │ ├── TiltInput.cs.meta │ │ │ ├── TouchPad.cs │ │ │ ├── TouchPad.cs.meta │ │ │ ├── VirtualInput.cs │ │ │ └── VirtualInput.cs.meta │ │ ├── Sprites.meta │ │ └── Sprites │ │ │ ├── ButtonAcceleratorOverSprite.png │ │ │ ├── ButtonAcceleratorOverSprite.png.meta │ │ │ ├── ButtonAcceleratorUpSprite.png │ │ │ ├── ButtonAcceleratorUpSprite.png.meta │ │ │ ├── ButtonArrowOverSprite.png │ │ │ ├── ButtonArrowOverSprite.png.meta │ │ │ ├── ButtonArrowUpSprite.png │ │ │ ├── ButtonArrowUpSprite.png.meta │ │ │ ├── ButtonBrakeOverSprite.png │ │ │ ├── ButtonBrakeOverSprite.png.meta │ │ │ ├── ButtonBrakeUpSprite.png │ │ │ ├── ButtonBrakeUpSprite.png.meta │ │ │ ├── ButtonCameraCycleUpSprite.png │ │ │ ├── ButtonCameraCycleUpSprite.png.meta │ │ │ ├── ButtonResetSprite.png │ │ │ ├── ButtonResetSprite.png.meta │ │ │ ├── ButtonSpacebarSprite.png │ │ │ ├── ButtonSpacebarSprite.png.meta │ │ │ ├── ButtonThumbstickOverSprite.png │ │ │ ├── ButtonThumbstickOverSprite.png.meta │ │ │ ├── ButtonThumbstickUpSprite.png │ │ │ ├── ButtonThumbstickUpSprite.png.meta │ │ │ ├── ButtonTimescaleFullUpSprite.png │ │ │ ├── ButtonTimescaleFullUpSprite.png.meta │ │ │ ├── ButtonTimescaleSlowUpSprite.png │ │ │ ├── ButtonTimescaleSlowUpSprite.png.meta │ │ │ ├── SliderBackgroundSprite.png │ │ │ ├── SliderBackgroundSprite.png.meta │ │ │ ├── SliderHandleSprite.png │ │ │ ├── SliderHandleSprite.png.meta │ │ │ ├── TouchpadSprite.png │ │ │ └── TouchpadSprite.png.meta │ ├── PhysicsMaterials.meta │ ├── PhysicsMaterials │ │ ├── ZeroFriction.physicMaterial │ │ └── ZeroFriction.physicMaterial.meta │ ├── Utility.meta │ └── Utility │ │ ├── ActivateTrigger.cs │ │ ├── ActivateTrigger.cs.meta │ │ ├── AlphaButtonClickMask.cs │ │ ├── AlphaButtonClickMask.cs.meta │ │ ├── AutoMobileShaderSwitch.cs │ │ ├── AutoMobileShaderSwitch.cs.meta │ │ ├── AutoMoveAndRotate.cs │ │ ├── AutoMoveAndRotate.cs.meta │ │ ├── CameraRefocus.cs │ │ ├── CameraRefocus.cs.meta │ │ ├── CurveControlledBob.cs │ │ ├── CurveControlledBob.cs.meta │ │ ├── DragRigidbody.cs │ │ ├── DragRigidbody.cs.meta │ │ ├── DynamicShadowSettings.cs │ │ ├── DynamicShadowSettings.cs.meta │ │ ├── EventSystemChecker.cs │ │ ├── EventSystemChecker.cs.meta │ │ ├── FOVKick.cs │ │ ├── FOVKick.cs.meta │ │ ├── FPSCounter.cs │ │ ├── FPSCounter.cs.meta │ │ ├── FollowTarget.cs │ │ ├── FollowTarget.cs.meta │ │ ├── ForcedReset.cs │ │ ├── ForcedReset.cs.meta │ │ ├── LerpControlledBob.cs │ │ ├── LerpControlledBob.cs.meta │ │ ├── ObjectResetter.cs │ │ ├── ObjectResetter.cs.meta │ │ ├── ParticleSystemDestroyer.cs │ │ ├── ParticleSystemDestroyer.cs.meta │ │ ├── PlatformSpecificContent.cs │ │ ├── PlatformSpecificContent.cs.meta │ │ ├── SimpleActivatorMenu.cs │ │ ├── SimpleActivatorMenu.cs.meta │ │ ├── SimpleMouseRotator.cs │ │ ├── SimpleMouseRotator.cs.meta │ │ ├── SmoothFollow.cs │ │ ├── SmoothFollow.cs.meta │ │ ├── TimedObjectActivator.cs │ │ ├── TimedObjectActivator.cs.meta │ │ ├── TimedObjectDestructor.cs │ │ ├── TimedObjectDestructor.cs.meta │ │ ├── WaypointCircuit.cs │ │ ├── WaypointCircuit.cs.meta │ │ ├── WaypointProgressTracker.cs │ │ └── WaypointProgressTracker.cs.meta ├── idleTrigger.cs └── idleTrigger.cs.meta ├── LICENSE.md ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset ├── README.md ├── SnowGroundShader.shader └── Sprites-Distance.shader /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f92a9414ff3b2684d89af769707e9370 3 | folderAsset: yes 4 | timeCreated: 1481113668 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Editor/CrossPlatformInput.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 696c0e7b8c74e1442acbf15c2df9e72d 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db7667203062c644ea1877077e30ebd6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42683cba8789d6848be7f241fee93136 3 | folderAsset: yes 4 | timeCreated: 1479460083 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/default_sprite.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Resources/default_sprite.prefab -------------------------------------------------------------------------------- /Assets/Resources/default_sprite.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2989f7c57a53584bb16edb6f135cd37 3 | timeCreated: 1480939119 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/sprite_fading.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class sprite_fading : MonoBehaviour { 6 | 7 | 8 | SpriteRenderer spriteRenderer; 9 | public float lifeSpan = 30.0f; 10 | public float alpha = 1.0f; 11 | public float life; 12 | 13 | // Use this for initialization 14 | void Start () { 15 | spriteRenderer = GetComponent(); 16 | life = lifeSpan; 17 | 18 | } 19 | 20 | // Update is called once per frame 21 | void Update () { 22 | life -= Time.deltaTime; 23 | if (life <= 0.0f) 24 | { 25 | Destroy(gameObject); 26 | } 27 | else 28 | { 29 | alpha = life / lifeSpan; 30 | spriteRenderer.color = new Color(spriteRenderer.color.r, spriteRenderer.color.g, spriteRenderer.color.b, alpha); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Resources/sprite_fading.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3976191d9b0e1740a8ead79692bfbb8 3 | timeCreated: 1487724327 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Snowprint.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b5c46daa40424540859f2951e70824b 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Maps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18eb87690a3c376478553199133a4ebe 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/foot_print_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Maps/foot_print_height.png -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/foot_print_height.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9273e6279c010440a3085ba2aca5e47 3 | timeCreated: 1480933752 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/snow_NMP.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Maps/snow_NMP.tga -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/snow_NMP.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 310d1ec2ed5c49b4abeeb1835a5d28c2 3 | timeCreated: 1470764972 4 | licenseType: Store 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/snowprint_NRM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Maps/snowprint_NRM.png -------------------------------------------------------------------------------- /Assets/Snowprint/Maps/snowprint_NRM.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3315aedfd90af62489cf6f6ca01f63fe 3 | timeCreated: 1479795732 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Snowprint/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a40552f0b028a9a49ad60f7082ac94e6 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Materials/distance_sprite.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Materials/distance_sprite.mat -------------------------------------------------------------------------------- /Assets/Snowprint/Materials/distance_sprite.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3965d0fe5a7997a49ba9dd1e8c386693 3 | timeCreated: 1479469305 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Snowprint/Materials/snowSurface.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Materials/snowSurface.mat -------------------------------------------------------------------------------- /Assets/Snowprint/Materials/snowSurface.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4bb88f4bb1377143be1248a74355ec0 3 | timeCreated: 1479635266 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5781d9ac5b36ee498f08602342c7ed0 3 | folderAsset: yes 4 | timeCreated: 1481113325 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62b2d3e68c9e0c34e8aefec5cbd7ef24 3 | folderAsset: yes 4 | timeCreated: 1481115039 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/Materials/lambert1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Meshes/Materials/lambert1.mat -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/Materials/lambert1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9b082bd43160804b8744594e8a43151 3 | timeCreated: 1481115040 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/bigPlane 1.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Meshes/bigPlane 1.fbx -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/bigPlane 1.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67a51a49ff326014ab703589f9c022a8 3 | timeCreated: 1481115040 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: pPlane1 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | animations: 18 | legacyGenerateAnimations: 4 19 | bakeSimulation: 0 20 | resampleCurves: 1 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | animationImportErrors: 24 | animationImportWarnings: 25 | animationRetargetingWarnings: 26 | animationDoRetargetingWarnings: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | importBlendShapes: 0 41 | swapUVChannels: 0 42 | generateSecondaryUV: 0 43 | useFileUnits: 1 44 | optimizeMeshForGPU: 1 45 | keepQuads: 0 46 | weldVertices: 1 47 | secondaryUVAngleDistortion: 8 48 | secondaryUVAreaDistortion: 15.000001 49 | secondaryUVHardAngle: 88 50 | secondaryUVPackMargin: 4 51 | useFileScale: 1 52 | tangentSpace: 53 | normalSmoothAngle: 60 54 | normalImportMode: 0 55 | tangentImportMode: 3 56 | importAnimation: 1 57 | copyAvatar: 0 58 | humanDescription: 59 | human: [] 60 | skeleton: [] 61 | armTwist: 0.5 62 | foreArmTwist: 0.5 63 | upperLegTwist: 0.5 64 | legTwist: 0.5 65 | armStretch: 0.05 66 | legStretch: 0.05 67 | feetSpacing: 0 68 | rootMotionBoneName: 69 | hasTranslationDoF: 0 70 | lastHumanDescriptionAvatarSource: {instanceID: 0} 71 | animationType: 0 72 | humanoidOversampling: 1 73 | additionalBone: 0 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/bigPlane.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/Meshes/bigPlane.fbx -------------------------------------------------------------------------------- /Assets/Snowprint/Meshes/bigPlane.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 412f3f7c2263b024e8e7feb17116b144 3 | timeCreated: 1481025933 4 | licenseType: Free 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: //RootNode 9 | 400000: //RootNode 10 | 2300000: //RootNode 11 | 3300000: //RootNode 12 | 4300000: pPlane1 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | animations: 18 | legacyGenerateAnimations: 4 19 | bakeSimulation: 0 20 | resampleCurves: 1 21 | optimizeGameObjects: 0 22 | motionNodeName: 23 | animationImportErrors: 24 | animationImportWarnings: 25 | animationRetargetingWarnings: 26 | animationDoRetargetingWarnings: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | importBlendShapes: 0 41 | swapUVChannels: 0 42 | generateSecondaryUV: 0 43 | useFileUnits: 1 44 | optimizeMeshForGPU: 1 45 | keepQuads: 0 46 | weldVertices: 1 47 | secondaryUVAngleDistortion: 8 48 | secondaryUVAreaDistortion: 15.000001 49 | secondaryUVHardAngle: 88 50 | secondaryUVPackMargin: 4 51 | useFileScale: 1 52 | tangentSpace: 53 | normalSmoothAngle: 60 54 | normalImportMode: 0 55 | tangentImportMode: 0 56 | importAnimation: 1 57 | copyAvatar: 0 58 | humanDescription: 59 | human: [] 60 | skeleton: [] 61 | armTwist: 0.5 62 | foreArmTwist: 0.5 63 | upperLegTwist: 0.5 64 | legTwist: 0.5 65 | armStretch: 0.05 66 | legStretch: 0.05 67 | feetSpacing: 0 68 | rootMotionBoneName: 69 | hasTranslationDoF: 0 70 | lastHumanDescriptionAvatarSource: {instanceID: 0} 71 | animationType: 0 72 | humanoidOversampling: 1 73 | additionalBone: 0 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/Snowprint/PainterRT.renderTexture: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/PainterRT.renderTexture -------------------------------------------------------------------------------- /Assets/Snowprint/PainterRT.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dd5c06a4ccfb6e4c8067820f3f0e29b 3 | timeCreated: 1427112129 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Snowprint/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7963ca2473366d54d8f98e76ca67738f 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Scripts/DistanceMapPainter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class DistanceMapPainter : MonoBehaviour { 5 | 6 | public int spriteCounter = 0; 7 | 8 | // Use this for initialization 9 | 10 | void OnEnable() 11 | { 12 | footCollide.OnFootCollided += DoAction; 13 | } 14 | 15 | 16 | void OnDisable() 17 | { 18 | footCollide.OnFootCollided -= DoAction; 19 | } 20 | 21 | 22 | void Start () { 23 | 24 | } 25 | 26 | // Update is called once per frame 27 | void FixedUpdate() 28 | { 29 | 30 | } 31 | 32 | void DoAction(Vector3 position,float angle) 33 | { 34 | GameObject spriteObj; 35 | spriteObj = (GameObject)Instantiate(Resources.Load("default_sprite")); 36 | spriteObj.transform.parent = this.transform; 37 | spriteObj.transform.localPosition = new Vector3(position.x-0.5f,position.z-0.5f,0); 38 | Color positionInfo = new Color(spriteObj.transform.localPosition.x+0.5f, angle, spriteObj.transform.localPosition.y+0.5f, 1.0f); 39 | spriteObj.GetComponent().color = positionInfo; //pass the position info color to sprite shader 40 | spriteCounter++; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Snowprint/Scripts/DistanceMapPainter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b39b45b4bdaa4bb4ca6f965d47218b79 3 | timeCreated: 1479525906 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Snowprint/Scripts/footCollide.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class footCollide : MonoBehaviour { 5 | //add event manager to this class 6 | public delegate void OnFootCollision(Vector3 positon,float angle); 7 | public static event OnFootCollision OnFootCollided; 8 | public GameObject controller; 9 | public Animator animControl; 10 | float previousForward; 11 | float currentForward; 12 | float ESP = 0.35f; 13 | bool onIdle; 14 | 15 | // Use this for initialization 16 | void Start () { 17 | 18 | previousForward = 0.0f; 19 | onIdle = true; 20 | controller = GameObject.Find("ThirdPersonController"); 21 | if (controller != null) 22 | { 23 | animControl = controller.GetComponent(); 24 | } 25 | } 26 | 27 | 28 | void OnTriggerEnter(Collider other) 29 | { 30 | if (other.tag== "foot") 31 | { 32 | Vector3 position = other.transform.position/40.0f;//40.0 is the size of the terrain 33 | //Debug.Log(position.ToString()); 34 | float angle = (other.transform.rotation.eulerAngles.y)/360.0f; //map into range 0-1 35 | //Debug.Log(angle.ToString()); 36 | //call the event manager 37 | OnFootCollided(position, angle); 38 | //play sound 39 | controller.GetComponent().Play(); 40 | } 41 | } 42 | 43 | void OnTriggerStay(Collider other) 44 | { 45 | if(other.tag == "foot" && onIdle == true) 46 | { 47 | Vector3 position = other.transform.position / 40.0f;//20.0 is the size of the terrain 48 | //Debug.Log(position.ToString()); 49 | float angle = (other.transform.rotation.eulerAngles.y) / 360.0f; //map into range 0-1 50 | //Debug.Log(angle.ToString()); 51 | //call the event manager 52 | OnFootCollided(position, angle); 53 | } 54 | 55 | } 56 | 57 | 58 | 59 | 60 | // Update is called once per frame 61 | void Update () { 62 | currentForward = animControl.GetFloat("Forward"); 63 | if (previousForward > ESP && currentForward <= ESP) 64 | { 65 | onIdle = true; 66 | } 67 | else 68 | { 69 | onIdle = false; 70 | } 71 | previousForward = currentForward; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/Snowprint/Scripts/footCollide.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12766602d3aa20a4fa3d7f312956bf56 3 | timeCreated: 1481088369 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Snowprint/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b705db3768c06c40844b3f70f923130 3 | folderAsset: yes 4 | timeCreated: 1481113216 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Shaders/SnowGroundShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 464d2fd5ce1475542a2f41626d532f64 3 | timeCreated: 1479985283 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/Shaders/Sprites-Distance.shader: -------------------------------------------------------------------------------- 1 | Shader "Sprites/Distance" 2 | { 3 | Properties 4 | { 5 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 6 | //_Color ("Tint", Color) = (1,1,1,1) 7 | //[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 8 | } 9 | 10 | SubShader 11 | { 12 | Tags 13 | { 14 | "Queue"="Transparent" 15 | "IgnoreProjector"="True" 16 | "RenderType"="Transparent" 17 | "PreviewType"="Plane" 18 | "CanUseSpriteAtlas"="True" 19 | } 20 | 21 | Cull Off 22 | Lighting Off 23 | ZWrite On //open ZWreite 24 | ZTest LEqual 25 | //Blend OneOne 26 | Blend One Zero 27 | 28 | Pass 29 | { 30 | CGPROGRAM 31 | #pragma vertex vert 32 | #pragma fragment frag 33 | //#pragma shader_feature ETC1_EXTERNAL_ALPHA 34 | #include "UnityCG.cginc" 35 | 36 | struct appdata_t 37 | { 38 | float4 vertex : POSITION; 39 | float4 color : COLOR; 40 | float2 texcoord : TEXCOORD0; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 vertex : SV_POSITION; 46 | fixed4 color : COLOR; 47 | float2 texcoord : TEXCOORD0; 48 | }; 49 | 50 | struct fout 51 | { 52 | fixed4 color : SV_Target; 53 | float depth : SV_Depth; 54 | }; 55 | 56 | 57 | 58 | v2f vert(appdata_t IN) 59 | { 60 | v2f OUT; 61 | OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); 62 | OUT.texcoord = IN.texcoord; 63 | OUT.color = IN.color; 64 | return OUT; 65 | } 66 | 67 | 68 | fout frag(v2f IN) 69 | { 70 | fout OUT; 71 | 72 | 73 | OUT.color.rgb = IN.color.rgb;////r,g is the relative center position b is angle 74 | 75 | float dist = distance(IN.texcoord, float2(.5f, .5f))*2.0f; 76 | OUT.color.a = IN.color.a; 77 | OUT.depth = 1.0f-dist; 78 | 79 | return OUT; 80 | } 81 | ENDCG 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Assets/Snowprint/Shaders/Sprites-Distance.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7146fd0700844e446bdffbf5b45d3371 3 | timeCreated: 1479469532 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Snowprint/default_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/default_sprite.png -------------------------------------------------------------------------------- /Assets/Snowprint/default_sprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f27bc681ef57d07498500e5603da8c79 3 | timeCreated: 1479469279 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 1024 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 8 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Snowprint/footstep snow crunching.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/footstep snow crunching.wav -------------------------------------------------------------------------------- /Assets/Snowprint/footstep snow crunching.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed20e30372d6e874dac8ff1a8a83ce4d 3 | timeCreated: 1487806237 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | normalize: 1 17 | preloadAudioData: 1 18 | loadInBackground: 0 19 | 3D: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/Snowprint/snowprint.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Snowprint/snowprint.unity -------------------------------------------------------------------------------- /Assets/Snowprint/snowprint.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e579809bde079fd42a7894852c5b38dd 3 | timeCreated: 1479465119 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5236d89cb669bd14fa0f1679a2915e99 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fb82a7b631b8bb4a888f30aa30ab5a9 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9ff0d10e0a27d84990a28722fcf800a 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dac79461900e0f4c93561031c2e6902 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep01.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep01.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep01.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42e65e088b3f4374e851b8dbd38f3df9 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep02.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep02.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep02.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bc94ec6ed537e743b481638bdcd503d 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep03.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep03.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep03.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a9383dda6cabc047b7a297602e93eb4 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep04.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep04.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Footstep04.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9714160ce34f2b4ab63ff8c27bd68e1 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Jump.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Jump.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5897aeed9b676024fbb8c694b421a861 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Land.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Land.wav -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Audio/Land.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b09d59f4499d45428baa7a21e954296 3 | AudioImporter: 4 | serializedVersion: 5 5 | format: -1 6 | loadType: 1 7 | quality: -1 8 | sampleRate: 0 9 | forceToMono: 0 10 | preloadAudioData: 1 11 | loadInBackground: 0 12 | overrideSampleRate: 0 13 | optimizeSampleRate: 0 14 | 3D: 1 15 | userData: 16 | assetBundleName: 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/FirstPersonCharacterGuidelines.txt: -------------------------------------------------------------------------------- 1 | The first-person character is a single prefab which is designed to be used as-is. There's usually no need to create your own from the separate scripts provided. Just drop the prefab into your scene and you're good to go. 2 | 3 | 4 | The simplest way to get started with the First Person Character is to follow these steps: 5 | 6 | 1) Start with a suitable scene. There ought to be enough flat ground to walk around on. 7 | 8 | 2) Place the "FirstPersonCharacter" prefab in the scene. 9 | 10 | 3) If present, delete the "Main Camera" that exists in new scenes by default. The First Person Character prefab contains its own camera, so you don't need the default camera, or any of the camera rigs to use it. 11 | 12 | The first-person character is made up of a few components acting together. The FirstPersonCharacter script provides the functionality of moving, strafing and jumping. The SimpleMouseRotator provides the functionality of turning the body of the character left and right, and another copy of the same script on the "FirstPersonCamera" controls the looking-up-and-down effect. 13 | 14 | There is also an optional "Head Bob" script which provides a head bobbing effect and optionally also plays footstep sounds in sync with the head bobbing. This script can be disabled or removed if required. 15 | 16 | There are a number of simple adjustable settings on each component allowing you to change the movement speed, jump power, head bob style, and more. For more detail about each setting, see the comments in each script. 17 | 18 | The Character script also requires references to "zero friction" and "max friction" physics materials. These are provided already set-up for you. 19 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/FirstPersonCharacterGuidelines.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc9b000e9b8028247bd816e159382646 3 | TextScriptImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bfb2599080d5d24e84362b4ae314ae7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/FPSController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e9e851c0e142814dac026a256ba2ac0 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/RigidBodyFPSController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6453f8e1f814744d8b94e5a6d1f9942 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59e366835fdb2864c88584343529c6dc 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/FirstPersonController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05ec5cf00ca181d45a42ba1870e148c3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/HeadBob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityStandardAssets.Utility; 4 | 5 | namespace UnityStandardAssets.Characters.FirstPerson 6 | { 7 | public class HeadBob : MonoBehaviour 8 | { 9 | public Camera Camera; 10 | public CurveControlledBob motionBob = new CurveControlledBob(); 11 | public LerpControlledBob jumpAndLandingBob = new LerpControlledBob(); 12 | public RigidbodyFirstPersonController rigidbodyFirstPersonController; 13 | public float StrideInterval; 14 | [Range(0f, 1f)] public float RunningStrideLengthen; 15 | 16 | // private CameraRefocus m_CameraRefocus; 17 | private bool m_PreviouslyGrounded; 18 | private Vector3 m_OriginalCameraPosition; 19 | 20 | 21 | private void Start() 22 | { 23 | motionBob.Setup(Camera, StrideInterval); 24 | m_OriginalCameraPosition = Camera.transform.localPosition; 25 | // m_CameraRefocus = new CameraRefocus(Camera, transform.root.transform, Camera.transform.localPosition); 26 | } 27 | 28 | 29 | private void Update() 30 | { 31 | // m_CameraRefocus.GetFocusPoint(); 32 | Vector3 newCameraPosition; 33 | if (rigidbodyFirstPersonController.Velocity.magnitude > 0 && rigidbodyFirstPersonController.Grounded) 34 | { 35 | Camera.transform.localPosition = motionBob.DoHeadBob(rigidbodyFirstPersonController.Velocity.magnitude*(rigidbodyFirstPersonController.Running ? RunningStrideLengthen : 1f)); 36 | newCameraPosition = Camera.transform.localPosition; 37 | newCameraPosition.y = Camera.transform.localPosition.y - jumpAndLandingBob.Offset(); 38 | } 39 | else 40 | { 41 | newCameraPosition = Camera.transform.localPosition; 42 | newCameraPosition.y = m_OriginalCameraPosition.y - jumpAndLandingBob.Offset(); 43 | } 44 | Camera.transform.localPosition = newCameraPosition; 45 | 46 | if (!m_PreviouslyGrounded && rigidbodyFirstPersonController.Grounded) 47 | { 48 | StartCoroutine(jumpAndLandingBob.DoBobCycle()); 49 | } 50 | 51 | m_PreviouslyGrounded = rigidbodyFirstPersonController.Grounded; 52 | // m_CameraRefocus.SetFocusPoint(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/HeadBob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83c81407209f85e4c87c0cda8b32868e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/MouseLook.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityStandardAssets.CrossPlatformInput; 4 | 5 | namespace UnityStandardAssets.Characters.FirstPerson 6 | { 7 | [Serializable] 8 | public class MouseLook 9 | { 10 | public float XSensitivity = 2f; 11 | public float YSensitivity = 2f; 12 | public bool clampVerticalRotation = true; 13 | public float MinimumX = -90F; 14 | public float MaximumX = 90F; 15 | public bool smooth; 16 | public float smoothTime = 5f; 17 | public bool lockCursor = true; 18 | 19 | 20 | private Quaternion m_CharacterTargetRot; 21 | private Quaternion m_CameraTargetRot; 22 | private bool m_cursorIsLocked = true; 23 | 24 | public void Init(Transform character, Transform camera) 25 | { 26 | m_CharacterTargetRot = character.localRotation; 27 | m_CameraTargetRot = camera.localRotation; 28 | } 29 | 30 | 31 | public void LookRotation(Transform character, Transform camera) 32 | { 33 | float yRot = CrossPlatformInputManager.GetAxis("Mouse X") * XSensitivity; 34 | float xRot = CrossPlatformInputManager.GetAxis("Mouse Y") * YSensitivity; 35 | 36 | m_CharacterTargetRot *= Quaternion.Euler (0f, yRot, 0f); 37 | m_CameraTargetRot *= Quaternion.Euler (-xRot, 0f, 0f); 38 | 39 | if(clampVerticalRotation) 40 | m_CameraTargetRot = ClampRotationAroundXAxis (m_CameraTargetRot); 41 | 42 | if(smooth) 43 | { 44 | character.localRotation = Quaternion.Slerp (character.localRotation, m_CharacterTargetRot, 45 | smoothTime * Time.deltaTime); 46 | camera.localRotation = Quaternion.Slerp (camera.localRotation, m_CameraTargetRot, 47 | smoothTime * Time.deltaTime); 48 | } 49 | else 50 | { 51 | character.localRotation = m_CharacterTargetRot; 52 | camera.localRotation = m_CameraTargetRot; 53 | } 54 | 55 | UpdateCursorLock(); 56 | } 57 | 58 | public void SetCursorLock(bool value) 59 | { 60 | lockCursor = value; 61 | if(!lockCursor) 62 | {//we force unlock the cursor if the user disable the cursor locking helper 63 | Cursor.lockState = CursorLockMode.None; 64 | Cursor.visible = true; 65 | } 66 | } 67 | 68 | public void UpdateCursorLock() 69 | { 70 | //if the user set "lockCursor" we check & properly lock the cursos 71 | if (lockCursor) 72 | InternalLockUpdate(); 73 | } 74 | 75 | private void InternalLockUpdate() 76 | { 77 | if(Input.GetKeyUp(KeyCode.Escape)) 78 | { 79 | m_cursorIsLocked = false; 80 | } 81 | else if(Input.GetMouseButtonUp(0)) 82 | { 83 | m_cursorIsLocked = true; 84 | } 85 | 86 | if (m_cursorIsLocked) 87 | { 88 | Cursor.lockState = CursorLockMode.Locked; 89 | Cursor.visible = false; 90 | } 91 | else if (!m_cursorIsLocked) 92 | { 93 | Cursor.lockState = CursorLockMode.None; 94 | Cursor.visible = true; 95 | } 96 | } 97 | 98 | Quaternion ClampRotationAroundXAxis(Quaternion q) 99 | { 100 | q.x /= q.w; 101 | q.y /= q.w; 102 | q.z /= q.w; 103 | q.w = 1.0f; 104 | 105 | float angleX = 2.0f * Mathf.Rad2Deg * Mathf.Atan (q.x); 106 | 107 | angleX = Mathf.Clamp (angleX, MinimumX, MaximumX); 108 | 109 | q.x = Mathf.Tan (0.5f * Mathf.Deg2Rad * angleX); 110 | 111 | return q; 112 | } 113 | 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/MouseLook.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37e60a97f2c87ae41b6cdc1055d78cb9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/RigidbodyFirstPersonController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81c9795a96c094f4cbde4d65546aa9b2 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8c798a1dd3be3d4083cd2fbefd9a7ff 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41db8cbfecdbdb54ab2bac971c05547a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Materials/RollerBallGrey.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: RollerBallGrey 10 | m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _LIGHTMAPPING_BAKED _LIGHTMAPPING_STATIC_LIGHTMAPS _UVPRIM_UV1 12 | _UVSEC_UV1 13 | m_LightmapFlags: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | m_SavedProperties: 17 | serializedVersion: 2 18 | m_TexEnvs: 19 | - first: 20 | name: _BumpMap 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - first: 26 | name: _DetailAlbedoMap 27 | second: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - first: 32 | name: _DetailMask 33 | second: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - first: 38 | name: _DetailNormalMap 39 | second: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - first: 44 | name: _EmissionMap 45 | second: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - first: 50 | name: _MainTex 51 | second: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - first: 56 | name: _MetallicGlossMap 57 | second: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | - first: 62 | name: _Occlusion 63 | second: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - first: 68 | name: _OcclusionMap 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | - first: 74 | name: _ParallaxMap 75 | second: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - first: 80 | name: _SpecGlossMap 81 | second: 82 | m_Texture: {fileID: 0} 83 | m_Scale: {x: 1, y: 1} 84 | m_Offset: {x: 0, y: 0} 85 | m_Floats: 86 | - first: 87 | name: _AlphaTestRef 88 | second: 0.5 89 | - first: 90 | name: _BumpScale 91 | second: 1 92 | - first: 93 | name: _Cutoff 94 | second: 0.5 95 | - first: 96 | name: _DetailAlbedoMultiplier 97 | second: 2 98 | - first: 99 | name: _DetailMode 100 | second: 0 101 | - first: 102 | name: _DetailNormalMapScale 103 | second: 1 104 | - first: 105 | name: _DstBlend 106 | second: 0 107 | - first: 108 | name: _EmissionScale 109 | second: 1 110 | - first: 111 | name: _EmissionScaleUI 112 | second: 1 113 | - first: 114 | name: _GlossMapScale 115 | second: 1 116 | - first: 117 | name: _Glossiness 118 | second: 0.4 119 | - first: 120 | name: _GlossyReflections 121 | second: 1 122 | - first: 123 | name: _Lightmapping 124 | second: 0 125 | - first: 126 | name: _Metallic 127 | second: 0 128 | - first: 129 | name: _Mode 130 | second: 0 131 | - first: 132 | name: _OcclusionStrength 133 | second: 1 134 | - first: 135 | name: _Parallax 136 | second: 0.02 137 | - first: 138 | name: _SmoothnessTextureChannel 139 | second: 0 140 | - first: 141 | name: _SpecularHighlights 142 | second: 1 143 | - first: 144 | name: _SrcBlend 145 | second: 1 146 | - first: 147 | name: _UVPrim 148 | second: 0 149 | - first: 150 | name: _UVSec 151 | second: 0 152 | - first: 153 | name: _ZWrite 154 | second: 1 155 | m_Colors: 156 | - first: 157 | name: _Color 158 | second: {r: 0.49803922, g: 0.49803922, b: 0.49803922, a: 1} 159 | - first: 160 | name: _EmissionColor 161 | second: {r: 0, g: 0, b: 0, a: 1} 162 | - first: 163 | name: _EmissionColorUI 164 | second: {r: 0, g: 0, b: 0, a: 1} 165 | - first: 166 | name: _EmissionColorWithMapUI 167 | second: {r: 1, g: 1, b: 1, a: 1} 168 | - first: 169 | name: _SpecColor 170 | second: {r: 0.5514706, g: 0.5514706, b: 0.5514706, a: 1} 171 | - first: 172 | name: _SpecularColor 173 | second: {r: 0.058823526, g: 0.058823526, b: 0.058823526, a: 1} 174 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Materials/RollerBallGrey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fd099d339b4ae34692c8258e4f87531 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Materials/RollerBallWhite.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b5dce0492bdfb648a389fe390071625 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7076a2a45ec52cc469dff98247300c0f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Models/RollerBall.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/RollerBall/Models/RollerBall.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d2f1a0944eff024ab396500807b91cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Prefabs/RollerBall.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 400000} 11 | - 33: {fileID: 3300000} 12 | - 23: {fileID: 2300000} 13 | - 135: {fileID: 13500000} 14 | - 54: {fileID: 5400000} 15 | - 114: {fileID: 11400000} 16 | - 114: {fileID: 11400002} 17 | m_Layer: 9 18 | m_Name: RollerBall 19 | m_TagString: Player 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &400000 25 | Transform: 26 | m_ObjectHideFlags: 1 27 | m_PrefabParentObject: {fileID: 0} 28 | m_PrefabInternal: {fileID: 100100000} 29 | m_GameObject: {fileID: 100000} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 5.40025711, y: -3.13121223, z: -.992190003} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | --- !u!23 &2300000 37 | MeshRenderer: 38 | m_ObjectHideFlags: 1 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 100100000} 41 | m_GameObject: {fileID: 100000} 42 | m_Enabled: 1 43 | m_CastShadows: 1 44 | m_ReceiveShadows: 1 45 | m_Materials: 46 | - {fileID: 2100000, guid: 6fd099d339b4ae34692c8258e4f87531, type: 2} 47 | m_SubsetIndices: 48 | m_StaticBatchRoot: {fileID: 0} 49 | m_UseLightProbes: 0 50 | m_ReflectionProbeUsage: 1 51 | m_ProbeAnchor: {fileID: 0} 52 | m_ScaleInLightmap: 1 53 | m_PreserveUVs: 0 54 | m_ImportantGI: 0 55 | m_AutoUVMaxDistance: .5 56 | m_AutoUVMaxAngle: 89 57 | m_LightmapParameters: {fileID: 0} 58 | m_SortingLayerID: 0 59 | m_SortingOrder: 0 60 | --- !u!33 &3300000 61 | MeshFilter: 62 | m_ObjectHideFlags: 1 63 | m_PrefabParentObject: {fileID: 0} 64 | m_PrefabInternal: {fileID: 100100000} 65 | m_GameObject: {fileID: 100000} 66 | m_Mesh: {fileID: 4300052, guid: d05d496cb4f43c14e80630addd23652e, type: 3} 67 | --- !u!54 &5400000 68 | Rigidbody: 69 | m_ObjectHideFlags: 1 70 | m_PrefabParentObject: {fileID: 0} 71 | m_PrefabInternal: {fileID: 100100000} 72 | m_GameObject: {fileID: 100000} 73 | serializedVersion: 2 74 | m_Mass: 1 75 | m_Drag: .100000001 76 | m_AngularDrag: 1 77 | m_UseGravity: 1 78 | m_IsKinematic: 0 79 | m_Interpolate: 0 80 | m_Constraints: 0 81 | m_CollisionDetection: 0 82 | --- !u!114 &11400000 83 | MonoBehaviour: 84 | m_ObjectHideFlags: 1 85 | m_PrefabParentObject: {fileID: 0} 86 | m_PrefabInternal: {fileID: 100100000} 87 | m_GameObject: {fileID: 100000} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: e004fefca5c7ba44d9c5ffd46fdee2ed, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | m_MovePower: 5 94 | m_UseTorque: 1 95 | m_MaxAngularVelocity: 25 96 | m_JumpPower: 4 97 | --- !u!114 &11400002 98 | MonoBehaviour: 99 | m_ObjectHideFlags: 1 100 | m_PrefabParentObject: {fileID: 0} 101 | m_PrefabInternal: {fileID: 100100000} 102 | m_GameObject: {fileID: 100000} 103 | m_Enabled: 1 104 | m_EditorHideFlags: 0 105 | m_Script: {fileID: 11500000, guid: daa7e0829bc72c94babd728cc0466196, type: 3} 106 | m_Name: 107 | m_EditorClassIdentifier: 108 | --- !u!135 &13500000 109 | SphereCollider: 110 | m_ObjectHideFlags: 1 111 | m_PrefabParentObject: {fileID: 0} 112 | m_PrefabInternal: {fileID: 100100000} 113 | m_GameObject: {fileID: 100000} 114 | m_Material: {fileID: 13400000, guid: 52baaeb214519f347a35cf0edfd262ff, type: 2} 115 | m_IsTrigger: 0 116 | m_Enabled: 1 117 | serializedVersion: 2 118 | m_Radius: .5 119 | m_Center: {x: 0, y: 0, z: 0} 120 | --- !u!1001 &100100000 121 | Prefab: 122 | m_ObjectHideFlags: 1 123 | serializedVersion: 2 124 | m_Modification: 125 | m_TransformParent: {fileID: 0} 126 | m_Modifications: [] 127 | m_RemovedComponents: [] 128 | m_ParentPrefab: {fileID: 0} 129 | m_RootGameObject: {fileID: 100000} 130 | m_IsPrefabParent: 1 131 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Prefabs/RollerBall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 753ea9ccf9eee6c42a0954ec8663b992 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/RollerBallGuidelines.txt: -------------------------------------------------------------------------------- 1 | The RollerBall prefab is a very simple controllable example which is designed to be used as-is. Just drop the prefab into your scene and you're good to go. It's designed as a minimal demonstration of using our Cross Platform Input scripts, and to demonstrate the way we've chosen to separate the input from the mechanics of the controller, so that you're free to swap in other input styles or AI controls. 2 | 3 | The ball converts its input to camera-relative motion, so it works fine with any of the camera rigs provided - even the CCTV Camera Rig! 4 | 5 | The simplest way to get started with the rolling ball controller is to: 6 | 7 | 1) Start with a suitable scene. There ought to be enough flat ground to roll around on. 8 | 9 | 2) Place the "RollerBall" prefab in the scene. 10 | 11 | 3) Place a camera rig in the scene, from the Cameras folder. 12 | 13 | 4) If present, delete the "Main Camera" that exists in new scenes by default. The camera rigs contain their own camera, so you don't need the default camera. 14 | 15 | There are a number of simple adjustable settings on the Ball allowing you to change the handling and jump power. For more information, see the comments in the script. -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/RollerBallGuidelines.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cdb788e79be7594e8cc8e1f742d23b7 3 | TextScriptImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a069f36cf822284f8a7dbb4d3940ec6 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Scripts/Ball.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Vehicles.Ball 5 | { 6 | public class Ball : MonoBehaviour 7 | { 8 | [SerializeField] private float m_MovePower = 5; // The force added to the ball to move it. 9 | [SerializeField] private bool m_UseTorque = true; // Whether or not to use torque to move the ball. 10 | [SerializeField] private float m_MaxAngularVelocity = 25; // The maximum velocity the ball can rotate at. 11 | [SerializeField] private float m_JumpPower = 2; // The force added to the ball when it jumps. 12 | 13 | private const float k_GroundRayLength = 1f; // The length of the ray to check if the ball is grounded. 14 | private Rigidbody m_Rigidbody; 15 | 16 | 17 | private void Start() 18 | { 19 | m_Rigidbody = GetComponent(); 20 | // Set the maximum angular velocity. 21 | GetComponent().maxAngularVelocity = m_MaxAngularVelocity; 22 | } 23 | 24 | 25 | public void Move(Vector3 moveDirection, bool jump) 26 | { 27 | // If using torque to rotate the ball... 28 | if (m_UseTorque) 29 | { 30 | // ... add torque around the axis defined by the move direction. 31 | m_Rigidbody.AddTorque(new Vector3(moveDirection.z, 0, -moveDirection.x)*m_MovePower); 32 | } 33 | else 34 | { 35 | // Otherwise add force in the move direction. 36 | m_Rigidbody.AddForce(moveDirection*m_MovePower); 37 | } 38 | 39 | // If on the ground and jump is pressed... 40 | if (Physics.Raycast(transform.position, -Vector3.up, k_GroundRayLength) && jump) 41 | { 42 | // ... add force in upwards. 43 | m_Rigidbody.AddForce(Vector3.up*m_JumpPower, ForceMode.Impulse); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Scripts/Ball.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e004fefca5c7ba44d9c5ffd46fdee2ed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Scripts/BallUserControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityStandardAssets.CrossPlatformInput; 4 | 5 | namespace UnityStandardAssets.Vehicles.Ball 6 | { 7 | public class BallUserControl : MonoBehaviour 8 | { 9 | private Ball ball; // Reference to the ball controller. 10 | 11 | private Vector3 move; 12 | // the world-relative desired move direction, calculated from the camForward and user input. 13 | 14 | private Transform cam; // A reference to the main camera in the scenes transform 15 | private Vector3 camForward; // The current forward direction of the camera 16 | private bool jump; // whether the jump button is currently pressed 17 | 18 | 19 | private void Awake() 20 | { 21 | // Set up the reference. 22 | ball = GetComponent(); 23 | 24 | 25 | // get the transform of the main camera 26 | if (Camera.main != null) 27 | { 28 | cam = Camera.main.transform; 29 | } 30 | else 31 | { 32 | Debug.LogWarning( 33 | "Warning: no main camera found. Ball needs a Camera tagged \"MainCamera\", for camera-relative controls."); 34 | // we use world-relative controls in this case, which may not be what the user wants, but hey, we warned them! 35 | } 36 | } 37 | 38 | 39 | private void Update() 40 | { 41 | // Get the axis and jump input. 42 | 43 | float h = CrossPlatformInputManager.GetAxis("Horizontal"); 44 | float v = CrossPlatformInputManager.GetAxis("Vertical"); 45 | jump = CrossPlatformInputManager.GetButton("Jump"); 46 | 47 | // calculate move direction 48 | if (cam != null) 49 | { 50 | // calculate camera relative direction to move: 51 | camForward = Vector3.Scale(cam.forward, new Vector3(1, 0, 1)).normalized; 52 | move = (v*camForward + h*cam.right).normalized; 53 | } 54 | else 55 | { 56 | // we use world-relative directions in the case of no main camera 57 | move = (v*Vector3.forward + h*Vector3.right).normalized; 58 | } 59 | } 60 | 61 | 62 | private void FixedUpdate() 63 | { 64 | // Call the Move function of the ball controller 65 | ball.Move(move, jump); 66 | jump = false; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Scripts/BallUserControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: daa7e0829bc72c94babd728cc0466196 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0245c71eb710114392b7dcfe5484e1b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallAlbedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallAlbedo.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallAlbedo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b42c70f54fe4f24d84cdc651f46c005 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallSpecularGloss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallSpecularGloss.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/RollerBall/Textures/RollerBallSpecularGloss.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7700d93a317c89246a647c7a6c3e7399 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c20f8969758d238498a0436e94138c16 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4a364c0d1173a24fb62b97b231773af 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidCrouch.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidCrouch.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidIdle.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidIdle.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidIdleJumpUp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidIdleJumpUp.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidJumpAndFall.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidJumpAndFall.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidMidAir.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidMidAir.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRun.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRun.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRunTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRunTurn.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRunTurnSharp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidRunTurnSharp.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidStandTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidStandTurn.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalk.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalk.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalkTurn.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalkTurn.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalkTurnSharp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animation/HumanoidWalkTurnSharp.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d11ec2c467565074097cdeabff1cb7e9 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animator/ThirdPersonAnimatorController.controller: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Animator/ThirdPersonAnimatorController.controller -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Animator/ThirdPersonAnimatorController.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2cf68ff4b1ffda45a77f7307dd789b9 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b6006100b399c24eb04f69232e427c4 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Materials/EthanGrey.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Materials/EthanGrey.mat -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Materials/EthanGrey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621e901dcf5ebaf46bce29d18f67194c 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Materials/EthanWhite.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f62b52b2d4b721742a0bc5c6b4db468d 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a814704cdbdeda449982c52d2d42f1a 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Models/Ethan.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Models/Ethan.fbx -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2e7d360a6b18d5469d1a89fc7a6f30a 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Prefabs/AIThirdPersonController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54eb5844754051b40a918a84c33b7c1a 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Prefabs/ThirdPersonController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7737647c22c1fc64a88d5cd030c352ce 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7713cbeac22f55048b2b887016532991 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/AICharacterControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Characters.ThirdPerson 5 | { 6 | [RequireComponent(typeof (UnityEngine.AI.NavMeshAgent))] 7 | [RequireComponent(typeof (ThirdPersonCharacter))] 8 | public class AICharacterControl : MonoBehaviour 9 | { 10 | public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding 11 | public ThirdPersonCharacter character { get; private set; } // the character we are controlling 12 | public Transform target; // target to aim for 13 | 14 | 15 | private void Start() 16 | { 17 | // get the components on the object we need ( should not be null due to require component so no need to check ) 18 | agent = GetComponentInChildren(); 19 | character = GetComponent(); 20 | 21 | agent.updateRotation = false; 22 | agent.updatePosition = true; 23 | } 24 | 25 | 26 | private void Update() 27 | { 28 | if (target != null) 29 | agent.SetDestination(target.position); 30 | 31 | if (agent.remainingDistance > agent.stoppingDistance) 32 | character.Move(agent.desiredVelocity, false, false); 33 | else 34 | character.Move(Vector3.zero, false, false); 35 | } 36 | 37 | 38 | public void SetTarget(Transform target) 39 | { 40 | this.target = target; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/AICharacterControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c5335f0882fe4d478883cc8c58ce906 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonCharacter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7a80d520cacc042b5fe14f373d8173 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonUserControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityStandardAssets.CrossPlatformInput; 4 | 5 | namespace UnityStandardAssets.Characters.ThirdPerson 6 | { 7 | [RequireComponent(typeof (ThirdPersonCharacter))] 8 | public class ThirdPersonUserControl : MonoBehaviour 9 | { 10 | private ThirdPersonCharacter m_Character; // A reference to the ThirdPersonCharacter on the object 11 | private Transform m_Cam; // A reference to the main camera in the scenes transform 12 | private Vector3 m_CamForward; // The current forward direction of the camera 13 | private Vector3 m_Move; 14 | private bool m_Jump; // the world-relative desired move direction, calculated from the camForward and user input. 15 | 16 | 17 | private void Start() 18 | { 19 | // get the transform of the main camera 20 | if (Camera.main != null) 21 | { 22 | m_Cam = Camera.main.transform; 23 | } 24 | else 25 | { 26 | Debug.LogWarning( 27 | "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.", gameObject); 28 | // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them! 29 | } 30 | 31 | // get the third person character ( this should never be null due to require component ) 32 | m_Character = GetComponent(); 33 | } 34 | 35 | 36 | private void Update() 37 | { 38 | if (!m_Jump) 39 | { 40 | m_Jump = CrossPlatformInputManager.GetButtonDown("Jump"); 41 | } 42 | 43 | } 44 | 45 | 46 | // Fixed update is called in sync with physics 47 | private void FixedUpdate() 48 | { 49 | // read inputs 50 | float h = CrossPlatformInputManager.GetAxis("Horizontal"); 51 | float v = CrossPlatformInputManager.GetAxis("Vertical"); 52 | bool crouch = Input.GetKey(KeyCode.C); 53 | 54 | // calculate move direction to pass to character 55 | if (m_Cam != null) 56 | { 57 | // calculate camera relative direction to move: 58 | m_CamForward = Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized; 59 | m_Move = v*m_CamForward + h*m_Cam.right; 60 | } 61 | else 62 | { 63 | // we use world-relative directions in the case of no main camera 64 | m_Move = v*Vector3.forward + h*Vector3.right; 65 | } 66 | #if !MOBILE_INPUT 67 | // walk speed multiplier 68 | if (Input.GetKey(KeyCode.LeftShift)) m_Move *= 0.5f; 69 | #endif 70 | 71 | // pass all parameters to the character control script 72 | m_Character.Move(m_Move, crouch, m_Jump); 73 | m_Jump = false; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonUserControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 521b611700410be45810047f0a74e899 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b0d1eb1e95ff6146b07a79bb825ac60 3 | folderAsset: yes 4 | timeCreated: 1481113004 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanNormals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanNormals.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanNormals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b5b7be0f2332c24f89a2af018daa62d 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 1 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 4096 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanOcclusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanOcclusion.png -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/Textures/EthanOcclusion.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e2f32e9a1fefc24092337ae061f3dbc 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 4096 29 | textureSettings: 30 | filterMode: 2 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 0 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/ThirdPersonCharacterGuidelines.txt: -------------------------------------------------------------------------------- 1 | In the ThirdPersonCharacter folder you'll find two ready-made character prefabs, which are used in the ThirdPersonCharacter sample scenes. These prefabs demonstrate how you can use the ThirdPersonCharacters scripts and animations we've included, including an AI-controlled variant which is able to walk towards a specified target, or follow a waypoint-based route. 2 | 3 | The simplest way to get started setting up your own character is to take our ThirdPersonCharacter and replace the art with your own model. To do so, make sure you've imported your own rigged model with a Humanoid avatar, then follow these steps: 4 | 5 | 1) Start with a suitable scene. There ought to be enough flat ground to walk around on. 6 | 7 | 2) Place the "ThirdPersonCharacter" prefab in the scene. 8 | 9 | 3) Unfold the ThirdPersonCharacter hierarchy in the hierarchy window, and delete all child of "ThirdPersonController". 10 | 11 | 4) Place your own character model as a child of the ThirdPersonCharacter. 12 | 13 | 5) Drop the Avatar of your model (created by model importer, cf documentation) inside the Avatar slot of the Animator component on "ThirdPersonController" 14 | 15 | 6) Make sure your character model's position in the inspector is set to zero on X and Z, and that it's Y position is appropriately adjusted so that your character's feet are at the same position as the ThirdPersonCharacter GameObject. (if you find it easier, you could add your character first before deleting Ethan, so that you can use Ethan's feet as a guide for where your character's feet should be) 16 | 17 | 7) Hit play, and try controlling your character! 18 | 19 | You'll probably want to add a camera rig so that the camera follows the character as it runs off. See the Camera Rig guidelines for instructions on how to do that. 20 | 21 | The ThirdPersonCharacter script exposes a number of properties which determine the jump power, the amount of control while in air, and various other speed and behaviour modifiers. For more detail about each setting, see the comments in the script. 22 | 23 | The ThirdPersonUserControl script takes input from the "CrossPlatformInput" class included in the sample assets, however if you're not targeting mobile or prefer to use a different system to read input, you can simply use Unity's built-in Input class in place of CrossPlatformInput. For more information, see the CrossPlatformInput guidelines. 24 | 25 | The sample scenes provided works on standalone and also include cross platform touch controls which are set up and ready to publish to mobile. 26 | 27 | The ThirdPersonAIControl component can be added instead of the user control component, allowing the character to be AI controlled. This relies on a NavMeshAgent to pathfind the way to the target. The NavMeshAgent should be a child object of the Character, as demonstrated in the AI Character Prefab provided. If you want to create your own AI characters, you can follow the steps above, but start with the AI prefab we provided. 28 | 29 | 30 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Characters/ThirdPersonCharacter/ThirdPersonCharacterGuidelines.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af82a5dcdad0f544c99fd1a84212021d 3 | TextScriptImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 710bc43f80d178548bd226c252c8e65b 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt: -------------------------------------------------------------------------------- 1 | 2 | Importing the CrossPlatformInput package adds a menu item to Unity, "CrossPlatformInput", which allows you to enable or disable the CrossPlatformInput in the editor. You must enable the CrossPlatformInput in order to see the control rigs in the editor, and to start using Unity Remote to control your game. 3 | 4 | The CrossPlatformInput sample assets contains two main sections. 5 | 6 | 1) The folder of prefabs provide a variety of ready-to-use "MobileControlRigs". Each control rig is suitable for a different purpose, and each implements the touch or tilt-based equivalent of some of the default standalone axes or buttons. These are ready to drop into your scene, and to use them you simply need to read the axes via the CrossPlatformInput class, rather than Unity's regular Input class. 7 | 8 | 2) The set of scripts provided are the scripts we used to put together the control rigs prefabs. They provide a simplified way of reading basic mobile input, such as tilt, taps and swipe gestures. They are designed so that various mobile controls can be read in the same way as regular Unity axes and buttons. You can use these scripts to build your own MobileControlRigs. 9 | 10 | 11 | 12 | For example the Car control rig feeds the tilt input of the mobile device to the "Horizontal" axis, and has an accelerator and brake touch button which are fed as a pair into the "Vertical" axis. These are virtual equivalents of the real "Horizontal" and "Vertical" axes defined in Unity's Input Manager. 13 | 14 | Therefore when you read CrossPlatformInput.GetAxis("Horizontal"), you will either get the "real" input value - if your build target is non-mobile, or the value from the mobile control rig - if your build target is set to a mobile platform. 15 | 16 | The CrossPlatformInput scripts and prefabs are provided together as an example of how you can implement a cross-platform control solution in Unity. They also allow us to provide our other sample scenes in a form that can be published as standalone or to mobile targets with no modification. 17 | 18 | To use the CrossPlatformInput, you need to drop a "Mobile Control Rig" into your scene (or create your own), and then make calls to CrossPlatformInput functions, referring to the axes and buttons that the Rig implements. 19 | 20 | When reading input from the CrossPlatformInput class, the values returned will be taken either from Unity's Input Manager settings, or from the mobile-specific controls set up, depending on which build target you have selected. 21 | 22 | The CrossPlatformInput class is designed to be called instead of Unity's own Input class, and so mirrors certain parts of the Input API - specifically the functions relating to Axes and Buttons: 23 | GetAxis, GetAxisRaw 24 | GetButton, GetButtonDown, GetButtonUp 25 | 26 | Notes for coders: 27 | This package sets two compiler define symbols. One is always set automatically, the other is optionally set from a menu item. 28 | 29 | Importing the "CrossPlatformInput" package will automatically add a compiler define symbol, "CROSS_PLATFORM_INPUT". This enables the CrossPlatformInput functions defined in some of the other Sample Asset packages (such as the Characters, Planes, etc). Without this symbol defined, those packages use Unity's regular Input class, which means they can be imported alone and still work without the CrossPlatformInput package. 30 | 31 | The optional define (which is set by default, but can be disabled using the "Mobile Input" menu), is "MOBILE_INPUT". This causes the MobileControlRigs to become active when a mobile build target is selected. It also enables certain mobile-specific control nuances in some of the packages, which make more sense when the character or vehicle is being controlled using mobile input (such as auto-leveling the character's look direction). This define is optional because some developers prefer to use standalone input methods instead of the Unity Remote app, when testing mobile apps in the editor's play mode. 32 | 33 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3b997593a4f12c4c991490593f3b513 3 | TextScriptImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d3fb8e05edcf4b41aef584ca1b0d06f 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 174090ae7f9eff84abe76f0ff062efac 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2169821f0567671499a5c10104c69c24 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3369231b1ed7ad34e84d9240a571db81 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9529ecc3d479da5499993355e6c2cb4f 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 400000} 11 | - 114: {fileID: 11400004} 12 | m_Layer: 0 13 | m_Name: MobileTiltControlRig 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!1 &100002 20 | GameObject: 21 | m_ObjectHideFlags: 0 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | serializedVersion: 4 25 | m_Component: 26 | - 4: {fileID: 400002} 27 | - 114: {fileID: 11400000} 28 | m_Layer: 0 29 | m_Name: TiltSteerInputH 30 | m_TagString: Untagged 31 | m_Icon: {fileID: 0} 32 | m_NavMeshLayer: 0 33 | m_StaticEditorFlags: 0 34 | m_IsActive: 1 35 | --- !u!1 &100004 36 | GameObject: 37 | m_ObjectHideFlags: 0 38 | m_PrefabParentObject: {fileID: 0} 39 | m_PrefabInternal: {fileID: 100100000} 40 | serializedVersion: 4 41 | m_Component: 42 | - 4: {fileID: 400004} 43 | - 114: {fileID: 11400002} 44 | m_Layer: 0 45 | m_Name: TiltSteerInputV 46 | m_TagString: Untagged 47 | m_Icon: {fileID: 0} 48 | m_NavMeshLayer: 0 49 | m_StaticEditorFlags: 0 50 | m_IsActive: 1 51 | --- !u!4 &400000 52 | Transform: 53 | m_ObjectHideFlags: 1 54 | m_PrefabParentObject: {fileID: 0} 55 | m_PrefabInternal: {fileID: 100100000} 56 | m_GameObject: {fileID: 100000} 57 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 58 | m_LocalPosition: {x: 385.509033, y: 268.018066, z: -62.2695312} 59 | m_LocalScale: {x: 1, y: 1, z: 1} 60 | m_Children: 61 | - {fileID: 400004} 62 | - {fileID: 400002} 63 | m_Father: {fileID: 0} 64 | m_RootOrder: 0 65 | --- !u!4 &400002 66 | Transform: 67 | m_ObjectHideFlags: 1 68 | m_PrefabParentObject: {fileID: 0} 69 | m_PrefabInternal: {fileID: 100100000} 70 | m_GameObject: {fileID: 100002} 71 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 72 | m_LocalPosition: {x: -928.193604, y: -473.736786, z: -.00032043457} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: [] 75 | m_Father: {fileID: 400000} 76 | m_RootOrder: 1 77 | --- !u!4 &400004 78 | Transform: 79 | m_ObjectHideFlags: 1 80 | m_PrefabParentObject: {fileID: 0} 81 | m_PrefabInternal: {fileID: 100100000} 82 | m_GameObject: {fileID: 100004} 83 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 84 | m_LocalPosition: {x: -928.193604, y: -473.736786, z: -.00032043457} 85 | m_LocalScale: {x: 1, y: 1, z: 1} 86 | m_Children: [] 87 | m_Father: {fileID: 400000} 88 | m_RootOrder: 0 89 | --- !u!114 &11400000 90 | MonoBehaviour: 91 | m_ObjectHideFlags: 1 92 | m_PrefabParentObject: {fileID: 0} 93 | m_PrefabInternal: {fileID: 100100000} 94 | m_GameObject: {fileID: 100002} 95 | m_Enabled: 1 96 | m_EditorHideFlags: 0 97 | m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} 98 | m_Name: 99 | m_EditorClassIdentifier: 100 | mapping: 101 | type: 0 102 | axisName: Horizontal 103 | tiltAroundAxis: 0 104 | fullTiltAngle: 50 105 | centreAngleOffset: 0 106 | --- !u!114 &11400002 107 | MonoBehaviour: 108 | m_ObjectHideFlags: 1 109 | m_PrefabParentObject: {fileID: 0} 110 | m_PrefabInternal: {fileID: 100100000} 111 | m_GameObject: {fileID: 100004} 112 | m_Enabled: 1 113 | m_EditorHideFlags: 0 114 | m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} 115 | m_Name: 116 | m_EditorClassIdentifier: 117 | mapping: 118 | type: 0 119 | axisName: Vertical 120 | tiltAroundAxis: 1 121 | fullTiltAngle: -35 122 | centreAngleOffset: 45 123 | --- !u!114 &11400004 124 | MonoBehaviour: 125 | m_ObjectHideFlags: 1 126 | m_PrefabParentObject: {fileID: 0} 127 | m_PrefabInternal: {fileID: 100100000} 128 | m_GameObject: {fileID: 100000} 129 | m_Enabled: 1 130 | m_EditorHideFlags: 0 131 | m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} 132 | m_Name: 133 | m_EditorClassIdentifier: 134 | --- !u!1001 &100100000 135 | Prefab: 136 | m_ObjectHideFlags: 1 137 | serializedVersion: 2 138 | m_Modification: 139 | m_TransformParent: {fileID: 0} 140 | m_Modifications: [] 141 | m_RemovedComponents: [] 142 | m_ParentPrefab: {fileID: 0} 143 | m_RootGameObject: {fileID: 100000} 144 | m_IsPrefabParent: 1 145 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 999388b68bb99b44099461bfbed94358 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f66eeca8ac36914e9ec9a716a9d9f73 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.EventSystems; 4 | 5 | namespace UnityStandardAssets.CrossPlatformInput 6 | { 7 | public class AxisTouchButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler 8 | { 9 | // designed to work in a pair with another axis touch button 10 | // (typically with one having -1 and one having 1 axisValues) 11 | public string axisName = "Horizontal"; // The name of the axis 12 | public float axisValue = 1; // The axis that the value has 13 | public float responseSpeed = 3; // The speed at which the axis touch button responds 14 | public float returnToCentreSpeed = 3; // The speed at which the button will return to its centre 15 | 16 | AxisTouchButton m_PairedWith; // Which button this one is paired with 17 | CrossPlatformInputManager.VirtualAxis m_Axis; // A reference to the virtual axis as it is in the cross platform input 18 | 19 | void OnEnable() 20 | { 21 | if (!CrossPlatformInputManager.AxisExists(axisName)) 22 | { 23 | // if the axis doesnt exist create a new one in cross platform input 24 | m_Axis = new CrossPlatformInputManager.VirtualAxis(axisName); 25 | CrossPlatformInputManager.RegisterVirtualAxis(m_Axis); 26 | } 27 | else 28 | { 29 | m_Axis = CrossPlatformInputManager.VirtualAxisReference(axisName); 30 | } 31 | FindPairedButton(); 32 | } 33 | 34 | void FindPairedButton() 35 | { 36 | // find the other button witch which this button should be paired 37 | // (it should have the same axisName) 38 | var otherAxisButtons = FindObjectsOfType(typeof(AxisTouchButton)) as AxisTouchButton[]; 39 | 40 | if (otherAxisButtons != null) 41 | { 42 | for (int i = 0; i < otherAxisButtons.Length; i++) 43 | { 44 | if (otherAxisButtons[i].axisName == axisName && otherAxisButtons[i] != this) 45 | { 46 | m_PairedWith = otherAxisButtons[i]; 47 | } 48 | } 49 | } 50 | } 51 | 52 | void OnDisable() 53 | { 54 | // The object is disabled so remove it from the cross platform input system 55 | m_Axis.Remove(); 56 | } 57 | 58 | 59 | public void OnPointerDown(PointerEventData data) 60 | { 61 | if (m_PairedWith == null) 62 | { 63 | FindPairedButton(); 64 | } 65 | // update the axis and record that the button has been pressed this frame 66 | m_Axis.Update(Mathf.MoveTowards(m_Axis.GetValue, axisValue, responseSpeed * Time.deltaTime)); 67 | } 68 | 69 | 70 | public void OnPointerUp(PointerEventData data) 71 | { 72 | m_Axis.Update(Mathf.MoveTowards(m_Axis.GetValue, 0, responseSpeed * Time.deltaTime)); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ab98b66288df7b4fa182075f2f12bd6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.CrossPlatformInput 5 | { 6 | public class ButtonHandler : MonoBehaviour 7 | { 8 | 9 | public string Name; 10 | 11 | void OnEnable() 12 | { 13 | 14 | } 15 | 16 | public void SetDownState() 17 | { 18 | CrossPlatformInputManager.SetButtonDown(Name); 19 | } 20 | 21 | 22 | public void SetUpState() 23 | { 24 | CrossPlatformInputManager.SetButtonUp(Name); 25 | } 26 | 27 | 28 | public void SetAxisPositiveState() 29 | { 30 | CrossPlatformInputManager.SetAxisPositive(Name); 31 | } 32 | 33 | 34 | public void SetAxisNeutralState() 35 | { 36 | CrossPlatformInputManager.SetAxisZero(Name); 37 | } 38 | 39 | 40 | public void SetAxisNegativeState() 41 | { 42 | CrossPlatformInputManager.SetAxisNegative(Name); 43 | } 44 | 45 | public void Update() 46 | { 47 | 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85bf3be603548374ca46f521a3aa7fda 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ac1ce5a5adfd9f46adbf5b6f752a47c 3 | labels: 4 | - Done 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: -1010 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.CrossPlatformInput 5 | { 6 | public class InputAxisScrollbar : MonoBehaviour 7 | { 8 | public string axis; 9 | 10 | void Update() { } 11 | 12 | public void HandleInput(float value) 13 | { 14 | CrossPlatformInputManager.SetAxis(axis, (value*2f) - 1f); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d3269566d48b8447bb48d2259e28f8b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.EventSystems; 4 | 5 | namespace UnityStandardAssets.CrossPlatformInput 6 | { 7 | public class Joystick : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler 8 | { 9 | public enum AxisOption 10 | { 11 | // Options for which axes to use 12 | Both, // Use both 13 | OnlyHorizontal, // Only horizontal 14 | OnlyVertical // Only vertical 15 | } 16 | 17 | public int MovementRange = 100; 18 | public AxisOption axesToUse = AxisOption.Both; // The options for the axes that the still will use 19 | public string horizontalAxisName = "Horizontal"; // The name given to the horizontal axis for the cross platform input 20 | public string verticalAxisName = "Vertical"; // The name given to the vertical axis for the cross platform input 21 | 22 | Vector3 m_StartPos; 23 | bool m_UseX; // Toggle for using the x axis 24 | bool m_UseY; // Toggle for using the Y axis 25 | CrossPlatformInputManager.VirtualAxis m_HorizontalVirtualAxis; // Reference to the joystick in the cross platform input 26 | CrossPlatformInputManager.VirtualAxis m_VerticalVirtualAxis; // Reference to the joystick in the cross platform input 27 | 28 | void OnEnable() 29 | { 30 | CreateVirtualAxes(); 31 | } 32 | 33 | void Start() 34 | { 35 | m_StartPos = transform.position; 36 | } 37 | 38 | void UpdateVirtualAxes(Vector3 value) 39 | { 40 | var delta = m_StartPos - value; 41 | delta.y = -delta.y; 42 | delta /= MovementRange; 43 | if (m_UseX) 44 | { 45 | m_HorizontalVirtualAxis.Update(-delta.x); 46 | } 47 | 48 | if (m_UseY) 49 | { 50 | m_VerticalVirtualAxis.Update(delta.y); 51 | } 52 | } 53 | 54 | void CreateVirtualAxes() 55 | { 56 | // set axes to use 57 | m_UseX = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyHorizontal); 58 | m_UseY = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyVertical); 59 | 60 | // create new axes based on axes to use 61 | if (m_UseX) 62 | { 63 | m_HorizontalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(horizontalAxisName); 64 | CrossPlatformInputManager.RegisterVirtualAxis(m_HorizontalVirtualAxis); 65 | } 66 | if (m_UseY) 67 | { 68 | m_VerticalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(verticalAxisName); 69 | CrossPlatformInputManager.RegisterVirtualAxis(m_VerticalVirtualAxis); 70 | } 71 | } 72 | 73 | 74 | public void OnDrag(PointerEventData data) 75 | { 76 | Vector3 newPos = Vector3.zero; 77 | 78 | if (m_UseX) 79 | { 80 | int delta = (int)(data.position.x - m_StartPos.x); 81 | delta = Mathf.Clamp(delta, - MovementRange, MovementRange); 82 | newPos.x = delta; 83 | } 84 | 85 | if (m_UseY) 86 | { 87 | int delta = (int)(data.position.y - m_StartPos.y); 88 | delta = Mathf.Clamp(delta, -MovementRange, MovementRange); 89 | newPos.y = delta; 90 | } 91 | transform.position = new Vector3(m_StartPos.x + newPos.x, m_StartPos.y + newPos.y, m_StartPos.z + newPos.z); 92 | UpdateVirtualAxes(transform.position); 93 | } 94 | 95 | 96 | public void OnPointerUp(PointerEventData data) 97 | { 98 | transform.position = m_StartPos; 99 | UpdateVirtualAxes(m_StartPos); 100 | } 101 | 102 | 103 | public void OnPointerDown(PointerEventData data) { } 104 | 105 | void OnDisable() 106 | { 107 | // remove the joysticks from the cross platform input 108 | if (m_UseX) 109 | { 110 | m_HorizontalVirtualAxis.Remove(); 111 | } 112 | if (m_UseY) 113 | { 114 | m_VerticalVirtualAxis.Remove(); 115 | } 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00c3c865782347f41b6358d9fba14b48 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | #if UNITY_EDITOR 3 | using UnityEditor; 4 | #endif 5 | using UnityEngine; 6 | 7 | 8 | namespace UnityStandardAssets.CrossPlatformInput 9 | { 10 | [ExecuteInEditMode] 11 | public class MobileControlRig : MonoBehaviour 12 | { 13 | // this script enables or disables the child objects of a control rig 14 | // depending on whether the USE_MOBILE_INPUT define is declared. 15 | 16 | // This define is set or unset by a menu item that is included with 17 | // the Cross Platform Input package. 18 | 19 | #if !UNITY_EDITOR 20 | void OnEnable() 21 | { 22 | CheckEnableControlRig(); 23 | } 24 | #endif 25 | 26 | private void Start() 27 | { 28 | #if UNITY_EDITOR 29 | if (Application.isPlaying) //if in the editor, need to check if we are playing, as start is also called just after exiting play 30 | #endif 31 | { 32 | UnityEngine.EventSystems.EventSystem system = GameObject.FindObjectOfType(); 33 | 34 | if (system == null) 35 | {//the scene have no event system, spawn one 36 | GameObject o = new GameObject("EventSystem"); 37 | 38 | o.AddComponent(); 39 | o.AddComponent(); 40 | } 41 | } 42 | } 43 | 44 | #if UNITY_EDITOR 45 | 46 | private void OnEnable() 47 | { 48 | EditorUserBuildSettings.activeBuildTargetChanged += Update; 49 | EditorApplication.update += Update; 50 | } 51 | 52 | 53 | private void OnDisable() 54 | { 55 | EditorUserBuildSettings.activeBuildTargetChanged -= Update; 56 | EditorApplication.update -= Update; 57 | } 58 | 59 | 60 | private void Update() 61 | { 62 | CheckEnableControlRig(); 63 | } 64 | #endif 65 | 66 | 67 | private void CheckEnableControlRig() 68 | { 69 | #if MOBILE_INPUT 70 | EnableControlRig(true); 71 | #else 72 | EnableControlRig(false); 73 | #endif 74 | } 75 | 76 | 77 | private void EnableControlRig(bool enabled) 78 | { 79 | foreach (Transform t in transform) 80 | { 81 | t.gameObject.SetActive(enabled); 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71398ce7fbc3a5b4fa50b50bd54317a7 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bc72db1e9dcb9647818df5a07871127 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.CrossPlatformInput.PlatformSpecific 5 | { 6 | public class MobileInput : VirtualInput 7 | { 8 | private void AddButton(string name) 9 | { 10 | // we have not registered this button yet so add it, happens in the constructor 11 | CrossPlatformInputManager.RegisterVirtualButton(new CrossPlatformInputManager.VirtualButton(name)); 12 | } 13 | 14 | 15 | private void AddAxes(string name) 16 | { 17 | // we have not registered this button yet so add it, happens in the constructor 18 | CrossPlatformInputManager.RegisterVirtualAxis(new CrossPlatformInputManager.VirtualAxis(name)); 19 | } 20 | 21 | 22 | public override float GetAxis(string name, bool raw) 23 | { 24 | if (!m_VirtualAxes.ContainsKey(name)) 25 | { 26 | AddAxes(name); 27 | } 28 | return m_VirtualAxes[name].GetValue; 29 | } 30 | 31 | 32 | public override void SetButtonDown(string name) 33 | { 34 | if (!m_VirtualButtons.ContainsKey(name)) 35 | { 36 | AddButton(name); 37 | } 38 | m_VirtualButtons[name].Pressed(); 39 | } 40 | 41 | 42 | public override void SetButtonUp(string name) 43 | { 44 | if (!m_VirtualButtons.ContainsKey(name)) 45 | { 46 | AddButton(name); 47 | } 48 | m_VirtualButtons[name].Released(); 49 | } 50 | 51 | 52 | public override void SetAxisPositive(string name) 53 | { 54 | if (!m_VirtualAxes.ContainsKey(name)) 55 | { 56 | AddAxes(name); 57 | } 58 | m_VirtualAxes[name].Update(1f); 59 | } 60 | 61 | 62 | public override void SetAxisNegative(string name) 63 | { 64 | if (!m_VirtualAxes.ContainsKey(name)) 65 | { 66 | AddAxes(name); 67 | } 68 | m_VirtualAxes[name].Update(-1f); 69 | } 70 | 71 | 72 | public override void SetAxisZero(string name) 73 | { 74 | if (!m_VirtualAxes.ContainsKey(name)) 75 | { 76 | AddAxes(name); 77 | } 78 | m_VirtualAxes[name].Update(0f); 79 | } 80 | 81 | 82 | public override void SetAxis(string name, float value) 83 | { 84 | if (!m_VirtualAxes.ContainsKey(name)) 85 | { 86 | AddAxes(name); 87 | } 88 | m_VirtualAxes[name].Update(value); 89 | } 90 | 91 | 92 | public override bool GetButtonDown(string name) 93 | { 94 | if (m_VirtualButtons.ContainsKey(name)) 95 | { 96 | return m_VirtualButtons[name].GetButtonDown; 97 | } 98 | 99 | AddButton(name); 100 | return m_VirtualButtons[name].GetButtonDown; 101 | } 102 | 103 | 104 | public override bool GetButtonUp(string name) 105 | { 106 | if (m_VirtualButtons.ContainsKey(name)) 107 | { 108 | return m_VirtualButtons[name].GetButtonUp; 109 | } 110 | 111 | AddButton(name); 112 | return m_VirtualButtons[name].GetButtonUp; 113 | } 114 | 115 | 116 | public override bool GetButton(string name) 117 | { 118 | if (m_VirtualButtons.ContainsKey(name)) 119 | { 120 | return m_VirtualButtons[name].GetButton; 121 | } 122 | 123 | AddButton(name); 124 | return m_VirtualButtons[name].GetButton; 125 | } 126 | 127 | 128 | public override Vector3 MousePosition() 129 | { 130 | return virtualMousePosition; 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9703d53e47195aa4190acd11369ccd1b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.CrossPlatformInput.PlatformSpecific 5 | { 6 | public class StandaloneInput : VirtualInput 7 | { 8 | public override float GetAxis(string name, bool raw) 9 | { 10 | return raw ? Input.GetAxisRaw(name) : Input.GetAxis(name); 11 | } 12 | 13 | 14 | public override bool GetButton(string name) 15 | { 16 | return Input.GetButton(name); 17 | } 18 | 19 | 20 | public override bool GetButtonDown(string name) 21 | { 22 | return Input.GetButtonDown(name); 23 | } 24 | 25 | 26 | public override bool GetButtonUp(string name) 27 | { 28 | return Input.GetButtonUp(name); 29 | } 30 | 31 | 32 | public override void SetButtonDown(string name) 33 | { 34 | throw new Exception( 35 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 36 | } 37 | 38 | 39 | public override void SetButtonUp(string name) 40 | { 41 | throw new Exception( 42 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 43 | } 44 | 45 | 46 | public override void SetAxisPositive(string name) 47 | { 48 | throw new Exception( 49 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 50 | } 51 | 52 | 53 | public override void SetAxisNegative(string name) 54 | { 55 | throw new Exception( 56 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 57 | } 58 | 59 | 60 | public override void SetAxisZero(string name) 61 | { 62 | throw new Exception( 63 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 64 | } 65 | 66 | 67 | public override void SetAxis(string name, float value) 68 | { 69 | throw new Exception( 70 | " This is not possible to be called for standalone input. Please check your platform and code where this is called"); 71 | } 72 | 73 | 74 | public override Vector3 MousePosition() 75 | { 76 | return Input.mousePosition; 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9961032f4f02c4f41997c3ea399d2f22 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c2d84226fbbaf94e9c1451f1c39b06a 3 | labels: 4 | - Not 5 | - Fully 6 | - Implemented 7 | MonoImporter: 8 | serializedVersion: 2 9 | defaultReferences: [] 10 | executionOrder: -1001 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1caf40fc8bebb6b43b2550c05ca791d6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f57aeb1b8dce3342bea5c28ac17db24 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1835e4537efbdd94b93c2dd136860f1d 3 | folderAsset: yes 4 | timeCreated: 1436977288 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb5f6e2757c821940b69cf1456f7865a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f588d850485d0ae479d73cf3bd0b7b00 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49b611e658efbf443b686a4036f74fe3 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4db017495c69e8140a56a0e2b669e3f8 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b1a64ea234fb2343b8d0686c51280de 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 827c9cd4a3943534f909ac6473e17288 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3983c59ebf804b4abba687bd7c9e92f 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a94c9a7eb94ceec4a8d67a1890e22e51 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 21300000: ResetButton 6 | serializedVersion: 2 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | linearTexture: 0 11 | correctGamma: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapFadeDistanceStart: 1 15 | mipMapFadeDistanceEnd: 3 16 | bumpmap: 17 | convertToNormalMap: 0 18 | externalNormalMap: 0 19 | heightScale: .25 20 | normalMapFilter: 0 21 | isReadable: 0 22 | grayScaleToAlpha: 0 23 | generateCubemap: 0 24 | cubemapConvolution: 0 25 | cubemapConvolutionSteps: 8 26 | cubemapConvolutionExponent: 1.5 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 256 30 | textureSettings: 31 | filterMode: 1 32 | aniso: 16 33 | mipBias: -1 34 | wrapMode: 1 35 | nPOTScale: 0 36 | lightmap: 0 37 | rGBM: 0 38 | compressionQuality: 50 39 | spriteMode: 1 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 1 47 | textureType: 8 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d8675433a508ec47b8f895201eacf20 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 21300000: JumpButton 6 | serializedVersion: 2 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | linearTexture: 0 11 | correctGamma: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapFadeDistanceStart: 1 15 | mipMapFadeDistanceEnd: 3 16 | bumpmap: 17 | convertToNormalMap: 0 18 | externalNormalMap: 0 19 | heightScale: .25 20 | normalMapFilter: 0 21 | isReadable: 0 22 | grayScaleToAlpha: 0 23 | generateCubemap: 0 24 | cubemapConvolution: 0 25 | cubemapConvolutionSteps: 8 26 | cubemapConvolutionExponent: 1.5 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 1024 30 | textureSettings: 31 | filterMode: 1 32 | aniso: 16 33 | mipBias: -1 34 | wrapMode: 1 35 | nPOTScale: 0 36 | lightmap: 0 37 | rGBM: 0 38 | compressionQuality: 50 39 | spriteMode: 1 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 40, y: 40, z: 40, w: 40} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 1 47 | textureType: 8 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5485e2f56028a3c4cb54f5caa167377e 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9866a92691696b346901281f2b329034 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c6271a290ef75b4c97d58746c86c5b8 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d7c6e4896067aa4fa512a00f692ac1c 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea5873cfd9158664f89459f0c9e1d853 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 21300000: SliderBackground 6 | serializedVersion: 2 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | linearTexture: 0 11 | correctGamma: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapFadeDistanceStart: 1 15 | mipMapFadeDistanceEnd: 3 16 | bumpmap: 17 | convertToNormalMap: 0 18 | externalNormalMap: 0 19 | heightScale: .25 20 | normalMapFilter: 0 21 | isReadable: 0 22 | grayScaleToAlpha: 0 23 | generateCubemap: 0 24 | cubemapConvolution: 0 25 | cubemapConvolutionSteps: 8 26 | cubemapConvolutionExponent: 1.5 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 256 30 | textureSettings: 31 | filterMode: 1 32 | aniso: 16 33 | mipBias: -1 34 | wrapMode: 1 35 | nPOTScale: 0 36 | lightmap: 0 37 | rGBM: 0 38 | compressionQuality: 50 39 | spriteMode: 1 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 31, y: 15, z: 31, w: 15} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 1 47 | textureType: 8 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0626b924325d1c34cafa6b22297f4e4f 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 1 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 1 46 | textureType: 8 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png -------------------------------------------------------------------------------- /Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4f1fee3de32377429fd1348fae62b10 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 21300000: JumpButton 6 | serializedVersion: 2 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | linearTexture: 0 11 | correctGamma: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapFadeDistanceStart: 1 15 | mipMapFadeDistanceEnd: 3 16 | bumpmap: 17 | convertToNormalMap: 0 18 | externalNormalMap: 0 19 | heightScale: .25 20 | normalMapFilter: 0 21 | isReadable: 0 22 | grayScaleToAlpha: 0 23 | generateCubemap: 0 24 | cubemapConvolution: 0 25 | cubemapConvolutionSteps: 8 26 | cubemapConvolutionExponent: 1.5 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 1024 30 | textureSettings: 31 | filterMode: 1 32 | aniso: 16 33 | mipBias: -1 34 | wrapMode: 1 35 | nPOTScale: 0 36 | lightmap: 0 37 | rGBM: 0 38 | compressionQuality: 50 39 | spriteMode: 1 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: .5, y: .5} 44 | spriteBorder: {x: 65, y: 65, z: 65, w: 65} 45 | spritePixelsToUnits: 100 46 | alphaIsTransparency: 1 47 | textureType: 8 48 | buildTargetSettings: [] 49 | spriteSheet: 50 | sprites: [] 51 | spritePackingTag: 52 | userData: 53 | assetBundleName: 54 | -------------------------------------------------------------------------------- /Assets/Standard Assets/PhysicsMaterials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4245849d0ebf3b144adc5b08a65a5d50 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/PhysicsMaterials/ZeroFriction.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: ZeroFriction 9 | dynamicFriction: 0 10 | staticFriction: 0 11 | bounciness: 0 12 | frictionCombine: 2 13 | bounceCombine: 0 14 | frictionDirection2: {x: 0, y: 0, z: 0} 15 | dynamicFriction2: 0 16 | staticFriction2: 0 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/PhysicsMaterials/ZeroFriction.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2815a7ab32e42c4bb42f59caacb8ec1 3 | timeCreated: 1427463081 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 542fa08b126bdb54196a0d5f1b7902d1 3 | folderAsset: yes 4 | timeCreated: 1481113003 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ActivateTrigger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using Object = UnityEngine.Object; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | public class ActivateTrigger : MonoBehaviour 8 | { 9 | // A multi-purpose script which causes an action to occur when 10 | // a trigger collider is entered. 11 | public enum Mode 12 | { 13 | Trigger = 0, // Just broadcast the action on to the target 14 | Replace = 1, // replace target with source 15 | Activate = 2, // Activate the target GameObject 16 | Enable = 3, // Enable a component 17 | Animate = 4, // Start animation on target 18 | Deactivate = 5 // Decativate target GameObject 19 | } 20 | 21 | public Mode action = Mode.Activate; // The action to accomplish 22 | public Object target; // The game object to affect. If none, the trigger work on this game object 23 | public GameObject source; 24 | public int triggerCount = 1; 25 | public bool repeatTrigger = false; 26 | 27 | 28 | private void DoActivateTrigger() 29 | { 30 | triggerCount--; 31 | 32 | if (triggerCount == 0 || repeatTrigger) 33 | { 34 | Object currentTarget = target ?? gameObject; 35 | Behaviour targetBehaviour = currentTarget as Behaviour; 36 | GameObject targetGameObject = currentTarget as GameObject; 37 | if (targetBehaviour != null) 38 | { 39 | targetGameObject = targetBehaviour.gameObject; 40 | } 41 | 42 | switch (action) 43 | { 44 | case Mode.Trigger: 45 | if (targetGameObject != null) 46 | { 47 | targetGameObject.BroadcastMessage("DoActivateTrigger"); 48 | } 49 | break; 50 | case Mode.Replace: 51 | if (source != null) 52 | { 53 | if (targetGameObject != null) 54 | { 55 | Instantiate(source, targetGameObject.transform.position, 56 | targetGameObject.transform.rotation); 57 | DestroyObject(targetGameObject); 58 | } 59 | } 60 | break; 61 | case Mode.Activate: 62 | if (targetGameObject != null) 63 | { 64 | targetGameObject.SetActive(true); 65 | } 66 | break; 67 | case Mode.Enable: 68 | if (targetBehaviour != null) 69 | { 70 | targetBehaviour.enabled = true; 71 | } 72 | break; 73 | case Mode.Animate: 74 | if (targetGameObject != null) 75 | { 76 | targetGameObject.GetComponent().Play(); 77 | } 78 | break; 79 | case Mode.Deactivate: 80 | if (targetGameObject != null) 81 | { 82 | targetGameObject.SetActive(false); 83 | } 84 | break; 85 | } 86 | } 87 | } 88 | 89 | 90 | private void OnTriggerEnter(Collider other) 91 | { 92 | DoActivateTrigger(); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ActivateTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8634e062924929664361c08745211fb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/AlphaButtonClickMask.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class AlphaButtonClickMask : MonoBehaviour, ICanvasRaycastFilter 6 | { 7 | protected Image _image; 8 | 9 | public void Start() 10 | { 11 | _image = GetComponent(); 12 | 13 | Texture2D tex = _image.sprite.texture as Texture2D; 14 | 15 | bool isInvalid = false; 16 | if (tex != null) 17 | { 18 | try 19 | { 20 | tex.GetPixels32(); 21 | } 22 | catch (UnityException e) 23 | { 24 | Debug.LogError(e.Message); 25 | isInvalid = true; 26 | } 27 | } 28 | else 29 | { 30 | isInvalid = true; 31 | } 32 | 33 | if (isInvalid) 34 | { 35 | Debug.LogError("This script need an Image with a readbale Texture2D to work."); 36 | } 37 | } 38 | 39 | public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) 40 | { 41 | Vector2 localPoint; 42 | RectTransformUtility.ScreenPointToLocalPointInRectangle(_image.rectTransform, sp, eventCamera, out localPoint); 43 | 44 | Vector2 normalizedLocal = new Vector2(1.0f + localPoint.x / _image.rectTransform.rect.width, 1.0f + localPoint.y / _image.rectTransform.rect.height); 45 | Vector2 uv = new Vector2( 46 | _image.sprite.rect.x + normalizedLocal.x * _image.sprite.rect.width, 47 | _image.sprite.rect.y + normalizedLocal.y * _image.sprite.rect.height ); 48 | 49 | uv.x /= _image.sprite.texture.width; 50 | uv.y /= _image.sprite.texture.height; 51 | 52 | //uv are inversed, as 0,0 or the rect transform seem to be upper right, then going negativ toward lower left... 53 | Color c = _image.sprite.texture.GetPixelBilinear(uv.x, uv.y); 54 | 55 | return c.a> 0.1f; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/AlphaButtonClickMask.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 971f44ba24a74294294daed00507d80e 3 | timeCreated: 1436868016 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/AutoMobileShaderSwitch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c4978ff6447f9040b84acc89b0bbdc8 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/AutoMoveAndRotate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Utility 5 | { 6 | public class AutoMoveAndRotate : MonoBehaviour 7 | { 8 | public Vector3andSpace moveUnitsPerSecond; 9 | public Vector3andSpace rotateDegreesPerSecond; 10 | public bool ignoreTimescale; 11 | private float m_LastRealTime; 12 | 13 | 14 | private void Start() 15 | { 16 | m_LastRealTime = Time.realtimeSinceStartup; 17 | } 18 | 19 | 20 | // Update is called once per frame 21 | private void Update() 22 | { 23 | float deltaTime = Time.deltaTime; 24 | if (ignoreTimescale) 25 | { 26 | deltaTime = (Time.realtimeSinceStartup - m_LastRealTime); 27 | m_LastRealTime = Time.realtimeSinceStartup; 28 | } 29 | transform.Translate(moveUnitsPerSecond.value*deltaTime, moveUnitsPerSecond.space); 30 | transform.Rotate(rotateDegreesPerSecond.value*deltaTime, moveUnitsPerSecond.space); 31 | } 32 | 33 | 34 | [Serializable] 35 | public class Vector3andSpace 36 | { 37 | public Vector3 value; 38 | public Space space = Space.Self; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/AutoMoveAndRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1347817507220a4384f3ff6f7c24546 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/CameraRefocus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Utility 5 | { 6 | public class CameraRefocus 7 | { 8 | public Camera Camera; 9 | public Vector3 Lookatpoint; 10 | public Transform Parent; 11 | 12 | private Vector3 m_OrigCameraPos; 13 | private bool m_Refocus; 14 | 15 | 16 | public CameraRefocus(Camera camera, Transform parent, Vector3 origCameraPos) 17 | { 18 | m_OrigCameraPos = origCameraPos; 19 | Camera = camera; 20 | Parent = parent; 21 | } 22 | 23 | 24 | public void ChangeCamera(Camera camera) 25 | { 26 | Camera = camera; 27 | } 28 | 29 | 30 | public void ChangeParent(Transform parent) 31 | { 32 | Parent = parent; 33 | } 34 | 35 | 36 | public void GetFocusPoint() 37 | { 38 | RaycastHit hitInfo; 39 | if (Physics.Raycast(Parent.transform.position + m_OrigCameraPos, Parent.transform.forward, out hitInfo, 40 | 100f)) 41 | { 42 | Lookatpoint = hitInfo.point; 43 | m_Refocus = true; 44 | return; 45 | } 46 | m_Refocus = false; 47 | } 48 | 49 | 50 | public void SetFocusPoint() 51 | { 52 | if (m_Refocus) 53 | { 54 | Camera.transform.LookAt(Lookatpoint); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/CameraRefocus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1e2e7a54dcc8694ab1eca46d072f264 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/CurveControlledBob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | [Serializable] 8 | public class CurveControlledBob 9 | { 10 | public float HorizontalBobRange = 0.33f; 11 | public float VerticalBobRange = 0.33f; 12 | public AnimationCurve Bobcurve = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.5f, 1f), 13 | new Keyframe(1f, 0f), new Keyframe(1.5f, -1f), 14 | new Keyframe(2f, 0f)); // sin curve for head bob 15 | public float VerticaltoHorizontalRatio = 1f; 16 | 17 | private float m_CyclePositionX; 18 | private float m_CyclePositionY; 19 | private float m_BobBaseInterval; 20 | private Vector3 m_OriginalCameraPosition; 21 | private float m_Time; 22 | 23 | 24 | public void Setup(Camera camera, float bobBaseInterval) 25 | { 26 | m_BobBaseInterval = bobBaseInterval; 27 | m_OriginalCameraPosition = camera.transform.localPosition; 28 | 29 | // get the length of the curve in time 30 | m_Time = Bobcurve[Bobcurve.length - 1].time; 31 | } 32 | 33 | 34 | public Vector3 DoHeadBob(float speed) 35 | { 36 | float xPos = m_OriginalCameraPosition.x + (Bobcurve.Evaluate(m_CyclePositionX)*HorizontalBobRange); 37 | float yPos = m_OriginalCameraPosition.y + (Bobcurve.Evaluate(m_CyclePositionY)*VerticalBobRange); 38 | 39 | m_CyclePositionX += (speed*Time.deltaTime)/m_BobBaseInterval; 40 | m_CyclePositionY += ((speed*Time.deltaTime)/m_BobBaseInterval)*VerticaltoHorizontalRatio; 41 | 42 | if (m_CyclePositionX > m_Time) 43 | { 44 | m_CyclePositionX = m_CyclePositionX - m_Time; 45 | } 46 | if (m_CyclePositionY > m_Time) 47 | { 48 | m_CyclePositionY = m_CyclePositionY - m_Time; 49 | } 50 | 51 | return new Vector3(xPos, yPos, 0f); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/CurveControlledBob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 492f54f4accf00440828ffcb9e4fcc19 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/DragRigidbody.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | public class DragRigidbody : MonoBehaviour 8 | { 9 | const float k_Spring = 50.0f; 10 | const float k_Damper = 5.0f; 11 | const float k_Drag = 10.0f; 12 | const float k_AngularDrag = 5.0f; 13 | const float k_Distance = 0.2f; 14 | const bool k_AttachToCenterOfMass = false; 15 | 16 | private SpringJoint m_SpringJoint; 17 | 18 | 19 | private void Update() 20 | { 21 | // Make sure the user pressed the mouse down 22 | if (!Input.GetMouseButtonDown(0)) 23 | { 24 | return; 25 | } 26 | 27 | var mainCamera = FindCamera(); 28 | 29 | // We need to actually hit an object 30 | RaycastHit hit = new RaycastHit(); 31 | if ( 32 | !Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition).origin, 33 | mainCamera.ScreenPointToRay(Input.mousePosition).direction, out hit, 100, 34 | Physics.DefaultRaycastLayers)) 35 | { 36 | return; 37 | } 38 | // We need to hit a rigidbody that is not kinematic 39 | if (!hit.rigidbody || hit.rigidbody.isKinematic) 40 | { 41 | return; 42 | } 43 | 44 | if (!m_SpringJoint) 45 | { 46 | var go = new GameObject("Rigidbody dragger"); 47 | Rigidbody body = go.AddComponent(); 48 | m_SpringJoint = go.AddComponent(); 49 | body.isKinematic = true; 50 | } 51 | 52 | m_SpringJoint.transform.position = hit.point; 53 | m_SpringJoint.anchor = Vector3.zero; 54 | 55 | m_SpringJoint.spring = k_Spring; 56 | m_SpringJoint.damper = k_Damper; 57 | m_SpringJoint.maxDistance = k_Distance; 58 | m_SpringJoint.connectedBody = hit.rigidbody; 59 | 60 | StartCoroutine("DragObject", hit.distance); 61 | } 62 | 63 | 64 | private IEnumerator DragObject(float distance) 65 | { 66 | var oldDrag = m_SpringJoint.connectedBody.drag; 67 | var oldAngularDrag = m_SpringJoint.connectedBody.angularDrag; 68 | m_SpringJoint.connectedBody.drag = k_Drag; 69 | m_SpringJoint.connectedBody.angularDrag = k_AngularDrag; 70 | var mainCamera = FindCamera(); 71 | while (Input.GetMouseButton(0)) 72 | { 73 | var ray = mainCamera.ScreenPointToRay(Input.mousePosition); 74 | m_SpringJoint.transform.position = ray.GetPoint(distance); 75 | yield return null; 76 | } 77 | if (m_SpringJoint.connectedBody) 78 | { 79 | m_SpringJoint.connectedBody.drag = oldDrag; 80 | m_SpringJoint.connectedBody.angularDrag = oldAngularDrag; 81 | m_SpringJoint.connectedBody = null; 82 | } 83 | } 84 | 85 | 86 | private Camera FindCamera() 87 | { 88 | if (GetComponent()) 89 | { 90 | return GetComponent(); 91 | } 92 | 93 | return Camera.main; 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/DragRigidbody.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58650e15a2607e44daa0f150e0061d89 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/DynamicShadowSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Utility 5 | { 6 | public class DynamicShadowSettings : MonoBehaviour 7 | { 8 | public Light sunLight; 9 | public float minHeight = 10; 10 | public float minShadowDistance = 80; 11 | public float minShadowBias = 1; 12 | public float maxHeight = 1000; 13 | public float maxShadowDistance = 10000; 14 | public float maxShadowBias = 0.1f; 15 | public float adaptTime = 1; 16 | 17 | private float m_SmoothHeight; 18 | private float m_ChangeSpeed; 19 | private float m_OriginalStrength = 1; 20 | 21 | 22 | private void Start() 23 | { 24 | m_OriginalStrength = sunLight.shadowStrength; 25 | } 26 | 27 | 28 | // Update is called once per frame 29 | private void Update() 30 | { 31 | Ray ray = new Ray(Camera.main.transform.position, -Vector3.up); 32 | RaycastHit hit; 33 | float height = transform.position.y; 34 | if (Physics.Raycast(ray, out hit)) 35 | { 36 | height = hit.distance; 37 | } 38 | 39 | if (Mathf.Abs(height - m_SmoothHeight) > 1) 40 | { 41 | m_SmoothHeight = Mathf.SmoothDamp(m_SmoothHeight, height, ref m_ChangeSpeed, adaptTime); 42 | } 43 | 44 | float i = Mathf.InverseLerp(minHeight, maxHeight, m_SmoothHeight); 45 | 46 | QualitySettings.shadowDistance = Mathf.Lerp(minShadowDistance, maxShadowDistance, i); 47 | sunLight.shadowBias = Mathf.Lerp(minShadowBias, maxShadowBias, 1 - ((1 - i)*(1 - i))); 48 | sunLight.shadowStrength = Mathf.Lerp(m_OriginalStrength, 0, i); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/DynamicShadowSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8566902b50d5bfb4fb7f8b89f9cdbe8b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/EventSystemChecker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | using UnityEngine.EventSystems; 5 | 6 | public class EventSystemChecker : MonoBehaviour 7 | { 8 | //public GameObject eventSystem; 9 | 10 | // Use this for initialization 11 | void Awake () 12 | { 13 | if(!FindObjectOfType()) 14 | { 15 | //Instantiate(eventSystem); 16 | GameObject obj = new GameObject("EventSystem"); 17 | obj.AddComponent(); 18 | obj.AddComponent().forceModuleActive = true; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/EventSystemChecker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c0578910bbe00d43919a92c7b9893fe 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FOVKick.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | [Serializable] 8 | public class FOVKick 9 | { 10 | public Camera Camera; // optional camera setup, if null the main camera will be used 11 | [HideInInspector] public float originalFov; // the original fov 12 | public float FOVIncrease = 3f; // the amount the field of view increases when going into a run 13 | public float TimeToIncrease = 1f; // the amount of time the field of view will increase over 14 | public float TimeToDecrease = 1f; // the amount of time the field of view will take to return to its original size 15 | public AnimationCurve IncreaseCurve; 16 | 17 | 18 | public void Setup(Camera camera) 19 | { 20 | CheckStatus(camera); 21 | 22 | Camera = camera; 23 | originalFov = camera.fieldOfView; 24 | } 25 | 26 | 27 | private void CheckStatus(Camera camera) 28 | { 29 | if (camera == null) 30 | { 31 | throw new Exception("FOVKick camera is null, please supply the camera to the constructor"); 32 | } 33 | 34 | if (IncreaseCurve == null) 35 | { 36 | throw new Exception( 37 | "FOVKick Increase curve is null, please define the curve for the field of view kicks"); 38 | } 39 | } 40 | 41 | 42 | public void ChangeCamera(Camera camera) 43 | { 44 | Camera = camera; 45 | } 46 | 47 | 48 | public IEnumerator FOVKickUp() 49 | { 50 | float t = Mathf.Abs((Camera.fieldOfView - originalFov)/FOVIncrease); 51 | while (t < TimeToIncrease) 52 | { 53 | Camera.fieldOfView = originalFov + (IncreaseCurve.Evaluate(t/TimeToIncrease)*FOVIncrease); 54 | t += Time.deltaTime; 55 | yield return new WaitForEndOfFrame(); 56 | } 57 | } 58 | 59 | 60 | public IEnumerator FOVKickDown() 61 | { 62 | float t = Mathf.Abs((Camera.fieldOfView - originalFov)/FOVIncrease); 63 | while (t > 0) 64 | { 65 | Camera.fieldOfView = originalFov + (IncreaseCurve.Evaluate(t/TimeToDecrease)*FOVIncrease); 66 | t -= Time.deltaTime; 67 | yield return new WaitForEndOfFrame(); 68 | } 69 | //make sure that fov returns to the original size 70 | Camera.fieldOfView = originalFov; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FOVKick.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6045a93fb05b9c74884821030da2c46c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FPSCounter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | [RequireComponent(typeof (Text))] 8 | public class FPSCounter : MonoBehaviour 9 | { 10 | const float fpsMeasurePeriod = 0.5f; 11 | private int m_FpsAccumulator = 0; 12 | private float m_FpsNextPeriod = 0; 13 | private int m_CurrentFps; 14 | const string display = "{0} FPS"; 15 | private Text m_Text; 16 | 17 | 18 | private void Start() 19 | { 20 | m_FpsNextPeriod = Time.realtimeSinceStartup + fpsMeasurePeriod; 21 | m_Text = GetComponent(); 22 | } 23 | 24 | 25 | private void Update() 26 | { 27 | // measure average frames per second 28 | m_FpsAccumulator++; 29 | if (Time.realtimeSinceStartup > m_FpsNextPeriod) 30 | { 31 | m_CurrentFps = (int) (m_FpsAccumulator/fpsMeasurePeriod); 32 | m_FpsAccumulator = 0; 33 | m_FpsNextPeriod += fpsMeasurePeriod; 34 | m_Text.text = string.Format(display, m_CurrentFps); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FPSCounter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22bbf57ec543cee42a5aa0ec2dd9e457 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FollowTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | public class FollowTarget : MonoBehaviour 8 | { 9 | public Transform target; 10 | public Vector3 offset = new Vector3(0f, 7.5f, 0f); 11 | 12 | 13 | private void LateUpdate() 14 | { 15 | transform.position = target.position + offset; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/FollowTarget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 246cc59c7a84ea44f87f6b70acfe30c5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ForcedReset.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.SceneManagement; 4 | using UnityStandardAssets.CrossPlatformInput; 5 | 6 | [RequireComponent(typeof (GUITexture))] 7 | public class ForcedReset : MonoBehaviour 8 | { 9 | private void Update() 10 | { 11 | // if we have forced a reset ... 12 | if (CrossPlatformInputManager.GetButtonDown("ResetObject")) 13 | { 14 | //... reload the scene 15 | SceneManager.LoadScene(SceneManager.GetSceneAt(0).name); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ForcedReset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b886447cba80f74e820adb3c9e70c76 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/LerpControlledBob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | [Serializable] 8 | public class LerpControlledBob 9 | { 10 | public float BobDuration; 11 | public float BobAmount; 12 | 13 | private float m_Offset = 0f; 14 | 15 | 16 | // provides the offset that can be used 17 | public float Offset() 18 | { 19 | return m_Offset; 20 | } 21 | 22 | 23 | public IEnumerator DoBobCycle() 24 | { 25 | // make the camera move down slightly 26 | float t = 0f; 27 | while (t < BobDuration) 28 | { 29 | m_Offset = Mathf.Lerp(0f, BobAmount, t/BobDuration); 30 | t += Time.deltaTime; 31 | yield return new WaitForFixedUpdate(); 32 | } 33 | 34 | // make it move back to neutral 35 | t = 0f; 36 | while (t < BobDuration) 37 | { 38 | m_Offset = Mathf.Lerp(BobAmount, 0f, t/BobDuration); 39 | t += Time.deltaTime; 40 | yield return new WaitForFixedUpdate(); 41 | } 42 | m_Offset = 0f; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/LerpControlledBob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1bbfafbde15c854681023b9e01e12dd 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ObjectResetter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace UnityStandardAssets.Utility 7 | { 8 | public class ObjectResetter : MonoBehaviour 9 | { 10 | private Vector3 originalPosition; 11 | private Quaternion originalRotation; 12 | private List originalStructure; 13 | 14 | private Rigidbody Rigidbody; 15 | 16 | // Use this for initialization 17 | private void Start() 18 | { 19 | originalStructure = new List(GetComponentsInChildren()); 20 | originalPosition = transform.position; 21 | originalRotation = transform.rotation; 22 | 23 | Rigidbody = GetComponent(); 24 | } 25 | 26 | 27 | public void DelayedReset(float delay) 28 | { 29 | StartCoroutine(ResetCoroutine(delay)); 30 | } 31 | 32 | 33 | public IEnumerator ResetCoroutine(float delay) 34 | { 35 | yield return new WaitForSeconds(delay); 36 | 37 | // remove any gameobjects added (fire, skid trails, etc) 38 | foreach (var t in GetComponentsInChildren()) 39 | { 40 | if (!originalStructure.Contains(t)) 41 | { 42 | t.parent = null; 43 | } 44 | } 45 | 46 | transform.position = originalPosition; 47 | transform.rotation = originalRotation; 48 | if (Rigidbody) 49 | { 50 | Rigidbody.velocity = Vector3.zero; 51 | Rigidbody.angularVelocity = Vector3.zero; 52 | } 53 | 54 | SendMessage("Reset"); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ObjectResetter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 643c971818f68d3439e84b5d8bdafe07 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ParticleSystemDestroyer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | using Random = UnityEngine.Random; 5 | 6 | namespace UnityStandardAssets.Utility 7 | { 8 | public class ParticleSystemDestroyer : MonoBehaviour 9 | { 10 | // allows a particle system to exist for a specified duration, 11 | // then shuts off emission, and waits for all particles to expire 12 | // before destroying the gameObject 13 | 14 | public float minDuration = 8; 15 | public float maxDuration = 10; 16 | 17 | private float m_MaxLifetime; 18 | private bool m_EarlyStop; 19 | 20 | 21 | private IEnumerator Start() 22 | { 23 | var systems = GetComponentsInChildren(); 24 | 25 | // find out the maximum lifetime of any particles in this effect 26 | foreach (var system in systems) 27 | { 28 | m_MaxLifetime = Mathf.Max(system.startLifetime, m_MaxLifetime); 29 | } 30 | 31 | // wait for random duration 32 | 33 | float stopTime = Time.time + Random.Range(minDuration, maxDuration); 34 | 35 | while (Time.time < stopTime || m_EarlyStop) 36 | { 37 | yield return null; 38 | } 39 | Debug.Log("stopping " + name); 40 | 41 | // turn off emission 42 | foreach (var system in systems) 43 | { 44 | var emission = system.emission; 45 | emission.enabled = false; 46 | } 47 | BroadcastMessage("Extinguish", SendMessageOptions.DontRequireReceiver); 48 | 49 | // wait for any remaining particles to expire 50 | yield return new WaitForSeconds(m_MaxLifetime); 51 | 52 | Destroy(gameObject); 53 | } 54 | 55 | 56 | public void Stop() 57 | { 58 | // stops the particle system early 59 | m_EarlyStop = true; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/ParticleSystemDestroyer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29014cd42b6d273408e0ceefd336c0b3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/PlatformSpecificContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | #if UNITY_EDITOR 4 | using UnityEditor; 5 | #endif 6 | 7 | namespace UnityStandardAssets.Utility 8 | { 9 | #if UNITY_EDITOR 10 | 11 | [ExecuteInEditMode] 12 | #endif 13 | public class PlatformSpecificContent : MonoBehaviour 14 | { 15 | private enum BuildTargetGroup 16 | { 17 | Standalone, 18 | Mobile 19 | } 20 | 21 | [SerializeField] private BuildTargetGroup m_BuildTargetGroup; 22 | [SerializeField] private GameObject[] m_Content = new GameObject[0]; 23 | [SerializeField] private MonoBehaviour[] m_MonoBehaviours = new MonoBehaviour[0]; 24 | [SerializeField] private bool m_ChildrenOfThisObject; 25 | 26 | #if !UNITY_EDITOR 27 | void OnEnable() 28 | { 29 | CheckEnableContent(); 30 | } 31 | #endif 32 | 33 | #if UNITY_EDITOR 34 | 35 | private void OnEnable() 36 | { 37 | EditorUserBuildSettings.activeBuildTargetChanged += Update; 38 | EditorApplication.update += Update; 39 | } 40 | 41 | 42 | private void OnDisable() 43 | { 44 | EditorUserBuildSettings.activeBuildTargetChanged -= Update; 45 | EditorApplication.update -= Update; 46 | } 47 | 48 | 49 | private void Update() 50 | { 51 | CheckEnableContent(); 52 | } 53 | #endif 54 | 55 | 56 | private void CheckEnableContent() 57 | { 58 | #if (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_TIZEN || UNITY_STV ) 59 | if (m_BuildTargetGroup == BuildTargetGroup.Mobile) 60 | { 61 | EnableContent(true); 62 | } else { 63 | EnableContent(false); 64 | } 65 | #endif 66 | 67 | #if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_TIZEN || UNITY_STV ) 68 | if (m_BuildTargetGroup == BuildTargetGroup.Mobile) 69 | { 70 | EnableContent(false); 71 | } 72 | else 73 | { 74 | EnableContent(true); 75 | } 76 | #endif 77 | } 78 | 79 | 80 | private void EnableContent(bool enabled) 81 | { 82 | if (m_Content.Length > 0) 83 | { 84 | foreach (var g in m_Content) 85 | { 86 | if (g != null) 87 | { 88 | g.SetActive(enabled); 89 | } 90 | } 91 | } 92 | if (m_ChildrenOfThisObject) 93 | { 94 | foreach (Transform t in transform) 95 | { 96 | t.gameObject.SetActive(enabled); 97 | } 98 | } 99 | if (m_MonoBehaviours.Length > 0) 100 | { 101 | foreach (var monoBehaviour in m_MonoBehaviours) 102 | { 103 | monoBehaviour.enabled = enabled; 104 | } 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/PlatformSpecificContent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b27507c5d0efbbd47ac8c1de9a1a0a35 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SimpleActivatorMenu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Utility 5 | { 6 | public class SimpleActivatorMenu : MonoBehaviour 7 | { 8 | // An incredibly simple menu which, when given references 9 | // to gameobjects in the scene 10 | public GUIText camSwitchButton; 11 | public GameObject[] objects; 12 | 13 | 14 | private int m_CurrentActiveObject; 15 | 16 | 17 | private void OnEnable() 18 | { 19 | // active object starts from first in array 20 | m_CurrentActiveObject = 0; 21 | camSwitchButton.text = objects[m_CurrentActiveObject].name; 22 | } 23 | 24 | 25 | public void NextCamera() 26 | { 27 | int nextactiveobject = m_CurrentActiveObject + 1 >= objects.Length ? 0 : m_CurrentActiveObject + 1; 28 | 29 | for (int i = 0; i < objects.Length; i++) 30 | { 31 | objects[i].SetActive(i == nextactiveobject); 32 | } 33 | 34 | m_CurrentActiveObject = nextactiveobject; 35 | camSwitchButton.text = objects[m_CurrentActiveObject].name; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SimpleActivatorMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69b69a5b0e0a85b4aa97a7edc40c37d1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SimpleMouseRotator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityStandardAssets.CrossPlatformInput; 4 | 5 | namespace UnityStandardAssets.Utility 6 | { 7 | public class SimpleMouseRotator : MonoBehaviour 8 | { 9 | // A mouselook behaviour with constraints which operate relative to 10 | // this gameobject's initial rotation. 11 | // Only rotates around local X and Y. 12 | // Works in local coordinates, so if this object is parented 13 | // to another moving gameobject, its local constraints will 14 | // operate correctly 15 | // (Think: looking out the side window of a car, or a gun turret 16 | // on a moving spaceship with a limited angular range) 17 | // to have no constraints on an axis, set the rotationRange to 360 or greater. 18 | public Vector2 rotationRange = new Vector3(70, 70); 19 | public float rotationSpeed = 10; 20 | public float dampingTime = 0.2f; 21 | public bool autoZeroVerticalOnMobile = true; 22 | public bool autoZeroHorizontalOnMobile = false; 23 | public bool relative = true; 24 | 25 | 26 | private Vector3 m_TargetAngles; 27 | private Vector3 m_FollowAngles; 28 | private Vector3 m_FollowVelocity; 29 | private Quaternion m_OriginalRotation; 30 | 31 | 32 | private void Start() 33 | { 34 | m_OriginalRotation = transform.localRotation; 35 | } 36 | 37 | 38 | private void Update() 39 | { 40 | // we make initial calculations from the original local rotation 41 | transform.localRotation = m_OriginalRotation; 42 | 43 | // read input from mouse or mobile controls 44 | float inputH; 45 | float inputV; 46 | if (relative) 47 | { 48 | inputH = CrossPlatformInputManager.GetAxis("Mouse X"); 49 | inputV = CrossPlatformInputManager.GetAxis("Mouse Y"); 50 | 51 | // wrap values to avoid springing quickly the wrong way from positive to negative 52 | if (m_TargetAngles.y > 180) 53 | { 54 | m_TargetAngles.y -= 360; 55 | m_FollowAngles.y -= 360; 56 | } 57 | if (m_TargetAngles.x > 180) 58 | { 59 | m_TargetAngles.x -= 360; 60 | m_FollowAngles.x -= 360; 61 | } 62 | if (m_TargetAngles.y < -180) 63 | { 64 | m_TargetAngles.y += 360; 65 | m_FollowAngles.y += 360; 66 | } 67 | if (m_TargetAngles.x < -180) 68 | { 69 | m_TargetAngles.x += 360; 70 | m_FollowAngles.x += 360; 71 | } 72 | 73 | #if MOBILE_INPUT 74 | // on mobile, sometimes we want input mapped directly to tilt value, 75 | // so it springs back automatically when the look input is released. 76 | if (autoZeroHorizontalOnMobile) { 77 | m_TargetAngles.y = Mathf.Lerp (-rotationRange.y * 0.5f, rotationRange.y * 0.5f, inputH * .5f + .5f); 78 | } else { 79 | m_TargetAngles.y += inputH * rotationSpeed; 80 | } 81 | if (autoZeroVerticalOnMobile) { 82 | m_TargetAngles.x = Mathf.Lerp (-rotationRange.x * 0.5f, rotationRange.x * 0.5f, inputV * .5f + .5f); 83 | } else { 84 | m_TargetAngles.x += inputV * rotationSpeed; 85 | } 86 | #else 87 | // with mouse input, we have direct control with no springback required. 88 | m_TargetAngles.y += inputH*rotationSpeed; 89 | m_TargetAngles.x += inputV*rotationSpeed; 90 | #endif 91 | 92 | // clamp values to allowed range 93 | m_TargetAngles.y = Mathf.Clamp(m_TargetAngles.y, -rotationRange.y*0.5f, rotationRange.y*0.5f); 94 | m_TargetAngles.x = Mathf.Clamp(m_TargetAngles.x, -rotationRange.x*0.5f, rotationRange.x*0.5f); 95 | } 96 | else 97 | { 98 | inputH = Input.mousePosition.x; 99 | inputV = Input.mousePosition.y; 100 | 101 | // set values to allowed range 102 | m_TargetAngles.y = Mathf.Lerp(-rotationRange.y*0.5f, rotationRange.y*0.5f, inputH/Screen.width); 103 | m_TargetAngles.x = Mathf.Lerp(-rotationRange.x*0.5f, rotationRange.x*0.5f, inputV/Screen.height); 104 | } 105 | 106 | // smoothly interpolate current values to target angles 107 | m_FollowAngles = Vector3.SmoothDamp(m_FollowAngles, m_TargetAngles, ref m_FollowVelocity, dampingTime); 108 | 109 | // update the actual gameobject's rotation 110 | transform.localRotation = m_OriginalRotation*Quaternion.Euler(-m_FollowAngles.x, m_FollowAngles.y, 0); 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SimpleMouseRotator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cadd54e4832aeef4b9359f44cbe335cd 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SmoothFollow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UnityStandardAssets.Utility 4 | { 5 | public class SmoothFollow : MonoBehaviour 6 | { 7 | 8 | // The target we are following 9 | [SerializeField] 10 | private Transform target; 11 | // The distance in the x-z plane to the target 12 | [SerializeField] 13 | private float distance = 10.0f; 14 | // the height we want the camera to be above the target 15 | [SerializeField] 16 | private float height = 5.0f; 17 | 18 | [SerializeField] 19 | private float rotationDamping; 20 | [SerializeField] 21 | private float heightDamping; 22 | 23 | // Use this for initialization 24 | void Start() { } 25 | 26 | // Update is called once per frame 27 | void LateUpdate() 28 | { 29 | // Early out if we don't have a target 30 | if (!target) 31 | return; 32 | 33 | // Calculate the current rotation angles 34 | var wantedRotationAngle = target.eulerAngles.y; 35 | var wantedHeight = target.position.y + height; 36 | 37 | var currentRotationAngle = transform.eulerAngles.y; 38 | var currentHeight = transform.position.y; 39 | 40 | // Damp the rotation around the y-axis 41 | currentRotationAngle = Mathf.LerpAngle(currentRotationAngle, wantedRotationAngle, rotationDamping * Time.deltaTime); 42 | 43 | // Damp the height 44 | currentHeight = Mathf.Lerp(currentHeight, wantedHeight, heightDamping * Time.deltaTime); 45 | 46 | // Convert the angle into a rotation 47 | var currentRotation = Quaternion.Euler(0, currentRotationAngle, 0); 48 | 49 | // Set the position of the camera on the x-z plane to: 50 | // distance meters behind the target 51 | transform.position = target.position; 52 | transform.position -= currentRotation * Vector3.forward * distance; 53 | 54 | // Set the height of the camera 55 | transform.position = new Vector3(transform.position.x ,currentHeight , transform.position.z); 56 | 57 | // Always look at the target 58 | transform.LookAt(target); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/SmoothFollow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f76806479d916a64aa03f8e3eba7912f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/TimedObjectActivator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7cedf246fca744f90cbdc9dbe41166 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/TimedObjectDestructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UnityStandardAssets.Utility 5 | { 6 | public class TimedObjectDestructor : MonoBehaviour 7 | { 8 | [SerializeField] private float m_TimeOut = 1.0f; 9 | [SerializeField] private bool m_DetachChildren = false; 10 | 11 | 12 | private void Awake() 13 | { 14 | Invoke("DestroyNow", m_TimeOut); 15 | } 16 | 17 | 18 | private void DestroyNow() 19 | { 20 | if (m_DetachChildren) 21 | { 22 | transform.DetachChildren(); 23 | } 24 | DestroyObject(gameObject); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/TimedObjectDestructor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37fac21d1f093d344816942d1abce94e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/WaypointCircuit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70852dc981465ea48bb527b9e33a87fd 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Utility/WaypointProgressTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5cb22d331ef7d64796f917c6a455a32 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | -------------------------------------------------------------------------------- /Assets/idleTrigger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class idleTrigger : MonoBehaviour { 5 | 6 | float previousForward; 7 | float ESP = 0.4f; 8 | // bool idle; 9 | Animator animControl; 10 | // Use this for initialization 11 | void Start () { 12 | animControl = GetComponent(); 13 | previousForward = 0.0f; 14 | } 15 | 16 | // Update is called once per frame 17 | void Update () { 18 | float forward = animControl.GetFloat("Forward"); 19 | //Debug.Log(forward.ToString()); 20 | if (previousForward>ESP && forward<=ESP) 21 | { 22 | Debug.Log("idle"); 23 | } 24 | previousForward = forward; 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/idleTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fac24cef1de7bfa4081fb212020a34ff 3 | timeCreated: 1481162795 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2018 Zhen Geng 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.1f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZGeng/DeepSnowFootprint/4380788f0e0aad707d2bdde5056cc2be247e2b85/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeepSnowFootprint 2 | A unity shader solution to generate footprint on thick snow surfaces.   3 | Need shader model 4 or up to support the hull/domain/geometry shaders. 4 | Currently written for deferred shading path. 5 | Unity Version: 5.5.1f1. 6 | 7 | [![video](https://cloud.githubusercontent.com/assets/5509512/23328177/3971bf3c-fad0-11e6-858f-7501aec8ff03.gif)](https://vimeo.com/205642562) 8 | # Features: 9 | 10 | * 1.Dynamic subdivide and displace the snow ground surface. 11 | * 2.Generate local UV coordinates to load detailed footprint's albedo and normal maps. 12 | * 3.The footprints generated before will gradully be refilled and disappear. 13 | 14 | ## License 15 | 16 | [MIT](LICENSE.md) 17 | 18 | -------------------------------------------------------------------------------- /Sprites-Distance.shader: -------------------------------------------------------------------------------- 1 | Shader "Sprites/Distance" 2 | { 3 | Properties 4 | { 5 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 6 | //_Color ("Tint", Color) = (1,1,1,1) 7 | //[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 8 | } 9 | 10 | SubShader 11 | { 12 | Tags 13 | { 14 | "Queue"="Transparent" 15 | "IgnoreProjector"="True" 16 | "RenderType"="Transparent" 17 | "PreviewType"="Plane" 18 | "CanUseSpriteAtlas"="True" 19 | } 20 | 21 | Cull Off 22 | Lighting Off 23 | ZWrite On //open ZWreite 24 | ZTest LEqual 25 | //Blend OneOne 26 | Blend One Zero 27 | 28 | Pass 29 | { 30 | CGPROGRAM 31 | #pragma vertex vert 32 | #pragma fragment frag 33 | //#pragma shader_feature ETC1_EXTERNAL_ALPHA 34 | #include "UnityCG.cginc" 35 | 36 | struct appdata_t 37 | { 38 | float4 vertex : POSITION; 39 | float4 color : COLOR; 40 | float2 texcoord : TEXCOORD0; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 vertex : SV_POSITION; 46 | fixed4 color : COLOR; 47 | float2 texcoord : TEXCOORD0; 48 | }; 49 | 50 | struct fout 51 | { 52 | fixed4 color : SV_Target; 53 | float depth : SV_Depth; 54 | }; 55 | 56 | 57 | 58 | v2f vert(appdata_t IN) 59 | { 60 | v2f OUT; 61 | OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex); 62 | OUT.texcoord = IN.texcoord; 63 | OUT.color = IN.color; 64 | return OUT; 65 | } 66 | 67 | 68 | fout frag(v2f IN) 69 | { 70 | fout OUT; 71 | 72 | 73 | OUT.color.rgb = IN.color.rgb;////r,g is the relative center position b is angle 74 | 75 | float dist = distance(IN.texcoord, float2(.5f, .5f))*2.0f; 76 | OUT.color.a = IN.color.a; 77 | OUT.depth = 1.0f-dist; 78 | 79 | return OUT; 80 | } 81 | ENDCG 82 | } 83 | } 84 | } 85 | --------------------------------------------------------------------------------