TEST: trap and shakecam

This commit is contained in:
manhduyhoang90
2026-05-18 21:22:34 +07:00
parent 5025383676
commit b7e2c80488
151 changed files with 23277 additions and 0 deletions

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a1ace412602edd84eb6e7fabd521448e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Demo.unity
uploadId: 376379

View File

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

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Box_00
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: 2800000, guid: c4a719c5202f2fe4386a44ae66246320, type: 3}
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
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 03b849fd35325f0408075f45ca07b697
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Materials/Box_00.mat
uploadId: 376379

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Green
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: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.25591847, g: 0.6698113, b: 0.43853125, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: d8c78a8f28328f642add238f387a323c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Materials/Green.mat
uploadId: 376379

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Rock_00
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: 2800000, guid: 071a0df25fa7f034289d32d2b3c8f90b, type: 3}
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
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.5471698, g: 0.5471698, b: 0.5471698, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: c2dd870f2e2d4af44a65cc7f311c3914
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Materials/Rock_00.mat
uploadId: 376379

View File

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

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 0b7b3aef80260e449a6926672c9aa717
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: //RootNode
100002: Area
100004: Area.001
100006: box
100008: Camera
400000: //RootNode
400002: Area
400004: Area.001
400006: box
400008: Camera
2000000: Camera
2100000: crate
2300000: //RootNode
2300002: box
3300000: //RootNode
3300002: box
4300000: box
10800000: Area
10800002: Area.001
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Models/Box_00.fbx
uploadId: 376379

View File

@@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 4e561f465385cbe4db4c50851a3f0fa7
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: //RootNode
400000: //RootNode
2100000: Material.002
2100002: Material.001
2300000: //RootNode
3300000: //RootNode
4300000: plant
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Models/Plant_00.fbx
uploadId: 376379

View File

@@ -0,0 +1,125 @@
fileFormatVersion: 2
guid: de4cf409bd3d2dd448331b14b0994fa2
ModelImporter:
serializedVersion: 22
fileIDToRecycleName:
100000: Armature
100002: Bone
100004: Bone.001
100006: Bone.001_end
100008: Bone.002
100010: Bone.002_end
100012: Bone.003
100014: Bone.003_end
100016: Bone.004
100018: Bone.004_end
100020: Bone.005
100022: Bone.005_end
100024: plant
100026: //RootNode
400000: Armature
400002: Bone
400004: Bone.001
400006: Bone.001_end
400008: Bone.002
400010: Bone.002_end
400012: Bone.003
400014: Bone.003_end
400016: Bone.004
400018: Bone.004_end
400020: Bone.005
400022: Bone.005_end
400024: plant
400026: //RootNode
2100000: Material.002
2100002: Material.001
4300000: plant
9500000: //RootNode
13700000: plant
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Models/Plant_Rigged_00.fbx
uploadId: 376379

View File

@@ -0,0 +1,119 @@
fileFormatVersion: 2
guid: c2075e0f9ff03bc4ba16756e24147cd0
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Cube
100002: rock1
100004: rock1.001
100006: //RootNode
400000: Cube
400002: rock1
400004: rock1.001
400006: //RootNode
2100000: No Name
2300000: Cube
2300002: rock1
2300004: rock1.001
2300006: //RootNode
3300000: Cube
3300002: rock1
3300004: rock1.001
3300006: //RootNode
4300000: Cube
4300002: rock1
4300004: rock1.001
2186277476908879412: ImportLogs
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Models/Rock_00.fbx
uploadId: 376379

View File

@@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: 96bbfaed20474fc41b1b57731310caf4
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Cube
100002: Cube.001
100004: //RootNode
400000: Cube
400002: Cube.001
400004: //RootNode
2100000: Material.002
2100002: Material.001
2300000: Cube
2300002: Cube.001
3300000: Cube
3300002: Cube.001
4300000: Cube
4300002: Cube.001
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Models/Tent_00.fbx
uploadId: 376379

View File

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

View File

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

View File

@@ -0,0 +1,159 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1559319329555182539
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1559319329555182532}
- component: {fileID: 1559319329555182533}
- component: {fileID: 1559319329555182528}
- component: {fileID: 1559319329555182535}
- component: {fileID: 1559319329555182534}
- component: {fileID: 1559319329555182529}
m_Layer: 0
m_Name: Crate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1559319329555182532
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_LocalRotation: {x: -0, y: -0.356901, z: -0, w: 0.93414223}
m_LocalPosition: {x: -0.47, y: -1.25, z: -3.4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1559319329555182533
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, 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: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300004, guid: ace093f24bbfec5478e3194559d620de, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.67, y: 0.63}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!61 &1559319329555182528
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 0.67, y: 0.67}
newSize: {x: 0.67, y: 0.63}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.67, y: 0.63}
m_EdgeRadius: 0
--- !u!114 &1559319329555182535
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 58b3fda749163f142b26ea94be1da637, type: 3}
m_Name:
m_EditorClassIdentifier:
_positionMultiplier: 0.75
_rotationMultiplier: 0.6
_requireInView: 1
--- !u!114 &1559319329555182534
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 317f9e79939b5214b9f9647aec30130c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!50 &1559319329555182529
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559319329555182539}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 8376ac1fa7e8b7348b08738a6bdf4bea
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/2D/Crate.prefab
uploadId: 376379

View File

@@ -0,0 +1,188 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7609922555388080146
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7609922555388080147}
- component: {fileID: 7609922555388080157}
- component: {fileID: 7609922555388080159}
- component: {fileID: 7609922555388080158}
m_Layer: 0
m_Name: Rock
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7609922555388080147
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555388080146}
m_LocalRotation: {x: 0, y: 0, z: 0.20816772, w: 0.97809315}
m_LocalPosition: {x: -0.64, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 7609922555596769879}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 24.03}
--- !u!212 &7609922555388080157
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555388080146}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, 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: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 14
m_Sprite: {fileID: 21300000, guid: ace093f24bbfec5478e3194559d620de, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.28, y: 1.28}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!50 &7609922555388080159
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555388080146}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &7609922555388080158
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555388080146}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f42fbf4b895a7e4bb2115de600da21f, type: 3}
m_Name:
m_EditorClassIdentifier:
_shakeData: {fileID: 11400000, guid: fd1250282c8f2e841ac602704e5efc0c, type: 2}
--- !u!1 &7609922555596769878
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7609922555596769879}
- component: {fileID: 7609922555596769872}
m_Layer: 0
m_Name: Collider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7609922555596769879
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555596769878}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
m_Children: []
m_Father: {fileID: 7609922555388080147}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!60 &7609922555596769872
PolygonCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7609922555596769878}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1.28, y: 1.28}
newSize: {x: 1.28, y: 1.28}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 0.61, y: 0.22999999}
- {x: 0.58, y: 0.26}
- {x: 0.51, y: 0.35999998}
- {x: 0.45999998, y: 0.44}
- {x: 0.21, y: 0.64}
- {x: -0.35999998, y: 0.64}
- {x: -0.56, y: 0.59999996}
- {x: -0.61, y: 0.53}
- {x: -0.64, y: 0.35}
- {x: -0.64, y: -0.22999999}
- {x: -0.19, y: -0.64}
- {x: 0.51, y: -0.64}
- {x: 0.64, y: -0.59999996}
- {x: 0.64, y: 0.17999999}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 75e00c64f4be39d49899e6f64917a753
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/2D/Rock.prefab
uploadId: 376379

View File

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

View File

@@ -0,0 +1,139 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8230252366219629135
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8230252366219267695}
- component: {fileID: 8230252366220561999}
- component: {fileID: 8230252366221560975}
- component: {fileID: 8230252366219629133}
- component: {fileID: 8230252366219629132}
- component: {fileID: 8230252366219629131}
- component: {fileID: 8230252366219629130}
m_Layer: 0
m_Name: Box_00
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8230252366219267695
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8230252366220561999
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_Mesh: {fileID: 4300000, guid: 0b7b3aef80260e449a6926672c9aa717, type: 3}
--- !u!23 &8230252366221560975
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 03b849fd35325f0408075f45ca07b697, 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: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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!54 &8230252366219629133
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &8230252366219629132
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5901f943dff13b94693d37f9edb0beb8, type: 3}
m_Name:
m_EditorClassIdentifier:
_positionMultiplier: 1
_rotationMultiplier: 1
_requireInView: 1
--- !u!114 &8230252366219629131
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 317f9e79939b5214b9f9647aec30130c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &8230252366219629130
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8230252366219629135}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2.1836193, y: 2.1836195, z: 2.1798067}
m_Center: {x: 0, y: 1.0918021, z: -0.0000019073484}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a1b80e217faa7604993ffbb5b8eff177
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/3D/Box_00.prefab
uploadId: 376379

View File

