허진호

최종보고서 소스코드 제출

Showing 1000 changed files with 4847 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

#define TRIG 13 //TRIG 핀 설정 (초음파 보내는 핀)
#define ECHO 12 //ECHO 핀 설정 (초음파 받는 핀)
void setup() {
Serial.begin(9600); //PC모니터로 센서값을 확인하기위해서 시리얼 통신을 정의해줍니다.
//시리얼 통신을 이용해 PC모니터로 데이터 값을 확인하는 부분은 자주사용되기 때문에
pinMode(TRIG, OUTPUT);
pinMode(ECHO, INPUT);
}
void loop()
{
long duration, distance;
digitalWrite(TRIG, LOW);
delayMicroseconds(2);
digitalWrite(TRIG, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG, LOW);
duration = pulseIn (ECHO, HIGH); //물체에 반사되어돌아온 초음파의 시간을 변수에 저장합니다.
//34000*초음파가 물체로 부터 반사되어 돌아오는시간 /1000000 / 2(왕복값이아니라 편도값이기때문에 나누기2를 해줍니다.)
//초음파센서의 거리값이 위 계산값과 동일하게 Cm로 환산되는 계산공식 입니다. 수식이 간단해지도록 적용했습니다.
distance = duration * 17 / 1000;
//PC모니터로 초음파 거리값을 확인 하는 코드 입니다.
//Serial.println(duration ); //초음파가 반사되어 돌아오는 시간을 보여줍니다.
Serial.println(distance); //측정된 물체로부터 거리값(cm값)을 보여줍니다.
delay(300); //1초마다 측정값을 보여줍니다.
}
No preview for this file type
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
fileFormatVersion: 2
guid: e4f1720742f70fe4a924245ccc14da7c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 90755fd29ca519f43a5b519496f18763
folderAsset: yes
timeCreated: 1461994445
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &128384
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 405068}
- component: {fileID: 11442534}
m_Layer: 0
m_Name: SerialController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &405068
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 128384}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11442534
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 128384}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8bc5f48af2cffd747a079fe8c632e2c8, type: 3}
m_Name:
m_EditorClassIdentifier:
portName: COM3
baudRate: 9600
messageListener: {fileID: 0}
reconnectionDelay: 1000
maxUnreadMessages: 1
fileFormatVersion: 2
guid: a65acf0cbf56b80419f74ebf0bc845f4
timeCreated: 1461994440
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e246aa68d79c3e6489397d781fa90434
timeCreated: 1490930520
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fb742987ae352b74198b5fbb5071aaf6
folderAsset: yes
timeCreated: 1461999732
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &167530824
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 11442534, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: messageListener
value:
objectReference: {fileID: 748090405}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
--- !u!1 &748090405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 748090407}
- component: {fileID: 748090406}
m_Layer: 0
m_Name: SampleMessageListener
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &748090406
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a03027548d784348a5d2b1fbe819cfa, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &748090407
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1650055492
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1650055497}
- component: {fileID: 1650055496}
- component: {fileID: 1650055494}
- component: {fileID: 1650055493}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1650055493
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!124 &1650055494
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!20 &1650055496
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
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: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1650055497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
fileFormatVersion: 2
guid: 5e3c786f8a316e444aca9132e8863e39
timeCreated: 1461996794
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &71148158
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 71148160}
- component: {fileID: 71148159}
m_Layer: 0
m_Name: SampleCustomDelimiter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &71148159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 71148158}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cc69f5bf38e48794ba71871e46f4bf57, type: 3}
m_Name:
m_EditorClassIdentifier:
serialController: {fileID: 1999141868}
--- !u!4 &71148160
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 71148158}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1650055492
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1650055497}
- component: {fileID: 1650055496}
- component: {fileID: 1650055494}
- component: {fileID: 1650055493}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1650055493
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!124 &1650055494
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!20 &1650055496
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
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: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1650055497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1999141867
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 1437167347957202, guid: e246aa68d79c3e6489397d781fa90434,
type: 3}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1999141869}
- component: {fileID: 1999141868}
m_Layer: 0
m_Name: SerialController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1999141868
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 114663175507723830, guid: e246aa68d79c3e6489397d781fa90434,
type: 3}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1999141867}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 223f0e4bcadad324e9ab9a12c33326a1, type: 3}
m_Name:
m_EditorClassIdentifier:
portName: COM3
baudRate: 9600
messageListener: {fileID: 0}
reconnectionDelay: 1000
maxUnreadMessages: 10
separator: 255
--- !u!4 &1999141869
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 4802930798686362, guid: e246aa68d79c3e6489397d781fa90434,
type: 3}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1999141867}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
fileFormatVersion: 2
guid: 2587cb0c77e84fe40a30c2a78189fc38
timeCreated: 1490929474
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!114 &272482843 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 11442534, guid: a65acf0cbf56b80419f74ebf0bc845f4,
type: 3}
m_PrefabInstance: {fileID: 642118325}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8bc5f48af2cffd747a079fe8c632e2c8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &642118325
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
--- !u!1 &748090405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 748090407}
- component: {fileID: 748090406}
m_Layer: 0
m_Name: SampleUserPolling_ReadWrite_TearDown
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &748090406
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e9eac196e6b8ea54098688bb8b14321b, type: 3}
m_Name:
m_EditorClassIdentifier:
serialController: {fileID: 272482843}
--- !u!4 &748090407
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1650055492
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1650055497}
- component: {fileID: 1650055496}
- component: {fileID: 1650055494}
- component: {fileID: 1650055493}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1650055493
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!124 &1650055494
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!20 &1650055496
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
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: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1650055497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
fileFormatVersion: 2
guid: d5284e77923778441980c704cec7cdb5
timeCreated: 1475678359
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!114 &272482843 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 11442534, guid: a65acf0cbf56b80419f74ebf0bc845f4,
type: 3}
m_PrefabInstance: {fileID: 642118325}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8bc5f48af2cffd747a079fe8c632e2c8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &642118325
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 405068, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a65acf0cbf56b80419f74ebf0bc845f4, type: 3}
--- !u!1 &748090405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 748090407}
- component: {fileID: 748090406}
m_Layer: 0
m_Name: SampleUserPolling
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &748090406
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5eafe37a9721f1b42adb60967b9ab774, type: 3}
m_Name:
m_EditorClassIdentifier:
serialController: {fileID: 272482843}
--- !u!4 &748090407
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 748090405}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1650055492
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1650055497}
- component: {fileID: 1650055496}
- component: {fileID: 1650055494}
- component: {fileID: 1650055493}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1650055493
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!124 &1650055494
Behaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
--- !u!20 &1650055496
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
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: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1650055497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650055492}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
fileFormatVersion: 2
guid: 4b71bd1d8aebcb3409220f04dba1fe4c
timeCreated: 1461990741
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1bc0a682385922e4f9c223627cc3e21c
folderAsset: yes
timeCreated: 1461987490
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: fb564e11b72fd4246b44cf17edd81c00
folderAsset: yes
timeCreated: 1461996883
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System;
using System.Collections;
/**
* Sample for reading using polling by yourself, and writing too.
*/
public class ArduinoDistanceReader : MonoBehaviour
{
public SerialController serialController;
public float DetectionThreshold;
private bool IsCollisionWarned;
public event Action<float> OnCollsionWarningEnter;
public event Action<float> OnCollsionWarningStay;
public event Action<float> OnCollsionWarningExit;
void Start()
{
serialController = GameObject.Find("SerialController").GetComponent<SerialController>();
Debug.Log("Press A or Z to execute some actions");
}
// Executed each frame
void Update()
{
//---------------------------------------------------------------------
// Receive data
//---------------------------------------------------------------------
string message = serialController.ReadSerialMessage();
if (message == null)
return;
// Check if the message is plain data or a connect/disconnect event.
if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_CONNECTED))
Debug.Log("Connection established");
else if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_DISCONNECTED))
Debug.Log("Connection attempt failed or disconnection detected");
else
{
Debug.Log("Message arrived: " + message);
int distance;
if (int.TryParse(message, out distance))
{
bool withinDistance = distance < DetectionThreshold;
if (withinDistance)
{
if (!IsCollisionWarned)
{
IsCollisionWarned = true;
OnCollsionWarningEnter?.Invoke(distance);
Debug.LogWarning($"Collision Entered! (Distance: {distance})");
}
OnCollsionWarningStay?.Invoke(distance);
Debug.LogWarning($"Collision Staying... (Distance: {distance})");
}
else
{
if (IsCollisionWarned)
{
IsCollisionWarned = false;
OnCollsionWarningExit?.Invoke(distance);
Debug.LogWarning($"Collision Exitted! (Distance: {distance})");
}
}
}
else
{
Debug.LogError($"Message Parsing Failed:::'{message}'");
}
}
}
}
fileFormatVersion: 2
guid: 7a1815ab8d05e6d41a977b43884b4079
timeCreated: 1461998512
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Collections;
using System.Text;
/**
* Sample for reading using polling by yourself, and writing too.
*/
public class SampleCustomDelimiter : MonoBehaviour
{
public SerialControllerCustomDelimiter serialController;
// Initialization
void Start()
{
serialController = GameObject.Find("SerialController").GetComponent<SerialControllerCustomDelimiter>();
Debug.Log("Press the SPACEBAR to execute some action");
}
// Executed each frame
void Update()
{
//---------------------------------------------------------------------
// Send data
//---------------------------------------------------------------------
// If you press one of these keys send it to the serial device. A
// sample serial device that accepts this input is given in the README.
if (Input.GetKeyDown(KeyCode.Space))
{
Debug.Log("Sending some action");
// Sends a 65 (ascii for 'A') followed by an space (ascii 32, which
// is configured in the controller of our scene as the separator).
serialController.SendSerialMessage(new byte[] { 65, 32 });
}
//---------------------------------------------------------------------
// Receive data
//---------------------------------------------------------------------
byte[] message = serialController.ReadSerialMessage();
if (message == null)
return;
StringBuilder sb = new StringBuilder();
foreach (byte b in message)
sb.AppendFormat("(#{0}={1}) ", b, (char)b);
Debug.Log("Received some bytes, printing their ascii codes: " + sb);
}
}
fileFormatVersion: 2
guid: cc69f5bf38e48794ba71871e46f4bf57
timeCreated: 1461998512
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Collections;
/**
* When creating your message listeners you need to implement these two methods:
* - OnMessageArrived
* - OnConnectionEvent
*/
public class SampleMessageListener : MonoBehaviour
{
// Invoked when a line of data is received from the serial device.
void OnMessageArrived(string msg)
{
Debug.Log("Message arrived: " + msg);
}
// Invoked when a connect/disconnect event occurs. The parameter 'success'
// will be 'true' upon connection, and 'false' upon disconnection or
// failure to connect.
void OnConnectionEvent(bool success)
{
if (success)
Debug.Log("Connection established");
else
Debug.Log("Connection attempt failed or disconnection detected");
}
}
fileFormatVersion: 2
guid: 1a03027548d784348a5d2b1fbe819cfa
timeCreated: 1461990120
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Collections;
/**
* Sample for reading using polling by yourself, and writing too.
*/
public class SampleTearDown : MonoBehaviour
{
public SerialController serialController;
// Initialization
void Start()
{
serialController = GameObject.Find("SerialController").GetComponent<SerialController>();
serialController.SetTearDownFunction(lightsShutdown);
Debug.Log("Press 1 or 2 to execute some actions");
}
// Executed each frame
void Update()
{
//---------------------------------------------------------------------
// Send data
//---------------------------------------------------------------------
// If you press one of these keys send it to the serial device. A
// sample serial device that accepts this input is given in the README.
if (Input.GetKeyDown(KeyCode.Alpha1) || Input.GetKeyDown(KeyCode.Keypad1))
{
Debug.Log("Sending lights ON");
serialController.SendSerialMessage("1");
}
if (Input.GetKeyDown(KeyCode.Alpha2) || Input.GetKeyDown(KeyCode.Keypad2))
{
Debug.Log("Sending lights OFF");
serialController.SendSerialMessage("2");
}
//---------------------------------------------------------------------
// Receive data
//---------------------------------------------------------------------
string message = serialController.ReadSerialMessage();
if (message == null)
return;
// Check if the message is plain data or a connect/disconnect event.
if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_CONNECTED))
Debug.Log("Connection established");
else if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_DISCONNECTED))
Debug.Log("Connection attempt failed or disconnection detected");
else
Debug.Log("Message arrived: " + message);
}
// Tear-down function for the hardware at the other side of the COM port
public void lightsShutdown()
{
Debug.Log("Executing teardown");
serialController.SendSerialMessage("X");
}
}
fileFormatVersion: 2
guid: e9eac196e6b8ea54098688bb8b14321b
timeCreated: 1475678371
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Collections;
/**
* Sample for reading using polling by yourself. In case you are fond of that.
*/
public class SampleUserPolling_JustRead : MonoBehaviour
{
public SerialController serialController;
// Initialization
void Start()
{
serialController = GameObject.Find("SerialController").GetComponent<SerialController>();
}
// Executed each frame
void Update()
{
string message = serialController.ReadSerialMessage();
if (message == null)
return;
// Check if the message is plain data or a connect/disconnect event.
if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_CONNECTED))
Debug.Log("Connection established");
else if (ReferenceEquals(message, SerialController.SERIAL_DEVICE_DISCONNECTED))
Debug.Log("Connection attempt failed or disconnection detected");
else
Debug.Log("Message arrived: " + message);
}
}
fileFormatVersion: 2
guid: 5eafe37a9721f1b42adb60967b9ab774
timeCreated: 1461996889
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Threading;
/**
* This class allows a Unity program to continually check for messages from a
* serial device.
*
* It creates a Thread that communicates with the serial port and continually
* polls the messages on the wire.
* That Thread puts all the messages inside a Queue, and this SerialController
* class polls that queue by means of invoking SerialThread.GetSerialMessage().
*
* The serial device must send its messages separated by a newline character.
* Neither the SerialController nor the SerialThread perform any validation
* on the integrity of the message. It's up to the one that makes sense of the
* data.
*/
public class SerialController : MonoBehaviour
{
[Tooltip("Port name with which the SerialPort object will be created.")]
public string portName = "COM3";
[Tooltip("Baud rate that the serial device is using to transmit data.")]
public int baudRate = 9600;
[Tooltip("Reference to an scene object that will receive the events of connection, " +
"disconnection and the messages from the serial device.")]
public GameObject messageListener;
[Tooltip("After an error in the serial communication, or an unsuccessful " +
"connect, how many milliseconds we should wait.")]
public int reconnectionDelay = 1000;
[Tooltip("Maximum number of unread data messages in the queue. " +
"New messages will be discarded.")]
public int maxUnreadMessages = 1;
// Constants used to mark the start and end of a connection. There is no
// way you can generate clashing messages from your serial device, as I
// compare the references of these strings, no their contents. So if you
// send these same strings from the serial device, upon reconstruction they
// will have different reference ids.
public const string SERIAL_DEVICE_CONNECTED = "__Connected__";
public const string SERIAL_DEVICE_DISCONNECTED = "__Disconnected__";
// Internal reference to the Thread and the object that runs in it.
protected Thread thread;
protected SerialThreadLines serialThread;
// ------------------------------------------------------------------------
// Invoked whenever the SerialController gameobject is activated.
// It creates a new thread that tries to connect to the serial device
// and start reading from it.
// ------------------------------------------------------------------------
void OnEnable()
{
serialThread = new SerialThreadLines(portName,
baudRate,
reconnectionDelay,
maxUnreadMessages);
thread = new Thread(new ThreadStart(serialThread.RunForever));
thread.Start();
}
// ------------------------------------------------------------------------
// Invoked whenever the SerialController gameobject is deactivated.
// It stops and destroys the thread that was reading from the serial device.
// ------------------------------------------------------------------------
void OnDisable()
{
// If there is a user-defined tear-down function, execute it before
// closing the underlying COM port.
if (userDefinedTearDownFunction != null)
userDefinedTearDownFunction();
// The serialThread reference should never be null at this point,
// unless an Exception happened in the OnEnable(), in which case I've
// no idea what face Unity will make.
if (serialThread != null)
{
serialThread.RequestStop();
serialThread = null;
}
// This reference shouldn't be null at this point anyway.
if (thread != null)
{
thread.Join();
thread = null;
}
}
// ------------------------------------------------------------------------
// Polls messages from the queue that the SerialThread object keeps. Once a
// message has been polled it is removed from the queue. There are some
// special messages that mark the start/end of the communication with the
// device.
// ------------------------------------------------------------------------
void Update()
{
// If the user prefers to poll the messages instead of receiving them
// via SendMessage, then the message listener should be null.
if (messageListener == null)
return;
// Read the next message from the queue
string message = (string)serialThread.ReadMessage();
if (message == null)
return;
// Check if the message is plain data or a connect/disconnect event.
if (ReferenceEquals(message, SERIAL_DEVICE_CONNECTED))
messageListener.SendMessage("OnConnectionEvent", true);
else if (ReferenceEquals(message, SERIAL_DEVICE_DISCONNECTED))
messageListener.SendMessage("OnConnectionEvent", false);
else
messageListener.SendMessage("OnMessageArrived", message);
}
// ------------------------------------------------------------------------
// Returns a new unread message from the serial device. You only need to
// call this if you don't provide a message listener.
// ------------------------------------------------------------------------
public string ReadSerialMessage()
{
// Read the next message from the queue
return (string)serialThread.ReadMessage();
}
// ------------------------------------------------------------------------
// Puts a message in the outgoing queue. The thread object will send the
// message to the serial device when it considers it's appropriate.
// ------------------------------------------------------------------------
public void SendSerialMessage(string message)
{
serialThread.SendMessage(message);
}
// ------------------------------------------------------------------------
// Executes a user-defined function before Unity closes the COM port, so
// the user can send some tear-down message to the hardware reliably.
// ------------------------------------------------------------------------
public delegate void TearDownFunction();
private TearDownFunction userDefinedTearDownFunction;
public void SetTearDownFunction(TearDownFunction userFunction)
{
this.userDefinedTearDownFunction = userFunction;
}
}
fileFormatVersion: 2
guid: 8bc5f48af2cffd747a079fe8c632e2c8
timeCreated: 1446931905
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.Threading;
/**
* While 'SerialController' only allows reading/sending text data that is
* terminated by new-lines, this class allows reading/sending messages
* using a binary protocol where each message is separated from the next by
* a 1-char delimiter.
*/
public class SerialControllerCustomDelimiter : MonoBehaviour
{
[Tooltip("Port name with which the SerialPort object will be created.")]
public string portName = "COM3";
[Tooltip("Baud rate that the serial device is using to transmit data.")]
public int baudRate = 9600;
[Tooltip("Reference to an scene object that will receive the events of connection, " +
"disconnection and the messages from the serial device.")]
public GameObject messageListener;
[Tooltip("After an error in the serial communication, or an unsuccessful " +
"connect, how many milliseconds we should wait.")]
public int reconnectionDelay = 1000;
[Tooltip("Maximum number of unread data messages in the queue. " +
"New messages will be discarded.")]
public int maxUnreadMessages = 1;
[Tooltip("Maximum number of unread data messages in the queue. " +
"New messages will be discarded.")]
public byte separator = 90;
// Internal reference to the Thread and the object that runs in it.
protected Thread thread;
protected SerialThreadBinaryDelimited serialThread;
// ------------------------------------------------------------------------
// Invoked whenever the SerialController gameobject is activated.
// It creates a new thread that tries to connect to the serial device
// and start reading from it.
// ------------------------------------------------------------------------
void OnEnable()
{
serialThread = new SerialThreadBinaryDelimited(portName,
baudRate,
reconnectionDelay,
maxUnreadMessages,
separator);
thread = new Thread(new ThreadStart(serialThread.RunForever));
thread.Start();
}
// ------------------------------------------------------------------------
// Invoked whenever the SerialController gameobject is deactivated.
// It stops and destroys the thread that was reading from the serial device.
// ------------------------------------------------------------------------
void OnDisable()
{
// If there is a user-defined tear-down function, execute it before
// closing the underlying COM port.
if (userDefinedTearDownFunction != null)
userDefinedTearDownFunction();
// The serialThread reference should never be null at this point,
// unless an Exception happened in the OnEnable(), in which case I've
// no idea what face Unity will make.
if (serialThread != null)
{
serialThread.RequestStop();
serialThread = null;
}
// This reference shouldn't be null at this point anyway.
if (thread != null)
{
thread.Join();
thread = null;
}
}
// ------------------------------------------------------------------------
// Polls messages from the queue that the SerialThread object keeps. Once a
// message has been polled it is removed from the queue. There are some
// special messages that mark the start/end of the communication with the
// device.
// ------------------------------------------------------------------------
void Update()
{
// If the user prefers to poll the messages instead of receiving them
// via SendMessage, then the message listener should be null.
if (messageListener == null)
return;
// Read the next message from the queue
byte[] message = ReadSerialMessage();
if (message == null)
return;
// Check if the message is plain data or a connect/disconnect event.
messageListener.SendMessage("OnMessageArrived", message);
}
// ------------------------------------------------------------------------
// Returns a new unread message from the serial device. You only need to
// call this if you don't provide a message listener.
// ------------------------------------------------------------------------
public byte[] ReadSerialMessage()
{
// Read the next message from the queue
return (byte[]) serialThread.ReadMessage();
}
// ------------------------------------------------------------------------
// Puts a message in the outgoing queue. The thread object will send the
// message to the serial device when it considers it's appropriate.
// ------------------------------------------------------------------------
public void SendSerialMessage(byte[] message)
{
serialThread.SendMessage(message);
}
// ------------------------------------------------------------------------
// Executes a user-defined function before Unity closes the COM port, so
// the user can send some tear-down message to the hardware reliably.
// ------------------------------------------------------------------------
public delegate void TearDownFunction();
private TearDownFunction userDefinedTearDownFunction;
public void SetTearDownFunction(TearDownFunction userFunction)
{
this.userDefinedTearDownFunction = userFunction;
}
}
fileFormatVersion: 2
guid: 223f0e4bcadad324e9ab9a12c33326a1
timeCreated: 1492576005
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 811fda74a4b436f43ba492dbf2d0c602
folderAsset: yes
timeCreated: 1492580253
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9aee283cf1f822a41983a949d01ebc3c
timeCreated: 1490932773
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.IO.Ports;
/**
* This class contains methods that must be run from inside a thread and others
* that must be invoked from Unity. Both types of methods are clearly marked in
* the code, although you, the final user of this library, don't need to even
* open this file unless you are introducing incompatibilities for upcoming
* versions.
*
* For method comments, refer to the base class.
*/
public class SerialThread : SerialThreadLines
{
public SerialThread(string portName,
int baudRate,
int delayBeforeReconnecting,
int maxUnreadMessages)
: base(portName, baudRate, delayBeforeReconnecting, maxUnreadMessages)
{
}
}
fileFormatVersion: 2
guid: e2ac5e10e1382d445ab3318ec42c1a0b
timeCreated: 1446932973
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.IO.Ports;
/**
* This class contains methods that must be run from inside a thread and others
* that must be invoked from Unity. Both types of methods are clearly marked in
* the code, although you, the final user of this library, don't need to even
* open this file unless you are introducing incompatibilities for upcoming
* versions.
*
* For method comments, refer to the base class.
*/
public class SerialThreadBinaryDelimited : AbstractSerialThread
{
// Messages to/from the serial port should be delimited using this separator.
private byte separator;
// Buffer where a single message must fit
private byte[] buffer = new byte[1024];
private int bufferUsed = 0;
public SerialThreadBinaryDelimited(string portName,
int baudRate,
int delayBeforeReconnecting,
int maxUnreadMessages,
byte separator)
: base(portName, baudRate, delayBeforeReconnecting, maxUnreadMessages, false)
{
this.separator = separator;
}
// ------------------------------------------------------------------------
// Must include the separator already (as it shold have been passed to
// the SendMessage method).
// ------------------------------------------------------------------------
protected override void SendToWire(object message, SerialPort serialPort)
{
byte[] binaryMessage = (byte[])message;
serialPort.Write(binaryMessage, 0, binaryMessage.Length);
}
protected override object ReadFromWire(SerialPort serialPort)
{
// Try to fill the internal buffer
bufferUsed += serialPort.Read(buffer, bufferUsed, buffer.Length - bufferUsed);
// Search for the separator in the buffer
int index = System.Array.FindIndex<byte>(buffer, 0, bufferUsed, IsSeparator);
if (index == -1)
return null;
byte[] returnBuffer = new byte[index];
System.Array.Copy(buffer, returnBuffer, index);
// Shift the buffer so next time the unused bytes start at 0 (safe even
// if there is overlap)
System.Array.Copy(buffer, index + 1, buffer, 0, bufferUsed - index);
bufferUsed -= index + 1;
return returnBuffer;
}
private bool IsSeparator(byte aByte)
{
return aByte == separator;
}
}
fileFormatVersion: 2
guid: e575dce1ef60f354c8c84be8706e0ad1
timeCreated: 1492576005
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
/**
* Ardity (Serial Communication for Arduino + Unity)
* Author: Daniel Wilches <dwilches@gmail.com>
*
* This work is released under the Creative Commons Attributions license.
* https://creativecommons.org/licenses/by/2.0/
*/
using UnityEngine;
using System.IO.Ports;
/**
* This class contains methods that must be run from inside a thread and others
* that must be invoked from Unity. Both types of methods are clearly marked in
* the code, although you, the final user of this library, don't need to even
* open this file unless you are introducing incompatibilities for upcoming
* versions.
*
* For method comments, refer to the base class.
*/
public class SerialThreadLines : AbstractSerialThread
{
public SerialThreadLines(string portName,
int baudRate,
int delayBeforeReconnecting,
int maxUnreadMessages)
: base(portName, baudRate, delayBeforeReconnecting, maxUnreadMessages, true)
{
}
protected override void SendToWire(object message, SerialPort serialPort)
{
serialPort.WriteLine((string) message);
}
protected override object ReadFromWire(SerialPort serialPort)
{
return serialPort.ReadLine();
}
}
fileFormatVersion: 2
guid: 90ada353031a1b44aab2cf9add446940
timeCreated: 1446932973
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
No preview for this file type
fileFormatVersion: 2
guid: 8f2f455235421ee4c876e07c92dc3b3f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e7c38002fdc795d4bbddf2ba8163aede
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 62f21f05848ab49dab5437386c77527a
folderAsset: yes
DefaultImporter:
userData:
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// To use in a surface shader, add the following text to the code:
//
// #pragma surface ... vertex:vert <-- add "vertex:vert" to this line
// #include "CardboardDistortion.cginc" <-- copy the next 4 lines
// void vert (inout appdata_base v) {
// v.vertex = undistortSurface(v.vertex);
// }
// To use in a vertex shader, modify it as follows:
//
// #include "CardboardDistortion.cginc" <-- add this
//
// v2f vert (appdata_blah v) {
// v2f o;
// o.vertex = undistortVertex(v.vertex); <-- replace "mul(UNITY_MATRIX_MVP, v.vertex)"
// ...
// return o;
// }
float4 _Undistortion;
float _MaxRadSq;
float _NearClip;
float4x4 _RealProjection;
float4x4 _FixProjection;
// Convert point from world space to undistorted camera space.
float4 undistort(float4 pos) {
// Go to camera space.
pos = mul(UNITY_MATRIX_MV, pos);
if (pos.z <= -_NearClip) { // Reminder: Forward is -Z.
// Undistort the point's coordinates in XY.
float r2 = clamp(dot(pos.xy, pos.xy) / (pos.z*pos.z), 0, _MaxRadSq);
pos.xy *= 1 + (_Undistortion.x + _Undistortion.y*r2)*r2;
}
return pos;
}
// Multiply by no-lens projection matrix after undistortion.
float4 undistortVertex(float4 pos) {
return mul(_RealProjection, undistort(pos));
}
// Surface shader hides away the MVP multiplication, so we have
// to multiply by _FixProjection = inverse(MVP)*_RealProjection.
float4 undistortSurface(float4 pos) {
return mul(_FixProjection, undistort(pos));
}
fileFormatVersion: 2
guid: 2c745b211b2a34eb290d759affc53a92
ShaderImporter:
defaultTextures: []
userData:
fileFormatVersion: 2
guid: 7c98c5ffcf17d49fc88af4e1d260f2cb
folderAsset: yes
DefaultImporter:
userData:
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
using System.Collections;
/// A custom editor for properties on the CardboardAudioListener script. This appears in the
/// Inspector window of a CardboardAudioListener object.
[CustomEditor(typeof(CardboardAudioListener))]
public class CardboardAudioListenerEditor : Editor {
private SerializedProperty globalGainDb = null;
private SerializedProperty quality = null;
private SerializedProperty worldScale = null;
private GUIContent globalGainLabel = new GUIContent("Global Gain (dB)",
"Sets the global gain of the system. Can be used to adjust the overall output volume.");
private GUIContent qualityLabel = new GUIContent("Quality",
"Sets the quality mode in which the spatial audio will be rendered. " +
"Higher quality modes allow for increased fidelity at the cost of greater CPU usage.");
private GUIContent worldScaleLabel = new GUIContent("World Scale",
"Sets the ratio between game units and real world units (meters).");
void OnEnable () {
globalGainDb = serializedObject.FindProperty("globalGainDb");
quality = serializedObject.FindProperty("quality");
worldScale = serializedObject.FindProperty("worldScale");
}
/// @cond
public override void OnInspectorGUI () {
serializedObject.Update();
// Rendering quality can only be modified through the Inspector in Edit mode.
GUI.enabled = !EditorApplication.isPlaying;
EditorGUILayout.PropertyField(quality, qualityLabel);
GUI.enabled = true;
EditorGUILayout.Separator();
EditorGUILayout.Slider(globalGainDb, CardboardAudio.minGainDb, CardboardAudio.maxGainDb,
globalGainLabel);
EditorGUILayout.Slider(worldScale, CardboardAudio.minWorldScale, CardboardAudio.maxWorldScale,
worldScaleLabel);
serializedObject.ApplyModifiedProperties();
}
/// @endcond
}
fileFormatVersion: 2
guid: 846f7b1b78d8e4eb2a0db361797b6e76
timeCreated: 1447979035
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
using System.Collections;
/// A custom editor for properties on the CardboardAudioRoom script. This appears in the Inspector
/// window of a CardboardAudioRoom object.
[CustomEditor(typeof(CardboardAudioRoom))]
[CanEditMultipleObjects]
public class CardboardAudioRoomEditor : Editor {
private SerializedProperty leftWall = null;
private SerializedProperty rightWall = null;
private SerializedProperty floor = null;
private SerializedProperty ceiling = null;
private SerializedProperty backWall = null;
private SerializedProperty frontWall = null;
private SerializedProperty reflectivity = null;
private SerializedProperty reverbGainDb = null;
private SerializedProperty reverbBrightness = null;
private SerializedProperty reverbTime = null;
private SerializedProperty size = null;
private GUIContent surfaceMaterialsLabel = new GUIContent("Surface Materials",
"Room surface materials to calculate the acoustic properties of the room.");
private GUIContent surfaceMaterialLabel = new GUIContent("Surface Material",
"Surface material used to calculate the acoustic properties of the room.");
private GUIContent reflectivityLabel = new GUIContent("Reflectivity",
"Adjusts what proportion of the direct sound is reflected back by each surface, after an " +
"appropriate delay. Reverberation is unaffected by this setting.");
private GUIContent reverbGainLabel = new GUIContent("Gain (dB)",
"Applies a gain adjustment to the reverberation in the room. The default value will leave " +
"reverb unaffected.");
private GUIContent reverbPropertiesLabel = new GUIContent("Reverb Properties",
"Parameters to adjust the reverb properties of the room.");
private GUIContent reverbBrightnessLabel = new GUIContent("Brightness",
"Adjusts the balance between high and low frequencies in the reverb.");
private GUIContent reverbTimeLabel = new GUIContent("Time",
"Adjusts the overall duration of the reverb by a positive scaling factor.");
private GUIContent sizeLabel = new GUIContent("Size", "Sets the room dimensions.");
void OnEnable () {
leftWall = serializedObject.FindProperty("leftWall");
rightWall = serializedObject.FindProperty("rightWall");
floor = serializedObject.FindProperty("floor");
ceiling = serializedObject.FindProperty("ceiling");
backWall = serializedObject.FindProperty("backWall");
frontWall = serializedObject.FindProperty("frontWall");
reflectivity = serializedObject.FindProperty("reflectivity");
reverbGainDb = serializedObject.FindProperty("reverbGainDb");
reverbBrightness = serializedObject.FindProperty("reverbBrightness");
reverbTime = serializedObject.FindProperty("reverbTime");
size = serializedObject.FindProperty("size");
}
/// @cond
public override void OnInspectorGUI () {
serializedObject.Update();
EditorGUILayout.LabelField(surfaceMaterialsLabel);
++EditorGUI.indentLevel;
DrawSurfaceMaterial(leftWall);
DrawSurfaceMaterial(rightWall);
DrawSurfaceMaterial(floor);
DrawSurfaceMaterial(ceiling);
DrawSurfaceMaterial(backWall);
DrawSurfaceMaterial(frontWall);
--EditorGUI.indentLevel;
EditorGUILayout.Separator();
EditorGUILayout.Slider(reflectivity, 0.0f, CardboardAudio.maxReflectivity, reflectivityLabel);
EditorGUILayout.Separator();
EditorGUILayout.LabelField(reverbPropertiesLabel);
++EditorGUI.indentLevel;
EditorGUILayout.Slider(reverbGainDb, CardboardAudio.minGainDb, CardboardAudio.maxGainDb,
reverbGainLabel);
EditorGUILayout.Slider(reverbBrightness, CardboardAudio.minReverbBrightness,
CardboardAudio.maxReverbBrightness, reverbBrightnessLabel);
EditorGUILayout.Slider(reverbTime, 0.0f, CardboardAudio.maxReverbTime, reverbTimeLabel);
--EditorGUI.indentLevel;
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(size, sizeLabel);
serializedObject.ApplyModifiedProperties();
}
/// @endcond
private void DrawSurfaceMaterial (SerializedProperty surfaceMaterial) {
#if UNITY_4_5
surfaceMaterialLabel.text = ObjectNames.NicifyVariableName(surfaceMaterial.name);
#else
surfaceMaterialLabel.text = surfaceMaterial.displayName;
#endif
EditorGUILayout.PropertyField(surfaceMaterial, surfaceMaterialLabel);
}
}
fileFormatVersion: 2
guid: 2e20199949e8e4ecd992d68cf09fc902
timeCreated: 1447979493
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
using System.Collections;
/// A custom editor for properties on the CardboardAudioSource script. This appears in the Inspector
/// window of a CardboardAudioSource object.
[CustomEditor(typeof(CardboardAudioSource))]
[CanEditMultipleObjects]
public class CardboardAudioSourceEditor : Editor {
private SerializedProperty clip = null;
private SerializedProperty loop = null;
private SerializedProperty mute = null;
private SerializedProperty pitch = null;
private SerializedProperty playOnAwake = null;
private SerializedProperty volume = null;
private SerializedProperty rolloffMode = null;
private SerializedProperty maxDistance = null;
private SerializedProperty minDistance = null;
private SerializedProperty directivityAlpha = null;
private SerializedProperty directivitySharpness = null;
private Texture2D directivityTexture = null;
private SerializedProperty gainDb = null;
private SerializedProperty hrtfEnabled = null;
private SerializedProperty occlusionEnabled = null;
private GUIContent clipLabel = new GUIContent("AudioClip",
"The AudioClip asset played by the CardboardAudioSource.");
private GUIContent loopLabel = new GUIContent("Loop",
"Sets the source to loop.");
private GUIContent muteLabel = new GUIContent("Mute",
"Mutes the sound.");
private GUIContent pitchLabel = new GUIContent("Pitch",
"Sets the frequency of the sound. Use this to slow down or speed up the sound.");
private GUIContent volumeLabel = new GUIContent("Volume",
"Sets the overall volume of the sound.");
private GUIContent rolloffModeLabel = new GUIContent("Volume Rolloff",
"Which type of rolloff curve to use.");
private GUIContent maxDistanceLabel = new GUIContent("Max Distance",
"Max distance is the distance a sound stops attenuating at.");
private GUIContent minDistanceLabel = new GUIContent("Min Distance",
"Within the min distance, the volume will stay at the loudest possible. " +
"Outside this min distance it will begin to attenuate.");
private GUIContent playOnAwakeLabel = new GUIContent("Play On Awake",
"Play the sound when the scene loads.");
private GUIContent directivityLabel = new GUIContent("Directivity",
"Controls the pattern of sound emission of the source. This can change the perceived " +
"loudness of the source depending on which way it is facing relative to the listener. " +
"Patterns are aligned to the 'forward' direction of the parent object.");
private GUIContent directivityAlphaLabel = new GUIContent("Alpha",
"Controls the balance between dipole pattern and omnidirectional pattern for source " +
"emission. By varying this value, differing directivity patterns can be formed.");
private GUIContent directivitySharpnessLabel = new GUIContent("Sharpness",
"Sets the sharpness of the directivity pattern. Higher values will result in increased " +
"directivity.");
private GUIContent gainLabel = new GUIContent("Gain (dB)",
"Applies a gain to the source for adjustment of relative loudness.");
private GUIContent hrtfEnabledLabel = new GUIContent("Enable HRTF",
"Sets HRTF binaural rendering for the source. Note that this setting has no effect when " +
"global low quality mode is selected.");
private GUIContent occlusionLabel = new GUIContent("Enable Occlusion",
"Sets whether the sound of the source should be occluded when passing through objects " +
"between the source and the listener.");
void OnEnable () {
clip = serializedObject.FindProperty("sourceClip");
loop = serializedObject.FindProperty("sourceLoop");
mute = serializedObject.FindProperty("sourceMute");
pitch = serializedObject.FindProperty("sourcePitch");
playOnAwake = serializedObject.FindProperty("playOnAwake");
volume = serializedObject.FindProperty("sourceVolume");
rolloffMode = serializedObject.FindProperty("rolloffMode");
maxDistance = serializedObject.FindProperty("sourceMaxDistance");
minDistance = serializedObject.FindProperty("sourceMinDistance");
directivityAlpha = serializedObject.FindProperty("directivityAlpha");
directivitySharpness = serializedObject.FindProperty("directivitySharpness");
#if UNITY_4_5
directivityTexture = Texture2D.CreateExternalTexture(0, 0, TextureFormat.ARGB32, false, false,
System.IntPtr.Zero);
#else
directivityTexture = Texture2D.blackTexture;
#endif
gainDb = serializedObject.FindProperty("gainDb");
hrtfEnabled = serializedObject.FindProperty("hrtfEnabled");
occlusionEnabled = serializedObject.FindProperty("occlusionEnabled");
}
/// @cond
public override void OnInspectorGUI () {
serializedObject.Update();
EditorGUILayout.PropertyField(clip, clipLabel);
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(mute, muteLabel);
EditorGUILayout.PropertyField(playOnAwake, playOnAwakeLabel);
EditorGUILayout.PropertyField(loop, loopLabel);
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(volume, volumeLabel);
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(pitch, pitchLabel);
EditorGUILayout.Separator();
EditorGUILayout.Slider(gainDb, CardboardAudio.minGainDb, CardboardAudio.maxGainDb, gainLabel);
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(rolloffMode, rolloffModeLabel);
++EditorGUI.indentLevel;
EditorGUILayout.PropertyField(minDistance, minDistanceLabel);
EditorGUILayout.PropertyField(maxDistance, maxDistanceLabel);
--EditorGUI.indentLevel;
if (rolloffMode.enumValueIndex == (int)AudioRolloffMode.Custom) {
EditorGUILayout.HelpBox("Custom rolloff mode is not supported.", MessageType.Error);
}
EditorGUILayout.Separator();
EditorGUILayout.BeginHorizontal();
EditorGUILayout.BeginVertical();
GUILayout.Label(directivityLabel);
++EditorGUI.indentLevel;
EditorGUILayout.Slider(directivityAlpha, 0.0f, 1.0f, directivityAlphaLabel);
EditorGUILayout.Slider(directivitySharpness, 1.0f, 10.0f, directivitySharpnessLabel);
--EditorGUI.indentLevel;
EditorGUILayout.EndVertical();
DrawDirectivityPattern((int)(3.0f * EditorGUIUtility.singleLineHeight));
EditorGUILayout.EndHorizontal();
EditorGUILayout.PropertyField(occlusionEnabled, occlusionLabel);
EditorGUILayout.Separator();
// HRTF toggle can only be modified through the Inspector in Edit mode.
GUI.enabled = !EditorApplication.isPlaying;
EditorGUILayout.PropertyField(hrtfEnabled, hrtfEnabledLabel);
GUI.enabled = true;
serializedObject.ApplyModifiedProperties();
}
/// @endcond
private void DrawDirectivityPattern (int size) {
directivityTexture.Resize(size, size);
// Draw the axes.
Color axisColor = 0.5f * Color.black;
for (int i = 0; i < size; ++i) {
directivityTexture.SetPixel(i, size / 2, axisColor);
directivityTexture.SetPixel(size / 2, i, axisColor);
}
// Draw the 2D polar directivity pattern.
Color cardioidColor = 0.75f * Color.blue;
float offset = 0.5f * size;
float cardioidSize = 0.45f * size;
Vector2[] vertices = CardboardAudio.Generate2dPolarPattern(directivityAlpha.floatValue,
directivitySharpness.floatValue,
180);
for (int i = 0; i < vertices.Length; ++i) {
directivityTexture.SetPixel((int)(offset + cardioidSize * vertices[i].x),
(int)(offset + cardioidSize * vertices[i].y),
cardioidColor);
}
directivityTexture.Apply();
// Show the texture.
GUILayout.Box(directivityTexture);
}
}
fileFormatVersion: 2
guid: 39eb02921e5624cf18f5b235bcc1e1cb
timeCreated: 1447979178
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
/// @ingroup EditorScripts
/// A custom editor for properties on the Cardboard script. This appears in the
/// Inspector window of a Cardboard object. Its purpose is to allow changing the
/// `Cardboard.SDK` object's properties from their default values.
[CustomEditor(typeof(Cardboard))]
public class CardboardEditor : Editor {
GUIContent vrModeLabel = new GUIContent("VR Mode Enabled",
"Sets whether VR mode is enabled.");
GUIContent distortionCorrectionLabel = new GUIContent("Distortion Correction",
"The distortion correction method performed by the SDK.");
GUIContent stereoScreenScale = new GUIContent("Stereo Screen Scale",
"The screen resolution is multiplied by this value when creating the " +
"RenderTexture for the stereo screen.");
GUIContent autoDriftCorrectionLabel = new GUIContent("Auto Drift Correction",
"When enabled, drift in the gyro readings is estimated and removed.");
GUIContent neckModelScaleLabel = new GUIContent("Neck Model Scale",
"The scale factor of the builtin neck model [0..1]. To disable, set to 0.");
#if UNITY_IOS
GUIContent syncWithCardboardLabel = new GUIContent("Sync with Cardboard App",
"Enables the 'Sync with Google Cardboard' slider in the viewer settings dialog.");
#endif
GUIContent alignmentMarkerLabel = new GUIContent("Alignment Marker",
"Whether to draw the alignment marker. The marker is a vertical line that splits " +
"the viewport in half, designed to help users align the screen with the Cardboard.");
GUIContent settingsButtonLabel = new GUIContent("Settings Button",
"Whether to draw the settings button. The settings button opens the " +
"Google Cardboard app to allow the user to configure their individual " +
"settings and Cardboard headset parameters.");
GUIContent backButtonLabel = new GUIContent("Back Button",
"Whether to draw the onscreen Back Button.");
GUIContent tapIsTriggerLabel = new GUIContent("Tap Is Trigger",
"Whether screen taps are treated as trigger events.");
GUIContent editorSettingsLabel = new GUIContent("Unity Editor Emulation Settings",
"Controls for the in-editor emulation of Cardboard.");
GUIContent autoUntiltHeadLabel = new GUIContent("Auto Untilt Head",
"When enabled, just release Ctrl to untilt the head.");
GUIContent screenSizeLabel = new GUIContent("Screen Size",
"The screen size to emulate.");
GUIContent deviceTypeLabel = new GUIContent("Device Type",
"The Cardboard device type to emulate.");
/// @cond HIDDEN
public override void OnInspectorGUI() {
GUI.changed = false;
GUIStyle headingStyle = new GUIStyle(GUI.skin.label);
headingStyle.fontStyle = FontStyle.Bold;
headingStyle.fontSize = 14;
Cardboard cardboard = (Cardboard)target;
EditorGUILayout.LabelField("General Settings", headingStyle);
cardboard.VRModeEnabled =
EditorGUILayout.Toggle(vrModeLabel, cardboard.VRModeEnabled);
cardboard.DistortionCorrection = (Cardboard.DistortionCorrectionMethod)
EditorGUILayout.EnumPopup(distortionCorrectionLabel, cardboard.DistortionCorrection);
float oldScale = cardboard.StereoScreenScale;
float newScale = EditorGUILayout.Slider(stereoScreenScale, oldScale, 0.25f, 2.0f);
if (!Mathf.Approximately(newScale, oldScale)) {
cardboard.StereoScreenScale = newScale;
}
cardboard.NeckModelScale =
EditorGUILayout.Slider(neckModelScaleLabel, cardboard.NeckModelScale, 0, 1);
cardboard.AutoDriftCorrection =
EditorGUILayout.Toggle(autoDriftCorrectionLabel, cardboard.AutoDriftCorrection);
EditorGUILayout.Separator();
EditorGUILayout.LabelField("UI Layer Settings", headingStyle);
cardboard.EnableAlignmentMarker =
EditorGUILayout.Toggle(alignmentMarkerLabel, cardboard.EnableAlignmentMarker);
cardboard.EnableSettingsButton =
EditorGUILayout.Toggle(settingsButtonLabel, cardboard.EnableSettingsButton);
cardboard.BackButtonMode = (Cardboard.BackButtonModes)
EditorGUILayout.EnumPopup(backButtonLabel, cardboard.BackButtonMode);
EditorGUILayout.Separator();
EditorGUILayout.LabelField("Cardboard Settings", headingStyle);
#if UNITY_IOS
cardboard.SyncWithCardboardApp =
EditorGUILayout.Toggle(syncWithCardboardLabel, cardboard.SyncWithCardboardApp);
#endif
cardboard.TapIsTrigger =
EditorGUILayout.Toggle(tapIsTriggerLabel, cardboard.TapIsTrigger);
EditorGUILayout.Separator();
EditorGUILayout.LabelField(editorSettingsLabel, headingStyle);
cardboard.autoUntiltHead =
EditorGUILayout.Toggle(autoUntiltHeadLabel, cardboard.autoUntiltHead);
cardboard.ScreenSize = (CardboardProfile.ScreenSizes)
EditorGUILayout.EnumPopup(screenSizeLabel, cardboard.ScreenSize);
cardboard.DeviceType = (CardboardProfile.DeviceTypes)
EditorGUILayout.EnumPopup(deviceTypeLabel, cardboard.DeviceType);
if (GUI.changed) {
EditorUtility.SetDirty(cardboard);
}
}
}
fileFormatVersion: 2
guid: ed7a9fc9a5d44422b99d0a825d3cbf1e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
using System.Collections;
public class CardboardMenu {
// Setup wizard
//[MenuItem("Cardboard/Cardboard Setup...", false, 20)]
private static void ModifyExistingCamera() {
// Show helper dialog.
CardboardSetup.ShowWindow();
}
[MenuItem("Cardboard/Documentation/Developers Site", false, 100)]
private static void OpenDocumentation() {
Application.OpenURL("https://developers.google.com/cardboard");
}
[MenuItem("Cardboard/Documentation/Unity Guide", false, 100)]
private static void OpenUnityGuide() {
Application.OpenURL("https://developers.google.com/cardboard/unity/guide");
}
[MenuItem("Cardboard/Documentation/Release Notes", false, 100)]
private static void OpenReleaseNotes() {
Application.OpenURL("https://developers.google.com/cardboard/unity/release-notes");
}
[MenuItem("Cardboard/Documentation/Known Issues", false, 100)]
private static void OpenKnownIssues() {
Application.OpenURL("https://developers.google.com/cardboard/unity/release-notes#known_issues");
}
[MenuItem("Cardboard/Report Bug", false, 100)]
private static void OpenReportBug() {
Application.OpenURL("https://github.com/googlesamples/cardboard-unity/issues");
}
[MenuItem("Cardboard/About Cardboard", false, 200)]
private static void OpenAbout() {
EditorUtility.DisplayDialog("Cardboard SDK for Unity",
"Version: " + Cardboard.CARDBOARD_SDK_VERSION + "\n\n"
+ "License: Apache 2.0\n"
+ "Copyright: ©2015 Google Inc. All rights reserved.\n"
+ "See LICENSE for additional license information.",
"OK");
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: b25878e5da54ff84b86545377f3adee5
timeCreated: 1448497144
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed. Click to expand it.
fileFormatVersion: 2
guid: 3bf0ab204a9a747b0874f0d008c54466
timeCreated: 1448497144
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Linq;
/// @ingroup EditorScripts
/// A custom editor for the StereoController script. It exists to add the _Update
/// Stereo Cameras_ button to the StereoController's Inspector window, and to the
/// corresponding main menu entry and Camera context menu command. The usage of the
/// these actions is described in StereoController.
[CustomEditor(typeof(StereoController))]
public class StereoControllerEditor : Editor {
/// Name of button, and part of "Undo ..." message.
public const string ACTION_NAME = "Update Stereo Cameras";
private GUIContent updateButton =
new GUIContent(ACTION_NAME, "Copy all Camera settings to the stereo cameras.");
/// @cond HIDDEN
public override void OnInspectorGUI() {
DrawDefaultInspector();
GUILayout.BeginHorizontal(GUILayout.ExpandHeight(false));
GUILayout.FlexibleSpace();
if (GUILayout.Button(updateButton, GUILayout.ExpandWidth(false))) {
var controller = (StereoController)target;
DoUpdateStereoCameras(controller.gameObject);
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
}
[MenuItem("Component/Cardboard/Update Stereo Cameras", true, 40)]
public static bool CanUpdateStereoCameras() {
// Make sure all selected items have valid cameras.
return Selection.gameObjects.Where(go => CanUpdateStereoCameras(go)).Count()
== Selection.gameObjects.Length;
}
[MenuItem("CONTEXT/Camera/Update Stereo Cameras", true, 41)]
public static bool CanUpdateStereoCamerasContext(MenuCommand command) {
var camera = (Camera)command.context;
return CanUpdateStereoCameras(camera.gameObject);
}
[MenuItem("Component/Cardboard/Update Stereo Cameras", false, 42)]
public static void UpdateStereoCameras() {
foreach (var go in Selection.gameObjects) {
DoUpdateStereoCameras(go);
}
}
[MenuItem("CONTEXT/Camera/Update Stereo Cameras", false, 43)]
public static void UpdateStereoCamerasContext(MenuCommand command) {
var camera = (Camera)command.context;
DoUpdateStereoCameras(camera.gameObject);
}
/// @endcond
private static bool CanUpdateStereoCameras(GameObject go) {
return go != null &&
go.hideFlags == HideFlags.None &&
go.GetComponent<Camera>() != null &&
go.GetComponent<CardboardEye>() == null;
}
private static void DoUpdateStereoCameras(GameObject go) {
// Make sure there is a StereoController.
var controller = go.GetComponent<StereoController>();
if (controller == null) {
controller = go.AddComponent<StereoController>();
Undo.RegisterCreatedObjectUndo(controller, ACTION_NAME);
}
// Remember current state of stereo rig.
#if !UNITY_5
bool hadSkybox = go.GetComponent<SkyboxMesh>() != null;
#endif
bool hadHead = controller.Head != null;
bool hadEyes = controller.Eyes.Length > 0;
controller.AddStereoRig();
// Support undo...
#if !UNITY_5
// Skybox mesh. Deletes it if camera is not Main.
var skybox = go.GetComponent<SkyboxMesh>();
if (skybox != null) {
if (!hadSkybox) {
Undo.RegisterCreatedObjectUndo(skybox, ACTION_NAME);
} else if (go.GetComponent<Camera>().tag != "MainCamera") {
Undo.DestroyObjectImmediate(skybox);
}
}
#endif
// Head.
var head = go.GetComponent<CardboardHead>();
if (head != null && !hadHead) {
Undo.RegisterCreatedObjectUndo(head, ACTION_NAME);
}
// Eyes. Synchronizes them with controller's camera too.
foreach (var eye in controller.Eyes) {
if (!hadEyes) {
Undo.RegisterCreatedObjectUndo(eye.gameObject, ACTION_NAME);
} else {
Undo.RecordObject(eye.GetComponent<Camera>(), ACTION_NAME);
eye.CopyCameraAndMakeSideBySide(controller);
}
}
}
}
fileFormatVersion: 2
guid: 05c5a7cf1f7ca4a0db9fef203f559380
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
fileFormatVersion: 2
guid: 3cab1b28162b0db4e9b2f170f2b624e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f1c4d995e5a7540c5bc988de855d4d24
folderAsset: yes
DefaultImporter:
userData:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 114: {fileID: 11400000}
- 114: {fileID: 11400004}
m_Layer: 5
m_Name: CardboardGUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 33: {fileID: 3300000}
- 23: {fileID: 2300000}
- 64: {fileID: 6400000}
- 114: {fileID: 11400002}
m_Layer: 5
m_Name: GUIScreen
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400002}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400000}
m_RootOrder: 0
--- !u!23 &2300000
Renderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_LightmapIndex: 255
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
m_Materials:
- {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_LightProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!64 &6400000
MeshCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_SmoothSphereCollisions: 0
m_Convex: 0
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 46945e3ed78924bdea8171f8de038346, type: 3}
m_Name:
m_EditorClassIdentifier:
background: {r: 0, g: 0, b: 0, a: 0}
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b076d97177f8c446c97ffb15e968d1af, type: 3}
m_Name:
m_EditorClassIdentifier:
rect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!114 &11400004
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f06724eec91fb4704a525c71a8e8deea, type: 3}
m_Name:
m_EditorClassIdentifier:
head: {fileID: 0}
pointerImage: {fileID: 2800000, guid: 53a9e781f887f46e1817489bff4b661d, type: 3}
pointerSize: {x: 16, y: 16}
pointerSpot: {x: 8, y: 8}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1
fileFormatVersion: 2
guid: dcd8898a5b8c54c59a1b18bcf72ebd37
NativeFormatImporter:
userData:
fileFormatVersion: 2
guid: a177aba586fa54700a4ceaac810edae9
NativeFormatImporter:
userData:
# Legacy Prefabs
This section describes the prefabs that are provided by the package for legacy
purposes.
## CardboardGUI
This prefab captures the _OnGUI_ pass of a frame into a texture. It draws the
texture on a quad in the scene, along with cursor image for the mouse pointer,
if you specify one. It can move the mouse by tracking the user's gaze and it
can read the trigger to "click" UI elements.
To use it, add an instance of the prefab to the scene. It should not be placed
under a `CardboardHead` if you want the user's gaze to control the mouse, but can
be if you use an alternative input device. The prefab contains one child called
GUIScreen, which by default draws the entire screen's OnGUI layer on a single
quad.
It is possible to add more such children to the CardboardGUI object. Just
duplicate the `GUIScreen` child in the Editor as needed, adjust each child's
_Rect_ to pick out a different region of the OnGUI layer, and set its
_Transform_ to place that region in the scene. In this way you can completely
rearrange the GUI layout when in VR Mode without changing any `OnGUI()` functions'
code or behavior.
`CardboardGUI` and its Window children have visibility controls that you can use
to convert a non-transient (i.e. always on) UI to a transient (popup) UI when in
VR Mode. Non-transient UI is usually placed along the edges of the screen,
which in HMD stereo systems are extremely hard to see. For VR Mode, you will
likely need to rearrange the UI to appear front-and-center, perhaps depending on
which way the user looks. This obscures the scene itself, unless the UI can be
hidden when not needed.
fileFormatVersion: 2
guid: ba58321f331f049e990fbd5441a0790b
timeCreated: 1435021690
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0fcce2d2855e9448f84d882e29f3e252
folderAsset: yes
DefaultImporter:
userData:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
/// @ingroup LegacyScripts
/// A utility class for redirecting OnGUI()-based UI elements onto a texture,
/// which can be drawn on a surface in the scene and thus appear in stereo.
///
/// The auxiliary CardboardOnGUIWindow class handles displaying the texture
/// in the scene. CardboardOnGUI captures the OnGUI() calls, which need to be
/// modified slightly for this to work, and handles feeding back fake mouse
/// events into the Unity player based on the user's head and trigger actions.
///
/// If the option is available, it is probably better to use a real 3D
/// GUI such as the new Unity4.6+ system. But if you just want to get
/// existing projects based on OnGUI() to work in Cardboard, this class
/// can help.
///
/// Position the GUI mesh in 3D space using the gameobject's transform. Note: do
/// not place the object as a child of the CardboardHead, or the user will not be
/// able to look at different parts of the UI because it will move with them. It is
/// better to place it as a sibling of the Head object.
public class CardboardOnGUI : MonoBehaviour {
/// The .NET type of an `OnGUI()` method.
public delegate void OnGUICallback();
/// The list of `OnGUI()` calls that will be captured in the texture. Add your
/// script's OnGUI method to enable the script's GUI in the CardboardOnGUI window.
public static event OnGUICallback onGUICallback;
/// Unity is going to call OnGUI() methods as usual, in addition to them
/// being called by the onGUICallback event. To prevent this double
/// call from affecting game logic, modify the OnGUI() method. At the
/// very top, add "if (!CardboardOnGUI.OKToDraw(this)) return;".
/// This will ensure only one OnGUI() call sequence occurs per frame,
/// whether in VR Mode or not.
public static bool OKToDraw(MonoBehaviour mb) {
return okToDraw && (mb == null || mb.enabled && mb.gameObject.activeInHierarchy);
}
private static bool okToDraw;
/// This is your global visibility control for whether CardboardOnGUI shows anything
/// in the scene. Set it to _true_ to allow the GUI to draw, and _false_ to hide
/// it. The purpose is so you can move GUI elements away from the edges of the
/// screen (which are hard to see in VR Mode), and instead pop up the GUI when it
/// is needed, and dismiss it when not.
public static bool IsGUIVisible {
get {
return isGUIVisible && Cardboard.SDK.VRModeEnabled && SystemInfo.supportsRenderTextures;
}
set {
isGUIVisible = value;
}
}
private static bool isGUIVisible;
/// A wrapper around Cardboard#Triggered that hides the trigger event
/// when the GUI is visible (i.e. when you set #IsGUIVisible to true).
/// By using this flag in your scripts rather than Cardboard#Triggered,
/// you allow the GUI to take the trigger events when it is visible.
/// This is when the trigger is needed for clicking buttons.
/// When the GUI is hidden, the trigger events pass through.
public static bool Triggered {
get {
return !IsGUIVisible && Cardboard.SDK.Triggered;
}
}
/// The GUI texture is cleared to this color before any OnGUI methods are called
/// during the capture phase.
[Tooltip("The color and transparency of the overall GUI screen.")]
public Color background = Color.clear;
// Texture that captures the OnGUI rendering.
private RenderTexture guiScreen;
void Awake() {
if (!SystemInfo.supportsRenderTextures) {
Debug.LogWarning("CardboardOnGUI disabled. RenderTextures are not supported, "
+ "either due to license or platform.");
enabled = false;
}
}
void Start() {
Create();
}
/// Sets up the render texture and all the windows that will show parts of it.
public void Create() {
if (guiScreen != null) {
guiScreen.Release();
}
RenderTexture stereoScreen = Cardboard.SDK.StereoScreen;
int width = stereoScreen ? stereoScreen.width : Screen.width;
int height = stereoScreen ? stereoScreen.height : Screen.height;
guiScreen = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32);
guiScreen.Create();
foreach (var guiWindow in GetComponentsInChildren<CardboardOnGUIWindow>(true)) {
guiWindow.Create(guiScreen);
}
}
void LateUpdate() {
// When not in VR Mode, let normal OnGUI() calls proceed.
okToDraw = !Cardboard.SDK.VRModeEnabled;
}
void OnGUI() {
if (!IsGUIVisible) {
return; // Nothing to do.
}
// OnGUI() is called multiple times per frame: once with event type "Layout",
// then once for each user input (key, mouse, touch, etc) that occurred in this
// frame, then finally once with event type "Repaint", during which the actual
// GUI drawing is done. This last phase is the one we have to capture.
RenderTexture prevRT = null;
if (Event.current.type == EventType.Repaint) {
// Redirect rendering to our texture.
prevRT = RenderTexture.active;
RenderTexture.active = guiScreen;
GL.Clear(false, true, background);
}
if (onGUICallback != null) {
// Call all the OnGUI methods that have registered.
okToDraw = true;
onGUICallback();
okToDraw = false;
}
if (Event.current.type == EventType.Repaint) {
CardboardOnGUIMouse cgm = GetComponent<CardboardOnGUIMouse>();
if (cgm != null) {
cgm.DrawPointerImage();
}
// Clean up.
RenderTexture.active = prevRT;
}
}
}
fileFormatVersion: 2
guid: 46945e3ed78924bdea8171f8de038346
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using System.Collections;
/// @ingroup LegacyScripts
/// This script shows the location of the mouse pointer on the GUI texture.
///
/// Attach this script to the same object as CardboardOnGUI itself. It
/// supports moving the mouse with the user's gaze, and clicking on the UI with the
/// trigger, but other mouse-controlling devices, such as gamepads, will work as well.
public class CardboardOnGUIMouse : MonoBehaviour {
/// The image to draw into the captured GUI texture representing the current
/// pointer position.
[Tooltip("What to draw on the GUI surface for the simulated mouse pointer.")]
public Texture pointerImage;
/// The size of the pointer image in _screen coordinates_, that is, the same
/// coordinates used in your OnGUI functions to place UI elements on the screen
/// when the app is not in VR Mode. It is independent of the actual resolution of
/// the image. Leave at 0,0 to use actual image size.
[Tooltip("The size to draw the pointer in screen coordinates. " +
"Leave at 0,0 to use actual image size.")]
public Vector2 pointerSize;
/// The location of the pointer's _hot spot_ relative to the top left corner of
/// the pointer image. This is in _screen coordinates_, and does not
/// depend on the actual resolution of the pointer image.
[Tooltip("The screen pixel of the image to position over the mouse point.")]
public Vector2 pointerSpot;
// Whether to draw a pointer on the GUI surface, so the user can see
// where they are about to click.
private bool pointerVisible;
private int pointerX;
private int pointerY;
void LateUpdate() {
StereoController controller = Cardboard.Controller;
CardboardHead head = controller ? controller.Head : null;
if (head == null) { // Pointer not being controlled by user's head, so we bail.
pointerVisible = true; // Draw pointer wherever Unity thinks the mouse is.
return;
}
if (!CardboardOnGUI.IsGUIVisible) {
pointerVisible = false; // No GUI == no pointer to worry about.
return;
}
// Find which CardboardOnGUIWindow the user's gaze intersects first, if any.
Ray ray = head.Gaze;
CardboardOnGUIWindow hitWindow = null;
float minDist = Mathf.Infinity;
Vector2 pos = Vector2.zero;
foreach (var guiWindow in GetComponentsInChildren<CardboardOnGUIWindow>()) {
RaycastHit hit;
if (guiWindow.GetComponent<Collider>().Raycast(ray, out hit, Mathf.Infinity)
&& hit.distance < minDist) {
minDist = hit.distance;
hitWindow = guiWindow;
pos = hit.textureCoord;
}
}
if (hitWindow == null) {
// Don't draw the pointer unless the user is looking at a pixel of the GUI screen.
pointerVisible = false;
return;
}
// Convert from the intersected window's texture coordinates to screen coordinates.
pos.x = hitWindow.rect.xMin + hitWindow.rect.width * pos.x;
pos.y = hitWindow.rect.yMin + hitWindow.rect.height * pos.y;
pointerX = (int)(pos.x * Screen.width);
pointerY = (int)(pos.y * Screen.height);
// Move the mouse/touch point to the determined screen point.
// Unity GUI Y-coordinates ascend top-to-bottom, as do the quad's texture coordinates,
// while screen Y-coordinates ascend bottom-to-top.
Cardboard.SDK.SetTouchCoordinates(pointerX, Screen.height - pointerY);
// OK to draw the pointer image.
pointerVisible = true;
}
/// Draw the fake mouse pointer. Called by CardboardOnGUI after the rest of the UI is done.
public void DrawPointerImage() {
if (pointerImage == null || !pointerVisible || !enabled) {
return;
}
Vector2 pos = new Vector2(pointerX, pointerY);
Vector2 spot = pointerSpot;
Vector2 size = pointerSize;
if (size.sqrMagnitude < 1) { // If pointerSize was left == 0, just use size of image.
size.x = pointerImage.width;
size.y = pointerImage.height;
}
GUI.DrawTexture(new Rect(pos.x - spot.x, Screen.height - pos.y - spot.y, size.x, size.y),
pointerImage, ScaleMode.StretchToFill);
}
}
fileFormatVersion: 2
guid: f06724eec91fb4704a525c71a8e8deea
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
/// @ingroup LegacyScripts
/// Works with CardboardOnGUI to show all or part of the OnGUI-rendered
/// UI on a mesh in the scene.
///
/// There should be one or more of these as children of the CardboardOnGUI gameobject.
/// Each one specifies the region of the captured OnGUI screen to show on its own mesh.
/// This allows you to place pieces of the GUI in the scene at different distances and angles
/// to the user without having to change any of the OnGUI methods themselves.
///
/// Each instance can pick out a different region of the GUI texture to show (see
/// #rect). Use the object's transform to position and orient this region in
/// space relative to the parent CardboardOnGUI object. The mesh is automatically
/// scaled to account for the aspect ratio of the overall GUI.
///
/// This layout is independent of the normal OnGUI layout when the app is not in VR Mode.
/// The #enabled flag on individual CardboardOnGUIWindows can be used to turn on or
/// off the separate regions of the GUI.
///
/// It must be attached on a child gameobject of the CardboardOnGUI,
/// accompanied by a `MeshFilter`, a `MeshRenderer`, and `Collider` components.
/// The mesh will be used to draw the texture, and the collider used to check for
/// intersections with the user's gaze for mouse positioning.
///
/// The rendering code here takes care of shader and texture setup. The
/// choice of mesh is yours, but a quad looks good. The mesh is scaled to
/// match the aspect ratio of the screen region shown. The attached
/// collider is used for ray instersection with the user's gaze, so it
/// should return texture coordinates that match those of the meshfilter.
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(Collider))]
public class CardboardOnGUIWindow : MonoBehaviour {
private MeshRenderer meshRenderer;
/// Determines the portion of the CardboardOnGUI texture to draw on the attached
/// mesh. The units are exactly the same as a Camera component's `Viewport Rect`:
/// `(0,0)` is the bottom left corner and `(1,1)` the top right. Use it to pick out
/// the region of the GUI to draw on this mesh.
[Tooltip("The portion of the OnGUI screen to show in this window. " +
"Use the same units as for Camera viewports.")]
public Rect rect;
void Awake() {
meshRenderer = GetComponent<MeshRenderer>();
if (!SystemInfo.supportsRenderTextures) {
enabled = false;
}
}
void Reset() {
rect = new Rect(0,0,1,1); // Make window show the full GUI screen.
}
/// Make a material that points to the target texture. Texture scale
/// and offset will be controlled by #rect.
public void Create(RenderTexture target) {
meshRenderer.material = new Material(Shader.Find("Cardboard/GUIScreen")) {
mainTexture = target,
mainTextureOffset = rect.position,
mainTextureScale = rect.size
};
}
// Turn off this window.
void OnDisable() {
meshRenderer.enabled = false;
}
void LateUpdate() {
// Only render window when the overall GUI is enabled.
meshRenderer.enabled = CardboardOnGUI.IsGUIVisible;
// Keep material and object scale in sync with rect.
meshRenderer.material.mainTextureOffset = rect.position;
meshRenderer.material.mainTextureScale = rect.size;
float aspect = (Screen.width * rect.width) /
(Screen.height * rect.height);
transform.localScale = new Vector3(aspect, 1, 1);
}
}
fileFormatVersion: 2
guid: b076d97177f8c446c97ffb15e968d1af
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Original code by Nora
// http://stereoarts.jp
//
// Retrieved from:
// https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=844#p28982
//
// Modified by Google:
// Combined the 6 separate meshes into a single mesh with submeshes.
using UnityEngine;
/// @ingroup LegacyScripts
/// This script builds a stereo correct version of the skybox.
///
/// Unity 4's built-in skybox backgrounds do not work correctly for stereo rendering.
/// Since the same exact image is rendered to each eye, the background has zero
/// parallax. Given the optics of Cardboard, this yields an effective stereo depth
/// that is likely right in the middle, or worse, front of the scene. The results
/// in a visually painful parallax clash with other objects in the scene.
///
/// This script should be attached to the Camera which represents the primary
/// viewpoint of the player (such as _Main Camera_). At runtime it builds a mesh that
/// will be textured with the camera's skybox material. The mesh is scaled up to
/// just fit inside the far clipping plane, and kept centered on the camera's
/// position.
[RequireComponent(typeof(Camera))]
public class SkyboxMesh : MonoBehaviour {
#if UNITY_5
void Awake() {
Debug.Log("SkyboxMesh is not needed in Unity 5");
Component.Destroy(this);
}
#else
/// The overall shape of the generated sky mesh.
public enum Shape {
Sphere,
Cube,
}
/// The overall shape of the generated sky mesh. The mesh has 6 sides regardless
/// of shape, one for each texture in the skybox material. The `shape` simply
/// determines whether those sides are convex or flat.
public Shape shape = Shape.Sphere;
/// Controls the mesh resolution: Each side of the mesh is an NxN grid of
/// triangles, where N = `segments`.
public int segments = 32;
/// The skybox mesh will be set to this layer. If you wish for only certain
/// cameras to see the skybox mesh, choose a layer for it and make sure that
/// only those cameras render that layer.
public int layer = 0;
private GameObject skybox;
void Awake() {
var sky = GetComponent<Skybox>();
Material skymat = sky != null ? sky.material : RenderSettings.skybox;
if (skymat == null) {
enabled = false;
return;
}
skybox = new GameObject(skymat.name + "SkyMesh");
skybox.transform.parent = transform;
skybox.transform.localPosition = Vector3.zero;
skybox.layer = layer;
var filter = skybox.AddComponent<MeshFilter>();
filter.mesh = _CreateSkyboxMesh();
Material mat = new Material(Shader.Find("Cardboard/SkyboxMesh"));
var render = skybox.AddComponent<MeshRenderer>();
render.sharedMaterials = new Material[] {
new Material(mat) { mainTexture = skymat.GetTexture("_FrontTex") },
new Material(mat) { mainTexture = skymat.GetTexture("_LeftTex") },
new Material(mat) { mainTexture = skymat.GetTexture("_BackTex") },
new Material(mat) { mainTexture = skymat.GetTexture("_RightTex") },
new Material(mat) { mainTexture = skymat.GetTexture("_UpTex") },
new Material(mat) { mainTexture = skymat.GetTexture("_DownTex") }
};
render.castShadows = false;
render.receiveShadows = false;
}
void LateUpdate() {
var camera = GetComponent<Camera>();
// Only visible if the owning camera needs it.
skybox.GetComponent<Renderer>().enabled =
camera.enabled && (camera.clearFlags == CameraClearFlags.Skybox);
// Scale up to just fit inside the far clip plane.
Vector3 scale = transform.lossyScale;
float far = camera.farClipPlane * 0.95f;
if (shape == Shape.Cube) {
far /= Mathf.Sqrt(3); // Corners need to fit inside the frustum.
}
scale.x = far / scale.x;
scale.y = far / scale.y;
scale.z = far / scale.z;
// Center on the camera.
skybox.transform.localPosition = Vector3.zero;
skybox.transform.localScale = scale;
// Keep orientation fixed in the world.
skybox.transform.rotation = Quaternion.identity;
}
Mesh _CreateMesh() {
Mesh mesh = new Mesh();
int hvCount2 = this.segments + 1;
int hvCount2Half = hvCount2 / 2;
int numVertices = hvCount2 * hvCount2;
int numTriangles = this.segments * this.segments * 6;
Vector3[] vertices = new Vector3[numVertices];
Vector2[] uvs = new Vector2[numVertices];
int[] triangles = new int[numTriangles];
float scaleFactor = 2.0f / (float)this.segments;
float uvFactor = 1.0f / (float)this.segments;
if (this.segments <= 1 || this.shape == Shape.Cube) {
float ty = 0.0f, py = -1.0f;
int index = 0;
for (int y = 0; y < hvCount2; ++y, ty += uvFactor, py += scaleFactor) {
float tx = 0.0f, px = -1.0f;
for (int x = 0; x < hvCount2; ++x, ++index, tx += uvFactor, px += scaleFactor) {
vertices[index] = new Vector3(px, py, 1.0f);
uvs[index] = new Vector2(tx, ty);
}
}
} else {
float ty = 0.0f, py = -1.0f;
int index = 0, indexY = 0;
for (int y = 0; y <= hvCount2Half;
++y, indexY += hvCount2, ty += uvFactor, py += scaleFactor) {
float tx = 0.0f, px = -1.0f, py2 = py * py;
int x = 0;
for (; x <= hvCount2Half; ++x, ++index, tx += uvFactor, px += scaleFactor) {
float d = Mathf.Sqrt(px * px + py2 + 1.0f);
float theta = Mathf.Acos(1.0f / d);
float phi = Mathf.Atan2(py, px);
float sinTheta = Mathf.Sin(theta);
vertices[index] = new Vector3(
sinTheta * Mathf.Cos(phi),
sinTheta * Mathf.Sin(phi),
Mathf.Cos(theta));
uvs[index] = new Vector2(tx, ty);
}
int indexX = hvCount2Half - 1;
for (; x < hvCount2; ++x, ++index, --indexX, tx += uvFactor, px += scaleFactor) {
Vector3 v = vertices[indexY + indexX];
vertices[index] = new Vector3(-v.x, v.y, v.z);
uvs[index] = new Vector2(tx, ty);
}
}
indexY = (hvCount2Half - 1) * hvCount2;
for (int y = hvCount2Half + 1; y < hvCount2;
++y, indexY -= hvCount2, ty += uvFactor, py += scaleFactor) {
float tx = 0.0f, px = -1.0f;
int x = 0;
for (; x <= hvCount2Half; ++x, ++index, tx += uvFactor, px += scaleFactor) {
Vector3 v = vertices[indexY + x];
vertices[index] = new Vector3(v.x, -v.y, v.z);
uvs[index] = new Vector2(tx, ty);
}
int indexX = hvCount2Half - 1;
for (; x < hvCount2; ++x, ++index, --indexX, tx += uvFactor, px += scaleFactor) {
Vector3 v = vertices[indexY + indexX];
vertices[index] = new Vector3(-v.x, -v.y, v.z);
uvs[index] = new Vector2(tx, ty);
}
}
}
for (int y = 0, index = 0, ofst = 0; y < this.segments; ++y, ofst += hvCount2) {
int y0 = ofst, y1 = ofst + hvCount2;
for (int x = 0; x < this.segments; ++x, index += 6) {
triangles[index + 0] = y0 + x;
triangles[index + 1] = y1 + x;
triangles[index + 2] = y0 + x + 1;
triangles[index + 3] = y1 + x;
triangles[index + 4] = y1 + x + 1;
triangles[index + 5] = y0 + x + 1;
}
}
mesh.vertices = vertices;
mesh.uv = uvs;
mesh.triangles = triangles;
return mesh;
}
CombineInstance _CreatePlane(Mesh mesh, Quaternion rotation) {
return new CombineInstance() {
mesh = mesh,
subMeshIndex = 0,
transform = Matrix4x4.TRS(Vector3.zero, rotation, Vector3.one)};
}
Mesh _CreateSkyboxMesh() {
Mesh mesh = _CreateMesh();
var comb = new CombineInstance[] {
_CreatePlane(mesh, Quaternion.identity),
_CreatePlane(mesh, Quaternion.Euler(0.0f, 90.0f, 0.0f)),
_CreatePlane(mesh, Quaternion.Euler(0.0f, 180.0f, 0.0f)),
_CreatePlane(mesh, Quaternion.Euler(0.0f, 270.0f, 0.0f)),
_CreatePlane(mesh, Quaternion.Euler(-90.0f, 0.0f, 0.0f)),
_CreatePlane(mesh, Quaternion.Euler(90.0f, 0.0f, 0.0f))};
Mesh skymesh = new Mesh();
skymesh.CombineMeshes(comb, false, true);
return skymesh;
}
#endif
}
fileFormatVersion: 2
guid: 1842d86d69a644a109b06ba5a5935819
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using UnityEngine;
using System.Collections;
/// @ingroup LegacyScripts
///
/// This script can be attached to a Lens Flare to make it stereo-aware in Directional mode.
///
/// Unity 4's built-in lens flares do not work correctly for stereo rendering when in
/// Directional mode, for similar reasons as the skybox.
///
/// To use it, add the script to a Lens Flare and clear the flare's Directional flag
/// so that the flare is actually positional. This script keeps the flare at a
/// distance well away from the mono camera along the flare's own forward vector,
/// thus recreating the directional behavior, but with proper stereo parallax. The
/// flare is repositioned relative to each camera that renders it.
[RequireComponent(typeof(LensFlare))]
public class StereoLensFlare : MonoBehaviour {
#if UNITY_5
void Awake() {
Debug.Log("StereoLensFlare is not needed in Unity 5.");
Component.Destroy(this);
}
#else
/// Sets the distance to the flare as a fraction of the camera's far clipping distance.
[Tooltip("Fraction of the camera's far clip distance " +
"at which to position the flare.")]
[Range(0,1)]
public float range = 0.75f;
// Position the flare relative to the camera about to render it.
void OnWillRenderObject() {
transform.position = Camera.current.transform.position -
range * Camera.current.farClipPlane * transform.forward;
}
#endif
}
fileFormatVersion: 2
guid: 8c99539c899ef4de09438c9a626c0c91
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
fileFormatVersion: 2
guid: 80e6cdf429de247a792161c31b9b2ce2
folderAsset: yes
DefaultImporter:
userData:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 20: {fileID: 2000000}
- 124: {fileID: 12400000}
- 114: {fileID: 11400000}
m_Layer: 0
m_Name: Camera Right
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 20: {fileID: 2000002}
- 124: {fileID: 12400002}
- 114: {fileID: 11400002}
m_Layer: 0
m_Name: Camera Left
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100004
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400004}
- 114: {fileID: 11400004}
m_Layer: 0
m_Name: CardboardAdapter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: .0299999993, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400004}
m_RootOrder: 0
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -.0299999993, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400004}
m_RootOrder: 1
--- !u!4 &400004
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400000}
- {fileID: 400002}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!20 &2000000
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: .5
y: 0
width: .5
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!20 &2000002
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: .5
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c9cfdc6c389e2742aa40f991195d828, type: 3}
m_Name:
m_EditorClassIdentifier:
eye: 1
toggleCullingMask:
serializedVersion: 2
m_Bits: 0
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c9cfdc6c389e2742aa40f991195d828, type: 3}
m_Name:
m_EditorClassIdentifier:
eye: 0
toggleCullingMask:
serializedVersion: 2
m_Bits: 0
--- !u!114 &11400004
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1578549c7fcc4f6fa1b063992091672, type: 3}
m_Name:
m_EditorClassIdentifier:
trackRotation: 1
trackPosition: 1
target: {fileID: 0}
updateEarly: 0
--- !u!124 &12400000
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
--- !u!124 &12400002
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100004}
m_IsPrefabParent: 1
m_IsExploded: 1
fileFormatVersion: 2
guid: e2caa624e4c89492dbb6df8d93901ef9
NativeFormatImporter:
userData:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &103798
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 497858}
- 114: {fileID: 11437632}
m_Layer: 0
m_Name: CardboardAudioRoom
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &497858
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 103798}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 6, y: 4, z: 10}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11437632
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 103798}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d2722c2401e34d51bf5b473ef7aeefb, type: 3}
m_Name:
m_EditorClassIdentifier:
leftWall: 4
rightWall: 4
floor: 13
ceiling: 14
backWall: 4
frontWall: 4
reflectivity: 1
reverbGainDb: 0
reverbBrightness: 0
reverbTime: 1
size: {x: 1, y: 1, z: 1}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 0}
propertyPath: leftWall
value: 4
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: rightWall
value: 4
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: ceiling
value: 14
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: backWall
value: 4
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: frontWall
value: 4
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: m_LocalScale.x
value: 6
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: m_LocalScale.z
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 103798}
m_IsPrefabParent: 1
fileFormatVersion: 2
guid: c162c5667f1844e798189ae778eafc76
timeCreated: 1448878013
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &106086
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 434824}
- 114: {fileID: 11461060}
m_Layer: 0
m_Name: CardboardAudioSource
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &434824
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 106086}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11461060
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 106086}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6dbca64e524ea44f9b26142ec59aca8a, type: 3}
m_Name:
m_EditorClassIdentifier:
directivityAlpha: 0
directivitySharpness: 1
gainDb: 0
occlusionEnabled: 0
playOnAwake: 1
rolloffMode: 0
sourceClip: {fileID: 0}
sourceLoop: 1
sourceMute: 0
sourcePitch: 1
sourceVolume: 1
sourceMaxDistance: 500
sourceMinDistance: 0
hrtfEnabled: 1
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 106086}
m_IsPrefabParent: 1
fileFormatVersion: 2
guid: 82b70a42d67ea49d4a2e3bd826e9a512
timeCreated: 1448877677
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 20: {fileID: 2000000}
- 124: {fileID: 12400000}
- 114: {fileID: 11400000}
m_Layer: 0
m_Name: Camera Right
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400002}
- 20: {fileID: 2000002}
- 124: {fileID: 12400002}
- 114: {fileID: 11400002}
m_Layer: 0
m_Name: Camera Left
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100004
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400004}
- 114: {fileID: 11400004}
m_Layer: 0
m_Name: CardboardHead
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &100006
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400006}
- 20: {fileID: 2000004}
- 124: {fileID: 12400004}
- 92: {fileID: 9246874}
- 81: {fileID: 8100000}
- 114: {fileID: 11400006}
- 114: {fileID: 11400008}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: .0299999993, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400006}
m_RootOrder: 1
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -.0299999993, y: -0, z: -0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 400006}
m_RootOrder: 0
--- !u!4 &400004
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400006}
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!4 &400006
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400002}
- {fileID: 400000}
m_Father: {fileID: 400004}
m_RootOrder: 0
--- !u!20 &2000000
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: .5
y: 0
width: .5
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!20 &2000002
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: .5
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!20 &2000004
Camera:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: 1}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!81 &8100000
AudioListener:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
--- !u!92 &9246874
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c9cfdc6c389e2742aa40f991195d828, type: 3}
m_Name:
m_EditorClassIdentifier:
eye: 1
toggleCullingMask:
serializedVersion: 2
m_Bits: 0
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5c9cfdc6c389e2742aa40f991195d828, type: 3}
m_Name:
m_EditorClassIdentifier:
eye: 0
toggleCullingMask:
serializedVersion: 2
m_Bits: 0
--- !u!114 &11400004
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100004}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1578549c7fcc4f6fa1b063992091672, type: 3}
m_Name:
m_EditorClassIdentifier:
trackRotation: 1
trackPosition: 1
target: {fileID: 0}
updateEarly: 0
--- !u!114 &11400006
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b6788e8e1b3f7447db6657ef0959d3ce, type: 3}
m_Name:
m_EditorClassIdentifier:
directRender: 1
keepStereoUpdated: 0
stereoMultiplier: 1
matchMonoFOV: 0
matchByZoom: 0
centerOfInterest: {fileID: 0}
radiusOfInterest: 0
checkStereoComfort: 1
stereoAdjustSmoothing: .100000001
screenParallax: 0
stereoPaddingX: 0
stereoPaddingY: 0
--- !u!114 &11400008
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1156c073149742478887bb24456f32d, type: 3}
m_Name:
m_EditorClassIdentifier:
globalGainDb: 0
worldScale: 1
quality: 1
--- !u!124 &12400000
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
--- !u!124 &12400002
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100002}
m_Enabled: 1
--- !u!124 &12400004
Behaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100006}
m_Enabled: 1
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100004}
m_IsPrefabParent: 1
m_IsExploded: 1
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.