Compare commits

..

5 Commits

Author SHA1 Message Date
9f21be7bbc
Merge remote-tracking branch 'origin/Scripting' into Assets
# Conflicts:
#	Assets/Scenes/FabLab/FabLab.unity
2023-01-11 16:16:01 +01:00
6c93237640 Fixing MovableFurniture 2023-01-11 15:35:48 +01:00
e3858311d7 Add Collider to Roof 2023-01-11 09:13:33 +01:00
8e129d8f6c Grab working 2023-01-10 17:09:03 +01:00
150ba3f8e8 Add Steamvr Package 2023-01-10 13:17:49 +01:00
1633 changed files with 304663 additions and 1570 deletions

View File

@ -0,0 +1,37 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices:
- XRController
m_UpdateMode: 1
m_MaxEventBytesPerUpdate: 5242880
m_MaxQueuedEventsPerUpdate: 1000
m_CompensateForScreenOrientation: 1
m_BackgroundBehavior: 0
m_EditorInputBehaviorInPlayMode: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_ButtonReleaseThreshold: 0.75
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
m_DisableRedundantEventsMerging: 0
m_ShortcutKeysConsumeInputs: 0
m_iOSSettings:
m_MotionUsage:
m_Enabled: 0
m_Description:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ef595853b3ac1ff4d894d592be7c38b8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ea6b97e2a41b79042a2f7d5ae2227ce2 guid: ea6b97e2a41b79042a2f7d5ae2227ce2
ModelImporter: ModelImporter:
serializedVersion: 19301 serializedVersion: 21300
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
materials: materials:
@ -14,6 +14,7 @@ ModelImporter:
bakeSimulation: 0 bakeSimulation: 0
resampleCurves: 1 resampleCurves: 1
optimizeGameObjects: 0 optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName: motionNodeName:
rigImportErrors: rigImportErrors:
rigImportWarnings: rigImportWarnings:
@ -31,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -43,21 +44,27 @@ ModelImporter:
importBlendShapes: 1 importBlendShapes: 1
importCameras: 1 importCameras: 1
importLights: 1 importLights: 1
nodeNameCollisionStrategy: 0
fileIdsGeneration: 2 fileIdsGeneration: 2
swapUVChannels: 0 swapUVChannels: 0
generateSecondaryUV: 0 generateSecondaryUV: 0
useFileUnits: 1 useFileUnits: 1
keepQuads: 0 keepQuads: 0
weldVertices: 1 weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0 preserveHierarchy: 0
skinWeightsMode: 0 skinWeightsMode: 0
maxBonesPerVertex: 4 maxBonesPerVertex: 4
minBoneWeight: 0.001 minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1 meshOptimizationFlags: -1
indexFormat: 0 indexFormat: 0
secondaryUVAngleDistortion: 8 secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001 secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88 secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4 secondaryUVPackMargin: 4
useFileScale: 1 useFileScale: 1
tangentSpace: tangentSpace:
@ -91,6 +98,8 @@ ModelImporter:
animationType: 2 animationType: 2
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
remapMaterialsIfMaterialImportModeIsNone: 1
additionalBone: 0 additionalBone: 0
userData: userData:
assetBundleName: assetBundleName:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 61dd8047e5e66dc4db5c150abe38beae guid: 61dd8047e5e66dc4db5c150abe38beae
ModelImporter: ModelImporter:
serializedVersion: 22103 serializedVersion: 21300
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
materials: materials:
@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -67,7 +67,6 @@ ModelImporter:
secondaryUVMinObjectScale: 1 secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4 secondaryUVPackMargin: 4
useFileScale: 1 useFileScale: 1
strictVertexDataChecks: 0
tangentSpace: tangentSpace:
normalSmoothAngle: 60 normalSmoothAngle: 60
normalImportMode: 0 normalImportMode: 0
@ -100,7 +99,6 @@ ModelImporter:
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1 addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0 remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0 additionalBone: 0
userData: userData:

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -42,8 +42,8 @@ ModelImporter:
sortHierarchyByName: 1 sortHierarchyByName: 1
importVisibility: 1 importVisibility: 1
importBlendShapes: 1 importBlendShapes: 1
importCameras: 1 importCameras: 0
importLights: 1 importLights: 0
nodeNameCollisionStrategy: 1 nodeNameCollisionStrategy: 1
fileIdsGeneration: 2 fileIdsGeneration: 2
swapUVChannels: 0 swapUVChannels: 0
@ -51,7 +51,7 @@ ModelImporter:
useFileUnits: 1 useFileUnits: 1
keepQuads: 0 keepQuads: 0
weldVertices: 1 weldVertices: 1
bakeAxisConversion: 0 bakeAxisConversion: 1
preserveHierarchy: 0 preserveHierarchy: 0
skinWeightsMode: 0 skinWeightsMode: 0
maxBonesPerVertex: 4 maxBonesPerVertex: 4

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -32,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1

View File

@ -0,0 +1,97 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &4346386839021392248
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.x
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.y
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.z
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.x
value: 0.16618
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.y
value: 2.165
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.z
value: 3.36
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.w
value: 0.69465846
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7193398
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -92
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_ReflectionProbeUsage
value: 3
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_Materials.Array.data[2]
value:
objectReference: {fileID: 2100000, guid: 4f2ddc9306059914fb2324e496d4cca6, type: 2}
- target: {fileID: 919132149155446097, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_Name
value: smarttv
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
--- !u!1 &3499330018897603625 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
m_PrefabInstance: {fileID: 4346386839021392248}
m_PrefabAsset: {fileID: 0}
--- !u!65 &7452765709190415340
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3499330018897603625}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 41.58825, y: 1.4092498, z: 20.795483}
m_Center: {x: -0.10077736, y: -0.57068443, z: 8.609222}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5035aafbde1dd40458b242f88962c3d3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b5976cfa153c4304eaebbb77bdb8ee1d guid: b5976cfa153c4304eaebbb77bdb8ee1d
ModelImporter: ModelImporter:
serializedVersion: 19301 serializedVersion: 21300
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
materials: materials:
@ -14,6 +14,7 @@ ModelImporter:
bakeSimulation: 0 bakeSimulation: 0
resampleCurves: 1 resampleCurves: 1
optimizeGameObjects: 0 optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName: motionNodeName:
rigImportErrors: rigImportErrors:
rigImportWarnings: rigImportWarnings:
@ -31,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -43,21 +44,27 @@ ModelImporter:
importBlendShapes: 1 importBlendShapes: 1
importCameras: 1 importCameras: 1
importLights: 1 importLights: 1
nodeNameCollisionStrategy: 0
fileIdsGeneration: 2 fileIdsGeneration: 2
swapUVChannels: 0 swapUVChannels: 0
generateSecondaryUV: 0 generateSecondaryUV: 0
useFileUnits: 1 useFileUnits: 1
keepQuads: 0 keepQuads: 0
weldVertices: 1 weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0 preserveHierarchy: 0
skinWeightsMode: 0 skinWeightsMode: 0
maxBonesPerVertex: 4 maxBonesPerVertex: 4
minBoneWeight: 0.001 minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1 meshOptimizationFlags: -1
indexFormat: 0 indexFormat: 0
secondaryUVAngleDistortion: 8 secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001 secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88 secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4 secondaryUVPackMargin: 4
useFileScale: 1 useFileScale: 1
tangentSpace: tangentSpace:
@ -91,6 +98,8 @@ ModelImporter:
animationType: 2 animationType: 2
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
remapMaterialsIfMaterialImportModeIsNone: 1
additionalBone: 0 additionalBone: 0
userData: userData:
assetBundleName: assetBundleName:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 209ccdc36adac1f42a6e32958e3a619f guid: 209ccdc36adac1f42a6e32958e3a619f
ModelImporter: ModelImporter:
serializedVersion: 19301 serializedVersion: 21300
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
materials: materials:
@ -14,6 +14,7 @@ ModelImporter:
bakeSimulation: 0 bakeSimulation: 0
resampleCurves: 1 resampleCurves: 1
optimizeGameObjects: 0 optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName: motionNodeName:
rigImportErrors: rigImportErrors:
rigImportWarnings: rigImportWarnings:
@ -31,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -43,21 +44,27 @@ ModelImporter:
importBlendShapes: 1 importBlendShapes: 1
importCameras: 1 importCameras: 1
importLights: 1 importLights: 1
nodeNameCollisionStrategy: 0
fileIdsGeneration: 2 fileIdsGeneration: 2
swapUVChannels: 0 swapUVChannels: 0
generateSecondaryUV: 0 generateSecondaryUV: 0
useFileUnits: 1 useFileUnits: 1
keepQuads: 0 keepQuads: 0
weldVertices: 1 weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0 preserveHierarchy: 0
skinWeightsMode: 0 skinWeightsMode: 0
maxBonesPerVertex: 4 maxBonesPerVertex: 4
minBoneWeight: 0.001 minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1 meshOptimizationFlags: -1
indexFormat: 0 indexFormat: 0
secondaryUVAngleDistortion: 8 secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001 secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88 secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4 secondaryUVPackMargin: 4
useFileScale: 1 useFileScale: 1
tangentSpace: tangentSpace:
@ -91,6 +98,8 @@ ModelImporter:
animationType: 2 animationType: 2
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
remapMaterialsIfMaterialImportModeIsNone: 1
additionalBone: 0 additionalBone: 0
userData: userData:
assetBundleName: assetBundleName:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b9ff7b7667565a14fb4929205f447046 guid: b9ff7b7667565a14fb4929205f447046
ModelImporter: ModelImporter:
serializedVersion: 19301 serializedVersion: 21300
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
materials: materials:
@ -14,6 +14,7 @@ ModelImporter:
bakeSimulation: 0 bakeSimulation: 0
resampleCurves: 1 resampleCurves: 1
optimizeGameObjects: 0 optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName: motionNodeName:
rigImportErrors: rigImportErrors:
rigImportWarnings: rigImportWarnings:
@ -31,7 +32,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
@ -43,21 +44,27 @@ ModelImporter:
importBlendShapes: 1 importBlendShapes: 1
importCameras: 1 importCameras: 1
importLights: 1 importLights: 1
nodeNameCollisionStrategy: 0
fileIdsGeneration: 2 fileIdsGeneration: 2
swapUVChannels: 0 swapUVChannels: 0
generateSecondaryUV: 0 generateSecondaryUV: 0
useFileUnits: 1 useFileUnits: 1
keepQuads: 0 keepQuads: 0
weldVertices: 1 weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0 preserveHierarchy: 0
skinWeightsMode: 0 skinWeightsMode: 0
maxBonesPerVertex: 4 maxBonesPerVertex: 4
minBoneWeight: 0.001 minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1 meshOptimizationFlags: -1
indexFormat: 0 indexFormat: 0
secondaryUVAngleDistortion: 8 secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001 secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88 secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4 secondaryUVPackMargin: 4
useFileScale: 1 useFileScale: 1
tangentSpace: tangentSpace:
@ -91,6 +98,8 @@ ModelImporter:
animationType: 2 animationType: 2
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
remapMaterialsIfMaterialImportModeIsNone: 1
additionalBone: 0 additionalBone: 0
userData: userData:
assetBundleName: assetBundleName:

View File

@ -1,5 +1,50 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &1253093426770874476
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5160726694365660193}
- component: {fileID: 5408861807041978011}
m_Layer: 7
m_Name: Prevent Teleport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5160726694365660193
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1253093426770874476}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 7.4677825, y: 6.87, z: -3.75}
m_LocalScale: {x: 1, y: 0.94424, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3674349604157782260}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &5408861807041978011
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1253093426770874476}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 12.009987, y: 7.172292, z: 8.957158}
m_Center: {x: -7.4040437, y: -3.687161, z: 3.521251}
--- !u!1 &2048859290140646716 --- !u!1 &2048859290140646716
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -27,8 +72,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2048859290140646716} m_GameObject: {fileID: 2048859290140646716}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.4077811, y: 0, z: 0} m_LocalPosition: {x: 5.0600014, y: 6.87, z: -3.75}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 0.94424, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 3674349604157782260} m_Father: {fileID: 3674349604157782260}
@ -106,6 +151,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 3674349604157782260} - component: {fileID: 3674349604157782260}
- component: {fileID: 7152506842566364840}
m_Layer: 0 m_Layer: 0
m_Name: Simple table m_Name: Simple table
m_TagString: Untagged m_TagString: Untagged
@ -121,15 +167,28 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4158574887593288270} m_GameObject: {fileID: 4158574887593288270}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.2372222, y: 1.7355555, z: -6.6777782} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.12, y: 0.11999999, z: 0.11999999} m_LocalScale: {x: 0.12, y: 0.10616519, z: 0.11999999}
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 7846351332623750186} - {fileID: 7846351332623750186}
- {fileID: 705425444331171642} - {fileID: 705425444331171642}
- {fileID: 5160726694365660193}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7152506842566364840
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4158574887593288270}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7310167259df75745b825087bf4c8de0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6146061087085142095 --- !u!1 &6146061087085142095
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -161,8 +220,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6146061087085142095} m_GameObject: {fileID: 6146061087085142095}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.4077811, y: 0, z: 0} m_LocalPosition: {x: 5.06, y: 6.87, z: -3.75}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 0.94424, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 3674349604157782260} m_Father: {fileID: 3674349604157782260}

View File