@@ -0,0 +1,202 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2103868798883616046
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2103868798883616045}
- component: {fileID: 2103868798883616044}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2103868798883616045
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2103868798883616046}
m_LocalRotation: {x: 0, y: 0, z: -0.113723405, w: 0.99351245}
m_LocalPosition: {x: 0.23, y: 1.32, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2103868800387291025}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -13.06}
--- !u!136 &2103868798883616044
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2103868798883616046}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.75
m_Height: 3
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &2103868800033915257
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2103868800033915256}
- component: {fileID: 2103868800033915255}
m_Layer: 0
m_Name: GameObject (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2103868800033915256
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2103868800033915257}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.31, y: 2.89, z: -0.78}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2103868800387291025}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &2103868800033915255
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2103868800033915257}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 5, y: 0.5, z: 5}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &2103868800387291026
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2103868800387291025}
m_Layer: 0
m_Name: Colliders
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2103868800387291025
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2103868800387291026}
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: 2103868798883616045}
- {fileID: 2103868800033915256}
m_Father: {fileID: 9169050384047783493}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &9169050384047809125
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9169050384047783493}
- component: {fileID: 9169050384049110629}
- component: {fileID: 9169050384050076837}
m_Layer: 0
m_Name: Plant_00
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9169050384047783493
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9169050384047809125}
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: 2103868800387291025}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &9169050384049110629
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9169050384047809125}
m_Mesh: {fileID: 4300000, guid: 4e561f465385cbe4db4c50851a3f0fa7, type: 3}
--- !u!23 &9169050384050076837
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9169050384047809125}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 4e561f465385cbe4db4c50851a3f0fa7, type: 3}
- {fileID: 2100002, guid: 4e561f465385cbe4db4c50851a3f0fa7, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 91286df337ecfe24e822269527e69ba7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/3D/Plant_00.prefab
uploadId: 376379

View File

@@ -0,0 +1,801 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1895656635507758}
m_IsPrefabParent: 1
--- !u!1 &1013518845757228
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4626185539506982}
m_Layer: 0
m_Name: Bone.001_end
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1100369342134988
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4117940696219736}
m_Layer: 0
m_Name: Bone.002_end
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1174525772201796
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4573209112020694}
m_Layer: 0
m_Name: Bone.004_end
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1319713429091798
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4337566040806538}
- component: {fileID: 54847200778635264}
m_Layer: 0
m_Name: HingeTarget
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1341789945422318
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4110875914404350}
- component: {fileID: 54124310887512172}
- component: {fileID: 59879517047240724}
m_Layer: 0
m_Name: Bone.004
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1458052853556238
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4492305217144936}
m_Layer: 0
m_Name: Bone
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1524236116513698
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4410869341281168}
m_Layer: 0
m_Name: Bone.005_end
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1536308433582276
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4397872704742768}
- component: {fileID: 54739078757934288}
- component: {fileID: 59305948372057196}
m_Layer: 0
m_Name: Bone.005
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1580316250580798
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4957642066743350}
- component: {fileID: 54099504244426016}
- component: {fileID: 59341562785616752}
m_Layer: 0
m_Name: Bone.002
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1584624691702198
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4255502493259674}
m_Layer: 0
m_Name: Armature
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1638414858883226
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4947197597797156}
- component: {fileID: 54124062687080982}
- component: {fileID: 59972005539826592}
m_Layer: 0
m_Name: Bone.003
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1815598762614754
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4713533142050562}
- component: {fileID: 137308085883534716}
- component: {fileID: 65895162045860104}
m_Layer: 0
m_Name: plant
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1849801863884580
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4116679528967140}
- component: {fileID: 54330613743818828}
- component: {fileID: 59638853285261044}
m_Layer: 0
m_Name: Bone.001
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1895656635507758
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4252170578404524}
- component: {fileID: 114134362235266950}
m_Layer: 0
m_Name: Plant_Rigged_00
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1998688019593524
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4993999476019840}
m_Layer: 0
m_Name: Bone.003_end
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4110875914404350
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1341789945422318}
m_LocalRotation: {x: 0.75068474, y: 0.02446198, z: 0.23374179, w: 0.6174454}
m_LocalPosition: {x: -0.0032626053, y: 0.028448403, z: 0.0066653374}
m_LocalScale: {x: 1, y: 1.0000001, z: 1.0000001}
m_Children:
- {fileID: 4573209112020694}
m_Father: {fileID: 4492305217144936}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4116679528967140
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1849801863884580}
m_LocalRotation: {x: -0.3695272, y: -0.0066187694, z: -0.56961495, w: 0.7341286}
m_LocalPosition: {x: 0.007823182, y: 0.033429503, z: -0.002244788}
m_LocalScale: {x: 1, y: 1.0000001, z: 1}
m_Children:
- {fileID: 4626185539506982}
m_Father: {fileID: 4492305217144936}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: -33.374, y: 29.503002, z: -84.642006}
--- !u!4 &4117940696219736
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1100369342134988}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.018834433, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4957642066743350}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4252170578404524
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1895656635507758}
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: 4255502493259674}
- {fileID: 4713533142050562}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4255502493259674
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1584624691702198}
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalScale: {x: 100, y: 100, z: 100}
m_Children:
- {fileID: 4492305217144936}
m_Father: {fileID: 4252170578404524}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4337566040806538
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1319713429091798}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.0012, y: 0.0248, z: 0.0051}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4492305217144936}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4397872704742768
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1536308433582276}
m_LocalRotation: {x: 0.34409988, y: 0.030886797, z: -0.58746344, w: 0.7317978}
m_LocalPosition: {x: 0.0060895495, y: 0.02603006, z: 0.0024284997}
m_LocalScale: {x: 1, y: 1, z: 1.0000001}
m_Children:
- {fileID: 4410869341281168}
m_Father: {fileID: 4492305217144936}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4410869341281168
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1524236116513698}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.018505335, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4397872704742768}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4492305217144936
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1458052853556238}
m_LocalRotation: {x: 0.6266867, y: 0.08071654, z: -0.07245433, w: 0.77168584}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalScale: {x: 1.0000001, y: 1, z: 1}
m_Children:
- {fileID: 4337566040806538}
- {fileID: 4116679528967140}
- {fileID: 4957642066743350}
- {fileID: 4947197597797156}
- {fileID: 4110875914404350}
- {fileID: 4397872704742768}
m_Father: {fileID: 4255502493259674}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4573209112020694
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1174525772201796}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.017064013, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4110875914404350}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4626185539506982
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1013518845757228}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.017967971, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4116679528967140}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4713533142050562
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1815598762614754}
m_LocalRotation: {x: 0.000000081460335, 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: 4252170578404524}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4947197597797156
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1638414858883226}
m_LocalRotation: {x: -0.050327364, y: 0.079698145, z: 0.8282723, w: 0.55234087}
m_LocalPosition: {x: -0.010082979, y: 0.024798201, z: -0.0014264102}
m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1}
m_Children:
- {fileID: 4993999476019840}
m_Father: {fileID: 4492305217144936}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4957642066743350
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1580316250580798}
m_LocalRotation: {x: -0.52324283, y: 0.016005367, z: 0.3433307, w: 0.7797979}
m_LocalPosition: {x: -0.0068912604, y: 0.030272566, z: -0.0070868894}
m_LocalScale: {x: 0.99999994, y: 1, z: 1}
m_Children:
- {fileID: 4117940696219736}
m_Father: {fileID: 4492305217144936}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4993999476019840
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1998688019593524}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0.017427837, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4947197597797156}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &54099504244426016
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1580316250580798}
serializedVersion: 2
m_Mass: 1
m_Drag: 1
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!54 &54124062687080982
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1638414858883226}
serializedVersion: 2
m_Mass: 1
m_Drag: 1
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!54 &54124310887512172
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1341789945422318}
serializedVersion: 2
m_Mass: 1
m_Drag: 1
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!54 &54330613743818828
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1849801863884580}
serializedVersion: 2
m_Mass: 1
m_Drag: 1
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!54 &54739078757934288
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1536308433582276}
serializedVersion: 2
m_Mass: 1
m_Drag: 1
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!54 &54847200778635264
Rigidbody:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1319713429091798}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!59 &59305948372057196
HingeJoint:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1536308433582276}
m_ConnectedBody: {fileID: 54847200778635264}
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 0, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.007289551, y: 0.0012300517, z: -0.002671502}
m_UseSpring: 1
m_Spring:
spring: 15
damper: 1
targetPosition: 0
m_UseMotor: 0
m_Motor:
targetVelocity: 0
force: 0
freeSpin: 0
m_UseLimits: 1
m_Limits:
min: 0
max: 37
bounciness: 1
bounceMinVelocity: 0.1
contactDistance: 1
m_BreakForce: Infinity
m_BreakTorque: Infinity
m_EnableCollision: 0
m_EnablePreprocessing: 1
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!59 &59341562785616752
HingeJoint:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1580316250580798}
m_ConnectedBody: {fileID: 54847200778635264}
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 1, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.005691261, y: 0.005472565, z: -0.012186881}
m_UseSpring: 1
m_Spring:
spring: 15
damper: 1
targetPosition: 0
m_UseMotor: 0
m_Motor:
targetVelocity: 0
force: 0
freeSpin: 0
m_UseLimits: 1
m_Limits:
min: 0
max: 37
bounciness: 1
bounceMinVelocity: 0.1
contactDistance: 1
m_BreakForce: Infinity
m_BreakTorque: Infinity
m_EnableCollision: 0
m_EnablePreprocessing: 1
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!59 &59638853285261044
HingeJoint:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1849801863884580}
m_ConnectedBody: {fileID: 54847200778635264}
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 0, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.009023183, y: 0.008629495, z: -0.0073447875}
m_UseSpring: 1
m_Spring:
spring: 15
damper: 1
targetPosition: 0
m_UseMotor: 0
m_Motor:
targetVelocity: 0
force: 0
freeSpin: 0
m_UseLimits: 1
m_Limits:
min: 0
max: 37
bounciness: 1
bounceMinVelocity: 0.1
contactDistance: 1
m_BreakForce: Infinity
m_BreakTorque: Infinity
m_EnableCollision: 0
m_EnablePreprocessing: 1
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!59 &59879517047240724
HingeJoint:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1341789945422318}
m_ConnectedBody: {fileID: 54847200778635264}
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 1, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.002062604, y: 0.0036483966, z: 0.0015653358}
m_UseSpring: 1
m_Spring:
spring: 15
damper: 1
targetPosition: 0
m_UseMotor: 0
m_Motor:
targetVelocity: 0
force: 0
freeSpin: 0
m_UseLimits: 1
m_Limits:
min: 0
max: 37
bounciness: 1
bounceMinVelocity: 0.1
contactDistance: 1
m_BreakForce: Infinity
m_BreakTorque: Infinity
m_EnableCollision: 0
m_EnablePreprocessing: 1
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!59 &59972005539826592
HingeJoint:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1638414858883226}
m_ConnectedBody: {fileID: 54847200778635264}
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 0, y: 1, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: -0.008882978, y: -0.0000018049031, z: -0.006526412}
m_UseSpring: 1
m_Spring:
spring: 15
damper: 1
targetPosition: 0
m_UseMotor: 0
m_Motor:
targetVelocity: 0
force: 0
freeSpin: 0
m_UseLimits: 1
m_Limits:
min: 0
max: 37
bounciness: 1
bounceMinVelocity: 0.1
contactDistance: 1
m_BreakForce: Infinity
m_BreakTorque: Infinity
m_EnableCollision: 0
m_EnablePreprocessing: 1
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!65 &65895162045860104
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1815598762614754}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2, y: 3, z: 2}
m_Center: {x: 0, y: 1.5, z: 0}
--- !u!114 &114134362235266950
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1895656635507758}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5901f943dff13b94693d37f9edb0beb8, type: 3}
m_Name:
m_EditorClassIdentifier:
_positionMultiplier: 1
_rotationMultiplier: 1
_requireInView: 0
_includeChildren: 1
--- !u!137 &137308085883534716
SkinnedMeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1815598762614754}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: de4cf409bd3d2dd448331b14b0994fa2, type: 3}
- {fileID: 2100002, guid: de4cf409bd3d2dd448331b14b0994fa2, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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
serializedVersion: 2
m_Quality: 0
m_UpdateWhenOffscreen: 0
m_SkinnedMotionVectors: 1
m_Mesh: {fileID: 4300000, guid: de4cf409bd3d2dd448331b14b0994fa2, type: 3}
m_Bones:
- {fileID: 4492305217144936}
- {fileID: 4116679528967140}
- {fileID: 4957642066743350}
- {fileID: 4947197597797156}
- {fileID: 4110875914404350}
- {fileID: 4397872704742768}
m_BlendShapeWeights: []
m_RootBone: {fileID: 4492305217144936}
m_AABB:
m_Center: {x: -0.00009130128, y: 0.023700738, z: -0.000492312}
m_Extent: {x: 0.030637199, y: 0.026565446, z: 0.031100761}
m_DirtyAABB: 0

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: c7c88767f3ac5c84a988ebb9e3ec3481
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/3D/Plant_Rigged_00.prefab
uploadId: 376379

View File

@@ -0,0 +1,139 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &785427536581347301
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 785427536581123013}
- component: {fileID: 785427536581347306}
- component: {fileID: 785427536578223077}
- component: {fileID: 785427536579352869}
- component: {fileID: 785427536581347307}
- component: {fileID: 785427536581347300}
- component: {fileID: 785427536581347305}
m_Layer: 0
m_Name: Rock00
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &785427536581123013
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &785427536581347306
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f42fbf4b895a7e4bb2115de600da21f, type: 3}
m_Name:
m_EditorClassIdentifier:
_shakeData: {fileID: 11400000, guid: fd1250282c8f2e841ac602704e5efc0c, type: 2}
--- !u!33 &785427536578223077
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_Mesh: {fileID: 4300002, guid: c2075e0f9ff03bc4ba16756e24147cd0, type: 3}
--- !u!23 &785427536579352869
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c2dd870f2e2d4af44a65cc7f311c3914, 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: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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!64 &785427536581347307
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 14
m_Mesh: {fileID: 4300002, guid: c2075e0f9ff03bc4ba16756e24147cd0, type: 3}
--- !u!54 &785427536581347300
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &785427536581347305
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785427536581347301}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f42fbf4b895a7e4bb2115de600da21f, type: 3}
m_Name:
m_EditorClassIdentifier:
_shakeData: {fileID: 11400000, guid: fd1250282c8f2e841ac602704e5efc0c, type: 2}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a652f4be15791ad48bf092047a354c37
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/3D/Rock00.prefab
uploadId: 376379

View File

@@ -0,0 +1,444 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &90429714602921593
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6693602138073732879}
- component: {fileID: 2364104652506087681}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6693602138073732879
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 90429714602921593}
m_LocalRotation: {x: 0.14375174, y: 0, z: 0, w: 0.98961383}
m_LocalPosition: {x: -0, y: 4.46, z: -0.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2589727623187373990}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 16.53, y: 0, z: 0}
--- !u!65 &2364104652506087681
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 90429714602921593}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 9, y: 0.25, z: 9}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1729143264741842236
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2003745357155893496}
- component: {fileID: 6321210365350547232}
m_Layer: 0
m_Name: GameObject (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2003745357155893496
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729143264741842236}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.1, y: 2.59, z: -2.62}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2589727623187373990}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &6321210365350547232
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1729143264741842236}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 5, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &4432302199323547399
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3359964866465182291}
- component: {fileID: 3153471070702333867}
m_Layer: 0
m_Name: GameObject (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3359964866465182291
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4432302199323547399}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.77, y: 2.05, z: 2.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2589727623187373990}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &3153471070702333867
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4432302199323547399}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 4, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6102360419424597039
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6723722231160035221}
- component: {fileID: 9167025689193793294}
m_Layer: 0
m_Name: GameObject (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6723722231160035221
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6102360419424597039}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.29, y: 2.05, z: 2.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2589727623187373990}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &9167025689193793294
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6102360419424597039}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 4, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &7440629646117157741
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3328808532678709968}
- component: {fileID: 4018675536972494685}
m_Layer: 0
m_Name: GameObject (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3328808532678709968
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7440629646117157741}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.29, y: 2.59, z: -2.62}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2589727623187373990}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &4018675536972494685
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7440629646117157741}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 5, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &7779201236161932776
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7779201236161638856}
m_Layer: 0
m_Name: Tent_00
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7779201236161638856
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932776}
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: 7779201236161638860}
- {fileID: 7779201236161638862}
- {fileID: 2589727623187373990}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7779201236161932780
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7779201236161638860}
- component: {fileID: 7779201236158771692}
- component: {fileID: 7779201236159738668}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7779201236161638860
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932780}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.000000029802322, y: -0.6471027, z: 0.000000014901161}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7779201236161638856}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7779201236158771692
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932780}
m_Mesh: {fileID: 4300000, guid: 96bbfaed20474fc41b1b57731310caf4, type: 3}
--- !u!23 &7779201236159738668
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932780}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 96bbfaed20474fc41b1b57731310caf4, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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!1 &7779201236161932782
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7779201236161638862}
- component: {fileID: 7779201236158771694}
- component: {fileID: 7779201236159738670}
m_Layer: 0
m_Name: Cube.001
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7779201236161638862
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932782}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.000000029802322, y: -0.6471027, z: 0.000000014901161}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7779201236161638856}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7779201236158771694
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932782}
m_Mesh: {fileID: 4300002, guid: 96bbfaed20474fc41b1b57731310caf4, type: 3}
--- !u!23 &7779201236159738670
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7779201236161932782}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100002, guid: 96bbfaed20474fc41b1b57731310caf4, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 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!1 &7904517780300779405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2589727623187373990}
m_Layer: 0
m_Name: Colliders
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2589727623187373990
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7904517780300779405}
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: 6693602138073732879}
- {fileID: 2003745357155893496}
- {fileID: 3328808532678709968}
- {fileID: 6723722231160035221}
- {fileID: 3359964866465182291}
m_Father: {fileID: 7779201236161638856}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 09ab028ffbee66c43878c74d018aa080
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Prefabs/3D/Tent_00.prefab
uploadId: 376379

View File

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

View File

@@ -0,0 +1,64 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: Earthquake
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCanvases: 1
_shakeRigidbodies: 1
_unlimitedDuration: 1
_totalDuration: 1
_fadeInDuration: 1
_fadeOutDuration: 1
_magnitude: 1
_magnitudeNoise: 0.35
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughness: 14
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 0.1, y: 0.1, z: 0}
_rotationalInfluence: {x: 0.35, y: 0.15, z: 0.35}
_randomSeed: 1
_seed: 0

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 3629d1d6b48ac3a47ba9e9bd7501a8c8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/ShakeData/Earthquake.asset
uploadId: 376379

View File

@@ -0,0 +1,67 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: OffRoad
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCameras: 1
_shakeCanvases: 1
_shakeObjects: 1
_iterationPercent: 1
_unlimitedDuration: 1
_totalDuration: 1
_fadeInDuration: 0.5
_fadeOutDuration: 0.5
_magnitude: 2
_magnitudeNoise: 0
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughness: 2.5
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 0.025, y: 0.4, z: 0}
_positionalInverts: 0
_rotationalInfluence: {x: 0.3, y: 0, z: 0.3}
_rotationalInverts: 0
_randomSeed: 1

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: e832a8ee5e2677040b890c07820306d7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/ShakeData/OffRoad.asset
uploadId: 376379

View File

