├── .gitignore ├── .vscode └── settings.json ├── Assets ├── Plugins.meta ├── Plugins │ ├── System.Reactive.dll │ └── System.Reactive.dll.meta ├── Resources.meta ├── Resources │ ├── CameraSettings.asset │ ├── CameraSettings.asset.meta │ ├── RaycastManager.asset │ └── RaycastManager.asset.meta ├── Scenes.meta ├── Scenes │ ├── CameraTest.unity │ └── CameraTest.unity.meta ├── Scripts.meta └── Scripts │ ├── Controllers.meta │ ├── Controllers │ ├── CameraController.cs │ ├── CameraController.cs.meta │ ├── CameraSettings.cs │ └── CameraSettings.cs.meta │ ├── Managers.meta │ ├── Managers │ ├── InputManager.cs │ ├── InputManager.cs.meta │ ├── RaycastManager.cs │ └── RaycastManager.cs.meta │ ├── Utils.meta │ └── Utils │ ├── MonoSingleton.cs │ ├── MonoSingleton.cs.meta │ ├── RxExtensions.meta │ ├── RxExtensions │ ├── ObservableExtensions.cs │ ├── ObservableExtensions.cs.meta │ ├── ReactiveProperty.cs │ └── ReactiveProperty.cs.meta │ ├── Singleton.cs │ └── Singleton.cs.meta ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── NetworkManager.asset.meta ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75499f4d3cd20f74594521a05c515047 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/System.Reactive.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xerios/AdvancedCameraControls/aad00822bea5f16d959e6a3e4e976e7136edfea4/Assets/Plugins/System.Reactive.dll -------------------------------------------------------------------------------- /Assets/Plugins/System.Reactive.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c74dd6bb80e91a748984c7187a9e2965 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | isPreloaded: 0 9 | isOverridable: 0 10 | platformData: 11 | - first: 12 | Any: 13 | second: 14 | enabled: 1 15 | settings: {} 16 | - first: 17 | Editor: Editor 18 | second: 19 | enabled: 0 20 | settings: 21 | DefaultValueInitialized: true 22 | - first: 23 | Windows Store Apps: WindowsStoreApps 24 | second: 25 | enabled: 0 26 | settings: 27 | CPU: AnyCPU 28 | userData: 29 | assetBundleName: 30 | assetBundleVariant: 31 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71e391571c5c2ca4ca33a1bd77e17765 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/CameraSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 2fc0d692e47faab4da25a80a05e351f7, type: 3} 12 | m_Name: CameraSettings 13 | m_EditorClassIdentifier: 14 | minZoom: 5 15 | maxZoom: 1200 16 | zoomCurve: 17 | serializedVersion: 2 18 | m_Curve: 19 | - serializedVersion: 3 20 | time: 0 21 | value: 0.001 22 | inSlope: 0.3530888 23 | outSlope: 0.3530888 24 | tangentMode: 0 25 | weightedMode: 0 26 | inWeight: 0 27 | outWeight: 0.12085308 28 | - serializedVersion: 3 29 | time: 1 30 | value: 0.5 31 | inSlope: 0.948389 32 | outSlope: 0.948389 33 | tangentMode: 0 34 | weightedMode: 0 35 | inWeight: 0.036729872 36 | outWeight: 0 37 | m_PreInfinity: 2 38 | m_PostInfinity: 2 39 | m_RotationOrder: 4 40 | tweenTime: 0.2 41 | tweenCurve: 42 | serializedVersion: 2 43 | m_Curve: 44 | - serializedVersion: 3 45 | time: 0 46 | value: 0 47 | inSlope: 3.0277288 48 | outSlope: 3.0277288 49 | tangentMode: 0 50 | weightedMode: 0 51 | inWeight: 0 52 | outWeight: 0.021327015 53 | - serializedVersion: 3 54 | time: 1 55 | value: 1 56 | inSlope: 0 57 | outSlope: 0 58 | tangentMode: 0 59 | weightedMode: 0 60 | inWeight: 0 61 | outWeight: 0 62 | m_PreInfinity: 2 63 | m_PostInfinity: 2 64 | m_RotationOrder: 4 65 | manualZoomSteps: 1 66 | directionalMovementSpeed: 3 67 | rotateHorizontalSpeed: 0.2 68 | rotateVerticalSpeed: 0.2 69 | RadiusBound: 500 70 | -------------------------------------------------------------------------------- /Assets/Resources/CameraSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93e1530eca7eb874b8a6450314cff18a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/RaycastManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 508b20d3ed551e74eb1f601542ca2900, type: 3} 12 | m_Name: RaycastManager 13 | m_EditorClassIdentifier: 14 | raycastDistance: 1500 15 | layerMaskGround: 16 | serializedVersion: 2 17 | m_Bits: 512 18 | -------------------------------------------------------------------------------- /Assets/Resources/RaycastManager.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dff2222848da30549ba4bac5960f55ad 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/CameraTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e0ff1717c9e2664f94f3758db236010 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1adc4ce40de4784697a04d878ee479e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Controllers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab408efce24a96649a9ede684ebaf0a7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Controllers/CameraController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Reactive; 4 | using System.Reactive.Linq; 5 | using System; 6 | using UnityEngine; 7 | using System.Reactive.Concurrency; 8 | using System.Reactive.Disposables; 9 | 10 | public class CameraController : MonoBehaviour 11 | { 12 | public ReactiveProperty Use2DMode = new ReactiveProperty(false); 13 | 14 | [Header("Zoom Level")] 15 | [Range(0f, 1f)] 16 | public float zoom = 1f; 17 | 18 | [Header("Camera Settings")] 19 | public CameraSettings settings; 20 | 21 | //---------------------------------------------------------------------- 22 | private new Transform camera; 23 | 24 | private float zoomSmoothed = 1f; 25 | 26 | private Vector3 dragMousePos; 27 | private Vector3 dragOriginPosition; 28 | private Vector3 dragStartPosition; 29 | private Vector2 rotateStartPosition; 30 | 31 | private float rotationPitch; 32 | private Vector2 rotatePitchClamp = new Vector2(-85f, 0f); 33 | 34 | private Vector3 destinationPosition; 35 | 36 | float zoomTimer = 0f, positionTimer = 0f; 37 | float startZoom = 0f; 38 | Vector3 startPosition; 39 | 40 | //---------------------------------------------------------------------- 41 | 42 | private CompositeDisposable disposables; 43 | 44 | // Use this for initialization 45 | private void OnEnable() 46 | { 47 | var raycastMgr = RaycastManager.Instance; 48 | var inputMgr = InputManager.Instance; 49 | 50 | camera = transform.GetChild(0); 51 | 52 | destinationPosition = transform.localPosition; 53 | 54 | disposables = new CompositeDisposable(); 55 | 56 | 57 | // Directional movement relative to the camera ( Up/Down/Left/Right ) 58 | inputMgr.Movement 59 | .Subscribe(pos => 60 | { 61 | // Transform direction to camera's rotation 62 | var move = camera.transform.rotation * new Vector3(pos.x, 0, pos.y); 63 | move.y = 0; 64 | move = move.normalized; 65 | 66 | // Accelerate based on zoom out 67 | move *= (1 + zoom); 68 | // Multiply by the movement speed 69 | move *= settings.directionalMovementSpeed; 70 | 71 | destinationPosition = ConstrainToBounds(this.transform.localPosition + move); 72 | }) 73 | .AddTo(disposables); 74 | 75 | // Mouse drag script ( save initial drag position for later use ) 76 | inputMgr.DragDown 77 | .Subscribe(pos => 78 | { 79 | dragMousePos = pos; 80 | dragOriginPosition = this.transform.localPosition; 81 | 82 | // Mouse specific code 83 | raycastMgr.RaycastGround(dragMousePos, out dragStartPosition); 84 | 85 | // Debug stuff 86 | // Debug.DrawRay(dragStartPosition, Vector3.up * 5, Color.red, 1f); 87 | }) 88 | .AddTo(disposables); 89 | 90 | 91 | // Mouse drag script 92 | inputMgr.Drag.Subscribe(pos => 93 | { 94 | Vector3 startDragPosition, currentDragPosition; 95 | 96 | //-------------------- 97 | // Get difference from first drag position and new and then set the new camera destination pos 98 | if (raycastMgr.RaycastPlane(dragMousePos, dragStartPosition.y, out startDragPosition) && raycastMgr.RaycastPlane(pos, dragStartPosition.y, out currentDragPosition)) 99 | { 100 | positionTimer = 0f; 101 | startPosition = this.transform.localPosition; 102 | destinationPosition = ConstrainToBounds(dragOriginPosition + (startDragPosition - currentDragPosition)); 103 | } 104 | }) 105 | .AddTo(disposables); 106 | 107 | // Mouse zoom in to origin 108 | inputMgr.Zoom 109 | .Subscribe(delta => 110 | { 111 | zoomTimer = 0f; 112 | startZoom = zoomSmoothed; 113 | 114 | var deltaMod = (settings.zoomCurve.Evaluate(zoom) * delta); // Make sure we zoom less the more we zoom in 115 | zoom = Mathf.Clamp01(zoom - deltaMod); 116 | 117 | // Save original position 118 | Vector3 originalPosition = camera.localPosition; 119 | 120 | // Get current mouse raycast position 121 | Vector3 zoomPos; 122 | raycastMgr.RaycastGround(inputMgr.GetMousePos(), out zoomPos); 123 | 124 | // Update zoom 125 | UpdateCameraTransform(zoom); 126 | 127 | // Calculate new mouse position 128 | Vector3 zoomMouseNewPosition; 129 | if (raycastMgr.RaycastPlane(inputMgr.GetMousePos(), zoomPos.y, out zoomMouseNewPosition)) 130 | { 131 | // Adjust camera position so that we zoom-in to point instead of center 132 | var deltaPos = (zoomMouseNewPosition - zoomPos); 133 | positionTimer = 0f; 134 | startPosition = this.transform.localPosition; 135 | destinationPosition = ConstrainToBounds(this.transform.localPosition - deltaPos); 136 | } 137 | 138 | // Set back to original position ( zoom-in and translation is taken care in update with smoothing) 139 | camera.localPosition = originalPosition; 140 | 141 | //Debug.DrawRay(zoomPos, Vector3.up * 5, Color.green, 1f); 142 | }) 143 | .AddTo(disposables); 144 | 145 | 146 | // Mouse drag to rotate script ( save initial drag position for later use ) 147 | inputMgr.RotateDown 148 | .Subscribe(pos => 149 | { 150 | rotateStartPosition = pos; 151 | dragOriginPosition = this.transform.localPosition; 152 | raycastMgr.RaycastGround(pos, out dragStartPosition); 153 | }) 154 | .AddTo(disposables); 155 | 156 | // Mouse drag to rotate script 157 | inputMgr.Rotate 158 | .Subscribe(pos => 159 | { 160 | var deltaYaw = (rotateStartPosition.x - pos.x) * settings.rotateHorizontalSpeed; 161 | var deltaPitch = (rotateStartPosition.y - pos.y) * settings.rotateVerticalSpeed; 162 | rotateStartPosition = pos; 163 | 164 | // Rotate horizontally 165 | //-------------------- 166 | transform.RotateAround(dragStartPosition, Vector3.up, deltaYaw); 167 | if (!Use2DMode.Value) 168 | { 169 | Vector3 originalPosition = transform.localPosition; 170 | Quaternion originalRotation = transform.localRotation; 171 | 172 | Vector3 newPos; 173 | Quaternion newRot; 174 | RotateAround(dragStartPosition, transform.right, deltaPitch, out newPos, out newRot); 175 | 176 | //pitchValue = clampedRotation.eulerAngles.x; 177 | 178 | var clampedRotation = ClampRotationAroundXAxis(newRot); 179 | 180 | Vector3 angles = clampedRotation.eulerAngles; 181 | angles.y = originalRotation.eulerAngles.y; 182 | angles.z = 0; 183 | 184 | transform.localPosition = newPos; 185 | transform.localEulerAngles = angles; 186 | 187 | if (!isEqual(clampedRotation.eulerAngles.x, newRot.eulerAngles.x)) 188 | { 189 | //Debug.Log($"OUTSIDE {clampedRotation.eulerAngles.x} = {newRot.eulerAngles.x}"); 190 | transform.localPosition = ConstrainToBounds(originalPosition); 191 | transform.localRotation = originalRotation; 192 | } 193 | else 194 | { 195 | float distance = 0f; 196 | var ray = new Ray(camera.transform.position, camera.transform.forward); 197 | var raycastResult = new Plane(Vector3.up, 0).Raycast(ray, out distance); 198 | 199 | if (raycastResult && distance <= (settings.minZoom + settings.maxZoom)) 200 | { 201 | var zoomEvalReverse = (distance - settings.minZoom) / settings.maxZoom; 202 | zoom = Mathf.Clamp01(zoomEvalReverse); 203 | UpdateCameraTransform(zoom); 204 | 205 | this.transform.localPosition = ConstrainToBounds(ray.GetPoint(distance)); 206 | 207 | //Debug.Log("INSIDE"); 208 | } 209 | else 210 | { 211 | //Debug.Log($"INSIDE ( could not raycast ) {distance}"); 212 | //transform.localRotation = originalRotation; 213 | transform.localPosition = originalPosition; 214 | } 215 | } 216 | } 217 | //-------------------- 218 | // Force new position ( prevents smooth camera movement issues ) 219 | startPosition = destinationPosition = this.transform.localPosition; 220 | 221 | //Debug.DrawRay(dragStartPosition, Vector3.up * 5, Color.red, 1f); 222 | }) 223 | .AddTo(disposables); 224 | } 225 | 226 | private void OnDisable() 227 | { 228 | disposables.Dispose(); 229 | } 230 | 231 | //------------------------------------------------ 232 | // Updates camera position instantly ( used in zoom and normal update ) 233 | private void UpdateCameraTransform(float value) 234 | { 235 | var zoomEval = settings.minZoom + (value * settings.maxZoom); 236 | camera.localPosition = new Vector3(0, zoomEval, 0); 237 | } 238 | 239 | // Update camera position in a smooth silky way 240 | private void Update() 241 | { 242 | var d = Time.deltaTime / settings.tweenTime; // We want to move the timer from 0 to 1, so we divide Time.deltaTime by totalTime 243 | zoomTimer += d; 244 | positionTimer += d; 245 | zoomSmoothed = Mathf.Lerp(startZoom, zoom, settings.tweenCurve.Evaluate(zoomTimer)); 246 | 247 | UpdateCameraTransform(zoomSmoothed); 248 | 249 | this.transform.localPosition = Vector3.Lerp(startPosition, destinationPosition, settings.tweenCurve.Evaluate(positionTimer)); 250 | } 251 | 252 | // ------------------------------------------------ 253 | 254 | // Helper function 255 | public Vector3 ConstrainToBounds(Vector3 p) 256 | { 257 | var constrainedPos = Vector3.ClampMagnitude(p, settings.RadiusBound); 258 | constrainedPos.y = 0; 259 | return constrainedPos; 260 | } 261 | 262 | private void RotateAround(Vector3 center, Vector3 axis, float angle, out Vector3 pos, out Quaternion rotation) 263 | { 264 | Quaternion rot = Quaternion.AngleAxis(angle, axis); // get the desired rotation 265 | Vector3 dir = this.transform.position - center; // find current direction relative to center 266 | dir = rot * dir; // rotate the direction 267 | pos = center + dir; // define new position 268 | Quaternion myRot = transform.rotation; 269 | rotation = myRot * Quaternion.Inverse(myRot) * rot * myRot; 270 | } 271 | 272 | bool isEqual(float a, float b) 273 | { 274 | if (a >= b - 0.0001f && a <= b + 0.0001f) 275 | return true; 276 | else 277 | return false; 278 | } 279 | 280 | Quaternion ClampRotationAroundXAxis(Quaternion q) 281 | { 282 | q.x /= q.w; 283 | q.y /= q.w; 284 | q.z /= q.w; 285 | q.w = 1.0f; 286 | 287 | float angleX = 2.0f * Mathf.Rad2Deg * Mathf.Atan(q.x); 288 | angleX = Mathf.Clamp(angleX, rotatePitchClamp.x, rotatePitchClamp.y); 289 | q.x = Mathf.Tan(0.5f * Mathf.Deg2Rad * angleX); 290 | 291 | return q; 292 | } 293 | // ------------------------------------------------ 294 | 295 | // Debug viz 296 | private void OnDrawGizmosSelected() 297 | { 298 | //Gizmos.color = new Color(0f, 0f, 1f, 0.1f); 299 | //Gizmos.DrawCube(bounds.center, bounds.size); 300 | Gizmos.color = new Color(0f, 0f, 1f, 1f); 301 | //Gizmos.DrawWireCube(bounds.center, bounds.size); 302 | 303 | Gizmos.DrawWireSphere(Vector3.zero, settings.RadiusBound); 304 | } 305 | } 306 | -------------------------------------------------------------------------------- /Assets/Scripts/Controllers/CameraController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 851fff7d7d7cad844b6579750e8c32eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Controllers/CameraSettings.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | [CreateAssetMenu(fileName = "CameraSettings")] 5 | public class CameraSettings : ScriptableObject 6 | { 7 | //---------------------------------------------------------------------- 8 | [Header("Zoom Settings")] 9 | public float minZoom = 0.1f; 10 | public float maxZoom = 100f; 11 | public AnimationCurve zoomCurve; 12 | 13 | //---------------------------------------------------------------------- 14 | [Header("Speeds")] 15 | [Range(0.1f, 1f)] 16 | [Tooltip("Speed at which camera interpolates between new positions, lower = smoother camera movement, higher = more rigid")] 17 | public float tweenTime = 0.5f; 18 | 19 | public AnimationCurve tweenCurve; 20 | 21 | [Range(0.1f, 1f)] 22 | public float manualZoomSteps = 0.1f; 23 | 24 | [Range(1f, 10f)] 25 | [Tooltip("Speed at which camera moves when using directional movement ( Up/Down/Left/Right )")] 26 | public float directionalMovementSpeed = 3f; 27 | 28 | [Range(0.1f, 1f)] 29 | [Tooltip("Horizontal Rotation Speed")] 30 | public float rotateHorizontalSpeed = 0.2f; 31 | 32 | [Range(0.1f, 1f)] 33 | [Tooltip("Vertical Rotation Speed")] 34 | public float rotateVerticalSpeed = 0.2f; 35 | 36 | [Header("Bounds")] 37 | public float RadiusBound = 10f; 38 | } -------------------------------------------------------------------------------- /Assets/Scripts/Controllers/CameraSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fc0d692e47faab4da25a80a05e351f7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Managers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdb379caaa2f9e94aa616d2808b85cfc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Managers/InputManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System; 4 | using System.Reactive.Linq; 5 | using System.Reactive.Subjects; 6 | using UnityEngine; 7 | using UnityEngine.EventSystems; 8 | using System.Reactive.Disposables; 9 | 10 | public class InputManager : MonoSingleton 11 | { 12 | private const float mouseDistanceToDrag = 20f; 13 | 14 | // ------------------------------------------ 15 | public IObservable Drag { get; private set; } 16 | public IObservable DragDown { get; private set; } 17 | public IObservable DragUp { get; private set; } 18 | // ------------------------------------------ 19 | public IObservable Click { get; private set; } 20 | // ------------------------------------------ 21 | public IObservable Rotate { get; private set; } 22 | public IObservable RotateDown { get; private set; } 23 | public IObservable RotateUp { get; private set; } 24 | // ------------------------------------------ 25 | public IObservable MousePosition { get; private set; } 26 | public IObservable Movement { get; private set; } 27 | public IObservable Zoom { get; private set; } 28 | // ------------------------------------------ 29 | private ReactiveProperty mousePos = new ReactiveProperty(); 30 | private ReactiveProperty dragDown = new ReactiveProperty(); 31 | private Subject dragUp = new Subject(); 32 | 33 | private Subject rotateDown = new Subject(); 34 | private Subject rotateUp = new Subject(); 35 | 36 | private Subject movement = new Subject(); 37 | private Subject zoom = new Subject(); 38 | // ------------------------------------------ 39 | 40 | 41 | public void OnEnable() 42 | { 43 | // ------------------------------------------ 44 | MousePosition = mousePos.Publish().RefCount(); 45 | Movement = movement.Publish().RefCount(); 46 | Zoom = zoom.Where(IsMouseNotOverUI).Publish().RefCount(); 47 | 48 | // ------------------------------------------ 49 | // Mouse drag logic 50 | DragDown = dragDown 51 | .Where(IsMouseNotOverUI) 52 | .SkipWhile(x => Input.GetMouseButton(1)) 53 | .SelectMany(x => mousePos.TakeUntil(dragUp)) 54 | .Where(IsOutsideClickRange) 55 | .Take(1) 56 | .Repeat() 57 | .Publish() 58 | .RefCount(); 59 | 60 | Drag = DragDown 61 | .SelectMany(x => mousePos.TakeUntil(dragUp)) 62 | .Publish() 63 | .RefCount(); 64 | 65 | DragUp = dragUp.Publish().RefCount(); 66 | 67 | // ------------------------------------------ 68 | 69 | Click = dragUp 70 | .Where(IsMouseNotOverUI) 71 | .TakeUntil(DragDown) 72 | .Where(IsInsideClickRange) // Make sure we haven't been dragging our mouse beforehand 73 | .Repeat() 74 | .Publish() 75 | .RefCount(); 76 | 77 | // ------------------------------------------ 78 | RotateDown = rotateDown 79 | .Where(IsMouseNotOverUI) 80 | .SkipWhile(x => Input.GetMouseButton(0)) 81 | .Publish() 82 | .RefCount(); 83 | 84 | Rotate = RotateDown 85 | .SelectMany(x => mousePos.TakeUntil(rotateUp)) 86 | .Publish() 87 | .RefCount(); 88 | 89 | RotateUp = rotateUp.Publish().RefCount(); 90 | } 91 | 92 | // Update is called once per frame 93 | public void Update() 94 | { 95 | if (Input.GetKey(KeyCode.UpArrow)) movement.OnNext(Vector2.up); 96 | if (Input.GetKey(KeyCode.DownArrow)) movement.OnNext(Vector2.down); 97 | if (Input.GetKey(KeyCode.LeftArrow)) movement.OnNext(Vector2.left); 98 | if (Input.GetKey(KeyCode.RightArrow)) movement.OnNext(Vector2.right); 99 | 100 | var mouseRaw = Input.mousePosition; 101 | if (!mouseRaw.Equals(mousePos.Value)) mousePos.Value = mouseRaw; 102 | if (Input.mouseScrollDelta.y != 0) zoom.OnNext(Input.mouseScrollDelta.y); 103 | 104 | if (Input.GetMouseButtonDown(0)) dragDown.Value = mousePos.Value; 105 | if (Input.GetMouseButtonUp(0)) dragUp.OnNext(mousePos.Value); 106 | 107 | if (Input.GetMouseButtonDown(1)) rotateDown.OnNext(mousePos.Value); 108 | if (Input.GetMouseButtonUp(1)) rotateUp.OnNext(mousePos.Value); 109 | } 110 | 111 | public Vector2 GetMousePos() => mousePos.Value; 112 | 113 | private bool IsMouseNotOverUI(float _) => !EventSystem.current.IsPointerOverGameObject(); 114 | private bool IsMouseNotOverUI(Vector2 _) => !EventSystem.current.IsPointerOverGameObject(); 115 | private bool IsOutsideClickRange(Vector2 pos) => !IsInsideClickRange(pos); 116 | private bool IsInsideClickRange(Vector2 pos) => Vector3.Distance(pos, dragDown.Value) <= mouseDistanceToDrag; 117 | } -------------------------------------------------------------------------------- /Assets/Scripts/Managers/InputManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eada50fcacd2a9f46abf27a6145e0955 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Managers/RaycastManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | [CreateAssetMenu(fileName = "RaycastManager")] 5 | public class RaycastManager : Singleton 6 | { 7 | 8 | [Header("Raycast settings")] 9 | public int raycastDistance = 500; 10 | 11 | [Header("Layers")] 12 | public LayerMask layerMaskGround; 13 | 14 | private RaycastHit[] hitResults = new RaycastHit[1]; 15 | private Plane plane = new Plane(Vector3.up, 0); 16 | 17 | public bool RaycastPlane(Vector2 pos, float height, out Vector3 hitpos) 18 | { 19 | var ray = Camera.main.ScreenPointToRay(pos); 20 | 21 | // Raycast against an infinite plane, in case no colliders are present 22 | float dist; 23 | if (new Plane(Vector3.down, height).Raycast(ray, out dist)) 24 | { 25 | hitpos = ray.GetPoint(dist); 26 | return true; 27 | } 28 | 29 | hitpos = Vector3.zero; 30 | return false; 31 | } 32 | 33 | public bool RaycastGround(Vector2 pos, out Vector3 hitpos) 34 | { 35 | var ray = Camera.main.ScreenPointToRay(pos); 36 | 37 | // Raycast against ground layer 38 | if (Physics.RaycastNonAlloc(ray, hitResults, raycastDistance, layerMaskGround) != 0) 39 | { 40 | hitpos = hitResults[0].point; 41 | return true; 42 | } 43 | 44 | // Raycast against an infinite plane, in case no colliders are present 45 | float dist; 46 | if (plane.Raycast(ray, out dist)) 47 | { 48 | hitpos = ray.GetPoint(dist); 49 | return true; 50 | } 51 | 52 | hitpos = Vector3.zero; 53 | return false; 54 | } 55 | } -------------------------------------------------------------------------------- /Assets/Scripts/Managers/RaycastManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 508b20d3ed551e74eb1f601542ca2900 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9e08ee3f45f4634f9b98089b6fb2681 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/MonoSingleton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public abstract class MonoSingleton : MonoBehaviour where T : Component 6 | { 7 | 8 | #region Fields 9 | 10 | /// 11 | /// The instance. 12 | /// 13 | private static T instance; 14 | 15 | #endregion 16 | 17 | #region Properties 18 | 19 | /// 20 | /// Gets the instance. 21 | /// 22 | /// The instance. 23 | public static T Instance 24 | { 25 | get 26 | { 27 | if (instance == null) 28 | { 29 | instance = FindObjectOfType(); 30 | if (instance == null) 31 | { 32 | GameObject obj = new GameObject(); 33 | obj.name = typeof(T).Name; 34 | instance = obj.AddComponent(); 35 | } 36 | } 37 | return instance; 38 | } 39 | } 40 | 41 | #endregion 42 | 43 | #region Methods 44 | 45 | /// 46 | /// Use this for initialization. 47 | /// 48 | protected virtual void Awake() 49 | { 50 | if (instance == null) 51 | { 52 | instance = this as T; 53 | DontDestroyOnLoad(gameObject); 54 | } 55 | else 56 | { 57 | Destroy(gameObject); 58 | } 59 | } 60 | 61 | #endregion 62 | 63 | } -------------------------------------------------------------------------------- /Assets/Scripts/Utils/MonoSingleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 499ecaa441d91b6499a2a3cf691712dc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/RxExtensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffb0e627db2e4424282f36027c576b8c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/RxExtensions/ObservableExtensions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reactive.Disposables; 4 | 5 | public static class ObservableExtensions 6 | { 7 | // Update is called once per frame 8 | public static void AddTo(this IDisposable observable, CompositeDisposable composite) 9 | { 10 | composite.Add(observable); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/RxExtensions/ObservableExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75423c2df8490e64194be12bc903573e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/RxExtensions/ReactiveProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Subjects; 3 | 4 | /// 5 | /// A type that holds a value that can be subscribed against. Also this wrapper implements 6 | /// INotifyPropertyChanged against the wrapped value for data-binding. 7 | /// 8 | /// 9 | public class ReactiveProperty : IObservable, IDisposable, IComparable 10 | { 11 | private T _value; 12 | private readonly Subject _valueObservable = new Subject(); 13 | 14 | public ReactiveProperty(T initialValue = default(T)) 15 | { 16 | _value = initialValue; 17 | } 18 | 19 | public T Value 20 | { 21 | get { return _value; } 22 | set 23 | { 24 | if (!Equals(_value, value)) 25 | { 26 | _value = value; 27 | _valueObservable.OnNext(value); 28 | } 29 | } 30 | } 31 | 32 | public static implicit operator T(ReactiveProperty reactiveProperty) => reactiveProperty.Value; 33 | 34 | public IDisposable Subscribe(IObserver observer) 35 | { 36 | var subscription = _valueObservable.Subscribe(observer); 37 | return subscription; 38 | } 39 | 40 | public virtual void Dispose() => _valueObservable.Dispose(); 41 | 42 | public override string ToString() => Value?.ToString() ?? string.Empty; 43 | 44 | public int CompareTo(object obj) 45 | { 46 | var comparable = _value as IComparable; 47 | if (comparable != null) 48 | { 49 | return comparable.CompareTo(obj); 50 | } 51 | throw new InvalidOperationException($"The underlying type {(typeof(T)).FullName} does not implement IComparable so a comparison is not possible."); 52 | } 53 | } -------------------------------------------------------------------------------- /Assets/Scripts/Utils/RxExtensions/ReactiveProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b5f75a7bd9b95545bdbef8c81fe1ce7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/Singleton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | 4 | public class Singleton : ScriptableObject where T : ScriptableObject { 5 | private static T _instance; 6 | 7 | public static T Instance { 8 | get { 9 | if (!_instance) _instance = Resources.Load(typeof(T).Name); 10 | if (!_instance) _instance = ScriptableObject.CreateInstance(); 11 | 12 | return _instance; 13 | } 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /Assets/Scripts/Utils/Singleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de671187da4051a4ca29a53ba6fb94fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Sam Megidov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "2.0.16", 5 | "com.unity.package-manager-ui": "1.9.11", 6 | "com.unity.purchasing": "2.0.3", 7 | "com.unity.textmeshpro": "1.2.1", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.animation": "1.0.0", 10 | "com.unity.modules.assetbundle": "1.0.0", 11 | "com.unity.modules.audio": "1.0.0", 12 | "com.unity.modules.cloth": "1.0.0", 13 | "com.unity.modules.director": "1.0.0", 14 | "com.unity.modules.imageconversion": "1.0.0", 15 | "com.unity.modules.imgui": "1.0.0", 16 | "com.unity.modules.jsonserialize": "1.0.0", 17 | "com.unity.modules.particlesystem": "1.0.0", 18 | "com.unity.modules.physics": "1.0.0", 19 | "com.unity.modules.physics2d": "1.0.0", 20 | "com.unity.modules.screencapture": "1.0.0", 21 | "com.unity.modules.terrain": "1.0.0", 22 | "com.unity.modules.terrainphysics": "1.0.0", 23 | "com.unity.modules.tilemap": "1.0.0", 24 | "com.unity.modules.ui": "1.0.0", 25 | "com.unity.modules.uielements": "1.0.0", 26 | "com.unity.modules.umbra": "1.0.0", 27 | "com.unity.modules.unityanalytics": "1.0.0", 28 | "com.unity.modules.unitywebrequest": "1.0.0", 29 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 30 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 31 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 32 | "com.unity.modules.unitywebrequestwww": "1.0.0", 33 | "com.unity.modules.vehicles": "1.0.0", 34 | "com.unity.modules.video": "1.0.0", 35 | "com.unity.modules.vr": "1.0.0", 36 | "com.unity.modules.wind": "1.0.0", 37 | "com.unity.modules.xr": "1.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 0 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: c9fcffffc800ffffc800ffffffffffffc800ffffc800ffffffffffffffffffffc800ffffc800ffffc968ffffc9dcffffc948ffffc904ffffc95cffffc908ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | m_AutoSyncTransforms: 1 21 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/CameraControlTest.unity 10 | guid: 7e0ff1717c9e2664f94f3758db236010 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 2 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | m_CollabEditorSettings: 16 | inProgressEnabled: 1 17 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 42 | type: 0} 43 | m_CustomRenderPipeline: {fileID: 0} 44 | m_TransparencySortMode: 0 45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 46 | m_DefaultRenderingPath: 1 47 | m_DefaultMobileRenderingPath: 1 48 | m_TierSettings: [] 49 | m_LightmapStripping: 0 50 | m_FogStripping: 0 51 | m_InstancingStripping: 0 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 0 63 | m_LightsUseColorTemperature: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: Flyable 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -1372625422 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 25 79 | agentClimb: 0.5 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | m_SettingNames: 89 | - Walking 90 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0000000000000000a000000000000000 3 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: 956378e4acfce7f4cbfd8a1194a0080d 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 0 15 | companyName: DefaultCompany 16 | productName: SimpleMapCamera 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 0 58 | allowedAutorotateToPortrait: 0 59 | allowedAutorotateToPortraitUpsideDown: 0 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 1 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | deferSystemGesturesMode: 0 75 | hideHomeButton: 0 76 | submitAnalytics: 1 77 | usePlayerLog: 1 78 | bakeCollisionMeshes: 0 79 | forceSingleInstance: 0 80 | resizableWindow: 0 81 | useMacAppStoreValidation: 0 82 | macAppStoreCategory: public.app-category.games 83 | gpuSkinning: 0 84 | graphicsJobs: 0 85 | xboxPIXTextureCapture: 0 86 | xboxEnableAvatar: 0 87 | xboxEnableKinect: 0 88 | xboxEnableKinectAutoTracking: 0 89 | xboxEnableFitness: 0 90 | visibleInBackground: 1 91 | allowFullscreenSwitch: 1 92 | graphicsJobMode: 0 93 | fullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOnePresentImmediateThreshold: 0 109 | switchQueueCommandMemory: 0 110 | videoMemoryForVertexBuffers: 0 111 | psp2PowerMode: 0 112 | psp2AcquireBGM: 1 113 | vulkanEnableSetSRGBWrite: 0 114 | vulkanUseSWCommandBuffers: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 1.0 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | enableVideoLayer: 0 136 | useProtectedVideoMemory: 0 137 | minimumSupportedHeadTracking: 0 138 | maximumSupportedHeadTracking: 1 139 | hololens: 140 | depthFormat: 1 141 | depthBufferSharingEnabled: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | enable360StereoCapture: 0 146 | protectGraphicsMemory: 0 147 | useHDRDisplay: 0 148 | m_ColorGamuts: 00000000 149 | targetPixelDensity: 30 150 | resolutionScalingMode: 0 151 | androidSupportedAspectRatio: 1 152 | androidMaxAspectRatio: 2.1 153 | applicationIdentifier: 154 | Android: com.tfbgames.towerdefense 155 | iOS: com.tfbgames.towerdefense 156 | buildNumber: {} 157 | AndroidBundleVersionCode: 1 158 | AndroidMinSdkVersion: 16 159 | AndroidTargetSdkVersion: 0 160 | AndroidPreferredInstallLocation: 1 161 | aotOptions: 162 | stripEngineCode: 1 163 | iPhoneStrippingLevel: 0 164 | iPhoneScriptCallOptimization: 0 165 | ForceInternetPermission: 0 166 | ForceSDCardPermission: 0 167 | CreateWallpaper: 0 168 | APKExpansionFiles: 0 169 | keepLoadedShadersAlive: 0 170 | StripUnusedMeshComponents: 0 171 | VertexChannelCompressionMask: 214 172 | iPhoneSdkVersion: 988 173 | iOSTargetOSVersionString: 8.0 174 | tvOSSdkVersion: 0 175 | tvOSRequireExtendedGameController: 0 176 | tvOSTargetOSVersionString: 9.0 177 | uIPrerenderedIcon: 0 178 | uIRequiresPersistentWiFi: 0 179 | uIRequiresFullScreen: 1 180 | uIStatusBarHidden: 1 181 | uIExitOnSuspend: 0 182 | uIStatusBarStyle: 0 183 | iPhoneSplashScreen: {fileID: 0} 184 | iPhoneHighResSplashScreen: {fileID: 0} 185 | iPhoneTallHighResSplashScreen: {fileID: 0} 186 | iPhone47inSplashScreen: {fileID: 0} 187 | iPhone55inPortraitSplashScreen: {fileID: 0} 188 | iPhone55inLandscapeSplashScreen: {fileID: 0} 189 | iPhone58inPortraitSplashScreen: {fileID: 0} 190 | iPhone58inLandscapeSplashScreen: {fileID: 0} 191 | iPadPortraitSplashScreen: {fileID: 0} 192 | iPadHighResPortraitSplashScreen: {fileID: 0} 193 | iPadLandscapeSplashScreen: {fileID: 0} 194 | iPadHighResLandscapeSplashScreen: {fileID: 0} 195 | appleTVSplashScreen: {fileID: 0} 196 | appleTVSplashScreen2x: {fileID: 0} 197 | tvOSSmallIconLayers: [] 198 | tvOSSmallIconLayers2x: [] 199 | tvOSLargeIconLayers: [] 200 | tvOSLargeIconLayers2x: [] 201 | tvOSTopShelfImageLayers: [] 202 | tvOSTopShelfImageLayers2x: [] 203 | tvOSTopShelfImageWideLayers: [] 204 | tvOSTopShelfImageWideLayers2x: [] 205 | iOSLaunchScreenType: 0 206 | iOSLaunchScreenPortrait: {fileID: 0} 207 | iOSLaunchScreenLandscape: {fileID: 0} 208 | iOSLaunchScreenBackgroundColor: 209 | serializedVersion: 2 210 | rgba: 0 211 | iOSLaunchScreenFillPct: 100 212 | iOSLaunchScreenSize: 100 213 | iOSLaunchScreenCustomXibPath: 214 | iOSLaunchScreeniPadType: 0 215 | iOSLaunchScreeniPadImage: {fileID: 0} 216 | iOSLaunchScreeniPadBackgroundColor: 217 | serializedVersion: 2 218 | rgba: 0 219 | iOSLaunchScreeniPadFillPct: 100 220 | iOSLaunchScreeniPadSize: 100 221 | iOSLaunchScreeniPadCustomXibPath: 222 | iOSUseLaunchScreenStoryboard: 0 223 | iOSLaunchScreenCustomStoryboardPath: 224 | iOSDeviceRequirements: [] 225 | iOSURLSchemes: [] 226 | iOSBackgroundModes: 0 227 | iOSMetalForceHardShadows: 0 228 | metalEditorSupport: 0 229 | metalAPIValidation: 1 230 | iOSRenderExtraFrameOnPause: 0 231 | appleDeveloperTeamID: 232 | iOSManualSigningProvisioningProfileID: 233 | tvOSManualSigningProvisioningProfileID: 234 | iOSManualSigningProvisioningProfileType: 0 235 | tvOSManualSigningProvisioningProfileType: 0 236 | appleEnableAutomaticSigning: 0 237 | iOSRequireARKit: 0 238 | appleEnableProMotion: 0 239 | vulkanEditorSupport: 0 240 | clonedFromGUID: fffac548863434d63b448e119b4954a9 241 | templatePackageId: 242 | templateDefaultScene: 243 | AndroidTargetArchitectures: 5 244 | AndroidSplashScreenScale: 0 245 | androidSplashScreen: {fileID: 0} 246 | AndroidKeystoreName: 247 | AndroidKeyaliasName: 248 | AndroidBuildApkPerCpuArchitecture: 0 249 | AndroidTVCompatibility: 1 250 | AndroidIsGame: 1 251 | AndroidEnableTango: 0 252 | androidEnableBanner: 1 253 | androidUseLowAccuracyLocation: 0 254 | m_AndroidBanners: 255 | - width: 320 256 | height: 180 257 | banner: {fileID: 0} 258 | androidGamepadSupportLevel: 0 259 | resolutionDialogBanner: {fileID: 0} 260 | m_BuildTargetIcons: 261 | - m_BuildTarget: 262 | m_Icons: 263 | - serializedVersion: 2 264 | m_Icon: {fileID: 2800000, guid: da55ea351339347598f357c9e0490d9b, type: 3} 265 | m_Width: 128 266 | m_Height: 128 267 | m_Kind: 34750 268 | m_BuildTargetPlatformIcons: [] 269 | m_BuildTargetBatching: [] 270 | m_BuildTargetGraphicsAPIs: [] 271 | m_BuildTargetVRSettings: [] 272 | m_BuildTargetEnableVuforiaSettings: [] 273 | openGLRequireES31: 0 274 | openGLRequireES31AEP: 0 275 | m_TemplateCustomTags: {} 276 | mobileMTRendering: 277 | Android: 1 278 | iPhone: 1 279 | tvOS: 1 280 | m_BuildTargetGroupLightmapEncodingQuality: 281 | - m_BuildTarget: Standalone 282 | m_EncodingQuality: 1 283 | - m_BuildTarget: XboxOne 284 | m_EncodingQuality: 1 285 | - m_BuildTarget: PS4 286 | m_EncodingQuality: 1 287 | m_BuildTargetGroupLightmapSettings: [] 288 | playModeTestRunnerEnabled: 0 289 | runPlayModeTestAsEditModeTest: 0 290 | actionOnDotNetUnhandledException: 1 291 | enableInternalProfiler: 0 292 | logObjCUncaughtExceptions: 1 293 | enableCrashReportAPI: 0 294 | cameraUsageDescription: 295 | locationUsageDescription: 296 | microphoneUsageDescription: 297 | switchNetLibKey: 298 | switchSocketMemoryPoolSize: 6144 299 | switchSocketAllocatorPoolSize: 128 300 | switchSocketConcurrencyLimit: 14 301 | switchScreenResolutionBehavior: 2 302 | switchUseCPUProfiler: 0 303 | switchApplicationID: 0x01004b9000490000 304 | switchNSODependencies: 305 | switchTitleNames_0: 306 | switchTitleNames_1: 307 | switchTitleNames_2: 308 | switchTitleNames_3: 309 | switchTitleNames_4: 310 | switchTitleNames_5: 311 | switchTitleNames_6: 312 | switchTitleNames_7: 313 | switchTitleNames_8: 314 | switchTitleNames_9: 315 | switchTitleNames_10: 316 | switchTitleNames_11: 317 | switchTitleNames_12: 318 | switchTitleNames_13: 319 | switchTitleNames_14: 320 | switchPublisherNames_0: 321 | switchPublisherNames_1: 322 | switchPublisherNames_2: 323 | switchPublisherNames_3: 324 | switchPublisherNames_4: 325 | switchPublisherNames_5: 326 | switchPublisherNames_6: 327 | switchPublisherNames_7: 328 | switchPublisherNames_8: 329 | switchPublisherNames_9: 330 | switchPublisherNames_10: 331 | switchPublisherNames_11: 332 | switchPublisherNames_12: 333 | switchPublisherNames_13: 334 | switchPublisherNames_14: 335 | switchIcons_0: {fileID: 0} 336 | switchIcons_1: {fileID: 0} 337 | switchIcons_2: {fileID: 0} 338 | switchIcons_3: {fileID: 0} 339 | switchIcons_4: {fileID: 0} 340 | switchIcons_5: {fileID: 0} 341 | switchIcons_6: {fileID: 0} 342 | switchIcons_7: {fileID: 0} 343 | switchIcons_8: {fileID: 0} 344 | switchIcons_9: {fileID: 0} 345 | switchIcons_10: {fileID: 0} 346 | switchIcons_11: {fileID: 0} 347 | switchIcons_12: {fileID: 0} 348 | switchIcons_13: {fileID: 0} 349 | switchIcons_14: {fileID: 0} 350 | switchSmallIcons_0: {fileID: 0} 351 | switchSmallIcons_1: {fileID: 0} 352 | switchSmallIcons_2: {fileID: 0} 353 | switchSmallIcons_3: {fileID: 0} 354 | switchSmallIcons_4: {fileID: 0} 355 | switchSmallIcons_5: {fileID: 0} 356 | switchSmallIcons_6: {fileID: 0} 357 | switchSmallIcons_7: {fileID: 0} 358 | switchSmallIcons_8: {fileID: 0} 359 | switchSmallIcons_9: {fileID: 0} 360 | switchSmallIcons_10: {fileID: 0} 361 | switchSmallIcons_11: {fileID: 0} 362 | switchSmallIcons_12: {fileID: 0} 363 | switchSmallIcons_13: {fileID: 0} 364 | switchSmallIcons_14: {fileID: 0} 365 | switchManualHTML: 366 | switchAccessibleURLs: 367 | switchLegalInformation: 368 | switchMainThreadStackSize: 1048576 369 | switchPresenceGroupId: 0x01004b9000490000 370 | switchLogoHandling: 0 371 | switchReleaseVersion: 0 372 | switchDisplayVersion: 1.0.0 373 | switchStartupUserAccount: 0 374 | switchTouchScreenUsage: 0 375 | switchSupportedLanguagesMask: 0 376 | switchLogoType: 0 377 | switchApplicationErrorCodeCategory: 378 | switchUserAccountSaveDataSize: 0 379 | switchUserAccountSaveDataJournalSize: 0 380 | switchApplicationAttribute: 0 381 | switchCardSpecSize: 4 382 | switchCardSpecClock: 25 383 | switchRatingsMask: 0 384 | switchRatingsInt_0: 0 385 | switchRatingsInt_1: 0 386 | switchRatingsInt_2: 0 387 | switchRatingsInt_3: 0 388 | switchRatingsInt_4: 0 389 | switchRatingsInt_5: 0 390 | switchRatingsInt_6: 0 391 | switchRatingsInt_7: 0 392 | switchRatingsInt_8: 0 393 | switchRatingsInt_9: 0 394 | switchRatingsInt_10: 0 395 | switchRatingsInt_11: 0 396 | switchLocalCommunicationIds_0: 0x01004b9000490000 397 | switchLocalCommunicationIds_1: 398 | switchLocalCommunicationIds_2: 399 | switchLocalCommunicationIds_3: 400 | switchLocalCommunicationIds_4: 401 | switchLocalCommunicationIds_5: 402 | switchLocalCommunicationIds_6: 403 | switchLocalCommunicationIds_7: 404 | switchParentalControl: 0 405 | switchAllowsScreenshot: 1 406 | switchAllowsVideoCapturing: 1 407 | switchAllowsRuntimeAddOnContentInstall: 0 408 | switchDataLossConfirmation: 0 409 | switchSupportedNpadStyles: 3 410 | switchNativeFsCacheSize: 32 411 | switchIsHoldTypeHorizontal: 0 412 | switchSupportedNpadCount: 8 413 | switchSocketConfigEnabled: 0 414 | switchTcpInitialSendBufferSize: 32 415 | switchTcpInitialReceiveBufferSize: 64 416 | switchTcpAutoSendBufferSizeMax: 256 417 | switchTcpAutoReceiveBufferSizeMax: 256 418 | switchUdpSendBufferSize: 9 419 | switchUdpReceiveBufferSize: 42 420 | switchSocketBufferEfficiency: 4 421 | switchSocketInitializeEnabled: 1 422 | switchNetworkInterfaceManagerInitializeEnabled: 1 423 | switchPlayerConnectionEnabled: 1 424 | ps4NPAgeRating: 12 425 | ps4NPTitleSecret: 426 | ps4NPTrophyPackPath: 427 | ps4ParentalLevel: 1 428 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 429 | ps4Category: 0 430 | ps4MasterVersion: 01.00 431 | ps4AppVersion: 01.00 432 | ps4AppType: 0 433 | ps4ParamSfxPath: 434 | ps4VideoOutPixelFormat: 0 435 | ps4VideoOutInitialWidth: 1920 436 | ps4VideoOutBaseModeInitialWidth: 1920 437 | ps4VideoOutReprojectionRate: 120 438 | ps4PronunciationXMLPath: 439 | ps4PronunciationSIGPath: 440 | ps4BackgroundImagePath: 441 | ps4StartupImagePath: 442 | ps4StartupImagesFolder: 443 | ps4IconImagesFolder: 444 | ps4SaveDataImagePath: 445 | ps4SdkOverride: 446 | ps4BGMPath: 447 | ps4ShareFilePath: 448 | ps4ShareOverlayImagePath: 449 | ps4PrivacyGuardImagePath: 450 | ps4NPtitleDatPath: 451 | ps4RemotePlayKeyAssignment: -1 452 | ps4RemotePlayKeyMappingDir: 453 | ps4PlayTogetherPlayerCount: 0 454 | ps4EnterButtonAssignment: 1 455 | ps4ApplicationParam1: 0 456 | ps4ApplicationParam2: 0 457 | ps4ApplicationParam3: 0 458 | ps4ApplicationParam4: 0 459 | ps4DownloadDataSize: 0 460 | ps4GarlicHeapSize: 2048 461 | ps4ProGarlicHeapSize: 2560 462 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 463 | ps4pnSessions: 1 464 | ps4pnPresence: 1 465 | ps4pnFriends: 1 466 | ps4pnGameCustomData: 1 467 | playerPrefsSupport: 0 468 | enableApplicationExit: 0 469 | restrictedAudioUsageRights: 0 470 | ps4UseResolutionFallback: 0 471 | ps4ReprojectionSupport: 0 472 | ps4UseAudio3dBackend: 0 473 | ps4SocialScreenEnabled: 0 474 | ps4ScriptOptimizationLevel: 0 475 | ps4Audio3dVirtualSpeakerCount: 14 476 | ps4attribCpuUsage: 0 477 | ps4PatchPkgPath: 478 | ps4PatchLatestPkgPath: 479 | ps4PatchChangeinfoPath: 480 | ps4PatchDayOne: 0 481 | ps4attribUserManagement: 0 482 | ps4attribMoveSupport: 0 483 | ps4attrib3DSupport: 0 484 | ps4attribShareSupport: 0 485 | ps4attribExclusiveVR: 0 486 | ps4disableAutoHideSplash: 0 487 | ps4videoRecordingFeaturesUsed: 0 488 | ps4contentSearchFeaturesUsed: 0 489 | ps4attribEyeToEyeDistanceSettingVR: 0 490 | ps4IncludedModules: [] 491 | monoEnv: 492 | psp2Splashimage: {fileID: 0} 493 | psp2NPTrophyPackPath: 494 | psp2NPSupportGBMorGJP: 0 495 | psp2NPAgeRating: 12 496 | psp2NPTitleDatPath: 497 | psp2NPCommsID: 498 | psp2NPCommunicationsID: 499 | psp2NPCommsPassphrase: 500 | psp2NPCommsSig: 501 | psp2ParamSfxPath: 502 | psp2ManualPath: 503 | psp2LiveAreaGatePath: 504 | psp2LiveAreaBackroundPath: 505 | psp2LiveAreaPath: 506 | psp2LiveAreaTrialPath: 507 | psp2PatchChangeInfoPath: 508 | psp2PatchOriginalPackage: 509 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 510 | psp2KeystoneFile: 511 | psp2MemoryExpansionMode: 0 512 | psp2DRMType: 0 513 | psp2StorageType: 0 514 | psp2MediaCapacity: 0 515 | psp2DLCConfigPath: 516 | psp2ThumbnailPath: 517 | psp2BackgroundPath: 518 | psp2SoundPath: 519 | psp2TrophyCommId: 520 | psp2TrophyPackagePath: 521 | psp2PackagedResourcesPath: 522 | psp2SaveDataQuota: 10240 523 | psp2ParentalLevel: 1 524 | psp2ShortTitle: Not Set 525 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 526 | psp2Category: 0 527 | psp2MasterVersion: 01.00 528 | psp2AppVersion: 01.00 529 | psp2TVBootMode: 0 530 | psp2EnterButtonAssignment: 2 531 | psp2TVDisableEmu: 0 532 | psp2AllowTwitterDialog: 1 533 | psp2Upgradable: 0 534 | psp2HealthWarning: 0 535 | psp2UseLibLocation: 0 536 | psp2InfoBarOnStartup: 0 537 | psp2InfoBarColor: 0 538 | psp2ScriptOptimizationLevel: 0 539 | splashScreenBackgroundSourceLandscape: {fileID: 0} 540 | splashScreenBackgroundSourcePortrait: {fileID: 0} 541 | spritePackerPolicy: 542 | webGLMemorySize: 256 543 | webGLExceptionSupport: 1 544 | webGLNameFilesAsHashes: 0 545 | webGLDataCaching: 0 546 | webGLDebugSymbols: 0 547 | webGLEmscriptenArgs: 548 | webGLModulesDirectory: 549 | webGLTemplate: APPLICATION:Default 550 | webGLAnalyzeBuildSize: 0 551 | webGLUseEmbeddedResources: 0 552 | webGLCompressionFormat: 1 553 | webGLLinkerTarget: 0 554 | scriptingDefineSymbols: {} 555 | platformArchitecture: {} 556 | scriptingBackend: {} 557 | il2cppCompilerConfiguration: {} 558 | incrementalIl2cppBuild: {} 559 | allowUnsafeCode: 0 560 | additionalIl2CppArgs: 561 | scriptingRuntimeVersion: 1 562 | apiCompatibilityLevelPerPlatform: {} 563 | m_RenderingPath: 1 564 | m_MobileRenderingPath: 1 565 | metroPackageName: TowerDefenseStarterKit 566 | metroPackageVersion: 567 | metroCertificatePath: 568 | metroCertificatePassword: 569 | metroCertificateSubject: 570 | metroCertificateIssuer: 571 | metroCertificateNotAfter: 0000000000000000 572 | metroApplicationDescription: TowerDefenseStarterKit 573 | wsaImages: {} 574 | metroTileShortName: 575 | metroTileShowName: 0 576 | metroMediumTileShowName: 0 577 | metroLargeTileShowName: 0 578 | metroWideTileShowName: 0 579 | metroDefaultTileSize: 1 580 | metroTileForegroundText: 2 581 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 582 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 583 | a: 1} 584 | metroSplashScreenUseBackgroundColor: 0 585 | platformCapabilities: {} 586 | metroFTAName: 587 | metroFTAFileTypes: [] 588 | metroProtocolName: 589 | metroCompilationOverrides: 1 590 | n3dsUseExtSaveData: 0 591 | n3dsCompressStaticMem: 1 592 | n3dsExtSaveDataNumber: 0x12345 593 | n3dsStackSize: 131072 594 | n3dsTargetPlatform: 2 595 | n3dsRegion: 7 596 | n3dsMediaSize: 0 597 | n3dsLogoStyle: 3 598 | n3dsTitle: GameName 599 | n3dsProductCode: 600 | n3dsApplicationId: 0xFF3FF 601 | XboxOneProductId: 602 | XboxOneUpdateKey: 603 | XboxOneSandboxId: 604 | XboxOneContentId: 605 | XboxOneTitleId: 606 | XboxOneSCId: 607 | XboxOneGameOsOverridePath: 608 | XboxOnePackagingOverridePath: 609 | XboxOneAppManifestOverridePath: 610 | XboxOneVersion: 1.0.0.0 611 | XboxOnePackageEncryption: 0 612 | XboxOnePackageUpdateGranularity: 2 613 | XboxOneDescription: 614 | XboxOneLanguage: 615 | - enus 616 | XboxOneCapability: [] 617 | XboxOneGameRating: {} 618 | XboxOneIsContentPackage: 0 619 | XboxOneEnableGPUVariability: 0 620 | XboxOneSockets: {} 621 | XboxOneSplashScreen: {fileID: 0} 622 | XboxOneAllowedProductIds: [] 623 | XboxOnePersistentLocalStorageSize: 0 624 | XboxOneXTitleMemory: 8 625 | xboxOneScriptCompiler: 0 626 | vrEditorSettings: 627 | daydream: 628 | daydreamIconForeground: {fileID: 0} 629 | daydreamIconBackground: {fileID: 0} 630 | cloudServicesEnabled: {} 631 | facebookSdkVersion: 7.9.4 632 | apiCompatibilityLevel: 2 633 | cloudProjectId: 634 | projectName: Tower Defence 635 | organizationId: 636 | cloudEnabled: 0 637 | enableNativePlatformBackendsForNewInputSystem: 0 638 | disableOldInputManagerSupport: 0 639 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.0f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 0 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 0 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 80 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 0 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: {} 178 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PlacementLayer 17 | - PlacementGhosts 18 | - Towers 19 | - GroundEnemies 20 | - FriendlyProjectiles 21 | - EnemyProjectiles 22 | - FlyingEnemies 23 | - GroundEnemyTargettingProjectiles 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.033 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.033 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Advanced Camera Controls 2 | Advanced RTS-like camera features such as zoom-to-point using RxNET 3 | 4 | # Features 5 | * Zoom in/out to a point ( mouse position in this case ) 6 | * Rotate around point of origin ( with clamping ) 7 | * Right click drag/pan that respects raycast's height ( doesn't jump when moving on uneven terrain ) 8 | * Left click for orbital rotation 9 | 10 | # Why did you make this? 11 | I've created this due to lack of proper camera controls available on the web. 12 | 13 | The "zoom-in-and-out to a point" feature is probably what you're looking for, eventhough this may seem like a simple task, it has a handful of challenges. 14 | As for orbital rotation, this one I wouldn't call it a perfect implementation but it's was also one hell of a challenge. 15 | 16 | This project is for all the poor souls who're looking for advanced control solution. Take it as an inspiration. 17 | 18 | Brought to you with ❤ by [UnityList](https://UnityList.com) 19 | --------------------------------------------------------------------------------