@ -1,5 +1,95 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &8231086993610971755
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8960650468317011703}
- component: {fileID: 1298182450980450145}
m_Layer: 7
m_Name: Prevent Teleport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8960650468317011703
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8231086993610971755}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5262755222010251265}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1298182450980450145
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8231086993610971755}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 7.0540705, y: 0.1177156, z: 6.6142135}
m_Center: {x: 0.34211046, y: 0.07485761, z: 0.046559907}
--- !u!1 &8686115175501560511
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4128592685858527700}
- component: {fileID: 367620357552957988}
m_Layer: 0
m_Name: Collider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4128592685858527700
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8686115175501560511}
m_LocalRotation: {x: 0.14559887, y: -0, z: -0, w: 0.98934376}
m_LocalPosition: {x: 0, y: 6.571, z: 1.999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5035235579416466379}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 16.744, y: 0, z: 0}
--- !u!65 &367620357552957988
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8686115175501560511}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 3.5091224, y: 3.257729, z: 0.42924273}
m_Center: {x: -0.15117344, y: 0.041838426, z: 0.20113558}
--- !u!1001 &5657566221092892650 --- !u!1001 &5657566221092892650
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -37,19 +127,19 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} - target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 0.99989444 value: 0.99989367
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} - target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0.014532409 value: 0.00007239728
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} - target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: 0.0009773371
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} - target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: 0.014550553
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} - target: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@ -71,6 +161,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: chair value: chair
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
--- !u!1 &749501648960564542 stripped --- !u!1 &749501648960564542 stripped
@ -199,8 +293,8 @@ GameObject:
m_CorrespondingSourceObject: {fileID: -1616859871024398667, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_CorrespondingSourceObject: {fileID: -1616859871024398667, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
m_PrefabInstance: {fileID: 5657566221092892650} m_PrefabInstance: {fileID: 5657566221092892650}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!64 &940395475 --- !u!65 &6803589072956899348
MeshCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
@ -209,10 +303,9 @@ MeshCollider:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 4 serializedVersion: 2
m_Convex: 1 m_Size: {x: 3.8621368, y: 0.8619685, z: 3.6732788}
m_CookingOptions: 30 m_Center: {x: -0.07731682, y: 4.448121, z: -0.23885386}
m_Mesh: {fileID: -1398037248359712811, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
--- !u!1 &3387733359169555233 stripped --- !u!1 &3387733359169555233 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: -2197735683169753909, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_CorrespondingSourceObject: {fileID: -2197735683169753909, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
@ -292,7 +385,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4774624094512517819} m_GameObject: {fileID: 4774624094512517819}
m_Enabled: 1 m_Enabled: 0
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2fe5546f775c47d2820aa5e8a715f53, type: 3} m_Script: {fileID: 11500000, guid: d2fe5546f775c47d2820aa5e8a715f53, type: 3}
m_Name: m_Name:
@ -336,25 +429,28 @@ MonoBehaviour:
_json: '{"nest":{"source":"Macro","macro":0,"embed":null}}' _json: '{"nest":{"source":"Macro","macro":0,"embed":null}}'
_objectReferences: _objectReferences:
- {fileID: 11400000, guid: 0c540d3c7eee4e0469db633fd590172c, type: 2} - {fileID: 11400000, guid: 0c540d3c7eee4e0469db633fd590172c, type: 2}
--- !u!1 &5170095602056115092 stripped --- !u!114 &2140801147600063524
GameObject: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: -8557850782536262530, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
m_PrefabInstance: {fileID: 5657566221092892650}
m_PrefabAsset: {fileID: 0}
--- !u!64 &2092189922
MeshCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5170095602056115092} m_GameObject: {fileID: 4774624094512517819}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 4 m_EditorHideFlags: 0
m_Convex: 1 m_Script: {fileID: 11500000, guid: 7310167259df75745b825087bf4c8de0, type: 3}
m_CookingOptions: 30 m_Name:
m_Mesh: {fileID: -4739786549477033220, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_EditorClassIdentifier:
--- !u!4 &5035235579416466379 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 820629935725706273, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
m_PrefabInstance: {fileID: 5657566221092892650}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5262755222010251265 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
m_PrefabInstance: {fileID: 5657566221092892650}
m_PrefabAsset: {fileID: 0}
--- !u!1 &6504239264117201557 stripped --- !u!1 &6504239264117201557 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 1495201289270146431, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_CorrespondingSourceObject: {fileID: 1495201289270146431, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
@ -374,25 +470,6 @@ MeshCollider:
m_Convex: 1 m_Convex: 1
m_CookingOptions: 30 m_CookingOptions: 30
m_Mesh: {fileID: -2757292953060377137, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_Mesh: {fileID: -2757292953060377137, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
--- !u!1 &6648864002266151841 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1352826006956217419, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
m_PrefabInstance: {fileID: 5657566221092892650}
m_PrefabAsset: {fileID: 0}
--- !u!64 &1859773472
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6648864002266151841}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: -5079734595586569652, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}
--- !u!1 &7629644934281361513 stripped --- !u!1 &7629644934281361513 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 2837908935733630851, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3} m_CorrespondingSourceObject: {fileID: 2837908935733630851, guid: 61dd8047e5e66dc4db5c150abe38beae, type: 3}

View File

@ -1,97 +1,121 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1001 &4346386839021392248 --- !u!1 &2835658414891243653
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.x
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.y
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalScale.z
value: 0.06708567
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.x
value: 0.16618
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.y
value: 2.165
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalPosition.z
value: 3.36
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.w
value: 0.69465846
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7193398
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -92
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_ReflectionProbeUsage
value: 3
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_Materials.Array.data[2]
value:
objectReference: {fileID: 2100000, guid: 4f2ddc9306059914fb2324e496d4cca6, type: 2}
- target: {fileID: 919132149155446097, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
propertyPath: m_Name
value: smarttv
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
--- !u!1 &3499330018897603625 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 5ade54c247559a342b46db33bb0c5fdf, type: 3}
m_PrefabInstance: {fileID: 4346386839021392248}
m_PrefabAsset: {fileID: 0}
--- !u!65 &7452765709190415340
BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3499330018897603625} serializedVersion: 6
m_Material: {fileID: 0} m_Component:
m_IsTrigger: 0 - component: {fileID: 589337997038399236}
- component: {fileID: 6811449984730649892}
m_Layer: 0
m_Name: SmartTv
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &589337997038399236
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2835658414891243653}
m_LocalRotation: {x: -0.7193398, y: 0, z: 0, w: 0.69465846}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.06708567, y: 0.06708567, z: 0.06708567}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6063464173187445548}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -92, y: 0, z: 0}
--- !u!114 &6811449984730649892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2835658414891243653}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7310167259df75745b825087bf4c8de0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8069903224663295423
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 41.58825, y: 1.4092498, z: 20.795483} m_Modification:
m_Center: {x: -0.10077736, y: -0.57068443, z: 8.609222} m_TransformParent: {fileID: 589337997038399236}
m_Modifications:
- target: {fileID: 3499330018897603625, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_Name
value: smarttv
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
--- !u!4 &6063464173187445548 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4313268324301600403, guid: 5035aafbde1dd40458b242f88962c3d3, type: 3}
m_PrefabInstance: {fileID: 8069903224663295423}
m_PrefabAsset: {fileID: 0}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5035aafbde1dd40458b242f88962c3d3 guid: ec717aa9a84ac1849bec0aa4f4b89314
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -27,6 +27,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 3302308642418619131} m_Father: {fileID: 3302308642418619131}
m_RootOrder: 0 m_RootOrder: 0
@ -56,73 +57,59 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 260494349833344412, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 260494349833344412, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: OVRHmd value: OVRHmd
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2283902713005402673, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 2283902713005402673, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: _updateAfter propertyPath: _updateAfter
value: value:
objectReference: {fileID: 7429438080402074591} objectReference: {fileID: 7429438080402074591}
- target: {fileID: 2283902713005402673, guid: 982ea7c9970bf124bb5535f9df2f9531, - target: {fileID: 2283902713005402673, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
propertyPath: _iModifyDataFromSourceMono propertyPath: _iModifyDataFromSourceMono
value: value:
objectReference: {fileID: 7429438080402074591} objectReference: {fileID: 7429438080402074591}
@ -130,7 +117,6 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
--- !u!4 &3302308642418619131 stripped --- !u!4 &3302308642418619131 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, m_CorrespondingSourceObject: {fileID: 1397600019941919615, guid: 982ea7c9970bf124bb5535f9df2f9531, type: 3}
type: 3}
m_PrefabInstance: {fileID: 4517512739943872900} m_PrefabInstance: {fileID: 4517512739943872900}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}