@@ -0,0 +1,85 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: RockImpact
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCameras: 1
_shakeCanvases: 1
_shakeObjects: 1
_unlimitedDuration: 0
_totalDuration: 0.65
_fadeInDuration: 0
_fadeOutDuration: 0
_magnitude: 2
_magnitudeNoise: 0
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: -0.0118255615
value: 0.68992233
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 0.12158468
value: 0.50882876
inSlope: 0.3773096
outSlope: 0.3773096
tangentMode: 0
- serializedVersion: 2
time: 0.24658784
value: 0.80328476
inSlope: -0.015097341
outSlope: -0.015097341
tangentMode: 0
- serializedVersion: 2
time: 0.3582877
value: 0.50703704
inSlope: -2.650396
outSlope: -2.650396
tangentMode: 0
- serializedVersion: 2
time: 0.99487305
value: 0.0028076172
inSlope: 0.0633389
outSlope: 0.0633389
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughness: 10
_roughnessNoise: 0
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 0.15, y: 0.35, z: 0.15}
_positionalInverts: 0
_rotationalInfluence: {x: 0, y: 0, z: 0.5}
_rotationalInverts: 0
_randomSeed: 1
_seed: 1

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: fd1250282c8f2e841ac602704e5efc0c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/ShakeData/RockImpact.asset
uploadId: 376379

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,106 @@
fileFormatVersion: 2
guid: 607b03c5535a1194e8fd3cf01db5732c
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 5}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 9674312fe99c40249a0ad64e5015995b
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/2D/Grass.png
uploadId: 376379

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,228 @@
fileFormatVersion: 2
guid: 1be801af75d973a4b9e1fdc6fda7ac8c
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/2D/Plant.png
uploadId: 376379
TextureImporter:
internalIDToNameTable:
- first:
213: 21300000
second: LeftLeaf
- first:
213: 21300002
second: Base
- first:
213: 21300004
second: RightLeaf
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: LeftLeaf
rect:
serializedVersion: 2
x: 38
y: 83
width: 90
height: 40
alignment: 9
pivot: {x: 0.95225424, y: 0.65089834}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 02305410000000000800000000000000
internalID: 21300000
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Base
rect:
serializedVersion: 2
x: 165
y: 41
width: 61
height: 79
alignment: 9
pivot: {x: 0.43815613, y: 0.94887656}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 22305410000000000800000000000000
internalID: 21300002
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: RightLeaf
rect:
serializedVersion: 2
x: 36
y: 15
width: 110
height: 52
alignment: 9
pivot: {x: 0.06102132, y: 0.34039542}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 42305410000000000800000000000000
internalID: 21300004
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
Base: 21300002
LeftLeaf: 21300000
RightLeaf: 21300004
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@@ -0,0 +1,106 @@
fileFormatVersion: 2
guid: 1ebe3e82ebb71d747b19e6cff408ccd6
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 73749b737329d7d4f8519e3316fee01f
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/2D/Sky.png
uploadId: 376379

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -0,0 +1,241 @@
fileFormatVersion: 2
guid: ace093f24bbfec5478e3194559d620de
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/2D/Sprites.png
uploadId: 376379
TextureImporter:
internalIDToNameTable:
- first:
213: 21300000
second: Rock
- first:
213: 21300002
second: Plant
- first:
213: 21300004
second: Crate
- first:
213: 21300006
second: Tent
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: Rock
rect:
serializedVersion: 2
x: 262
y: 251
width: 128
height: 128
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 7f6767c5901f7c24898859d49df6b590
internalID: 21300000
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Plant
rect:
serializedVersion: 2
x: 420
y: 264
width: 183
height: 115
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e8c25b3d8a1dafd449fd13faded4e0b2
internalID: 21300002
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Crate
rect:
serializedVersion: 2
x: 633
y: 312
width: 67
height: 67
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 177294b5233d6e24297215b5e6bf46be
internalID: 21300004
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Tent
rect:
serializedVersion: 2
x: 414
y: 2
width: 286
height: 228
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: ba05e1e4260ee3a46a4ff4b53afde03f
internalID: 21300006
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 3f288a7cb1c8bac49af21cc2fabb0309
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
Crate: 21300004
Plant: 21300002
Rock: 21300000
Tent: 21300006
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: c4a719c5202f2fe4386a44ae66246320
TextureImporter:
fileIDToRecycleName:
8900000: generatedCubemap
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 5
cubemapConvolution: 2
seamlessCubemap: 1
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: -1
mipBias: -100
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/3D/Box_00.png
uploadId: 376379

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,95 @@
fileFormatVersion: 2
guid: 071a0df25fa7f034289d32d2b3c8f90b
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/3D/Rock_00.png
uploadId: 376379

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,137 @@
fileFormatVersion: 2
guid: f5142557b23d4694399a0d662d97059d
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/UI/LowPoly_2D.png
uploadId: 376379
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,137 @@
fileFormatVersion: 2
guid: 51b273c33666ad14fadcf48ba5eb8857
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/UI/LowPoly_3D.png
uploadId: 376379
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,137 @@
fileFormatVersion: 2
guid: f496743e368965942a4bf94398c8c673
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Demo/Textures/UI/LowPoly_Button_White.png
uploadId: 376379
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: af3f9d3883ab6df4c893a32f6d18a8e3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Documentation.pdf
uploadId: 376379

View File

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

View File

