├── .gitignore ├── Assets ├── CameraMultiTarget.meta └── CameraMultiTarget │ ├── Documentation.meta │ ├── Documentation │ ├── README.md │ ├── README.md.meta │ ├── README.pdf │ ├── README.pdf.meta │ ├── build_readme_pdf.sh │ └── build_readme_pdf.sh.meta │ ├── Example.meta │ ├── Example │ ├── Example.meta │ ├── Example.unity │ ├── Example.unity.meta │ ├── Example │ │ ├── LightingData.asset │ │ ├── LightingData.asset.meta │ │ ├── Lightmap-0_comp_dir.png │ │ ├── Lightmap-0_comp_dir.png.meta │ │ ├── Lightmap-0_comp_light.exr │ │ └── Lightmap-0_comp_light.exr.meta │ ├── ExampleGameController.cs │ ├── ExampleGameController.cs.meta │ ├── ExampleTargetBehaviour.cs │ ├── ExampleTargetBehaviour.cs.meta │ ├── Falloff.psd │ ├── Falloff.psd.meta │ ├── ProjectorMultiply.shader │ ├── ProjectorMultiply.shader.meta │ ├── ProjectorShadow.mat │ ├── ProjectorShadow.mat.meta │ ├── Shadow.psd │ ├── Shadow.psd.meta │ ├── Target.mat │ ├── Target.mat.meta │ ├── Target.prefab │ ├── Target.prefab.meta │ ├── WallAndFloor.mat │ └── WallAndFloor.mat.meta │ ├── Library.meta │ └── Library │ ├── CameraMultiTarget.cs │ ├── CameraMultiTarget.cs.meta │ ├── PositionAndRotation.cs │ ├── PositionAndRotation.cs.meta │ ├── ProjectionHits.cs │ └── ProjectionHits.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 ├── 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 | /Assets/Plugins* 8 | 9 | # Visual Studio 2015 cache directory 10 | /.vs/ 11 | 12 | # Autogenerated Rider/VS/MD/Consulo solution and project files 13 | ExportedObj/ 14 | .consulo/ 15 | .idea/ 16 | *.csproj 17 | *.unityproj 18 | *.sln 19 | *.suo 20 | *.tmp 21 | *.user 22 | *.userprefs 23 | *.pidb 24 | *.booproj 25 | *.svd 26 | *.pdb 27 | 28 | # Unity3D generated meta files 29 | *.pidb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd0b2ed0abdf24b63a47f2c61991973d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caa135ec5ad87437a8447592afc97993 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/README.md: -------------------------------------------------------------------------------- 1 | # Dynamic Multi Target Camera for Unity 2 | 3 | Concise Unity library which dynamically keeps a set of objects (e.g. players and important objects) in view, a common problem for a wide range of games. This asset is a direct build from the source code available on [GitHub](https://github.com/lopespm/unity-camera-multi-target). 4 | 5 | More information about the library's inner workings and underlying math is available in the related [blog article](https://lopespm.github.io/libraries/games/2018/12/27/camera-multi-target.html) 6 | 7 | The library was developed for, and used by [Survival Ball](https://survivalball.com/). The game has an heavy shared screen local co-op component, which requires the camera to dynamically keep many key elements in view. 8 | 9 | 10 | ## Install 11 | 12 | Import the `CameraMultiTarget` folder into your project when installing it from the Asset Store. 13 | 14 | 15 | ## Usage 16 | 17 | Add the [`CameraMultiTarget`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs) component to a camera and then you can programatically set which game objects the camera will track via the component's [`SetTargets(GameObject[] targets)`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs#L23) method. 18 | 19 | For example, you can set the targets in your game controller component (if you choose to have one), like the following: 20 | 21 | public class ExampleGameController : MonoBehaviour 22 | { 23 | public CameraMultiTarget cameraMultiTarget; 24 | 25 | private void Start() { 26 | var targets = new List(); 27 | targets.Add(CreateTarget()); 28 | targets.Add(CreateTarget()); 29 | targets.Add(CreateTarget()); 30 | cameraMultiTarget.SetTargets(targets.ToArray()); 31 | } 32 | 33 | private GameObject CreateTarget() { 34 | GameObject target = GameObject.CreatePrimitive(PrimitiveType.Capsule); 35 | target.transform.position = Random.insideUnitSphere * 10f; 36 | return target; 37 | } 38 | } 39 | 40 | 41 | ## Example Scene 42 | 43 | An example scene of the library's usage is included in the `CameraMultiTarget/Example` folder. -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c7d388ff156245cebb1f4aa9119a5f2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Documentation/README.pdf -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/README.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22edabf7fce9448fea402de7278d112d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/build_readme_pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pandoc README.md -s -o README.pdf --variable colorlinks=true -V geometry:margin=1.3in -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Documentation/build_readme_pdf.sh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d99f648baa34d45a58ab86fa1e8a598c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4dd568b91d33a4960b633e2e81a6987b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5047e7f07c72346029c340f84c6766aa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 10 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.6117647, g: 0.62352943, b: 0.6509804, a: 1} 24 | m_AmbientEquatorColor: {r: 0.5176471, g: 0.56078434, b: 0.5882353, a: 1} 25 | m_AmbientGroundColor: {r: 0.3962264, g: 0.37940547, b: 0.3457636, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 1 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_UseRadianceAmbientProbe: 0 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 13 46 | m_BakeOnSceneLoad: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 1 55 | m_LightmapEditorSettings: 56 | serializedVersion: 12 57 | m_Resolution: 1 58 | m_BakeResolution: 5 59 | m_AtlasSize: 1024 60 | m_AO: 0 61 | m_AOMaxDistance: 1 62 | m_CompAOExponent: 1 63 | m_CompAOExponentDirect: 0 64 | m_ExtractAmbientOcclusion: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_ReflectionCompression: 2 70 | m_MixedBakeMode: 2 71 | m_BakeBackend: 0 72 | m_PVRSampling: 1 73 | m_PVRDirectSampleCount: 32 74 | m_PVRSampleCount: 500 75 | m_PVRBounces: 2 76 | m_PVREnvironmentSampleCount: 500 77 | m_PVREnvironmentReferencePointCount: 2048 78 | m_PVRFilteringMode: 2 79 | m_PVRDenoiserTypeDirect: 0 80 | m_PVRDenoiserTypeIndirect: 0 81 | m_PVRDenoiserTypeAO: 0 82 | m_PVRFilterTypeDirect: 0 83 | m_PVRFilterTypeIndirect: 0 84 | m_PVRFilterTypeAO: 0 85 | m_PVREnvironmentMIS: 0 86 | m_PVRCulling: 1 87 | m_PVRFilteringGaussRadiusDirect: 1 88 | m_PVRFilteringGaussRadiusIndirect: 1 89 | m_PVRFilteringGaussRadiusAO: 1 90 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 91 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 92 | m_PVRFilteringAtrousPositionSigmaAO: 1 93 | m_ExportTrainingData: 0 94 | m_TrainingDataDestination: TrainingData 95 | m_LightProbeSampleCountMultiplier: 4 96 | m_LightingDataAsset: {fileID: 112000010, guid: b101726490f73449cbbb4d3d3ba45e46, 97 | type: 2} 98 | m_LightingSettings: {fileID: 706465524} 99 | --- !u!196 &4 100 | NavMeshSettings: 101 | serializedVersion: 2 102 | m_ObjectHideFlags: 0 103 | m_BuildSettings: 104 | serializedVersion: 3 105 | agentTypeID: 0 106 | agentRadius: 0.5 107 | agentHeight: 2 108 | agentSlope: 45 109 | agentClimb: 0.4 110 | ledgeDropHeight: 0 111 | maxJumpAcrossDistance: 0 112 | minRegionArea: 2 113 | manualCellSize: 0 114 | cellSize: 0.16666667 115 | manualTileSize: 0 116 | tileSize: 256 117 | buildHeightMesh: 0 118 | maxJobWorkers: 0 119 | preserveTilesOutsideBounds: 0 120 | debug: 121 | m_Flags: 0 122 | m_NavMeshData: {fileID: 0} 123 | --- !u!1 &599706474 124 | GameObject: 125 | m_ObjectHideFlags: 0 126 | m_CorrespondingSourceObject: {fileID: 0} 127 | m_PrefabInstance: {fileID: 0} 128 | m_PrefabAsset: {fileID: 0} 129 | serializedVersion: 6 130 | m_Component: 131 | - component: {fileID: 599706478} 132 | - component: {fileID: 599706477} 133 | - component: {fileID: 599706475} 134 | m_Layer: 8 135 | m_Name: Wall (3) 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 4294967295 140 | m_IsActive: 1 141 | --- !u!23 &599706475 142 | MeshRenderer: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 599706474} 148 | m_Enabled: 1 149 | m_CastShadows: 1 150 | m_ReceiveShadows: 1 151 | m_DynamicOccludee: 1 152 | m_StaticShadowCaster: 0 153 | m_MotionVectors: 1 154 | m_LightProbeUsage: 1 155 | m_ReflectionProbeUsage: 1 156 | m_RayTracingMode: 2 157 | m_RayTraceProcedural: 0 158 | m_RayTracingAccelStructBuildFlagsOverride: 0 159 | m_RayTracingAccelStructBuildFlags: 1 160 | m_SmallMeshCulling: 1 161 | m_RenderingLayerMask: 4294967295 162 | m_RendererPriority: 0 163 | m_Materials: 164 | - {fileID: 2100000, guid: 9075968bae9eb4865b526d86d20c47d6, type: 2} 165 | m_StaticBatchInfo: 166 | firstSubMesh: 0 167 | subMeshCount: 0 168 | m_StaticBatchRoot: {fileID: 0} 169 | m_ProbeAnchor: {fileID: 0} 170 | m_LightProbeVolumeOverride: {fileID: 0} 171 | m_ScaleInLightmap: 1 172 | m_ReceiveGI: 1 173 | m_PreserveUVs: 1 174 | m_IgnoreNormalsForChartDetection: 0 175 | m_ImportantGI: 0 176 | m_StitchLightmapSeams: 0 177 | m_SelectedEditorRenderState: 3 178 | m_MinimumChartSize: 4 179 | m_AutoUVMaxDistance: 0.5 180 | m_AutoUVMaxAngle: 89 181 | m_LightmapParameters: {fileID: 0} 182 | m_SortingLayerID: 0 183 | m_SortingLayer: 0 184 | m_SortingOrder: 0 185 | m_AdditionalVertexStreams: {fileID: 0} 186 | --- !u!33 &599706477 187 | MeshFilter: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | m_GameObject: {fileID: 599706474} 193 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 194 | --- !u!4 &599706478 195 | Transform: 196 | m_ObjectHideFlags: 0 197 | m_CorrespondingSourceObject: {fileID: 0} 198 | m_PrefabInstance: {fileID: 0} 199 | m_PrefabAsset: {fileID: 0} 200 | m_GameObject: {fileID: 599706474} 201 | serializedVersion: 2 202 | m_LocalRotation: {x: -0.5, y: 0.5, z: 0.5, w: 0.5} 203 | m_LocalPosition: {x: 15, y: 15, z: 0} 204 | m_LocalScale: {x: 3, y: 1, z: 3} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_LocalEulerAnglesHint: {x: -90.00001, y: 0, z: 90} 209 | --- !u!850595691 &706465524 210 | LightingSettings: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInstance: {fileID: 0} 214 | m_PrefabAsset: {fileID: 0} 215 | m_Name: Settings.lighting 216 | serializedVersion: 9 217 | m_EnableBakedLightmaps: 1 218 | m_EnableRealtimeLightmaps: 1 219 | m_RealtimeEnvironmentLighting: 1 220 | m_BounceScale: 1 221 | m_AlbedoBoost: 1 222 | m_IndirectOutputScale: 1 223 | m_UsingShadowmask: 1 224 | m_BakeBackend: 2 225 | m_LightmapMaxSize: 1024 226 | m_LightmapSizeFixed: 0 227 | m_UseMipmapLimits: 1 228 | m_BakeResolution: 5 229 | m_Padding: 2 230 | m_LightmapCompression: 3 231 | m_AO: 0 232 | m_AOMaxDistance: 1 233 | m_CompAOExponent: 1 234 | m_CompAOExponentDirect: 0 235 | m_ExtractAO: 0 236 | m_MixedBakeMode: 2 237 | m_LightmapsBakeMode: 1 238 | m_FilterMode: 1 239 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 240 | m_ExportTrainingData: 0 241 | m_EnableWorkerProcessBaking: 1 242 | m_TrainingDataDestination: TrainingData 243 | m_RealtimeResolution: 1 244 | m_ForceWhiteAlbedo: 0 245 | m_ForceUpdates: 0 246 | m_PVRCulling: 1 247 | m_PVRSampling: 1 248 | m_PVRDirectSampleCount: 32 249 | m_PVRSampleCount: 512 250 | m_PVREnvironmentSampleCount: 512 251 | m_PVREnvironmentReferencePointCount: 2048 252 | m_LightProbeSampleCountMultiplier: 4 253 | m_PVRBounces: 2 254 | m_PVRMinBounces: 2 255 | m_PVREnvironmentImportanceSampling: 0 256 | m_PVRFilteringMode: 2 257 | m_PVRDenoiserTypeDirect: 0 258 | m_PVRDenoiserTypeIndirect: 0 259 | m_PVRDenoiserTypeAO: 0 260 | m_PVRFilterTypeDirect: 0 261 | m_PVRFilterTypeIndirect: 0 262 | m_PVRFilterTypeAO: 0 263 | m_PVRFilteringGaussRadiusDirect: 1 264 | m_PVRFilteringGaussRadiusIndirect: 1 265 | m_PVRFilteringGaussRadiusAO: 1 266 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 267 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 268 | m_PVRFilteringAtrousPositionSigmaAO: 1 269 | m_RespectSceneVisibilityWhenBakingGI: 0 270 | --- !u!1 &1207268060 271 | GameObject: 272 | m_ObjectHideFlags: 0 273 | m_CorrespondingSourceObject: {fileID: 0} 274 | m_PrefabInstance: {fileID: 0} 275 | m_PrefabAsset: {fileID: 0} 276 | serializedVersion: 6 277 | m_Component: 278 | - component: {fileID: 1207268062} 279 | - component: {fileID: 1207268061} 280 | m_Layer: 0 281 | m_Name: Point Light 282 | m_TagString: Untagged 283 | m_Icon: {fileID: 0} 284 | m_NavMeshLayer: 0 285 | m_StaticEditorFlags: 0 286 | m_IsActive: 1 287 | --- !u!108 &1207268061 288 | Light: 289 | m_ObjectHideFlags: 0 290 | m_CorrespondingSourceObject: {fileID: 0} 291 | m_PrefabInstance: {fileID: 0} 292 | m_PrefabAsset: {fileID: 0} 293 | m_GameObject: {fileID: 1207268060} 294 | m_Enabled: 1 295 | serializedVersion: 11 296 | m_Type: 2 297 | m_Color: {r: 1, g: 1, b: 1, a: 1} 298 | m_Intensity: 12.6 299 | m_Range: 10.65 300 | m_SpotAngle: 30 301 | m_InnerSpotAngle: 21.802082 302 | m_CookieSize: 10 303 | m_Shadows: 304 | m_Type: 2 305 | m_Resolution: -1 306 | m_CustomResolution: -1 307 | m_Strength: 1 308 | m_Bias: 0.05 309 | m_NormalBias: 0.4 310 | m_NearPlane: 0.2 311 | m_CullingMatrixOverride: 312 | e00: 1 313 | e01: 0 314 | e02: 0 315 | e03: 0 316 | e10: 0 317 | e11: 1 318 | e12: 0 319 | e13: 0 320 | e20: 0 321 | e21: 0 322 | e22: 1 323 | e23: 0 324 | e30: 0 325 | e31: 0 326 | e32: 0 327 | e33: 1 328 | m_UseCullingMatrixOverride: 0 329 | m_Cookie: {fileID: 0} 330 | m_DrawHalo: 0 331 | m_Flare: {fileID: 0} 332 | m_RenderMode: 0 333 | m_CullingMask: 334 | serializedVersion: 2 335 | m_Bits: 4294967295 336 | m_RenderingLayerMask: 1 337 | m_Lightmapping: 4 338 | m_LightShadowCasterMode: 0 339 | m_AreaSize: {x: 1, y: 1} 340 | m_BounceIntensity: 1 341 | m_ColorTemperature: 6570 342 | m_UseColorTemperature: 0 343 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 344 | m_UseBoundingSphereOverride: 0 345 | m_UseViewFrustumForShadowCasterCull: 1 346 | m_ForceVisible: 0 347 | m_ShadowRadius: 0 348 | m_ShadowAngle: 0 349 | m_LightUnit: 1 350 | m_LuxAtDistance: 1 351 | m_EnableSpotReflector: 1 352 | --- !u!4 &1207268062 353 | Transform: 354 | m_ObjectHideFlags: 0 355 | m_CorrespondingSourceObject: {fileID: 0} 356 | m_PrefabInstance: {fileID: 0} 357 | m_PrefabAsset: {fileID: 0} 358 | m_GameObject: {fileID: 1207268060} 359 | serializedVersion: 2 360 | m_LocalRotation: {x: 0.3013666, y: -0.2632404, z: 0.08695651, w: 0.91231644} 361 | m_LocalPosition: {x: 0, y: 10.7, z: 0} 362 | m_LocalScale: {x: 1, y: 1, z: 1} 363 | m_ConstrainProportionsScale: 0 364 | m_Children: [] 365 | m_Father: {fileID: 0} 366 | m_LocalEulerAnglesHint: {x: 36.56, y: -32.19, z: 0} 367 | --- !u!1 &1375375166 368 | GameObject: 369 | m_ObjectHideFlags: 0 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInstance: {fileID: 0} 372 | m_PrefabAsset: {fileID: 0} 373 | serializedVersion: 6 374 | m_Component: 375 | - component: {fileID: 1375375169} 376 | - component: {fileID: 1375375168} 377 | - component: {fileID: 1375375167} 378 | m_Layer: 8 379 | m_Name: Wall (4) 380 | m_TagString: Untagged 381 | m_Icon: {fileID: 0} 382 | m_NavMeshLayer: 0 383 | m_StaticEditorFlags: 4294967295 384 | m_IsActive: 1 385 | --- !u!23 &1375375167 386 | MeshRenderer: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | m_GameObject: {fileID: 1375375166} 392 | m_Enabled: 1 393 | m_CastShadows: 1 394 | m_ReceiveShadows: 1 395 | m_DynamicOccludee: 1 396 | m_StaticShadowCaster: 0 397 | m_MotionVectors: 1 398 | m_LightProbeUsage: 1 399 | m_ReflectionProbeUsage: 1 400 | m_RayTracingMode: 2 401 | m_RayTraceProcedural: 0 402 | m_RayTracingAccelStructBuildFlagsOverride: 0 403 | m_RayTracingAccelStructBuildFlags: 1 404 | m_SmallMeshCulling: 1 405 | m_RenderingLayerMask: 4294967295 406 | m_RendererPriority: 0 407 | m_Materials: 408 | - {fileID: 2100000, guid: 9075968bae9eb4865b526d86d20c47d6, type: 2} 409 | m_StaticBatchInfo: 410 | firstSubMesh: 0 411 | subMeshCount: 0 412 | m_StaticBatchRoot: {fileID: 0} 413 | m_ProbeAnchor: {fileID: 0} 414 | m_LightProbeVolumeOverride: {fileID: 0} 415 | m_ScaleInLightmap: 1 416 | m_ReceiveGI: 1 417 | m_PreserveUVs: 1 418 | m_IgnoreNormalsForChartDetection: 0 419 | m_ImportantGI: 0 420 | m_StitchLightmapSeams: 0 421 | m_SelectedEditorRenderState: 3 422 | m_MinimumChartSize: 4 423 | m_AutoUVMaxDistance: 0.5 424 | m_AutoUVMaxAngle: 89 425 | m_LightmapParameters: {fileID: 0} 426 | m_SortingLayerID: 0 427 | m_SortingLayer: 0 428 | m_SortingOrder: 0 429 | m_AdditionalVertexStreams: {fileID: 0} 430 | --- !u!33 &1375375168 431 | MeshFilter: 432 | m_ObjectHideFlags: 0 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInstance: {fileID: 0} 435 | m_PrefabAsset: {fileID: 0} 436 | m_GameObject: {fileID: 1375375166} 437 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 438 | --- !u!4 &1375375169 439 | Transform: 440 | m_ObjectHideFlags: 0 441 | m_CorrespondingSourceObject: {fileID: 0} 442 | m_PrefabInstance: {fileID: 0} 443 | m_PrefabAsset: {fileID: 0} 444 | m_GameObject: {fileID: 1375375166} 445 | serializedVersion: 2 446 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 447 | m_LocalPosition: {x: 0, y: 15, z: -15} 448 | m_LocalScale: {x: 3, y: 1, z: 3} 449 | m_ConstrainProportionsScale: 0 450 | m_Children: [] 451 | m_Father: {fileID: 0} 452 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 453 | --- !u!1 &1434645517 454 | GameObject: 455 | m_ObjectHideFlags: 0 456 | m_CorrespondingSourceObject: {fileID: 0} 457 | m_PrefabInstance: {fileID: 0} 458 | m_PrefabAsset: {fileID: 0} 459 | serializedVersion: 6 460 | m_Component: 461 | - component: {fileID: 1434645521} 462 | - component: {fileID: 1434645520} 463 | - component: {fileID: 1434645518} 464 | m_Layer: 8 465 | m_Name: Floor 466 | m_TagString: Untagged 467 | m_Icon: {fileID: 0} 468 | m_NavMeshLayer: 0 469 | m_StaticEditorFlags: 4294967295 470 | m_IsActive: 1 471 | --- !u!23 &1434645518 472 | MeshRenderer: 473 | m_ObjectHideFlags: 0 474 | m_CorrespondingSourceObject: {fileID: 0} 475 | m_PrefabInstance: {fileID: 0} 476 | m_PrefabAsset: {fileID: 0} 477 | m_GameObject: {fileID: 1434645517} 478 | m_Enabled: 1 479 | m_CastShadows: 1 480 | m_ReceiveShadows: 1 481 | m_DynamicOccludee: 1 482 | m_StaticShadowCaster: 0 483 | m_MotionVectors: 1 484 | m_LightProbeUsage: 1 485 | m_ReflectionProbeUsage: 1 486 | m_RayTracingMode: 2 487 | m_RayTraceProcedural: 0 488 | m_RayTracingAccelStructBuildFlagsOverride: 0 489 | m_RayTracingAccelStructBuildFlags: 1 490 | m_SmallMeshCulling: 1 491 | m_RenderingLayerMask: 4294967295 492 | m_RendererPriority: 0 493 | m_Materials: 494 | - {fileID: 2100000, guid: 9075968bae9eb4865b526d86d20c47d6, type: 2} 495 | m_StaticBatchInfo: 496 | firstSubMesh: 0 497 | subMeshCount: 0 498 | m_StaticBatchRoot: {fileID: 0} 499 | m_ProbeAnchor: {fileID: 0} 500 | m_LightProbeVolumeOverride: {fileID: 0} 501 | m_ScaleInLightmap: 1 502 | m_ReceiveGI: 1 503 | m_PreserveUVs: 1 504 | m_IgnoreNormalsForChartDetection: 0 505 | m_ImportantGI: 0 506 | m_StitchLightmapSeams: 0 507 | m_SelectedEditorRenderState: 3 508 | m_MinimumChartSize: 4 509 | m_AutoUVMaxDistance: 0.5 510 | m_AutoUVMaxAngle: 89 511 | m_LightmapParameters: {fileID: 0} 512 | m_SortingLayerID: 0 513 | m_SortingLayer: 0 514 | m_SortingOrder: 0 515 | m_AdditionalVertexStreams: {fileID: 0} 516 | --- !u!33 &1434645520 517 | MeshFilter: 518 | m_ObjectHideFlags: 0 519 | m_CorrespondingSourceObject: {fileID: 0} 520 | m_PrefabInstance: {fileID: 0} 521 | m_PrefabAsset: {fileID: 0} 522 | m_GameObject: {fileID: 1434645517} 523 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 524 | --- !u!4 &1434645521 525 | Transform: 526 | m_ObjectHideFlags: 0 527 | m_CorrespondingSourceObject: {fileID: 0} 528 | m_PrefabInstance: {fileID: 0} 529 | m_PrefabAsset: {fileID: 0} 530 | m_GameObject: {fileID: 1434645517} 531 | serializedVersion: 2 532 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 533 | m_LocalPosition: {x: 0, y: 0, z: 0} 534 | m_LocalScale: {x: 3, y: 1, z: 3} 535 | m_ConstrainProportionsScale: 0 536 | m_Children: [] 537 | m_Father: {fileID: 0} 538 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 539 | --- !u!1 &1590760091 540 | GameObject: 541 | m_ObjectHideFlags: 0 542 | m_CorrespondingSourceObject: {fileID: 0} 543 | m_PrefabInstance: {fileID: 0} 544 | m_PrefabAsset: {fileID: 0} 545 | serializedVersion: 6 546 | m_Component: 547 | - component: {fileID: 1590760093} 548 | - component: {fileID: 1590760092} 549 | m_Layer: 0 550 | m_Name: GameController 551 | m_TagString: Untagged 552 | m_Icon: {fileID: 0} 553 | m_NavMeshLayer: 0 554 | m_StaticEditorFlags: 0 555 | m_IsActive: 1 556 | --- !u!114 &1590760092 557 | MonoBehaviour: 558 | m_ObjectHideFlags: 0 559 | m_CorrespondingSourceObject: {fileID: 0} 560 | m_PrefabInstance: {fileID: 0} 561 | m_PrefabAsset: {fileID: 0} 562 | m_GameObject: {fileID: 1590760091} 563 | m_Enabled: 1 564 | m_EditorHideFlags: 0 565 | m_Script: {fileID: 11500000, guid: 28d98bd43e3a40db8c403baf3eb41807, type: 3} 566 | m_Name: 567 | m_EditorClassIdentifier: 568 | cameraMultiTarget: {fileID: 2003839737} 569 | targetPrefab: {fileID: 1003045879115920, guid: c4817e45167484db9875a2460a29a382, 570 | type: 3} 571 | --- !u!4 &1590760093 572 | Transform: 573 | m_ObjectHideFlags: 0 574 | m_CorrespondingSourceObject: {fileID: 0} 575 | m_PrefabInstance: {fileID: 0} 576 | m_PrefabAsset: {fileID: 0} 577 | m_GameObject: {fileID: 1590760091} 578 | serializedVersion: 2 579 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 580 | m_LocalPosition: {x: -2.3652344, y: -1.5954754, z: -2.3033698} 581 | m_LocalScale: {x: 1, y: 1, z: 1} 582 | m_ConstrainProportionsScale: 0 583 | m_Children: [] 584 | m_Father: {fileID: 0} 585 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 586 | --- !u!1 &1625996466 587 | GameObject: 588 | m_ObjectHideFlags: 0 589 | m_CorrespondingSourceObject: {fileID: 0} 590 | m_PrefabInstance: {fileID: 0} 591 | m_PrefabAsset: {fileID: 0} 592 | serializedVersion: 6 593 | m_Component: 594 | - component: {fileID: 1625996470} 595 | - component: {fileID: 1625996469} 596 | - component: {fileID: 1625996467} 597 | m_Layer: 8 598 | m_Name: Wall (1) 599 | m_TagString: Untagged 600 | m_Icon: {fileID: 0} 601 | m_NavMeshLayer: 0 602 | m_StaticEditorFlags: 4294967295 603 | m_IsActive: 1 604 | --- !u!23 &1625996467 605 | MeshRenderer: 606 | m_ObjectHideFlags: 0 607 | m_CorrespondingSourceObject: {fileID: 0} 608 | m_PrefabInstance: {fileID: 0} 609 | m_PrefabAsset: {fileID: 0} 610 | m_GameObject: {fileID: 1625996466} 611 | m_Enabled: 1 612 | m_CastShadows: 1 613 | m_ReceiveShadows: 1 614 | m_DynamicOccludee: 1 615 | m_StaticShadowCaster: 0 616 | m_MotionVectors: 1 617 | m_LightProbeUsage: 1 618 | m_ReflectionProbeUsage: 1 619 | m_RayTracingMode: 2 620 | m_RayTraceProcedural: 0 621 | m_RayTracingAccelStructBuildFlagsOverride: 0 622 | m_RayTracingAccelStructBuildFlags: 1 623 | m_SmallMeshCulling: 1 624 | m_RenderingLayerMask: 4294967295 625 | m_RendererPriority: 0 626 | m_Materials: 627 | - {fileID: 2100000, guid: 9075968bae9eb4865b526d86d20c47d6, type: 2} 628 | m_StaticBatchInfo: 629 | firstSubMesh: 0 630 | subMeshCount: 0 631 | m_StaticBatchRoot: {fileID: 0} 632 | m_ProbeAnchor: {fileID: 0} 633 | m_LightProbeVolumeOverride: {fileID: 0} 634 | m_ScaleInLightmap: 1 635 | m_ReceiveGI: 1 636 | m_PreserveUVs: 1 637 | m_IgnoreNormalsForChartDetection: 0 638 | m_ImportantGI: 0 639 | m_StitchLightmapSeams: 0 640 | m_SelectedEditorRenderState: 3 641 | m_MinimumChartSize: 4 642 | m_AutoUVMaxDistance: 0.5 643 | m_AutoUVMaxAngle: 89 644 | m_LightmapParameters: {fileID: 0} 645 | m_SortingLayerID: 0 646 | m_SortingLayer: 0 647 | m_SortingOrder: 0 648 | m_AdditionalVertexStreams: {fileID: 0} 649 | --- !u!33 &1625996469 650 | MeshFilter: 651 | m_ObjectHideFlags: 0 652 | m_CorrespondingSourceObject: {fileID: 0} 653 | m_PrefabInstance: {fileID: 0} 654 | m_PrefabAsset: {fileID: 0} 655 | m_GameObject: {fileID: 1625996466} 656 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 657 | --- !u!4 &1625996470 658 | Transform: 659 | m_ObjectHideFlags: 0 660 | m_CorrespondingSourceObject: {fileID: 0} 661 | m_PrefabInstance: {fileID: 0} 662 | m_PrefabAsset: {fileID: 0} 663 | m_GameObject: {fileID: 1625996466} 664 | serializedVersion: 2 665 | m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} 666 | m_LocalPosition: {x: 0, y: 15, z: 15} 667 | m_LocalScale: {x: 3, y: 1, z: 3} 668 | m_ConstrainProportionsScale: 0 669 | m_Children: [] 670 | m_Father: {fileID: 0} 671 | m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} 672 | --- !u!1 &2003839736 673 | GameObject: 674 | m_ObjectHideFlags: 0 675 | m_CorrespondingSourceObject: {fileID: 0} 676 | m_PrefabInstance: {fileID: 0} 677 | m_PrefabAsset: {fileID: 0} 678 | serializedVersion: 6 679 | m_Component: 680 | - component: {fileID: 2003839742} 681 | - component: {fileID: 2003839741} 682 | - component: {fileID: 2003839737} 683 | m_Layer: 0 684 | m_Name: Main Camera 685 | m_TagString: MainCamera 686 | m_Icon: {fileID: 0} 687 | m_NavMeshLayer: 0 688 | m_StaticEditorFlags: 0 689 | m_IsActive: 1 690 | --- !u!114 &2003839737 691 | MonoBehaviour: 692 | m_ObjectHideFlags: 0 693 | m_CorrespondingSourceObject: {fileID: 0} 694 | m_PrefabInstance: {fileID: 0} 695 | m_PrefabAsset: {fileID: 0} 696 | m_GameObject: {fileID: 2003839736} 697 | m_Enabled: 1 698 | m_EditorHideFlags: 0 699 | m_Script: {fileID: 11500000, guid: 0e863d8a08e474307802eaf34f998943, type: 3} 700 | m_Name: 701 | m_EditorClassIdentifier: 702 | Pitch: 30 703 | Yaw: 0 704 | Roll: 0 705 | PaddingLeft: 5 706 | PaddingRight: 5 707 | PaddingUp: 5 708 | PaddingDown: 5 709 | MoveSmoothTime: 0.19 710 | --- !u!20 &2003839741 711 | Camera: 712 | m_ObjectHideFlags: 0 713 | m_CorrespondingSourceObject: {fileID: 0} 714 | m_PrefabInstance: {fileID: 0} 715 | m_PrefabAsset: {fileID: 0} 716 | m_GameObject: {fileID: 2003839736} 717 | m_Enabled: 1 718 | serializedVersion: 2 719 | m_ClearFlags: 1 720 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 721 | m_projectionMatrixMode: 1 722 | m_GateFitMode: 2 723 | m_FOVAxisMode: 0 724 | m_Iso: 200 725 | m_ShutterSpeed: 0.005 726 | m_Aperture: 16 727 | m_FocusDistance: 10 728 | m_FocalLength: 50 729 | m_BladeCount: 5 730 | m_Curvature: {x: 2, y: 11} 731 | m_BarrelClipping: 0.25 732 | m_Anamorphism: 0 733 | m_SensorSize: {x: 36, y: 24} 734 | m_LensShift: {x: 0, y: 0} 735 | m_NormalizedViewPortRect: 736 | serializedVersion: 2 737 | x: 0 738 | y: 0 739 | width: 1 740 | height: 1 741 | near clip plane: 0.3 742 | far clip plane: 1000 743 | field of view: 60 744 | orthographic: 0 745 | orthographic size: 5 746 | m_Depth: -1 747 | m_CullingMask: 748 | serializedVersion: 2 749 | m_Bits: 4294967295 750 | m_RenderingPath: -1 751 | m_TargetTexture: {fileID: 0} 752 | m_TargetDisplay: 0 753 | m_TargetEye: 3 754 | m_HDR: 1 755 | m_AllowMSAA: 1 756 | m_AllowDynamicResolution: 0 757 | m_ForceIntoRT: 0 758 | m_OcclusionCulling: 1 759 | m_StereoConvergence: 10 760 | m_StereoSeparation: 0.022 761 | --- !u!4 &2003839742 762 | Transform: 763 | m_ObjectHideFlags: 0 764 | m_CorrespondingSourceObject: {fileID: 0} 765 | m_PrefabInstance: {fileID: 0} 766 | m_PrefabAsset: {fileID: 0} 767 | m_GameObject: {fileID: 2003839736} 768 | serializedVersion: 2 769 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 770 | m_LocalPosition: {x: 0, y: 1, z: -10} 771 | m_LocalScale: {x: 1, y: 1, z: 1} 772 | m_ConstrainProportionsScale: 0 773 | m_Children: [] 774 | m_Father: {fileID: 0} 775 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 776 | --- !u!1 &2020113441 777 | GameObject: 778 | m_ObjectHideFlags: 0 779 | m_CorrespondingSourceObject: {fileID: 0} 780 | m_PrefabInstance: {fileID: 0} 781 | m_PrefabAsset: {fileID: 0} 782 | serializedVersion: 6 783 | m_Component: 784 | - component: {fileID: 2020113443} 785 | - component: {fileID: 2020113442} 786 | m_Layer: 0 787 | m_Name: Area Light 788 | m_TagString: Untagged 789 | m_Icon: {fileID: 0} 790 | m_NavMeshLayer: 0 791 | m_StaticEditorFlags: 0 792 | m_IsActive: 1 793 | --- !u!108 &2020113442 794 | Light: 795 | m_ObjectHideFlags: 0 796 | m_CorrespondingSourceObject: {fileID: 0} 797 | m_PrefabInstance: {fileID: 0} 798 | m_PrefabAsset: {fileID: 0} 799 | m_GameObject: {fileID: 2020113441} 800 | m_Enabled: 1 801 | serializedVersion: 11 802 | m_Type: 3 803 | m_Color: {r: 1, g: 1, b: 1, a: 1} 804 | m_Intensity: 1 805 | m_Range: 211.73846 806 | m_SpotAngle: 30 807 | m_InnerSpotAngle: 21.802082 808 | m_CookieSize: 10 809 | m_Shadows: 810 | m_Type: 2 811 | m_Resolution: -1 812 | m_CustomResolution: -1 813 | m_Strength: 1 814 | m_Bias: 0.05 815 | m_NormalBias: 0.4 816 | m_NearPlane: 0.2 817 | m_CullingMatrixOverride: 818 | e00: 1 819 | e01: 0 820 | e02: 0 821 | e03: 0 822 | e10: 0 823 | e11: 1 824 | e12: 0 825 | e13: 0 826 | e20: 0 827 | e21: 0 828 | e22: 1 829 | e23: 0 830 | e30: 0 831 | e31: 0 832 | e32: 0 833 | e33: 1 834 | m_UseCullingMatrixOverride: 0 835 | m_Cookie: {fileID: 0} 836 | m_DrawHalo: 0 837 | m_Flare: {fileID: 0} 838 | m_RenderMode: 0 839 | m_CullingMask: 840 | serializedVersion: 2 841 | m_Bits: 4294967295 842 | m_RenderingLayerMask: 1 843 | m_Lightmapping: 2 844 | m_LightShadowCasterMode: 0 845 | m_AreaSize: {x: 29.974846, y: 30.019484} 846 | m_BounceIntensity: 1 847 | m_ColorTemperature: 6570 848 | m_UseColorTemperature: 0 849 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 850 | m_UseBoundingSphereOverride: 0 851 | m_UseViewFrustumForShadowCasterCull: 1 852 | m_ForceVisible: 0 853 | m_ShadowRadius: 0 854 | m_ShadowAngle: 0 855 | m_LightUnit: 1 856 | m_LuxAtDistance: 1 857 | m_EnableSpotReflector: 1 858 | --- !u!4 &2020113443 859 | Transform: 860 | m_ObjectHideFlags: 0 861 | m_CorrespondingSourceObject: {fileID: 0} 862 | m_PrefabInstance: {fileID: 0} 863 | m_PrefabAsset: {fileID: 0} 864 | m_GameObject: {fileID: 2020113441} 865 | serializedVersion: 2 866 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 867 | m_LocalPosition: {x: 0, y: 27.33, z: 0} 868 | m_LocalScale: {x: 1, y: 1, z: 1} 869 | m_ConstrainProportionsScale: 0 870 | m_Children: [] 871 | m_Father: {fileID: 0} 872 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 873 | --- !u!1 &2053780606 874 | GameObject: 875 | m_ObjectHideFlags: 0 876 | m_CorrespondingSourceObject: {fileID: 0} 877 | m_PrefabInstance: {fileID: 0} 878 | m_PrefabAsset: {fileID: 0} 879 | serializedVersion: 6 880 | m_Component: 881 | - component: {fileID: 2053780610} 882 | - component: {fileID: 2053780609} 883 | - component: {fileID: 2053780607} 884 | m_Layer: 8 885 | m_Name: Wall (2) 886 | m_TagString: Untagged 887 | m_Icon: {fileID: 0} 888 | m_NavMeshLayer: 0 889 | m_StaticEditorFlags: 4294967295 890 | m_IsActive: 1 891 | --- !u!23 &2053780607 892 | MeshRenderer: 893 | m_ObjectHideFlags: 0 894 | m_CorrespondingSourceObject: {fileID: 0} 895 | m_PrefabInstance: {fileID: 0} 896 | m_PrefabAsset: {fileID: 0} 897 | m_GameObject: {fileID: 2053780606} 898 | m_Enabled: 1 899 | m_CastShadows: 1 900 | m_ReceiveShadows: 1 901 | m_DynamicOccludee: 1 902 | m_StaticShadowCaster: 0 903 | m_MotionVectors: 1 904 | m_LightProbeUsage: 1 905 | m_ReflectionProbeUsage: 1 906 | m_RayTracingMode: 2 907 | m_RayTraceProcedural: 0 908 | m_RayTracingAccelStructBuildFlagsOverride: 0 909 | m_RayTracingAccelStructBuildFlags: 1 910 | m_SmallMeshCulling: 1 911 | m_RenderingLayerMask: 4294967295 912 | m_RendererPriority: 0 913 | m_Materials: 914 | - {fileID: 2100000, guid: 9075968bae9eb4865b526d86d20c47d6, type: 2} 915 | m_StaticBatchInfo: 916 | firstSubMesh: 0 917 | subMeshCount: 0 918 | m_StaticBatchRoot: {fileID: 0} 919 | m_ProbeAnchor: {fileID: 0} 920 | m_LightProbeVolumeOverride: {fileID: 0} 921 | m_ScaleInLightmap: 1 922 | m_ReceiveGI: 1 923 | m_PreserveUVs: 1 924 | m_IgnoreNormalsForChartDetection: 0 925 | m_ImportantGI: 0 926 | m_StitchLightmapSeams: 0 927 | m_SelectedEditorRenderState: 3 928 | m_MinimumChartSize: 4 929 | m_AutoUVMaxDistance: 0.5 930 | m_AutoUVMaxAngle: 89 931 | m_LightmapParameters: {fileID: 0} 932 | m_SortingLayerID: 0 933 | m_SortingLayer: 0 934 | m_SortingOrder: 0 935 | m_AdditionalVertexStreams: {fileID: 0} 936 | --- !u!33 &2053780609 937 | MeshFilter: 938 | m_ObjectHideFlags: 0 939 | m_CorrespondingSourceObject: {fileID: 0} 940 | m_PrefabInstance: {fileID: 0} 941 | m_PrefabAsset: {fileID: 0} 942 | m_GameObject: {fileID: 2053780606} 943 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 944 | --- !u!4 &2053780610 945 | Transform: 946 | m_ObjectHideFlags: 0 947 | m_CorrespondingSourceObject: {fileID: 0} 948 | m_PrefabInstance: {fileID: 0} 949 | m_PrefabAsset: {fileID: 0} 950 | m_GameObject: {fileID: 2053780606} 951 | serializedVersion: 2 952 | m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5} 953 | m_LocalPosition: {x: -15, y: 15, z: 0} 954 | m_LocalScale: {x: 3, y: 1, z: 3} 955 | m_ConstrainProportionsScale: 0 956 | m_Children: [] 957 | m_Father: {fileID: 0} 958 | m_LocalEulerAnglesHint: {x: -90.00001, y: 0, z: -90} 959 | --- !u!1660057539 &9223372036854775807 960 | SceneRoots: 961 | m_ObjectHideFlags: 0 962 | m_Roots: 963 | - {fileID: 1590760093} 964 | - {fileID: 2003839742} 965 | - {fileID: 1207268062} 966 | - {fileID: 2020113443} 967 | - {fileID: 1434645521} 968 | - {fileID: 1625996470} 969 | - {fileID: 2053780610} 970 | - {fileID: 599706478} 971 | - {fileID: 1375375169} 972 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f66fcb35fb01404b8d6f9e02644dce7 3 | timeCreated: 1505551789 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/LightingData.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Example/Example/LightingData.asset -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/LightingData.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b101726490f73449cbbb4d3d3ba45e46 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 25800000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_dir.png -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_dir.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d872f9ee24cb34f6f95d3022d53cc292 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 5 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 1 33 | aniso: 3 34 | mipBias: 0 35 | wrapU: 1 36 | wrapV: 1 37 | wrapW: 1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | singleChannelComponent: 0 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - serializedVersion: 2 60 | buildTarget: DefaultTexturePlatform 61 | maxTextureSize: 2048 62 | resizeAlgorithm: 0 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | androidETC2FallbackOverride: 0 70 | spriteSheet: 71 | serializedVersion: 2 72 | sprites: [] 73 | outline: [] 74 | physicsShape: [] 75 | bones: [] 76 | spriteID: 77 | vertices: [] 78 | indices: 79 | edges: [] 80 | weights: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_light.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_light.exr -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Example/Lightmap-0_comp_light.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 992fbfebdbe964b8f834234250513199 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 5 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 1 33 | aniso: 3 34 | mipBias: 0 35 | wrapU: 1 36 | wrapV: 1 37 | wrapW: 1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 0 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 6 53 | textureShape: 1 54 | singleChannelComponent: 0 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - serializedVersion: 2 60 | buildTarget: DefaultTexturePlatform 61 | maxTextureSize: 2048 62 | resizeAlgorithm: 0 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | androidETC2FallbackOverride: 0 70 | spriteSheet: 71 | serializedVersion: 2 72 | sprites: [] 73 | outline: [] 74 | physicsShape: [] 75 | bones: [] 76 | spriteID: 77 | vertices: [] 78 | indices: 79 | edges: [] 80 | weights: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ExampleGameController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | 6 | namespace Rockbyte.CMT.Examples.ExampleCameraMultiTarget 7 | { 8 | public class ExampleGameController : MonoBehaviour 9 | { 10 | public CameraMultiTarget cameraMultiTarget; 11 | public GameObject targetPrefab; 12 | 13 | private IEnumerator Start() 14 | { 15 | var numberOfTargets = 3; 16 | var targets = new List(numberOfTargets); 17 | targets.Add(CreateTarget()); 18 | cameraMultiTarget.SetTargets(targets.ToArray()); 19 | foreach (var _ in Enumerable.Range(0, numberOfTargets - targets.Count)) 20 | { 21 | yield return new WaitForSeconds(5.0f); 22 | targets.Add(CreateTarget()); 23 | cameraMultiTarget.SetTargets(targets.ToArray()); 24 | } 25 | yield return null; 26 | } 27 | 28 | private GameObject CreateTarget() 29 | { 30 | GameObject target = GameObject.Instantiate(targetPrefab); 31 | target.AddComponent(); 32 | return target; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ExampleGameController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28d98bd43e3a40db8c403baf3eb41807 3 | timeCreated: 1543597054 -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ExampleTargetBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace Rockbyte.CMT.Examples.ExampleCameraMultiTarget 5 | { 6 | public class ExampleTargetBehaviour : MonoBehaviour 7 | { 8 | private static readonly Vector3 MinPosition = new Vector3(-10f, 1f, -10f); 9 | private static readonly Vector3 MaxPosition = new Vector3(10f, 4f, 10f); 10 | 11 | private Vector3 destinationPosition; 12 | 13 | private void Awake() 14 | { 15 | transform.position = new Vector3(0f, 1.5f, 0f); 16 | destinationPosition = transform.position; 17 | } 18 | 19 | private IEnumerator Start() 20 | { 21 | for (int i = 0; i < 100; i++) 22 | { 23 | yield return new WaitForSeconds(5.0f); 24 | destinationPosition = GetRandomPosition(); 25 | } 26 | } 27 | 28 | private void Update() 29 | { 30 | transform.position = Vector3.Lerp(transform.position, destinationPosition, Time.deltaTime); 31 | } 32 | 33 | private static Vector3 GetRandomPosition() 34 | { 35 | var randomPosition = new Vector3( 36 | Random.Range(MinPosition.x, MaxPosition.x), 37 | Random.Range(MinPosition.y, MaxPosition.y), 38 | Random.Range(MinPosition.z, MaxPosition.y)); 39 | return randomPosition; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ExampleTargetBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3242b4be3784d438d95be3b4d215818 3 | timeCreated: 1543602921 -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Falloff.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Example/Falloff.psd -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Falloff.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23740055e2b119e40a939138ab8070f8 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 1 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 1 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 256 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 5 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ProjectorMultiply.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced '_Projector' with 'unity_Projector' 2 | // Upgrade NOTE: replaced '_ProjectorClip' with 'unity_ProjectorClip' 3 | 4 | Shader "Projector/Multiply" { 5 | Properties { 6 | _ShadowTex ("Cookie", 2D) = "gray" {} 7 | _FalloffTex ("FallOff", 2D) = "white" {} 8 | } 9 | Subshader { 10 | Tags {"Queue"="Transparent"} 11 | Pass { 12 | ZWrite Off 13 | ColorMask RGB 14 | Blend DstColor Zero 15 | Offset -1, -1 16 | 17 | CGPROGRAM 18 | #pragma vertex vert 19 | #pragma fragment frag 20 | #pragma multi_compile_fog 21 | #include "UnityCG.cginc" 22 | 23 | struct v2f { 24 | float4 uvShadow : TEXCOORD0; 25 | float4 uvFalloff : TEXCOORD1; 26 | UNITY_FOG_COORDS(2) 27 | float4 pos : SV_POSITION; 28 | }; 29 | 30 | float4x4 unity_Projector; 31 | float4x4 unity_ProjectorClip; 32 | 33 | v2f vert (float4 vertex : POSITION) 34 | { 35 | v2f o; 36 | o.pos = UnityObjectToClipPos(vertex); 37 | o.uvShadow = mul (unity_Projector, vertex); 38 | o.uvFalloff = mul (unity_ProjectorClip, vertex); 39 | UNITY_TRANSFER_FOG(o,o.pos); 40 | return o; 41 | } 42 | 43 | sampler2D _ShadowTex; 44 | sampler2D _FalloffTex; 45 | 46 | fixed4 frag (v2f i) : SV_Target 47 | { 48 | fixed4 texS = tex2Dproj (_ShadowTex, UNITY_PROJ_COORD(i.uvShadow)); 49 | texS.a = 1.0-texS.a; 50 | 51 | fixed4 texF = tex2Dproj (_FalloffTex, UNITY_PROJ_COORD(i.uvFalloff)); 52 | fixed4 res = lerp(fixed4(1,1,1,0), texS, texF.a); 53 | 54 | UNITY_APPLY_FOG_COLOR(i.fogCoord, res, fixed4(1,1,1,1)); 55 | return res; 56 | } 57 | ENDCG 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ProjectorMultiply.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01a668cc78047034a8a0c5ca2d24c6f7 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ProjectorShadow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: ProjectorShadow 10 | m_Shader: {fileID: 4800000, guid: 01a668cc78047034a8a0c5ca2d24c6f7, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpTex: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _CombineTex: 26 | m_Texture: {fileID: 2800000, guid: 92b0a732ad112a541100162a44295342, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _FalloffTex: 30 | m_Texture: {fileID: 2800000, guid: 23740055e2b119e40a939138ab8070f8, type: 3} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _HiliteTex: 34 | m_Texture: {fileID: 2800000, guid: f7a0a732ad112a541100162a44295342, type: 3} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _MainTex: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _ShadowTex: 42 | m_Texture: {fileID: 2800000, guid: 68386fc9897223346a683105b4dc1662, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | m_Floats: [] 46 | m_Colors: 47 | - BumpMapScale: {r: 1, g: 1, b: 1, a: 1} 48 | - _Color: {r: 1, g: 1, b: 1, a: 1} 49 | - _ProjectorClip_0: {r: -0.015438232, g: -0.025866693, b: 0.14460614, a: 0.29360974} 50 | - _ProjectorClip_1: {r: 0.0047582523, g: 0.14523815, b: 0.026487738, a: 0.0030641258} 51 | - _ProjectorClip_2: {r: -0.015438232, g: -0.025866693, b: 0.14460614, a: 0.29360974} 52 | - _ProjectorClip_3: {r: 0, g: 0, b: 0, a: 1} 53 | - _ProjectorDistance_0: {r: -0.015213515, g: -0.02549018, b: 0.14250126, a: 0.30389196} 54 | - _ProjectorDistance_1: {r: 0.0046889912, g: 0.14312407, b: 0.026102185, a: 0.017575443} 55 | - _ProjectorDistance_2: {r: -0.015213515, g: -0.02549018, b: 0.14250126, a: 0.30389196} 56 | - _ProjectorDistance_3: {r: 0, g: 0, b: 0, a: 1} 57 | - _Projector_0: {r: 1.6710045, g: -0.17472492, b: 0.6578766, a: 1.0662117} 58 | - _Projector_1: {r: -0.0014375485, g: 1.4636691, b: 0.77239656, a: 1.2343576} 59 | - _Projector_2: {r: -0.107604526, g: -0.18029094, b: 1.0079052, a: 1.9464619} 60 | - _Projector_3: {r: -0.10451689, g: -0.17511761, b: 0.9789842, a: 2.0877385} 61 | - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 62 | --- !u!1002 &2100001 63 | EditorExtensionImpl: 64 | serializedVersion: 6 65 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/ProjectorShadow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e30ff3588e719f34bbf0c66f22d97487 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Shadow.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lopespm/unity-camera-multi-target/d39ac32224a02e29e4354232e5ad945e1b92ad80/Assets/CameraMultiTarget/Example/Shadow.psd -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Shadow.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68386fc9897223346a683105b4dc1662 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 1 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 1 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -3 28 | maxTextureSize: 64 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 5 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Target.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Target 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 0, b: 0, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Target.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baabbc844c89d4a85969f5a03019178e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Target.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1003045879115920} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1003045879115920 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4961229339514374} 22 | - component: {fileID: 33535386833282962} 23 | - component: {fileID: 23523561258098810} 24 | - component: {fileID: 119572182301007332} 25 | m_Layer: 0 26 | m_Name: Target 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!4 &4961229339514374 33 | Transform: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 1003045879115920} 38 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} 39 | m_LocalPosition: {x: 0, y: 1.5, z: 0} 40 | m_LocalScale: {x: 1, y: 1, z: 1} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} 45 | --- !u!23 &23523561258098810 46 | MeshRenderer: 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1003045879115920} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RenderingLayerMask: 4294967295 59 | m_Materials: 60 | - {fileID: 2100000, guid: baabbc844c89d4a85969f5a03019178e, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 1 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_StitchLightmapSeams: 0 72 | m_SelectedEditorRenderState: 3 73 | m_MinimumChartSize: 4 74 | m_AutoUVMaxDistance: 0.5 75 | m_AutoUVMaxAngle: 89 76 | m_LightmapParameters: {fileID: 0} 77 | m_SortingLayerID: 0 78 | m_SortingLayer: 0 79 | m_SortingOrder: 0 80 | --- !u!33 &33535386833282962 81 | MeshFilter: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1003045879115920} 86 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 87 | --- !u!119 &119572182301007332 88 | Projector: 89 | m_ObjectHideFlags: 1 90 | m_PrefabParentObject: {fileID: 0} 91 | m_PrefabInternal: {fileID: 100100000} 92 | m_GameObject: {fileID: 1003045879115920} 93 | m_Enabled: 1 94 | serializedVersion: 2 95 | m_NearClipPlane: 0.1 96 | m_FarClipPlane: 16.06 97 | m_FieldOfView: 23.5 98 | m_AspectRatio: 1 99 | m_Orthographic: 1 100 | m_OrthographicSize: 0.82 101 | m_Material: {fileID: 2100000, guid: e30ff3588e719f34bbf0c66f22d97487, type: 2} 102 | m_IgnoreLayers: 103 | serializedVersion: 2 104 | m_Bits: 0 105 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/Target.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4817e45167484db9875a2460a29a382 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/WallAndFloor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: WallAndFloor 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 5, y: 5} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0} 43 | m_Scale: {x: 5, y: 5} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 0 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Example/WallAndFloor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9075968bae9eb4865b526d86d20c47d6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7f3d434b56a45c58c4d66a94e466368 3 | timeCreated: 1543597158 -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/CameraMultiTarget.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine; 4 | 5 | namespace Rockbyte.CMT 6 | { 7 | public class CameraMultiTarget : MonoBehaviour 8 | { 9 | public float Pitch; 10 | public float Yaw; 11 | public float Roll; 12 | public float PaddingLeft; 13 | public float PaddingRight; 14 | public float PaddingUp; 15 | public float PaddingDown; 16 | public float MoveSmoothTime = 0.19f; 17 | 18 | private Camera _camera; 19 | private GameObject[] _targets = new GameObject[0]; 20 | private DebugProjection _debugProjection; 21 | private Vector3 _velocity = Vector3.zero; 22 | 23 | enum DebugProjection { DISABLE, IDENTITY, ROTATED } 24 | enum ProjectionEdgeHits { TOP_BOTTOM, LEFT_RIGHT } 25 | 26 | public void SetTargets(GameObject[] targets) 27 | { 28 | _targets = targets; 29 | } 30 | 31 | private void Awake() 32 | { 33 | _camera = gameObject.GetComponent(); 34 | _debugProjection = DebugProjection.ROTATED; 35 | } 36 | 37 | private void LateUpdate() 38 | { 39 | if (_targets.Length == 0) 40 | return; 41 | 42 | var targetPositionAndRotation = TargetPositionAndRotation(_targets); 43 | transform.position = Vector3.SmoothDamp(transform.position, targetPositionAndRotation.Position, ref _velocity, MoveSmoothTime); 44 | transform.rotation = targetPositionAndRotation.Rotation; 45 | } 46 | 47 | PositionAndRotation TargetPositionAndRotation(GameObject[] targets) 48 | { 49 | float halfVerticalFovRad = (_camera.fieldOfView * Mathf.Deg2Rad) / 2f; 50 | float halfHorizontalFovRad = Mathf.Atan(Mathf.Tan(halfVerticalFovRad) * _camera.aspect); 51 | 52 | var rotation = Quaternion.Euler(Pitch, Yaw, Roll); 53 | var inverseRotation = Quaternion.Inverse(rotation); 54 | 55 | var targetsRotatedToCameraIdentity = targets.Select(target => inverseRotation * target.transform.position).ToArray(); 56 | 57 | float furthestPointDistanceFromCamera = targetsRotatedToCameraIdentity.Max(target => target.z); 58 | float projectionPlaneZ = furthestPointDistanceFromCamera + 3f; 59 | 60 | ProjectionHits viewProjectionLeftAndRightEdgeHits = 61 | ViewProjectionEdgeHits(targetsRotatedToCameraIdentity, ProjectionEdgeHits.LEFT_RIGHT, projectionPlaneZ, halfHorizontalFovRad).AddPadding(PaddingRight, PaddingLeft); 62 | ProjectionHits viewProjectionTopAndBottomEdgeHits = 63 | ViewProjectionEdgeHits(targetsRotatedToCameraIdentity, ProjectionEdgeHits.TOP_BOTTOM, projectionPlaneZ, halfVerticalFovRad).AddPadding(PaddingUp, PaddingDown); 64 | 65 | var requiredCameraPerpedicularDistanceFromProjectionPlane = 66 | Mathf.Max( 67 | RequiredCameraPerpedicularDistanceFromProjectionPlane(viewProjectionTopAndBottomEdgeHits, halfVerticalFovRad), 68 | RequiredCameraPerpedicularDistanceFromProjectionPlane(viewProjectionLeftAndRightEdgeHits, halfHorizontalFovRad) 69 | ); 70 | 71 | Vector3 cameraPositionIdentity = new Vector3( 72 | (viewProjectionLeftAndRightEdgeHits.Max + viewProjectionLeftAndRightEdgeHits.Min) / 2f, 73 | (viewProjectionTopAndBottomEdgeHits.Max + viewProjectionTopAndBottomEdgeHits.Min) / 2f, 74 | projectionPlaneZ - requiredCameraPerpedicularDistanceFromProjectionPlane); 75 | 76 | DebugDrawProjectionRays(cameraPositionIdentity, 77 | viewProjectionLeftAndRightEdgeHits, 78 | viewProjectionTopAndBottomEdgeHits, 79 | requiredCameraPerpedicularDistanceFromProjectionPlane, 80 | targetsRotatedToCameraIdentity, 81 | projectionPlaneZ, 82 | halfHorizontalFovRad, 83 | halfVerticalFovRad); 84 | 85 | return new PositionAndRotation(rotation * cameraPositionIdentity, rotation); 86 | } 87 | 88 | private static float RequiredCameraPerpedicularDistanceFromProjectionPlane(ProjectionHits viewProjectionEdgeHits, float halfFovRad) 89 | { 90 | float distanceBetweenEdgeProjectionHits = viewProjectionEdgeHits.Max - viewProjectionEdgeHits.Min; 91 | return (distanceBetweenEdgeProjectionHits / 2f) / Mathf.Tan(halfFovRad); 92 | } 93 | 94 | private ProjectionHits ViewProjectionEdgeHits(IEnumerable targetsRotatedToCameraIdentity, ProjectionEdgeHits alongAxis, float projectionPlaneZ, float halfFovRad) 95 | { 96 | float[] projectionHits = targetsRotatedToCameraIdentity 97 | .SelectMany(target => TargetProjectionHits(target, alongAxis, projectionPlaneZ, halfFovRad)) 98 | .ToArray(); 99 | return new ProjectionHits(projectionHits.Max(), projectionHits.Min()); 100 | } 101 | 102 | private float[] TargetProjectionHits(Vector3 target, ProjectionEdgeHits alongAxis, float projectionPlaneDistance, float halfFovRad) 103 | { 104 | float distanceFromProjectionPlane = projectionPlaneDistance - target.z; 105 | float projectionHalfSpan = Mathf.Tan(halfFovRad) * distanceFromProjectionPlane; 106 | 107 | if (alongAxis == ProjectionEdgeHits.LEFT_RIGHT) 108 | { 109 | return new[] { target.x + projectionHalfSpan, target.x - projectionHalfSpan }; 110 | } 111 | else 112 | { 113 | return new[] { target.y + projectionHalfSpan, target.y - projectionHalfSpan }; 114 | } 115 | 116 | } 117 | 118 | private void DebugDrawProjectionRays(Vector3 cameraPositionIdentity, ProjectionHits viewProjectionLeftAndRightEdgeHits, 119 | ProjectionHits viewProjectionTopAndBottomEdgeHits, float requiredCameraPerpedicularDistanceFromProjectionPlane, 120 | IEnumerable targetsRotatedToCameraIdentity, float projectionPlaneZ, float halfHorizontalFovRad, 121 | float halfVerticalFovRad) 122 | { 123 | 124 | if (_debugProjection == DebugProjection.DISABLE) 125 | return; 126 | 127 | DebugDrawProjectionRay( 128 | cameraPositionIdentity, 129 | new Vector3((viewProjectionLeftAndRightEdgeHits.Max - viewProjectionLeftAndRightEdgeHits.Min) / 2f, 130 | (viewProjectionTopAndBottomEdgeHits.Max - viewProjectionTopAndBottomEdgeHits.Min) / 2f, 131 | requiredCameraPerpedicularDistanceFromProjectionPlane), new Color32(31, 119, 180, 255)); 132 | DebugDrawProjectionRay( 133 | cameraPositionIdentity, 134 | new Vector3((viewProjectionLeftAndRightEdgeHits.Max - viewProjectionLeftAndRightEdgeHits.Min) / 2f, 135 | -(viewProjectionTopAndBottomEdgeHits.Max - viewProjectionTopAndBottomEdgeHits.Min) / 2f, 136 | requiredCameraPerpedicularDistanceFromProjectionPlane), new Color32(31, 119, 180, 255)); 137 | DebugDrawProjectionRay( 138 | cameraPositionIdentity, 139 | new Vector3(-(viewProjectionLeftAndRightEdgeHits.Max - viewProjectionLeftAndRightEdgeHits.Min) / 2f, 140 | (viewProjectionTopAndBottomEdgeHits.Max - viewProjectionTopAndBottomEdgeHits.Min) / 2f, 141 | requiredCameraPerpedicularDistanceFromProjectionPlane), new Color32(31, 119, 180, 255)); 142 | DebugDrawProjectionRay( 143 | cameraPositionIdentity, 144 | new Vector3(-(viewProjectionLeftAndRightEdgeHits.Max - viewProjectionLeftAndRightEdgeHits.Min) / 2f, 145 | -(viewProjectionTopAndBottomEdgeHits.Max - viewProjectionTopAndBottomEdgeHits.Min) / 2f, 146 | requiredCameraPerpedicularDistanceFromProjectionPlane), new Color32(31, 119, 180, 255)); 147 | 148 | foreach (var target in targetsRotatedToCameraIdentity) 149 | { 150 | float distanceFromProjectionPlane = projectionPlaneZ - target.z; 151 | float halfHorizontalProjectionVolumeCircumcircleDiameter = Mathf.Sin(Mathf.PI - ((Mathf.PI / 2f) + halfHorizontalFovRad)) / (distanceFromProjectionPlane); 152 | float projectionHalfHorizontalSpan = Mathf.Sin(halfHorizontalFovRad) / halfHorizontalProjectionVolumeCircumcircleDiameter; 153 | float halfVerticalProjectionVolumeCircumcircleDiameter = Mathf.Sin(Mathf.PI - ((Mathf.PI / 2f) + halfVerticalFovRad)) / (distanceFromProjectionPlane); 154 | float projectionHalfVerticalSpan = Mathf.Sin(halfVerticalFovRad) / halfVerticalProjectionVolumeCircumcircleDiameter; 155 | 156 | DebugDrawProjectionRay(target, 157 | new Vector3(projectionHalfHorizontalSpan, 0f, distanceFromProjectionPlane), 158 | new Color32(214, 39, 40, 255)); 159 | DebugDrawProjectionRay(target, 160 | new Vector3(-projectionHalfHorizontalSpan, 0f, distanceFromProjectionPlane), 161 | new Color32(214, 39, 40, 255)); 162 | DebugDrawProjectionRay(target, 163 | new Vector3(0f, projectionHalfVerticalSpan, distanceFromProjectionPlane), 164 | new Color32(214, 39, 40, 255)); 165 | DebugDrawProjectionRay(target, 166 | new Vector3(0f, -projectionHalfVerticalSpan, distanceFromProjectionPlane), 167 | new Color32(214, 39, 40, 255)); 168 | } 169 | } 170 | 171 | private void DebugDrawProjectionRay(Vector3 start, Vector3 direction, Color color) 172 | { 173 | Quaternion rotation = _debugProjection == DebugProjection.IDENTITY ? Quaternion.identity : transform.rotation; 174 | Debug.DrawRay(rotation * start, rotation * direction, color); 175 | } 176 | 177 | } 178 | } -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/CameraMultiTarget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e863d8a08e474307802eaf34f998943 3 | timeCreated: 1505551690 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/PositionAndRotation.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Rockbyte.CMT 4 | { 5 | class PositionAndRotation 6 | { 7 | public Vector3 Position { get; private set; } 8 | public Quaternion Rotation { get; private set; } 9 | 10 | public PositionAndRotation(Vector3 position, Quaternion rotation) 11 | { 12 | Position = position; 13 | Rotation = rotation; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/PositionAndRotation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d87bb695f2db49a4a13a3054bc1a2d9c 3 | timeCreated: 1505761206 -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/ProjectionHits.cs: -------------------------------------------------------------------------------- 1 | namespace Rockbyte.CMT 2 | { 3 | class ProjectionHits 4 | { 5 | public float Max { get; private set; } 6 | public float Min { get; private set; } 7 | 8 | public ProjectionHits(float max, float min) 9 | { 10 | Min = min; 11 | Max = max; 12 | } 13 | 14 | public ProjectionHits AddPadding(float paddingToMax, float paddingToMin) 15 | { 16 | return new ProjectionHits(Max + paddingToMax, Min - paddingToMin); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/CameraMultiTarget/Library/ProjectionHits.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23767a5046224a00a1e350c8ed270050 3 | timeCreated: 1505761176 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2019 Pedro Lopes 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /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: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 0 14 | m_EtcTextureFastCompressor: 2 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 5 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /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 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /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: 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: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 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 | - Humanoid 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/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_AlwaysShowColliders: 0 28 | m_ShowColliderSleep: 1 29 | m_ShowColliderContacts: 0 30 | m_ShowColliderAABB: 0 31 | m_ContactArrowScale: 0.2 32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: c74e687358768442bb1164499e89d997 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Rockbyte 16 | productName: Camera Multi Target 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 | tizenShowActivityIndicatorOnLoading: -1 56 | iosAppInBackgroundBehavior: 0 57 | displayResolutionDialog: 1 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidBlitType: 0 68 | defaultIsNativeResolution: 1 69 | macRetinaSupport: 1 70 | runInBackground: 1 71 | captureSingleScreen: 0 72 | muteOtherAudioSources: 0 73 | Prepare IOS For Recording: 0 74 | Force IOS Speakers When Recording: 0 75 | deferSystemGesturesMode: 0 76 | hideHomeButton: 0 77 | submitAnalytics: 1 78 | usePlayerLog: 1 79 | bakeCollisionMeshes: 0 80 | forceSingleInstance: 0 81 | resizableWindow: 0 82 | useMacAppStoreValidation: 0 83 | macAppStoreCategory: public.app-category.camera 84 | gpuSkinning: 0 85 | graphicsJobs: 0 86 | xboxPIXTextureCapture: 0 87 | xboxEnableAvatar: 0 88 | xboxEnableKinect: 0 89 | xboxEnableKinectAutoTracking: 0 90 | xboxEnableFitness: 0 91 | visibleInBackground: 1 92 | allowFullscreenSwitch: 1 93 | graphicsJobMode: 0 94 | fullscreenMode: 2 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | n3dsDisableStereoscopicView: 0 101 | n3dsEnableSharedListOpt: 1 102 | n3dsEnableVSync: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | videoMemoryForVertexBuffers: 0 112 | psp2PowerMode: 0 113 | psp2AcquireBGM: 1 114 | m_SupportedAspectRatios: 115 | 4:3: 1 116 | 5:4: 1 117 | 16:10: 1 118 | 16:9: 1 119 | Others: 1 120 | bundleVersion: 1.2 121 | preloadedAssets: [] 122 | metroInputSource: 0 123 | wsaTransparentSwapchain: 0 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | enableVideoLayer: 0 135 | useProtectedVideoMemory: 0 136 | minimumSupportedHeadTracking: 0 137 | maximumSupportedHeadTracking: 1 138 | hololens: 139 | depthFormat: 1 140 | depthBufferSharingEnabled: 0 141 | enable360StereoCapture: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | protectGraphicsMemory: 0 146 | useHDRDisplay: 0 147 | m_ColorGamuts: 00000000 148 | targetPixelDensity: 30 149 | resolutionScalingMode: 0 150 | androidSupportedAspectRatio: 1 151 | androidMaxAspectRatio: 2.1 152 | applicationIdentifier: 153 | Standalone: com.rockbyte.cameramultitarget 154 | buildNumber: {} 155 | AndroidBundleVersionCode: 1 156 | AndroidMinSdkVersion: 16 157 | AndroidTargetSdkVersion: 0 158 | AndroidPreferredInstallLocation: 1 159 | aotOptions: 160 | stripEngineCode: 1 161 | iPhoneStrippingLevel: 0 162 | iPhoneScriptCallOptimization: 0 163 | ForceInternetPermission: 0 164 | ForceSDCardPermission: 0 165 | CreateWallpaper: 0 166 | APKExpansionFiles: 0 167 | keepLoadedShadersAlive: 0 168 | StripUnusedMeshComponents: 0 169 | VertexChannelCompressionMask: 214 170 | iPhoneSdkVersion: 988 171 | iOSTargetOSVersionString: 8.0 172 | tvOSSdkVersion: 0 173 | tvOSRequireExtendedGameController: 0 174 | tvOSTargetOSVersionString: 9.0 175 | uIPrerenderedIcon: 0 176 | uIRequiresPersistentWiFi: 0 177 | uIRequiresFullScreen: 1 178 | uIStatusBarHidden: 1 179 | uIExitOnSuspend: 0 180 | uIStatusBarStyle: 0 181 | iPhoneSplashScreen: {fileID: 0} 182 | iPhoneHighResSplashScreen: {fileID: 0} 183 | iPhoneTallHighResSplashScreen: {fileID: 0} 184 | iPhone47inSplashScreen: {fileID: 0} 185 | iPhone55inPortraitSplashScreen: {fileID: 0} 186 | iPhone55inLandscapeSplashScreen: {fileID: 0} 187 | iPhone58inPortraitSplashScreen: {fileID: 0} 188 | iPhone58inLandscapeSplashScreen: {fileID: 0} 189 | iPadPortraitSplashScreen: {fileID: 0} 190 | iPadHighResPortraitSplashScreen: {fileID: 0} 191 | iPadLandscapeSplashScreen: {fileID: 0} 192 | iPadHighResLandscapeSplashScreen: {fileID: 0} 193 | appleTVSplashScreen: {fileID: 0} 194 | appleTVSplashScreen2x: {fileID: 0} 195 | tvOSSmallIconLayers: [] 196 | tvOSSmallIconLayers2x: [] 197 | tvOSLargeIconLayers: [] 198 | tvOSLargeIconLayers2x: [] 199 | tvOSTopShelfImageLayers: [] 200 | tvOSTopShelfImageLayers2x: [] 201 | tvOSTopShelfImageWideLayers: [] 202 | tvOSTopShelfImageWideLayers2x: [] 203 | iOSLaunchScreenType: 0 204 | iOSLaunchScreenPortrait: {fileID: 0} 205 | iOSLaunchScreenLandscape: {fileID: 0} 206 | iOSLaunchScreenBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreenFillPct: 100 210 | iOSLaunchScreenSize: 100 211 | iOSLaunchScreenCustomXibPath: 212 | iOSLaunchScreeniPadType: 0 213 | iOSLaunchScreeniPadImage: {fileID: 0} 214 | iOSLaunchScreeniPadBackgroundColor: 215 | serializedVersion: 2 216 | rgba: 0 217 | iOSLaunchScreeniPadFillPct: 100 218 | iOSLaunchScreeniPadSize: 100 219 | iOSLaunchScreeniPadCustomXibPath: 220 | iOSUseLaunchScreenStoryboard: 0 221 | iOSLaunchScreenCustomStoryboardPath: 222 | iOSDeviceRequirements: [] 223 | iOSURLSchemes: [] 224 | iOSBackgroundModes: 0 225 | iOSMetalForceHardShadows: 0 226 | metalEditorSupport: 0 227 | metalAPIValidation: 1 228 | iOSRenderExtraFrameOnPause: 0 229 | appleDeveloperTeamID: 230 | iOSManualSigningProvisioningProfileID: 231 | tvOSManualSigningProvisioningProfileID: 232 | iOSManualSigningProvisioningProfileType: 0 233 | tvOSManualSigningProvisioningProfileType: 0 234 | appleEnableAutomaticSigning: 0 235 | iOSRequireARKit: 0 236 | appleEnableProMotion: 0 237 | clonedFromGUID: 00000000000000000000000000000000 238 | templatePackageId: 239 | templateDefaultScene: 240 | AndroidTargetArchitectures: 5 241 | AndroidSplashScreenScale: 0 242 | androidSplashScreen: {fileID: 0} 243 | AndroidKeystoreName: 244 | AndroidKeyaliasName: 245 | AndroidTVCompatibility: 1 246 | AndroidIsGame: 1 247 | AndroidEnableTango: 0 248 | androidEnableBanner: 1 249 | androidUseLowAccuracyLocation: 0 250 | m_AndroidBanners: 251 | - width: 320 252 | height: 180 253 | banner: {fileID: 0} 254 | androidGamepadSupportLevel: 0 255 | resolutionDialogBanner: {fileID: 0} 256 | m_BuildTargetIcons: [] 257 | m_BuildTargetPlatformIcons: [] 258 | m_BuildTargetBatching: [] 259 | m_BuildTargetGraphicsAPIs: [] 260 | m_BuildTargetVRSettings: [] 261 | m_BuildTargetEnableVuforiaSettings: [] 262 | openGLRequireES31: 0 263 | openGLRequireES31AEP: 0 264 | m_TemplateCustomTags: {} 265 | mobileMTRendering: 266 | Android: 1 267 | iPhone: 1 268 | tvOS: 1 269 | m_BuildTargetGroupLightmapEncodingQuality: 270 | - m_BuildTarget: Standalone 271 | m_EncodingQuality: 1 272 | - m_BuildTarget: XboxOne 273 | m_EncodingQuality: 1 274 | - m_BuildTarget: PS4 275 | m_EncodingQuality: 1 276 | playModeTestRunnerEnabled: 0 277 | runPlayModeTestAsEditModeTest: 0 278 | actionOnDotNetUnhandledException: 1 279 | enableInternalProfiler: 0 280 | logObjCUncaughtExceptions: 1 281 | enableCrashReportAPI: 0 282 | cameraUsageDescription: 283 | locationUsageDescription: 284 | microphoneUsageDescription: 285 | switchNetLibKey: 286 | switchSocketMemoryPoolSize: 6144 287 | switchSocketAllocatorPoolSize: 128 288 | switchSocketConcurrencyLimit: 14 289 | switchScreenResolutionBehavior: 2 290 | switchUseCPUProfiler: 0 291 | switchApplicationID: 0x01004b9000490000 292 | switchNSODependencies: 293 | switchTitleNames_0: 294 | switchTitleNames_1: 295 | switchTitleNames_2: 296 | switchTitleNames_3: 297 | switchTitleNames_4: 298 | switchTitleNames_5: 299 | switchTitleNames_6: 300 | switchTitleNames_7: 301 | switchTitleNames_8: 302 | switchTitleNames_9: 303 | switchTitleNames_10: 304 | switchTitleNames_11: 305 | switchTitleNames_12: 306 | switchTitleNames_13: 307 | switchTitleNames_14: 308 | switchPublisherNames_0: 309 | switchPublisherNames_1: 310 | switchPublisherNames_2: 311 | switchPublisherNames_3: 312 | switchPublisherNames_4: 313 | switchPublisherNames_5: 314 | switchPublisherNames_6: 315 | switchPublisherNames_7: 316 | switchPublisherNames_8: 317 | switchPublisherNames_9: 318 | switchPublisherNames_10: 319 | switchPublisherNames_11: 320 | switchPublisherNames_12: 321 | switchPublisherNames_13: 322 | switchPublisherNames_14: 323 | switchIcons_0: {fileID: 0} 324 | switchIcons_1: {fileID: 0} 325 | switchIcons_2: {fileID: 0} 326 | switchIcons_3: {fileID: 0} 327 | switchIcons_4: {fileID: 0} 328 | switchIcons_5: {fileID: 0} 329 | switchIcons_6: {fileID: 0} 330 | switchIcons_7: {fileID: 0} 331 | switchIcons_8: {fileID: 0} 332 | switchIcons_9: {fileID: 0} 333 | switchIcons_10: {fileID: 0} 334 | switchIcons_11: {fileID: 0} 335 | switchIcons_12: {fileID: 0} 336 | switchIcons_13: {fileID: 0} 337 | switchIcons_14: {fileID: 0} 338 | switchSmallIcons_0: {fileID: 0} 339 | switchSmallIcons_1: {fileID: 0} 340 | switchSmallIcons_2: {fileID: 0} 341 | switchSmallIcons_3: {fileID: 0} 342 | switchSmallIcons_4: {fileID: 0} 343 | switchSmallIcons_5: {fileID: 0} 344 | switchSmallIcons_6: {fileID: 0} 345 | switchSmallIcons_7: {fileID: 0} 346 | switchSmallIcons_8: {fileID: 0} 347 | switchSmallIcons_9: {fileID: 0} 348 | switchSmallIcons_10: {fileID: 0} 349 | switchSmallIcons_11: {fileID: 0} 350 | switchSmallIcons_12: {fileID: 0} 351 | switchSmallIcons_13: {fileID: 0} 352 | switchSmallIcons_14: {fileID: 0} 353 | switchManualHTML: 354 | switchAccessibleURLs: 355 | switchLegalInformation: 356 | switchMainThreadStackSize: 1048576 357 | switchPresenceGroupId: 358 | switchLogoHandling: 0 359 | switchReleaseVersion: 0 360 | switchDisplayVersion: 1.0.0 361 | switchStartupUserAccount: 0 362 | switchTouchScreenUsage: 0 363 | switchSupportedLanguagesMask: 0 364 | switchLogoType: 0 365 | switchApplicationErrorCodeCategory: 366 | switchUserAccountSaveDataSize: 0 367 | switchUserAccountSaveDataJournalSize: 0 368 | switchApplicationAttribute: 0 369 | switchCardSpecSize: -1 370 | switchCardSpecClock: -1 371 | switchRatingsMask: 0 372 | switchRatingsInt_0: 0 373 | switchRatingsInt_1: 0 374 | switchRatingsInt_2: 0 375 | switchRatingsInt_3: 0 376 | switchRatingsInt_4: 0 377 | switchRatingsInt_5: 0 378 | switchRatingsInt_6: 0 379 | switchRatingsInt_7: 0 380 | switchRatingsInt_8: 0 381 | switchRatingsInt_9: 0 382 | switchRatingsInt_10: 0 383 | switchRatingsInt_11: 0 384 | switchLocalCommunicationIds_0: 385 | switchLocalCommunicationIds_1: 386 | switchLocalCommunicationIds_2: 387 | switchLocalCommunicationIds_3: 388 | switchLocalCommunicationIds_4: 389 | switchLocalCommunicationIds_5: 390 | switchLocalCommunicationIds_6: 391 | switchLocalCommunicationIds_7: 392 | switchParentalControl: 0 393 | switchAllowsScreenshot: 1 394 | switchAllowsVideoCapturing: 1 395 | switchAllowsRuntimeAddOnContentInstall: 0 396 | switchDataLossConfirmation: 0 397 | switchSupportedNpadStyles: 3 398 | switchNativeFsCacheSize: 32 399 | switchSocketConfigEnabled: 0 400 | switchTcpInitialSendBufferSize: 32 401 | switchTcpInitialReceiveBufferSize: 64 402 | switchTcpAutoSendBufferSizeMax: 256 403 | switchTcpAutoReceiveBufferSizeMax: 256 404 | switchUdpSendBufferSize: 9 405 | switchUdpReceiveBufferSize: 42 406 | switchSocketBufferEfficiency: 4 407 | switchSocketInitializeEnabled: 1 408 | switchNetworkInterfaceManagerInitializeEnabled: 1 409 | switchPlayerConnectionEnabled: 1 410 | ps4NPAgeRating: 12 411 | ps4NPTitleSecret: 412 | ps4NPTrophyPackPath: 413 | ps4ParentalLevel: 11 414 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 415 | ps4Category: 0 416 | ps4MasterVersion: 01.00 417 | ps4AppVersion: 01.00 418 | ps4AppType: 0 419 | ps4ParamSfxPath: 420 | ps4VideoOutPixelFormat: 0 421 | ps4VideoOutInitialWidth: 1920 422 | ps4VideoOutBaseModeInitialWidth: 1920 423 | ps4VideoOutReprojectionRate: 120 424 | ps4PronunciationXMLPath: 425 | ps4PronunciationSIGPath: 426 | ps4BackgroundImagePath: 427 | ps4StartupImagePath: 428 | ps4StartupImagesFolder: 429 | ps4IconImagesFolder: 430 | ps4SaveDataImagePath: 431 | ps4SdkOverride: 432 | ps4BGMPath: 433 | ps4ShareFilePath: 434 | ps4ShareOverlayImagePath: 435 | ps4PrivacyGuardImagePath: 436 | ps4NPtitleDatPath: 437 | ps4RemotePlayKeyAssignment: -1 438 | ps4RemotePlayKeyMappingDir: 439 | ps4PlayTogetherPlayerCount: 0 440 | ps4EnterButtonAssignment: 1 441 | ps4ApplicationParam1: 0 442 | ps4ApplicationParam2: 0 443 | ps4ApplicationParam3: 0 444 | ps4ApplicationParam4: 0 445 | ps4DownloadDataSize: 0 446 | ps4GarlicHeapSize: 2048 447 | ps4ProGarlicHeapSize: 2560 448 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 449 | ps4pnSessions: 1 450 | ps4pnPresence: 1 451 | ps4pnFriends: 1 452 | ps4pnGameCustomData: 1 453 | playerPrefsSupport: 0 454 | enableApplicationExit: 0 455 | restrictedAudioUsageRights: 0 456 | ps4UseResolutionFallback: 0 457 | ps4ReprojectionSupport: 0 458 | ps4UseAudio3dBackend: 0 459 | ps4SocialScreenEnabled: 0 460 | ps4ScriptOptimizationLevel: 0 461 | ps4Audio3dVirtualSpeakerCount: 14 462 | ps4attribCpuUsage: 0 463 | ps4PatchPkgPath: 464 | ps4PatchLatestPkgPath: 465 | ps4PatchChangeinfoPath: 466 | ps4PatchDayOne: 0 467 | ps4attribUserManagement: 0 468 | ps4attribMoveSupport: 0 469 | ps4attrib3DSupport: 0 470 | ps4attribShareSupport: 0 471 | ps4attribExclusiveVR: 0 472 | ps4disableAutoHideSplash: 0 473 | ps4videoRecordingFeaturesUsed: 0 474 | ps4contentSearchFeaturesUsed: 0 475 | ps4attribEyeToEyeDistanceSettingVR: 0 476 | ps4IncludedModules: [] 477 | monoEnv: 478 | psp2Splashimage: {fileID: 0} 479 | psp2NPTrophyPackPath: 480 | psp2NPSupportGBMorGJP: 0 481 | psp2NPAgeRating: 12 482 | psp2NPTitleDatPath: 483 | psp2NPCommsID: 484 | psp2NPCommunicationsID: 485 | psp2NPCommsPassphrase: 486 | psp2NPCommsSig: 487 | psp2ParamSfxPath: 488 | psp2ManualPath: 489 | psp2LiveAreaGatePath: 490 | psp2LiveAreaBackroundPath: 491 | psp2LiveAreaPath: 492 | psp2LiveAreaTrialPath: 493 | psp2PatchChangeInfoPath: 494 | psp2PatchOriginalPackage: 495 | psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi 496 | psp2KeystoneFile: 497 | psp2MemoryExpansionMode: 0 498 | psp2DRMType: 0 499 | psp2StorageType: 0 500 | psp2MediaCapacity: 0 501 | psp2DLCConfigPath: 502 | psp2ThumbnailPath: 503 | psp2BackgroundPath: 504 | psp2SoundPath: 505 | psp2TrophyCommId: 506 | psp2TrophyPackagePath: 507 | psp2PackagedResourcesPath: 508 | psp2SaveDataQuota: 10240 509 | psp2ParentalLevel: 1 510 | psp2ShortTitle: Not Set 511 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 512 | psp2Category: 0 513 | psp2MasterVersion: 01.00 514 | psp2AppVersion: 01.00 515 | psp2TVBootMode: 0 516 | psp2EnterButtonAssignment: 2 517 | psp2TVDisableEmu: 0 518 | psp2AllowTwitterDialog: 1 519 | psp2Upgradable: 0 520 | psp2HealthWarning: 0 521 | psp2UseLibLocation: 0 522 | psp2InfoBarOnStartup: 0 523 | psp2InfoBarColor: 0 524 | psp2ScriptOptimizationLevel: 0 525 | splashScreenBackgroundSourceLandscape: {fileID: 0} 526 | splashScreenBackgroundSourcePortrait: {fileID: 0} 527 | spritePackerPolicy: 528 | webGLMemorySize: 256 529 | webGLExceptionSupport: 1 530 | webGLNameFilesAsHashes: 0 531 | webGLDataCaching: 0 532 | webGLDebugSymbols: 0 533 | webGLEmscriptenArgs: 534 | webGLModulesDirectory: 535 | webGLTemplate: APPLICATION:Default 536 | webGLAnalyzeBuildSize: 0 537 | webGLUseEmbeddedResources: 0 538 | webGLCompressionFormat: 1 539 | webGLLinkerTarget: 0 540 | scriptingDefineSymbols: {} 541 | platformArchitecture: {} 542 | scriptingBackend: {} 543 | il2cppCompilerConfiguration: {} 544 | incrementalIl2cppBuild: {} 545 | allowUnsafeCode: 0 546 | additionalIl2CppArgs: 547 | scriptingRuntimeVersion: 0 548 | apiCompatibilityLevelPerPlatform: {} 549 | m_RenderingPath: 1 550 | m_MobileRenderingPath: 1 551 | metroPackageName: Camera Multi Target 552 | metroPackageVersion: 553 | metroCertificatePath: 554 | metroCertificatePassword: 555 | metroCertificateSubject: 556 | metroCertificateIssuer: 557 | metroCertificateNotAfter: 0000000000000000 558 | metroApplicationDescription: Camera Multi Target 559 | wsaImages: {} 560 | metroTileShortName: 561 | metroCommandLineArgsFile: 562 | metroTileShowName: 0 563 | metroMediumTileShowName: 0 564 | metroLargeTileShowName: 0 565 | metroWideTileShowName: 0 566 | metroDefaultTileSize: 1 567 | metroTileForegroundText: 2 568 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 569 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 570 | a: 1} 571 | metroSplashScreenUseBackgroundColor: 0 572 | platformCapabilities: {} 573 | metroFTAName: 574 | metroFTAFileTypes: [] 575 | metroProtocolName: 576 | metroCompilationOverrides: 1 577 | tizenProductDescription: 578 | tizenProductURL: 579 | tizenSigningProfileName: 580 | tizenGPSPermissions: 0 581 | tizenMicrophonePermissions: 0 582 | tizenDeploymentTarget: 583 | tizenDeploymentTargetType: -1 584 | tizenMinOSVersion: 1 585 | n3dsUseExtSaveData: 0 586 | n3dsCompressStaticMem: 1 587 | n3dsExtSaveDataNumber: 0x12345 588 | n3dsStackSize: 131072 589 | n3dsTargetPlatform: 2 590 | n3dsRegion: 7 591 | n3dsMediaSize: 0 592 | n3dsLogoStyle: 3 593 | n3dsTitle: GameName 594 | n3dsProductCode: 595 | n3dsApplicationId: 0xFF3FF 596 | XboxOneProductId: 597 | XboxOneUpdateKey: 598 | XboxOneSandboxId: 599 | XboxOneContentId: 600 | XboxOneTitleId: 601 | XboxOneSCId: 602 | XboxOneGameOsOverridePath: 603 | XboxOnePackagingOverridePath: 604 | XboxOneAppManifestOverridePath: 605 | XboxOnePackageEncryption: 0 606 | XboxOnePackageUpdateGranularity: 2 607 | XboxOneDescription: 608 | XboxOneLanguage: 609 | - enus 610 | XboxOneCapability: [] 611 | XboxOneGameRating: {} 612 | XboxOneIsContentPackage: 0 613 | XboxOneEnableGPUVariability: 0 614 | XboxOneSockets: {} 615 | XboxOneSplashScreen: {fileID: 0} 616 | XboxOneAllowedProductIds: [] 617 | XboxOnePersistentLocalStorageSize: 0 618 | XboxOneXTitleMemory: 8 619 | xboxOneScriptCompiler: 0 620 | vrEditorSettings: 621 | daydream: 622 | daydreamIconForeground: {fileID: 0} 623 | daydreamIconBackground: {fileID: 0} 624 | cloudServicesEnabled: {} 625 | facebookSdkVersion: 7.9.4 626 | apiCompatibilityLevel: 2 627 | cloudProjectId: 628 | projectName: 629 | organizationId: 630 | cloudEnabled: 0 631 | enableNativePlatformBackendsForNewInputSystem: 0 632 | disableOldInputManagerSupport: 0 633 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 6000.0.40f1 2 | m_EditorVersionWithRevision: 6000.0.40f1 (157d81624ddf) 3 | -------------------------------------------------------------------------------- /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: 1 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: 1 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: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 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 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | Web: 5 188 | WebGL: 3 189 | WiiU: 5 190 | Windows Store Apps: 5 191 | XboxOne: 5 192 | iPhone: 2 193 | tvOS: 2 194 | -------------------------------------------------------------------------------- /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 | - CameraTarget 8 | layers: 9 | - Default 10 | - TransparentFX 11 | - Ignore Raycast 12 | - 13 | - Water 14 | - UI 15 | - 16 | - 17 | - Static 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | m_SortingLayers: 42 | - name: Default 43 | uniqueID: 0 44 | locked: 0 45 | -------------------------------------------------------------------------------- /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.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 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 | # Dynamic Multi Target Camera for Unity 2 | 3 | Concise Unity library which dynamically keeps a set of objects (e.g. players and important objects) in view, a common problem for a wide range of games. 4 | 5 | The library was originally developed for, and used by [Survival Ball](https://survivalball.com/), a game with a heavy shared screen local co-op component, requiring the camera to dynamically keep many key elements in view. More information about the library's inner workings and underlying math in the related [blog article](https://lopespm.github.io/libraries/games/2018/12/27/camera-multi-target.html). 6 | 7 | [Get it for free on the Unity Asset Store](https://assetstore.unity.com/packages/tools/camera/camera-multi-target-dynamic-135922) 10 | 11 | [Camera Multi Target Example Scene Video](https://www.youtube.com/watch?v=In3eVapQ5mk) 12 | 13 | Camera Multi Target Example Scene Screenshot 14 | 15 | 16 | ## Install 17 | 18 | ### From Unity's Asset Store 19 | 20 | Available at https://assetstore.unity.com/packages/tools/camera/camera-multi-target-dynamic-135922. Via Unity Editor, download and import the CameraMultiTarget folder into your project. 21 | 22 | ### By importing CameraMultiTarget.unitypackage 23 | 24 | The pre-built package can be downloaded from the repository's releases [here](https://github.com/lopespm/unity-camera-multi-target/releases/latest). After downloading the package, import it to your project via Unity Editor: *Assets -> Import Package -> Custom Package..*. 25 | 26 | ### Or by cloning this repository 27 | 28 | #### Clone entire repository (git) 29 | 30 | This repository contains the complete Unity project which includes the library and an example usage scene. After you clone the entire repository using git, copy the *Assets/CameraMultiTarget* folder to your project 31 | 32 | git clone https://github.com/lopespm/unity-camera-multi-target.git 33 | 34 | #### Checkout specific features (SVN) 35 | 36 | Since cloning a specific folder can be a quite convoluted process via git, you can checkout the *Assets/CameraMultiTarget* folder directly to your project using SVN: 37 | 38 | cd 39 | svn checkout https://github.com/lopespm/unity-camera-multi-target/trunk/Assets/CameraMultiTarget Assets/CameraMultiTarget 40 | 41 | Or if you wish to only install the library without the example scene: 42 | 43 | cd 44 | svn checkout https://github.com/lopespm/unity-camera-multi-target/trunk/Assets/CameraMultiTarget/Library Assets/CameraMultiTarget/Library 45 | 46 | 47 | ## Usage 48 | 49 | Add the [`CameraMultiTarget`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs) component to a camera and then you can programatically set which game objects the camera will track via the component's [`SetTargets(GameObject[] targets)`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs#L23) method. 50 | 51 | For example, you can set the targets in your game controller component (if you choose to have one), like the following: 52 | 53 | public class ExampleGameController : MonoBehaviour 54 | { 55 | public Rockbyte.CMT.CameraMultiTarget cameraMultiTarget; 56 | 57 | private void Start() { 58 | var targets = new List(); 59 | targets.Add(CreateTarget()); 60 | targets.Add(CreateTarget()); 61 | targets.Add(CreateTarget()); 62 | cameraMultiTarget.SetTargets(targets.ToArray()); 63 | } 64 | 65 | private GameObject CreateTarget() { 66 | GameObject target = GameObject.CreatePrimitive(PrimitiveType.Capsule); 67 | target.transform.position = Random.insideUnitSphere * 10f; 68 | return target; 69 | } 70 | } 71 | 72 | 73 | ## Example Scene 74 | 75 | An example scene of the library's usage is included in this repository and in the pre-built package located in the repository's releases. 76 | 77 | ## Games using Dynamic Multi Target Camera 78 | 79 | - [Survival Ball](https://survivalball.com/) 80 | 81 | *Did you develop, or know about, a game using this library? Add it here via [pull request](https://github.com/lopespm/unity-camera-multi-target/pulls)* 82 | --------------------------------------------------------------------------------