Merge branch 'feature/guard-screen' into master-with-aesthetics

This commit is contained in:
Randall 2017-11-09 14:43:48 -06:00
commit 6d229ffbfa
3 changed files with 287 additions and 16 deletions

168
Project Undercover/Assets/Scenes/GameScene.unity Normal file → Executable file
View file

@ -77,15 +77,17 @@ LightmapSettings:
m_PVRDirectSampleCount: 32 m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500 m_PVRSampleCount: 500
m_PVRBounces: 2 m_PVRBounces: 2
m_PVRFiltering: 0 m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1 m_PVRFilteringMode: 1
m_PVRCulling: 1 m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1 m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousNormalSigma: 1 m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigma: 1 m_PVRFilteringAtrousPositionSigmaAO: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1 m_UseShadowmask: 1
--- !u!196 &4 --- !u!196 &4
@ -163,6 +165,86 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 15 m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &61897354
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 61897358}
- component: {fileID: 61897357}
- component: {fileID: 61897356}
- component: {fileID: 61897355}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &61897355
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
--- !u!124 &61897356
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
--- !u!20 &61897357
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -2
m_CullingMask:
serializedVersion: 2
m_Bits: 0
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &61897358
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.461338, y: 8.988628, z: 6.0364428}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 26
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &81075120 --- !u!1 &81075120
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -203,6 +285,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -218,6 +301,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -272,6 +356,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -287,6 +372,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -367,6 +453,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -382,6 +469,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -449,6 +537,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -464,6 +553,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -516,7 +606,7 @@ RectTransform:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 164040928} m_GameObject: {fileID: 164040928}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 478, y: -245.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 854709136} - {fileID: 854709136}
@ -623,6 +713,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -638,6 +729,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -770,6 +862,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -785,6 +878,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -852,6 +946,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -867,6 +962,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -1655,6 +1751,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -1670,6 +1767,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -1738,6 +1836,7 @@ MeshRenderer:
m_Enabled: 0 m_Enabled: 0
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -1753,6 +1852,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -1820,6 +1920,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -1835,6 +1936,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -1943,6 +2045,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -1958,6 +2061,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2025,6 +2129,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2040,6 +2145,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2122,6 +2228,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2137,6 +2244,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2310,6 +2418,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2325,6 +2434,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2393,6 +2503,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2408,6 +2519,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2562,6 +2674,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2577,6 +2690,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2644,6 +2758,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2659,6 +2774,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2726,6 +2842,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2741,6 +2858,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -2882,6 +3000,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -2897,6 +3016,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -3016,6 +3136,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -3031,6 +3152,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -3112,6 +3234,7 @@ MeshRenderer:
m_Enabled: 0 m_Enabled: 0
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -3127,6 +3250,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -3368,6 +3492,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -3383,6 +3508,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -3607,12 +3733,12 @@ Prefab:
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d, - target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2} type: 2}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 528
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d, - target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2} type: 2}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 270.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d, - target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2} type: 2}
@ -3855,6 +3981,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -3870,6 +3997,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -3937,6 +4065,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -3952,6 +4081,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4006,6 +4136,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4021,6 +4152,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4183,6 +4315,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4198,6 +4331,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4337,6 +4471,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4352,6 +4487,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4432,6 +4568,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4447,6 +4584,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4566,6 +4704,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4581,6 +4720,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4662,6 +4802,7 @@ MeshRenderer:
m_Enabled: 0 m_Enabled: 0
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4677,6 +4818,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4787,6 +4929,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4802,6 +4945,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -4952,6 +5096,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -4967,6 +5112,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -5107,6 +5253,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -5122,6 +5269,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -5189,6 +5337,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -5204,6 +5353,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -5525,6 +5675,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -5540,6 +5691,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
@ -5594,6 +5746,7 @@ MeshRenderer:
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -5609,6 +5762,7 @@ MeshRenderer:
m_PreserveUVs: 1 m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3 m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4 m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5

View file