@@ -0,0 +1,700 @@
using FirstGearGames.Utilities.Objects;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace FirstGearGames.SmoothCameraShaker
{
public class CameraShakerHandler : MonoBehaviour
{
#region Public.
/// <summary>
/// Dispatched after the default Shaker is changed.
/// </summary>
public static event Action<CameraShakerChange> OnDefaultShakerChanged;
/// <summary>
/// Dispatched after the default Shaker is changed. Obsolete: use OnDefaultShakerChanged instead.
/// </summary>
[Obsolete("Obsolete: use OnDefaultShakerChanged instead.")]
public static event Action<CameraShakerChange> OnDefaultCameraShakerChanged
{
add { OnDefaultShakerChanged += value; }
remove { OnDefaultShakerChanged -= value; }
}
/// <summary>
/// Dispatched when shaking starts when previously stopped on all Shakers.
/// </summary>
public static event Action OnAllShakingStarted;
/// <summary>
/// Dispatched when shaking ends on all Shakers.
/// </summary>
public static event Action OnAllShakingEnded;
/// <summary>
/// Dispatched every update a shake occurs. This is the total values of InstantiatedShakers.
/// </summary>
public static event Action<ShakeUpdate> OnAllShakeUpdate;
/// <summary>
/// Dispatched every fixed update a shake occurs. Contains the shake values from last update of InstantiatedShakers.
/// </summary>
public static event Action<ShakeUpdate> OnAllShakeFixedUpdate;
/// <summary>
/// Dispatched when shaking starts on any Shaker.
/// </summary>
public static event Action<CameraShaker> OnShakingStarted;
/// <summary>
/// Dispatched when shaking ends on any Shaker.
/// </summary>
public static event Action<CameraShaker> OnShakingEnded;
/// <summary>
/// Dispatched every update a shake occurs on any Shaker.
/// </summary>
public static event Action<CameraShaker, ShakeUpdate> OnShakeUpdate;
/// <summary>
/// Dispatched every fixed updated a shake occurs on any Shaker. Contains the shake values from last update.
/// </summary>
public static event Action<CameraShaker, ShakeUpdate> OnShakeFixedUpdate;
/// <summary>
/// Dispatched after a Shaker is added to InstantiatedShakers.
/// </summary>
public static event Action<CameraShaker> OnShakerInstantiated;
/// <summary>
/// Dispatched after a Shaker is added to InstantiatedShakers. Obsolete: use OnShakerInstantiated instead.
/// </summary>
[Obsolete("Obsolete: use OnShakerInstantiated instead.")]
public static event Action<CameraShaker> OnCameraShakerInstantiated
{
add { OnShakerInstantiated += value; }
remove { OnShakerInstantiated -= value; }
}
/// <summary>
/// Dispatched after a Shaker is removed from InstantiatedShakers.
/// </summary>
public static event Action<CameraShaker> OnShakerDestroyed;
/// <summary>
/// Dispatched after a Shaker is removed from InstantiatedShakers. Obsolete: use OnShakerDestroyed instead.
/// </summary>
[Obsolete("Obsolete: use OnShakerDestroyed instead.")]
public static event Action<CameraShaker> OnCameraShakerDestroyed
{
add { OnShakerDestroyed += value; }
remove { OnShakerDestroyed -= value; }
}
/// <summary>
/// All instantiated Shaker scripts.
/// </summary>
public static List<CameraShaker> InstantiatedShakers = new List<CameraShaker>();
/// <summary>
/// All instantiated Shaker scripts. Obsolete: use InstantiatedShakers instead.
/// </summary>
[Obsolete("Obsolete: use InstantiatedShakers instead.")]
public static List<CameraShaker> InstantiatedCameraShakers
{
get { return InstantiatedShakers; }
set { InstantiatedShakers = value; }
}
/// <summary>
///
/// </summary>z
private CameraShaker _defaultCameraShaker;
/// <summary>
/// Current default Shaker.
/// </summary>
public static CameraShaker DefaultCameraShaker
{
get
{
if (_instance == null)
return null;
return _instance._defaultCameraShaker;
}
private set
{
if (_instance == null)
return;
_instance._defaultCameraShaker = value;
}
}
/// <summary>
/// True if any CameraShaker is currently shaking.
/// </summary>
public static bool Shaking { get { return (_instance._shaking.Count > 0); } }
#endregion
#region Private.
/// <summary>
/// Collection of CameraShakers which are currently shaking.
/// </summary>
private List<CameraShaker> _shaking = new List<CameraShaker>();
/// <summary>
/// Singleton instance of this script.
/// </summary>
private static CameraShakerHandler _instance;
#endregion
private void Awake()
{
//Make sure there is only once instance.
if (_instance != null && _instance != this)
{
if (Debug.isDebugBuild) Debug.LogWarning("Multiple CameraShakerHandler scripts found. This script auto loads itself and does not need to be placed in your scenes.");
Destroy(this);
return;
}
}
private void Update()
{
UpdateShakers();
}
private void FixedUpdate()
{
UpdateFixedShakers();
}
private void OnDestroy()
{
DisableAll();
}
/// <summary>
/// Initializes this script for use. Should only be completed once.
/// </summary>
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void FirstInitialize()
{
DDOL ddol = DDOL.ReturnDDOL();
GameObject obj = new GameObject();
obj.name = "CameraShakerHandler";
_instance = obj.AddComponent<CameraShakerHandler>();
_instance.enabled = false;
_instance.transform.SetParent(ddol.transform);
}
/// <summary>
/// Disables activity on all camera shakers.
/// </summary>
private void DisableAll()
{
//Disable camera shakers.
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (InstantiatedShakers[i] != null)
InstantiatedShakers[i].Disable();
}
}
/// <summary>
/// Updates Shakers on standard time.
/// </summary>
private void UpdateShakers()
{
if (_shaking.Count == 0)
return;
ShakeValues totalCamera = new ShakeValues();
ShakeValues totalCanvases = new ShakeValues();
ShakeValues totalRigidbodies = new ShakeValues();
//True if any shakers are running.
bool anyShaking = false;
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
ShakeValues camera;
ShakeValues canvases;
ShakeValues rigidbodies;
if (InstantiatedShakers[i].UpdateShakers(out camera, out canvases, out rigidbodies))
{
anyShaking = true;
totalCamera.Position += camera.Position;
totalCamera.Rotation += camera.Rotation;
totalCanvases.Position += canvases.Position;
totalCanvases.Rotation += canvases.Rotation;
totalRigidbodies.Position += rigidbodies.Position;
totalRigidbodies.Rotation += rigidbodies.Rotation;
}
}
//If any where shaking.
if (anyShaking)
OnAllShakeUpdate?.Invoke(new ShakeUpdate(totalCamera, totalCanvases, totalRigidbodies));
}
/// <summary>
/// Updates Shakers on fixed time.
/// </summary>
private void UpdateFixedShakers()
{
/* Don't exit if total shaking is 0
* as shaking may have stopped but still
* have a fixed shake queued. */
ShakeValues totalCamera = new ShakeValues();
ShakeValues totalCanvases = new ShakeValues();
ShakeValues totalRigidbodies = new ShakeValues();
//True if any shakers are shaking a fixed value.
bool anyShaking = false;
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
ShakeValues camera;
ShakeValues canvases;
ShakeValues rigidbodies;
if (InstantiatedShakers[i].UpdateFixedShakers(out camera, out canvases, out rigidbodies))
{
anyShaking = true;
totalCamera.Position += camera.Position;
totalCamera.Rotation += camera.Rotation;
totalCanvases.Position += canvases.Position;
totalCanvases.Rotation += canvases.Rotation;
totalRigidbodies.Position += rigidbodies.Position;
totalRigidbodies.Rotation += rigidbodies.Rotation;
}
}
if (anyShaking)
OnAllShakeFixedUpdate?.Invoke(new ShakeUpdate(totalCamera, totalCanvases, totalRigidbodies));
}
/// <summary>
/// Returns if an action can be run on the specified Shaker using an All method.
/// </summary>
/// <param name="shaker"></param>
/// <param name="includeDisabled"></param>
/// <returns></returns>
private static bool CanRunAllOn(CameraShaker shaker, bool includeDisabled)
{
if (shaker == null)
return false;
if (!shaker.gameObject.activeInHierarchy && !includeDisabled)
return false;
return true;
}
#region Shaker referencing handling.
/// <summary>
/// Adds CameraShaker to shaking. This is for internal use only.
/// </summary>
/// <param name="shaker"></param>
internal static void AddShaking(CameraShaker shaker)
{
int startCount = _instance._shaking.Count;
_instance._shaking.AddUnique(shaker);
//Shaking just started.
if (startCount == 0 && _instance._shaking.Count > 0)
{
_instance.enabled = true;
OnAllShakingStarted?.Invoke();
}
}
/// <summary>
/// Removes CameraShaker from shaking. This is for internal use only.
/// </summary>
/// <param name="shaker"></param>
internal static void RemoveShaking(CameraShaker shaker)
{
int startCount = _instance._shaking.Count;
_instance._shaking.Remove(shaker);
//Last shaker was removed.
if (startCount > 0 && _instance._shaking.Count == 0)
{
/* Since this is the last shaker being removed send
* zero values. This has to be done before update otherwise these
* values would send after the OnAllShakingEnded. */
OnAllShakeUpdate?.Invoke(new ShakeUpdate());
OnAllShakeFixedUpdate?.Invoke(new ShakeUpdate());
OnAllShakingEnded?.Invoke();
_instance.enabled = false;
}
}
/// <summary>
/// Adds a CameraShaker to the InstantiatedCameraShakers field. This is for internal use only.
/// </summary>
/// <param name="value"></param>
internal static void AddInstantiatedShaker(CameraShaker value)
{
int index = InstantiatedShakers.IndexOf(value);
/* If shaker already exist then remove the current entry.
* It will then be added to the end. */
if (index != -1)
InstantiatedShakers.RemoveAt(index);
//First time being added, subscribe to events.
else
ChangeShakerSubscriptions(value, true);
InstantiatedShakers.Add(value);
OnShakerInstantiated?.Invoke(value);
}
/// <summary>
/// Removes a CameraShaker from the InstantiatedCameraShakers field. This is for internal use only.
/// </summary>
/// <param name="value"></param>
internal static void RemoveInstantiatedShaker(CameraShaker value)
{
ChangeShakerSubscriptions(value, false);
InstantiatedShakers.Remove(value);
/* If value was the current default shaker then try to change value
* to the next most recently enabled shaker. This isn't ideal
* but can occur with user error. */
if (value == DefaultCameraShaker && InstantiatedShakers.Count > 0)
SetFirstDefault();
OnShakerDestroyed?.Invoke(value);
}
/// <summary>
/// Iterates through CameraShakers and sets the most recently active instance as default.
/// </summary>
private static void SetFirstDefault()
{
for (int i = (InstantiatedShakers.Count - 1); i >= 0; i--)
{
if (InstantiatedShakers[i] != null && InstantiatedShakers[i].gameObject.activeInHierarchy)
{
SetDefaultCameraShaker(InstantiatedShakers[i]);
return;
}
}
//Fall through. Ideally won't happen but can depending on user setup.
SetDefaultCameraShaker(null);
}
#endregion
#region Relaying CameraShaker events.
/// <summary>
/// Changes subscriptions to a camera shaker.
/// </summary>
/// <param name="shaker"></param>
/// <param name="subscribe"></param>
private static void ChangeShakerSubscriptions(CameraShaker shaker, bool subscribe)
{
if (shaker == null)
return;
if (subscribe)
{
shaker.OnShakingStarted += Shaker_OnShakingStarted;
shaker.OnShakingEnded += Shaker_OnShakingEnded;
shaker.OnShakeUpdate += Shaker_OnShakeUpdate;
shaker.OnShakeFixedUpdate += Shaker_OnFixedShakeUpdate;
}
else
{
shaker.OnShakingStarted -= Shaker_OnShakingStarted;
shaker.OnShakingEnded -= Shaker_OnShakingEnded;
shaker.OnShakeUpdate -= Shaker_OnShakeUpdate;
shaker.OnShakeFixedUpdate -= Shaker_OnFixedShakeUpdate;
}
}
/// <summary>
/// Received when any instantiated CameraShaker stops shaking.
/// </summary>
/// <param name="obj"></param>
private static void Shaker_OnShakingEnded(CameraShaker obj)
{
OnShakingEnded?.Invoke(obj);
}
/// <summary>
/// Received when any instantiated CameraShaker starts shaking.
/// </summary>
/// <param name="obj"></param>
private static void Shaker_OnShakingStarted(CameraShaker obj)
{
OnShakingStarted?.Invoke(obj);
}
/// <summary>
/// Received when any instantiated CameraShaker calls OnShakeUpdate.
/// </summary>
/// <param name="arg1"></param>
/// <param name="arg2"></param>
private static void Shaker_OnShakeUpdate(CameraShaker arg1, ShakeUpdate arg2)
{
OnShakeUpdate?.Invoke(arg1, arg2);
}
/// <summary>
/// Received when any instantiated CameraShaker calls OnFixedShakeUpdate.
/// </summary>
/// <param name="arg1"></param>
/// <param name="arg2"></param>
private static void Shaker_OnFixedShakeUpdate(CameraShaker arg1, ShakeUpdate arg2)
{
OnShakeFixedUpdate?.Invoke(arg1, arg2);
}
#endregion
#region API.
/// <summary>
/// Copies ShakerInstances from one CameraShaker to another.
/// </summary>
/// <param name="from">CameraShaker copied from.</param>
/// <param name="to">CameraShaker copied to.</param>
/// <param name="copyOffset">True to copy the from cameras current offsets. Both CameraShakers must have the same ShakeTechnique for this to work.</param>
public static void CopyShakerInstances(CameraShaker from, CameraShaker to, bool copyOffset = true)
{
//If neither shaker is null then add instances.
if (from != null && to != null)
{
to.AddShakerInstances(from.ShakerInstances);
//Also copy offsets when possible.
if (copyOffset && from.ShakeTechnique == to.ShakeTechnique)
{
/* Use the to camera shake technique. Since they are the same
* it really doesn't matter which one I read. */
CameraShaker.ShakeTechniques technique = to.ShakeTechnique;
//Matrix.
if (technique == CameraShaker.ShakeTechniques.Matrix)
{
/* Cannot copy the matrix because camera view will remain as last cameras view.
* If fixed values are known for from camera then use those. */
if (from.FixedCamera != null)
to.SetMatrixOffsets(from.FixedCamera.Position, from.FixedCamera.Rotation);
}
//LocalSpace.
else if (to.ShakeTechnique == CameraShaker.ShakeTechniques.LocalSpace)
{
to.SetLocalSpaceOffsets(from.transform.localPosition, from.transform.localEulerAngles);
}
}
}
}
/// <summary>
/// Sets the DefaultCamereaShaker field.
/// </summary>
/// <param name="value">New CameraShaker to use as default.</param>
public static void SetDefaultCameraShaker(CameraShaker value)
{
CameraShaker old = DefaultCameraShaker;
DefaultCameraShaker = value;
OnDefaultShakerChanged?.Invoke(new CameraShakerChange(old, value));
}
/// <summary>
/// Sets Scale value on the default CameraShaker.
/// </summary>
/// <param name="value">New scale to use.</param>
public static void SetScale(float value)
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.SetScale(value);
}
/// <summary>
/// Sets the Scale value of InstantiatedCameraShakers.
/// </summary>
/// <param name="value">New scale to use</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void SetScaleAll(float value, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].SetScale(value);
}
}
/// <summary>
/// Shakes the default CameraShaker using data.
/// </summary>
/// <param name="data">ShakeData to use.</param>
/// <returns>Instance generated using data.</returns>
public static ShakerInstance Shake(ShakeData data)
{
if (DefaultCameraShaker == null)
return null;
return DefaultCameraShaker.Shake(data);
}
/// <summary>
/// Shakes the all camera shakers using data.
/// </summary>
/// <param name="data">ShakeData to use.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
/// <returns>Instances generated using data.</returns>
public static List<ShakerInstance> ShakeAll(ShakeData data, bool includeDisabled = false)
{
List<ShakerInstance> results = new List<ShakerInstance>();
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
results.Add(InstantiatedShakers[i].Shake(data));
}
return results;
}
/// <summary>
/// Sets the paused state of all shaker instances on the default CameraShaker.
/// </summary>
/// <param name="value">New pause state.</param>
public static void SetPaused(bool value)
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.SetPaused(value);
}
/// <summary>
/// Sets the paused state of all shaker instances on the all CameraShakers.
/// </summary>
/// <param name="value">New pause state.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void SetPausedAll(bool value, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].SetPaused(value);
}
}
/// <summary>
/// Abruptly stops all instances on the default CameraShaker.
/// </summary>
public static void Stop()
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.Stop();
}
/// <summary>
/// Abruptly stops all instances on InstantiatedCameraShakers.
/// </summary>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void StopAll(bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].Stop();
}
}
/// <summary>
/// Fades out all instances on the default CameraShaker. This operation only works on instances not already fading out.
/// </summary>
/// <param name="durationOverride">Overrides instance fade out duration with a new value.</param>
public static void FadeOut(float? durationOverride = null)
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.FadeOut(durationOverride);
}
/// <summary>
/// Fades out all instances on all CameraShakers. This operation only works on instances not already fading out.
/// </summary>
/// <param name="durationOverride">Overrides instance fade out duration with a new value.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void FadeOutAll(float? durationOverride = null, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].FadeOut(durationOverride);
}
}
/// <summary>
/// Multiplies magnitude values for all instances on the defaut camera shaker.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
public void MultiplyMagnitude(float multiplier, float moveRate, bool rateUsesDistance)
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.MultiplyMagnitude(multiplier, moveRate, rateUsesDistance);
}
/// <summary>
/// Multiplies magnitude values for all instances on all camera shakers.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public void MultiplyMagnitudeAll(float multiplier, float moveRate, bool rateUsesDistance, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].MultiplyMagnitude(multiplier, moveRate, rateUsesDistance);
}
}
/// <summary>
/// Multiplies roughness values for all instances on the default camera shaker.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
public void MultiplyRoughness(float multiplier, float moveRate, bool rateUsesDistance)
{
if (DefaultCameraShaker == null)
return;
DefaultCameraShaker.MultiplyRoughness(multiplier, moveRate, rateUsesDistance);
}
/// <summary>
/// Multiplies roughness values for all instances on all camera shakers.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public void MultiplyRoughnessAll(float multiplier, float moveRate, bool rateUsesDistance, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].MultiplyRoughness(multiplier, moveRate, rateUsesDistance);
}
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ada9c62fbc6a3314aba805f35565b3ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/CameraShakerHandler.cs
uploadId: 376379

View File