8
Assets/QuickOutline.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1295528ee89ac5a409e5c93f03a22fc6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,37 @@
Quick Outline
=============
Developed by Chris Nolet (c) 2018
Instructions
------------
To add an outline to an object, drag-and-drop the Outline.cs
script onto the object. The outline materials will be loaded
at runtime.
You can also add outlines programmatically with:
var outline = gameObject.AddComponent<Outline>();
outline.OutlineMode = Outline.Mode.OutlineAll;
outline.OutlineColor = Color.yellow;
outline.OutlineWidth = 5f;
The outline script does a small amount of work in Awake().
For best results, use outline.enabled to toggle the outline.
Avoid removing and re-adding the component if possible.
For large meshes, you may also like to enable 'Precompute
Outline' in the editor. This will reduce the amount of work
performed in Awake().
Troubleshooting
---------------
If the outline appears off-center, please try the following:
1. Set 'Read/Write Enabled' on each model's import settings.
2. Disable 'Optimize Mesh Data' in the player settings.

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5933bfd39d7a5b843a0ed821f85bca19
timeCreated: 1522619008
licenseType: Store
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 70fd40674751a8042a8b9b2e8d9f915f
folderAsset: yes
timeCreated: 1522559128
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 80ac8e52d3c31a94babd161e86bc6b97
folderAsset: yes
timeCreated: 1522559139
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: OutlineFill
m_Shader: {fileID: 4800000, guid: 4e76d4023d7e0411297c670f878973e2, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats:
- _OutlineWidth: 2
- _ZTest: 8
m_Colors:
- _OutlineColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 311313efa011949e98b6761d652ad13c
timeCreated: 1520576285
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: OutlineMask
m_Shader: {fileID: 4800000, guid: 341b058cd7dee4f5cba5cc59a513619e, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats:
- _ZTest: 8
m_Colors: []

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 106f3ff43a17d4967a2b64c7a92e49ec
timeCreated: 1520576276
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6a63caa2b0e993043a42c11f35ff2d1a
folderAsset: yes
timeCreated: 1522559134
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
//
// OutlineFill.shader
// QuickOutline
//
// Created by Chris Nolet on 2/21/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
Shader "Custom/Outline Fill" {
Properties {
[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("ZTest", Float) = 0
_OutlineColor("Outline Color", Color) = (1, 1, 1, 1)
_OutlineWidth("Outline Width", Range(0, 10)) = 2
}
SubShader {
Tags {
"Queue" = "Transparent+110"
"RenderType" = "Transparent"
"DisableBatching" = "True"
}
Pass {
Name "Fill"
Cull Off
ZTest [_ZTest]
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Stencil {
Ref 1
Comp NotEqual
}
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
struct appdata {
float4 vertex : POSITION;
float3 normal : NORMAL;
float3 smoothNormal : TEXCOORD3;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
float4 position : SV_POSITION;
fixed4 color : COLOR;
UNITY_VERTEX_OUTPUT_STEREO
};
uniform fixed4 _OutlineColor;
uniform float _OutlineWidth;
v2f vert(appdata input) {
v2f output;
UNITY_SETUP_INSTANCE_ID(input);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float3 normal = any(input.smoothNormal) ? input.smoothNormal : input.normal;
float3 viewPosition = UnityObjectToViewPos(input.vertex);
float3 viewNormal = normalize(mul((float3x3)UNITY_MATRIX_IT_MV, normal));
output.position = UnityViewToClipPos(viewPosition + viewNormal * -viewPosition.z * _OutlineWidth / 1000.0);
output.color = _OutlineColor;
return output;
}
fixed4 frag(v2f input) : SV_Target {
return input.color;
}
ENDCG
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4e76d4023d7e0411297c670f878973e2
timeCreated: 1520575782
licenseType: Store
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
//
// OutlineMask.shader
// QuickOutline
//
// Created by Chris Nolet on 2/21/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
Shader "Custom/Outline Mask" {
Properties {
[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest("ZTest", Float) = 0
}
SubShader {
Tags {
"Queue" = "Transparent+100"
"RenderType" = "Transparent"
}
Pass {
Name "Mask"
Cull Off
ZTest [_ZTest]
ZWrite Off
ColorMask 0
Stencil {
Ref 1
Pass Replace
}
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 341b058cd7dee4f5cba5cc59a513619e
timeCreated: 1520575773
licenseType: Store
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 932f8193e5396db4babac4756c406dee
folderAsset: yes
timeCreated: 1522559213
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2b0040b0ed7fbd64693e9195d13d25f9
folderAsset: yes
timeCreated: 1522615600
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,76 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Plane
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.2509804, g: 0.2509804, b: 0.5019608, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f58cf65ea995c4b45be95713bdea8134
timeCreated: 1522540975
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3916faa55c6a94248959031ee0ad499f
folderAsset: yes
timeCreated: 1522615614
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,778 @@
%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: 8
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: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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: 820273532}
m_IndirectSpecularColor: {r: 0.18028383, g: 0.22571409, b: 0.30692282, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 8
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 3
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0}
m_ShadowMaskMode: 2
--- !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
m_NavMeshData: {fileID: 0}
--- !u!1 &122269556
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 122269561}
- component: {fileID: 122269560}
- component: {fileID: 122269558}
- component: {fileID: 122269557}
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 &122269557
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 122269556}
m_Enabled: 1
--- !u!124 &122269558
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 122269556}
m_Enabled: 1
--- !u!20 &122269560
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 122269556}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &122269561
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 122269556}
m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927}
m_LocalPosition: {x: 0, y: 3, z: -4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 40, y: 0, z: 0}
--- !u!1 &124162633
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 124162634}
- component: {fileID: 124162638}
- component: {fileID: 124162636}
- component: {fileID: 124162635}
m_Layer: 0
m_Name: Outline Hidden
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &124162634
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 124162633}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 935070115}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &124162635
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 124162633}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 2
outlineColor: {r: 1, g: 0.2509804, b: 0.2509804, a: 1}
outlineWidth: 6
--- !u!23 &124162636
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 124162633}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &124162638
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 124162633}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &796971894
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 796971895}
- component: {fileID: 796971899}
- component: {fileID: 796971897}
- component: {fileID: 796971896}
m_Layer: 0
m_Name: Outline And Silhouette
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &796971895
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 796971894}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2, y: 0, z: 0}
m_LocalScale: {x: 1, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 935070115}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &796971896
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 796971894}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 3
outlineColor: {r: 0.2509804, g: 1, b: 1, a: 1}
outlineWidth: 6
--- !u!23 &796971897
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 796971894}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &796971899
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 796971894}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &820273531
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 820273533}
- component: {fileID: 820273532}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &820273532
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 820273531}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &820273533
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 820273531}
m_LocalRotation: {x: 0.40821788, y: 0.23456976, z: -0.10938167, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: 30, z: 0}
--- !u!1 &935070114
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 935070115}
m_Layer: 0
m_Name: Outlined Objects
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &935070115
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 935070114}
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: 1781008194}
- {fileID: 124162634}
- {fileID: 1346396411}
- {fileID: 796971895}
- {fileID: 1083549395}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1083549394
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1083549395}
- component: {fileID: 1083549399}
- component: {fileID: 1083549397}
- component: {fileID: 1083549396}
m_Layer: 0
m_Name: Outline Visible
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1083549395
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1083549394}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 935070115}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1083549396
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1083549394}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 1
outlineColor: {r: 0.2509804, g: 1, b: 0.2509804, a: 1}
outlineWidth: 6
--- !u!23 &1083549397
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1083549394}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1083549399
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1083549394}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1346396410
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1346396411}
- component: {fileID: 1346396415}
- component: {fileID: 1346396413}
- component: {fileID: 1346396412}
m_Layer: 0
m_Name: Outline All
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1346396411
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1346396410}
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: 935070115}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1346396412
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1346396410}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 0
outlineColor: {r: 1, g: 1, b: 0.2509804, a: 1}
outlineWidth: 6
--- !u!23 &1346396413
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1346396410}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1346396415
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1346396410}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1580478821
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1580478825}
- component: {fileID: 1580478824}
- component: {fileID: 1580478822}
m_Layer: 0
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1580478822
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1580478821}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f58cf65ea995c4b45be95713bdea8134, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1580478824
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1580478821}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1580478825
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1580478821}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 1, z: 10}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1781008193
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1781008194}
- component: {fileID: 1781008198}
- component: {fileID: 1781008196}
- component: {fileID: 1781008195}
m_Layer: 0
m_Name: Silhouette Only
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1781008194
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1781008193}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 935070115}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1781008195
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1781008193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 4
outlineColor: {r: 1, g: 1, b: 1, a: 1}
outlineWidth: 6
--- !u!23 &1781008196
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1781008193}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1781008198
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1781008193}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f23712c79adc910408e872b127e825cf
timeCreated: 1522615825
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3ddbd65d69a9f0b48bab4fe96a1fe099
folderAsset: yes
timeCreated: 1522559122
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,309 @@
//
// Outline.cs
// QuickOutline
//
// Created by Chris Nolet on 3/30/18.
// Copyright © 2018 Chris Nolet. All rights reserved.
//
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[DisallowMultipleComponent]
public class ObjectOutline : MonoBehaviour {
private static HashSet<Mesh> registeredMeshes = new HashSet<Mesh>();
public enum Mode {
OutlineAll,
OutlineVisible,
OutlineHidden,
OutlineAndSilhouette,
SilhouetteOnly
}
public Mode OutlineMode {
get { return outlineMode; }
set {
outlineMode = value;
needsUpdate = true;
}
}
public Color OutlineColor {
get { return outlineColor; }
set {
outlineColor = value;
needsUpdate = true;
}
}
public float OutlineWidth {
get { return outlineWidth; }
set {
outlineWidth = value;
needsUpdate = true;
}
}
[Serializable]
private class ListVector3 {
public List<Vector3> data;
}
[SerializeField]
private Mode outlineMode;
[SerializeField]
private Color outlineColor = Color.white;
[SerializeField, Range(0f, 10f)]
private float outlineWidth = 2f;
[Header("Optional")]
[SerializeField, Tooltip("Precompute enabled: Per-vertex calculations are performed in the editor and serialized with the object. "
+ "Precompute disabled: Per-vertex calculations are performed at runtime in Awake(). This may cause a pause for large meshes.")]
private bool precomputeOutline;
[SerializeField, HideInInspector]
private List<Mesh> bakeKeys = new List<Mesh>();
[SerializeField, HideInInspector]
private List<ListVector3> bakeValues = new List<ListVector3>();
private Renderer[] renderers;
private Material outlineMaskMaterial;
private Material outlineFillMaterial;
private bool needsUpdate;
void Awake() {
// Cache renderers
renderers = GetComponentsInChildren<Renderer>();
// Instantiate outline materials
outlineMaskMaterial = Instantiate(Resources.Load<Material>(@"Materials/OutlineMask"));
outlineFillMaterial = Instantiate(Resources.Load<Material>(@"Materials/OutlineFill"));
outlineMaskMaterial.name = "OutlineMask (Instance)";
outlineFillMaterial.name = "OutlineFill (Instance)";
// Retrieve or generate smooth normals
LoadSmoothNormals();
// Apply material properties immediately
needsUpdate = true;
}
void OnEnable() {
foreach (var renderer in renderers) {
// Append outline shaders
var materials = renderer.sharedMaterials.ToList();
materials.Add(outlineMaskMaterial);
materials.Add(outlineFillMaterial);
renderer.materials = materials.ToArray();
}
}
void OnValidate() {
// Update material properties
needsUpdate = true;
// Clear cache when baking is disabled or corrupted
if (!precomputeOutline && bakeKeys.Count != 0 || bakeKeys.Count != bakeValues.Count) {
bakeKeys.Clear();
bakeValues.Clear();
}
// Generate smooth normals when baking is enabled
if (precomputeOutline && bakeKeys.Count == 0) {
Bake();
}
}
void Update() {
if (needsUpdate) {
needsUpdate = false;
UpdateMaterialProperties();
}
}
void OnDisable() {
foreach (var renderer in renderers) {
// Remove outline shaders
var materials = renderer.sharedMaterials.ToList();
materials.Remove(outlineMaskMaterial);
materials.Remove(outlineFillMaterial);
renderer.materials = materials.ToArray();
}
}
void OnDestroy() {
// Destroy material instances
Destroy(outlineMaskMaterial);
Destroy(outlineFillMaterial);
}
void Bake() {
// Generate smooth normals for each mesh
var bakedMeshes = new HashSet<Mesh>();
foreach (var meshFilter in GetComponentsInChildren<MeshFilter>()) {
// Skip duplicates
if (!bakedMeshes.Add(meshFilter.sharedMesh)) {
continue;
}
// Serialize smooth normals
var smoothNormals = SmoothNormals(meshFilter.sharedMesh);
bakeKeys.Add(meshFilter.sharedMesh);
bakeValues.Add(new ListVector3() { data = smoothNormals });
}
}
void LoadSmoothNormals() {
// Retrieve or generate smooth normals
foreach (var meshFilter in GetComponentsInChildren<MeshFilter>()) {
// Skip if smooth normals have already been adopted
if (!registeredMeshes.Add(meshFilter.sharedMesh)) {
continue;
}
// Retrieve or generate smooth normals
var index = bakeKeys.IndexOf(meshFilter.sharedMesh);
var smoothNormals = (index >= 0) ? bakeValues[index].data : SmoothNormals(meshFilter.sharedMesh);
// Store smooth normals in UV3
meshFilter.sharedMesh.SetUVs(3, smoothNormals);
// Combine submeshes
var renderer = meshFilter.GetComponent<Renderer>();
if (renderer != null) {
CombineSubmeshes(meshFilter.sharedMesh, renderer.sharedMaterials);
}
}
// Clear UV3 on skinned mesh renderers
foreach (var skinnedMeshRenderer in GetComponentsInChildren<SkinnedMeshRenderer>()) {
// Skip if UV3 has already been reset
if (!registeredMeshes.Add(skinnedMeshRenderer.sharedMesh)) {
continue;
}
// Clear UV3
skinnedMeshRenderer.sharedMesh.uv4 = new Vector2[skinnedMeshRenderer.sharedMesh.vertexCount];
// Combine submeshes
CombineSubmeshes(skinnedMeshRenderer.sharedMesh, skinnedMeshRenderer.sharedMaterials);
}
}
List<Vector3> SmoothNormals(Mesh mesh) {
// Group vertices by location
var groups = mesh.vertices.Select((vertex, index) => new KeyValuePair<Vector3, int>(vertex, index)).GroupBy(pair => pair.Key);
// Copy normals to a new list
var smoothNormals = new List<Vector3>(mesh.normals);
// Average normals for grouped vertices
foreach (var group in groups) {
// Skip single vertices
if (group.Count() == 1) {
continue;
}
// Calculate the average normal
var smoothNormal = Vector3.zero;
foreach (var pair in group) {
smoothNormal += smoothNormals[pair.Value];
}
smoothNormal.Normalize();
// Assign smooth normal to each vertex
foreach (var pair in group) {
smoothNormals[pair.Value] = smoothNormal;
}
}
return smoothNormals;
}
void CombineSubmeshes(Mesh mesh, Material[] materials) {
// Skip meshes with a single submesh
if (mesh.subMeshCount == 1) {
return;
}
// Skip if submesh count exceeds material count
if (mesh.subMeshCount > materials.Length) {
return;
}
// Append combined submesh
mesh.subMeshCount++;
mesh.SetTriangles(mesh.triangles, mesh.subMeshCount - 1);
}
void UpdateMaterialProperties() {
// Apply properties according to mode
outlineFillMaterial.SetColor("_OutlineColor", outlineColor);
switch (outlineMode) {
case Mode.OutlineAll:
outlineMaskMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Always);
outlineFillMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Always);
outlineFillMaterial.SetFloat("_OutlineWidth", outlineWidth);
break;
case Mode.OutlineVisible:
outlineMaskMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Always);
outlineFillMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.LessEqual);
outlineFillMaterial.SetFloat("_OutlineWidth", outlineWidth);
break;
case Mode.OutlineHidden:
outlineMaskMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Always);
outlineFillMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Greater);
outlineFillMaterial.SetFloat("_OutlineWidth", outlineWidth);
break;
case Mode.OutlineAndSilhouette:
outlineMaskMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.LessEqual);
outlineFillMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Always);
outlineFillMaterial.SetFloat("_OutlineWidth", outlineWidth);
break;
case Mode.SilhouetteOnly:
outlineMaskMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.LessEqual);
outlineFillMaterial.SetFloat("_ZTest", (float)UnityEngine.Rendering.CompareFunction.Greater);
outlineFillMaterial.SetFloat("_OutlineWidth", 0f);
break;
}
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 5fea29bb7c508c244a1f805a5fd3fc4d
timeCreated: 1522369084
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,176 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using Valve.VR;
using Valve.VR.Extras;
public class FurnitureMover : MonoBehaviour
{
private SteamVR_LaserPointer steamVrLaserPointer;
Transform previousContact = null;
public SteamVR_Behaviour_Pose pose;
public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.GetBooleanAction("InteractUI");
public LayerMask AutoPlacementEnvironmentMask;
public GameObject pointer;
private MovableFurniture Grabbing;
public Color color;
public float thickness = 0.002f;
public Color clickColor = Color.green;
private void Start()
{
if (pose == null)
pose = this.GetComponent<SteamVR_Behaviour_Pose>();
if (pose == null)
Debug.LogError("No SteamVR_Behaviour_Pose component found on this object", this);
if (interactWithUI == null)
Debug.LogError("No ui interaction action has been set on this component.", this);
pointer = GameObject.CreatePrimitive(PrimitiveType.Cube);
pointer.transform.parent = this.transform;
pointer.transform.localScale = new Vector3(thickness, thickness, 100f);
pointer.transform.localPosition = new Vector3(0f, 0f, 50f);
pointer.transform.localRotation = Quaternion.identity;
BoxCollider collider = pointer.GetComponent<BoxCollider>();
if (collider)
{
Object.Destroy(collider);
}
Material newMaterial = new Material(Shader.Find("Unlit/Color"));
newMaterial.SetColor("_Color", color);
pointer.GetComponent<MeshRenderer>().material = newMaterial;
}
private void Awake()
{
}
private void Update()
{
float dist = 100f;
Ray raycast = new Ray(transform.position, transform.forward);
RaycastHit hit;
bool bHit = Physics.Raycast(raycast, out hit);
Ray SnapRaycast = new Ray(transform.position, transform.forward);
RaycastHit SnapHit;
bool SnapbHit = Physics.Raycast(SnapRaycast, out SnapHit, 100f, AutoPlacementEnvironmentMask);
if (SnapbHit && Grabbing != null)
{
Grabbing.SnapTo(SnapHit.point, AutoPlacementEnvironmentMask);
}
if (previousContact && previousContact != hit.transform)
{
PointerEventArgs args = new PointerEventArgs();
args.fromInputSource = pose.inputSource;
args.distance = 0f;
args.flags = 0;
args.target = previousContact;
OnPointerOut(this, args);
previousContact = null;
}
if (bHit && previousContact != hit.transform)
{
PointerEventArgs argsIn = new PointerEventArgs();
argsIn.fromInputSource = pose.inputSource;
argsIn.distance = hit.distance;
argsIn.flags = 0;
argsIn.target = hit.transform;
OnPointerIn(this, argsIn);
previousContact = hit.transform;
}
if (!bHit)
{
previousContact = null;
}
if (bHit && hit.distance < 100f)
{
dist = hit.distance;
}
if (bHit && interactWithUI.GetStateDown(pose.inputSource))
{
PointerEventArgs argsClick = new PointerEventArgs();
argsClick.fromInputSource = pose.inputSource;
argsClick.distance = hit.distance;
argsClick.flags = 0;
argsClick.target = hit.transform;
OnPointerClickDown(this, argsClick);
}
if (bHit && interactWithUI.GetStateUp(pose.inputSource))
{
PointerEventArgs argsClick = new PointerEventArgs();
argsClick.fromInputSource = pose.inputSource;
argsClick.distance = hit.distance;
argsClick.flags = 0;
argsClick.target = hit.transform;
OnPointerClickUp(this, argsClick);
}
if (interactWithUI != null && interactWithUI.GetState(pose.inputSource))
{
pointer.transform.localScale = new Vector3(thickness * 5f, thickness * 5f, dist);
pointer.GetComponent<MeshRenderer>().material.color = clickColor;
}
else
{
pointer.transform.localScale = new Vector3(thickness, thickness, dist);
pointer.GetComponent<MeshRenderer>().material.color = color;
}
pointer.transform.localPosition = new Vector3(0f, 0f, dist / 2f);
}
private void OnPointerClickDown(object sender, PointerEventArgs e)
{
MovableFurniturePart clickHandler = e.target.GetComponent<MovableFurniturePart>();
if (clickHandler == null)
{
return;
}
clickHandler.OnPointerClickDown();
Grabbing = clickHandler.parent;
/*Grabbing.transform.SetParent(this.transform);*/
}
private void OnPointerClickUp(object sender, PointerEventArgs e)
{
if(Grabbing != null)
{
Grabbing.OnPointerClickUp();
/*Grabbing.transform.SetParent(this.transform.root);*/
Grabbing = null;
}
}
private void OnPointerOut(object sender, PointerEventArgs e)
{
MovableFurniturePart pointerExitHandler = e.target.GetComponent<MovableFurniturePart>();
if (pointerExitHandler == null)
{
return;
}
pointerExitHandler.OnPointerExit();
}
private void OnPointerIn(object sender, PointerEventArgs e)
{
MovableFurniturePart pointerEnterHandler = e.target.GetComponent<MovableFurniturePart>();
if (pointerEnterHandler == null)
{
return;
}
pointerEnterHandler.OnPointerEnter();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 92e268c9230c939469a5d6b56877fb57
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,148 @@
using Oculus.Interaction.PoseDetection;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class MovableFurniture : MonoBehaviour
{
private List<Transform> children;
private List<ObjectOutline> outlines;
private Rigidbody _rigidbody;
private Bounds combinedBounds;
private Vector3 centerOffset;
// Start is called before the first frame update
void Start()
{
_rigidbody = GetComponent<Rigidbody>();
children = new List<Transform>(GetComponentsInChildren<Transform>());
outlines = new List<ObjectOutline>();
foreach (Transform child in children)
{
var part = child.gameObject.AddComponent<MovableFurniturePart>();
part.parent = this;
var outline = child.gameObject.AddComponent<ObjectOutline>();
outlines.Add(outline);
outline.OutlineMode = ObjectOutline.Mode.OutlineAll;
outline.OutlineColor = Color.yellow;
outline.OutlineWidth = 5f;
outline.enabled = false;
}
CalculateBounds();
}
// Update is called once per frame
void Update()
{
}
public void OnPointerClickUp()
{
if (_rigidbody != null)
{
_rigidbody.useGravity = true;
}
}
public void OnPointerClickDown()
{
if(_rigidbody!= null)
{
_rigidbody.useGravity= false;
}
}
public void OnPointerEnter()
{
foreach (ObjectOutline outline in outlines)
{
/*child.OutlineMode = ObjectOutline.Mode.OutlineAll;
child.OutlineColor = Color.yellow;
child.OutlineWidth = 5f;*/
outline.enabled = true;
}
}
public void OnPointerExit()
{
foreach (ObjectOutline outline in outlines)
{
outline.enabled = false;
}
}
public void SnapTo(Vector3 position, LayerMask layerMask)
{
Vector3 displacement = Vector3.zero;
this.transform.position = position+centerOffset;
Vector3[] directions = { Vector3.right, Vector3.left, Vector3.up, Vector3.down, Vector3.forward, Vector3.back };
int[] extents = { 0,0,1,1,2,2 };
for (int i = 0; i<6; i++ )
{
Ray raycast = new Ray(transform.position - centerOffset - (directions[i] * combinedBounds.extents[extents[i]]), (directions[i] * combinedBounds.size[extents[i]]));
RaycastHit hit;
bool SnapbHit = Physics.Raycast(raycast, out hit, combinedBounds.size[extents[i]], layerMask);
if (SnapbHit)
{
displacement[i / 2] -= (i % 2 == 1 ? -1 : 1) * (combinedBounds.size[extents[i]] - (hit.distance));
}
}
/*Ray raycast = new Ray((transform.position - centerOffset) - (new Vector3(0, 0, combinedBounds.extents.z)), (new Vector3(0, 0, combinedBounds.size.z )));
RaycastHit hit;
bool SnapbHit = Physics.Raycast(raycast, out hit, combinedBounds.size.z, layerMask);
if (SnapbHit)
{
Debug.Log("Hit");
//displacement.z -= (0 % 2 == 1 ? -1 : 1) * (2*combinedBounds.size.z - (hit.distance));
displacement.z -= (combinedBounds.size.z - (hit.distance));
}*/
Debug.Log(displacement);
this.transform.Translate(displacement, Space.World);
}
void OnDrawGizmos()
{
// Draw a yellow sphere at the transform's position
Gizmos.color = Color.red;
Gizmos.DrawWireCube(transform.position - centerOffset, combinedBounds.size);
Gizmos.DrawRay((transform.position - centerOffset) - (new Vector3(0,0,combinedBounds.extents.z)), (new Vector3(0, 0, combinedBounds.size.z)));
}
private void CalculateBounds()
{
if (GetComponent<Renderer>() != null)
{
combinedBounds = GetComponent<Renderer>().bounds;
}
else
{
combinedBounds = new Bounds(transform.position, Vector3.zero);
}
var renderers = GetComponentsInChildren<Collider>();
foreach (Collider child in renderers)
{
if (child != GetComponent<Renderer>())
{
if (combinedBounds == null)
{
combinedBounds = child.bounds;
}
else
{
combinedBounds.Encapsulate(child.bounds);
}
}
}
//combinedBounds = renderers[0].bounds;
Debug.Log(combinedBounds.center);
centerOffset = transform.position - combinedBounds.center;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7310167259df75745b825087bf4c8de0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MovableFurniturePart : MonoBehaviour
{
public MovableFurniture parent;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnPointerClickDown()
{
parent.OnPointerClickDown();
}
public void OnPointerEnter()
{
parent.OnPointerEnter();
}
public void OnPointerExit()
{
parent.OnPointerExit();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5adeff1876e0c4443afa674a55f0a965
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SteamVR.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4de65dd06f636c64082b8d927f26e83c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: c33af0785775d7548b22541da37936fe
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:

View File

@ -0,0 +1,351 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Prompt developers to use settings most compatible with SteamVR.
//
//=============================================================================
//2019 will use some of this
#if (UNITY_2018_1_OR_NEWER && !UNITY_2020_1_OR_NEWER)
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Reflection;
using Valve.VR.InteractionSystem;
using UnityEditor.Callbacks;
#pragma warning disable CS0618
#pragma warning disable CS0219
#pragma warning disable CS0414
namespace Valve.VR
{
#if (UNITY_2018_1_OR_NEWER && !UNITY_2019_1_OR_NEWER)
public class SteamVR_AutoEnableVR_2018to2019
{
[DidReloadScripts]
private static void OnReload()
{
SteamVR_AutoEnableVR_UnityPackage.InstallAndEnableUnityVR();
}
}
#endif
public class SteamVR_AutoEnableVR_UnityPackage
{
private static bool? _forceInstall;
private const string forceInstallKey = "steamvr.autoenablevr.forceInstall";
private static bool? _forceEnable;
private const string forceEnableKey = "steamvr.autoenablevr.forceEnable";
private static PackageStates? _updateState;
private const string updateStateKey = "steamvr.autoenablevr.updateState";
private static bool forceInstall
{
get
{
if (_forceInstall.HasValue == false)
{
if (EditorPrefs.HasKey(forceInstallKey))
_forceInstall = EditorPrefs.GetBool(forceInstallKey);
else
_forceInstall = false;
}
return _forceInstall.Value;
}
set
{
_forceInstall = value;
EditorPrefs.SetBool(forceInstallKey, value);
}
}
private static bool forceEnable
{
get
{
if (_forceEnable.HasValue == false)
{
if (EditorPrefs.HasKey(forceEnableKey))
_forceEnable = EditorPrefs.GetBool(forceEnableKey);
else
_forceEnable = false;
}
return _forceEnable.Value;
}
set
{
_forceEnable = value;
EditorPrefs.SetBool(forceEnableKey, value);
}
}
private static void UpdateUpdateStateFromPrefs()
{
if (_updateState.HasValue == false)
{
if (EditorPrefs.HasKey(updateStateKey))
_updateState = (PackageStates)EditorPrefs.GetInt(updateStateKey);
else
_updateState = PackageStates.None;
}
}
private static PackageStates updateState
{
get
{
if (_updateState.HasValue == false)
UpdateUpdateStateFromPrefs();
return _updateState.Value;
}
set
{
_updateState = value;
EditorPrefs.SetInt(updateStateKey, (int)value);
}
}
public static void InstallAndEnableUnityVR(bool forceInstall = false, bool forceEnable = false)
{
_forceInstall = forceInstall;
_forceEnable = forceEnable;
EditorApplication.update += Update;
}
protected const string openVRString = "OpenVR";
protected const string unityOpenVRPackageString = "com.unity.xr.openvr.standalone";
protected const string valveOpenVRPackageString = "com.valvesoftware.unity.openvr";
private enum PackageStates
{
None,
WaitingForList,
WaitingForAdd,
WaitingForAddConfirm,
Installed,
Failed,
}
private static UnityEditor.PackageManager.Requests.ListRequest listRequest;
private static UnityEditor.PackageManager.Requests.AddRequest addRequest;
private static System.Diagnostics.Stopwatch addingPackageTime = new System.Diagnostics.Stopwatch();
private static System.Diagnostics.Stopwatch addingPackageTimeTotal = new System.Diagnostics.Stopwatch();
private static float estimatedTimeToInstall = 80;
private static int addTryCount = 0;
private static void End()
{
updateState = PackageStates.None;
addingPackageTime.Stop();
addingPackageTimeTotal.Stop();
UnityEditor.EditorUtility.ClearProgressBar();
EditorApplication.update -= Update;
}
public static void Update()
{
if (!SteamVR_Settings.instance.autoEnableVR || Application.isPlaying)
End();
if (UnityEditor.PlayerSettings.virtualRealitySupported == false)
{
if (forceInstall == false)
{
int shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "Would you like to enable Virtual Reality mode?\n\nThis will install the OpenVR for Desktop package and enable it in Player Settings.", "Yes", "No, and don't ask again", "No");
switch (shouldInstall)
{
case 0: //yes
UnityEditor.PlayerSettings.virtualRealitySupported = true;
break;
case 1: //no
End();
return;
case 2: //no, don't ask
SteamVR_Settings.instance.autoEnableVR = false;
SteamVR_Settings.Save();
End();
return;
}
}
Debug.Log("<b>[SteamVR Setup]</b> Enabled virtual reality support in Player Settings. (you can disable this by unchecking Assets/SteamVR/SteamVR_Settings.autoEnableVR)");
}
switch (updateState)
{
case PackageStates.None:
//see if we have the package
listRequest = UnityEditor.PackageManager.Client.List(true);
updateState = PackageStates.WaitingForList;
break;
case PackageStates.WaitingForList:
if (listRequest == null)
{
listRequest = UnityEditor.PackageManager.Client.List(true);
updateState = PackageStates.WaitingForList;
}
else if (listRequest.IsCompleted)
{
if (listRequest.Error != null || listRequest.Status == UnityEditor.PackageManager.StatusCode.Failure)
{
updateState = PackageStates.Failed;
break;
}
string packageName = unityOpenVRPackageString;
bool hasPackage = listRequest.Result.Any(package => package.name == packageName);
if (hasPackage == false)
{
//if we don't have the package - then install it
addRequest = UnityEditor.PackageManager.Client.Add(packageName);
updateState = PackageStates.WaitingForAdd;
addTryCount++;
Debug.Log("<b>[SteamVR Setup]</b> Installing OpenVR package...");
addingPackageTime.Start();
addingPackageTimeTotal.Start();
}
else
{
//if we do have the package, make sure it's enabled.
updateState = PackageStates.Installed; //already installed
}
}
break;
case PackageStates.WaitingForAdd:
if (addRequest.IsCompleted)
{
if (addRequest.Error != null || addRequest.Status == UnityEditor.PackageManager.StatusCode.Failure)
{
updateState = PackageStates.Failed;
break;
}
else
{
//if the package manager says we added it then confirm that with the list
listRequest = UnityEditor.PackageManager.Client.List(true);
updateState = PackageStates.WaitingForAddConfirm;
}
}
else
{
if (addingPackageTimeTotal.Elapsed.TotalSeconds > estimatedTimeToInstall)
{
if (addTryCount == 1)
estimatedTimeToInstall *= 2; //give us more time to retry
else
updateState = PackageStates.Failed;
}
string dialogText;
if (addTryCount == 1)
dialogText = "Installing OpenVR from Unity Package Manager...";
else
dialogText = "Retrying OpenVR install from Unity Package Manager...";
bool cancel = UnityEditor.EditorUtility.DisplayCancelableProgressBar("SteamVR", dialogText, (float)addingPackageTimeTotal.Elapsed.TotalSeconds / estimatedTimeToInstall);
if (cancel)
updateState = PackageStates.Failed;
if (addingPackageTime.Elapsed.TotalSeconds > 10)
{
Debug.Log("<b>[SteamVR Setup]</b> Waiting for package manager to install OpenVR package...");
addingPackageTime.Stop();
addingPackageTime.Reset();
addingPackageTime.Start();
}
}
break;
case PackageStates.WaitingForAddConfirm:
if (listRequest.IsCompleted)
{
if (listRequest.Error != null)
{
updateState = PackageStates.Failed;
break;
}
string packageName = unityOpenVRPackageString;
bool hasPackage = listRequest.Result.Any(package => package.name == packageName);
if (hasPackage == false)
{
if (addTryCount == 1)
{
addRequest = UnityEditor.PackageManager.Client.Add(packageName);
updateState = PackageStates.WaitingForAdd;
addTryCount++;
Debug.Log("<b>[SteamVR Setup]</b> Retrying OpenVR package install...");
}
else
{
updateState = PackageStates.Failed;
}
}
else
{
updateState = PackageStates.Installed; //installed successfully
Debug.Log("<b>[SteamVR Setup]</b> Successfully installed OpenVR Desktop package.");
}
}
break;
case PackageStates.Installed:
UnityEditor.BuildTargetGroup currentTarget = UnityEditor.EditorUserBuildSettings.selectedBuildTargetGroup;
string[] devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevicesOnTargetGroup(currentTarget);
bool hasOpenVR = false;
bool isFirst = false;
if (devices.Length != 0)
{
int index = Array.FindIndex(devices, device => string.Equals(device, openVRString, System.StringComparison.CurrentCultureIgnoreCase));
hasOpenVR = index != -1;
isFirst = index == 0;
}
//list openvr as the first option if it was in the list already
List<string> devicesList = new List<string>(devices);
if (isFirst == false)
{
if (hasOpenVR == true)
devicesList.Remove(openVRString);
devicesList.Insert(0, openVRString);
string[] newDevices = devicesList.ToArray();
UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(currentTarget, newDevices);
Debug.Log("<b>[SteamVR Setup]</b> Added OpenVR to supported VR SDKs list.");
}
End();
break;
case PackageStates.Failed:
End();
string failtext = "The Unity Package Manager failed to automatically install the OpenVR Desktop package. Please open the Package Manager Window and try to install it manually.";
UnityEditor.EditorUtility.DisplayDialog("SteamVR", failtext, "Ok");
Debug.Log("<b>[SteamVR Setup]</b> " + failtext);
break;
}
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b894f6f57c99a1c46957650bc11d7824
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,323 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Prompt developers to use settings most compatible with SteamVR.
//
//=============================================================================
#if (UNITY_2019_1_OR_NEWER)
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Reflection;
using Valve.VR.InteractionSystem;
using UnityEditor.Callbacks;
#if OPENVR_XR_API
using UnityEditor.XR.Management.Metadata;
using UnityEngine.XR.Management;
using UnityEditor.XR.Management;
#endif
#pragma warning disable CS0618
#pragma warning disable CS0219
#pragma warning disable CS0414
namespace Valve.VR
{
#if (UNITY_2019_1_OR_NEWER && !UNITY_2020_1_OR_NEWER)
public class SteamVR_AutoEnableVR_2019to2020
{
[DidReloadScripts]
private static void OnReload()
{
#if !OPENVR_XR_API
//if we don't have xr installed, check to see if we have vr installed. if we don't have vr installed, ask which they do want to install.
SteamVR_AutoEnableVR_2019.CheckAndAsk();
#else
//since we already have xr installed, we know we just want to enable it
SteamVR_AutoEnableVR_UnityXR.EnableUnityXR();
#endif
}
}
#endif
#if (UNITY_2020_1_OR_NEWER)
public class SteamVR_AutoEnableVR_2020Plus
{
[DidReloadScripts]
private static void OnReload()
{
#if !OPENVR_XR_API
SteamVR_AutoEnableVR_UnityXR.InstallAndEnableUnityXR();
#else
//since we already have xr installed, we know we just want to enable it
SteamVR_AutoEnableVR_UnityXR.EnableUnityXR();
#endif
}
}
#endif
#if (UNITY_2019_1_OR_NEWER && !UNITY_2020_1_OR_NEWER)
public class SteamVR_AutoEnableVR_2019
{
public static void CheckAndAsk()
{
EditorApplication.update += Update;
}
protected const string openVRString = "OpenVR";
protected const string unityOpenVRPackageString = "com.unity.xr.openvr.standalone";
protected const string valveOpenVRPackageString = "com.valvesoftware.unity.openvr";
private enum PackageStates
{
None,
WaitingForList,
Complete,
Failed,
}
private static UnityEditor.PackageManager.Requests.ListRequest listRequest;
private static PackageStates packageState = PackageStates.None;
private static void End()
{
packageState = PackageStates.None;
UnityEditor.EditorUtility.ClearProgressBar();
EditorApplication.update -= Update;
}
private static void ShowDialog()
{
int shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "The SteamVR Unity Plugin can be used with the legacy Unity VR API (Unity 5.4 - 2019) or with the Unity XR API (2019+). Would you like to install in legacy VR mode or for Unity XR?", "Legacy VR", "Cancel", "Unity XR");
switch (shouldInstall)
{
case 0: //legacy vr
SteamVR_AutoEnableVR_UnityPackage.InstallAndEnableUnityVR();
break;
case 1: //cancel
break;
case 2: //unity xr
SteamVR_AutoEnableVR_UnityXR.InstallAndEnableUnityXR();
break;
}
End();
}
public static void Update()
{
if (!SteamVR_Settings.instance.autoEnableVR || Application.isPlaying)
End();
if (UnityEditor.PlayerSettings.virtualRealitySupported == false)
{
ShowDialog();
return;
}
switch (packageState)
{
case PackageStates.None:
//see if we have the package
listRequest = UnityEditor.PackageManager.Client.List(true);
packageState = PackageStates.WaitingForList;
break;
case PackageStates.WaitingForList:
if (listRequest.IsCompleted)
{
if (listRequest.Error != null || listRequest.Status == UnityEditor.PackageManager.StatusCode.Failure)
{
packageState = PackageStates.Failed;
break;
}
string packageName = unityOpenVRPackageString;
bool hasPackage = listRequest.Result.Any(package => package.name == packageName);
if (hasPackage == false)
ShowDialog();
else //if we do have the package, do nothing
End();
}
break;
case PackageStates.Failed:
End();
string failtext = "The Unity Package Manager failed to verify the OpenVR package. If you were trying to install it you may need to open the Package Manager Window and try to install it manually.";
UnityEditor.EditorUtility.DisplayDialog("SteamVR", failtext, "Ok");
Debug.Log("<b>[SteamVR Setup]</b> " + failtext);
break;
}
}
}
#endif
// todo: split the below into an install and an enable section
public class SteamVR_AutoEnableVR_UnityXR
{
public static void InstallAndEnableUnityXR()
{
StartXRInstaller();
EditorApplication.update += Update;
}
public static void EnableUnityXR()
{
EditorApplication.update += Update;
}
protected const string openVRString = "OpenVR";
protected const string unityOpenVRPackageString = "com.unity.xr.openvr.standalone";
protected const string valveOpenVRPackageString = "com.valvesoftware.unity.openvr";
private enum PackageStates
{
None,
WaitingForList,
WaitingForAdd,
WaitingForAddConfirm,
Installed,
Failed,
}
private static UnityEditor.PackageManager.Requests.ListRequest listRequest;
private static UnityEditor.PackageManager.Requests.AddRequest addRequest;
private static PackageStates packageState = PackageStates.None;
private static System.Diagnostics.Stopwatch addingPackageTime = new System.Diagnostics.Stopwatch();
private static System.Diagnostics.Stopwatch addingPackageTimeTotal = new System.Diagnostics.Stopwatch();
private static float estimatedTimeToInstall = 80;
private static int addTryCount = 0;
private static string enabledLoaderKey = null;
private static MethodInfo isLoaderAssigned;
private static MethodInfo installPackageAndAssignLoaderForBuildTarget;
private static Type[] isLoaderAssignedMethodParameters;
private static object[] isLoaderAssignedCallParameters;
private static void End()
{
addingPackageTime.Stop();
addingPackageTimeTotal.Stop();
UnityEditor.EditorUtility.ClearProgressBar();
EditorApplication.update -= Update;
}
public static void Update()
{
if (!SteamVR_Settings.instance.autoEnableVR)
End();
#if OPENVR_XR_API
EnableLoader();
#endif
}
#if OPENVR_XR_API
private static EditorWindow settingsWindow = null;
private static int skipEditorFrames = 5;
public static void EnableLoader()
{
if (skipEditorFrames > 0)
{
skipEditorFrames--;
return;
}
if (enabledLoaderKey == null)
enabledLoaderKey = string.Format(valveEnabledLoaderKeyTemplate, SteamVR_Settings.instance.editorAppKey);
if (EditorPrefs.HasKey(enabledLoaderKey) == false)
{
if (UnityEditor.PlayerSettings.virtualRealitySupported == true)
{
UnityEditor.PlayerSettings.virtualRealitySupported = false;
Debug.Log("<b>[SteamVR Setup]</b> Disabled virtual reality support in Player Settings. <b>Because you're using XR Manager. Make sure OpenVR Loader is enabled in XR Manager UI.</b> (you can disable this by unchecking Assets/SteamVR/SteamVR_Settings.autoEnableVR)");
}
var generalSettings = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildTargetGroup.Standalone);
if (generalSettings == null)
{
if (settingsWindow == null)
{
settingsWindow = SettingsService.OpenProjectSettings("Project/XR Plug-in Management");
settingsWindow.Repaint();
return;
}
if (settingsWindow == null || generalSettings == null)
{
Debug.LogWarning("<b>[SteamVR Setup]</b> Unable to access standalone xr settings while trying to enable OpenVR Loader. <b>You may need to manually enable OpenVR Loader in XR Plug-in Management (Project Settings).</b> (you can disable this by unchecking Assets/SteamVR/SteamVR_Settings.autoEnableVR)");
return;
}
}
if (generalSettings.AssignedSettings == null)
{
var assignedSettings = ScriptableObject.CreateInstance<XRManagerSettings>() as XRManagerSettings;
generalSettings.AssignedSettings = assignedSettings;
EditorUtility.SetDirty(generalSettings);
}
bool existing = generalSettings.AssignedSettings.loaders.Any(loader => loader.name == valveOpenVRLoaderType);
foreach (var loader in generalSettings.AssignedSettings.loaders)
{
Debug.Log("loader: " + loader.name);
}
if (!existing)
{
bool status = XRPackageMetadataStore.AssignLoader(generalSettings.AssignedSettings, valveOpenVRLoaderType, BuildTargetGroup.Standalone);
if (status)
Debug.Log("<b>[SteamVR Setup]</b> Enabled OpenVR Loader in XR Management");
else
Debug.LogError("<b>[SteamVR Setup]</b> Failed to enable enable OpenVR Loader in XR Management. You may need to manually open the XR Plug-in Management tab in project settings and check the OpenVR Loader box.");
}
EditorPrefs.SetBool(enabledLoaderKey, true);
}
End();
}
#endif
protected const string valveEnabledLoaderKeyTemplate = "valve.enabledxrloader.{0}";
protected const string valveOpenVRLoaderType = "Unity.XR.OpenVR.OpenVRLoader";
private static void StartXRInstaller()
{
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
for (int assemblyIndex = 0; assemblyIndex < assemblies.Length; assemblyIndex++)
{
Assembly assembly = assemblies[assemblyIndex];
Type type = assembly.GetType("Unity.XR.OpenVR.OpenVRPackageInstaller");
if (type != null)
{
MethodInfo preinitMethodInfo = type.GetMethod("Start");
if (preinitMethodInfo != null)
{
preinitMethodInfo.Invoke(null, new object[] { true });
return;
}
}
}
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 524ac57f667bffd459f44076a7111efb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,123 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Prompt developers to use settings most compatible with SteamVR.
//
//=============================================================================
#if (UNITY_5_4_OR_NEWER && !UNITY_2018_1_OR_NEWER)
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Reflection;
using UnityEditor.Callbacks;
namespace Valve.VR
{
public class SteamVR_AutoEnableVR_54to2018
{
[DidReloadScripts]
private static void OnReload()
{
EditorApplication.update += Update;
}
protected const string openVRString = "OpenVR";
private static void End()
{
EditorApplication.update -= Update;
}
public static void Update()
{
if (!SteamVR_Settings.instance.autoEnableVR || Application.isPlaying)
End();
bool enabledVR = false;
int shouldInstall = -1;
if (UnityEditor.PlayerSettings.virtualRealitySupported == false)
{
shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "Would you like to enable Virtual Reality mode?\n\nThis will enable Virtual Reality in Player Settings and add OpenVR as a target.", "Yes", "No, and don't ask again", "No");
switch (shouldInstall)
{
case 0: //yes
UnityEditor.PlayerSettings.virtualRealitySupported = true;
break;
case 1: //no:
UnityEditor.EditorApplication.update -= Update;
return;
case 2: //no, don't ask
SteamVR_Settings.instance.autoEnableVR = false;
SteamVR_Settings.Save();
UnityEditor.EditorApplication.update -= Update;
return;
}
}
UnityEditor.BuildTargetGroup currentTarget = UnityEditor.EditorUserBuildSettings.selectedBuildTargetGroup;
#if UNITY_5_6_OR_NEWER
string[] devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevicesOnTargetGroup(currentTarget);
#else
string[] devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevices(currentTarget);
#endif
bool hasOpenVR = devices.Any(device => string.Equals(device, openVRString, System.StringComparison.CurrentCultureIgnoreCase));
if (hasOpenVR == false || enabledVR)
{
string[] newDevices;
if (enabledVR && hasOpenVR == false)
{
newDevices = new string[] { openVRString }; //only list openvr if we enabled it
}
else
{
List<string> devicesList = new List<string>(devices); //list openvr as the first option if it wasn't in the list.
if (hasOpenVR)
devicesList.Remove(openVRString);
devicesList.Insert(0, openVRString);
newDevices = devicesList.ToArray();
}
int shouldEnable = -1;
if (shouldInstall == 0)
shouldEnable = 0;
else
shouldEnable = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "Would you like to enable OpenVR as a VR target?", "Yes", "No, and don't ask again", "No");
switch (shouldEnable)
{
case 0: //yes
#if UNITY_5_6_OR_NEWER
UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(currentTarget, newDevices);
#else
UnityEditorInternal.VR.VREditor.SetVREnabledDevices(currentTarget, newDevices);
#endif
Debug.Log("<b>[SteamVR Setup]</b> Added OpenVR to supported VR SDKs list.");
break;
case 1: //no:
break;
case 2: //no, don't ask
SteamVR_Settings.instance.autoEnableVR = false;
SteamVR_Settings.Save();
break;
}
}
UnityEditor.EditorApplication.update -= Update;
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f3c98d5dbcd01ee4ba302d8f71a8d55a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,36 @@
{
"name": "SteamVR_Editor",
"references": [
"SteamVR",
"Unity.XR.OpenVR",
"Unity.XR.Management.Editor",
"Unity.XR.Management"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.valvesoftware.unity.openvr",
"expression": "",
"define": "OPENVR_XR_API"
},
{
"name": "com.unity.xr.management",
"expression": "3.2.0",
"define": "XR_MGMT_GTE_320"
},
{
"name": "com.unity.xr.management",
"expression": "",
"define": "XR_MGMT"
}
],
"noEngineReferences": false
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9bac448de04a4f6448fee1acc220e5a1
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,127 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Custom inspector display for SteamVR_Camera
//
//=============================================================================
using UnityEngine;
using UnityEditor;
using System.IO;
using Valve.VR;
[CustomEditor(typeof(SteamVR_Camera)), CanEditMultipleObjects]
public class SteamVR_Editor : Editor
{
int bannerHeight = 150;
Texture logo;
SerializedProperty script, wireframe;
string GetResourcePath()
{
var ms = MonoScript.FromScriptableObject(this);
var path = AssetDatabase.GetAssetPath(ms);
path = Path.GetDirectoryName(path);
return path.Substring(0, path.Length - "Editor".Length) + "Textures/";
}
void OnEnable()
{
var resourcePath = GetResourcePath();
logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
script = serializedObject.FindProperty("m_Script");
wireframe = serializedObject.FindProperty("wireframe");
foreach (SteamVR_Camera target in targets)
target.ForceLast();
}
public override void OnInspectorGUI()
{
serializedObject.Update();
var rect = GUILayoutUtility.GetRect(Screen.width - 38, bannerHeight, GUI.skin.box);
if (logo)
GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
if (!Application.isPlaying)
{
var expand = false;
var collapse = false;
foreach (SteamVR_Camera target in targets)
{
if (AssetDatabase.Contains(target))
continue;
if (target.isExpanded)
collapse = true;
else
expand = true;
}
if (expand)
{
GUILayout.BeginHorizontal();
if (GUILayout.Button("Expand"))
{
foreach (SteamVR_Camera target in targets)
{
if (AssetDatabase.Contains(target))
continue;
if (!target.isExpanded)
{
target.Expand();
EditorUtility.SetDirty(target);
}
}
}
GUILayout.Space(18);
GUILayout.EndHorizontal();
}
if (collapse)
{
GUILayout.BeginHorizontal();
if (GUILayout.Button("Collapse"))
{
foreach (SteamVR_Camera target in targets)
{
if (AssetDatabase.Contains(target))
continue;
if (target.isExpanded)
{
target.Collapse();
EditorUtility.SetDirty(target);
}
}
}
GUILayout.Space(18);
GUILayout.EndHorizontal();
}
}
EditorGUILayout.PropertyField(script);
EditorGUILayout.PropertyField(wireframe);
serializedObject.ApplyModifiedProperties();
}
public static void ExportPackage()
{
AssetDatabase.ExportPackage(new string[] {
"Assets/SteamVR",
"Assets/Plugins/openvr_api.cs",
"Assets/Plugins/openvr_api.bundle",
"Assets/Plugins/x86/openvr_api.dll",
"Assets/Plugins/x86/steam_api.dll",
"Assets/Plugins/x86/libsteam_api.so",
"Assets/Plugins/x86_64/openvr_api.dll",
"Assets/Plugins/x86_64/steam_api.dll",
"Assets/Plugins/x86_64/libsteam_api.so",
"Assets/Plugins/x86_64/libopenvr_api.so",
}, "steamvr.unitypackage", ExportPackageOptions.Recurse);
EditorApplication.Exit(0);
}
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5ba22c80948c94e44a82b9fd1b3abd0d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:

View File

@ -0,0 +1,2 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//removed and added to the SteamVR_Settings asset so it can be configured per project

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 29abf75f7265ccb45b799eac4ab0ca94
timeCreated: 1487968203
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,106 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Custom inspector display for SteamVR_RenderModel
//
//=============================================================================
using UnityEngine;
using UnityEditor;
using System.Text;
using System.Collections.Generic;
namespace Valve.VR
{
[CustomEditor(typeof(SteamVR_RenderModel)), CanEditMultipleObjects]
public class SteamVR_RenderModelEditor : Editor
{
SerializedProperty script, index, modelOverride, shader, verbose, createComponents, updateDynamically;
static string[] renderModelNames;
int renderModelIndex;
void OnEnable()
{
script = serializedObject.FindProperty("m_Script");
index = serializedObject.FindProperty("index");
modelOverride = serializedObject.FindProperty("modelOverride");
shader = serializedObject.FindProperty("shader");
verbose = serializedObject.FindProperty("verbose");
createComponents = serializedObject.FindProperty("createComponents");
updateDynamically = serializedObject.FindProperty("updateDynamically");
// Load render model names if necessary.
if (renderModelNames == null)
{
renderModelNames = LoadRenderModelNames();
}
// Update renderModelIndex based on current modelOverride value.
if (modelOverride.stringValue != "")
{
for (int i = 0; i < renderModelNames.Length; i++)
{
if (modelOverride.stringValue == renderModelNames[i])
{
renderModelIndex = i;
break;
}
}
}
}
static string[] LoadRenderModelNames()
{
var results = new List<string>();
results.Add("None");
using (var holder = new SteamVR_RenderModel.RenderModelInterfaceHolder())
{
var renderModels = holder.instance;
if (renderModels != null)
{
uint count = renderModels.GetRenderModelCount();
for (uint i = 0; i < count; i++)
{
var buffer = new StringBuilder();
var requiredSize = renderModels.GetRenderModelName(i, buffer, 0);
if (requiredSize == 0)
continue;
buffer.EnsureCapacity((int)requiredSize);
renderModels.GetRenderModelName(i, buffer, requiredSize);
results.Add(buffer.ToString());
}
}
}
return results.ToArray();
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(script);
EditorGUILayout.PropertyField(index);
//EditorGUILayout.PropertyField(modelOverride);
GUILayout.BeginHorizontal();
GUILayout.Label(new GUIContent("Model Override", SteamVR_RenderModel.modelOverrideWarning));
var selected = EditorGUILayout.Popup(renderModelIndex, renderModelNames);
if (selected != renderModelIndex)
{
renderModelIndex = selected;
modelOverride.stringValue = (selected > 0) ? renderModelNames[selected] : "";
}
GUILayout.EndHorizontal();
EditorGUILayout.PropertyField(shader);
EditorGUILayout.PropertyField(verbose);
EditorGUILayout.PropertyField(createComponents);
EditorGUILayout.PropertyField(updateDynamically);
serializedObject.ApplyModifiedProperties();
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 67867a20919f7db45a2e7034fda1c28e
timeCreated: 1433373945
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,383 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Custom inspector display for SteamVR_Skybox
//
//=============================================================================
using UnityEngine;
using UnityEditor;
using System.Text;
using System.Collections.Generic;
using Valve.VR;
using System.IO;
namespace Valve.VR
{
[CustomEditor(typeof(SteamVR_Skybox)), CanEditMultipleObjects]
public class SteamVR_SkyboxEditor : Editor
{
private const string nameFormat = "{0}/{1}-{2}.png";
private const string helpText = "Take snapshot will use the current " +
"position and rotation to capture six directional screenshots to use as this " +
"skybox's textures. Note: This skybox is only used to override what shows up " +
"in the compositor (e.g. when loading levels). Add a Camera component to this " +
"object to override default settings like which layers to render. Additionally, " +
"by specifying your own targetTexture, you can control the size of the textures " +
"and other properties like antialiasing. Don't forget to disable the camera.\n\n" +
"For stereo screenshots, a panorama is render for each eye using the specified " +
"ipd (in millimeters) broken up into segments cellSize pixels square to optimize " +
"generation.\n(32x32 takes about 10 seconds depending on scene complexity, 16x16 " +
"takes around a minute, while will 8x8 take several minutes.)\n\nTo test, hit " +
"play then pause - this will activate the skybox settings, and then drop you to " +
"the compositor where the skybox is rendered.";
public override void OnInspectorGUI()
{
DrawDefaultInspector();
EditorGUILayout.HelpBox(helpText, MessageType.Info);
if (GUILayout.Button("Take snapshot"))
{
var directions = new Quaternion[] {
Quaternion.LookRotation(Vector3.forward),
Quaternion.LookRotation(Vector3.back),
Quaternion.LookRotation(Vector3.left),
Quaternion.LookRotation(Vector3.right),
Quaternion.LookRotation(Vector3.up, Vector3.back),
Quaternion.LookRotation(Vector3.down, Vector3.forward)
};
Camera tempCamera = null;
foreach (SteamVR_Skybox target in targets)
{
var targetScene = target.gameObject.scene;
var sceneName = Path.GetFileNameWithoutExtension(targetScene.path);
var scenePath = Path.GetDirectoryName(targetScene.path);
var assetPath = scenePath + "/" + sceneName;
if (!AssetDatabase.IsValidFolder(assetPath))
{
var guid = AssetDatabase.CreateFolder(scenePath, sceneName);
assetPath = AssetDatabase.GUIDToAssetPath(guid);
}
var camera = target.GetComponent<Camera>();
if (camera == null)
{
if (tempCamera == null)
tempCamera = new GameObject().AddComponent<Camera>();
camera = tempCamera;
}
var targetTexture = camera.targetTexture;
if (camera.targetTexture == null)
{
targetTexture = new RenderTexture(1024, 1024, 24);
targetTexture.antiAliasing = 8;
camera.targetTexture = targetTexture;
}
var oldPosition = target.transform.localPosition;
var oldRotation = target.transform.localRotation;
var baseRotation = target.transform.rotation;
var t = camera.transform;
t.position = target.transform.position;
camera.orthographic = false;
camera.fieldOfView = 90;
for (int i = 0; i < directions.Length; i++)
{
t.rotation = baseRotation * directions[i];
camera.Render();
// Copy to texture and save to disk.
RenderTexture.active = targetTexture;
var texture = new Texture2D(targetTexture.width, targetTexture.height, TextureFormat.ARGB32, false);
texture.ReadPixels(new Rect(0, 0, texture.width, texture.height), 0, 0);
texture.Apply();
RenderTexture.active = null;
var assetName = string.Format(nameFormat, assetPath, target.name, i);
System.IO.File.WriteAllBytes(assetName, texture.EncodeToPNG());
}
if (camera != tempCamera)
{
target.transform.localPosition = oldPosition;
target.transform.localRotation = oldRotation;
}
}
if (tempCamera != null)
{
Object.DestroyImmediate(tempCamera.gameObject);
}
// Now that everything has be written out, reload the associated assets and assign them.
AssetDatabase.Refresh();
foreach (SteamVR_Skybox target in targets)
{
var targetScene = target.gameObject.scene;
var sceneName = Path.GetFileNameWithoutExtension(targetScene.path);
var scenePath = Path.GetDirectoryName(targetScene.path);
var assetPath = scenePath + "/" + sceneName;
for (int i = 0; i < directions.Length; i++)
{
var assetName = string.Format(nameFormat, assetPath, target.name, i);
var importer = AssetImporter.GetAtPath(assetName) as TextureImporter;
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
importer.textureFormat = TextureImporterFormat.RGB24;
#else
importer.textureCompression = TextureImporterCompression.Uncompressed;
#endif
importer.wrapMode = TextureWrapMode.Clamp;
importer.mipmapEnabled = false;
importer.SaveAndReimport();
var texture = AssetDatabase.LoadAssetAtPath<Texture>(assetName);
target.SetTextureByIndex(i, texture);
}
}
}
else if (GUILayout.Button("Take stereo snapshot"))
{
const int width = 4096;
const int height = width / 2;
const int halfHeight = height / 2;
var textures = new Texture2D[] {
new Texture2D(width, height, TextureFormat.ARGB32, false),
new Texture2D(width, height, TextureFormat.ARGB32, false) };
var timer = new System.Diagnostics.Stopwatch();
Camera tempCamera = null;
foreach (SteamVR_Skybox target in targets)
{
timer.Start();
var targetScene = target.gameObject.scene;
var sceneName = Path.GetFileNameWithoutExtension(targetScene.path);
var scenePath = Path.GetDirectoryName(targetScene.path);
var assetPath = scenePath + "/" + sceneName;
if (!AssetDatabase.IsValidFolder(assetPath))
{
var guid = AssetDatabase.CreateFolder(scenePath, sceneName);
assetPath = AssetDatabase.GUIDToAssetPath(guid);
}
var camera = target.GetComponent<Camera>();
if (camera == null)
{
if (tempCamera == null)
tempCamera = new GameObject().AddComponent<Camera>();
camera = tempCamera;
}
var fx = camera.gameObject.AddComponent<SteamVR_SphericalProjection>();
var oldTargetTexture = camera.targetTexture;
var oldOrthographic = camera.orthographic;
var oldFieldOfView = camera.fieldOfView;
var oldAspect = camera.aspect;
var oldPosition = target.transform.localPosition;
var oldRotation = target.transform.localRotation;
var basePosition = target.transform.position;
var baseRotation = target.transform.rotation;
var transform = camera.transform;
int cellSize = int.Parse(target.StereoCellSize.ToString().Substring(1));
float ipd = target.StereoIpdMm / 1000.0f;
int vTotal = halfHeight / cellSize;
float dv = 90.0f / vTotal; // vertical degrees per segment
float dvHalf = dv / 2.0f;
var targetTexture = new RenderTexture(cellSize, cellSize, 24);
targetTexture.wrapMode = TextureWrapMode.Clamp;
targetTexture.antiAliasing = 8;
camera.fieldOfView = dv;
camera.orthographic = false;
camera.targetTexture = targetTexture;
// Render sections of a sphere using a rectilinear projection
// and resample using a sphereical projection into a single panorama
// texture per eye. We break into sections in order to keep the eye
// separation similar around the sphere. Rendering alternates between
// top and bottom sections, sweeping horizontally around the sphere,
// alternating left and right eyes.
for (int v = 0; v < vTotal; v++)
{
var pitch = 90.0f - (v * dv) - dvHalf;
var uTotal = width / targetTexture.width;
var du = 360.0f / uTotal; // horizontal degrees per segment
var duHalf = du / 2.0f;
var vTarget = v * halfHeight / vTotal;
for (int i = 0; i < 2; i++) // top, bottom
{
if (i == 1)
{
pitch = -pitch;
vTarget = height - vTarget - cellSize;
}
for (int u = 0; u < uTotal; u++)
{
var yaw = -180.0f + (u * du) + duHalf;
var uTarget = u * width / uTotal;
var xOffset = -ipd / 2 * Mathf.Cos(pitch * Mathf.Deg2Rad);
for (int j = 0; j < 2; j++) // left, right
{
var texture = textures[j];
if (j == 1)
{
xOffset = -xOffset;
}
var offset = baseRotation * Quaternion.Euler(0, yaw, 0) * new Vector3(xOffset, 0, 0);
transform.position = basePosition + offset;
var direction = Quaternion.Euler(pitch, yaw, 0.0f);
transform.rotation = baseRotation * direction;
// vector pointing to center of this section
var N = direction * Vector3.forward;
// horizontal span of this section in degrees
var phi0 = yaw - (du / 2);
var phi1 = phi0 + du;
// vertical span of this section in degrees
var theta0 = pitch + (dv / 2);
var theta1 = theta0 - dv;
var midPhi = (phi0 + phi1) / 2;
var baseTheta = Mathf.Abs(theta0) < Mathf.Abs(theta1) ? theta0 : theta1;
// vectors pointing to corners of image closes to the equator
var V00 = Quaternion.Euler(baseTheta, phi0, 0.0f) * Vector3.forward;
var V01 = Quaternion.Euler(baseTheta, phi1, 0.0f) * Vector3.forward;
// vectors pointing to top and bottom midsection of image
var V0M = Quaternion.Euler(theta0, midPhi, 0.0f) * Vector3.forward;
var V1M = Quaternion.Euler(theta1, midPhi, 0.0f) * Vector3.forward;
// intersection points for each of the above
var P00 = V00 / Vector3.Dot(V00, N);
var P01 = V01 / Vector3.Dot(V01, N);
var P0M = V0M / Vector3.Dot(V0M, N);
var P1M = V1M / Vector3.Dot(V1M, N);
// calculate basis vectors for plane
var P00_P01 = P01 - P00;
var P0M_P1M = P1M - P0M;
var uMag = P00_P01.magnitude;
var vMag = P0M_P1M.magnitude;
var uScale = 1.0f / uMag;
var vScale = 1.0f / vMag;
var uAxis = P00_P01 * uScale;
var vAxis = P0M_P1M * vScale;
// update material constant buffer
fx.Set(N, phi0, phi1, theta0, theta1,
uAxis, P00, uScale,
vAxis, P0M, vScale);
camera.aspect = uMag / vMag;
camera.Render();
RenderTexture.active = targetTexture;
texture.ReadPixels(new Rect(0, 0, targetTexture.width, targetTexture.height), uTarget, vTarget);
RenderTexture.active = null;
}
}
}
}
// Save textures to disk.
for (int i = 0; i < 2; i++)
{
var texture = textures[i];
texture.Apply();
var assetName = string.Format(nameFormat, assetPath, target.name, i);
File.WriteAllBytes(assetName, texture.EncodeToPNG());
}
// Cleanup.
if (camera != tempCamera)
{
camera.targetTexture = oldTargetTexture;
camera.orthographic = oldOrthographic;
camera.fieldOfView = oldFieldOfView;
camera.aspect = oldAspect;
target.transform.localPosition = oldPosition;
target.transform.localRotation = oldRotation;
}
else
{
tempCamera.targetTexture = null;
}
DestroyImmediate(targetTexture);
DestroyImmediate(fx);
timer.Stop();
Debug.Log(string.Format("<b>[SteamVR]</b> Screenshot took {0} seconds.", timer.Elapsed));
}
if (tempCamera != null)
{
DestroyImmediate(tempCamera.gameObject);
}
DestroyImmediate(textures[0]);
DestroyImmediate(textures[1]);
// Now that everything has be written out, reload the associated assets and assign them.
AssetDatabase.Refresh();
foreach (SteamVR_Skybox target in targets)
{
var targetScene = target.gameObject.scene;
var sceneName = Path.GetFileNameWithoutExtension(targetScene.path);
var scenePath = Path.GetDirectoryName(targetScene.path);
var assetPath = scenePath + "/" + sceneName;
for (int i = 0; i < 2; i++)
{
var assetName = string.Format(nameFormat, assetPath, target.name, i);
var importer = AssetImporter.GetAtPath(assetName) as TextureImporter;
importer.mipmapEnabled = false;
importer.wrapMode = TextureWrapMode.Repeat;
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
importer.SetPlatformTextureSettings("Standalone", width, TextureImporterFormat.RGB24);
#else
var settings = importer.GetPlatformTextureSettings("Standalone");
settings.textureCompression = TextureImporterCompression.Uncompressed;
settings.maxTextureSize = width;
importer.SetPlatformTextureSettings(settings);
#endif
importer.SaveAndReimport();
var texture = AssetDatabase.LoadAssetAtPath<Texture2D>(assetName);
target.SetTextureByIndex(i, texture);
}
}
}
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 80087fbbf7bf93a46bb4aea276b19568
timeCreated: 1446765449
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,692 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Prompt developers to use settings most compatible with SteamVR.
//
//=============================================================================
using UnityEngine;
using UnityEditor;
using System.IO;
namespace Valve.VR
{
[InitializeOnLoad]
public class SteamVR_UnitySettingsWindow : EditorWindow
{
const bool forceShow = false; // Set to true to get the dialog to show back up in the case you clicked Ignore All.
const string ignore = "ignore.";
const string useRecommended = "Use recommended ({0})";
const string currentValue = " (current = {0})";
const string buildTarget = "Build Target";
const string showUnitySplashScreen = "Show Unity Splashscreen";
const string defaultIsFullScreen = "Default is Fullscreen";
const string defaultScreenSize = "Default Screen Size";
const string runInBackground = "Run In Background";
const string displayResolutionDialog = "Display Resolution Dialog";
const string resizableWindow = "Resizable Window";
const string fullscreenMode = "D3D11 Fullscreen Mode";
const string visibleInBackground = "Visible In Background";
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
const string renderingPath = "Rendering Path";
#endif
const string colorSpace = "Color Space";
const string gpuSkinning = "GPU Skinning";
#if false // skyboxes are currently broken
const string singlePassStereoRendering = "Single-Pass Stereo Rendering";
#endif
const BuildTarget recommended_BuildTarget = BuildTarget.StandaloneWindows64;
const bool recommended_ShowUnitySplashScreen = false;
const bool recommended_DefaultIsFullScreen = false;
const int recommended_DefaultScreenWidth = 1024;
const int recommended_DefaultScreenHeight = 768;
const bool recommended_RunInBackground = true;
#if !UNITY_2019_1_OR_NEWER
const ResolutionDialogSetting recommended_DisplayResolutionDialog = ResolutionDialogSetting.HiddenByDefault;
#endif
const bool recommended_ResizableWindow = true;
const D3D11FullscreenMode recommended_FullscreenMode = D3D11FullscreenMode.FullscreenWindow;
const bool recommended_VisibleInBackground = true;
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
const RenderingPath recommended_RenderPath = RenderingPath.Forward;
#endif
const ColorSpace recommended_ColorSpace = ColorSpace.Linear;
const bool recommended_GpuSkinning = true;
#if false
const bool recommended_SinglePassStereoRendering = true;
#endif
#if UNITY_2018_1_OR_NEWER
const FullScreenMode recommended_FullScreenMode = FullScreenMode.FullScreenWindow;
#endif
static SteamVR_UnitySettingsWindow window;
static SteamVR_UnitySettingsWindow()
{
EditorApplication.update += Update;
}
static void Update()
{
bool show =
(!EditorPrefs.HasKey(ignore + buildTarget) &&
EditorUserBuildSettings.activeBuildTarget != recommended_BuildTarget) ||
(!EditorPrefs.HasKey(ignore + showUnitySplashScreen) &&
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
PlayerSettings.showUnitySplashScreen != recommended_ShowUnitySplashScreen) ||
#else
PlayerSettings.SplashScreen.show != recommended_ShowUnitySplashScreen) ||
#endif
#if UNITY_2018_1_OR_NEWER
(!EditorPrefs.HasKey(ignore + defaultIsFullScreen) &&
PlayerSettings.fullScreenMode != recommended_FullScreenMode) ||
#else
(!EditorPrefs.HasKey(ignore + defaultIsFullScreen) &&
PlayerSettings.defaultIsFullScreen != recommended_DefaultIsFullScreen) ||
(!EditorPrefs.HasKey(ignore + fullscreenMode) &&
PlayerSettings.d3d11FullscreenMode != recommended_FullscreenMode) ||
#endif
(!EditorPrefs.HasKey(ignore + defaultScreenSize) &&
(PlayerSettings.defaultScreenWidth != recommended_DefaultScreenWidth ||
PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight)) ||
(!EditorPrefs.HasKey(ignore + runInBackground) &&
PlayerSettings.runInBackground != recommended_RunInBackground) ||
#if !UNITY_2019_1_OR_NEWER
(!EditorPrefs.HasKey(ignore + displayResolutionDialog) &&
PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog) ||
#endif
(!EditorPrefs.HasKey(ignore + resizableWindow) &&
PlayerSettings.resizableWindow != recommended_ResizableWindow) ||
(!EditorPrefs.HasKey(ignore + visibleInBackground) &&
PlayerSettings.visibleInBackground != recommended_VisibleInBackground) ||
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
(!EditorPrefs.HasKey(ignore + renderingPath) &&
PlayerSettings.renderingPath != recommended_RenderPath) ||
#endif
(!EditorPrefs.HasKey(ignore + colorSpace) &&
PlayerSettings.colorSpace != recommended_ColorSpace) ||
(!EditorPrefs.HasKey(ignore + gpuSkinning) &&
PlayerSettings.gpuSkinning != recommended_GpuSkinning) ||
#if false
(!EditorPrefs.HasKey(ignore + singlePassStereoRendering) &&
PlayerSettings.singlePassStereoRendering != recommended_SinglePassStereoRendering) ||
#endif
forceShow;
if (show)
{
window = GetWindow<SteamVR_UnitySettingsWindow>(true);
window.minSize = new Vector2(320, 440);
//window.title = "SteamVR";
}
string[] dlls = new string[]
{
"Plugins/x86/openvr_api.dll",
"Plugins/x86_64/openvr_api.dll"
};
foreach (string path in dlls)
{
if (!File.Exists(Application.dataPath + "/" + path))
continue;
if (AssetDatabase.DeleteAsset("Assets/" + path))
Debug.Log("<b>[SteamVR Setup]</b> Deleting " + path);
else
{
Debug.Log("<b>[SteamVR Setup]</b> " + path + " in use; cannot delete. Please restart Unity to complete upgrade.");
}
}
EditorApplication.update -= Update;
}
Vector2 scrollPosition;
string GetResourcePath()
{
var ms = MonoScript.FromScriptableObject(this);
var path = AssetDatabase.GetAssetPath(ms);
path = Path.GetDirectoryName(path);
return path.Substring(0, path.Length - "Editor".Length) + "Textures/";
}
public void OnGUI()
{
var resourcePath = GetResourcePath();
var logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
var rect = GUILayoutUtility.GetRect(position.width, 150, GUI.skin.box);
if (logo)
GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
EditorGUILayout.HelpBox("Recommended project settings for SteamVR:", MessageType.Warning);
scrollPosition = GUILayout.BeginScrollView(scrollPosition);
int numItems = 0;
if (!EditorPrefs.HasKey(ignore + buildTarget) &&
EditorUserBuildSettings.activeBuildTarget != recommended_BuildTarget)
{
++numItems;
GUILayout.Label(buildTarget + string.Format(currentValue, EditorUserBuildSettings.activeBuildTarget));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_BuildTarget)))
{
#if (UNITY_5_5 || UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
EditorUserBuildSettings.SwitchActiveBuildTarget(recommended_BuildTarget);
#else
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, recommended_BuildTarget);
#endif
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + buildTarget, true);
}
GUILayout.EndHorizontal();
}
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
if (!EditorPrefs.HasKey(ignore + showUnitySplashScreen) &&
PlayerSettings.showUnitySplashScreen != recommended_ShowUnitySplashScreen)
{
++numItems;
GUILayout.Label(showUnitySplashScreen + string.Format(currentValue, PlayerSettings.showUnitySplashScreen));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_ShowUnitySplashScreen)))
{
PlayerSettings.showUnitySplashScreen = recommended_ShowUnitySplashScreen;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + showUnitySplashScreen, true);
}
GUILayout.EndHorizontal();
}
#else
if (!EditorPrefs.HasKey(ignore + showUnitySplashScreen) &&
PlayerSettings.SplashScreen.show != recommended_ShowUnitySplashScreen)
{
++numItems;
GUILayout.Label(showUnitySplashScreen + string.Format(currentValue, PlayerSettings.SplashScreen.show));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_ShowUnitySplashScreen)))
{
PlayerSettings.SplashScreen.show = recommended_ShowUnitySplashScreen;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + showUnitySplashScreen, true);
}
GUILayout.EndHorizontal();
}
#endif
#if UNITY_2018_1_OR_NEWER
#else
if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen) &&
PlayerSettings.defaultIsFullScreen != recommended_DefaultIsFullScreen)
{
++numItems;
GUILayout.Label(defaultIsFullScreen + string.Format(currentValue, PlayerSettings.defaultIsFullScreen));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_DefaultIsFullScreen)))
{
PlayerSettings.defaultIsFullScreen = recommended_DefaultIsFullScreen;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + defaultIsFullScreen, true);
}
GUILayout.EndHorizontal();
}
#endif
if (!EditorPrefs.HasKey(ignore + defaultScreenSize) &&
(PlayerSettings.defaultScreenWidth != recommended_DefaultScreenWidth ||
PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight))
{
++numItems;
GUILayout.Label(defaultScreenSize + string.Format(" ({0}x{1})", PlayerSettings.defaultScreenWidth, PlayerSettings.defaultScreenHeight));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format("Use recommended ({0}x{1})", recommended_DefaultScreenWidth, recommended_DefaultScreenHeight)))
{
PlayerSettings.defaultScreenWidth = recommended_DefaultScreenWidth;
PlayerSettings.defaultScreenHeight = recommended_DefaultScreenHeight;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + defaultScreenSize, true);
}
GUILayout.EndHorizontal();
}
if (!EditorPrefs.HasKey(ignore + runInBackground) &&
PlayerSettings.runInBackground != recommended_RunInBackground)
{
++numItems;
GUILayout.Label(runInBackground + string.Format(currentValue, PlayerSettings.runInBackground));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_RunInBackground)))
{
PlayerSettings.runInBackground = recommended_RunInBackground;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + runInBackground, true);
}
GUILayout.EndHorizontal();
}
#if !UNITY_2019_1_OR_NEWER
if (!EditorPrefs.HasKey(ignore + displayResolutionDialog) &&
PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
{
++numItems;
GUILayout.Label(displayResolutionDialog + string.Format(currentValue, PlayerSettings.displayResolutionDialog));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_DisplayResolutionDialog)))
{
PlayerSettings.displayResolutionDialog = recommended_DisplayResolutionDialog;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + displayResolutionDialog, true);
}
GUILayout.EndHorizontal();
}
#endif
if (!EditorPrefs.HasKey(ignore + resizableWindow) &&
PlayerSettings.resizableWindow != recommended_ResizableWindow)
{
++numItems;
GUILayout.Label(resizableWindow + string.Format(currentValue, PlayerSettings.resizableWindow));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_ResizableWindow)))
{
PlayerSettings.resizableWindow = recommended_ResizableWindow;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + resizableWindow, true);
}
GUILayout.EndHorizontal();
}
#if UNITY_2018_1_OR_NEWER
if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen) &&
PlayerSettings.fullScreenMode != recommended_FullScreenMode)
#else
if (!EditorPrefs.HasKey(ignore + fullscreenMode) &&
PlayerSettings.d3d11FullscreenMode != recommended_FullscreenMode)
#endif
{
++numItems;
#if UNITY_2018_1_OR_NEWER
GUILayout.Label(fullscreenMode + string.Format(currentValue, PlayerSettings.fullScreenMode));
#else
GUILayout.Label(fullscreenMode + string.Format(currentValue, PlayerSettings.d3d11FullscreenMode));
#endif
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_FullscreenMode)))
{
#if UNITY_2018_1_OR_NEWER
PlayerSettings.fullScreenMode = recommended_FullScreenMode;
#else
PlayerSettings.d3d11FullscreenMode = recommended_FullscreenMode;
#endif
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + fullscreenMode, true);
}
GUILayout.EndHorizontal();
}
if (!EditorPrefs.HasKey(ignore + visibleInBackground) &&
PlayerSettings.visibleInBackground != recommended_VisibleInBackground)
{
++numItems;
GUILayout.Label(visibleInBackground + string.Format(currentValue, PlayerSettings.visibleInBackground));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_VisibleInBackground)))
{
PlayerSettings.visibleInBackground = recommended_VisibleInBackground;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + visibleInBackground, true);
}
GUILayout.EndHorizontal();
}
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
if (!EditorPrefs.HasKey(ignore + renderingPath) &&
PlayerSettings.renderingPath != recommended_RenderPath)
{
++numItems;
GUILayout.Label(renderingPath + string.Format(currentValue, PlayerSettings.renderingPath));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_RenderPath) + " - required for MSAA"))
{
PlayerSettings.renderingPath = recommended_RenderPath;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + renderingPath, true);
}
GUILayout.EndHorizontal();
}
#endif
if (!EditorPrefs.HasKey(ignore + colorSpace) &&
PlayerSettings.colorSpace != recommended_ColorSpace)
{
++numItems;
GUILayout.Label(colorSpace + string.Format(currentValue, PlayerSettings.colorSpace));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_ColorSpace) + " - requires reloading scene"))
{
PlayerSettings.colorSpace = recommended_ColorSpace;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + colorSpace, true);
}
GUILayout.EndHorizontal();
}
if (!EditorPrefs.HasKey(ignore + gpuSkinning) &&
PlayerSettings.gpuSkinning != recommended_GpuSkinning)
{
++numItems;
GUILayout.Label(gpuSkinning + string.Format(currentValue, PlayerSettings.gpuSkinning));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_GpuSkinning)))
{
PlayerSettings.gpuSkinning = recommended_GpuSkinning;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + gpuSkinning, true);
}
GUILayout.EndHorizontal();
}
#if false
if (!EditorPrefs.HasKey(ignore + singlePassStereoRendering) &&
PlayerSettings.singlePassStereoRendering != recommended_SinglePassStereoRendering)
{
++numItems;
GUILayout.Label(singlePassStereoRendering + string.Format(currentValue, PlayerSettings.singlePassStereoRendering));
GUILayout.BeginHorizontal();
if (GUILayout.Button(string.Format(useRecommended, recommended_SinglePassStereoRendering)))
{
PlayerSettings.singlePassStereoRendering = recommended_SinglePassStereoRendering;
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Ignore"))
{
EditorPrefs.SetBool(ignore + singlePassStereoRendering, true);
}
GUILayout.EndHorizontal();
}
#endif
GUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
if (GUILayout.Button("Clear All Ignores"))
{
EditorPrefs.DeleteKey(ignore + buildTarget);
EditorPrefs.DeleteKey(ignore + showUnitySplashScreen);
EditorPrefs.DeleteKey(ignore + defaultIsFullScreen);
EditorPrefs.DeleteKey(ignore + defaultScreenSize);
EditorPrefs.DeleteKey(ignore + runInBackground);
EditorPrefs.DeleteKey(ignore + displayResolutionDialog);
EditorPrefs.DeleteKey(ignore + resizableWindow);
EditorPrefs.DeleteKey(ignore + fullscreenMode);
EditorPrefs.DeleteKey(ignore + visibleInBackground);
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
EditorPrefs.DeleteKey(ignore + renderingPath);
#endif
EditorPrefs.DeleteKey(ignore + colorSpace);
EditorPrefs.DeleteKey(ignore + gpuSkinning);
#if false
EditorPrefs.DeleteKey(ignore + singlePassStereoRendering);
#endif
}
GUILayout.EndHorizontal();
GUILayout.EndScrollView();
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal();
if (numItems > 0)
{
if (GUILayout.Button("Accept All"))
{
// Only set those that have not been explicitly ignored.
if (!EditorPrefs.HasKey(ignore + buildTarget))
#if (UNITY_5_5 || UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
EditorUserBuildSettings.SwitchActiveBuildTarget(recommended_BuildTarget);
#else
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, recommended_BuildTarget);
#endif
if (!EditorPrefs.HasKey(ignore + showUnitySplashScreen))
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
PlayerSettings.showUnitySplashScreen = recommended_ShowUnitySplashScreen;
#else
PlayerSettings.SplashScreen.show = recommended_ShowUnitySplashScreen;
#endif
#if UNITY_2018_1_OR_NEWER
if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen))
PlayerSettings.fullScreenMode = recommended_FullScreenMode;
#else
if (!EditorPrefs.HasKey(ignore + defaultIsFullScreen))
PlayerSettings.defaultIsFullScreen = recommended_DefaultIsFullScreen;
if (!EditorPrefs.HasKey(ignore + fullscreenMode))
PlayerSettings.d3d11FullscreenMode = recommended_FullscreenMode;
#endif
if (!EditorPrefs.HasKey(ignore + defaultScreenSize))
{
PlayerSettings.defaultScreenWidth = recommended_DefaultScreenWidth;
PlayerSettings.defaultScreenHeight = recommended_DefaultScreenHeight;
}
if (!EditorPrefs.HasKey(ignore + runInBackground))
PlayerSettings.runInBackground = recommended_RunInBackground;
#if !UNITY_2019_1_OR_NEWER
if (!EditorPrefs.HasKey(ignore + displayResolutionDialog))
PlayerSettings.displayResolutionDialog = recommended_DisplayResolutionDialog;
#endif
if (!EditorPrefs.HasKey(ignore + resizableWindow))
PlayerSettings.resizableWindow = recommended_ResizableWindow;
if (!EditorPrefs.HasKey(ignore + visibleInBackground))
PlayerSettings.visibleInBackground = recommended_VisibleInBackground;
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
if (!EditorPrefs.HasKey(ignore + renderingPath))
PlayerSettings.renderingPath = recommended_RenderPath;
#endif
if (!EditorPrefs.HasKey(ignore + colorSpace))
PlayerSettings.colorSpace = recommended_ColorSpace;
if (!EditorPrefs.HasKey(ignore + gpuSkinning))
PlayerSettings.gpuSkinning = recommended_GpuSkinning;
#if false
if (!EditorPrefs.HasKey(ignore + singlePassStereoRendering))
PlayerSettings.singlePassStereoRendering = recommended_SinglePassStereoRendering;
#endif
EditorUtility.DisplayDialog("Accept All", "You made the right choice!", "Ok");
Close();
}
if (GUILayout.Button("Ignore All"))
{
if (EditorUtility.DisplayDialog("Ignore All", "Are you sure?", "Yes, Ignore All", "Cancel"))
{
// Only ignore those that do not currently match our recommended settings.
if (EditorUserBuildSettings.activeBuildTarget != recommended_BuildTarget)
EditorPrefs.SetBool(ignore + buildTarget, true);
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
if (PlayerSettings.showUnitySplashScreen != recommended_ShowUnitySplashScreen)
#else
if (PlayerSettings.SplashScreen.show != recommended_ShowUnitySplashScreen)
#endif
EditorPrefs.SetBool(ignore + showUnitySplashScreen, true);
#if UNITY_2018_1_OR_NEWER
if (PlayerSettings.fullScreenMode != recommended_FullScreenMode)
{
EditorPrefs.SetBool(ignore + defaultIsFullScreen, true);
EditorPrefs.SetBool(ignore + fullscreenMode, true);
}
#else
if (PlayerSettings.defaultIsFullScreen != recommended_DefaultIsFullScreen)
EditorPrefs.SetBool(ignore + defaultIsFullScreen, true);
if (PlayerSettings.d3d11FullscreenMode != recommended_FullscreenMode)
EditorPrefs.SetBool(ignore + fullscreenMode, true);
#endif
if (PlayerSettings.defaultScreenWidth != recommended_DefaultScreenWidth ||
PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight)
EditorPrefs.SetBool(ignore + defaultScreenSize, true);
if (PlayerSettings.runInBackground != recommended_RunInBackground)
EditorPrefs.SetBool(ignore + runInBackground, true);
#if !UNITY_2019_1_OR_NEWER
if (PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
EditorPrefs.SetBool(ignore + displayResolutionDialog, true);
#endif
if (PlayerSettings.resizableWindow != recommended_ResizableWindow)
EditorPrefs.SetBool(ignore + resizableWindow, true);
if (PlayerSettings.visibleInBackground != recommended_VisibleInBackground)
EditorPrefs.SetBool(ignore + visibleInBackground, true);
#if (UNITY_5_4 || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
if (PlayerSettings.renderingPath != recommended_RenderPath)
EditorPrefs.SetBool(ignore + renderingPath, true);
#endif
if (PlayerSettings.colorSpace != recommended_ColorSpace)
EditorPrefs.SetBool(ignore + colorSpace, true);
if (PlayerSettings.gpuSkinning != recommended_GpuSkinning)
EditorPrefs.SetBool(ignore + gpuSkinning, true);
#if false
if (PlayerSettings.singlePassStereoRendering != recommended_SinglePassStereoRendering)
EditorPrefs.SetBool(ignore + singlePassStereoRendering, true);
#endif
Close();
}
}
}
else if (GUILayout.Button("Close"))
{
Close();
}
GUILayout.EndHorizontal();
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d2244eee8a3a4784fb40d1123ff69301
timeCreated: 1438809573
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,180 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Notify developers when a new version of the plugin is available.
//
//=============================================================================
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Text.RegularExpressions;
#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
namespace Valve.VR
{
[InitializeOnLoad]
public class SteamVR_Update : EditorWindow
{
const string currentVersion = "2.1";
const string versionUrl = "http://media.steampowered.com/apps/steamvr/unitypluginversion.txt";
const string notesUrl = "http://media.steampowered.com/apps/steamvr/unityplugin-v{0}.txt";
const string pluginUrl = "http://u3d.as/content/valve-corporation/steam-vr-plugin";
const string doNotShowKey = "SteamVR.DoNotShow.v{0}";
static bool gotVersion = false;
static WWW wwwVersion, wwwNotes;
static string version, notes;
static SteamVR_Update window;
static SteamVR_Update()
{
EditorApplication.update += Update;
}
static void Update()
{
if (!gotVersion)
{
if (wwwVersion == null)
wwwVersion = new WWW(versionUrl);
if (!wwwVersion.isDone)
return;
if (UrlSuccess(wwwVersion))
version = wwwVersion.text;
wwwVersion = null;
gotVersion = true;
if (ShouldDisplay())
{
var url = string.Format(notesUrl, version);
wwwNotes = new WWW(url);
window = GetWindow<SteamVR_Update>(true);
window.minSize = new Vector2(320, 440);
//window.title = "SteamVR";
}
}
if (wwwNotes != null)
{
if (!wwwNotes.isDone)
return;
if (UrlSuccess(wwwNotes))
notes = wwwNotes.text;
wwwNotes = null;
if (notes != "")
window.Repaint();
}
EditorApplication.update -= Update;
}
static bool UrlSuccess(WWW www)
{
if (!string.IsNullOrEmpty(www.error))
return false;
if (Regex.IsMatch(www.text, "404 not found", RegexOptions.IgnoreCase))
return false;
return true;
}
static bool ShouldDisplay()
{
if (string.IsNullOrEmpty(version))
return false;
if (version == currentVersion)
return false;
if (EditorPrefs.HasKey(string.Format(doNotShowKey, version)))
return false;
// parse to see if newer (e.g. 1.0.4 vs 1.0.3)
var versionSplit = version.Split('.');
var currentVersionSplit = currentVersion.Split('.');
for (int i = 0; i < versionSplit.Length && i < currentVersionSplit.Length; i++)
{
int versionValue, currentVersionValue;
if (int.TryParse(versionSplit[i], out versionValue) &&
int.TryParse(currentVersionSplit[i], out currentVersionValue))
{
if (versionValue > currentVersionValue)
return true;
if (versionValue < currentVersionValue)
return false;
}
}
// same up to this point, now differentiate based on number of sub values (e.g. 1.0.4.1 vs 1.0.4)
if (versionSplit.Length <= currentVersionSplit.Length)
return false;
return true;
}
Vector2 scrollPosition;
bool toggleState;
string GetResourcePath()
{
var ms = MonoScript.FromScriptableObject(this);
var path = AssetDatabase.GetAssetPath(ms);
path = Path.GetDirectoryName(path);
return path.Substring(0, path.Length - "Editor".Length) + "Textures/";
}
public void OnGUI()
{
EditorGUILayout.HelpBox("A new version of the SteamVR plugin is available!", MessageType.Warning);
var resourcePath = GetResourcePath();
var logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
var rect = GUILayoutUtility.GetRect(position.width, 150, GUI.skin.box);
if (logo)
GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
scrollPosition = GUILayout.BeginScrollView(scrollPosition);
GUILayout.Label("Current version: " + currentVersion);
GUILayout.Label("New version: " + version);
if (notes != "")
{
GUILayout.Label("Release notes:");
EditorGUILayout.HelpBox(notes, MessageType.Info);
}
GUILayout.EndScrollView();
GUILayout.FlexibleSpace();
if (GUILayout.Button("Get Latest Version"))
{
Application.OpenURL(pluginUrl);
}
EditorGUI.BeginChangeCheck();
var doNotShow = GUILayout.Toggle(toggleState, "Do not prompt for this version again.");
if (EditorGUI.EndChangeCheck())
{
toggleState = doNotShow;
var key = string.Format(doNotShowKey, version);
if (doNotShow)
EditorPrefs.SetBool(key, true);
else
EditorPrefs.DeleteKey(key);
}
}
}
}
#if UNITY_2018_3_OR_NEWER
#pragma warning restore CS0618
#endif

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 73a0556bda803bf4e898751dcfcf21a8
timeCreated: 1433880062
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using UnityEditor;
using UnityEngine;
using System.CodeDom;
using Microsoft.CSharp;
using System.IO;
using System.CodeDom.Compiler;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using System.Linq.Expressions;
using System;
namespace Valve.VR
{
[CustomPropertyDrawer(typeof(SteamVR_UpdateModes))]
public class SteamVR_UpdateModesEditor : PropertyDrawer
{
public override void OnGUI(Rect _position, SerializedProperty _property, GUIContent _label)
{
_property.intValue = EditorGUI.MaskField(_position, _label, _property.intValue, _property.enumNames);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 656e3d05f0a289d4ab6f3d44f65c9b6d
timeCreated: 1521584981
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 61f4796ee4f00314e8d8b1ad39a78c28
folderAsset: yes
timeCreated: 1438797390
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
namespace Valve.VR
{
public class SteamVR_CameraHelper : MonoBehaviour
{
void Start()
{
#if OPENVR_XR_API && UNITY_LEGACY_INPUT_HELPERS
if (this.gameObject.GetComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>() == null)
{
this.gameObject.AddComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>();
}
#endif
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c30a2316e98e1dc4b97e432a1301f85c
timeCreated: 1591403558
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
namespace Valve.VR.Extras
{
/// <summary>
/// This is an example class of how to force steamvr initialization. You still need to have vr mode enabled
/// but you can have the top sdk set to None, then this script will force it to OpenVR after a second
/// </summary>
public class SteamVR_ForceSteamVRMode : MonoBehaviour
{
public GameObject vrCameraPrefab;
public GameObject[] disableObjectsOnLoad;
private IEnumerator Start()
{
yield return new WaitForSeconds(1f); // just here to show that you can wait a while.
SteamVR.Initialize(true);
while (SteamVR.initializedState != SteamVR.InitializedStates.InitializeSuccess)
yield return null;
for (int disableIndex = 0; disableIndex < disableObjectsOnLoad.Length; disableIndex++)
{
GameObject toDisable = disableObjectsOnLoad[disableIndex];
if (toDisable != null)
toDisable.SetActive(false);
}
GameObject.Instantiate(vrCameraPrefab);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c4bc5db9c652ff8408b7cda0197f87f1
timeCreated: 1539107854
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,459 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
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: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_DirectLightInLightProbes: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &24851820
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 24851825}
- 33: {fileID: 24851824}
- 135: {fileID: 24851823}
- 23: {fileID: 24851822}
- 54: {fileID: 24851821}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!54 &24851821
Rigidbody:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 1
m_Constraints: 0
m_CollisionDetection: 0
--- !u!23 &24851822
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!135 &24851823
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Material: {fileID: 13400000, guid: 2e81b378186c0ed4c98c04cfd4096914, type: 2}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &24851824
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &24851825
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.624, z: 2.68}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!1 &548674979
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 548674984}
- 20: {fileID: 548674983}
- 124: {fileID: 548674982}
- 92: {fileID: 548674981}
- 81: {fileID: 548674980}
m_Layer: 0
m_Name: Pancake Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &548674980
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 548674979}
m_Enabled: 1
--- !u!92 &548674981
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 548674979}
m_Enabled: 1
--- !u!124 &548674982
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 548674979}
m_Enabled: 1
--- !u!20 &548674983
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 548674979}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &548674984
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 548674979}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.49, y: 1.612, z: -1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &595728105
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 595728107}
- 114: {fileID: 595728106}
m_Layer: 0
m_Name: Loader
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &595728106
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 595728105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c4bc5db9c652ff8408b7cda0197f87f1, type: 3}
m_Name:
m_EditorClassIdentifier:
vrCameraPrefab: {fileID: 146900, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
disableObjectsOnLoad:
- {fileID: 548674979}
--- !u!4 &595728107
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 595728105}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.327, y: 1.612, z: -0.253}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
--- !u!1 &1548954329
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1548954331}
- 108: {fileID: 1548954330}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1548954330
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_Enabled: 1
serializedVersion: 7
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1548954331
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &1578927695
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1578927699}
- 33: {fileID: 1578927698}
- 23: {fileID: 1578927697}
- 65: {fileID: 1578927696}
m_Layer: 0
m_Name: Floor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1578927696
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 10, y: 0.1, z: 10.000001}
m_Center: {x: 0, y: -0.05, z: 0}
--- !u!23 &1578927697
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: b41d1116a101a84499296ce28d16e6b9, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1578927698
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1578927699
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4, y: 3, z: 4}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9b1775e13a163e146930422a18e54bfc
timeCreated: 1539107812
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
using System.Collections;
namespace Valve.VR.Extras
{
public class SteamVR_GazeTracker : MonoBehaviour
{
public bool isInGaze = false;
public event GazeEventHandler GazeOn;
public event GazeEventHandler GazeOff;
public float gazeInCutoff = 0.15f;
public float gazeOutCutoff = 0.4f;
// Contains a HMD tracked object that we can use to find the user's gaze
protected Transform hmdTrackedObject = null;
public virtual void OnGazeOn(GazeEventArgs gazeEventArgs)
{
if (GazeOn != null)
GazeOn(this, gazeEventArgs);
}
public virtual void OnGazeOff(GazeEventArgs gazeEventArgs)
{
if (GazeOff != null)
GazeOff(this, gazeEventArgs);
}
protected virtual void Update()
{
// If we haven't set up hmdTrackedObject find what the user is looking at
if (hmdTrackedObject == null)
{
SteamVR_TrackedObject[] trackedObjects = FindObjectsOfType<SteamVR_TrackedObject>();
foreach (SteamVR_TrackedObject tracked in trackedObjects)
{
if (tracked.index == SteamVR_TrackedObject.EIndex.Hmd)
{
hmdTrackedObject = tracked.transform;
break;
}
}
}
if (hmdTrackedObject)
{
Ray ray = new Ray(hmdTrackedObject.position, hmdTrackedObject.forward);
Plane plane = new Plane(hmdTrackedObject.forward, transform.position);
float enter = 0.0f;
if (plane.Raycast(ray, out enter))
{
Vector3 intersect = hmdTrackedObject.position + hmdTrackedObject.forward * enter;
float dist = Vector3.Distance(intersect, transform.position);
//Debug.Log("Gaze dist = " + dist);
if (dist < gazeInCutoff && !isInGaze)
{
isInGaze = true;
GazeEventArgs gazeEventArgs;
gazeEventArgs.distance = dist;
OnGazeOn(gazeEventArgs);
}
else if (dist >= gazeOutCutoff && isInGaze)
{
isInGaze = false;
GazeEventArgs gazeEventArgs;
gazeEventArgs.distance = dist;
OnGazeOff(gazeEventArgs);
}
}
}
}
}
public struct GazeEventArgs
{
public float distance;
}
public delegate void GazeEventHandler(object sender, GazeEventArgs gazeEventArgs);
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 501eb8b744f73714fbe7dbdd5e3ef66e
timeCreated: 1426193800
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,168 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
using System.Collections;
namespace Valve.VR.Extras
{
public class SteamVR_LaserPointer : MonoBehaviour
{
public SteamVR_Behaviour_Pose pose;
//public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.__actions_default_in_InteractUI;
public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.GetBooleanAction("InteractUI");
public bool active = true;
public Color color;
public float thickness = 0.002f;
public Color clickColor = Color.green;
public GameObject holder;
public GameObject pointer;
bool isActive = false;
public bool addRigidBody = false;
public Transform reference;
public event PointerEventHandler PointerIn;
public event PointerEventHandler PointerOut;
public event PointerEventHandler PointerClick;
Transform previousContact = null;
private void Start()
{
if (pose == null)
pose = this.GetComponent<SteamVR_Behaviour_Pose>();
if (pose == null)
Debug.LogError("No SteamVR_Behaviour_Pose component found on this object", this);
if (interactWithUI == null)
Debug.LogError("No ui interaction action has been set on this component.", this);
holder = new GameObject();
holder.transform.parent = this.transform;
holder.transform.localPosition = Vector3.zero;
holder.transform.localRotation = Quaternion.identity;
pointer = GameObject.CreatePrimitive(PrimitiveType.Cube);
pointer.transform.parent = holder.transform;
pointer.transform.localScale = new Vector3(thickness, thickness, 100f);
pointer.transform.localPosition = new Vector3(0f, 0f, 50f);
pointer.transform.localRotation = Quaternion.identity;
BoxCollider collider = pointer.GetComponent<BoxCollider>();
if (addRigidBody)
{
if (collider)
{
collider.isTrigger = true;
}
Rigidbody rigidBody = pointer.AddComponent<Rigidbody>();
rigidBody.isKinematic = true;
}
else
{
if (collider)
{
Object.Destroy(collider);
}
}
Material newMaterial = new Material(Shader.Find("Unlit/Color"));
newMaterial.SetColor("_Color", color);
pointer.GetComponent<MeshRenderer>().material = newMaterial;
}
public virtual void OnPointerIn(PointerEventArgs e)
{
if (PointerIn != null)
PointerIn(this, e);
}
public virtual void OnPointerClick(PointerEventArgs e)
{
if (PointerClick != null)
PointerClick(this, e);
}
public virtual void OnPointerOut(PointerEventArgs e)
{
if (PointerOut != null)
PointerOut(this, e);
}
private void Update()
{
if (!isActive)
{
isActive = true;
this.transform.GetChild(0).gameObject.SetActive(true);
}
float dist = 100f;
Ray raycast = new Ray(transform.position, transform.forward);
RaycastHit hit;
bool bHit = Physics.Raycast(raycast, out hit);
if (previousContact && previousContact != hit.transform)
{
PointerEventArgs args = new PointerEventArgs();
args.fromInputSource = pose.inputSource;
args.distance = 0f;
args.flags = 0;
args.target = previousContact;
OnPointerOut(args);
previousContact = null;
}
if (bHit && previousContact != hit.transform)
{
PointerEventArgs argsIn = new PointerEventArgs();
argsIn.fromInputSource = pose.inputSource;
argsIn.distance = hit.distance;
argsIn.flags = 0;
argsIn.target = hit.transform;
OnPointerIn(argsIn);
previousContact = hit.transform;
}
if (!bHit)
{
previousContact = null;
}
if (bHit && hit.distance < 100f)
{
dist = hit.distance;
}
if (bHit && interactWithUI.GetStateUp(pose.inputSource))
{
PointerEventArgs argsClick = new PointerEventArgs();
argsClick.fromInputSource = pose.inputSource;
argsClick.distance = hit.distance;
argsClick.flags = 0;
argsClick.target = hit.transform;
OnPointerClick(argsClick);
}
if (interactWithUI != null && interactWithUI.GetState(pose.inputSource))
{
pointer.transform.localScale = new Vector3(thickness * 5f, thickness * 5f, dist);
pointer.GetComponent<MeshRenderer>().material.color = clickColor;
}
else
{
pointer.transform.localScale = new Vector3(thickness, thickness, dist);
pointer.GetComponent<MeshRenderer>().material.color = color;
}
pointer.transform.localPosition = new Vector3(0f, 0f, dist / 2f);
}
}
public struct PointerEventArgs
{
public SteamVR_Input_Sources fromInputSource;
public uint flags;
public float distance;
public Transform target;
}
public delegate void PointerEventHandler(object sender, PointerEventArgs e);
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b2f511c1adaa1e94ebe7ca97bbcabd17
timeCreated: 1539298734
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,586 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
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: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_DirectLightInLightProbes: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &24851820
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 24851825}
- 33: {fileID: 24851824}
- 135: {fileID: 24851823}
- 23: {fileID: 24851822}
- 54: {fileID: 24851821}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!54 &24851821
Rigidbody:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 1
m_Constraints: 0
m_CollisionDetection: 0
--- !u!23 &24851822
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!135 &24851823
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Material: {fileID: 13400000, guid: 2e81b378186c0ed4c98c04cfd4096914, type: 2}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &24851824
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &24851825
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.624, z: 2.68}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!43 &33627688
Mesh:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
serializedVersion: 8
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 24
topology: 0
firstVertex: 0
vertexCount: 8
localAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexBuffer: 000004000100010004000500010005000200020005000600020006000300030006000700030007000000000007000400
m_Skin: []
m_VertexData:
m_CurrentChannels: 13
m_VertexCount: 8
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 12
format: 0
dimension: 4
- stream: 0
offset: 28
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 288
_typelessdata: 0000c03f0ad7233c000090bf000000000000803f0000803f0000803f00000000000000000000c0bf0ad7233c000090bf000000000000803f0000803f0000803f0000803f000000000000c0bf0ad7233c0000903f000000000000803f0000803f0000803f00000000000000000000c03f0ad7233c0000903f000000000000803f0000803f0000803f0000803f000000003333d33f0ad7233c3333a3bf000000000000803f0000803f00000000000000000000803f3333d3bf0ad7233c3333a3bf000000000000803f0000803f000000000000803f0000803f3333d3bf0ad7233c3333a33f000000000000803f0000803f00000000000000000000803f3333d33f0ad7233c3333a33f000000000000803f0000803f000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshOptimized: 0
--- !u!21 &1231479188
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sprites/Default
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!1001 &1474170597
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3380982, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_Mesh
value:
objectReference: {fileID: 33627688}
- target: {fileID: 2348914, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 1231479188}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1474170598 stripped
GameObject:
m_PrefabParentObject: {fileID: 159396, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_PrefabInternal: {fileID: 1474170597}
--- !u!1 &1474170599 stripped
GameObject:
m_PrefabParentObject: {fileID: 124034, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_PrefabInternal: {fileID: 1474170597}
--- !u!114 &1474170600
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1474170598}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b2f511c1adaa1e94ebe7ca97bbcabd17, type: 3}
m_Name:
m_EditorClassIdentifier:
pose: {fileID: 0}
interactWithUI: {fileID: 11400000, guid: 4a1ec738249f25e4f824949a16c0b085, type: 2}
active: 1
color: {r: 0, g: 0, b: 0, a: 0}
thickness: 0.002
clickColor: {r: 0, g: 1, b: 0, a: 1}
holder: {fileID: 0}
pointer: {fileID: 0}
addRigidBody: 0
reference: {fileID: 0}
--- !u!114 &1474170601
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1474170599}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b2f511c1adaa1e94ebe7ca97bbcabd17, type: 3}
m_Name:
m_EditorClassIdentifier:
pose: {fileID: 0}
interactWithUI: {fileID: 11400000, guid: 4a1ec738249f25e4f824949a16c0b085, type: 2}
active: 1
color: {r: 0, g: 0, b: 0, a: 0}
thickness: 0.002
clickColor: {r: 0, g: 1, b: 0, a: 1}
holder: {fileID: 0}
pointer: {fileID: 0}
addRigidBody: 0
reference: {fileID: 0}
--- !u!1 &1548954329
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1548954331}
- 108: {fileID: 1548954330}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1548954330
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_Enabled: 1
serializedVersion: 7
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1548954331
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &1578927695
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1578927699}
- 33: {fileID: 1578927698}
- 23: {fileID: 1578927697}
- 65: {fileID: 1578927696}
m_Layer: 0
m_Name: Floor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1578927696
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 10, y: 0.1, z: 10.000001}
m_Center: {x: 0, y: -0.05, z: 0}
--- !u!23 &1578927697
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: b41d1116a101a84499296ce28d16e6b9, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1578927698
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1578927699
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4, y: 3, z: 4}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f2343db151bc3864e9088f8e4230cdc1
timeCreated: 1539298758
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,551 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
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: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_DirectLightInLightProbes: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &24851820
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 24851825}
- 33: {fileID: 24851824}
- 135: {fileID: 24851823}
- 23: {fileID: 24851822}
- 54: {fileID: 24851821}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!54 &24851821
Rigidbody:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 1
m_Constraints: 0
m_CollisionDetection: 0
--- !u!23 &24851822
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!135 &24851823
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Material: {fileID: 13400000, guid: 2e81b378186c0ed4c98c04cfd4096914, type: 2}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &24851824
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &24851825
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 24851820}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.624, z: 2.68}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!43 &333680539
Mesh:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
serializedVersion: 8
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 24
topology: 0
firstVertex: 0
vertexCount: 8
localAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexBuffer: 000004000100010004000500010005000200020005000600020006000300030006000700030007000000000007000400
m_Skin: []
m_VertexData:
m_CurrentChannels: 13
m_VertexCount: 8
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 12
format: 0
dimension: 4
- stream: 0
offset: 28
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 288
_typelessdata: 0000c03f0ad7233c000090bf000000000000803f0000803f0000803f00000000000000000000c0bf0ad7233c000090bf000000000000803f0000803f0000803f0000803f000000000000c0bf0ad7233c0000903f000000000000803f0000803f0000803f00000000000000000000c03f0ad7233c0000903f000000000000803f0000803f0000803f0000803f000000003333d33f0ad7233c3333a3bf000000000000803f0000803f00000000000000000000803f3333d3bf0ad7233c3333a3bf000000000000803f0000803f000000000000803f0000803f3333d3bf0ad7233c3333a33f000000000000803f0000803f00000000000000000000803f3333d33f0ad7233c3333a33f000000000000803f0000803f000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.65, y: 0, z: 1.275}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshOptimized: 0
--- !u!1001 &1474170597
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 420908, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3380982, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_Mesh
value:
objectReference: {fileID: 333680539}
- target: {fileID: 2348914, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 1639470597}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1474170598 stripped
GameObject:
m_PrefabParentObject: {fileID: 146900, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_PrefabInternal: {fileID: 1474170597}
--- !u!114 &1474170599
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1474170598}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2578089a96464b348a5399c795afc7b7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1548954329
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1548954331}
- 108: {fileID: 1548954330}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1548954330
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_Enabled: 1
serializedVersion: 7
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1548954331
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1548954329}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &1578927695
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1578927699}
- 33: {fileID: 1578927698}
- 23: {fileID: 1578927697}
- 65: {fileID: 1578927696}
m_Layer: 0
m_Name: Floor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1578927696
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 10, y: 0.1, z: 10.000001}
m_Center: {x: 0, y: -0.05, z: 0}
--- !u!23 &1578927697
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: b41d1116a101a84499296ce28d16e6b9, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!33 &1578927698
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1578927699
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1578927695}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 4, y: 3, z: 4}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!21 &1639470597
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sprites/Default
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73743b10c3912094a8a17bc7ac370c15
timeCreated: 1550629235
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4b6669fb4e4df9c48926f02b694be9d1
timeCreated: 1437433018
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,62 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
using System.Collections;
namespace Valve.VR.Extras
{
[RequireComponent(typeof(SteamVR_TrackedObject))]
public class SteamVR_TestThrow : MonoBehaviour
{
public GameObject prefab;
public Rigidbody attachPoint;
public SteamVR_Action_Boolean spawn = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("InteractUI");
SteamVR_Behaviour_Pose trackedObj;
FixedJoint joint;
private void Awake()
{
trackedObj = GetComponent<SteamVR_Behaviour_Pose>();
}
private void FixedUpdate()
{
if (joint == null && spawn.GetStateDown(trackedObj.inputSource))
{
GameObject go = GameObject.Instantiate(prefab);
go.transform.position = attachPoint.transform.position;
joint = go.AddComponent<FixedJoint>();
joint.connectedBody = attachPoint;
}
else if (joint != null && spawn.GetStateUp(trackedObj.inputSource))
{
GameObject go = joint.gameObject;
Rigidbody rigidbody = go.GetComponent<Rigidbody>();
Object.DestroyImmediate(joint);
joint = null;
Object.Destroy(go, 15.0f);
// We should probably apply the offset between trackedObj.transform.position
// and device.transform.pos to insert into the physics sim at the correct
// location, however, we would then want to predict ahead the visual representation
// by the same amount we are predicting our render poses.
Transform origin = trackedObj.origin ? trackedObj.origin : trackedObj.transform.parent;
if (origin != null)
{
rigidbody.velocity = origin.TransformVector(trackedObj.GetVelocity());
rigidbody.angularVelocity = origin.TransformVector(trackedObj.GetAngularVelocity());
}
else
{
rigidbody.velocity = trackedObj.GetVelocity();
rigidbody.angularVelocity = trackedObj.GetAngularVelocity();
}
rigidbody.maxAngularVelocity = rigidbody.angularVelocity.magnitude;
}
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ff4f36585e15b1942827390ff1a92502
timeCreated: 1437513988
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0d936163b5e9a5047b5e4ba5afaf5126
timeCreated: 1437513966
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
namespace Valve.VR.Extras
{
public class SteamVR_TestTrackedCamera : MonoBehaviour
{
public Material material;
public Transform target;
public bool undistorted = true;
public bool cropped = true;
private void OnEnable()
{
// The video stream must be symmetrically acquired and released in
// order to properly disable the stream once there are no consumers.
SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
source.Acquire();
// Auto-disable if no camera is present.
if (!source.hasCamera)
enabled = false;
}
private void OnDisable()
{
// Clear the texture when no longer active.
material.mainTexture = null;
// The video stream must be symmetrically acquired and released in
// order to properly disable the stream once there are no consumers.
SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
source.Release();
}
private void Update()
{
SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
Texture2D texture = source.texture;
if (texture == null)
{
return;
}
// Apply the latest texture to the material. This must be performed
// every frame since the underlying texture is actually part of a ring
// buffer which is updated in lock-step with its associated pose.
// (You actually really only need to call any of the accessors which
// internally call Update on the SteamVR_TrackedCamera.VideoStreamTexture).
material.mainTexture = texture;
// Adjust the height of the quad based on the aspect to keep the texels square.
float aspect = (float)texture.width / texture.height;
// The undistorted video feed has 'bad' areas near the edges where the original
// square texture feed is stretched to undo the fisheye from the lens.
// Therefore, you'll want to crop it to the specified frameBounds to remove this.
if (cropped)
{
VRTextureBounds_t bounds = source.frameBounds;
material.mainTextureOffset = new Vector2(bounds.uMin, bounds.vMin);
float du = bounds.uMax - bounds.uMin;
float dv = bounds.vMax - bounds.vMin;
material.mainTextureScale = new Vector2(du, dv);
aspect *= Mathf.Abs(du / dv);
}
else
{
material.mainTextureOffset = Vector2.zero;
material.mainTextureScale = new Vector2(1, -1);
}
target.localScale = new Vector3(1, 1.0f / aspect, 1);
// Apply the pose that this frame was recorded at.
if (source.hasTracking)
{
SteamVR_Utils.RigidTransform rigidTransform = source.transform;
target.localPosition = rigidTransform.pos;
target.localRotation = rigidTransform.rot;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More