@ -11,6 +11,8 @@ public class GuardCamera : Photon.PunBehaviour {
private float xRotation = 0.0f; private float xRotation = 0.0f;
private float yRotation = 0.0f; private float yRotation = 0.0f;
private string mName;
private List<int> mPlayers; // Photo Player IDs private List<int> mPlayers; // Photo Player IDs
[SerializeField] [SerializeField]
@ -23,6 +25,9 @@ public class GuardCamera : Photon.PunBehaviour {
mCamera = GetComponent<Camera>(); mCamera = GetComponent<Camera>();
mListener = GetComponent<AudioListener>(); mListener = GetComponent<AudioListener>();
// Get the name of this camera.
mName = this.name;
// Everything off by default // Everything off by default
mSpotlight.enabled = false; mSpotlight.enabled = false;
mCamera.enabled = false; mCamera.enabled = false;
@ -75,6 +80,32 @@ public class GuardCamera : Photon.PunBehaviour {
photonView.RPC("RemovePlayer", PhotonTargets.All, PhotonNetwork.player.ID); photonView.RPC("RemovePlayer", PhotonTargets.All, PhotonNetwork.player.ID);
} }
/**
* Disable preview mode. See EnablePreviewMode().
*/
public void DisablePreviewMode()
{
// Turn off the camera.
mCamera.enabled = false;
// Reset the viewport to original dimensions.
mCamera.rect = new Rect(0.0f, 0.0f, 1.0f, 1.0f);
}
/**
* Enable preview mode, which allows cameras to be viewed side-by-side
* like a guard screen.
*/
public void EnablePreviewMode(float size, int x, int y)
{
// Turn on the camera in case it was disabled, but disable sound.
mCamera.enabled = true;
mListener.enabled = false;
// Set the viewport appropriately.
mCamera.rect = new Rect(size * x, size * y, size, size);
}
public bool InControl() public bool InControl()
{ {
if (mPlayers.Count == 0 || mPlayers[0] != PhotonNetwork.player.ID) if (mPlayers.Count == 0 || mPlayers[0] != PhotonNetwork.player.ID)

View file

@ -8,7 +8,7 @@ public class GuardController : Photon.PunBehaviour {
const float CAMERA_SENSITIVITY = 120.0f; const float CAMERA_SENSITIVITY = 120.0f;
private int mCurrentCamera; private int mCurrentCamera; // -1 means preview mode
private List<GuardCamera> mCameras; private List<GuardCamera> mCameras;
private bool mInControl; private bool mInControl;
@ -26,10 +26,47 @@ public class GuardController : Photon.PunBehaviour {
} }
} }
// Default is no camera. First to get it in Update wins. // Default is preview mode.
// Photon doesn't seem to sync camera players until update,
// so if we Activate() here, it won't lock.
mCurrentCamera = -1; mCurrentCamera = -1;
EnablePreviewMode();
}
/**
* Disable preview mode on all cameras.
*/
void DisablePreviewMode()
{
if (mCurrentCamera >= 0)
{
return;
}
foreach (var guardCamera in mCameras)
{
guardCamera.DisablePreviewMode();
}
}
/**
* Enable preview mode on call cameras and position them appropriately.
*/
void EnablePreviewMode()
{
// Deactivate current camera, if necessary.
if (mCurrentCamera != -1)
{
mCameras[mCurrentCamera].Deactivate();
}
mCurrentCamera = -1;
// Cameras are always arranged in ZxZ rows and columns. Determine Z.
int z = (int) Mathf.Ceil(Mathf.Sqrt(mCameras.Count));
float size = 1.0f / z;
// Set all cameras to preview mode appropriately.
for (int i = 0; i < mCameras.Count; ++i)
{
mCameras[i].EnablePreviewMode(size, i % z, i / z);
}
} }
/** /**
@ -37,6 +74,9 @@ public class GuardController : Photon.PunBehaviour {
*/ */
void SetCameraText() void SetCameraText()
{ {
// TODO - GuardCamera should be responsible for text.
// Each GuardCamera should display its name in colored text.
// Red denotes that it is owned by another player, Green denotes free.
if (mInControl) if (mInControl)
{ {
cameraStatusText.text = "In-Control"; cameraStatusText.text = "In-Control";
@ -48,14 +88,13 @@ public class GuardController : Photon.PunBehaviour {
} }
/** /**
* Cycle the player to the next camera, or grab the first camera * Cycle the player to a specific camera, or just the next one.
* if we don't have one yet.
*/ */
void SwitchCamera() void SwitchCamera(int nextCamera = -1)
{ {
// Get relevant camera indexes // Get relevant camera indexes
int lastCamera = mCurrentCamera; int lastCamera = mCurrentCamera;
mCurrentCamera += 1; mCurrentCamera = nextCamera == -1 ? mCurrentCamera + 1 : nextCamera;
if (mCurrentCamera >= mCameras.Count) if (mCurrentCamera >= mCameras.Count)
{ {
mCurrentCamera = 0; mCurrentCamera = 0;
@ -80,7 +119,54 @@ public class GuardController : Photon.PunBehaviour {
void Update() void Update()
{ {
if (Input.GetKeyDown("space") || mCurrentCamera == -1) if (mCurrentCamera < 0)
{
UpdatePreviewMode();
}
else
{
UpdateSingle();
}
}
void UpdatePreviewMode()
{
// If the player clicks a camera, switch to that camera.
if (Input.GetButtonDown("Fire1"))
{
// Get the click location.
float x = Input.mousePosition.x / Screen.width;
float y = Input.mousePosition.y / Screen.height;
// Cameras are always arranged in ZxZ rows and columns. Determine Z.
int z = (int)Mathf.Ceil(Mathf.Sqrt(mCameras.Count));
float size = 1.0f / z;
// Determine the camera that the click corresponds to, if any.
int tileX = (int) (x / size);
int tileY = (int) (y / size);
int camera = tileY * z + tileX;
// If the camera is valid, switch to it.
if (camera < mCameras.Count)
{
DisablePreviewMode();
SwitchCamera(camera);
}
}
}
void UpdateSingle()
{
// Escape switches to Preview Mode.
if (Input.GetKeyDown("escape"))
{
EnablePreviewMode();
return;
}
// Space switches to next camera.
if (Input.GetKeyDown("space"))
{ {
SwitchCamera(); SwitchCamera();
} }