@@ -0,0 +1,73 @@
using UnityEngine;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakeUpdate
{
public ShakeUpdate()
{
Camera = new ShakeValues();
Canvases = new ShakeValues();
Objects = new ShakeValues();
}
public ShakeUpdate(ShakeValues camera, ShakeValues canvases, ShakeValues objects)
{
Camera = camera;
Canvases = canvases;
Objects = objects;
}
/// <summary>
/// ShakeValues for the camera.
/// </summary>
public readonly ShakeValues Camera;
/// <summary>
/// ShakeValues for canvases.
/// </summary>
public readonly ShakeValues Canvases;
/// <summary>
/// ShakeValues for rigidbodies.
/// </summary>
public readonly ShakeValues Objects;
}
public class ShakeValues
{
public ShakeValues()
{
Position = Vector3.zero;
Rotation = Vector3.zero;
}
public ShakeValues(Vector3 position, Vector3 rotation)
{
Position = position;
Rotation = rotation;
}
/// <summary>
/// Position value of the shake.
/// </summary>
public Vector3 Position;
/// <summary>
/// Rotation value of the shake.
/// </summary>
public Vector3 Rotation;
}
public struct CameraShakerChange
{
public CameraShakerChange(CameraShaker oldShaker, CameraShaker newShaker)
{
OldShaker = oldShaker;
NewShaker = newShaker;
}
/// <summary>
/// Old CameraShaker.
/// </summary>
public readonly CameraShaker OldShaker;
/// <summary>
/// New CameraShaker.
/// </summary>
public readonly CameraShaker NewShaker;
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 6d17ed76ee8f15541a502ccfc07aa5c8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/EventArgs.cs
uploadId: 376379

View File

@@ -0,0 +1,10 @@
namespace FirstGearGames.SmoothCameraShaker
{
[System.Serializable, System.Flags]
public enum InvertibleAxes : int
{
X = 1,
Y = 2,
Z = 4
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 50056176a8ca0c0439934482c81cdac6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/InvertibleAxes.cs
uploadId: 376379

View File

@@ -0,0 +1,309 @@
using FirstGearGames.Utilities.Objects;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace FirstGearGames.SmoothCameraShaker
{
public class ObjectShakerHandler : MonoBehaviour
{
#region Public.
///// <summary>
///// Dispatched after a Shaker is added to InstantiatedShakers.
///// </summary>
//public static event Action<ObjectShaker> OnShakerInstantiated;
///// <summary>
///// Dispatched after a Shaker is removed from InstantiatedShakers.
///// </summary>
//public static event Action<ObjectShaker> OnShakerDestroyed;
/// <summary>
/// All instantiatedShaker scripts.
/// </summary>
public static List<ObjectShaker> InstantiatedShakers = new List<ObjectShaker>();
#endregion
#region Private.
/// <summary>
/// Collection of Shakers which are currently shaking.
/// </summary>
private List<ObjectShaker> _shaking = new List<ObjectShaker>();
/// <summary>
/// Singleton instance of this script.
/// </summary>
private static ObjectShakerHandler _instance;
#endregion
private void Awake()
{
//Make sure there is only once instance.
if (_instance != null && _instance != this)
{
if (Debug.isDebugBuild) Debug.LogWarning("Multiple ObjectShakerHandler scripts found. This script auto loads itself and does not need to be placed in your scenes.");
Destroy(this);
return;
}
}
private void Update()
{
UpdateShakers();
}
private void FixedUpdate()
{
UpdateFixedShakers();
}
private void OnDestroy()
{
DisableAll();
}
/// <summary>
/// Initializes this script for use. Should only be completed once.
/// </summary>
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void FirstInitialize()
{
DDOL ddol = DDOL.ReturnDDOL();
GameObject obj = new GameObject();
obj.name = "ObjectShakerHandler";
_instance = obj.AddComponent<ObjectShakerHandler>();
_instance.enabled = false;
_instance.transform.SetParent(ddol.transform);
}
/// <summary>
/// Disables activity on all camera shakers.
/// </summary>
private void DisableAll()
{
//Disable camera shakers.
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (InstantiatedShakers[i] != null)
InstantiatedShakers[i].Disable();
}
}
/// <summary>
/// Updates Shakers on standard time.
/// </summary>
private void UpdateShakers()
{
if (_shaking.Count == 0)
return;
for (int i = 0; i < InstantiatedShakers.Count; i++)
InstantiatedShakers[i].UpdateShakers();
}
/// <summary>
/// Updates Shakers on fixed time.
/// </summary>
private void UpdateFixedShakers()
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
InstantiatedShakers[i].UpdateFixedShakers();
}
/// <summary>
/// Returns if an action can be run on the specified Shaker using an All method.
/// </summary>
/// <param name="shaker"></param>
/// <param name="includeDisabled"></param>
/// <returns></returns>
private static bool CanRunAllOn(ObjectShaker shaker, bool includeDisabled)
{
if (shaker == null)
return false;
if (!shaker.gameObject.activeInHierarchy && !includeDisabled)
return false;
return true;
}
#region Shaker referencing handling.
/// <summary>
/// Adds Shaker to shaking. This is for internal use only.
/// </summary>
/// <param name="shaker"></param>
internal static void AddShaking(ObjectShaker shaker)
{
_instance._shaking.AddUnique(shaker);
_instance.enabled = (_instance._shaking.Count > 0);
}
/// <summary>
/// Removes Shaker from shaking. This is for internal use only.
/// </summary>
/// <param name="shaker"></param>
internal static void RemoveShaking(ObjectShaker shaker)
{
_instance._shaking.Remove(shaker);
_instance.enabled = (_instance._shaking.Count > 0);
}
/// <summary>
/// Adds a Shaker to the InstantiatedShakers field. This is for internal use only.
/// </summary>
/// <param name="value"></param>
internal static void AddInstantiatedShaker(ObjectShaker value)
{
InstantiatedShakers.AddUnique(value);
//OnShakerInstantiated?.Invoke(value);
}
/// <summary>
/// Removes a Shaker from the InstantiatedShakers field. This is for internal use only.
/// </summary>
/// <param name="value"></param>
internal static void RemoveInstantiatedShaker(ObjectShaker value)
{
InstantiatedShakers.Remove(value);
//OnShakerDestroyed?.Invoke(value);
}
#endregion
#region API.
/// <summary>
/// Copies ShakerInstances from one CameraShaker to another.
/// </summary>
/// <param name="from">CameraShaker copied from.</param>
/// <param name="to">CameraShaker copied to.</param>
public static void CopyShakerInstances(ObjectShaker from, ObjectShaker to)
{
//If neither shaker is null then add instances.
if (from != null && to != null)
to.AddShakerInstances(from.ShakerInstances);
}
/// <summary>
/// Sets the Scale value of InstantiatedCameraShakers.
/// </summary>
/// <param name="value">New scale to use</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void SetScaleAll(float value, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].SetScale(value);
}
}
/// <summary>
/// Shakes the all camera shakers using data.
/// </summary>
/// <param name="data">ShakeData to use.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
/// <returns>Instances generated using data.</returns>
public static List<ShakerInstance> ShakeAll(ShakeData data, bool includeDisabled = false)
{
List<ShakerInstance> results = new List<ShakerInstance>();
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
results.Add(InstantiatedShakers[i].Shake(data));
}
return results;
}
/// <summary>
/// Sets the paused state of all shaker instances on the all CameraShakers.
/// </summary>
/// <param name="value">New pause state.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void SetPausedAll(bool value, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].SetPaused(value);
}
}
/// <summary>
/// Abruptly stops all instances on InstantiatedCameraShakers.
/// </summary>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void StopAll(bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].Stop();
}
}
/// <summary>
/// Fades out all instances on all CameraShakers. This operation only works on instances not already fading out.
/// </summary>
/// <param name="durationOverride">Overrides instance fade out duration with a new value.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public static void FadeOutAll(float? durationOverride = null, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].FadeOut(durationOverride);
}
}
/// <summary>
/// Multiplies magnitude values for all instances on all camera shakers.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public void MultiplyMagnitudeAll(float multiplier, float moveRate, bool rateUsesDistance, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].MultiplyMagnitude(multiplier, moveRate, rateUsesDistance);
}
}
/// <summary>
/// Multiplies roughness values for all instances on all camera shakers.
/// </summary>
/// <param name="multiplier">Value to multiply by. 1f is standard multiplication, which in result would be default values.</param>
/// <param name="moveRate">How quickly per second to move towards new multiplier. Values 0f and lower are instant.</param>
/// <param name="rateUsesDistance">True to modify move rate based on distance from multiplier. False to move towards goal using movdRate unmodified.</param>
/// <param name="includeDisabled">True to issue call on disabled CameraShakers as well.</param>
public void MultiplyRoughnessAll(float multiplier, float moveRate, bool rateUsesDistance, bool includeDisabled = false)
{
for (int i = 0; i < InstantiatedShakers.Count; i++)
{
if (!CanRunAllOn(InstantiatedShakers[i], includeDisabled))
continue;
InstantiatedShakers[i].MultiplyRoughness(multiplier, moveRate, rateUsesDistance);
}
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 5645861d4fd767f48b7cb99e0ee87402
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/ObjectShakerHandler.cs
uploadId: 376379

View File

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

View File

@@ -0,0 +1,82 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: ConstantCurvy
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCanvases: 1
_shakeRigidbodies: 1
_unlimitedDuration: 1
_totalDuration: 1
_fadeInDuration: 1
_fadeOutDuration: 1
_magnitude: 0.5
_magnitudeNoise: 0.1
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0.014367644
outSlope: 0.014367644
tangentMode: 0
- serializedVersion: 2
time: 0.5
value: 0.25
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 1.5
value: 0.25
inSlope: 0.0036582947
outSlope: 0.0036582947
tangentMode: 34
- serializedVersion: 2
time: 2
value: 1.0036583
inSlope: -0.00000054336607
outSlope: -0.00000054336607
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughness: 13
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 1, y: 1, z: 0}
_rotationalInfluence: {x: 0, y: 0.5, z: 2}
_randomSeed: 1
_seed: 0

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 710c880799ac4264dab849dc626d5ac8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Presets/ConstantCurvy.asset
uploadId: 376379

View File

@@ -0,0 +1,64 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: ConstantFlat
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCanvases: 1
_shakeRigidbodies: 1
_unlimitedDuration: 1
_totalDuration: 1
_fadeInDuration: 0
_fadeOutDuration: 0
_magnitude: 0.25
_magnitudeNoise: 0.05
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
_roughness: 13
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 1, y: 1, z: 0}
_rotationalInfluence: {x: 0, y: 0.5, z: 1}
_randomSeed: 1
_seed: 0

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 2c6062901f01a2e40bae62c743fdac13
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Presets/ConstantFlat.asset
uploadId: 376379

View File

@@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: CurveFade
m_EditorClassIdentifier:
_scaledTime: 1
_shakeCameras: 1
_shakeCanvases: 1
_shakeObjects: 1
_unlimitedDuration: 0
_totalDuration: 1
_fadeInDuration: 0
_fadeOutDuration: 0
_magnitude: 0.5
_magnitudeNoise: 0.1
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 0
inSlope: 2
outSlope: 2
tangentMode: 0
- serializedVersion: 2
time: 0.16723633
value: 0.995121
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1.5
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughness: 8
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
- serializedVersion: 2
time: 2
value: 1
inSlope: 0
outSlope: 0
tangentMode: 34
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_positionalInfluence: {x: 1, y: 1, z: 0}
_rotationalInfluence: {x: 0, y: 0.5, z: 1}
_randomSeed: 1
_seed: 0

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 94a2bf00ef401804d8dae290e3a2266b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Presets/CurveFade.asset
uploadId: 376379

View File

@@ -0,0 +1,84 @@
%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: 9ba2a80b753f77d4d96ab2af3748cee8, type: 3}
m_Name: Explosion
m_EditorClassIdentifier:
_scaledTime: 1
_unlimitedDuration: 0
_totalDuration: 1
_fadeInDuration: 0
_fadeOutDuration: 0
_magnitude: 1
_magnitudeNoise: 0.1
_magnitudeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.8
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_magnitudeCurveTiming: 1
_roughness: 7.5
_roughnessNoise: 0.3
_roughnessCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
_roughnessCurveTiming: 1
_positionalInfluence: {x: 1, y: 1, z: 0}
_rotationalInfluence: {x: 0, y: 0, z: 1}

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: cfb5721468f522e4984b6e517151f6d8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Presets/Explosion.asset
uploadId: 376379

View File

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

View File

