diff --git a/Assets/Animations/Interactions Pack/Materials/body_color_map.mat b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat new file mode 100644 index 00000000..d141c1a9 Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta new file mode 100644 index 00000000..2a0cbd15 --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 710054235c035fa47b1b77b33d324b68 +timeCreated: 1474904139 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat new file mode 100644 index 00000000..5b73aaba Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta new file mode 100644 index 00000000..23169cd6 --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 818dded930968454990e7cf25028f1c1 +timeCreated: 1474904138 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Interactions Pack/Materials/face_color_map.mat b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat new file mode 100644 index 00000000..2cee5cf0 Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta new file mode 100644 index 00000000..498ec30d --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 390c9043b0c5f214c882185a909856ff +timeCreated: 1474904138 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta b/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta index debfe01c..3ccb6b31 100644 --- a/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta +++ b/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4d5edd609ec44354ab4345b98336a3e9 +guid: 07fa86f4f56ad2449b59f0b9c2db08f4 folderAsset: yes -timeCreated: 1473618296 +timeCreated: 1476320910 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Editor/CrossPlatformInput.meta b/Assets/Editor/CrossPlatformInput.meta new file mode 100644 index 00000000..c3e37649 --- /dev/null +++ b/Assets/Editor/CrossPlatformInput.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 696c0e7b8c74e1442acbf15c2df9e72d +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs new file mode 100644 index 00000000..37d1dacf --- /dev/null +++ b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using UnityEditor; + +namespace UnityStandardAssets.CrossPlatformInput.Inspector +{ + [InitializeOnLoad] + public class CrossPlatformInitialize + { + // Custom compiler defines: + // + // CROSS_PLATFORM_INPUT : denotes that cross platform input package exists, so that other packages can use their CrossPlatformInput functions. + // EDITOR_MOBILE_INPUT : denotes that mobile input should be used in editor, if a mobile build target is selected. (i.e. using Unity Remote app). + // MOBILE_INPUT : denotes that mobile input should be used right now! + + static CrossPlatformInitialize() + { + var defines = GetDefinesList(buildTargetGroups[0]); + if (!defines.Contains("CROSS_PLATFORM_INPUT")) + { + SetEnabled("CROSS_PLATFORM_INPUT", true, false); + SetEnabled("MOBILE_INPUT", true, true); + } + } + + + [MenuItem("Mobile Input/Enable")] + private static void Enable() + { + SetEnabled("MOBILE_INPUT", true, true); + switch (EditorUserBuildSettings.activeBuildTarget) + { + case BuildTarget.Android: + case BuildTarget.iOS: + case BuildTarget.PSM: + case BuildTarget.Tizen: + case BuildTarget.WSAPlayer: + EditorUtility.DisplayDialog("Mobile Input", + "You have enabled Mobile Input. You'll need to use the Unity Remote app on a connected device to control your game in the Editor.", + "OK"); + break; + + default: + EditorUtility.DisplayDialog("Mobile Input", + "You have enabled Mobile Input, but you have a non-mobile build target selected in your build settings. The mobile control rigs won't be active or visible on-screen until you switch the build target to a mobile platform.", + "OK"); + break; + } + } + + + [MenuItem("Mobile Input/Enable", true)] + private static bool EnableValidate() + { + var defines = GetDefinesList(mobileBuildTargetGroups[0]); + return !defines.Contains("MOBILE_INPUT"); + } + + + [MenuItem("Mobile Input/Disable")] + private static void Disable() + { + SetEnabled("MOBILE_INPUT", false, true); + switch (EditorUserBuildSettings.activeBuildTarget) + { + case BuildTarget.Android: + case BuildTarget.iOS: + EditorUtility.DisplayDialog("Mobile Input", + "You have disabled Mobile Input. Mobile control rigs won't be visible, and the Cross Platform Input functions will always return standalone controls.", + "OK"); + break; + } + } + + + [MenuItem("Mobile Input/Disable", true)] + private static bool DisableValidate() + { + var defines = GetDefinesList(mobileBuildTargetGroups[0]); + return defines.Contains("MOBILE_INPUT"); + } + + + private static BuildTargetGroup[] buildTargetGroups = new BuildTargetGroup[] + { + BuildTargetGroup.Standalone, + BuildTargetGroup.Android, + BuildTargetGroup.iOS, + BuildTargetGroup.WSA + }; + + private static BuildTargetGroup[] mobileBuildTargetGroups = new BuildTargetGroup[] + { + BuildTargetGroup.Android, + BuildTargetGroup.iOS, + BuildTargetGroup.PSM, + BuildTargetGroup.SamsungTV, + BuildTargetGroup.Tizen, + BuildTargetGroup.WSA + }; + + + private static void SetEnabled(string defineName, bool enable, bool mobile) + { + //Debug.Log("setting "+defineName+" to "+enable); + foreach (var group in mobile ? mobileBuildTargetGroups : buildTargetGroups) + { + var defines = GetDefinesList(group); + if (enable) + { + if (defines.Contains(defineName)) + { + return; + } + defines.Add(defineName); + } + else + { + if (!defines.Contains(defineName)) + { + return; + } + while (defines.Contains(defineName)) + { + defines.Remove(defineName); + } + } + string definesString = string.Join(";", defines.ToArray()); + PlayerSettings.SetScriptingDefineSymbolsForGroup(group, definesString); + } + } + + + private static List GetDefinesList(BuildTargetGroup group) + { + return new List(PlayerSettings.GetScriptingDefineSymbolsForGroup(group).Split(';')); + } + } +} diff --git a/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta new file mode 100644 index 00000000..56f7e861 --- /dev/null +++ b/Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: db7667203062c644ea1877077e30ebd6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Resources/Materials/grass_texture_four.mat b/Assets/Resources/Materials/grass_texture_four.mat new file mode 100644 index 00000000..51bc44cf Binary files /dev/null and b/Assets/Resources/Materials/grass_texture_four.mat differ diff --git a/Assets/Resources/Materials/grass_texture_four.mat.meta b/Assets/Resources/Materials/grass_texture_four.mat.meta new file mode 100644 index 00000000..e7e7a0fc --- /dev/null +++ b/Assets/Resources/Materials/grass_texture_four.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf28761d05c27a944abb60ed8b51cac4 +timeCreated: 1476321138 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/B2_Graphics.unity b/Assets/Scenes/B2_Graphics.unity new file mode 100644 index 00000000..89b0324f Binary files /dev/null and b/Assets/Scenes/B2_Graphics.unity differ diff --git a/Assets/Scenes/B2_Graphics.unity.meta b/Assets/Scenes/B2_Graphics.unity.meta new file mode 100644 index 00000000..aa12393f --- /dev/null +++ b/Assets/Scenes/B2_Graphics.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6fbd79cd8c580b041aa688ae792a4367 +timeCreated: 1476320656 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Scripts_B2.meta b/Assets/Scripts/Scripts_B2.meta new file mode 100644 index 00000000..880e6c5f --- /dev/null +++ b/Assets/Scripts/Scripts_B2.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 496b51f2863b8b4439d8f7acf5b2f70e +folderAsset: yes +timeCreated: 1476320656 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Scripts_B2/CharacterInput.cs b/Assets/Scripts/Scripts_B2/CharacterInput.cs new file mode 100644 index 00000000..6679748f --- /dev/null +++ b/Assets/Scripts/Scripts_B2/CharacterInput.cs @@ -0,0 +1,131 @@ +using UnityEngine; +using System.Collections; + +namespace Character { + public class CharacterInput : MonoBehaviour { + + Animator ErikaAnimator; + private float MAX_SPEED = 1.0f; + private float MIN_SPEED = -3.5f; + private float MAX_STRAFE = 0.5f; + private float MIN_STRAFE = -0.5f; + string speedParam = "Speedx"; + string directionParam = "Speedz"; + bool finishedJump = true; + + float speedx = 0.0f; + float speedz = 0.0f; + + public enum INPUT_KEY { + FORWARD = KeyCode.W, + BACKWARD = KeyCode.S, + LEFT = KeyCode.A, + RIGHT = KeyCode.D, + DUCK = KeyCode.LeftControl, + JUMP = KeyCode.Space, + RUN = KeyCode.LeftShift, + INVENTORY = KeyCode.I, + MAP = KeyCode.M, + FOCUS_LOOK = KeyCode.Mouse1, // secondary mouse button + CONTEXT_ACTION = KeyCode.Mouse1, + SELECT_AGENT = KeyCode.Mouse0, + FREE_CAM = KeyCode.F1, + THIRD_CAM = KeyCode.F2, + FIRST_CAM = KeyCode.F3 + } + + // Use this for initialization + void Start () { + ErikaAnimator = gameObject.GetComponent (); + } + + // Update is called once per frame + void Update () { + + // forward motion + if (Input.GetKey ((KeyCode)INPUT_KEY.FORWARD) && Input.GetKey ((KeyCode)INPUT_KEY.RUN)) { + speedx += 0.01f; + MAX_SPEED = 1; + } + else if (Input.GetKey ((KeyCode)INPUT_KEY.FORWARD)) { + //ErikaAnimator.SetFloat (directionParam, 1); + speedx +=0.01f; + MAX_SPEED = 0.5f; + } else if (Input.GetKey ((KeyCode)INPUT_KEY.BACKWARD)) { + speedx -= 0.01f; + MIN_SPEED = -0.5f; + } + else + { + MIN_SPEED = 0.0f; + MAX_SPEED = 0.0f; + if (speedx > 0) { + speedx -= 0.01f; + } else { + speedx += 0.01f; + } + + } + + // turning + if (Input.GetKey ((KeyCode)INPUT_KEY.LEFT)) + { + MAX_STRAFE = 0.5f; + speedz += 0.01f; + } + else if (Input.GetKey ((KeyCode)INPUT_KEY.RIGHT)) + { + MIN_STRAFE = -0.5f; + speedz -= 0.01f; + } + else + { + MIN_STRAFE = 0.0f; + MAX_STRAFE = 0.0f; + if (speedz > 0) { + speedz -= 0.01f; + } else { + speedz += 0.01f; + } + + } + + // jumping + if (Input.GetKeyDown((KeyCode)INPUT_KEY.JUMP)) + { // Note we only read jump once + + } + if (speedx > MAX_SPEED) { + speedx -= 0.02f; + } + if (speedx < MIN_SPEED) { + speedx += 0.02f; + } + if (speedz > MAX_STRAFE) { + speedz -= 0.02f; + } + if (speedz < MIN_STRAFE) { + speedz += 0.02f; + } + + if (Input.GetKey ((KeyCode)INPUT_KEY.JUMP)) + { + if (speedx > 0.5f) { + ErikaAnimator.SetTrigger ("RunJump"); + } else if (speedx > 0.3f) { + ErikaAnimator.SetTrigger ("Jump"); + } else { + ErikaAnimator.SetTrigger ("IdleJump"); + } + print (ErikaAnimator.GetBool ("FinishedJump")); + ErikaAnimator.SetBool ("FinishedJump", true); + print (ErikaAnimator.GetBool ("FinishedJump")); + } + + Debug.Log(ErikaAnimator.GetFloat(directionParam)); + ErikaAnimator.SetFloat (speedParam, speedx); + ErikaAnimator.SetFloat (directionParam, speedz); + + } + } +} diff --git a/Assets/Scripts/Scripts_B2/CharacterInput.cs.meta b/Assets/Scripts/Scripts_B2/CharacterInput.cs.meta new file mode 100644 index 00000000..cc95a343 --- /dev/null +++ b/Assets/Scripts/Scripts_B2/CharacterInput.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 59fdd7d40f6ccfb429044b1e5e9f330f +timeCreated: 1476308823 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Scripts_B2/EricaAnimationController.controller b/Assets/Scripts/Scripts_B2/EricaAnimationController.controller new file mode 100644 index 00000000..37fdfe27 Binary files /dev/null and b/Assets/Scripts/Scripts_B2/EricaAnimationController.controller differ diff --git a/Assets/Scripts/Scripts_B2/EricaAnimationController.controller.meta b/Assets/Scripts/Scripts_B2/EricaAnimationController.controller.meta new file mode 100644 index 00000000..f90c2554 --- /dev/null +++ b/Assets/Scripts/Scripts_B2/EricaAnimationController.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e6044208da957040b144473f526e424 +timeCreated: 1476312448 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/Cameras.meta b/Assets/Standard Assets/Cameras.meta new file mode 100644 index 00000000..55259156 --- /dev/null +++ b/Assets/Standard Assets/Cameras.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 604bd9e7358cf48c0969f5b515a8c51c +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/CameraGuidelines.txt b/Assets/Standard Assets/Cameras/CameraGuidelines.txt new file mode 100644 index 00000000..92b1cf7b --- /dev/null +++ b/Assets/Standard Assets/Cameras/CameraGuidelines.txt @@ -0,0 +1,33 @@ + +In the Camera Prefabs folder are a few Camera Rigs, explained below. + +To use them, simply drop one into your scene, and set the target field on the root of the camera rig. + +If your player is tagged "Player", you don't even have to assign the target, as by default the cameras will automatically target the first object they find tagged "Player". You can uncheck this option if you don't want it. + +After adding one to your scene, you will also probably want to delete the default "Main Camera" that was in your scene already, since the camera rigs contain their own cameras. + +The "Free Look" camera is designed to follow a target's position, while allowing the user to rotate the angle of the camera with the mouse (or a touch gesture). + +The "Multipurpose" camera is designed to follow a target's position and rotation (or direction of movement) and is useful for many game situations. + +With the "Free Look" and "Multipurpose" camera, the rig is designed so the root object of the rig should always move towards the target's position. The camera offset is specified by the height (the Y value) of the "Pivot" object, and the forward offset of the final "Camera" object. + +A typical set up for this would be to have the Y positional value of the Pivot set to 2 (for 2 meters above the target), and the Z positional value of the Camera set to -6 (for 6 meters behind the pivot). + +If you wanted to adjust the camera to be to one side of the target (eg, for a closer over-shoulder third person view), you should adjust the X position value of the Pivot object. + +Camera Rig <- position will move towards target. + Pivot <- adjust Y position for height, X position for horizontal offset + Camera <- adjust Z position for distance away from target + + +Both the "Free Look" and the "Multipurpose" camera also use the ProtectCameraFromWallClip script, which is intended to stop the camera from passing through items of scenery, as can happen if a character or vehicle targeted by the camera is backed up against a wall. + +The ProtectCameraFromWallClip script examines the distance between the Pivot and the Camera, and attempts to preserve this where possible, but draws the camera in closer to the pivot when colliders are detected. For this reason, if you're using the wall clip script, you can't modify the local offset of the Camera at runtime, because it's being set every frame by the clip protection script. + +The "CCTV Camera" is a little different, being a single GameObject with no hierarchy. Since it doesn't move to follow a target (it only rotates), it doesn't need the wall clip script. Assigning the target works exactly the same as the other Cameras however, and it will also auto target any object tagged "player" unless told otherwise. + +The CCTV camera uses the "LookAtTarget" script, which provides functionality above and beyond Unity's basic "Transform.LookAt" function. It works in local space relative to the object's parent, and allows constraints on the look angle which work relative to the object's starting rotation. Possible uses could be: A view out of the side window of a moving car, A turret which should aim at a target from a moving spaceship, or - as it's used in this case - a CCTV camera which can be placed anywhere and can pan towards a target. + + diff --git a/Assets/Standard Assets/Cameras/CameraGuidelines.txt.meta b/Assets/Standard Assets/Cameras/CameraGuidelines.txt.meta new file mode 100644 index 00000000..818ec1b5 --- /dev/null +++ b/Assets/Standard Assets/Cameras/CameraGuidelines.txt.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 86f4276d9602ff547968823666aa5699 +TextScriptImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Prefabs.meta b/Assets/Standard Assets/Cameras/Prefabs.meta new file mode 100644 index 00000000..ad547507 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: a869b219648fd6c47a3c134f3520ccff +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab b/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab new file mode 100644 index 00000000..a6c0811a --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab @@ -0,0 +1,132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 20: {fileID: 2000000} + - 124: {fileID: 12400000} + - 92: {fileID: 9200000} + - 81: {fileID: 8100000} + - 114: {fileID: 11400000} + - 114: {fileID: 11400002} + m_Layer: 0 + m_Name: CctvCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 234.210007, y: 92.913002, z: -126.029999} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!20 &2000000 +Camera: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 4000 + field of view: 40 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: .0219999999 +--- !u!81 &8100000 +AudioListener: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!92 &9200000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f2ec2b96de5640e42a622fc3064f1c80, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_RotationRange: {x: 90, y: 360} + m_FollowSpeed: .100000001 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a62942d9af3f36d448094c6ed1f214dd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_FovAdjustTime: 1 + m_ZoomAmountMultiplier: 2 + m_IncludeEffectsInSize: 0 +--- !u!124 &12400000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab.meta b/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab.meta new file mode 100644 index 00000000..7e085474 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/CctvCamera.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 851d11542d51c464e89acf6875599172 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab b/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab new file mode 100644 index 00000000..d2218487 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab @@ -0,0 +1,211 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + m_Layer: 0 + m_Name: Pivot + m_TagString: Untagged + m_Icon: {fileID: -1500306622, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400002} + - 20: {fileID: 2000000} + - 92: {fileID: 9200000} + - 124: {fileID: 12400000} + - 81: {fileID: 8100000} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400004} + - 54: {fileID: 5400000} + - 114: {fileID: 11400000} + - 114: {fileID: 11400002} + m_Layer: 0 + m_Name: FreeLookCameraRig + m_TagString: Untagged + m_Icon: {fileID: -215833656, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 2, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400002} + m_Father: {fileID: 400004} + m_RootOrder: 0 +--- !u!4 &400002 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0.000000063325004, z: 0, w: 1} + m_LocalPosition: {x: -0, y: 0, z: -4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 400000} + m_RootOrder: 0 +--- !u!4 &400004 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.078047514, y: 0.041197777, z: 0.6849456} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400000} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!20 &2000000 +Camera: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.62552905, g: 0.684092, b: 0.7761194, a: 0.019607844} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.02 + far clip plane: 400 + field of view: 60 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!54 &5400000 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 1 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!81 &8100000 +AudioListener: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!92 &9200000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e44af8091779fcb40801d5b284353dbe, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_MoveSpeed: 1 + m_TurnSpeed: 1.5 + m_TurnSmoothing: 0 + m_TiltMax: 75 + m_TiltMin: 45 + m_LockCursor: 0 + m_VerticalAutoReturn: 0 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 94b04ec3bda6b7747aa53936ef3b0ae2, type: 3} + m_Name: + m_EditorClassIdentifier: + clipMoveTime: 0.05 + returnTime: 0.4 + sphereCastRadius: 0.1 + visualiseInEditor: 1 + closestDistance: 0.5 + dontClipTag: Player +--- !u!124 &12400000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100004} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab.meta b/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab.meta new file mode 100644 index 00000000..b24910ec --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/FreeLookCameraRig.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 49a0e923d39ec3c4c8bb97699e2f2903 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab b/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab new file mode 100644 index 00000000..5558eafd --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab @@ -0,0 +1,136 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 20: {fileID: 2000000} + - 124: {fileID: 12400000} + - 92: {fileID: 9200000} + - 81: {fileID: 8100000} + - 114: {fileID: 11400002} + - 114: {fileID: 11400000} + m_Layer: 0 + m_Name: HandheldCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: -.707106829, z: 0, w: .707106829} + m_LocalPosition: {x: 194.850006, y: 46.1300011, z: -41.0229988} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!20 &2000000 +Camera: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 5 + far clip plane: 4000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: .0219999999 +--- !u!81 &8100000 +AudioListener: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!92 &9200000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a62942d9af3f36d448094c6ed1f214dd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_FovAdjustTime: .100000001 + m_ZoomAmountMultiplier: 3 + m_IncludeEffectsInSize: 0 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d947636a9390f6a46a121124154e6e3f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_RotationRange: {x: 90, y: 360} + m_FollowSpeed: .0199999996 + m_SwaySpeed: .5 + m_BaseSwayAmount: .699999988 + m_TrackingSwayAmount: .400000006 + m_TrackingBias: .300000012 +--- !u!124 &12400000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab.meta b/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab.meta new file mode 100644 index 00000000..44efae86 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/HandheldCamera.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a5be31db3f71b0642af74fe491b4bc89 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab b/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab new file mode 100644 index 00000000..d63e7eb0 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab @@ -0,0 +1,210 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + m_Layer: 0 + m_Name: Pivot + m_TagString: Untagged + m_Icon: {fileID: -1500306622, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400002} + - 20: {fileID: 2000000} + - 92: {fileID: 9200000} + - 124: {fileID: 12400000} + - 81: {fileID: 8100000} + m_Layer: 0 + m_Name: MainCamera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400004} + - 54: {fileID: 5400000} + - 114: {fileID: 11400002} + - 114: {fileID: 11400000} + m_Layer: 0 + m_Name: MultipurposeCameraRig + m_TagString: Untagged + m_Icon: {fileID: -215833656, guid: 0000000000000000d000000000000000, type: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 2, z: -3} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400002} + m_Father: {fileID: 400004} + m_RootOrder: 0 +--- !u!4 &400002 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: .0644844547, y: 0, z: 0, w: .997918725} + m_LocalPosition: {x: 0, y: .109999999, z: -3.25999999} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 400000} + m_RootOrder: 0 +--- !u!4 &400004 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400000} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!20 &2000000 +Camera: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: .619607866, g: .674509823, b: .768627465, a: .0196078438} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: .200000003 + far clip plane: 5000 + field of view: 50 + orthographic: 0 + orthographic size: 4.5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: .0219999999 +--- !u!54 &5400000 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + serializedVersion: 2 + m_Mass: 1 + m_Drag: .200000003 + m_AngularDrag: .0500000007 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!81 &8100000 +AudioListener: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!92 &9200000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a8d3968294210ba4a9d2bb96dfa74a16, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Target: {fileID: 0} + m_AutoTargetPlayer: 1 + m_UpdateType: 0 + m_MoveSpeed: 3 + m_TurnSpeed: 1 + m_RollSpeed: .200000003 + m_FollowVelocity: 0 + m_FollowTilt: 1 + m_SpinTurnLimit: 90 + m_TargetVelocityLowerLimit: 4 + m_SmoothTurnTime: .200000003 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 94b04ec3bda6b7747aa53936ef3b0ae2, type: 3} + m_Name: + m_EditorClassIdentifier: + clipMoveTime: .0500000007 + returnTime: .400000006 + sphereCastRadius: .100000001 + visualiseInEditor: 1 + closestDistance: .5 + dontClipTag: Player +--- !u!124 &12400000 +Behaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100004} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab.meta b/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab.meta new file mode 100644 index 00000000..2dde8162 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Prefabs/MultipurposeCameraRig.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: baec086904791744185aaa07a6cf55c2 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts.meta b/Assets/Standard Assets/Cameras/Scripts.meta new file mode 100644 index 00000000..e26e7985 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: e7b22774d57de9f4eb961b3ff68ed80a +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs b/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs new file mode 100644 index 00000000..092bbb28 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs @@ -0,0 +1,104 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.Cameras +{ + public abstract class AbstractTargetFollower : MonoBehaviour + { + public enum UpdateType // The available methods of updating are: + { + FixedUpdate, // Update in FixedUpdate (for tracking rigidbodies). + LateUpdate, // Update in LateUpdate. (for tracking objects that are moved in Update) + ManualUpdate, // user must call to update camera + } + + [SerializeField] protected Transform m_Target; // The target object to follow + [SerializeField] private bool m_AutoTargetPlayer = true; // Whether the rig should automatically target the player. + [SerializeField] private UpdateType m_UpdateType; // stores the selected update type + + protected Rigidbody targetRigidbody; + + + protected virtual void Start() + { + // if auto targeting is used, find the object tagged "Player" + // any class inheriting from this should call base.Start() to perform this action! + if (m_AutoTargetPlayer) + { + FindAndTargetPlayer(); + } + if (m_Target == null) return; + targetRigidbody = m_Target.GetComponent(); + } + + + private void FixedUpdate() + { + // we update from here if updatetype is set to Fixed, or in auto mode, + // if the target has a rigidbody, and isn't kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.FixedUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + + private void LateUpdate() + { + // we update from here if updatetype is set to Late, or in auto mode, + // if the target does not have a rigidbody, or - does have a rigidbody but is set to kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.LateUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + + public void ManualUpdate() + { + // we update from here if updatetype is set to Late, or in auto mode, + // if the target does not have a rigidbody, or - does have a rigidbody but is set to kinematic. + if (m_AutoTargetPlayer && (m_Target == null || !m_Target.gameObject.activeSelf)) + { + FindAndTargetPlayer(); + } + if (m_UpdateType == UpdateType.ManualUpdate) + { + FollowTarget(Time.deltaTime); + } + } + + protected abstract void FollowTarget(float deltaTime); + + + public void FindAndTargetPlayer() + { + // auto target an object tagged player, if no target has been assigned + var targetObj = GameObject.FindGameObjectWithTag("Player"); + if (targetObj) + { + SetTarget(targetObj.transform); + } + } + + + public virtual void SetTarget(Transform newTransform) + { + m_Target = newTransform; + } + + + public Transform Target + { + get { return m_Target; } + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs.meta b/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs.meta new file mode 100644 index 00000000..da819d75 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/AbstractTargetFollower.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 89a534d869bfccd49bebf7cb6fb244b6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs b/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs new file mode 100644 index 00000000..906ae0f5 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs @@ -0,0 +1,107 @@ +using System; +using UnityEngine; +#if UNITY_EDITOR + +#endif + +namespace UnityStandardAssets.Cameras +{ + [ExecuteInEditMode] + public class AutoCam : PivotBasedCameraRig + { + [SerializeField] private float m_MoveSpeed = 3; // How fast the rig will move to keep up with target's position + [SerializeField] private float m_TurnSpeed = 1; // How fast the rig will turn to keep up with target's rotation + [SerializeField] private float m_RollSpeed = 0.2f;// How fast the rig will roll (around Z axis) to match target's roll. + [SerializeField] private bool m_FollowVelocity = false;// Whether the rig will rotate in the direction of the target's velocity. + [SerializeField] private bool m_FollowTilt = true; // Whether the rig will tilt (around X axis) with the target. + [SerializeField] private float m_SpinTurnLimit = 90;// The threshold beyond which the camera stops following the target's rotation. (used in situations where a car spins out, for example) + [SerializeField] private float m_TargetVelocityLowerLimit = 4f;// the minimum velocity above which the camera turns towards the object's velocity. Below this we use the object's forward direction. + [SerializeField] private float m_SmoothTurnTime = 0.2f; // the smoothing for the camera's rotation + + private float m_LastFlatAngle; // The relative angle of the target and the rig from the previous frame. + private float m_CurrentTurnAmount; // How much to turn the camera + private float m_TurnSpeedVelocityChange; // The change in the turn speed velocity + private Vector3 m_RollUp = Vector3.up;// The roll of the camera around the z axis ( generally this will always just be up ) + + + protected override void FollowTarget(float deltaTime) + { + // if no target, or no time passed then we quit early, as there is nothing to do + if (!(deltaTime > 0) || m_Target == null) + { + return; + } + + // initialise some vars, we'll be modifying these in a moment + var targetForward = m_Target.forward; + var targetUp = m_Target.up; + + if (m_FollowVelocity && Application.isPlaying) + { + // in follow velocity mode, the camera's rotation is aligned towards the object's velocity direction + // but only if the object is traveling faster than a given threshold. + + if (targetRigidbody.velocity.magnitude > m_TargetVelocityLowerLimit) + { + // velocity is high enough, so we'll use the target's velocty + targetForward = targetRigidbody.velocity.normalized; + targetUp = Vector3.up; + } + else + { + targetUp = Vector3.up; + } + m_CurrentTurnAmount = Mathf.SmoothDamp(m_CurrentTurnAmount, 1, ref m_TurnSpeedVelocityChange, m_SmoothTurnTime); + } + else + { + // we're in 'follow rotation' mode, where the camera rig's rotation follows the object's rotation. + + // This section allows the camera to stop following the target's rotation when the target is spinning too fast. + // eg when a car has been knocked into a spin. The camera will resume following the rotation + // of the target when the target's angular velocity slows below the threshold. + var currentFlatAngle = Mathf.Atan2(targetForward.x, targetForward.z)*Mathf.Rad2Deg; + if (m_SpinTurnLimit > 0) + { + var targetSpinSpeed = Mathf.Abs(Mathf.DeltaAngle(m_LastFlatAngle, currentFlatAngle))/deltaTime; + var desiredTurnAmount = Mathf.InverseLerp(m_SpinTurnLimit, m_SpinTurnLimit*0.75f, targetSpinSpeed); + var turnReactSpeed = (m_CurrentTurnAmount > desiredTurnAmount ? .1f : 1f); + if (Application.isPlaying) + { + m_CurrentTurnAmount = Mathf.SmoothDamp(m_CurrentTurnAmount, desiredTurnAmount, + ref m_TurnSpeedVelocityChange, turnReactSpeed); + } + else + { + // for editor mode, smoothdamp won't work because it uses deltaTime internally + m_CurrentTurnAmount = desiredTurnAmount; + } + } + else + { + m_CurrentTurnAmount = 1; + } + m_LastFlatAngle = currentFlatAngle; + } + + // camera position moves towards target position: + transform.position = Vector3.Lerp(transform.position, m_Target.position, deltaTime*m_MoveSpeed); + + // camera's rotation is split into two parts, which can have independend speed settings: + // rotating towards the target's forward direction (which encompasses its 'yaw' and 'pitch') + if (!m_FollowTilt) + { + targetForward.y = 0; + if (targetForward.sqrMagnitude < float.Epsilon) + { + targetForward = transform.forward; + } + } + var rollRotation = Quaternion.LookRotation(targetForward, m_RollUp); + + // and aligning with the target object's up direction (i.e. its 'roll') + m_RollUp = m_RollSpeed > 0 ? Vector3.Slerp(m_RollUp, targetUp, m_RollSpeed*deltaTime) : Vector3.up; + transform.rotation = Quaternion.Lerp(transform.rotation, rollRotation, m_TurnSpeed*m_CurrentTurnAmount*deltaTime); + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs.meta b/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs.meta new file mode 100644 index 00000000..77830cf1 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/AutoCam.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a8d3968294210ba4a9d2bb96dfa74a16 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs b/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs new file mode 100644 index 00000000..dd8cfc6c --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs @@ -0,0 +1,156 @@ +using System; +using UnityEngine; +using UnityStandardAssets.CrossPlatformInput; + +namespace UnityStandardAssets.Cameras +{ + public class FreeLookCam : PivotBasedCameraRig + { + // This script is designed to be placed on the root object of a camera rig, + // comprising 3 gameobjects, each parented to the next: + + // Camera Rig + // Pivot + // Camera + + [SerializeField] private float m_MoveSpeed = 1f; // How fast the rig will move to keep up with the target's position. + [Range(0f, 10f)] [SerializeField] private float m_TurnSpeed = 1.5f; // How fast the rig will rotate from user input. + [SerializeField] private float m_TurnSmoothing = 0.0f; // How much smoothing to apply to the turn input, to reduce mouse-turn jerkiness + [SerializeField] private float m_TiltMax = 0f;//75f; // The maximum value of the x axis rotation of the pivot. + [SerializeField] private float m_TiltMin = 0f;//45f; // The minimum value of the x axis rotation of the pivot. + [SerializeField] private bool m_LockCursor = false; // Whether the cursor should be hidden and locked. + [SerializeField] private bool m_VerticalAutoReturn = false; // set wether or not the vertical axis should auto return + + private float m_LookAngle; // The rig's y axis rotation. + private float m_LookVerticalAngle; + private float m_TiltAngle; // The pivot's x axis rotation. + private const float k_LookDistance = 100f; // How far in front of the pivot the character's look target is. + private Vector3 m_PivotEulers; + private Quaternion m_PivotTargetRot; + private Quaternion m_TransformTargetRot; + + private GameObject Target; + + protected override void Awake() + { + base.Awake(); + // Lock or unlock the cursor. + Cursor.lockState = m_LockCursor ? CursorLockMode.Locked : CursorLockMode.None; + Cursor.visible = !m_LockCursor; + m_PivotEulers = m_Pivot.rotation.eulerAngles; + + m_PivotTargetRot = m_Pivot.transform.localRotation; + m_TransformTargetRot = transform.localRotation; + + Vector3 initialCameraTranslation = new Vector3(0, 10, 0); + Vector3 initialCameraRotation = new Vector3(0, 90, 0); + + transform.Translate (initialCameraTranslation); + //m_Pivot.localRotation = Quaternion.Euler(initialCameraRotation); + } + + protected void Start() + { + Target = GameObject.FindGameObjectWithTag ("Erika"); + } + + + + protected void Update() + { + ThirdPersonCamera (); + //HandleRotationMovement(); + if (m_LockCursor && Input.GetMouseButtonUp(0)) + { + Cursor.lockState = m_LockCursor ? CursorLockMode.Locked : CursorLockMode.None; + Cursor.visible = !m_LockCursor; + } + } + + + private void OnDisable() + { + Cursor.lockState = CursorLockMode.None; + Cursor.visible = true; + } + + void ThirdPersonCamera() + { + Vector3 pos; + transform.rotation = Target.transform.rotation; + pos = Target.transform.position; + pos += transform.up * 2.8f; + pos += transform.forward * -4.6f; + pos += transform.right * 0.2f; + transform.position = pos; + transform.LookAt (Target.transform); + } + + + protected override void FollowTarget(float deltaTime) + { + if (m_Target == null) return; + // Move the rig towards target position. + transform.position = Vector3.Lerp(transform.position, m_Target.position, deltaTime*m_MoveSpeed); + } + + + private void HandleRotationMovement() + { + if(Time.timeScale < float.Epsilon) + return; + + // Read the user input + float x = 0; + float y = 0; + float v = 0; + if (Input.GetMouseButton (1)) { + x = CrossPlatformInputManager.GetAxis ("Mouse X"); + y = 0.5f * CrossPlatformInputManager.GetAxis ("Mouse Y"); + v = -CrossPlatformInputManager.GetAxis ("Mouse Y"); + } + // Adjust the look angle by an amount proportional to the turn speed and horizontal input. + m_LookAngle += x*m_TurnSpeed; + m_LookVerticalAngle += v * m_TurnSpeed; + + // Rotate the rig (the root object) around Y axis only: + m_TransformTargetRot = Quaternion.Euler(m_LookVerticalAngle, m_LookAngle, 0f); + + if (m_VerticalAutoReturn) + { + // For tilt input, we need to behave differently depending on whether we're using mouse or touch input: + // on mobile, vertical input is directly mapped to tilt value, so it springs back automatically when the look input is released + // we have to test whether above or below zero because we want to auto-return to zero even if min and max are not symmetrical. + m_TiltAngle = y > 0 ? Mathf.Lerp(0, -m_TiltMin, y) : Mathf.Lerp(0, m_TiltMax, -y); + } + else + { + // on platforms with a mouse, we adjust the current angle based on Y mouse input and turn speed + m_TiltAngle -= y*m_TurnSpeed; + // and make sure the new value is within the tilt range + m_TiltAngle = Mathf.Clamp(m_TiltAngle, -m_TiltMin, m_TiltMax); + } + + // Tilt input around X is applied to the pivot (the child of this object) + + //m_PivotTargetRot = Quaternion.Euler(m_TiltAngle, m_PivotEulers.y , m_PivotEulers.z); + + if (m_TurnSmoothing > 0) + { + m_Pivot.localRotation = Quaternion.Slerp(m_Pivot.localRotation, m_PivotTargetRot, m_TurnSmoothing * Time.deltaTime); + transform.localRotation = Quaternion.Slerp(transform.localRotation, m_TransformTargetRot, m_TurnSmoothing * Time.deltaTime); + } + else + { + m_Pivot.localRotation = m_PivotTargetRot; + transform.localRotation = m_TransformTargetRot; + } + + //float moveH = Input.GetAxis ("Horizontal"); + //float moveV = 15*CrossPlatformInputManager.GetAxis("Mouse ScrollWheel") + Input.GetAxis ("Vertical"); + //float moveV = Input.GetAxis ("Vertical"); + //Vector3 cameraTranslation = new Vector3(moveH, 0, moveV); + //transform.Translate (cameraTranslation); + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs.meta b/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs.meta new file mode 100644 index 00000000..9b51a269 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/FreeLookCam.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e44af8091779fcb40801d5b284353dbe +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs b/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs new file mode 100644 index 00000000..837cf5c7 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.Cameras +{ + public class HandHeldCam : LookatTarget + { + [SerializeField] private float m_SwaySpeed = .5f; + [SerializeField] private float m_BaseSwayAmount = .5f; + [SerializeField] private float m_TrackingSwayAmount = .5f; + [Range(-1, 1)] [SerializeField] private float m_TrackingBias = 0; + + + protected override void FollowTarget(float deltaTime) + { + base.FollowTarget(deltaTime); + + float bx = (Mathf.PerlinNoise(0, Time.time*m_SwaySpeed) - 0.5f); + float by = (Mathf.PerlinNoise(0, (Time.time*m_SwaySpeed) + 100)) - 0.5f; + + bx *= m_BaseSwayAmount; + by *= m_BaseSwayAmount; + + float tx = (Mathf.PerlinNoise(0, Time.time*m_SwaySpeed) - 0.5f) + m_TrackingBias; + float ty = ((Mathf.PerlinNoise(0, (Time.time*m_SwaySpeed) + 100)) - 0.5f) + m_TrackingBias; + + tx *= -m_TrackingSwayAmount*m_FollowVelocity.x; + ty *= m_TrackingSwayAmount*m_FollowVelocity.y; + + transform.Rotate(bx + tx, by + ty, 0); + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs.meta b/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs.meta new file mode 100644 index 00000000..7b64b3b4 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/HandHeldCam.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d947636a9390f6a46a121124154e6e3f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs b/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs new file mode 100644 index 00000000..a33b3a6f --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs @@ -0,0 +1,66 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.Cameras +{ + public class LookatTarget : AbstractTargetFollower + { + // A simple script to make one object look at another, + // but with optional constraints which operate relative to + // this gameobject's initial rotation. + + // Only rotates around local X and Y. + + // Works in local coordinates, so if this object is parented + // to another moving gameobject, its local constraints will + // operate correctly + // (Think: looking out the side window of a car, or a gun turret + // on a moving spaceship with a limited angular range) + + // to have no constraints on an axis, set the rotationRange greater than 360. + + [SerializeField] private Vector2 m_RotationRange; + [SerializeField] private float m_FollowSpeed = 1; + + private Vector3 m_FollowAngles; + private Quaternion m_OriginalRotation; + + protected Vector3 m_FollowVelocity; + + + // Use this for initialization + protected override void Start() + { + base.Start(); + m_OriginalRotation = transform.localRotation; + } + + + protected override void FollowTarget(float deltaTime) + { + // we make initial calculations from the original local rotation + transform.localRotation = m_OriginalRotation; + + // tackle rotation around Y first + Vector3 localTarget = transform.InverseTransformPoint(m_Target.position); + float yAngle = Mathf.Atan2(localTarget.x, localTarget.z)*Mathf.Rad2Deg; + + yAngle = Mathf.Clamp(yAngle, -m_RotationRange.y*0.5f, m_RotationRange.y*0.5f); + transform.localRotation = m_OriginalRotation*Quaternion.Euler(0, yAngle, 0); + + // then recalculate new local target position for rotation around X + localTarget = transform.InverseTransformPoint(m_Target.position); + float xAngle = Mathf.Atan2(localTarget.y, localTarget.z)*Mathf.Rad2Deg; + xAngle = Mathf.Clamp(xAngle, -m_RotationRange.x*0.5f, m_RotationRange.x*0.5f); + var targetAngles = new Vector3(m_FollowAngles.x + Mathf.DeltaAngle(m_FollowAngles.x, xAngle), + m_FollowAngles.y + Mathf.DeltaAngle(m_FollowAngles.y, yAngle)); + + // smoothly interpolate the current angles to the target angles + m_FollowAngles = Vector3.SmoothDamp(m_FollowAngles, targetAngles, ref m_FollowVelocity, m_FollowSpeed); + + + // and update the gameobject itself + transform.localRotation = m_OriginalRotation*Quaternion.Euler(-m_FollowAngles.x, m_FollowAngles.y, 0); + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs.meta b/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs.meta new file mode 100644 index 00000000..a2010957 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/LookatTarget.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f2ec2b96de5640e42a622fc3064f1c80 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs b/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs new file mode 100644 index 00000000..cc76a6a7 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; + + +namespace UnityStandardAssets.Cameras +{ + public abstract class PivotBasedCameraRig : AbstractTargetFollower + { + // This script is designed to be placed on the root object of a camera rig, + // comprising 3 gameobjects, each parented to the next: + + // Camera Rig + // Pivot + // Camera + + protected Transform m_Cam; // the transform of the camera + protected Transform m_Pivot; // the point at which the camera pivots around + protected Vector3 m_LastTargetPosition; + + + protected virtual void Awake() + { + // find the camera in the object hierarchy + m_Cam = GetComponentInChildren().transform; + m_Pivot = m_Cam.parent; + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs.meta b/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs.meta new file mode 100644 index 00000000..701f56f8 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/PivotBasedCameraRig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58cb183e16853564e9ed457f8a296db1 +labels: +- Done +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs b/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs new file mode 100644 index 00000000..da8acd43 --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections; +using UnityEngine; + +namespace UnityStandardAssets.Cameras +{ + public class ProtectCameraFromWallClip : MonoBehaviour + { + public float clipMoveTime = 0.05f; // time taken to move when avoiding cliping (low value = fast, which it should be) + public float returnTime = 0.4f; // time taken to move back towards desired position, when not clipping (typically should be a higher value than clipMoveTime) + public float sphereCastRadius = 0.1f; // the radius of the sphere used to test for object between camera and target + public bool visualiseInEditor; // toggle for visualising the algorithm through lines for the raycast in the editor + public float closestDistance = 0.5f; // the closest distance the camera can be from the target + public bool protecting { get; private set; } // used for determining if there is an object between the target and the camera + public string dontClipTag = "Player"; // don't clip against objects with this tag (useful for not clipping against the targeted object) + + private Transform m_Cam; // the transform of the camera + private Transform m_Pivot; // the point at which the camera pivots around + private float m_OriginalDist; // the original distance to the camera before any modification are made + private float m_MoveVelocity; // the velocity at which the camera moved + private float m_CurrentDist; // the current distance from the camera to the target + private Ray m_Ray; // the ray used in the lateupdate for casting between the camera and the target + private RaycastHit[] m_Hits; // the hits between the camera and the target + private RayHitComparer m_RayHitComparer; // variable to compare raycast hit distances + + + private void Start() + { + // find the camera in the object hierarchy + m_Cam = GetComponentInChildren().transform; + m_Pivot = m_Cam.parent; + m_OriginalDist = m_Cam.localPosition.magnitude; + m_CurrentDist = m_OriginalDist; + + // create a new RayHitComparer + m_RayHitComparer = new RayHitComparer(); + } + + + private void LateUpdate() + { + // initially set the target distance + float targetDist = m_OriginalDist; + + m_Ray.origin = m_Pivot.position + m_Pivot.forward*sphereCastRadius; + m_Ray.direction = -m_Pivot.forward; + + // initial check to see if start of spherecast intersects anything + var cols = Physics.OverlapSphere(m_Ray.origin, sphereCastRadius); + + bool initialIntersect = false; + bool hitSomething = false; + + // loop through all the collisions to check if something we care about + for (int i = 0; i < cols.Length; i++) + { + if ((!cols[i].isTrigger) && + !(cols[i].attachedRigidbody != null && cols[i].attachedRigidbody.CompareTag(dontClipTag))) + { + initialIntersect = true; + break; + } + } + + // if there is a collision + if (initialIntersect) + { + m_Ray.origin += m_Pivot.forward*sphereCastRadius; + + // do a raycast and gather all the intersections + m_Hits = Physics.RaycastAll(m_Ray, m_OriginalDist - sphereCastRadius); + } + else + { + // if there was no collision do a sphere cast to see if there were any other collisions + m_Hits = Physics.SphereCastAll(m_Ray, sphereCastRadius, m_OriginalDist + sphereCastRadius); + } + + // sort the collisions by distance + Array.Sort(m_Hits, m_RayHitComparer); + + // set the variable used for storing the closest to be as far as possible + float nearest = Mathf.Infinity; + + // loop through all the collisions + for (int i = 0; i < m_Hits.Length; i++) + { + // only deal with the collision if it was closer than the previous one, not a trigger, and not attached to a rigidbody tagged with the dontClipTag + if (m_Hits[i].distance < nearest && (!m_Hits[i].collider.isTrigger) && + !(m_Hits[i].collider.attachedRigidbody != null && + m_Hits[i].collider.attachedRigidbody.CompareTag(dontClipTag))) + { + // change the nearest collision to latest + nearest = m_Hits[i].distance; + targetDist = -m_Pivot.InverseTransformPoint(m_Hits[i].point).z; + hitSomething = true; + } + } + + // visualise the cam clip effect in the editor + if (hitSomething) + { + Debug.DrawRay(m_Ray.origin, -m_Pivot.forward*(targetDist + sphereCastRadius), Color.red); + } + + // hit something so move the camera to a better position + protecting = hitSomething; + m_CurrentDist = Mathf.SmoothDamp(m_CurrentDist, targetDist, ref m_MoveVelocity, + m_CurrentDist > targetDist ? clipMoveTime : returnTime); + m_CurrentDist = Mathf.Clamp(m_CurrentDist, closestDistance, m_OriginalDist); + m_Cam.localPosition = -Vector3.forward*m_CurrentDist; + } + + + // comparer for check distances in ray cast hits + public class RayHitComparer : IComparer + { + public int Compare(object x, object y) + { + return ((RaycastHit) x).distance.CompareTo(((RaycastHit) y).distance); + } + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs.meta b/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs.meta new file mode 100644 index 00000000..99ac1cdf --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/ProtectCameraFromWallClip.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94b04ec3bda6b7747aa53936ef3b0ae2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs b/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs new file mode 100644 index 00000000..a5aedefd --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs @@ -0,0 +1,79 @@ +using System; +using UnityEngine; + + +namespace UnityStandardAssets.Cameras +{ + public class TargetFieldOfView : AbstractTargetFollower + { + // This script is primarily designed to be used with the "LookAtTarget" script to enable a + // CCTV style camera looking at a target to also adjust its field of view (zoom) to fit the + // target (so that it zooms in as the target becomes further away). + // When used with a follow cam, it will automatically use the same target. + + [SerializeField] private float m_FovAdjustTime = 1; // the time taken to adjust the current FOV to the desired target FOV amount. + [SerializeField] private float m_ZoomAmountMultiplier = 2; // a multiplier for the FOV amount. The default of 2 makes the field of view twice as wide as required to fit the target. + [SerializeField] private bool m_IncludeEffectsInSize = false; // changing this only takes effect on startup, or when new target is assigned. + + private float m_BoundSize; + private float m_FovAdjustVelocity; + private Camera m_Cam; + private Transform m_LastTarget; + + // Use this for initialization + protected override void Start() + { + base.Start(); + m_BoundSize = MaxBoundsExtent(m_Target, m_IncludeEffectsInSize); + + // get a reference to the actual camera component: + m_Cam = GetComponentInChildren(); + } + + + protected override void FollowTarget(float deltaTime) + { + // calculate the correct field of view to fit the bounds size at the current distance + float dist = (m_Target.position - transform.position).magnitude; + float requiredFOV = Mathf.Atan2(m_BoundSize, dist)*Mathf.Rad2Deg*m_ZoomAmountMultiplier; + + m_Cam.fieldOfView = Mathf.SmoothDamp(m_Cam.fieldOfView, requiredFOV, ref m_FovAdjustVelocity, m_FovAdjustTime); + } + + + public override void SetTarget(Transform newTransform) + { + base.SetTarget(newTransform); + m_BoundSize = MaxBoundsExtent(newTransform, m_IncludeEffectsInSize); + } + + + public static float MaxBoundsExtent(Transform obj, bool includeEffects) + { + // get the maximum bounds extent of object, including all child renderers, + // but excluding particles and trails, for FOV zooming effect. + + var renderers = obj.GetComponentsInChildren(); + + Bounds bounds = new Bounds(); + bool initBounds = false; + foreach (Renderer r in renderers) + { + if (!((r is TrailRenderer) || (r is ParticleSystemRenderer))) + { + if (!initBounds) + { + initBounds = true; + bounds = r.bounds; + } + else + { + bounds.Encapsulate(r.bounds); + } + } + } + float max = Mathf.Max(bounds.extents.x, bounds.extents.y, bounds.extents.z); + return max; + } + } +} diff --git a/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs.meta b/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs.meta new file mode 100644 index 00000000..e9f4a36a --- /dev/null +++ b/Assets/Standard Assets/Cameras/Scripts/TargetFieldOfView.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a62942d9af3f36d448094c6ed1f214dd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput.meta b/Assets/Standard Assets/CrossPlatformInput.meta new file mode 100644 index 00000000..bc1c7386 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 710bc43f80d178548bd226c252c8e65b +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt b/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt new file mode 100644 index 00000000..461c8df4 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt @@ -0,0 +1,32 @@ + +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. + +The CrossPlatformInput sample assets contains two main sections. + +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. + +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. + + + +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. + +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. + +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. + +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. + +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. + +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: + GetAxis, GetAxisRaw + GetButton, GetButtonDown, GetButtonUp + +Notes for coders: +This package sets two compiler define symbols. One is always set automatically, the other is optionally set from a menu item. + +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. + +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. + diff --git a/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt.meta b/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt.meta new file mode 100644 index 00000000..bc74ece8 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/CrossPlatformInputGuidelines.txt.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a3b997593a4f12c4c991490593f3b513 +TextScriptImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs.meta new file mode 100644 index 00000000..4d92b2eb --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d3fb8e05edcf4b41aef584ca1b0d06f +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab b/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab new file mode 100644 index 00000000..9f5e2f2b --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab @@ -0,0 +1,461 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400000} + - 223: {fileID: 22300000} + - 114: {fileID: 11400002} + - 114: {fileID: 11400000} + m_Layer: 5 + m_Name: CarTiltControls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400002} + - 222: {fileID: 22200002} + - 114: {fileID: 11400010} + - 114: {fileID: 11400008} + m_Layer: 5 + m_Name: LookUpAndDownTouchpad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 114: {fileID: 11400012} + m_Layer: 0 + m_Name: TiltSteerInput + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400004} + - 222: {fileID: 22200004} + - 114: {fileID: 11400016} + - 114: {fileID: 11400014} + - 114: {fileID: 11436680} + m_Layer: 5 + m_Name: Brake + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100008 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400006} + - 222: {fileID: 22200000} + - 114: {fileID: 11400006} + - 114: {fileID: 11400004} + - 114: {fileID: 11455192} + m_Layer: 5 + m_Name: Accelerator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -118.998169, y: -211.682297, z: -502.618439} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 2 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Priority: 3 + ignoreReversedGraphics: 1 + blockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9ab98b66288df7b4fa182075f2f12bd6, type: 3} + m_Name: + m_EditorClassIdentifier: + axisName: Vertical + axisValue: 1 + responseSpeed: 999 + returnToCentreSpeed: 3 +--- !u!114 &11400006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: f588d850485d0ae479d73cf3bd0b7b00, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400008 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1caf40fc8bebb6b43b2550c05ca791d6, type: 3} + m_Name: + m_EditorClassIdentifier: + axesToUse: 0 + controlStyle: 2 + horizontalAxisName: Mouse X + verticalAxisName: Mouse Y + Xsensitivity: 1 + Ysensitivity: 1 +--- !u!114 &11400010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: e4f1fee3de32377429fd1348fae62b10, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400012 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} + m_Name: + m_EditorClassIdentifier: + mapping: + type: 0 + axisName: Horizontal + tiltAroundAxis: 0 + fullTiltAngle: 50 + centreAngleOffset: 0 +--- !u!114 &11400014 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9ab98b66288df7b4fa182075f2f12bd6, type: 3} + m_Name: + m_EditorClassIdentifier: + axisName: Vertical + axisValue: -1 + responseSpeed: 999 + returnToCentreSpeed: 3 +--- !u!114 &11400016 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 827c9cd4a3943534f909ac6473e17288, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11436680 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: 5b1a64ea234fb2343b8d0686c51280de, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 5b1a64ea234fb2343b8d0686c51280de, type: 3} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11400016} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11455192 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: eb5f6e2757c821940b69cf1456f7865a, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: eb5f6e2757c821940b69cf1456f7865a, type: 3} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11400006} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!222 &22200000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} +--- !u!222 &22200002 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} +--- !u!222 &22200004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} +--- !u!223 &22300000 +Canvas: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &22400000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22400006} + - {fileID: 22400004} + - {fileID: 400000} + - {fileID: 22400002} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22400002 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 3 + m_AnchorMin: {x: .200000003, y: .300000012} + m_AnchorMax: {x: .800000012, y: .800000012} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400004 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 1 + m_AnchorMin: {x: .0199999996, y: .0299999993} + m_AnchorMax: {x: .0799999982, y: .180000007} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400006 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 0 + m_AnchorMin: {x: .920000017, y: .0299999993} + m_AnchorMax: {x: .980000019, y: .180000007} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab.meta new file mode 100644 index 00000000..6c763912 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/CarTiltControls.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 174090ae7f9eff84abe76f0ff062efac +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab b/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab new file mode 100644 index 00000000..50de5213 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab @@ -0,0 +1,578 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400000} + - 223: {fileID: 22300000} + - 114: {fileID: 11400002} + - 114: {fileID: 11400000} + m_Layer: 5 + m_Name: DualTouchControls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400002} + - 222: {fileID: 22200002} + - 114: {fileID: 11400006} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400004} + - 222: {fileID: 22200000} + - 114: {fileID: 11400004} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400006} + - 222: {fileID: 22200004} + - 114: {fileID: 11400012} + - 114: {fileID: 11400010} + - 114: {fileID: 11400008} + m_Layer: 5 + m_Name: Jump + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100008 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400008} + - 222: {fileID: 22200008} + - 114: {fileID: 11400022} + - 114: {fileID: 11400020} + m_Layer: 5 + m_Name: TurnAndLookTouchpad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400010} + - 222: {fileID: 22200006} + - 114: {fileID: 11400016} + - 114: {fileID: 11400014} + m_Layer: 5 + m_Name: MoveTouchpad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &100012 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400012} + - 222: {fileID: 22200010} + - 114: {fileID: 11400026} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Priority: 3 + ignoreReversedGraphics: 1 + blockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .227450982} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 5 + m_MaxSize: 72 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Turn/Look Touch Area +--- !u!114 &11400006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .227450982} + m_FontData: + m_Font: {fileID: 12800000, guid: b51a3e520f9164da198dc59c8acfccd6, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 5 + m_MaxSize: 72 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Move Touch Area +--- !u!114 &11400008 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85bf3be603548374ca46f521a3aa7fda, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: Jump +--- !u!114 &11400010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + delegates: + - eventID: 2 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400008} + m_MethodName: SetDownState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Jump + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 3 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400008} + m_MethodName: SetUpState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Jump + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &11400012 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: 3d8675433a508ec47b8f895201eacf20, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400014 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1caf40fc8bebb6b43b2550c05ca791d6, type: 3} + m_Name: + m_EditorClassIdentifier: + axesToUse: 0 + controlStyle: 0 + horizontalAxisName: Horizontal + verticalAxisName: Vertical + Xsensitivity: 1 + Ysensitivity: 1 +--- !u!114 &11400016 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: e4f1fee3de32377429fd1348fae62b10, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400020 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1caf40fc8bebb6b43b2550c05ca791d6, type: 3} + m_Name: + m_EditorClassIdentifier: + axesToUse: 0 + controlStyle: 2 + horizontalAxisName: Mouse X + verticalAxisName: Mouse Y + Xsensitivity: 1 + Ysensitivity: 1 +--- !u!114 &11400022 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: e4f1fee3de32377429fd1348fae62b10, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400026 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .188235298} + m_FontData: + m_Font: {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} + m_FontSize: 26 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 5 + m_MaxSize: 72 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: JUMP +--- !u!222 &22200000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} +--- !u!222 &22200002 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} +--- !u!222 &22200004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} +--- !u!222 &22200006 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} +--- !u!222 &22200008 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} +--- !u!222 &22200010 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} +--- !u!223 &22300000 +Canvas: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &22400000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22400010} + - {fileID: 22400008} + - {fileID: 22400006} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22400002 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400010} + m_RootOrder: 0 + m_AnchorMin: {x: .100000001, y: .419999987} + m_AnchorMax: {x: .899999976, y: .579999983} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400004 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400008} + m_RootOrder: 0 + m_AnchorMin: {x: .100000001, y: .419999987} + m_AnchorMax: {x: .899999976, y: .579999983} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400006 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400012} + m_Father: {fileID: 22400000} + m_RootOrder: 2 + m_AnchorMin: {x: .540000021, y: .0199999996} + m_AnchorMax: {x: .959999979, y: .170000002} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400008 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400004} + m_Father: {fileID: 22400000} + m_RootOrder: 1 + m_AnchorMin: {x: .504999995, y: .200000003} + m_AnchorMax: {x: .99000001, y: .899999976} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400010 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400002} + m_Father: {fileID: 22400000} + m_RootOrder: 0 + m_AnchorMin: {x: .00999999978, y: .200000003} + m_AnchorMax: {x: .495000005, y: .899999976} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400012 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400006} + m_RootOrder: 0 + m_AnchorMin: {x: .0500000007, y: .180000007} + m_AnchorMax: {x: .949999988, y: .819999993} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab.meta new file mode 100644 index 00000000..d70a960d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/DualTouchControls.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2169821f0567671499a5c10104c69c24 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab new file mode 100644 index 00000000..caac4186 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab @@ -0,0 +1,972 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400000} + - 223: {fileID: 22300000} + - 114: {fileID: 11400000} + - 114: {fileID: 11400030} + m_Layer: 5 + m_Name: MobileAircraftControls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400002} + - 222: {fileID: 22200000} + - 114: {fileID: 11400002} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400004} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100006 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400006} + - 222: {fileID: 22200002} + - 114: {fileID: 11400004} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100008 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 114: {fileID: 11400014} + m_Layer: 0 + m_Name: TiltSteerInputH + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400002} + - 114: {fileID: 11400028} + m_Layer: 0 + m_Name: TiltSteerInputV + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100012 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400008} + - 114: {fileID: 11494550} + - 114: {fileID: 11483774} + m_Layer: 5 + m_Name: Throttle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100014 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400010} + - 222: {fileID: 22200006} + - 114: {fileID: 11400020} + - 114: {fileID: 11400018} + - 114: {fileID: 11400016} + m_Layer: 5 + m_Name: Brake + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100016 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400012} + - 222: {fileID: 22200004} + - 114: {fileID: 11400012} + - 114: {fileID: 11400010} + - 114: {fileID: 11400008} + - 114: {fileID: 11424508} + m_Layer: 5 + m_Name: Right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100018 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400014} + - 222: {fileID: 22200008} + - 114: {fileID: 11400026} + - 114: {fileID: 11400024} + - 114: {fileID: 11400022} + - 114: {fileID: 11443148} + m_Layer: 5 + m_Name: Left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100020 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400016} + - 222: {fileID: 22200010} + - 114: {fileID: 11400032} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -542.68457, y: -205.718719, z: -62.2698517} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 5 +--- !u!4 &400002 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -542.68457, y: -205.718719, z: -62.2698517} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 4 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Priority: 3 + ignoreReversedGraphics: 1 + blockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: e4f1fee3de32377429fd1348fae62b10, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: ea5873cfd9158664f89459f0c9e1d853, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400008 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85bf3be603548374ca46f521a3aa7fda, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: Horizontal +--- !u!114 &11400010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + delegates: + - eventID: 2 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400008} + m_MethodName: SetAxisPositiveState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 1 + m_StringArgument: Horizontal + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 3 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400008} + m_MethodName: SetAxisNeutralState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Horizontal + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &11400012 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .588} + m_Sprite: {fileID: 21300000, guid: 4db017495c69e8140a56a0e2b669e3f8, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400014 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} + m_Name: + m_EditorClassIdentifier: + mapping: + type: 0 + axisName: Mouse X + tiltAroundAxis: 0 + fullTiltAngle: 50 + centreAngleOffset: 0 +--- !u!114 &11400016 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85bf3be603548374ca46f521a3aa7fda, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: Fire1 +--- !u!114 &11400018 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + delegates: + - eventID: 2 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400016} + m_MethodName: SetAxisPositiveState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 1 + m_FloatArgument: 0 + m_StringArgument: Fire1 + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 3 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400016} + m_MethodName: SetAxisNegativeState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Fire1 + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &11400020 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .13333334} + m_Sprite: {fileID: 21300000, guid: 3d8675433a508ec47b8f895201eacf20, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400022 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85bf3be603548374ca46f521a3aa7fda, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: Horizontal +--- !u!114 &11400024 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + delegates: + - eventID: 2 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400022} + m_MethodName: SetAxisNegativeState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: -1 + m_StringArgument: Horizontal + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 3 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400022} + m_MethodName: SetAxisNeutralState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Horizontal + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &11400026 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .588} + m_Sprite: {fileID: 21300000, guid: 4db017495c69e8140a56a0e2b669e3f8, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400028 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100010} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} + m_Name: + m_EditorClassIdentifier: + mapping: + type: 0 + axisName: Mouse Y + tiltAroundAxis: 1 + fullTiltAngle: -35 + centreAngleOffset: 45 +--- !u!114 &11400030 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11400032 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100020} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .635294139} + m_FontData: + m_Font: {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} + m_FontSize: 26 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 5 + m_MaxSize: 72 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: BRAKE +--- !u!114 &11424508 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11400012} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11443148 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 2 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, + type: 3} + m_PressedSprite: {fileID: 21300000, guid: 49b611e658efbf443b686a4036f74fe3, type: 3} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11400026} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11483774 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 0} + m_HandleRect: {fileID: 22400002} + m_Direction: 2 + m_Value: .5 + m_Size: .200000003 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11494550} + m_MethodName: HandleInput + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11494550 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d3269566d48b8447bb48d2259e28f8b, type: 3} + m_Name: + m_EditorClassIdentifier: + axis: Vertical +--- !u!222 &22200000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} +--- !u!222 &22200002 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} +--- !u!222 &22200004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} +--- !u!222 &22200006 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100014} +--- !u!222 &22200008 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} +--- !u!222 &22200010 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100020} +--- !u!223 &22300000 +Canvas: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &22400000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22400014} + - {fileID: 22400012} + - {fileID: 22400010} + - {fileID: 22400008} + - {fileID: 400002} + - {fileID: 400000} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22400002 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400004} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400004 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400002} + m_Father: {fileID: 22400006} + m_RootOrder: 0 + m_AnchorMin: {x: .0900000036, y: 0} + m_AnchorMax: {x: .870000005, y: 1} + m_AnchoredPosition: {x: 2, y: 0} + m_SizeDelta: {x: -2, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400006 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400004} + m_Father: {fileID: 22400008} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400008 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100012} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400006} + m_Father: {fileID: 22400000} + m_RootOrder: 3 + m_AnchorMin: {x: .0199999996, y: .256999999} + m_AnchorMax: {x: .0799999982, y: .860000014} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400010 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100014} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400016} + m_Father: {fileID: 22400000} + m_RootOrder: 2 + m_AnchorMin: {x: .349999994, y: .0299999993} + m_AnchorMax: {x: .649999976, y: .129999995} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400012 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100016} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 1 + m_AnchorMin: {x: .920000017, y: .0299999993} + m_AnchorMax: {x: .980000019, y: .180000007} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400014 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100018} + m_LocalRotation: {x: 0, y: 0, z: 1, w: -1.62920685e-07} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 0 + m_AnchorMin: {x: .0199999996, y: .0299999993} + m_AnchorMax: {x: .0799999982, y: .180000007} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400016 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100020} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400010} + m_RootOrder: 0 + m_AnchorMin: {x: .0199999996, y: .140000001} + m_AnchorMax: {x: .980000019, y: .860000014} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab.meta new file mode 100644 index 00000000..6576b7ad --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileAircraftControls.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3369231b1ed7ad34e84d9240a571db81 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab new file mode 100644 index 00000000..1b677f85 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab @@ -0,0 +1,376 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400000} + - 223: {fileID: 22300000} + - 114: {fileID: 11400000} + - 114: {fileID: 11400012} + m_Layer: 5 + m_Name: MobileSingleStickControl + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400002} + - 222: {fileID: 22200002} + - 114: {fileID: 11400010} + - 114: {fileID: 11400008} + m_Layer: 5 + m_Name: MobileJoystick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400004} + - 222: {fileID: 22200000} + - 114: {fileID: 11400006} + - 114: {fileID: 11400004} + - 114: {fileID: 11400002} + m_Layer: 5 + m_Name: JumpButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100006 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22400006} + - 222: {fileID: 22200004} + - 114: {fileID: 11400016} + - 114: {fileID: 11400014} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + ignoreReversedGraphics: 1 + blockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85bf3be603548374ca46f521a3aa7fda, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: Jump +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + delegates: + - eventID: 2 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400002} + m_MethodName: SetDownState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Jump + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + - eventID: 3 + callback: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 11400002} + m_MethodName: SetUpState + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Jump + m_BoolArgument: 0 + m_CallState: 1 + m_TypeName: UnityEngine.EventSystems.EventTrigger+TriggerEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &11400006 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 3d8675433a508ec47b8f895201eacf20, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400008 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00c3c865782347f41b6358d9fba14b48, type: 3} + m_Name: + m_EditorClassIdentifier: + MovementRange: 100 + axesToUse: 0 + horizontalAxisName: Horizontal + verticalAxisName: Vertical +--- !u!114 &11400010 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 21300000, guid: 9866a92691696b346901281f2b329034, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11400012 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11400014 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: .125490203} + m_EffectDistance: {x: 2, y: -2} + m_UseGraphicAlpha: 1 +--- !u!114 &11400016 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: .643137276} + m_FontData: + m_Font: {fileID: 12800000, guid: 01cd679a1b9ee48bf9c546f6ce2cb97e, type: 3} + m_FontSize: 26 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Jump +--- !u!222 &22200000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} +--- !u!222 &22200002 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} +--- !u!222 &22200004 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} +--- !u!223 &22300000 +Canvas: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &22400000 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22400004} + - {fileID: 22400002} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!224 &22400002 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400000} + m_RootOrder: 1 + m_AnchorMin: {x: .160000011, y: .200000003} + m_AnchorMax: {x: .160000011, y: .200000003} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 80, y: 80} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400004 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22400006} + m_Father: {fileID: 22400000} + m_RootOrder: 0 + m_AnchorMin: {x: .779999971, y: .00999999978} + m_AnchorMax: {x: .99000001, y: .150000006} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22400006 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22400004} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: .5, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab.meta new file mode 100644 index 00000000..8d63434e --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileSingleStickControl.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9529ecc3d479da5499993355e6c2cb4f +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab new file mode 100644 index 00000000..5356909b --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab @@ -0,0 +1,144 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &100000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400000} + - 114: {fileID: 11400004} + m_Layer: 0 + m_Name: MobileTiltControlRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100002 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400002} + - 114: {fileID: 11400000} + m_Layer: 0 + m_Name: TiltSteerInputH + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &100004 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 400004} + - 114: {fileID: 11400002} + m_Layer: 0 + m_Name: TiltSteerInputV + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400000 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 385.509033, y: 268.018066, z: -62.2695312} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 400004} + - {fileID: 400002} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!4 &400002 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -928.193604, y: -473.736786, z: -.00032043457} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 400000} + m_RootOrder: 1 +--- !u!4 &400004 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -928.193604, y: -473.736786, z: -.00032043457} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 400000} + m_RootOrder: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100002} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} + m_Name: + m_EditorClassIdentifier: + mapping: + type: 0 + axisName: Horizontal + tiltAroundAxis: 0 + fullTiltAngle: 50 + centreAngleOffset: 0 +--- !u!114 &11400002 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c2d84226fbbaf94e9c1451f1c39b06a, type: 3} + m_Name: + m_EditorClassIdentifier: + mapping: + type: 0 + axisName: Vertical + tiltAroundAxis: 1 + fullTiltAngle: -35 + centreAngleOffset: 45 +--- !u!114 &11400004 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 100000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71398ce7fbc3a5b4fa50b50bd54317a7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 100000} + m_IsPrefabParent: 1 diff --git a/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab.meta b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab.meta new file mode 100644 index 00000000..271d5a2d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Prefabs/MobileTiltControlRig.prefab.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 999388b68bb99b44099461bfbed94358 +NativeFormatImporter: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts.meta new file mode 100644 index 00000000..5da31e9a --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3f66eeca8ac36914e9ec9a716a9d9f73 +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs new file mode 100644 index 00000000..622138b3 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs @@ -0,0 +1,75 @@ +using System; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UnityStandardAssets.CrossPlatformInput +{ + public class AxisTouchButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler + { + // designed to work in a pair with another axis touch button + // (typically with one having -1 and one having 1 axisValues) + public string axisName = "Horizontal"; // The name of the axis + public float axisValue = 1; // The axis that the value has + public float responseSpeed = 3; // The speed at which the axis touch button responds + public float returnToCentreSpeed = 3; // The speed at which the button will return to its centre + + AxisTouchButton m_PairedWith; // Which button this one is paired with + CrossPlatformInputManager.VirtualAxis m_Axis; // A reference to the virtual axis as it is in the cross platform input + + void OnEnable() + { + if (!CrossPlatformInputManager.AxisExists(axisName)) + { + // if the axis doesnt exist create a new one in cross platform input + m_Axis = new CrossPlatformInputManager.VirtualAxis(axisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_Axis); + } + else + { + m_Axis = CrossPlatformInputManager.VirtualAxisReference(axisName); + } + FindPairedButton(); + } + + void FindPairedButton() + { + // find the other button witch which this button should be paired + // (it should have the same axisName) + var otherAxisButtons = FindObjectsOfType(typeof(AxisTouchButton)) as AxisTouchButton[]; + + if (otherAxisButtons != null) + { + for (int i = 0; i < otherAxisButtons.Length; i++) + { + if (otherAxisButtons[i].axisName == axisName && otherAxisButtons[i] != this) + { + m_PairedWith = otherAxisButtons[i]; + } + } + } + } + + void OnDisable() + { + // The object is disabled so remove it from the cross platform input system + m_Axis.Remove(); + } + + + public void OnPointerDown(PointerEventData data) + { + if (m_PairedWith == null) + { + FindPairedButton(); + } + // update the axis and record that the button has been pressed this frame + m_Axis.Update(Mathf.MoveTowards(m_Axis.GetValue, axisValue, responseSpeed * Time.deltaTime)); + } + + + public void OnPointerUp(PointerEventData data) + { + m_Axis.Update(Mathf.MoveTowards(m_Axis.GetValue, 0, responseSpeed * Time.deltaTime)); + } + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs.meta new file mode 100644 index 00000000..241497f0 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/AxisTouchButton.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9ab98b66288df7b4fa182075f2f12bd6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs new file mode 100644 index 00000000..3b48f25b --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs @@ -0,0 +1,50 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.CrossPlatformInput +{ + public class ButtonHandler : MonoBehaviour + { + + public string Name; + + void OnEnable() + { + + } + + public void SetDownState() + { + CrossPlatformInputManager.SetButtonDown(Name); + } + + + public void SetUpState() + { + CrossPlatformInputManager.SetButtonUp(Name); + } + + + public void SetAxisPositiveState() + { + CrossPlatformInputManager.SetAxisPositive(Name); + } + + + public void SetAxisNeutralState() + { + CrossPlatformInputManager.SetAxisZero(Name); + } + + + public void SetAxisNegativeState() + { + CrossPlatformInputManager.SetAxisNegative(Name); + } + + public void Update() + { + + } + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs.meta new file mode 100644 index 00000000..1aadb06d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/ButtonHandler.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85bf3be603548374ca46f521a3aa7fda +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs new file mode 100644 index 00000000..9d368c8a --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs @@ -0,0 +1,318 @@ +using System; +using UnityEngine; +using UnityStandardAssets.CrossPlatformInput.PlatformSpecific; + +namespace UnityStandardAssets.CrossPlatformInput +{ + public static class CrossPlatformInputManager + { + public enum ActiveInputMethod + { + Hardware, + Touch + } + + + private static VirtualInput activeInput; + + private static VirtualInput s_TouchInput; + private static VirtualInput s_HardwareInput; + + + static CrossPlatformInputManager() + { + s_TouchInput = new MobileInput(); + s_HardwareInput = new StandaloneInput(); +#if MOBILE_INPUT + activeInput = s_TouchInput; +#else + activeInput = s_HardwareInput; +#endif + } + + public static void SwitchActiveInputMethod(ActiveInputMethod activeInputMethod) + { + switch (activeInputMethod) + { + case ActiveInputMethod.Hardware: + activeInput = s_HardwareInput; + break; + + case ActiveInputMethod.Touch: + activeInput = s_TouchInput; + break; + } + } + + public static bool AxisExists(string name) + { + return activeInput.AxisExists(name); + } + + public static bool ButtonExists(string name) + { + return activeInput.ButtonExists(name); + } + + public static void RegisterVirtualAxis(VirtualAxis axis) + { + activeInput.RegisterVirtualAxis(axis); + } + + + public static void RegisterVirtualButton(VirtualButton button) + { + activeInput.RegisterVirtualButton(button); + } + + + public static void UnRegisterVirtualAxis(string name) + { + if (name == null) + { + throw new ArgumentNullException("name"); + } + activeInput.UnRegisterVirtualAxis(name); + } + + + public static void UnRegisterVirtualButton(string name) + { + activeInput.UnRegisterVirtualButton(name); + } + + + // returns a reference to a named virtual axis if it exists otherwise null + public static VirtualAxis VirtualAxisReference(string name) + { + return activeInput.VirtualAxisReference(name); + } + + + // returns the platform appropriate axis for the given name + public static float GetAxis(string name) + { + return GetAxis(name, false); + } + + + public static float GetAxisRaw(string name) + { + return GetAxis(name, true); + } + + + // private function handles both types of axis (raw and not raw) + private static float GetAxis(string name, bool raw) + { + return activeInput.GetAxis(name, raw); + } + + + // -- Button handling -- + public static bool GetButton(string name) + { + return activeInput.GetButton(name); + } + + + public static bool GetButtonDown(string name) + { + return activeInput.GetButtonDown(name); + } + + + public static bool GetButtonUp(string name) + { + return activeInput.GetButtonUp(name); + } + + + public static void SetButtonDown(string name) + { + activeInput.SetButtonDown(name); + } + + + public static void SetButtonUp(string name) + { + activeInput.SetButtonUp(name); + } + + + public static void SetAxisPositive(string name) + { + activeInput.SetAxisPositive(name); + } + + + public static void SetAxisNegative(string name) + { + activeInput.SetAxisNegative(name); + } + + + public static void SetAxisZero(string name) + { + activeInput.SetAxisZero(name); + } + + + public static void SetAxis(string name, float value) + { + activeInput.SetAxis(name, value); + } + + + public static Vector3 mousePosition + { + get { return activeInput.MousePosition(); } + } + + + public static void SetVirtualMousePositionX(float f) + { + activeInput.SetVirtualMousePositionX(f); + } + + + public static void SetVirtualMousePositionY(float f) + { + activeInput.SetVirtualMousePositionY(f); + } + + + public static void SetVirtualMousePositionZ(float f) + { + activeInput.SetVirtualMousePositionZ(f); + } + + + // virtual axis and button classes - applies to mobile input + // Can be mapped to touch joysticks, tilt, gyro, etc, depending on desired implementation. + // Could also be implemented by other input devices - kinect, electronic sensors, etc + public class VirtualAxis + { + public string name { get; private set; } + private float m_Value; + public bool matchWithInputManager { get; private set; } + + + public VirtualAxis(string name) + : this(name, true) + { + } + + + public VirtualAxis(string name, bool matchToInputSettings) + { + this.name = name; + matchWithInputManager = matchToInputSettings; + } + + + // removes an axes from the cross platform input system + public void Remove() + { + UnRegisterVirtualAxis(name); + } + + + // a controller gameobject (eg. a virtual thumbstick) should update this class + public void Update(float value) + { + m_Value = value; + } + + + public float GetValue + { + get { return m_Value; } + } + + + public float GetValueRaw + { + get { return m_Value; } + } + } + + // a controller gameobject (eg. a virtual GUI button) should call the + // 'pressed' function of this class. Other objects can then read the + // Get/Down/Up state of this button. + public class VirtualButton + { + public string name { get; private set; } + public bool matchWithInputManager { get; private set; } + + private int m_LastPressedFrame = -5; + private int m_ReleasedFrame = -5; + private bool m_Pressed; + + + public VirtualButton(string name) + : this(name, true) + { + } + + + public VirtualButton(string name, bool matchToInputSettings) + { + this.name = name; + matchWithInputManager = matchToInputSettings; + } + + + // A controller gameobject should call this function when the button is pressed down + public void Pressed() + { + if (m_Pressed) + { + return; + } + m_Pressed = true; + m_LastPressedFrame = Time.frameCount; + } + + + // A controller gameobject should call this function when the button is released + public void Released() + { + m_Pressed = false; + m_ReleasedFrame = Time.frameCount; + } + + + // the controller gameobject should call Remove when the button is destroyed or disabled + public void Remove() + { + UnRegisterVirtualButton(name); + } + + + // these are the states of the button which can be read via the cross platform input system + public bool GetButton + { + get { return m_Pressed; } + } + + + public bool GetButtonDown + { + get + { + return m_LastPressedFrame - Time.frameCount == -1; + } + } + + + public bool GetButtonUp + { + get + { + return (m_ReleasedFrame == Time.frameCount - 1); + } + } + } + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs.meta new file mode 100644 index 00000000..ea900aa2 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6ac1ce5a5adfd9f46adbf5b6f752a47c +labels: +- Done +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -1010 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs new file mode 100644 index 00000000..c524fc25 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs @@ -0,0 +1,17 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.CrossPlatformInput +{ + public class InputAxisScrollbar : MonoBehaviour + { + public string axis; + + void Update() { } + + public void HandleInput(float value) + { + CrossPlatformInputManager.SetAxis(axis, (value*2f) - 1f); + } + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs.meta new file mode 100644 index 00000000..956782c7 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/InputAxisScrollbar.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7d3269566d48b8447bb48d2259e28f8b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs new file mode 100644 index 00000000..b01f5ef8 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs @@ -0,0 +1,118 @@ +using System; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace UnityStandardAssets.CrossPlatformInput +{ + public class Joystick : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler + { + public enum AxisOption + { + // Options for which axes to use + Both, // Use both + OnlyHorizontal, // Only horizontal + OnlyVertical // Only vertical + } + + public int MovementRange = 100; + public AxisOption axesToUse = AxisOption.Both; // The options for the axes that the still will use + public string horizontalAxisName = "Horizontal"; // The name given to the horizontal axis for the cross platform input + public string verticalAxisName = "Vertical"; // The name given to the vertical axis for the cross platform input + + Vector3 m_StartPos; + bool m_UseX; // Toggle for using the x axis + bool m_UseY; // Toggle for using the Y axis + CrossPlatformInputManager.VirtualAxis m_HorizontalVirtualAxis; // Reference to the joystick in the cross platform input + CrossPlatformInputManager.VirtualAxis m_VerticalVirtualAxis; // Reference to the joystick in the cross platform input + + void OnEnable() + { + CreateVirtualAxes(); + } + + void Start() + { + m_StartPos = transform.position; + } + + void UpdateVirtualAxes(Vector3 value) + { + var delta = m_StartPos - value; + delta.y = -delta.y; + delta /= MovementRange; + if (m_UseX) + { + m_HorizontalVirtualAxis.Update(-delta.x); + } + + if (m_UseY) + { + m_VerticalVirtualAxis.Update(delta.y); + } + } + + void CreateVirtualAxes() + { + // set axes to use + m_UseX = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyHorizontal); + m_UseY = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyVertical); + + // create new axes based on axes to use + if (m_UseX) + { + m_HorizontalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(horizontalAxisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_HorizontalVirtualAxis); + } + if (m_UseY) + { + m_VerticalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(verticalAxisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_VerticalVirtualAxis); + } + } + + + public void OnDrag(PointerEventData data) + { + Vector3 newPos = Vector3.zero; + + if (m_UseX) + { + int delta = (int)(data.position.x - m_StartPos.x); + delta = Mathf.Clamp(delta, - MovementRange, MovementRange); + newPos.x = delta; + } + + if (m_UseY) + { + int delta = (int)(data.position.y - m_StartPos.y); + delta = Mathf.Clamp(delta, -MovementRange, MovementRange); + newPos.y = delta; + } + transform.position = new Vector3(m_StartPos.x + newPos.x, m_StartPos.y + newPos.y, m_StartPos.z + newPos.z); + UpdateVirtualAxes(transform.position); + } + + + public void OnPointerUp(PointerEventData data) + { + transform.position = m_StartPos; + UpdateVirtualAxes(m_StartPos); + } + + + public void OnPointerDown(PointerEventData data) { } + + void OnDisable() + { + // remove the joysticks from the cross platform input + if (m_UseX) + { + m_HorizontalVirtualAxis.Remove(); + } + if (m_UseY) + { + m_VerticalVirtualAxis.Remove(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs.meta new file mode 100644 index 00000000..aaac7672 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 00c3c865782347f41b6358d9fba14b48 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs new file mode 100644 index 00000000..f26ba492 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs @@ -0,0 +1,85 @@ +using System; +#if UNITY_EDITOR +using UnityEditor; +#endif +using UnityEngine; + + +namespace UnityStandardAssets.CrossPlatformInput +{ + [ExecuteInEditMode] + public class MobileControlRig : MonoBehaviour + { + // this script enables or disables the child objects of a control rig + // depending on whether the USE_MOBILE_INPUT define is declared. + + // This define is set or unset by a menu item that is included with + // the Cross Platform Input package. + +#if !UNITY_EDITOR + void OnEnable() + { + CheckEnableControlRig(); + } + #endif + + private void Start() + { +#if UNITY_EDITOR + if (Application.isPlaying) //if in the editor, need to check if we are playing, as start is also called just after exiting play +#endif + { + UnityEngine.EventSystems.EventSystem system = GameObject.FindObjectOfType(); + + if (system == null) + {//the scene have no event system, spawn one + GameObject o = new GameObject("EventSystem"); + + o.AddComponent(); + o.AddComponent(); + } + } + } + +#if UNITY_EDITOR + + private void OnEnable() + { + EditorUserBuildSettings.activeBuildTargetChanged += Update; + EditorApplication.update += Update; + } + + + private void OnDisable() + { + EditorUserBuildSettings.activeBuildTargetChanged -= Update; + EditorApplication.update -= Update; + } + + + private void Update() + { + CheckEnableControlRig(); + } +#endif + + + private void CheckEnableControlRig() + { +#if MOBILE_INPUT + EnableControlRig(true); + #else + EnableControlRig(false); +#endif + } + + + private void EnableControlRig(bool enabled) + { + foreach (Transform t in transform) + { + t.gameObject.SetActive(enabled); + } + } + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs.meta new file mode 100644 index 00000000..0ee49e89 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 71398ce7fbc3a5b4fa50b50bd54317a7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific.meta new file mode 100644 index 00000000..f88be49e --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0bc72db1e9dcb9647818df5a07871127 +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs new file mode 100644 index 00000000..0416715e --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs @@ -0,0 +1,133 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.CrossPlatformInput.PlatformSpecific +{ + public class MobileInput : VirtualInput + { + private void AddButton(string name) + { + // we have not registered this button yet so add it, happens in the constructor + CrossPlatformInputManager.RegisterVirtualButton(new CrossPlatformInputManager.VirtualButton(name)); + } + + + private void AddAxes(string name) + { + // we have not registered this button yet so add it, happens in the constructor + CrossPlatformInputManager.RegisterVirtualAxis(new CrossPlatformInputManager.VirtualAxis(name)); + } + + + public override float GetAxis(string name, bool raw) + { + if (!m_VirtualAxes.ContainsKey(name)) + { + AddAxes(name); + } + return m_VirtualAxes[name].GetValue; + } + + + public override void SetButtonDown(string name) + { + if (!m_VirtualButtons.ContainsKey(name)) + { + AddButton(name); + } + m_VirtualButtons[name].Pressed(); + } + + + public override void SetButtonUp(string name) + { + if (!m_VirtualButtons.ContainsKey(name)) + { + AddButton(name); + } + m_VirtualButtons[name].Released(); + } + + + public override void SetAxisPositive(string name) + { + if (!m_VirtualAxes.ContainsKey(name)) + { + AddAxes(name); + } + m_VirtualAxes[name].Update(1f); + } + + + public override void SetAxisNegative(string name) + { + if (!m_VirtualAxes.ContainsKey(name)) + { + AddAxes(name); + } + m_VirtualAxes[name].Update(-1f); + } + + + public override void SetAxisZero(string name) + { + if (!m_VirtualAxes.ContainsKey(name)) + { + AddAxes(name); + } + m_VirtualAxes[name].Update(0f); + } + + + public override void SetAxis(string name, float value) + { + if (!m_VirtualAxes.ContainsKey(name)) + { + AddAxes(name); + } + m_VirtualAxes[name].Update(value); + } + + + public override bool GetButtonDown(string name) + { + if (m_VirtualButtons.ContainsKey(name)) + { + return m_VirtualButtons[name].GetButtonDown; + } + + AddButton(name); + return m_VirtualButtons[name].GetButtonDown; + } + + + public override bool GetButtonUp(string name) + { + if (m_VirtualButtons.ContainsKey(name)) + { + return m_VirtualButtons[name].GetButtonUp; + } + + AddButton(name); + return m_VirtualButtons[name].GetButtonUp; + } + + + public override bool GetButton(string name) + { + if (m_VirtualButtons.ContainsKey(name)) + { + return m_VirtualButtons[name].GetButton; + } + + AddButton(name); + return m_VirtualButtons[name].GetButton; + } + + + public override Vector3 MousePosition() + { + return virtualMousePosition; + } + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs.meta new file mode 100644 index 00000000..e0ffb749 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/MobileInput.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9703d53e47195aa4190acd11369ccd1b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs new file mode 100644 index 00000000..374a1f5d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs @@ -0,0 +1,79 @@ +using System; +using UnityEngine; + +namespace UnityStandardAssets.CrossPlatformInput.PlatformSpecific +{ + public class StandaloneInput : VirtualInput + { + public override float GetAxis(string name, bool raw) + { + return raw ? Input.GetAxisRaw(name) : Input.GetAxis(name); + } + + + public override bool GetButton(string name) + { + return Input.GetButton(name); + } + + + public override bool GetButtonDown(string name) + { + return Input.GetButtonDown(name); + } + + + public override bool GetButtonUp(string name) + { + return Input.GetButtonUp(name); + } + + + public override void SetButtonDown(string name) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override void SetButtonUp(string name) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override void SetAxisPositive(string name) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override void SetAxisNegative(string name) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override void SetAxisZero(string name) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override void SetAxis(string name, float value) + { + throw new Exception( + " This is not possible to be called for standalone input. Please check your platform and code where this is called"); + } + + + public override Vector3 MousePosition() + { + return Input.mousePosition; + } + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs.meta new file mode 100644 index 00000000..d4c99a61 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9961032f4f02c4f41997c3ea399d2f22 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs new file mode 100644 index 00000000..658fddd8 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs @@ -0,0 +1,145 @@ +using System; +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityStandardAssets.CrossPlatformInput +{ + // helps with managing tilt input on mobile devices + public class TiltInput : MonoBehaviour + { + // options for the various orientations + public enum AxisOptions + { + ForwardAxis, + SidewaysAxis, + } + + + [Serializable] + public class AxisMapping + { + public enum MappingType + { + NamedAxis, + MousePositionX, + MousePositionY, + MousePositionZ + }; + + + public MappingType type; + public string axisName; + } + + + public AxisMapping mapping; + public AxisOptions tiltAroundAxis = AxisOptions.ForwardAxis; + public float fullTiltAngle = 25; + public float centreAngleOffset = 0; + + + private CrossPlatformInputManager.VirtualAxis m_SteerAxis; + + + private void OnEnable() + { + if (mapping.type == AxisMapping.MappingType.NamedAxis) + { + m_SteerAxis = new CrossPlatformInputManager.VirtualAxis(mapping.axisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_SteerAxis); + } + } + + + private void Update() + { + float angle = 0; + if (Input.acceleration != Vector3.zero) + { + switch (tiltAroundAxis) + { + case AxisOptions.ForwardAxis: + angle = Mathf.Atan2(Input.acceleration.x, -Input.acceleration.y)*Mathf.Rad2Deg + + centreAngleOffset; + break; + case AxisOptions.SidewaysAxis: + angle = Mathf.Atan2(Input.acceleration.z, -Input.acceleration.y)*Mathf.Rad2Deg + + centreAngleOffset; + break; + } + } + + float axisValue = Mathf.InverseLerp(-fullTiltAngle, fullTiltAngle, angle)*2 - 1; + switch (mapping.type) + { + case AxisMapping.MappingType.NamedAxis: + m_SteerAxis.Update(axisValue); + break; + case AxisMapping.MappingType.MousePositionX: + CrossPlatformInputManager.SetVirtualMousePositionX(axisValue*Screen.width); + break; + case AxisMapping.MappingType.MousePositionY: + CrossPlatformInputManager.SetVirtualMousePositionY(axisValue*Screen.width); + break; + case AxisMapping.MappingType.MousePositionZ: + CrossPlatformInputManager.SetVirtualMousePositionZ(axisValue*Screen.width); + break; + } + } + + + private void OnDisable() + { + m_SteerAxis.Remove(); + } + } +} + + +namespace UnityStandardAssets.CrossPlatformInput.Inspector +{ +#if UNITY_EDITOR + [CustomPropertyDrawer(typeof (TiltInput.AxisMapping))] + public class TiltInputAxisStylePropertyDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + EditorGUI.BeginProperty(position, label, property); + + float x = position.x; + float y = position.y; + float inspectorWidth = position.width; + + // Don't make child fields be indented + var indent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + var props = new[] {"type", "axisName"}; + var widths = new[] {.4f, .6f}; + if (property.FindPropertyRelative("type").enumValueIndex > 0) + { + // hide name if not a named axis + props = new[] {"type"}; + widths = new[] {1f}; + } + const float lineHeight = 18; + for (int n = 0; n < props.Length; ++n) + { + float w = widths[n]*inspectorWidth; + + // Calculate rects + Rect rect = new Rect(x, y, w, lineHeight); + x += w; + + EditorGUI.PropertyField(rect, property.FindPropertyRelative(props[n]), GUIContent.none); + } + + // Set indent back to what it was + EditorGUI.indentLevel = indent; + EditorGUI.EndProperty(); + } + } +#endif +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs.meta new file mode 100644 index 00000000..93f79bf1 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/TiltInput.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5c2d84226fbbaf94e9c1451f1c39b06a +labels: +- Not +- Fully +- Implemented +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -1001 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs new file mode 100644 index 00000000..4012331e --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs @@ -0,0 +1,156 @@ +using System; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace UnityStandardAssets.CrossPlatformInput +{ + [RequireComponent(typeof(Image))] + public class TouchPad : MonoBehaviour, IPointerDownHandler, IPointerUpHandler + { + // Options for which axes to use + public enum AxisOption + { + Both, // Use both + OnlyHorizontal, // Only horizontal + OnlyVertical // Only vertical + } + + + public enum ControlStyle + { + Absolute, // operates from teh center of the image + Relative, // operates from the center of the initial touch + Swipe, // swipe to touch touch no maintained center + } + + + public AxisOption axesToUse = AxisOption.Both; // The options for the axes that the still will use + public ControlStyle controlStyle = ControlStyle.Absolute; // control style to use + public string horizontalAxisName = "Horizontal"; // The name given to the horizontal axis for the cross platform input + public string verticalAxisName = "Vertical"; // The name given to the vertical axis for the cross platform input + public float Xsensitivity = 1f; + public float Ysensitivity = 1f; + + Vector3 m_StartPos; + Vector2 m_PreviousDelta; + Vector3 m_JoytickOutput; + bool m_UseX; // Toggle for using the x axis + bool m_UseY; // Toggle for using the Y axis + CrossPlatformInputManager.VirtualAxis m_HorizontalVirtualAxis; // Reference to the joystick in the cross platform input + CrossPlatformInputManager.VirtualAxis m_VerticalVirtualAxis; // Reference to the joystick in the cross platform input + bool m_Dragging; + int m_Id = -1; + Vector2 m_PreviousTouchPos; // swipe style control touch + + +#if !UNITY_EDITOR + private Vector3 m_Center; + private Image m_Image; +#else + Vector3 m_PreviousMouse; +#endif + + void OnEnable() + { + CreateVirtualAxes(); + } + + void Start() + { +#if !UNITY_EDITOR + m_Image = GetComponent(); + m_Center = m_Image.transform.position; +#endif + } + + void CreateVirtualAxes() + { + // set axes to use + m_UseX = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyHorizontal); + m_UseY = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyVertical); + + // create new axes based on axes to use + if (m_UseX) + { + m_HorizontalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(horizontalAxisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_HorizontalVirtualAxis); + } + if (m_UseY) + { + m_VerticalVirtualAxis = new CrossPlatformInputManager.VirtualAxis(verticalAxisName); + CrossPlatformInputManager.RegisterVirtualAxis(m_VerticalVirtualAxis); + } + } + + void UpdateVirtualAxes(Vector3 value) + { + value = value.normalized; + if (m_UseX) + { + m_HorizontalVirtualAxis.Update(value.x); + } + + if (m_UseY) + { + m_VerticalVirtualAxis.Update(value.y); + } + } + + + public void OnPointerDown(PointerEventData data) + { + m_Dragging = true; + m_Id = data.pointerId; +#if !UNITY_EDITOR + if (controlStyle != ControlStyle.Absolute ) + m_Center = data.position; +#endif + } + + void Update() + { + if (!m_Dragging) + { + return; + } + if (Input.touchCount >= m_Id + 1 && m_Id != -1) + { +#if !UNITY_EDITOR + + if (controlStyle == ControlStyle.Swipe) + { + m_Center = m_PreviousTouchPos; + m_PreviousTouchPos = Input.touches[m_Id].position; + } + Vector2 pointerDelta = new Vector2(Input.touches[m_Id].position.x - m_Center.x , Input.touches[m_Id].position.y - m_Center.y).normalized; + pointerDelta.x *= Xsensitivity; + pointerDelta.y *= Ysensitivity; +#else + Vector2 pointerDelta; + pointerDelta.x = Input.mousePosition.x - m_PreviousMouse.x; + pointerDelta.y = Input.mousePosition.y - m_PreviousMouse.y; + m_PreviousMouse = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0f); +#endif + UpdateVirtualAxes(new Vector3(pointerDelta.x, pointerDelta.y, 0)); + } + } + + + public void OnPointerUp(PointerEventData data) + { + m_Dragging = false; + m_Id = -1; + UpdateVirtualAxes(Vector3.zero); + } + + void OnDisable() + { + if (CrossPlatformInputManager.AxisExists(horizontalAxisName)) + CrossPlatformInputManager.UnRegisterVirtualAxis(horizontalAxisName); + + if (CrossPlatformInputManager.AxisExists(verticalAxisName)) + CrossPlatformInputManager.UnRegisterVirtualAxis(verticalAxisName); + } + } +} \ No newline at end of file diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs.meta new file mode 100644 index 00000000..0b176aa6 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/TouchPad.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1caf40fc8bebb6b43b2550c05ca791d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs b/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs new file mode 100644 index 00000000..5ffec5a4 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + + +namespace UnityStandardAssets.CrossPlatformInput +{ + public abstract class VirtualInput + { + public Vector3 virtualMousePosition { get; private set; } + + + protected Dictionary m_VirtualAxes = + new Dictionary(); + // Dictionary to store the name relating to the virtual axes + protected Dictionary m_VirtualButtons = + new Dictionary(); + protected List m_AlwaysUseVirtual = new List(); + // list of the axis and button names that have been flagged to always use a virtual axis or button + + + public bool AxisExists(string name) + { + return m_VirtualAxes.ContainsKey(name); + } + + public bool ButtonExists(string name) + { + return m_VirtualButtons.ContainsKey(name); + } + + + public void RegisterVirtualAxis(CrossPlatformInputManager.VirtualAxis axis) + { + // check if we already have an axis with that name and log and error if we do + if (m_VirtualAxes.ContainsKey(axis.name)) + { + Debug.LogError("There is already a virtual axis named " + axis.name + " registered."); + } + else + { + // add any new axes + m_VirtualAxes.Add(axis.name, axis); + + // if we dont want to match with the input manager setting then revert to always using virtual + if (!axis.matchWithInputManager) + { + m_AlwaysUseVirtual.Add(axis.name); + } + } + } + + + public void RegisterVirtualButton(CrossPlatformInputManager.VirtualButton button) + { + // check if already have a buttin with that name and log an error if we do + if (m_VirtualButtons.ContainsKey(button.name)) + { + Debug.LogError("There is already a virtual button named " + button.name + " registered."); + } + else + { + // add any new buttons + m_VirtualButtons.Add(button.name, button); + + // if we dont want to match to the input manager then always use a virtual axis + if (!button.matchWithInputManager) + { + m_AlwaysUseVirtual.Add(button.name); + } + } + } + + + public void UnRegisterVirtualAxis(string name) + { + // if we have an axis with that name then remove it from our dictionary of registered axes + if (m_VirtualAxes.ContainsKey(name)) + { + m_VirtualAxes.Remove(name); + } + } + + + public void UnRegisterVirtualButton(string name) + { + // if we have a button with this name then remove it from our dictionary of registered buttons + if (m_VirtualButtons.ContainsKey(name)) + { + m_VirtualButtons.Remove(name); + } + } + + + // returns a reference to a named virtual axis if it exists otherwise null + public CrossPlatformInputManager.VirtualAxis VirtualAxisReference(string name) + { + return m_VirtualAxes.ContainsKey(name) ? m_VirtualAxes[name] : null; + } + + + public void SetVirtualMousePositionX(float f) + { + virtualMousePosition = new Vector3(f, virtualMousePosition.y, virtualMousePosition.z); + } + + + public void SetVirtualMousePositionY(float f) + { + virtualMousePosition = new Vector3(virtualMousePosition.x, f, virtualMousePosition.z); + } + + + public void SetVirtualMousePositionZ(float f) + { + virtualMousePosition = new Vector3(virtualMousePosition.x, virtualMousePosition.y, f); + } + + + public abstract float GetAxis(string name, bool raw); + + public abstract bool GetButton(string name); + public abstract bool GetButtonDown(string name); + public abstract bool GetButtonUp(string name); + + public abstract void SetButtonDown(string name); + public abstract void SetButtonUp(string name); + public abstract void SetAxisPositive(string name); + public abstract void SetAxisNegative(string name); + public abstract void SetAxisZero(string name); + public abstract void SetAxis(string name, float value); + public abstract Vector3 MousePosition(); + } +} diff --git a/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs.meta b/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs.meta new file mode 100644 index 00000000..8f6c44d1 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0f57aeb1b8dce3342bea5c28ac17db24 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites.meta new file mode 100644 index 00000000..ea48469d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1835e4537efbdd94b93c2dd136860f1d +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png new file mode 100644 index 00000000..ebf8eddc Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png.meta new file mode 100644 index 00000000..dbd88842 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorOverSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: eb5f6e2757c821940b69cf1456f7865a +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png new file mode 100644 index 00000000..b9d01372 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png.meta new file mode 100644 index 00000000..1ec1baac --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonAcceleratorUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: f588d850485d0ae479d73cf3bd0b7b00 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png new file mode 100644 index 00000000..e8d18485 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png.meta new file mode 100644 index 00000000..8af76bc5 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowOverSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 49b611e658efbf443b686a4036f74fe3 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png new file mode 100644 index 00000000..11b1e8c9 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png.meta new file mode 100644 index 00000000..05148c9f --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonArrowUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 4db017495c69e8140a56a0e2b669e3f8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png new file mode 100644 index 00000000..684d53a4 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png.meta new file mode 100644 index 00000000..ae89df0f --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeOverSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 5b1a64ea234fb2343b8d0686c51280de +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png new file mode 100644 index 00000000..578c00ce Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png.meta new file mode 100644 index 00000000..a3a396d1 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonBrakeUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 827c9cd4a3943534f909ac6473e17288 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png new file mode 100644 index 00000000..92bbbf24 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png.meta new file mode 100644 index 00000000..33948856 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonCameraCycleUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: a3983c59ebf804b4abba687bd7c9e92f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png new file mode 100644 index 00000000..c5d88d99 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png.meta new file mode 100644 index 00000000..c97b81cc --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonResetSprite.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: a94c9a7eb94ceec4a8d67a1890e22e51 +TextureImporter: + fileIDToRecycleName: + 21300000: ResetButton + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png new file mode 100644 index 00000000..fc100c09 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png.meta new file mode 100644 index 00000000..bc3d2b46 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonSpacebarSprite.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 3d8675433a508ec47b8f895201eacf20 +TextureImporter: + fileIDToRecycleName: + 21300000: JumpButton + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 40, y: 40, z: 40, w: 40} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png new file mode 100644 index 00000000..d1891dbd Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png.meta new file mode 100644 index 00000000..11b1a1df --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickOverSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 5485e2f56028a3c4cb54f5caa167377e +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png new file mode 100644 index 00000000..0a4df1dd Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png.meta new file mode 100644 index 00000000..5eb7480d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonThumbstickUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 9866a92691696b346901281f2b329034 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png new file mode 100644 index 00000000..e954b778 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png.meta new file mode 100644 index 00000000..efb87d8d --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleFullUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 0c6271a290ef75b4c97d58746c86c5b8 +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png new file mode 100644 index 00000000..e14ec791 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png.meta new file mode 100644 index 00000000..2296fccf --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/ButtonTimescaleSlowUpSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 9d7c6e4896067aa4fa512a00f692ac1c +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png new file mode 100644 index 00000000..64db848d Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png.meta new file mode 100644 index 00000000..b9d74d96 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderBackgroundSprite.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: ea5873cfd9158664f89459f0c9e1d853 +TextureImporter: + fileIDToRecycleName: + 21300000: SliderBackground + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 31, y: 15, z: 31, w: 15} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png new file mode 100644 index 00000000..0dd9c199 Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png.meta new file mode 100644 index 00000000..a323916e --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/SliderHandleSprite.png.meta @@ -0,0 +1,52 @@ +fileFormatVersion: 2 +guid: 0626b924325d1c34cafa6b22297f4e4f +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png b/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png new file mode 100644 index 00000000..9b86e30d Binary files /dev/null and b/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png differ diff --git a/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png.meta b/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png.meta new file mode 100644 index 00000000..fc51dbc2 --- /dev/null +++ b/Assets/Standard Assets/CrossPlatformInput/Sprites/TouchpadSprite.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: e4f1fee3de32377429fd1348fae62b10 +TextureImporter: + fileIDToRecycleName: + 21300000: JumpButton + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 65, y: 65, z: 65, w: 65} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: diff --git a/Assets/_B1.meta b/Assets/_B1.meta new file mode 100644 index 00000000..f57b635f --- /dev/null +++ b/Assets/_B1.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 50ae52eec54c86d44846bf0e29e9b16c +folderAsset: yes +timeCreated: 1474904701 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/b1_main.meta b/Assets/_B1/b1_main.meta new file mode 100644 index 00000000..8fbe41e7 --- /dev/null +++ b/Assets/_B1/b1_main.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bc459e76d2f484c48b2a964da8eaeb9b +folderAsset: yes +timeCreated: 1474913308 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/b1_main.unity b/Assets/_B1/b1_main.unity new file mode 100644 index 00000000..50129c22 Binary files /dev/null and b/Assets/_B1/b1_main.unity differ diff --git a/Assets/_B1/b1_main.unity.meta b/Assets/_B1/b1_main.unity.meta new file mode 100644 index 00000000..fd1ba124 --- /dev/null +++ b/Assets/_B1/b1_main.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: acdec30f1c9c1184d96045336f95d3d1 +timeCreated: 1474904745 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/b1_main/NavMesh.asset b/Assets/_B1/b1_main/NavMesh.asset new file mode 100644 index 00000000..e61bf679 Binary files /dev/null and b/Assets/_B1/b1_main/NavMesh.asset differ diff --git a/Assets/_B1/b1_main/NavMesh.asset.meta b/Assets/_B1/b1_main/NavMesh.asset.meta new file mode 100644 index 00000000..4ba0592b --- /dev/null +++ b/Assets/_B1/b1_main/NavMesh.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c0431d5ee0fda1c458c7b80f7971956b +timeCreated: 1475049316 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/prefabs.meta b/Assets/_B1/prefabs.meta new file mode 100644 index 00000000..b944b00c --- /dev/null +++ b/Assets/_B1/prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 03a2961681070ff48b3abbb45feafcc6 +folderAsset: yes +timeCreated: 1474904780 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/prefabs/almostTallBrick.prefab b/Assets/_B1/prefabs/almostTallBrick.prefab new file mode 100644 index 00000000..a6669f0a Binary files /dev/null and b/Assets/_B1/prefabs/almostTallBrick.prefab differ diff --git a/Assets/_B1/prefabs/almostTallBrick.prefab.meta b/Assets/_B1/prefabs/almostTallBrick.prefab.meta new file mode 100644 index 00000000..d1994814 --- /dev/null +++ b/Assets/_B1/prefabs/almostTallBrick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35c5efaaff12bde4a99779866aa41163 +timeCreated: 1474909224 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/prefabs/mediumBrick.prefab b/Assets/_B1/prefabs/mediumBrick.prefab new file mode 100644 index 00000000..65d4b3f0 Binary files /dev/null and b/Assets/_B1/prefabs/mediumBrick.prefab differ diff --git a/Assets/_B1/prefabs/mediumBrick.prefab.meta b/Assets/_B1/prefabs/mediumBrick.prefab.meta new file mode 100644 index 00000000..51aff9d5 --- /dev/null +++ b/Assets/_B1/prefabs/mediumBrick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9b6cb664212a6294eb17f8d6117697ff +timeCreated: 1474909222 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/prefabs/smallBrick.prefab b/Assets/_B1/prefabs/smallBrick.prefab new file mode 100644 index 00000000..56197451 Binary files /dev/null and b/Assets/_B1/prefabs/smallBrick.prefab differ diff --git a/Assets/_B1/prefabs/smallBrick.prefab.meta b/Assets/_B1/prefabs/smallBrick.prefab.meta new file mode 100644 index 00000000..d179f995 --- /dev/null +++ b/Assets/_B1/prefabs/smallBrick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da8e82c7a980aa04e84c20dea79a1baf +timeCreated: 1474909217 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/prefabs/tallBrick.prefab b/Assets/_B1/prefabs/tallBrick.prefab new file mode 100644 index 00000000..f620ba5f Binary files /dev/null and b/Assets/_B1/prefabs/tallBrick.prefab differ diff --git a/Assets/_B1/prefabs/tallBrick.prefab.meta b/Assets/_B1/prefabs/tallBrick.prefab.meta new file mode 100644 index 00000000..845f1b3a --- /dev/null +++ b/Assets/_B1/prefabs/tallBrick.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aeedab678de18994a9ad4056c1d72daa +timeCreated: 1474909228 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/scripts.meta b/Assets/_B1/scripts.meta new file mode 100644 index 00000000..6ed61f59 --- /dev/null +++ b/Assets/_B1/scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ccaac3c8d8e92b498159674af2428d6 +folderAsset: yes +timeCreated: 1474914021 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/scripts/AgentScript.cs b/Assets/_B1/scripts/AgentScript.cs new file mode 100644 index 00000000..5df53585 --- /dev/null +++ b/Assets/_B1/scripts/AgentScript.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using System.Collections; + +public class AgentScript : MonoBehaviour { + + //public Transform target; + NavMeshAgent agent; + protected bool stopped = false; + + // Use this for initialization + void Start () { + agent = GetComponent(); + } + + // Update is called once per frame + void Update () { + + } + + public void makeStop() + { + stopped = true; + } + + public bool isStop() + { + return stopped; + } + + public void unStop() + { + stopped = false; + } + +} diff --git a/Assets/_B1/scripts/AgentScript.cs.meta b/Assets/_B1/scripts/AgentScript.cs.meta new file mode 100644 index 00000000..1396072a --- /dev/null +++ b/Assets/_B1/scripts/AgentScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2ff2c5f667d685b488ca594c8f486535 +timeCreated: 1474913656 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/scripts/Director.cs b/Assets/_B1/scripts/Director.cs new file mode 100644 index 00000000..ba16ffc7 --- /dev/null +++ b/Assets/_B1/scripts/Director.cs @@ -0,0 +1,229 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class Director : MonoBehaviour { + + private bool somethingSelected; + public GameObject[] AgentList; + public List selectedList; + public List tempList; + + private Vector2 mouse1stPoint; + private Vector2 mouse2ndPoint; + private bool hold; + private bool barrierSelected; + private Renderer rend; + + // Use this for initialization + void Start () { + somethingSelected = false; + if (AgentList.Length == 0) + { + AgentList = GameObject.FindGameObjectsWithTag("Agent"); + } + + mouse1stPoint = new Vector2(0, 0); + mouse2ndPoint = new Vector2(0, 0); + hold = false; + + foreach (GameObject agent in AgentList) + { + rend = agent.GetComponent(); + rend.material.color = Color.black; + } + + barrierSelected = false; + + selectedList = new List(); + tempList = new List(); + } + + // Update is called once per frame + void Update () { + + Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); + RaycastHit hit; + + foreach (GameObject agentOuter in selectedList) + { + foreach (GameObject agentInner in selectedList) + { + if (agentInner != agentOuter && (!agentInner.GetComponent().isStop() || !agentOuter.GetComponent().isStop())) + { + if (agentInner.GetComponent().destination == agentOuter.GetComponent().destination) + { + + if ((Mathf.Abs((agentInner.transform.position.x - agentInner.GetComponent().destination.x)) <= (agentInner.GetComponent().radius) + && Mathf.Abs(agentInner.transform.position.z - agentInner.GetComponent().destination.z) <= (agentInner.GetComponent().radius))) + { + agentInner.GetComponent().makeStop(); + agentInner.GetComponent().Stop(); + } + + if (((agentInner.GetComponent().destination == agentInner.transform.position) || agentInner.GetComponent().isStop() || agentOuter.GetComponent().isStop()) + && ((agentInner.GetComponent().destination.x - agentInner.transform.position.x) > 10*Mathf.Sin(3.14f/selectedList.Count) && (agentInner.GetComponent().destination.y - agentInner.transform.position.y) > 10 * Mathf.Sin(3.14f / selectedList.Count))) + { + agentInner.GetComponent().makeStop(); + agentInner.GetComponent().Stop(); + } + } + } + } + } + + + if (somethingSelected == true) + { + if (Input.GetMouseButtonUp(0) && barrierSelected == false) + { + foreach (GameObject agent in selectedList) + { + if (Physics.Raycast(ray, out hit) && hit.transform.gameObject.tag != "Agent") + { + agent.GetComponent().SetDestination(hit.point); + + + } + } + somethingSelected = false; + } + if (barrierSelected == true) + { + MainCamera.BarrierSelected = true; + if (Input.GetKeyDown(KeyCode.LeftArrow)) + { + foreach (GameObject barrier in selectedList) + { + Vector3 position = barrier.transform.position; + position.x++; + barrier.transform.position = position; + } + } + else if (Input.GetKeyDown(KeyCode.RightArrow)) + { + foreach (GameObject barrier in selectedList) + { + Vector3 position = barrier.transform.position; + position.x--; + barrier.transform.position = position; + } + } + else if (Input.GetKeyDown(KeyCode.DownArrow)) + { + foreach (GameObject barrier in selectedList) + { + Vector3 position = barrier.transform.position; + position.z++; + barrier.transform.position = position; + } + } + else if (Input.GetKeyDown(KeyCode.UpArrow)) + { + foreach (GameObject barrier in selectedList) + { + Vector3 position = barrier.transform.position; + position.z--; + barrier.transform.position = position; + } + } + + if (Input.GetMouseButtonUp(0) && Physics.Raycast(ray, out hit) && hit.transform.gameObject.tag != "Barrier") + { + foreach (GameObject barrier in selectedList) + { + rend = barrier.GetComponent(); + rend.material.color = Color.white; + } + + MainCamera.BarrierSelected = false; + barrierSelected = false; + selectedList.Clear(); + + } + + } + } + + if (Input.GetMouseButtonDown(0) && hold == false && somethingSelected == false) + { + mouse1stPoint = Input.mousePosition; + hold = true; + } + else if (Input.GetMouseButtonUp(0) && hold == true && somethingSelected == false) + { + + if (AgentList != null) + { + foreach (GameObject agent in AgentList) + { + rend = agent.GetComponent(); + rend.material.color = Color.black; + } + } + + selectedList.Clear(); + mouse2ndPoint = Input.mousePosition; + + if (AgentList != null) + { + foreach (GameObject agent in AgentList) + { + Vector2 screenCoords = Camera.main.WorldToScreenPoint(agent.transform.position); + + Rect mouseRect = new Rect(Mathf.Min(mouse1stPoint.x, mouse2ndPoint.x), Mathf.Min(mouse1stPoint.y, mouse2ndPoint.y), + Mathf.Abs(mouse1stPoint.x - mouse2ndPoint.x), (Mathf.Abs(mouse1stPoint.y - mouse2ndPoint.y))); + + if (mouseRect.Contains(screenCoords)) + { + agent.GetComponent().Resume(); + agent.GetComponent().unStop(); + agent.GetComponent().SetDestination(agent.transform.position); + selectedList.Add(agent); + somethingSelected = true; + } + } + + } + + + + if (Input.GetMouseButtonUp(0)) + { + + if (Physics.Raycast(ray, out hit) && hit.transform.gameObject.tag == "Agent" && hold == true) + { + hit.transform.gameObject.GetComponent().Resume(); + hit.transform.gameObject.GetComponent().unStop(); + hit.transform.gameObject.GetComponent().SetDestination(hit.transform.position); + selectedList.Add(hit.transform.gameObject); + somethingSelected = true; + + + } + else if (Physics.Raycast(ray, out hit) && hit.transform.gameObject.tag == "Barrier") + { + somethingSelected = true; + selectedList.Clear(); + selectedList.Add(hit.transform.gameObject); + rend = hit.transform.gameObject.GetComponent(); + rend.material.color = Color.gray; + barrierSelected = true; + } + } + + + if (selectedList != null && barrierSelected == false) + { + foreach (GameObject agent in selectedList) + { + rend = agent.GetComponent(); + rend.material.color = Color.red; + } + } + + hold = false; + } + + } +} diff --git a/Assets/_B1/scripts/Director.cs.meta b/Assets/_B1/scripts/Director.cs.meta new file mode 100644 index 00000000..33d0d732 --- /dev/null +++ b/Assets/_B1/scripts/Director.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c413702818be923439d1744bb6dde3af +timeCreated: 1475028877 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/scripts/MainCamera.cs b/Assets/_B1/scripts/MainCamera.cs new file mode 100644 index 00000000..f32ca5e8 --- /dev/null +++ b/Assets/_B1/scripts/MainCamera.cs @@ -0,0 +1,66 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +public class MainCamera : MonoBehaviour { + + public float speed=5.0f; + public Transform target; + + public static bool BarrierSelected; + + + + + // Use this for initialization + void Start () { + + BarrierSelected = false; + + + } + + // Update is called once per frame + void Update () { + + if (BarrierSelected) return; + + if (Input.GetKey(KeyCode.RightArrow)) + { + transform.Translate(new Vector3(speed * Time.deltaTime, 0, 0)); + } + if (Input.GetKey(KeyCode.LeftArrow)) + { + transform.Translate(new Vector3(-speed * Time.deltaTime, 0, 0)); + } + if (Input.GetKey(KeyCode.DownArrow)) + { + transform.Translate(new Vector3(0, -speed * Time.deltaTime, 0)); + } + if (Input.GetKey(KeyCode.UpArrow)) + { + transform.Translate(new Vector3(0, speed * Time.deltaTime, 0)); + } + + float x = 0 , y = 0; + + + if (Input.GetMouseButton(1)) + { + x += Input.GetAxis("Mouse X") * speed; + y += Input.GetAxis("Mouse Y") * speed * .2f; + + transform.RotateAround(target.position, transform.up, x); + transform.RotateAround(target.position, transform.right, -y); + + } + + float zoomDist = Vector3.Distance(transform.position, target.position); + + zoomDist = zoomDist - Input.GetAxis("Mouse ScrollWheel") * speed; + transform.position = -transform.forward*zoomDist + target.position; + + + + } +} diff --git a/Assets/_B1/scripts/MainCamera.cs.meta b/Assets/_B1/scripts/MainCamera.cs.meta new file mode 100644 index 00000000..b7169fcf --- /dev/null +++ b/Assets/_B1/scripts/MainCamera.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eafe1345aeacb474981c62dcc42620d3 +timeCreated: 1474916614 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/scripts/movingBarrier.cs b/Assets/_B1/scripts/movingBarrier.cs new file mode 100644 index 00000000..31f216cf --- /dev/null +++ b/Assets/_B1/scripts/movingBarrier.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using System.Collections; + +public class movingBarrier : MonoBehaviour { + + GameObject movingB; + Vector3 startPos; + Vector3 endPos; + float startTime; + float pathLength; + + // Use this for initialization + void Start () { + pathLength = 20.0f; + startTime = Time.time; + startPos = transform.position; + endPos.x = startPos.x-24; + endPos.y = startPos.y; + endPos.z = startPos.z; + + } + + // Update is called once per frame + void Update () { + float distCovered = (Time.time - startTime) *1.5f; + float fracJourney = distCovered / pathLength; + transform.position = Vector3.Lerp(startPos, endPos, fracJourney); + if (transform.position == endPos) + { + endPos = startPos; + startPos = transform.position; + startTime = Time.time; + } + + } +} diff --git a/Assets/_B1/scripts/movingBarrier.cs.meta b/Assets/_B1/scripts/movingBarrier.cs.meta new file mode 100644 index 00000000..ece62c41 --- /dev/null +++ b/Assets/_B1/scripts/movingBarrier.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0ea04c924bb008d449724a5ea705b161 +timeCreated: 1475045376 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures.meta b/Assets/_B1/textures.meta new file mode 100644 index 00000000..8915bf7c --- /dev/null +++ b/Assets/_B1/textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85571ea98b4d89646b9b3b96b8a95211 +folderAsset: yes +timeCreated: 1474904854 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures/blocks.mat b/Assets/_B1/textures/blocks.mat new file mode 100644 index 00000000..2ea1e350 Binary files /dev/null and b/Assets/_B1/textures/blocks.mat differ diff --git a/Assets/_B1/textures/blocks.mat.meta b/Assets/_B1/textures/blocks.mat.meta new file mode 100644 index 00000000..ebc53bc4 --- /dev/null +++ b/Assets/_B1/textures/blocks.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 078afcd601d7dfb429610e242f7fb4f1 +timeCreated: 1474994145 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures/fastTrack.mat b/Assets/_B1/textures/fastTrack.mat new file mode 100644 index 00000000..c1c2da94 Binary files /dev/null and b/Assets/_B1/textures/fastTrack.mat differ diff --git a/Assets/_B1/textures/fastTrack.mat.meta b/Assets/_B1/textures/fastTrack.mat.meta new file mode 100644 index 00000000..0014e7b8 --- /dev/null +++ b/Assets/_B1/textures/fastTrack.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b078ef89315870c4a8178951f49c1069 +timeCreated: 1475048973 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures/ground.mat b/Assets/_B1/textures/ground.mat new file mode 100644 index 00000000..526f94e2 Binary files /dev/null and b/Assets/_B1/textures/ground.mat differ diff --git a/Assets/_B1/textures/ground.mat.meta b/Assets/_B1/textures/ground.mat.meta new file mode 100644 index 00000000..f1505a95 --- /dev/null +++ b/Assets/_B1/textures/ground.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 281ad737cc58cbf45887809dc280b269 +timeCreated: 1474904872 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures/ramp+shortWalls.mat b/Assets/_B1/textures/ramp+shortWalls.mat new file mode 100644 index 00000000..18f5a994 Binary files /dev/null and b/Assets/_B1/textures/ramp+shortWalls.mat differ diff --git a/Assets/_B1/textures/ramp+shortWalls.mat.meta b/Assets/_B1/textures/ramp+shortWalls.mat.meta new file mode 100644 index 00000000..bc8baeb1 --- /dev/null +++ b/Assets/_B1/textures/ramp+shortWalls.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3acf2fa0fa885b4787a152fb9ce8746 +timeCreated: 1474994465 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_B1/textures/tallWalls.mat b/Assets/_B1/textures/tallWalls.mat new file mode 100644 index 00000000..8e5da765 Binary files /dev/null and b/Assets/_B1/textures/tallWalls.mat differ diff --git a/Assets/_B1/textures/tallWalls.mat.meta b/Assets/_B1/textures/tallWalls.mat.meta new file mode 100644 index 00000000..2373c032 --- /dev/null +++ b/Assets/_B1/textures/tallWalls.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c0310f8242b7f84fa4252cf3b95890c +timeCreated: 1474994590 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 4ddc1e60..e2fcdc93 100644 Binary files a/ProjectSettings/EditorBuildSettings.asset and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset index ed1316ce..3a645026 100644 Binary files a/ProjectSettings/NavMeshAreas.asset and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index a54c5f81..bc2ffadb 100644 Binary files a/ProjectSettings/TagManager.asset and b/ProjectSettings/TagManager.asset differ diff --git a/README.md b/README.md index cc658796..437c2a3f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,29 @@ # Unity General Unity Playground with all needed assets + +Group 16 + +Members: + +1. Hareesh Ravi +2. Cyril Manayath +3. Lei Wang +4. Zacharias Psarakis + +Webpage: + +https://graphics.cs.rutgers.edu/teaching/2016-fall/computer-graphics/groups/16 + +Assignment B1 + +Navigation Basics + +This game has 6 agents moving around in an environment full of obstacles such as moving walls, stairs, maze etc. +Select the agent you want to move, by clicking on it with the mouse, and click on the position of the destination +you want the agent to move to. You can see that, when multiple agents move, they do not bunch up! They do not collide +with each other, avoid obstacles and follow the shortest path to the specified destination. They adapt to dynamic +obstacles as well. + +A video demo of the game is available at: +https://www.youtube.com/watch?v=Eo4u8OBC82k&index=11&list=PLMrnU9hvxHHWoAq9KBF3Ydhhn82q8_Xgo +