@@ -0,0 +1,36 @@
using UnityEngine;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakableBase : MonoBehaviour
{
#region Types.
public enum ShakerTypes
{
CameraShaker = 0,
ObjectShaker = 1
}
#endregion
#region Serialized.
/// <summary>
///
/// </summary>
[Tooltip("Shaker type to use. CameraShaker will subscribe to your current or otherwise configured CameraShaker. ObjectShaker will subscribe to the first ObjectShaker found on or in parented objects.")]
[SerializeField]
private ShakerTypes _shakerType = ShakerTypes.CameraShaker;
/// <summary>
/// Shaker type to use. CameraShaker will subscribe to your current or otherwise configured CameraShaker. ObjectShaker will subscribe to the first ObjectShaker found on or in parented objects.s
/// </summary>
public ShakerTypes ShakerType { get { return _shakerType; } }
#endregion
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 52ce313d243e43145988d09cfb991db6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Shakables/ShakableBase.cs
uploadId: 376379

View File

@@ -0,0 +1,558 @@
using FirstGearGames.Utilities.Maths;
using System.Collections.Generic;
using UnityEngine;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakableCanvas : ShakableBase
{
#region Types.
private struct StartValues
{
public StartValues(Vector3 position, Vector3 rotation)
{
Position = position;
Rotation = rotation;
}
/// <summary>
/// Start position for an object.
/// </summary>
public readonly Vector3 Position;
/// <summary>
/// Start rotation for an object.
/// </summary>
public readonly Vector3 Rotation;
}
#endregion
#region Serialized.
/// <summary>
/// True to shake when the default camera shaker does. False to specify a camera shaker to use.
/// </summary>
[Tooltip("True to shake when the default camera shaker does. False to specify a camera shaker to use.")]
[SerializeField]
private bool _useDefaultCameraShaker = true;
/// <summary>
/// Camera shaker to monitor.
/// </summary>
[Tooltip("Camera shaker to monitor.")]
[SerializeField]
private CameraShaker _cameraShaker = null;
/// <summary>
/// Sets a new CameraShaker to use. This method will do nothing if using ShakableObject as the ShakerType.
/// </summary>
/// <param name="shaker"></param>
public void SetCameraShaker(CameraShaker shaker)
{
if (base.ShakerType == ShakerTypes.ObjectShaker)
return;
if (_useDefaultCameraShaker)
{
if (Debug.isDebugBuild) Debug.LogWarning("Cannot set CameraShaker with UseDefaultCameraShaker set. If you wish to change CameraShaker at run-time set UseDefaultCameraShaker to false before entering play.");
}
else
{
ChangeCameraShakers(_cameraShaker, shaker, true);
}
}
/// <summary>
/// True to create a parent object and attach children to it. The parent object will be shaken instead of each individual canvas child. If your direct children move at all this value must be true. Setting value as false may incur extra cost as well.
/// </summary>
[Tooltip("True to create a parent object and attach children to it. The parent object will be shaken instead of each individual canvas child. If your direct children move at all this value must be true. Setting value as false may incur extra cost as well.")]
[Space(10)]
[SerializeField]
private bool _encapsulateChildren = true;
/// <summary>
/// True to watch for additional children to encapsulate. This may be false if you do not add direct children to this canvas at runtime.
/// </summary>
[Tooltip("True to watch for additional children to encapsulate. This may be false if you do not add direct children to this canvas at runtime.")]
[SerializeField]
private bool _monitorEncapsulation = false;
/// <summary>
/// Positional shakes are multiplied by this value. Lower values will result in a lower positional magnitude.
/// </summary>
[Tooltip("Positional shakes are multiplied by this value. Lower values will result in a lower positional magnitude.")]
[SerializeField]
private float _positionalMultiplier = 1f;
/// <summary>
/// Rotational shakes are multiplied by this value. Lower values will result in lower ritational magnitude.
/// </summary>
[Tooltip("Rotational shakes are multiplied by this value. Lower values will result in lower rotational magnitude.")]
[SerializeField]
private float _rotationalMultiplier = 1f;
/// <summary>
/// True to randomly change influence direction when shaking starts.
/// </summary>
[Tooltip("True to randomly change influence direction when shaking starts.")]
[Space(10)]
[SerializeField]
private bool _randomizeDirections = true;
#endregion
#region Private.
/// <summary>
/// Transform children are being attached to. This only exist if EncapsulateChildren is true.
/// </summary>
private RectTransform _parentRect;
/// <summary>
/// Start values for children of this transform.
/// </summary>
private Dictionary<Transform, StartValues> _childrenStartValues = new Dictionary<Transform, StartValues>();
/// <summary>
/// Next time to clean ChildrenStartValues.
/// </summary>
private float _nextCleanStartValuesTime;
/// <summary>
/// Current camera shaker this canvas is subscribed to.
/// </summary>
private CameraShaker _currentCameraShaker = null;
/// <summary>
/// ObjectShaker used for this object. May be null if not using ObjectShaker type.
/// </summary>
private ObjectShaker _objectShaker = null;
/// <summary>
/// Direction to multiply position by when shaking starts.
/// </summary>
private float _randomPositionMultiplier = 1f;
/// <summary>
/// Direction to multiply rotation by when shaking starts.
/// </summary>
private float _randomRotationMultiplier = 1f;
#endregion
private void Awake()
{
FirstInitialize();
}
private void OnEnable()
{
//Subscribe.
ChangeSubscription(true);
}
private void Update()
{
/* If fails to encapsulate new children then remove script.
* Something unrecoverable went wrong. */
if (_monitorEncapsulation && !EncapsulateChildren(false))
{
DestroyImmediate(this);
return;
}
CheckRemoveNullStartValues();
}
private void OnDisable()
{
//Unsubscribe.
ChangeSubscription(false);
ResetOffsets();
}
/// <summary>
/// Initializes this script for use. Should only be cmpleted once.
/// </summary>
private void FirstInitialize()
{
//If using ObjectShaker type.
if (base.ShakerType == ShakerTypes.ObjectShaker)
{
_objectShaker = GetComponentInParent<ObjectShaker>();
if (_objectShaker == null)
{
Debug.LogError("ObjectShaker could not be found on or above object " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
}
Canvas canvas = GetComponent<Canvas>();
//Canvas null.
if (canvas == null)
{
if (Debug.isDebugBuild) Debug.LogError("Canvas does not exist on this object, this script has been destroyed.");
DestroyImmediate(this);
return;
}
//World space canvases already shake.
if (canvas.renderMode == RenderMode.WorldSpace)
{
if (Debug.isDebugBuild) Debug.LogError("ShakeableCanvas is not needed for Canvas RenderMode.WorldSpace");
DestroyImmediate(this);
return;
}
//Camera space canvases don't need this script when using matrix on the CameraShaker.
if (canvas.renderMode == RenderMode.ScreenSpaceCamera)
{
//Camera not set.
if (canvas.worldCamera == null)
{
if (Debug.isDebugBuild) Debug.LogWarning("WorldCamera is not set for this canvas. Cannot determine if this script is needed. If the CameraShaker for your intended WorldCamera is Matrix this script is not needed.");
}
//Camera known.
else
{
CameraShaker shaker = canvas.worldCamera.GetComponent<CameraShaker>();
if (shaker == null)
{
if (Debug.isDebugBuild) Debug.LogWarning("CameraShaker not found on WorldCamera. If the CameraShaker for your intended WorldCamera will use Matrix this script is not needed.");
}
else
{
if (shaker.ShakeTechnique == CameraShaker.ShakeTechniques.Matrix)
if (Debug.isDebugBuild) Debug.LogWarning("CameraShaker technique on WorldCamera is set to Matrix. This script is not needed for Matrix shake techniques. Ignore this message if you intend to change the ShakeTechnique.");
}
}
}
//Subscribe to the CameraShaker if not using default.
if (!_useDefaultCameraShaker)
ChangeCameraShakers(null, _cameraShaker, false);
//Encapsulation is enabled.
if (_encapsulateChildren)
{
//Try to encapsulate children.
if (!EncapsulateChildren(true))
{
DestroyImmediate(this);
return;
}
}
//Encapsulation is disabled, be sure to disable monitor as well.
else
{
_monitorEncapsulation = false;
}
}
/// <summary>
/// Changes which CameraShaker to use when not using defualt CameraShaker.
/// </summary>
/// <param name="shaker"></param>
/// <param name="subscribe"></param>
private void ChangeCameraShakers(CameraShaker oldShaker, CameraShaker newShaker, bool resetOffsets = true)
{
//No change.
if (oldShaker == newShaker)
return;
_currentCameraShaker = newShaker;
//Since canvas subs and unsubs using OnEnable/Disable only change subscriptions if enabled.
if (gameObject.activeInHierarchy)
{
//Offsets are automatically reset OnDisable, so only need to reset if active.
if (resetOffsets)
ResetOffsets();
ChangeCameraShakerSubscription(oldShaker, false);
ChangeCameraShakerSubscription(newShaker, true);
}
}
/// <summary>
/// Encapsulate children transforms into a newly created transform.
/// </summary>
private bool EncapsulateChildren(bool initialization)
{
if (!_encapsulateChildren)
return true;
//If being run for the first time.
if (initialization)
{
GameObject obj = new GameObject();
//Shouldn't happen but just incase.
if (obj == null)
{
if (Debug.isDebugBuild) Debug.LogError("Encapsulation failed because parent object could not be created.");
return false;
}
//Add a rect since this is a UI object.
_parentRect = obj.AddComponent<RectTransform>();
//Shouldn't happen but just incase.
if (_parentRect == null)
{
if (Debug.isDebugBuild) Debug.LogError("Encapsulation failed because parentRect could not be created.");
return false;
}
//Setup parent rect to be full screen/stretched.
_parentRect.name = "ShakableParentRect";
_parentRect.SetParent(transform);
_parentRect.anchorMin = new Vector2(0f, 0f);
_parentRect.anchorMax = new Vector2(1f, 1f);
_parentRect.offsetMin = Vector2.zero;
_parentRect.offsetMax = Vector2.zero;
_parentRect.localScale = Vector3.one;
_parentRect.localPosition = Vector3.zero;
_parentRect.localEulerAngles = Vector3.zero;
}
//If the parent rect somehow got destroyed, shouldn't be possible.
if (_parentRect == null)
return false;
int childCount = transform.childCount;
/* If parent rect is a child of this, and child count is 1 then no reason to go
* further as there are no other children. This isn't considered a failure. */
if (_parentRect.parent == transform && childCount == 1)
return true;
/* Since the child collection of this transform will change
* as children are re-ordered a local copy is set first
* and navigated to ensure all children objects are set
* properly. */
Transform[] children = new Transform[childCount];
for (int i = 0; i < childCount; i++)
children[i] = transform.GetChild(i);
//Child to rect parent if not rect parent.
for (int i = 0; i < childCount; i++)
{
if (children[i] != _parentRect.transform && children[i].gameObject.activeInHierarchy)
children[i].SetParent(_parentRect, false);
}
return true;
}
#region ShakeUpdates.
/// <summary>
/// Received when shaking starts when previously stopped on all Shakers.
/// </summary>
private void OnShakingStarted()
{
RandomizeDirections();
}
/// <summary>
/// Received when shaking starts when previously stopped on all Shakers.
/// </summary>
private void CameraShaker_OnShakingStarted(CameraShaker obj)
{
OnShakingStarted();
}
/// <summary>
/// Received when shaking starts when previously stopped on ObjectShaker.
/// </summary>
private void ObjectShaker_OnShakingStarted(ObjectShaker obj)
{
OnShakingStarted();
}
/// <summary>
/// Received every update a shake occurs.
/// </summary>
/// <param name="obj"></param>
private void CameraShaker_OnShakeUpdate(CameraShaker shaker, ShakeUpdate obj)
{
ShakeUpdateOccurred(obj);
}
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void ObjectShaker_OnShakeUpdate(ObjectShaker arg1, ShakeUpdate arg2)
{
ShakeUpdateOccurred(arg2);
}
/// <summary>
/// Called when a shake update occurs, wether it be from CameraShaker or ObjectShaker.
/// </summary>
/// <param name="obj"></param>
private void ShakeUpdateOccurred(ShakeUpdate obj)
{
//No reason to shake if not active in scene.
if (!gameObject.activeInHierarchy)
return;
Vector3 positionalOffset = obj.Canvases.Position * _positionalMultiplier;
Vector3 rotationalOffset = obj.Canvases.Rotation * _rotationalMultiplier;
//If using an encapsulation.
if (_parentRect != null)
{
_parentRect.localPosition = positionalOffset;
_parentRect.localEulerAngles = rotationalOffset;
}
//Not using encapsulation.
else
{
foreach (Transform t in transform)
{
Vector3 pos;
Vector3 rot;
StartValues startValues;
//If already in dictionary.
if (_childrenStartValues.TryGetValue(t, out startValues))
{
pos = startValues.Position + positionalOffset;
rot = startValues.Rotation + rotationalOffset;
}
//Not yet in dictionary.
else
{
_childrenStartValues.Add(t, new StartValues(t.localPosition, t.localEulerAngles));
pos = t.localPosition + positionalOffset;
rot = t.localEulerAngles + rotationalOffset;
}
t.localPosition = pos;
t.localEulerAngles = rot;
}
}
}
#endregion
/// <summary>
/// Updates random multipliers for shakable.
/// </summary>
private void RandomizeDirections()
{
if (!_randomizeDirections)
return;
_randomPositionMultiplier = Floats.RandomlyFlip(_randomPositionMultiplier);
_randomRotationMultiplier = Floats.RandomlyFlip(_randomRotationMultiplier);
}
/// <summary>
/// Resets the offsets on children.
/// </summary>
private void ResetOffsets()
{
//If using an encapsulation.
if (_parentRect != null)
{
_parentRect.localPosition = Vector3.zero;
_parentRect.localEulerAngles = Vector3.zero;
}
//Not using encapsulation.
else
{
foreach (KeyValuePair<Transform, StartValues> dict in _childrenStartValues)
{
if (dict.Key != null)
{
dict.Key.localPosition = dict.Value.Position;
dict.Key.localEulerAngles = dict.Value.Rotation;
}
}
}
}
/// <summary>
/// Periodically removes null values from ChildrenStartValues. Should be called every frame.
/// </summary>
private void CheckRemoveNullStartValues()
{
//ParentRect is immune to this behaviour, not needed if using parent rect.
if (_parentRect != null)
return;
//Only clean every 30 seconds. More than enough to prevent a memory leak.
if (Time.unscaledTime < _nextCleanStartValuesTime)
return;
_nextCleanStartValuesTime = Time.unscaledTime + 30f;
//Build a collection of null keys then remove them from the dictionary after.
List<Transform> keysToRemove = new List<Transform>();
foreach (KeyValuePair<Transform, StartValues> dict in _childrenStartValues)
{
if (dict.Key == null)
keysToRemove.Add(dict.Key);
}
for (int i = 0; i < keysToRemove.Count; i++)
{
try
{
_childrenStartValues.Remove(keysToRemove[i]);
}
catch { }
}
}
#region Change subscriptions.
/// <summary>
/// Changes the subscription to a camera shaker.
/// </summary>
/// <param name="shaker"></param>
/// <param name="subscribe"></param>
private void ChangeCameraShakerSubscription(CameraShaker shaker, bool subscribe)
{
if (shaker == null)
return;
if (subscribe)
{
shaker.OnShakeUpdate += CameraShaker_OnShakeUpdate;
shaker.OnShakingStarted += CameraShaker_OnShakingStarted;
}
else
{
shaker.OnShakeUpdate -= CameraShaker_OnShakeUpdate;
shaker.OnShakingStarted -= CameraShaker_OnShakingStarted;
}
}
/// <summary>
/// Changes the subscription to the default camera shaker by using CameraShakerHandler.
/// </summary>
/// <param name="subscribe"></param>
private void ChangeDefaultCameraShakerSubscription(bool subscribe)
{
if (subscribe)
{
CameraShakerHandler.OnShakeUpdate += CameraShaker_OnShakeUpdate;
CameraShakerHandler.OnShakingStarted += CameraShaker_OnShakingStarted;
}
else
{
CameraShakerHandler.OnShakeUpdate -= CameraShaker_OnShakeUpdate;
CameraShakerHandler.OnShakingStarted -= CameraShaker_OnShakingStarted;
}
}
/// <summary>
/// Changes subscriptions based on current settings and shaker type.
/// </summary>
/// <param name="subscribe"></param>
private void ChangeSubscription(bool subscribe)
{
//CameraShaker type.
if (base.ShakerType == ShakerTypes.CameraShaker)
{
//If using default camera shaker then subscribe to default on enable.
if (_useDefaultCameraShaker)
ChangeDefaultCameraShakerSubscription(subscribe);
else
ChangeCameraShakerSubscription(_currentCameraShaker, subscribe);
}
//ObjectShaker type.
else if (base.ShakerType == ShakerTypes.ObjectShaker)
{
if (_objectShaker != null)
{
if (subscribe)
{
_objectShaker.OnShakeUpdate += ObjectShaker_OnShakeUpdate;
_objectShaker.OnShakingStarted += ObjectShaker_OnShakingStarted;
}
else
{
_objectShaker.OnShakeUpdate -= ObjectShaker_OnShakeUpdate;
_objectShaker.OnShakingStarted -= ObjectShaker_OnShakingStarted;
}
}
}
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 663365fdc7222f84fa76f2a79859e1f5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Shakables/ShakableCanvas.cs
uploadId: 376379

View File

@@ -0,0 +1,366 @@
using FirstGearGames.Utilities.Maths;
using FirstGearGames.Utilities.Objects;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakableRigidbody : ShakableBase
{
#region Types.
/// <summary>
/// Data about how to update rigidbodies with shakes.
/// </summary>
private class RigidbodyData
{
public RigidbodyData(Rigidbody rb)
{
Rigidbody = rb;
}
/// <summary>
/// Rigidbody on this object.
/// </summary>
public readonly Rigidbody Rigidbody;
/// <summary>
/// Direction to multiply position by at random intervals.
/// </summary>
public float RandomPositionMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomPositionMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomPositionMultiplier(float value)
{
RandomPositionMultiplier = value;
}
/// <summary>
/// Direction to multiply rotation by at random intervals.
/// </summary>
public float RandomRotationMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomRotationMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomRotationMultiplier(float value)
{
RandomRotationMultiplier = value;
}
/// <summary>
/// Next time to update randomMultipliers.
/// </summary>
public float NextRandomizeTime { get; private set; } = -1f;
/// <summary>
/// Sets the value for NextRandomizeTime.
/// </summary>
/// <param name="value"></param>
public void SetNextRandomizeTime(float value)
{
NextRandomizeTime = value;
}
/// <summary>
/// Positional values last time shake offsets were received.
/// </summary>
public Vector3 LastPositional { get; private set; } = Vector3.zero;
/// <summary>
/// Sets the value for LastPositional.
/// </summary>
/// <param name="value"></param>
public void SetLastPositional(Vector3 value)
{
LastPositional = value;
}
/// <summary>
/// Rotational values last time shake offsets were received.
/// </summary>
public Vector3 LastRotational { get; private set; } = Vector3.zero;
/// <summary>
/// Sets the value for LastRotational.
/// </summary>
/// <param name="value"></param>
public void SetLastRotational(Vector3 value)
{
LastRotational = value;
}
}
#endregion
#region Serialized.
/// <summary>
/// Multiplier to apply towards position.
/// </summary>
[Tooltip("Multiplier to apply towards position.")]
[Space(10f)]
[SerializeField]
[FormerlySerializedAs("_positionMultiplier")]
private float _positionalMultiplier = 1f;
/// <summary>
/// Multipplier to apply towards rotation.
/// </summary>
[Tooltip("Multipplier to apply towards rotation.")]
[SerializeField]
[FormerlySerializedAs("_rotationMultiplier")]
private float _rotationalMultiplier = 1f;
/// <summary>
/// Only shake when in view of a camera.
/// </summary>
[Tooltip("Only shake when in view of a camera.")]
[Space(10f)]
[SerializeField]
private bool _requireInView = true;
/// <summary>
/// True to find rigidbodies in children too. This allows you to use one ShakableRigidbody on the parent if all children rigidbodies should shake as well.
/// </summary>
[Tooltip("True to find rigidbodies in children too. This allows you to use one ShakableRigidbody on the parent if all children rigidbodies should shake as well.")]
[SerializeField]
private bool _includeChildren = false;
/// <summary>
/// True to ignore the transform this component resides, and only shake children.
/// </summary>
[Tooltip("True to ignore the transform this component resides, and only shake children.")]
[SerializeField]
private bool _ignoreSelf = false;
/// <summary>
/// True to also find inactive children.
/// </summary>
[Tooltip("True to also find inactive children.")]
[SerializeField]
private bool _includeInactive = false;
/// <summary>
/// True to convert forces to local space before applying.
/// </summary>
[Tooltip("True to convert forces to local space before applying.")]
[Space(10f)]
[SerializeField]
private bool _localizeShake = false;
/// <summary>
/// True to randomly change force direction. Best used with bulk objects so they do not all shake the same direction.
/// </summary>
[Tooltip("True to randomly change force direction. Best used with bulk objects so they do not all shake the same direction.")]
[SerializeField]
private bool _randomizeDirections = true;
#endregion
#region Private.
/// <summary>
/// Data about each rigidbody to shake.
/// </summary>
private RigidbodyData[] _rbData;
/// <summary>
/// True if currently in view.
/// </summary>
private bool _inView = false;
/// <summary>
/// ObjectShaker used for this object. May be null if not using ObjectShaker type.
/// </summary>
private ObjectShaker _objectShaker = null;
#endregion
private void Awake()
{
FirstInitialize();
}
private void OnEnable()
{
if (_requireInView && _inView)
ChangeSubscription(true);
else if (!_requireInView)
ChangeSubscription(true);
}
private void OnDisable()
{
if (_requireInView && _inView)
ChangeSubscription(false);
else if (!_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Initializes this script for use. Should only be completed once.
/// </summary>
private void FirstInitialize()
{
//If using ObjectShaker type.
if (base.ShakerType == ShakerTypes.ObjectShaker)
{
_objectShaker = GetComponentInParent<ObjectShaker>();
if (_objectShaker == null)
{
Debug.LogError("ObjectShaker could not be found on or above object " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
}
//If not including children.
if (!_includeChildren)
{
Rigidbody rb = GetComponent<Rigidbody>();
if (rb == null)
{
Debug.LogWarning("Rigidbody is empty on " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
_rbData = new RigidbodyData[1];
_rbData[0] = new RigidbodyData(rb);
}
//Include children.
else
{
List<Rigidbody> rbs = new List<Rigidbody>();
Transforms.GetComponentsInChildren(transform, rbs, !_ignoreSelf, _includeInactive);
if (rbs.Count == 0)
{
Debug.LogWarning("No rigidbodies exist on parent or children of " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
_rbData = new RigidbodyData[rbs.Count];
for (int i = 0; i < rbs.Count; i++)
_rbData[i] = new RigidbodyData(rbs[i]);
}
/* Try to find a renderer. One is required on this object for OnBecameVisible and OnBecameInvisible
* to call. If a renderer doesn't exist then add a low cost renderer. */
if (_requireInView)
{
if (GetComponent<Renderer>() == null)
{
if (Debug.isDebugBuild)
Debug.Log("Renderer not found on object. Adding renderer so RequireInView works properly. Added renderer may be smaller than actual object, and sometimes may not be detected as in view. To resolve add your own renderer to the object this script resides.", this);
SpriteRenderer r = gameObject.AddComponent<SpriteRenderer>();
r.sprite = null;
}
}
}
#region OnShakeUpdate.
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void CameraShakerHandler_OnShakeFixedUpdate(ShakeUpdate obj)
{
ShakeUpdateOccurred(obj);
}
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void ObjectShaker_OnShakeFixedUpdate(ObjectShaker arg1, ShakeUpdate arg2)
{
ShakeUpdateOccurred(arg2);
}
/// <summary>
/// Called when a shake update occurs, wether it be from CameraShaker or ObjectShaker.
/// </summary>
/// <param name="obj"></param>
private void ShakeUpdateOccurred(ShakeUpdate obj)
{
if (!_inView && _requireInView)
return;
for (int i = 0; i < _rbData.Length; i++)
{
#if UNITY_EDITOR
//Rigidbody can go null when exiting playmode, and camerashaker may try to send one last update when exiting play mode.
if (_rbData[i].Rigidbody == null)
return;
#endif
//Check if random multipliers should be updated.
CheckRandomizeRandomers(_rbData[i]);
//Calculate new offsets.
Vector3 newPos = obj.Objects.Position * _rbData[i].RandomPositionMultiplier * _positionalMultiplier;
Vector3 newRot = obj.Objects.Rotation * _rbData[i].RandomRotationMultiplier * _rotationalMultiplier;
//If to localize force.
if (_localizeShake)
{
newPos = _rbData[i].Rigidbody.transform.TransformDirection(newPos);
newRot = _rbData[i].Rigidbody.transform.TransformDirection(newRot);
}
//Apply force.
_rbData[i].Rigidbody.AddForce(newPos - _rbData[i].LastPositional, ForceMode.Impulse);
_rbData[i].Rigidbody.AddTorque(newRot - _rbData[i].LastRotational, ForceMode.Impulse);
//Set last values.
_rbData[i].SetLastPositional(newPos);
_rbData[i].SetLastRotational(newRot);
}
}
#endregion
/// <summary>
/// Updates random multipliers if they are in need. What a fun name.
/// </summary>
private void CheckRandomizeRandomers(RigidbodyData data)
{
if (!_randomizeDirections)
return;
//Becomes true if enough time has passed to make new random multipliers.
bool newRandomize = (Time.time > data.NextRandomizeTime);
if (newRandomize)
data.SetNextRandomizeTime(Time.time + Random.Range(3f, 7f));
/* If new random multipliers or velocity is zero then randomize multipliers. */
if (newRandomize || data.Rigidbody.linearVelocity == Vector3.zero)
data.SetRandomPositionMultiplier(Floats.RandomlyFlip(data.RandomPositionMultiplier));
if (newRandomize || data.Rigidbody.angularVelocity == Vector3.zero)
data.SetRandomRotationMultiplier(Floats.RandomlyFlip(data.RandomRotationMultiplier));
}
/// <summary>
/// Received when visible in any camera.
/// </summary>
private void OnBecameVisible()
{
_inView = true;
if (_requireInView)
ChangeSubscription(true);
}
/// <summary>
/// Received when no longer visible in any camera.
/// </summary>
private void OnBecameInvisible()
{
_inView = false;
if (_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Changes the subscription to the camera shaker.
/// </summary>
/// <param name="subscribe"></param>
private void ChangeSubscription(bool subscribe)
{
//CameraShaker type.
if (base.ShakerType == ShakerTypes.CameraShaker)
{
if (subscribe)
CameraShakerHandler.OnAllShakeFixedUpdate += CameraShakerHandler_OnShakeFixedUpdate;
else
CameraShakerHandler.OnAllShakeFixedUpdate -= CameraShakerHandler_OnShakeFixedUpdate;
}
//ObjectShaker type.
else if (base.ShakerType == ShakerTypes.ObjectShaker)
{
if (_objectShaker != null)
{
if (subscribe)
_objectShaker.OnShakeFixedUpdate += ObjectShaker_OnShakeFixedUpdate;
else
_objectShaker.OnShakeFixedUpdate -= ObjectShaker_OnShakeFixedUpdate;
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 5901f943dff13b94693d37f9edb0beb8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Shakables/ShakableRigidbody.cs
uploadId: 376379

View File

@@ -0,0 +1,362 @@
using FirstGearGames.Utilities.Maths;
using FirstGearGames.Utilities.Objects;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakableRigidbody2D : ShakableBase
{
#region Types.
/// <summary>
/// Data about how to update rigidbodies with shakes.
/// </summary>
private class RigidbodyData
{
public RigidbodyData(Rigidbody2D rb)
{
Rigidbody = rb;
}
/// <summary>
/// Rigidbody on this object.
/// </summary>
public readonly Rigidbody2D Rigidbody;
/// <summary>
/// Direction to multiply position by at random intervals.
/// </summary>
public float RandomPositionMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomPositionMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomPositionMultiplier(float value)
{
RandomPositionMultiplier = value;
}
/// <summary>
/// Direction to multiply rotation by at random intervals.
/// </summary>
public float RandomRotationMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomRotationMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomRotationMultiplier(float value)
{
RandomRotationMultiplier = value;
}
/// <summary>
/// Next time to update randomMultipliers.
/// </summary>
public float NextRandomizeTime { get; private set; } = -1f;
/// <summary>
/// Sets the value for NextRandomizeTime.
/// </summary>
/// <param name="value"></param>
public void SetNextRandomizeTime(float value)
{
NextRandomizeTime = value;
}
/// <summary>
/// Positional values last time shake offsets were received.
/// </summary>
public Vector2 LastPositional { get; private set; } = Vector2.zero;
/// <summary>
/// Sets the value for LastPositional.
/// </summary>
/// <param name="value"></param>
public void SetLastPositional(Vector2 value)
{
LastPositional = value;
}
/// <summary>
/// Rotational values last time shake offsets were received.
/// </summary>
public float LastRotational { get; private set; } = 0f;
/// <summary>
/// Sets the value for LastRotational.
/// </summary>
/// <param name="value"></param>
public void SetLastRotational(float value)
{
LastRotational = value;
}
}
#endregion
#region Serialized.
/// <summary>
/// Multiplier to apply towards position.
/// </summary>
[Tooltip("Multiplier to apply towards position.")]
[Space(10f)]
[SerializeField]
[FormerlySerializedAs("_positionMultiplier")]
private float _positionalMultiplier = 1f;
/// <summary>
/// Multipplier to apply towards rotation.
/// </summary>
[Tooltip("Multipplier to apply towards rotation.")]
[SerializeField]
[FormerlySerializedAs("_rotationMultiplier")]
private float _rotationalMultiplier = 1f;
/// <summary>
/// Only shake when in view of a camera.
/// </summary>
[Tooltip("Only shake when in view of a camera.")]
[Space(10f)]
[SerializeField]
private bool _requireInView = true;
/// <summary>
/// True to find rigidbodies in children too. This allows you to use one ShakableRigidbody on the parent if all children rigidbodies should shake as well.
/// </summary>
[Tooltip("True to find rigidbodies in children too. This allows you to use one ShakableRigidbody on the parent if all children rigidbodies should shake as well.")]
[SerializeField]
private bool _includeChildren = false;
/// <summary>
/// True to ignore the transform this component resides, and only shake children.
/// </summary>
[Tooltip("True to ignore the transform this component resides, and only shake children.")]
[SerializeField]
private bool _ignoreSelf = false;
/// <summary>
/// True to also find inactive children.
/// </summary>
[Tooltip("True to also find inactive children.")]
[SerializeField]
private bool _includeInactive = false;
/// <summary>
/// True to convert forces to local space before applying.
/// </summary>
[Tooltip("True to convert forces to local space before applying.")]
[Space(10f)]
[SerializeField]
private bool _localizeShake = false;
/// <summary>
/// True to randomly change force direction. Best used with bulk objects so they do not all shake the same direction.
/// </summary>
[Tooltip("True to randomly change force direction. Best used with bulk objects so they do not all shake the same direction.")]
[SerializeField]
private bool _randomizeDirections = true;
#endregion
#region Private.
/// <summary>
/// Data about each rigidbody to shake.
/// </summary>
private RigidbodyData[] _rbData;
/// <summary>
/// True if currently in view.
/// </summary>
private bool _inView = false;
/// <summary>
/// ObjectShaker used for this object. May be null if not using ObjectShaker type.
/// </summary>
private ObjectShaker _objectShaker = null;
#endregion
private void Awake()
{
FirstInitialize();
}
private void OnEnable()
{
if (_requireInView && _inView)
ChangeSubscription(true);
else if (!_requireInView)
ChangeSubscription(true);
}
private void OnDisable()
{
if (_requireInView && _inView)
ChangeSubscription(false);
else if (!_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Initializes this script for use. Should only be completed once.
/// </summary>
private void FirstInitialize()
{
//If using ObjectShaker type.
if (base.ShakerType == ShakerTypes.ObjectShaker)
{
_objectShaker = GetComponentInParent<ObjectShaker>();
if (_objectShaker == null)
{
Debug.LogError("ObjectShaker could not be found on or above object " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
}
//If not including children.
if (!_includeChildren)
{
Rigidbody2D rb = GetComponent<Rigidbody2D>();
if (rb == null)
{
Debug.LogWarning("Rigidbody is empty on " + gameObject.name + ". Shakable will not function.", this);
DestroyImmediate(this);
return;
}
_rbData = new RigidbodyData[1];
_rbData[0] = new RigidbodyData(rb);
}
//Include children.
else
{
List<Rigidbody2D> rbs = new List<Rigidbody2D>();
Transforms.GetComponentsInChildren(transform, rbs, !_ignoreSelf, _includeInactive);
if (rbs.Count == 0)
{
Debug.LogWarning("No rigidbodies exist on parent or children of " + gameObject.name + ". Shakable will not function.", this);
DestroyImmediate(this);
return;
}
_rbData = new RigidbodyData[rbs.Count];
for (int i = 0; i < rbs.Count; i++)
_rbData[i] = new RigidbodyData(rbs[i]);
}
/* Try to find a renderer. One is required on this object for OnBecameVisible and OnBecameInvisible
* to call. If a renderer doesn't exist then add a low cost renderer. */
if (_requireInView)
{
if (GetComponent<Renderer>() == null)
{
if (Debug.isDebugBuild)
Debug.Log("Renderer not found on object. Adding renderer so RequireInView works properly. Added renderer may be smaller than actual object, and sometimes may not be detected as in view. To resolve add your own renderer to the object this script resides.", this);
SpriteRenderer r = gameObject.AddComponent<SpriteRenderer>();
r.sprite = null;
}
}
}
#region OnShakeUpdates.
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void CameraShakerHandler_OnShakeFixedUpdate(ShakeUpdate obj)
{
ShakeUpdateOccurred(obj);
}
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void ObjectShaker_OnShakeFixedUpdate(ObjectShaker arg1, ShakeUpdate arg2)
{
ShakeUpdateOccurred(arg2);
}
/// <summary>
/// Called when a shake update occurs, wether it be from CameraShaker or ObjectShaker.
/// </summary>
/// <param name="obj"></param>
private void ShakeUpdateOccurred(ShakeUpdate obj)
{
if (!_inView && _requireInView)
return;
for (int i = 0; i < _rbData.Length; i++)
{
#if UNITY_EDITOR
//Rigidbody can go null when exiting playmode, and camerashaker may try to send one last update when exiting play mode.
if (_rbData[i].Rigidbody == null)
return;
#endif
//Check if random multipliers should be updated.
CheckRandomizeRandomers(_rbData[i]);
//Calculate new offsets.
Vector2 newPos = obj.Objects.Position * _rbData[i].RandomPositionMultiplier * _positionalMultiplier;
float newRot = obj.Objects.Rotation.z * _rbData[i].RandomRotationMultiplier * _rotationalMultiplier;
//If to localize force.
if (_localizeShake)
newPos = _rbData[i].Rigidbody.transform.TransformDirection(newPos);
//Apply force.
_rbData[i].Rigidbody.AddForce(newPos - _rbData[i].LastPositional, ForceMode2D.Impulse);
_rbData[i].Rigidbody.AddTorque(newRot - _rbData[i].LastRotational, ForceMode2D.Impulse);
//Set last values.
_rbData[i].SetLastPositional(newPos);
_rbData[i].SetLastRotational(newRot);
}
}
#endregion
/// <summary>
/// Updates random multipliers if they are in need. What a fun name.
/// </summary>
private void CheckRandomizeRandomers(RigidbodyData data)
{
if (!_randomizeDirections)
return;
//Becomes true if enough time has passed to make new random multipliers.
bool newRandomize = (Time.time > data.NextRandomizeTime);
if (newRandomize)
data.SetNextRandomizeTime(Time.time + Random.Range(3f, 7f));
/* If new random multipliers or velocity is zero then randomize multipliers. */
if (newRandomize || data.Rigidbody.linearVelocity == Vector2.zero)
data.SetRandomPositionMultiplier(Floats.RandomlyFlip(data.RandomPositionMultiplier));
if (newRandomize || data.Rigidbody.angularVelocity == 0f)
data.SetRandomRotationMultiplier(Floats.RandomlyFlip(data.RandomRotationMultiplier));
}
/// <summary>
/// Received when visible in any camera.
/// </summary>
private void OnBecameVisible()
{
_inView = true;
if (_requireInView)
ChangeSubscription(true);
}
/// <summary>
/// Received when no longer visible in any camera.
/// </summary>
private void OnBecameInvisible()
{
_inView = false;
if (_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Changes the subscription to the camera shaker.
/// </summary>
/// <param name="subscribe"></param>
private void ChangeSubscription(bool subscribe)
{
//CameraShaker type.
if (base.ShakerType == ShakerTypes.CameraShaker)
{
if (subscribe)
CameraShakerHandler.OnAllShakeFixedUpdate += CameraShakerHandler_OnShakeFixedUpdate;
else
CameraShakerHandler.OnAllShakeFixedUpdate -= CameraShakerHandler_OnShakeFixedUpdate;
}
//ObjectShaker type.
else if (base.ShakerType == ShakerTypes.ObjectShaker)
{
if (_objectShaker != null)
{
if (subscribe)
_objectShaker.OnShakeFixedUpdate += ObjectShaker_OnShakeFixedUpdate;
else
_objectShaker.OnShakeFixedUpdate -= ObjectShaker_OnShakeFixedUpdate;
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 58b3fda749163f142b26ea94be1da637
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Shakables/ShakableRigidbody2D.cs
uploadId: 376379

View File

@@ -0,0 +1,391 @@
using FirstGearGames.Utilities.Maths;
using FirstGearGames.Utilities.Objects;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace FirstGearGames.SmoothCameraShaker
{
public class ShakableTransform : ShakableBase
{
#region Types.
/// <summary>
/// Data about how to update rigidbodies with shakes.
/// </summary>
private class TransformData
{
public TransformData(Transform t)
{
Transform = t;
}
/// <summary>
/// Transform on this object.
/// </summary>
public readonly Transform Transform;
/// <summary>
/// Direction to multiply position by when shaking starts.
/// </summary>
public float RandomPositionMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomPositionMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomPositionMultiplier(float value)
{
RandomPositionMultiplier = value;
}
/// <summary>
/// Direction to multiply rotation by when shaking starts.
/// </summary>
public float RandomRotationMultiplier { get; private set; } = 1f;
/// <summary>
/// Sets the value for RandomRotationMultiplier.
/// </summary>
/// <param name="value"></param>
public void SetRandomRotationMultiplier(float value)
{
RandomRotationMultiplier = value;
}
/// <summary>
/// Positional values last time shake offsets were received.
/// </summary>
public Vector3 LastPositional { get; private set; } = Vector3.zero;
/// <summary>
/// Sets the value for LastPositional.
/// </summary>
/// <param name="value"></param>
public void SetLastPositional(Vector3 value)
{
LastPositional = value;
}
/// <summary>
/// Rotational values last time shake offsets were received.
/// </summary>
public Vector3 LastRotational { get; private set; } = Vector3.zero;
/// <summary>
/// Sets the value for LastRotational.
/// </summary>
/// <param name="value"></param>
public void SetLastRotational(Vector3 value)
{
LastRotational = value;
}
}
#endregion
#region Serialized.
/// <summary>
/// Multiplier to apply towards position.
/// </summary>
[Tooltip("Multiplier to apply towards position.")]
[Space(10f)]
[SerializeField]
private float _positionalMultiplier = 1f;
/// <summary>
/// Multipplier to apply towards rotation.
/// </summary>
[Tooltip("Multipplier to apply towards rotation.")]
[SerializeField]
[FormerlySerializedAs("_rotationMultiplier")]
private float _rotationalMultiplier = 1f;
/// <summary>
/// Only shake when in view of a camera.
/// </summary>
[Tooltip("Only shake when in view of a camera.")]
[Space(10f)]
[SerializeField]
private bool _requireInView = true;
/// <summary>
/// True to find transforms in children too. This allows you to use one ShakableTransform on the parent if all children transforms should shake as well.
/// </summary>
[Tooltip("True to find transforms in children too. This allows you to use one ShakableTransform on the parent if all children transforms should shake as well.")]
[SerializeField]
private bool _includeChildren = false;
/// <summary>
/// True to ignore the transform this component resides, and only shake children.
/// </summary>
[Tooltip("True to ignore the transform this component resides, and only shake children.")]
[SerializeField]
private bool _ignoreSelf = false;
/// <summary>
/// True to also find inactive children.
/// </summary>
[Tooltip("True to also find inactive children.")]
[SerializeField]
private bool _includeInactive = false;
/// <summary>
/// True to convert forces to influence space before applying.
/// </summary>
[Tooltip("True to convert influence to local space before applying.")]
[Space(10f)]
[SerializeField]
private bool _localizeShake = false;
/// <summary>
/// True to randomly change influence direction. Best used with bulk objects so they do not all shake the same direction.
/// </summary>
[Tooltip("True to randomly change influence direction. Best used with bulk objects so they do not all shake the same direction.")]
[SerializeField]
private bool _randomizeDirections = true;
#endregion
#region Private.
/// <summary>
/// Data about each rigidbody to shake.
/// </summary>
private TransformData[] _tData;
/// <summary>
/// True if currently in view.
/// </summary>
private bool _inView = false;
/// <summary>
/// ObjectShaker used for this object. May be null if not using ObjectShaker type.
/// </summary>
private ObjectShaker _objectShaker = null;
#endregion
protected virtual void Awake()
{
FirstInitialize();
}
protected virtual void OnEnable()
{
if (_requireInView && _inView)
ChangeSubscription(true);
else if (!_requireInView)
ChangeSubscription(true);
}
protected virtual void OnDisable()
{
if (_requireInView && _inView)
ChangeSubscription(false);
else if (!_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Initializes this script for use. Should only be completed once.
/// </summary>
private void FirstInitialize()
{
//If using ObjectShaker type.
if (base.ShakerType == ShakerTypes.ObjectShaker)
{
_objectShaker = GetComponentInParent<ObjectShaker>();
if (_objectShaker == null)
{
Debug.LogError("ObjectShaker could not be found on or above object " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
}
//If not including children.
if (!_includeChildren)
{
Transform t = transform;
if (t == null)
{
Debug.LogWarning("Transform is empty on " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
_tData = new TransformData[1];
_tData[0] = new TransformData(t);
}
//Include children.
else
{
List<Transform> ts = new List<Transform>();
Transforms.GetComponentsInChildren(transform, ts, !_ignoreSelf,_includeInactive);
if (ts.Count == 0)
{
Debug.LogWarning("No transforms exist on parent or children of " + gameObject.name + ". Shakable will be destroyed.", this);
DestroyImmediate(this);
return;
}
_tData = new TransformData[ts.Count];
for (int i = 0; i < ts.Count; i++)
_tData[i] = new TransformData(ts[i]);
}
/* Try to find a renderer. One is required on this object for OnBecameVisible and OnBecameInvisible
* to call. If a renderer doesn't exist then add a low cost renderer. */
if (_requireInView)
{
if (GetComponent<Renderer>() == null)
{
if (Debug.isDebugBuild)
Debug.Log("Renderer not found on object. Adding renderer so RequireInView works properly. Added renderer may be smaller than actual object, and sometimes may not be detected as in view. To resolve add your own renderer to the object this script resides.", this);
SpriteRenderer r = gameObject.AddComponent<SpriteRenderer>();
r.sprite = null;
}
}
}
#region OnShakeUpdate.
/// <summary>
/// Received when shaking starts when previously stopped on all Shakers.
/// </summary>
private void CameraShakerHandler_OnAllShakingStarted()
{
RandomizeDirections();
}
/// <summary>
/// Received when shaking starts when previously stopped on all Shakers.
/// </summary>
/// <param name="obj"></param>
private void ObjectShaker_OnShakingStarted(ObjectShaker obj)
{
RandomizeDirections();
}
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void CameraShakerHandler_OnShakeUpdate(ShakeUpdate obj)
{
ShakeUpdateOccurred(obj);
}
/// <summary>
/// Received every fixed update a shake occurs. Contains the shake values from last update.
/// </summary>
private void ObjectShaker_OnShakeUpdate(ObjectShaker arg1, ShakeUpdate arg2)
{
ShakeUpdateOccurred(arg2);
}
/// <summary>
/// Called when a shake update occurs, wether it be from CameraShaker or ObjectShaker.
/// </summary>
/// <param name="obj"></param>
private void ShakeUpdateOccurred(ShakeUpdate obj)
{
if (!_inView && _requireInView)
return;
for (int i = 0; i < _tData.Length; i++)
{
#if UNITY_EDITOR
//Transform can go null when exiting playmode, and shaker may try to send one last update when exiting play mode.
if (_tData[i].Transform == null)
return;
#endif
//Calculate new offsets.
Vector3 newPos = obj.Objects.Position * _tData[i].RandomPositionMultiplier * _positionalMultiplier;
Vector3 newRot = obj.Objects.Rotation * _tData[i].RandomRotationMultiplier * _rotationalMultiplier;
//If to localize force.
if (_localizeShake)
{
newPos = _tData[i].Transform.transform.TransformDirection(newPos);
newRot = _tData[i].Transform.transform.TransformDirection(newRot);
}
//Apply changes.
_tData[i].Transform.localPosition += (newPos - _tData[i].LastPositional);
_tData[i].Transform.localEulerAngles += (newRot - _tData[i].LastRotational);
//Set last values.
_tData[i].SetLastPositional(newPos);
_tData[i].SetLastRotational(newRot);
}
}
#endregion
/// <summary>
/// Updates random multipliers for all transform datas.
/// </summary>
private void RandomizeDirections()
{
if (!_randomizeDirections)
return;
for (int i = 0; i < _tData.Length; i++)
RandomizeDirections(_tData[i]);
}
/// <summary>
/// Updates random multipliers for data.
/// </summary>
private void RandomizeDirections(TransformData data)
{
if (!_randomizeDirections)
return;
data.SetRandomPositionMultiplier(Floats.RandomlyFlip(data.RandomPositionMultiplier));
data.SetRandomRotationMultiplier(Floats.RandomlyFlip(data.RandomRotationMultiplier));
}
/// <summary>
/// Received when visible in any camera.
/// </summary>
protected virtual void OnBecameVisible()
{
_inView = true;
if (_requireInView)
ChangeSubscription(true);
}
/// <summary>
/// Received when no longer visible in any camera.
/// </summary>
protected virtual void OnBecameInvisible()
{
_inView = false;
if (_requireInView)
ChangeSubscription(false);
}
/// <summary>
/// Changes the subscription to the camera shaker.
/// </summary>
/// <param name="subscribe"></param>
private void ChangeSubscription(bool subscribe)
{
/* Must subscribe to starting so that random directions
* can be reset before a shake begins. */
//CameraShaker type.
if (base.ShakerType == ShakerTypes.CameraShaker)
{
if (subscribe)
{
CameraShakerHandler.OnAllShakeUpdate += CameraShakerHandler_OnShakeUpdate;
CameraShakerHandler.OnAllShakingStarted += CameraShakerHandler_OnAllShakingStarted;
}
else
{
CameraShakerHandler.OnAllShakeUpdate -= CameraShakerHandler_OnShakeUpdate;
CameraShakerHandler.OnAllShakingStarted -= CameraShakerHandler_OnAllShakingStarted;
}
}
//ObjectShaker type.
else if (base.ShakerType == ShakerTypes.ObjectShaker)
{
if (_objectShaker != null)
{
if (subscribe)
{
_objectShaker.OnShakeUpdate += ObjectShaker_OnShakeUpdate;
_objectShaker.OnShakingStarted += ObjectShaker_OnShakingStarted;
/* If already shaking then randomize directions.
* This can occur when ObjectShaker has a ShakeOnEnable
* shake and is active before this shakable. */
if (_objectShaker.Shaking)
RandomizeDirections();
}
else
{
_objectShaker.OnShakeUpdate -= ObjectShaker_OnShakeUpdate;
_objectShaker.OnShakingStarted -= ObjectShaker_OnShakingStarted;
}
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: d9d4107aad3b3544da23b3f86c3f2d0f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 162991
packageName: Smooth Camera Shaker
packageVersion: 2.12
assetPath: Assets/FirstGearGames/SmoothCameraShaker/Scripts/Shakables/ShakableTransform.cs
uploadId: 376379

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