adding raycast and collectable

This commit is contained in:
Sc0rch-thinks 2024-06-06 16:55:22 +08:00
parent c4cbc95baf
commit ace9c88f6b
385 changed files with 50120 additions and 370 deletions

8
Assets/Materials.meta Normal file
View file

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

View file

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Coin texture
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &955943907802631756
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View file

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

View file

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

Binary file not shown.

View file

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 67b68f74a1a4d3f44b82c304d44d5628
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
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
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: 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: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 0
- serializedVersion: 3
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: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View file

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 503399222104bb74c96a2197fb7a88fa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
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
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: 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: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 0
- serializedVersion: 3
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: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View file

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 9327407c4184fb64d88c56d9d5fb08c0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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: 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: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 0
- serializedVersion: 3
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: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Models.meta Normal file
View file

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

BIN
Assets/Models/coin.fbx (Stored with Git LFS) Normal file

Binary file not shown.

109
Assets/Models/coin.fbx.meta Normal file
View file

@ -0,0 +1,109 @@
fileFormatVersion: 2
guid: bec4fb3eeeec468409c50209607cfe9d
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 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: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 1
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 1
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Prefabs.meta Normal file
View file

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

View file

@ -0,0 +1,90 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &1758879427888383751
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalScale.x
value: 48.132496
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalScale.y
value: 2.9672554
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalScale.z
value: 48.132496
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.87
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.89
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 1e3816aef6fdbf64294a66a9f0b64c69, type: 2}
- target: {fileID: 919132149155446097, guid: bec4fb3eeeec468409c50209607cfe9d,
type: 3}
propertyPath: m_Name
value: coin
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bec4fb3eeeec468409c50209607cfe9d, type: 3}

View file

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

File diff suppressed because it is too large Load diff

8
Assets/Scripts.meta Normal file
View file

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

View file

@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Interactable : MonoBehaviour
{
public virtual void Interact()
{
Destroy(gameObject);
}
}

View file

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

View file

@ -0,0 +1,50 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Raycasting : MonoBehaviour
{
[SerializeField]
Transform playerCamera;
[SerializeField]
int seeDistance;
Interactable curretInteractable;
void Update()
{
bool Raycast = Physics.Raycast(
playerCamera.position,
playerCamera.TransformDirection(Vector3.forward),
out RaycastHit hitInfo,
seeDistance
);
Debug.DrawRay(
playerCamera.position,
playerCamera.TransformDirection(Vector3.forward) * seeDistance,
Color.green
);
if (Raycast)
{
Debug.Log(hitInfo.transform.name);
if (hitInfo.transform.TryGetComponent<Interactable>(out curretInteractable)) { }
else
{
curretInteractable = null;
}
}
else
{
curretInteractable = null;
}
}
void OnInteract()
{
if(curretInteractable!=null)
{
curretInteractable.Interact();
}
}
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,154 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
using Cinemachine;
namespace StarterAssets
{
// This class needs to be a scriptable object to support dynamic determination of StarterAssets install path
public partial class StarterAssetsDeployMenu : ScriptableObject
{
public const string MenuRoot = "Tools/Starter Assets";
// prefab names
private const string MainCameraPrefabName = "MainCamera";
private const string PlayerCapsulePrefabName = "PlayerCapsule";
// names in hierarchy
private const string CinemachineVirtualCameraName = "PlayerFollowCamera";
// tags
private const string PlayerTag = "Player";
private const string MainCameraTag = "MainCamera";
private const string CinemachineTargetTag = "CinemachineTarget";
private static GameObject _cinemachineVirtualCamera;
private static void CheckCameras(Transform targetParent, string prefabFolder)
{
CheckMainCamera(prefabFolder);
GameObject vcam = GameObject.Find(CinemachineVirtualCameraName);
if (!vcam)
{
if (TryLocatePrefab(CinemachineVirtualCameraName, new string[]{prefabFolder}, new[] { typeof(CinemachineVirtualCamera) }, out GameObject vcamPrefab, out string _))
{
HandleInstantiatingPrefab(vcamPrefab, out vcam);
_cinemachineVirtualCamera = vcam;
}
else
{
Debug.LogError("Couldn't find Cinemachine Virtual Camera prefab");
}
}
else
{
_cinemachineVirtualCamera = vcam;
}
GameObject[] targets = GameObject.FindGameObjectsWithTag(CinemachineTargetTag);
GameObject target = targets.FirstOrDefault(t => t.transform.IsChildOf(targetParent));
if (target == null)
{
target = new GameObject("PlayerCameraRoot");
target.transform.SetParent(targetParent);
target.transform.localPosition = new Vector3(0f, 1.375f, 0f);
target.tag = CinemachineTargetTag;
Undo.RegisterCreatedObjectUndo(target, "Created new cinemachine target");
}
CheckVirtualCameraFollowReference(target, _cinemachineVirtualCamera);
}
private static void CheckMainCamera(string inFolder)
{
GameObject[] mainCameras = GameObject.FindGameObjectsWithTag(MainCameraTag);
if (mainCameras.Length < 1)
{
// if there are no MainCameras, add one
if (TryLocatePrefab(MainCameraPrefabName, new string[]{inFolder}, new[] { typeof(CinemachineBrain), typeof(Camera) }, out GameObject camera, out string _))
{
HandleInstantiatingPrefab(camera, out _);
}
else
{
Debug.LogError("Couldn't find Starter Assets Main Camera prefab");
}
}
else
{
// make sure the found camera has a cinemachine brain (we only need 1)
if (!mainCameras[0].TryGetComponent(out CinemachineBrain cinemachineBrain))
mainCameras[0].AddComponent<CinemachineBrain>();
}
}
private static void CheckVirtualCameraFollowReference(GameObject target,
GameObject cinemachineVirtualCamera)
{
var serializedObject =
new SerializedObject(cinemachineVirtualCamera.GetComponent<CinemachineVirtualCamera>());
var serializedProperty = serializedObject.FindProperty("m_Follow");
serializedProperty.objectReferenceValue = target.transform;
serializedObject.ApplyModifiedProperties();
}
private static bool TryLocatePrefab(string name, string[] inFolders, System.Type[] requiredComponentTypes, out GameObject prefab, out string path)
{
// Locate the player armature
string[] allPrefabs = AssetDatabase.FindAssets("t:Prefab", inFolders);
for (int i = 0; i < allPrefabs.Length; ++i)
{
string assetPath = AssetDatabase.GUIDToAssetPath(allPrefabs[i]);
if (assetPath.Contains("/com.unity.starter-assets/"))
{
Object loadedObj = AssetDatabase.LoadMainAssetAtPath(assetPath);
if (PrefabUtility.GetPrefabAssetType(loadedObj) != PrefabAssetType.NotAPrefab &&
PrefabUtility.GetPrefabAssetType(loadedObj) != PrefabAssetType.MissingAsset)
{
GameObject loadedGo = loadedObj as GameObject;
bool hasRequiredComponents = true;
foreach (var componentType in requiredComponentTypes)
{
if (!loadedGo.TryGetComponent(componentType, out _))
{
hasRequiredComponents = false;
break;
}
}
if (hasRequiredComponents)
{
if (loadedGo.name == name)
{
prefab = loadedGo;
path = assetPath;
return true;
}
}
}
}
}
prefab = null;
path = null;
return false;
}
private static void HandleInstantiatingPrefab(GameObject prefab, out GameObject prefabInstance)
{
prefabInstance = (GameObject)PrefabUtility.InstantiatePrefab(prefab);
Undo.RegisterCreatedObjectUndo(prefabInstance, "Instantiate Starter Asset Prefab");
prefabInstance.transform.localPosition = Vector3.zero;
prefabInstance.transform.localEulerAngles = Vector3.zero;
prefabInstance.transform.localScale = Vector3.one;
}
}
}

View file

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

View file

@ -0,0 +1,102 @@
using System.IO;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
namespace StarterAssets
{
public partial class StarterAssetsDeployMenu : ScriptableObject
{
// prefab paths
private const string PlayerArmaturePrefabName = "PlayerArmature";
/// <summary>
/// Check the Armature, main camera, cinemachine virtual camera, camera target and references
/// </summary>
[MenuItem(MenuRoot + "/Reset Third Person Controller Armature", false)]
static void ResetThirdPersonControllerArmature()
{
var thirdPersonControllers = FindObjectsOfType<ThirdPersonController>();
var player = thirdPersonControllers.FirstOrDefault(controller =>
controller.GetComponent<Animator>() && controller.CompareTag(PlayerTag));
GameObject playerGameObject = null;
// player
if (player == null)
{
if (TryLocatePrefab(PlayerArmaturePrefabName, null, new[] { typeof(ThirdPersonController), typeof(StarterAssetsInputs) }, out GameObject prefab, out string _))
{
HandleInstantiatingPrefab(prefab, out playerGameObject);
}
else
{
Debug.LogError("Couldn't find player armature prefab");
}
}
else
{
playerGameObject = player.gameObject;
}
if (playerGameObject != null)
{
// cameras
CheckCameras(playerGameObject.transform, GetThirdPersonPrefabPath());
}
}
[MenuItem(MenuRoot + "/Reset Third Person Controller Capsule", false)]
static void ResetThirdPersonControllerCapsule()
{
var thirdPersonControllers = FindObjectsOfType<ThirdPersonController>();
var player = thirdPersonControllers.FirstOrDefault(controller =>
!controller.GetComponent<Animator>() && controller.CompareTag(PlayerTag));
GameObject playerGameObject = null;
// player
if (player == null)
{
if (TryLocatePrefab(PlayerCapsulePrefabName, null, new[] { typeof(ThirdPersonController), typeof(StarterAssetsInputs) }, out GameObject prefab, out string _))
{
HandleInstantiatingPrefab(prefab, out playerGameObject);
}
else
{
Debug.LogError("Couldn't find player capsule prefab");
}
}
else
{
playerGameObject = player.gameObject;
}
if (playerGameObject != null)
{
// cameras
CheckCameras(playerGameObject.transform, GetThirdPersonPrefabPath());
}
}
static string GetThirdPersonPrefabPath()
{
if (TryLocatePrefab(PlayerArmaturePrefabName, null, new[] { typeof(ThirdPersonController), typeof(StarterAssetsInputs) }, out GameObject _, out string prefabPath))
{
var pathString = new StringBuilder();
var currentDirectory = new FileInfo(prefabPath).Directory;
while (currentDirectory.Name != "Packages")
{
pathString.Insert(0, $"/{currentDirectory.Name}");
currentDirectory = currentDirectory.Parent;
}
pathString.Insert(0, currentDirectory.Name);
return pathString.ToString();
}
return null;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b70f45aa92a641feb261c5d55ce46edf
timeCreated: 1621532436

View file

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

View file

@ -0,0 +1,24 @@
{
"name": "URPWizard",
"rootNamespace": "",
"references": [
"Unity.RenderPipelines.Universal.Runtime"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.render-pipelines.universal",
"expression": "",
"define": "USE_URP"
}
],
"noEngineReferences": false
}

View file

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

View file

@ -0,0 +1,71 @@
using System.Linq;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEngine;
using UnityEngine.Rendering;
#if USE_URP
using UnityEngine.Rendering.Universal;
#endif
public class URPWizard : EditorWindow
{
[InitializeOnLoadMethod]
static void OnInitialize()
{
URPCheck();
}
static void URPCheck()
{
if (GraphicsSettings.currentRenderPipeline != null)
return;
var request = Client.List();
while (!request.IsCompleted) { }
if (request.Status != StatusCode.Success)
return;
if (request.Result.All(info => info.name != "com.unity.render-pipelines.universal"))
{
var addRequest = Client.Add("com.unity.render-pipelines.universal");
while (!addRequest.IsCompleted) { }
Client.Resolve();
}
else
{
FindAndAssignPipeline();
}
}
#if USE_URP
static void FindAndAssignPipeline()
{
var existingPipelines = AssetDatabase.FindAssets("t:UniversalRenderPipelineAsset");
if (existingPipelines.Length == 0)
{
return;
}
var pipeline = AssetDatabase.LoadAssetAtPath<UniversalRenderPipelineAsset>(AssetDatabase.GUIDToAssetPath(existingPipelines[0]));
GraphicsSettings.defaultRenderPipeline = pipeline;
}
class PipelineAssetProcessor : AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload)
{
//if we have no pipeline set, we try to find one as one may have been imported
if (GraphicsSettings.currentRenderPipeline != null)
return;
FindAndAssignPipeline();
}
}
#else
static void FindAndAssignPipeline(){}
#endif
}

View file

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

View file

@ -0,0 +1,19 @@
{
"name": "Unity.StarterAssets.Editor",
"rootNamespace": "",
"references": [
"Unity.StarterAssets",
"Cinemachine"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,35 @@
using UnityEngine;
public class BasicRigidBodyPush : MonoBehaviour
{
public LayerMask pushLayers;
public bool canPush;
[Range(0.5f, 5f)] public float strength = 1.1f;
private void OnControllerColliderHit(ControllerColliderHit hit)
{
if (canPush) PushRigidBodies(hit);
}
private void PushRigidBodies(ControllerColliderHit hit)
{
// https://docs.unity3d.com/ScriptReference/CharacterController.OnControllerColliderHit.html
// make sure we hit a non kinematic rigidbody
Rigidbody body = hit.collider.attachedRigidbody;
if (body == null || body.isKinematic) return;
// make sure we only push desired layer(s)
var bodyLayerMask = 1 << body.gameObject.layer;
if ((bodyLayerMask & pushLayers.value) == 0) return;
// We dont want to push objects below us
if (hit.moveDirection.y < -0.3f) return;
// Calculate push direction from move direction, horizontal motion only
Vector3 pushDir = new Vector3(hit.moveDirection.x, 0.0f, hit.moveDirection.z);
// Apply the push and take strength into account
body.AddForce(pushDir * strength, ForceMode.Impulse);
}
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,174 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9005220659476430823
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9005220659476430818}
- component: {fileID: 9005220659476430821}
- component: {fileID: 9005220659476430820}
- component: {fileID: 9018249871969862650}
- component: {fileID: 6649558419134552556}
m_Layer: 0
m_Name: MainCamera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9005220659476430818
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005220659476430823}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.20000005, y: 1.375, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &9005220659476430821
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005220659476430823}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.972549, g: 0.95686275, b: 0.92941177, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.2
far clip plane: 5000
field of view: 40
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!81 &9005220659476430820
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005220659476430823}
m_Enabled: 1
--- !u!114 &9018249871969862650
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005220659476430823}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowDebugText: 0
m_ShowCameraFrustum: 1
m_IgnoreTimeScale: 0
m_WorldUpOverride: {fileID: 0}
m_UpdateMethod: 2
m_BlendUpdateMethod: 1
m_DefaultBlend:
m_Style: 1
m_Time: 2
m_CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_CustomBlends: {fileID: 0}
m_CameraCutEvent:
m_PersistentCalls:
m_Calls: []
m_CameraActivatedEvent:
m_PersistentCalls:
m_Calls: []
--- !u!114 &6649558419134552556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9005220659476430823}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
m_TaaSettings:
quality: 3
frameInfluence: 0.1
jitterScale: 1
mipBias: 0
varianceClampScale: 0.9
contrastAdaptiveSharpening: 0

View file

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

View file

@ -0,0 +1,394 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7094977340588366727
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6556307555316582679}
m_Layer: 0
m_Name: NestedParent_Unpack
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6556307555316582679
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7094977340588366727}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 22.210217, y: -8.786317, z: 23.948788}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5126527961139664760}
- {fileID: 2862278905927072855}
- {fileID: 937451010987979973}
- {fileID: 6116018315020930700}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &4253012990495331769
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6556307555316582679}
m_Modifications:
- target: {fileID: 1992104595683069851, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_Name
value: UI_EventSystem
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f0271df749728104eac22c3d897fd8ce, type: 3}
--- !u!4 &6116018315020930700 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8063073397250431797, guid: f0271df749728104eac22c3d897fd8ce,
type: 3}
m_PrefabInstance: {fileID: 4253012990495331769}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4313866245218740378
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6556307555316582679}
m_Modifications:
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.375
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430821, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: far clip plane
value: 500
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430821, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: orthographic size
value: 10
objectReference: {fileID: 0}
- target: {fileID: 9005220659476430823, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
propertyPath: m_Name
value: MainCamera
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2d3a85ecde41a8246a79669975912b74, type: 3}
--- !u!4 &5126527961139664760 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9005220659476430818, guid: 2d3a85ecde41a8246a79669975912b74,
type: 3}
m_PrefabInstance: {fileID: 4313866245218740378}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6782772647021209901
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6556307555316582679}
m_Modifications:
- target: {fileID: 8762286023885395077, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_Name
value: PlayerFollowCamera
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.375
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8762286023885395323, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 5242107653240477475}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9c489a8547f4d9e4387da15a4ff82c81, type: 3}
--- !u!4 &2862278905927072855 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8762286023885395322, guid: 9c489a8547f4d9e4387da15a4ff82c81,
type: 3}
m_PrefabInstance: {fileID: 6782772647021209901}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8204767106804910123
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6556307555316582679}
m_Modifications:
- target: {fileID: 5393215578589016655, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 6b911390c5825014e8377183a7837d3f, type: 2}
- target: {fileID: 8616685848737228372, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_Name
value: PlayerCapsule
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c5efc39a8aaf6e64ea40e9ad573e9b47, type: 3}
--- !u!4 &937451010987979973 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8997996947095583982, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
m_PrefabInstance: {fileID: 8204767106804910123}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5242107653240477475 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4135013735270702856, guid: c5efc39a8aaf6e64ea40e9ad573e9b47,
type: 3}
m_PrefabInstance: {fileID: 8204767106804910123}
m_PrefabAsset: {fileID: 0}

View file

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

View file

@ -0,0 +1,367 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4135013735270702863
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4135013735270702856}
m_Layer: 0
m_Name: PlayerCameraRoot
m_TagString: CinemachineTarget
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4135013735270702856
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4135013735270702863}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1.375, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8997996947095583982}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5393215578589016642
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5393215578589016641}
- component: {fileID: 5393215578589016654}
- component: {fileID: 5393215578589016655}
- component: {fileID: 5393215578589016640}
m_Layer: 8
m_Name: Capsule
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5393215578589016641
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393215578589016642}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8997996947095583982}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &5393215578589016654
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393215578589016642}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5393215578589016655
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393215578589016642}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6b911390c5825014e8377183a7837d3f, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
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
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &5393215578589016640
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393215578589016642}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8616685848737228372
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8997996947095583982}
- component: {fileID: 8616685848737228382}
- component: {fileID: 8616685848737228371}
- component: {fileID: 1978471637655604388}
- component: {fileID: 5420857361349278248}
- component: {fileID: 8616685848737228376}
m_Layer: 8
m_Name: PlayerCapsule
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8997996947095583982
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4135013735270702856}
- {fileID: 5393215578589016641}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!143 &8616685848737228382
CharacterController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Height: 2
m_Radius: 0.5
m_SlopeLimit: 45
m_StepOffset: 0.25
m_SkinWidth: 0.02
m_MinMoveDistance: 0
m_Center: {x: 0, y: 0.93, z: 0}
--- !u!114 &8616685848737228371
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 55919ac34a26952479f3fc91f777b2fa, type: 3}
m_Name:
m_EditorClassIdentifier:
MoveSpeed: 4
SprintSpeed: 6
RotationSpeed: 1
SpeedChangeRate: 10
JumpHeight: 1.2
Gravity: -15
JumpTimeout: 0.1
FallTimeout: 0.15
Grounded: 1
GroundedOffset: -0.14
GroundedRadius: 0.5
GroundLayers:
serializedVersion: 2
m_Bits: 1
CinemachineCameraTarget: {fileID: 4135013735270702863}
TopClamp: 89
BottomClamp: -89
--- !u!114 &1978471637655604388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 909d917d73a63f940ac158d02e936645, type: 3}
m_Name:
m_EditorClassIdentifier:
pushLayers:
serializedVersion: 2
m_Bits: 0
canPush: 0
strength: 1.1
--- !u!114 &5420857361349278248
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e087ecce43ebbff45a1b360637807d93, type: 3}
m_Name:
m_EditorClassIdentifier:
move: {x: 0, y: 0}
look: {x: 0, y: 0}
jump: 0
sprint: 0
analogMovement: 0
cursorLocked: 1
cursorInputForLook: 1
--- !u!114 &8616685848737228376
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8616685848737228372}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: 4419d82f33d36e848b3ed5af4c8da37e, type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_ControlsChangedEvent:
m_PersistentCalls:
m_Calls: []
m_ActionEvents:
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: InputMove
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_ActionId: 6bc1aaf4-b110-4ff7-891e-5b9fe6f32c4d
m_ActionName: Player/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d,/Keyboard/upArrow,/Keyboard/downArrow,/Keyboard/leftArrow,/Keyboard/rightArrow,/XInputControllerWindows/leftStick]
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: InputLook
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_ActionId: 2690c379-f54d-45be-a724-414123833eb4
m_ActionName: Player/Look[/Mouse/delta,/XInputControllerWindows/rightStick]
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: InputJump
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_ActionId: 8c4abdf8-4099-493a-aa1a-129acec7c3df
m_ActionName: Player/Jump[/Keyboard/space,/XInputControllerWindows/buttonSouth]
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: InputSprint
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_ActionId: 980e881e-182c-404c-8cbf-3d09fdb48fef
m_ActionName: Player/Sprint[/Keyboard/leftShift,/XInputControllerWindows/leftTrigger]
- m_PersistentCalls:
m_Calls: []
m_ActionId: e4ce1614-c754-48c1-9103-33130441661f
m_ActionName: UI/New action
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: Player
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}

View file

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

View file

@ -0,0 +1,153 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8762286023885395077
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8762286023885395322}
- component: {fileID: 8762286023885395323}
m_Layer: 0
m_Name: PlayerFollowCamera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8762286023885395322
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286023885395077}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.20000005, y: 1.375, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8762286024517199038}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8762286023885395323
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286023885395077}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ExcludedPropertiesInInspector:
- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 0}
m_Follow: {fileID: 0}
m_Lens:
FieldOfView: 40
OrthographicSize: 10
NearClipPlane: 0.2
FarClipPlane: 500
Dutch: 0
LensShift: {x: 0, y: 0}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 8762286024517199038}
--- !u!1 &8762286024517199033
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8762286024517199038}
- component: {fileID: 8762286024517199039}
- component: {fileID: 8762286024517199035}
- component: {fileID: 8762286024517199034}
m_Layer: 0
m_Name: cm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8762286024517199038
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286024517199033}
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: 8762286023885395322}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8762286024517199039
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286024517199033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8762286024517199035
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286024517199033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 68bb026fafb42b14791938953eaace77, type: 3}
m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 1}
m_AmplitudeGain: 0.5
m_FrequencyGain: 0.3
mNoiseOffsets: {x: -451.37964, y: 684.7062, z: 648.0488}
--- !u!114 &8762286024517199034
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8762286024517199033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd6043bde05a7fc4cba197d06915c1e3, type: 3}
m_Name:
m_EditorClassIdentifier:
Damping: {x: 0, y: 0, z: 0}
ShoulderOffset: {x: 0, y: 0, z: 0}
VerticalArmLength: 0
CameraSide: 0.6
CameraDistance: 0
CameraCollisionFilter:
serializedVersion: 2
m_Bits: 1
IgnoreTag: Player
CameraRadius: 0.15

View file

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

View file

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

View file

@ -0,0 +1,268 @@
using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace StarterAssets
{
[RequireComponent(typeof(CharacterController))]
#if ENABLE_INPUT_SYSTEM
[RequireComponent(typeof(PlayerInput))]
#endif
public class FirstPersonController : MonoBehaviour
{
[Header("Player")]
[Tooltip("Move speed of the character in m/s")]
public float MoveSpeed = 4.0f;
[Tooltip("Sprint speed of the character in m/s")]
public float SprintSpeed = 6.0f;
[Tooltip("Rotation speed of the character")]
public float RotationSpeed = 1.0f;
[Tooltip("Acceleration and deceleration")]
public float SpeedChangeRate = 10.0f;
[Space(10)]
[Tooltip("The height the player can jump")]
public float JumpHeight = 1.2f;
[Tooltip("The character uses its own gravity value. The engine default is -9.81f")]
public float Gravity = -15.0f;
[Space(10)]
[Tooltip("Time required to pass before being able to jump again. Set to 0f to instantly jump again")]
public float JumpTimeout = 0.1f;
[Tooltip("Time required to pass before entering the fall state. Useful for walking down stairs")]
public float FallTimeout = 0.15f;
[Header("Player Grounded")]
[Tooltip("If the character is grounded or not. Not part of the CharacterController built in grounded check")]
public bool Grounded = true;
[Tooltip("Useful for rough ground")]
public float GroundedOffset = -0.14f;
[Tooltip("The radius of the grounded check. Should match the radius of the CharacterController")]
public float GroundedRadius = 0.5f;
[Tooltip("What layers the character uses as ground")]
public LayerMask GroundLayers;
[Header("Cinemachine")]
[Tooltip("The follow target set in the Cinemachine Virtual Camera that the camera will follow")]
public GameObject CinemachineCameraTarget;
[Tooltip("How far in degrees can you move the camera up")]
public float TopClamp = 90.0f;
[Tooltip("How far in degrees can you move the camera down")]
public float BottomClamp = -90.0f;
// cinemachine
private float _cinemachineTargetPitch;
// player
private float _speed;
private float _rotationVelocity;
private float _verticalVelocity;
private float _terminalVelocity = 53.0f;
// timeout deltatime
private float _jumpTimeoutDelta;
private float _fallTimeoutDelta;
#if ENABLE_INPUT_SYSTEM
private PlayerInput _playerInput;
#endif
private CharacterController _controller;
private StarterAssetsInputs _input;
private GameObject _mainCamera;
private const float _threshold = 0.01f;
private bool IsCurrentDeviceMouse
{
get
{
#if ENABLE_INPUT_SYSTEM
return _playerInput.currentControlScheme == "KeyboardMouse";
#else
return false;
#endif
}
}
private void Awake()
{
// get a reference to our main camera
if (_mainCamera == null)
{
_mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
}
}
private void Start()
{
_controller = GetComponent<CharacterController>();
_input = GetComponent<StarterAssetsInputs>();
#if ENABLE_INPUT_SYSTEM
_playerInput = GetComponent<PlayerInput>();
#else
Debug.LogError( "Starter Assets package is missing dependencies. Please use Tools/Starter Assets/Reinstall Dependencies to fix it");
#endif
// reset our timeouts on start
_jumpTimeoutDelta = JumpTimeout;
_fallTimeoutDelta = FallTimeout;
}
private void Update()
{
JumpAndGravity();
GroundedCheck();
Move();
}
private void LateUpdate()
{
CameraRotation();
}
private void GroundedCheck()
{
// set sphere position, with offset
Vector3 spherePosition = new Vector3(transform.position.x, transform.position.y - GroundedOffset, transform.position.z);
Grounded = Physics.CheckSphere(spherePosition, GroundedRadius, GroundLayers, QueryTriggerInteraction.Ignore);
}
private void CameraRotation()
{
// if there is an input
if (_input.look.sqrMagnitude >= _threshold)
{
//Don't multiply mouse input by Time.deltaTime
float deltaTimeMultiplier = IsCurrentDeviceMouse ? 1.0f : Time.deltaTime;
_cinemachineTargetPitch += _input.look.y * RotationSpeed * deltaTimeMultiplier;
_rotationVelocity = _input.look.x * RotationSpeed * deltaTimeMultiplier;
// clamp our pitch rotation
_cinemachineTargetPitch = ClampAngle(_cinemachineTargetPitch, BottomClamp, TopClamp);
// Update Cinemachine camera target pitch
CinemachineCameraTarget.transform.localRotation = Quaternion.Euler(_cinemachineTargetPitch, 0.0f, 0.0f);
// rotate the player left and right
transform.Rotate(Vector3.up * _rotationVelocity);
}
}
private void Move()
{
// set target speed based on move speed, sprint speed and if sprint is pressed
float targetSpeed = _input.sprint ? SprintSpeed : MoveSpeed;
// a simplistic acceleration and deceleration designed to be easy to remove, replace, or iterate upon
// note: Vector2's == operator uses approximation so is not floating point error prone, and is cheaper than magnitude
// if there is no input, set the target speed to 0
if (_input.move == Vector2.zero) targetSpeed = 0.0f;
// a reference to the players current horizontal velocity
float currentHorizontalSpeed = new Vector3(_controller.velocity.x, 0.0f, _controller.velocity.z).magnitude;
float speedOffset = 0.1f;
float inputMagnitude = _input.analogMovement ? _input.move.magnitude : 1f;
// accelerate or decelerate to target speed
if (currentHorizontalSpeed < targetSpeed - speedOffset || currentHorizontalSpeed > targetSpeed + speedOffset)
{
// creates curved result rather than a linear one giving a more organic speed change
// note T in Lerp is clamped, so we don't need to clamp our speed
_speed = Mathf.Lerp(currentHorizontalSpeed, targetSpeed * inputMagnitude, Time.deltaTime * SpeedChangeRate);
// round speed to 3 decimal places
_speed = Mathf.Round(_speed * 1000f) / 1000f;
}
else
{
_speed = targetSpeed;
}
// normalise input direction
Vector3 inputDirection = new Vector3(_input.move.x, 0.0f, _input.move.y).normalized;
// note: Vector2's != operator uses approximation so is not floating point error prone, and is cheaper than magnitude
// if there is a move input rotate player when the player is moving
if (_input.move != Vector2.zero)
{
// move
inputDirection = transform.right * _input.move.x + transform.forward * _input.move.y;
}
// move the player
_controller.Move(inputDirection.normalized * (_speed * Time.deltaTime) + new Vector3(0.0f, _verticalVelocity, 0.0f) * Time.deltaTime);
}
private void JumpAndGravity()
{
if (Grounded)
{
// reset the fall timeout timer
_fallTimeoutDelta = FallTimeout;
// stop our velocity dropping infinitely when grounded
if (_verticalVelocity < 0.0f)
{
_verticalVelocity = -2f;
}
// Jump
if (_input.jump && _jumpTimeoutDelta <= 0.0f)
{
// the square root of H * -2 * G = how much velocity needed to reach desired height
_verticalVelocity = Mathf.Sqrt(JumpHeight * -2f * Gravity);
}
// jump timeout
if (_jumpTimeoutDelta >= 0.0f)
{
_jumpTimeoutDelta -= Time.deltaTime;
}
}
else
{
// reset the jump timeout timer
_jumpTimeoutDelta = JumpTimeout;
// fall timeout
if (_fallTimeoutDelta >= 0.0f)
{
_fallTimeoutDelta -= Time.deltaTime;
}
// if we are not grounded, do not jump
_input.jump = false;
}
// apply gravity over time if under terminal (multiply by delta time twice to linearly speed up over time)
if (_verticalVelocity < _terminalVelocity)
{
_verticalVelocity += Gravity * Time.deltaTime;
}
}
private static float ClampAngle(float lfAngle, float lfMin, float lfMax)
{
if (lfAngle < -360f) lfAngle += 360f;
if (lfAngle > 360f) lfAngle -= 360f;
return Mathf.Clamp(lfAngle, lfMin, lfMax);
}
private void OnDrawGizmosSelected()
{
Color transparentGreen = new Color(0.0f, 1.0f, 0.0f, 0.35f);
Color transparentRed = new Color(1.0f, 0.0f, 0.0f, 0.35f);
if (Grounded) Gizmos.color = transparentGreen;
else Gizmos.color = transparentRed;
// when selected, draw a gizmo in the position of, and matching radius of, the grounded collider
Gizmos.DrawSphere(new Vector3(transform.position.x, transform.position.y - GroundedOffset, transform.position.z), GroundedRadius);
}
}
}

View file

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

View file

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

View file

@ -0,0 +1,294 @@
{
"name": "StarterAssets",
"maps": [
{
"name": "Player",
"id": "f62a4b92-ef5e-4175-8f4c-c9075429d32c",
"actions": [
{
"name": "Move",
"type": "Value",
"id": "6bc1aaf4-b110-4ff7-891e-5b9fe6f32c4d",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Look",
"type": "Value",
"id": "2690c379-f54d-45be-a724-414123833eb4",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Jump",
"type": "Button",
"id": "8c4abdf8-4099-493a-aa1a-129acec7c3df",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Sprint",
"type": "PassThrough",
"id": "980e881e-182c-404c-8cbf-3d09fdb48fef",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
"id": "e0dbd26b-3058-4c13-8f33-9683d5840685",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "WASD",
"id": "b7594ddb-26c9-4ba2-bd5a-901468929edc",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "2063a8b5-6a45-43de-851b-65f3d46e7b58",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "64e4d037-32e1-4fb9-80e4-fc7330404dfe",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "0fce8b11-5eab-4e4e-a741-b732e7b20873",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "7bdda0d6-57a8-47c8-8238-8aecf3110e47",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "bb94b405-58d3-4998-8535-d705c1218a98",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "929d9071-7dd0-4368-9743-6793bb98087e",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "28abadba-06ff-4d37-bb70-af2f1e35a3b9",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "45f115b6-9b4f-4ba8-b500-b94c93bf7d7e",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "e2f9aa65-db06-4c5b-a2e9-41bc8acb9517",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "StickDeadzone",
"groups": "Gamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ed66cbff-2900-4a62-8896-696503cfcd31",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "InvertVector2(invertX=false),ScaleVector2(x=0.05,y=0.05)",
"groups": "KeyboardMouse",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1d171b6-19d8-47a6-ba3a-71b6a8e7b3c0",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "InvertVector2(invertX=false),StickDeadzone,ScaleVector2(x=300,y=300)",
"groups": "Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1bd55a0b-761e-4ae4-89ae-8ec127e08a29",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "9f973413-5e27-4239-acee-38c4a63feeba",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "dc65b89f-9bd3-43fb-92af-d0d87ba5faa4",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c8fcd86e-dcfd-4f88-8e93-b638cdbf3320",
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d130f907-6a8a-4edb-a236-6a30d715564e",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": [
{
"name": "KeyboardMouse",
"bindingGroup": "KeyboardMouse",
"devices": [
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
},
{
"devicePath": "<Mouse>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Gamepad",
"bindingGroup": "Gamepad",
"devices": [
{
"devicePath": "<Gamepad>",
"isOptional": true,
"isOR": false
},
{
"devicePath": "<XInputController>",
"isOptional": true,
"isOR": false
},
{
"devicePath": "<DualShockGamepad>",
"isOptional": true,
"isOR": false
}
]
},
{
"name": "Xbox Controller",
"bindingGroup": "Xbox Controller",
"devices": []
},
{
"name": "PS4 Controller",
"bindingGroup": "PS4 Controller",
"devices": []
}
]
}

View file

@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 4419d82f33d36e848b3ed5af4c8da37e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 0
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace:

View file

@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: StarterAssets.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_CompensateForScreenOrientation: 0
m_FilterNoiseOnCurrent: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75

View file

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

View file

@ -0,0 +1,80 @@
using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace StarterAssets
{
public class StarterAssetsInputs : MonoBehaviour
{
[Header("Character Input Values")]
public Vector2 move;
public Vector2 look;
public bool jump;
public bool sprint;
[Header("Movement Settings")]
public bool analogMovement;
[Header("Mouse Cursor Settings")]
public bool cursorLocked = true;
public bool cursorInputForLook = true;
#if ENABLE_INPUT_SYSTEM
public void OnMove(InputValue value)
{
MoveInput(value.Get<Vector2>());
}
public void OnLook(InputValue value)
{
if(cursorInputForLook)
{
LookInput(value.Get<Vector2>());
}
}
public void OnJump(InputValue value)
{
JumpInput(value.isPressed);
}
public void OnSprint(InputValue value)
{
SprintInput(value.isPressed);
}
#endif
public void MoveInput(Vector2 newMoveDirection)
{
move = newMoveDirection;
}
public void LookInput(Vector2 newLookDirection)
{
look = newLookDirection;
}
public void JumpInput(bool newJumpState)
{
jump = newJumpState;
}
public void SprintInput(bool newSprintState)
{
sprint = newSprintState;
}
private void OnApplicationFocus(bool hasFocus)
{
SetCursorState(cursorLocked);
}
private void SetCursorState(bool newState)
{
Cursor.lockState = newState ? CursorLockMode.Locked : CursorLockMode.None;
}
}
}

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,728 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6751388636123340836
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 597308369130767402}
- component: {fileID: 6380401371110083211}
- component: {fileID: 6483554099135143963}
- component: {fileID: 1557486221260924829}
- component: {fileID: 1663187150}
- component: {fileID: 8890774966862588244}
m_Layer: 5
m_Name: UI_Canvas_StarterAssetsInputs_Joysticks
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &597308369130767402
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 4700314800559521240}
- {fileID: 8160084292953347161}
- {fileID: 287317552564024924}
- {fileID: 8734538516869120350}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &6380401371110083211
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6483554099135143963
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1600, y: 900}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &1557486221260924829
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1663187150
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a300d010f57451488aa99000126fbd5, type: 3}
m_Name:
m_EditorClassIdentifier:
starterAssetsInputs: {fileID: 0}
--- !u!114 &8890774966862588244
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6751388636123340836}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 901182334643ba1438a25accc6bd0c79, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &166868853765351469
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 597308369130767402}
m_Modifications:
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1663187150}
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: VirtualSprintInput
objectReference: {fileID: 0}
- target: {fileID: 4091757288130996202, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Button_Sprint
objectReference: {fileID: 0}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: b0fa70abd2a79904cb00b175dfd8ec7e,
type: 3}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.x
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -183.99994
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 76.69998
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
--- !u!224 &8734538516869120350 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
m_PrefabInstance: {fileID: 166868853765351469}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5959203425529373846
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 597308369130767402}
m_Modifications:
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1663187150}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_SizeDelta.x
value: 330
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_SizeDelta.y
value: 330
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 219
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 207
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1423390416140222447, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Joystick_Move
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
--- !u!224 &4700314800559521240 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
m_PrefabInstance: {fileID: 5959203425529373846}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7113428977512795415
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 597308369130767402}
m_Modifications:
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickRange
value: 60
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: invertYOutputValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: magnitudeMultiplier
value: 30
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1663187150}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: VirtualLookInput
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value:
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: StarterAssets.UICanvasControllerInput, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 191938513, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: joystickOutputEvent.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value:
objectReference: {fileID: 0}
- target: {fileID: 1480850142, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1480850144, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: af0ae2dbf3d1efb4f82af377950704a2,
type: 3}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_SizeDelta.x
value: 240
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_SizeDelta.y
value: 240
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -159.5
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 365.4
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1423390416140222447, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Joystick_Look
objectReference: {fileID: 0}
- target: {fileID: 3199668076469712371, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6eb08bfc0fd869c47b796c42ada099da, type: 3}
--- !u!224 &8160084292953347161 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1407806550736918862, guid: 6eb08bfc0fd869c47b796c42ada099da,
type: 3}
m_PrefabInstance: {fileID: 7113428977512795415}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8690618095626166063
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 597308369130767402}
m_Modifications:
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1663187150}
- target: {fileID: 4091757288130996202, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Button_Jump
objectReference: {fileID: 0}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 751aa1b6637101946b2fdbb7aa27d6ad,
type: 3}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.x
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -93
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 177
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
--- !u!224 &287317552564024924 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
m_PrefabInstance: {fileID: 8690618095626166063}
m_PrefabAsset: {fileID: 0}

View file

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

View file

@ -0,0 +1,724 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8803517679608742270
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3447417908108895600}
- component: {fileID: 9157539467335068625}
- component: {fileID: 9108414266783072577}
- component: {fileID: 3603141287258900167}
- component: {fileID: 2854614339647494548}
- component: {fileID: 6701286033206102030}
m_Layer: 5
m_Name: UI_Canvas_StarterAssetsInputs_TouchZones
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3447417908108895600
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1845145781368689681}
- {fileID: 8361770633040054537}
- {fileID: 3268611270763315776}
- {fileID: 6311761790708233538}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &9157539467335068625
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &9108414266783072577
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1600, y: 900}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &3603141287258900167
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &2854614339647494548
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a300d010f57451488aa99000126fbd5, type: 3}
m_Name:
m_EditorClassIdentifier:
starterAssetsInputs: {fileID: 0}
--- !u!114 &6701286033206102030
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8803517679608742270}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 901182334643ba1438a25accc6bd0c79, type: 3}
m_Name:
m_EditorClassIdentifier:
playerInput: {fileID: 0}
--- !u!1001 &2846493628060374845
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3447417908108895600}
m_Modifications:
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_SizeDelta.x
value: -40
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_SizeDelta.y
value: -40
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311023, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Name
value: UI_Virtual_TouchZone_Move
objectReference: {fileID: 0}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: touchZoneOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 2854614339647494548}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: touchZoneOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: VirtualMoveInput
objectReference: {fileID: 0}
- target: {fileID: 4767772227758556956, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Color.a
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c82978c3789dad44da354dc354c782b2, type: 3}
--- !u!224 &1845145781368689681 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
m_PrefabInstance: {fileID: 2846493628060374845}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3238201648404569137
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3447417908108895600}
m_Modifications:
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 2854614339647494548}
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: VirtualSprintInput
objectReference: {fileID: 0}
- target: {fileID: 4091757288130996202, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Button_Sprint
objectReference: {fileID: 0}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: b0fa70abd2a79904cb00b175dfd8ec7e,
type: 3}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.x
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -183.99994
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 76.69998
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
--- !u!224 &6311761790708233538 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
m_PrefabInstance: {fileID: 3238201648404569137}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5337181753265900069
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3447417908108895600}
m_Modifications:
- target: {fileID: 1495516281102152583, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: af0ae2dbf3d1efb4f82af377950704a2,
type: 3}
- target: {fileID: 1495516281102152583, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Color.a
value: 0.78431374
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_SizeDelta.x
value: -40
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_SizeDelta.y
value: -40
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99999976
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.00069049717
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0.079
objectReference: {fileID: 0}
- target: {fileID: 4475312012745311023, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Name
value: UI_Virtual_TouchZone_Look
objectReference: {fileID: 0}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: invertYOutputValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: magnitudeMultiplier
value: 60
objectReference: {fileID: 0}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: touchZoneOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 2854614339647494548}
- target: {fileID: 4767772227563435448, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: touchZoneOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: VirtualLookInput
objectReference: {fileID: 0}
- target: {fileID: 4767772227758556956, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: b74c31d447d2f5d41a61081bdf5e7126,
type: 3}
- target: {fileID: 4767772227758556956, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
propertyPath: m_Color.a
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c82978c3789dad44da354dc354c782b2, type: 3}
--- !u!224 &8361770633040054537 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4475312012745311020, guid: c82978c3789dad44da354dc354c782b2,
type: 3}
m_PrefabInstance: {fileID: 5337181753265900069}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6213831090048510771
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3447417908108895600}
m_Modifications:
- target: {fileID: 413722335, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
propertyPath: buttonStateOutputEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 2854614339647494548}
- target: {fileID: 4091757288130996202, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Name
value: UI_Virtual_Button_Jump
objectReference: {fileID: 0}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 751aa1b6637101946b2fdbb7aa27d6ad,
type: 3}
- target: {fileID: 6604053163029732620, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.x
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_SizeDelta.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -93
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 177
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e55d9b4642484f41be20c69a9b48063, type: 3}
--- !u!224 &3268611270763315776 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8892224244125084019, guid: 9e55d9b4642484f41be20c69a9b48063,
type: 3}
m_PrefabInstance: {fileID: 6213831090048510771}
m_PrefabAsset: {fileID: 0}

View file

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

View file

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

View file

@ -0,0 +1,87 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1992104595683069851
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8063073397250431797}
- component: {fileID: 5148107578835001787}
- component: {fileID: 8279798545678494202}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8063073397250431797
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1992104595683069851}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -799.99994, y: -449.99997, z: 0}
m_LocalScale: {x: 0.83333325, y: 0.83333325, z: 0.83333325}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5148107578835001787
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1992104595683069851}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!114 &8279798545678494202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1992104595683069851}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MoveRepeatDelay: 0.5
m_MoveRepeatRate: 0.1
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0

View file

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

View file

@ -0,0 +1,155 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7137023482562969817
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5052264629267279113}
- component: {fileID: 3990693672098548669}
- component: {fileID: 7140694399045626294}
- component: {fileID: 3004629566080465027}
- component: {fileID: 7921911991004155457}
m_Layer: 0
m_Name: UI_TouchScreenInput
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5052264629267279113
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7137023482562969817}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.92999995, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3990693672098548669
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7137023482562969817}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: 6f80c07efbcffac4380910b5aac93c8d, type: 2}
m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: ccd45339dc8ff154fbbe578856089eaf,
type: 3}
m_SortingOrder: 0
--- !u!114 &7140694399045626294
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7137023482562969817}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6d7e4e4868ed5df4b928c22423c690a0, type: 3}
m_Name:
m_EditorClassIdentifier:
MoveMagnitudeMultiplier: 1
LookMagnitudeMultiplier: 80
InvertLookY: 1
MoveEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3004629566080465027}
m_TargetAssemblyTypeName: VirtualInput, Unity.StarterAssets
m_MethodName: VirtualMoveInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
LookEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3004629566080465027}
m_TargetAssemblyTypeName: VirtualInput, Unity.StarterAssets
m_MethodName: VirtualLookInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
JumpEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3004629566080465027}
m_TargetAssemblyTypeName: VirtualInput, Unity.StarterAssets
m_MethodName: VirtualJumpInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
SprintEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3004629566080465027}
m_TargetAssemblyTypeName: VirtualInput, Unity.StarterAssets
m_MethodName: VirtualSprintInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &3004629566080465027
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7137023482562969817}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ed06e3b6fec5ecc4696004cedc31f0ac, type: 3}
m_Name:
m_EditorClassIdentifier:
StarterAssetsInputs: {fileID: 0}
--- !u!114 &7921911991004155457
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7137023482562969817}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 901182334643ba1438a25accc6bd0c79, type: 3}
m_Name:
m_EditorClassIdentifier:
playerInput: {fileID: 0}

View file

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

View file

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

View file

@ -0,0 +1,229 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4091757288130996202
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8892224244125084019}
- component: {fileID: 4087890128900500515}
- component: {fileID: 2478905580774955251}
- component: {fileID: 998461505230474078}
- component: {fileID: 413722335}
m_Layer: 5
m_Name: UI_Virtual_Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8892224244125084019
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4091757288130996202}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.6, y: 0.6, z: 1}
m_Children:
- {fileID: 5282399414295180930}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -582, y: 327.5}
m_SizeDelta: {x: 200, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4087890128900500515
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4091757288130996202}
m_CullTransparentMesh: 1
--- !u!114 &2478905580774955251
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4091757288130996202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b74c31d447d2f5d41a61081bdf5e7126, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &998461505230474078
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4091757288130996202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2478905580774955251}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &413722335
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4091757288130996202}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 448cd6d8e2f2cb04096e777d99974bc4, type: 3}
m_Name:
m_EditorClassIdentifier:
buttonStateOutputEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: StarterAssets.UICanvasControllerInput, Assembly-CSharp
m_MethodName: VirtualJumpInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
buttonClickOutputEvent:
m_PersistentCalls:
m_Calls: []
--- !u!1 &4525221819527958844
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5282399414295180930}
- component: {fileID: 8274542354720177529}
- component: {fileID: 6604053163029732620}
m_Layer: 5
m_Name: Image_Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5282399414295180930
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4525221819527958844}
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: 8892224244125084019}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8274542354720177529
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4525221819527958844}
m_CullTransparentMesh: 1
--- !u!114 &6604053163029732620
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4525221819527958844}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.78431374}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View file

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

View file

@ -0,0 +1,263 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1480850142
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1480850143}
- component: {fileID: 1480850145}
- component: {fileID: 1480850144}
m_Layer: 5
m_Name: Image_Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1480850143
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1480850142}
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: 3199668076469712368}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 70, y: 70}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1480850145
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1480850142}
m_CullTransparentMesh: 1
--- !u!114 &1480850144
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1480850142}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.78431374}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: ff7bfa7addf40784d86f62b8e4a034a6, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1423390416140222447
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1407806550736918862}
- component: {fileID: 5566472052310511190}
- component: {fileID: 2976711156707159110}
- component: {fileID: 191938513}
m_Layer: 5
m_Name: UI_Virtual_Joystick
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1407806550736918862
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1423390416140222447}
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: 3199668076469712368}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 350, y: 350}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5566472052310511190
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1423390416140222447}
m_CullTransparentMesh: 1
--- !u!114 &2976711156707159110
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1423390416140222447}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 90ded0611e490aa4ba6961afbfc2280d, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &191938513
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1423390416140222447}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2cb8c4d669392748bb924209de33b85, type: 3}
m_Name:
m_EditorClassIdentifier:
containerRect: {fileID: 1407806550736918862}
handleRect: {fileID: 3199668076469712368}
joystickRange: 100
magnitudeMultiplier: 1
invertXOutputValue: 0
invertYOutputValue: 0
joystickOutputEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: StarterAssets.UICanvasControllerInput, Assembly-CSharp
m_MethodName: VirtualMoveInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &3199668076469712371
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3199668076469712368}
- component: {fileID: 3199668076469712374}
- component: {fileID: 3199668076469712369}
m_Layer: 5
m_Name: Image_Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3199668076469712368
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3199668076469712371}
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: 1480850143}
m_Father: {fileID: 1407806550736918862}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 130, y: 130}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3199668076469712374
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3199668076469712371}
m_CullTransparentMesh: 1
--- !u!114 &3199668076469712369
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3199668076469712371}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b74c31d447d2f5d41a61081bdf5e7126, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View file

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

View file

@ -0,0 +1,263 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1837564145867584781
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3500080046422971095}
- component: {fileID: 1681218170225375998}
- component: {fileID: 1495516281102152583}
m_Layer: 5
m_Name: Image_Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3500080046422971095
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837564145867584781}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.6, y: 0.6, z: 1}
m_Children: []
m_Father: {fileID: 4767772227758557155}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1681218170225375998
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837564145867584781}
m_CullTransparentMesh: 1
--- !u!114 &1495516281102152583
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837564145867584781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: ff7bfa7addf40784d86f62b8e4a034a6, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4475312012745311023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4475312012745311020}
- component: {fileID: 4475312012745310994}
- component: {fileID: 4767772227563435449}
- component: {fileID: 4767772227563435448}
m_Layer: 5
m_Name: UI_Virtual_TouchZone
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4475312012745311020
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4475312012745311023}
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: 4767772227758557155}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 639.4351, y: 389.6286}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4475312012745310994
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4475312012745311023}
m_CullTransparentMesh: 1
--- !u!114 &4767772227563435449
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4475312012745311023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.18431373}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4767772227563435448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4475312012745311023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 65870f34fef70aa44b0f562cfc810220, type: 3}
m_Name:
m_EditorClassIdentifier:
containerRect: {fileID: 4475312012745311020}
handleRect: {fileID: 4767772227758557155}
clampToMagnitude: 1
magnitudeMultiplier: 1
invertXOutputValue: 0
invertYOutputValue: 0
touchZoneOutputEvent:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: StarterAssets.UICanvasControllerInput, Assembly-CSharp
m_MethodName: VirtualMoveInput
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &4767772227758557154
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4767772227758557155}
- component: {fileID: 4767772227758556957}
- component: {fileID: 4767772227758556956}
m_Layer: 5
m_Name: Image_Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4767772227758557155
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4767772227758557154}
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: 3500080046422971095}
m_Father: {fileID: 4475312012745311020}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4767772227758556957
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4767772227758557154}
m_CullTransparentMesh: 1
--- !u!114 &4767772227758556956
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4767772227758557154}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.78431374}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b74c31d447d2f5d41a61081bdf5e7126, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View file

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

View file

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

View file

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

View file

@ -0,0 +1,33 @@
using UnityEngine;
namespace StarterAssets
{
public class UICanvasControllerInput : MonoBehaviour
{
[Header("Output")]
public StarterAssetsInputs starterAssetsInputs;
public void VirtualMoveInput(Vector2 virtualMoveDirection)
{
starterAssetsInputs.MoveInput(virtualMoveDirection);
}
public void VirtualLookInput(Vector2 virtualLookDirection)
{
starterAssetsInputs.LookInput(virtualLookDirection);
}
public void VirtualJumpInput(bool virtualJumpState)
{
starterAssetsInputs.JumpInput(virtualJumpState);
}
public void VirtualSprintInput(bool virtualSprintState)
{
starterAssetsInputs.SprintInput(virtualSprintState);
}
}
}

View file

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

View file

@ -0,0 +1,129 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.UIElements;
public class TouchscreenInput : MonoBehaviour
{
[Header("Settings")]
[Tooltip("Move joystick magnitude is in [-1;1] range, this multiply it before sending it to move event")]
public float MoveMagnitudeMultiplier = 1.0f;
[Tooltip("Look joystick magnitude is in [-1;1] range, this multiply it before sending it to move event")]
public float LookMagnitudeMultiplier = 1.0f;
public bool InvertLookY;
[Header("Events")]
public UnityEvent<Vector2> MoveEvent;
public UnityEvent<Vector2> LookEvent;
public UnityEvent<bool> JumpEvent;
public UnityEvent<bool> SprintEvent;
private UIDocument m_Document;
private VirtualJoystick m_MoveJoystick;
private VirtualJoystick m_LookJoystick;
private void Awake()
{
m_Document = GetComponent<UIDocument>();
var safeArea = Screen.safeArea;
var root = m_Document.rootVisualElement;
root.style.position = Position.Absolute;
root.style.left = safeArea.xMin;
root.style.right = Screen.width - safeArea.xMax;
root.style.top = Screen.height - safeArea.yMax;
root.style.bottom = safeArea.yMin;
}
private void Start()
{
var joystickMove = m_Document.rootVisualElement.Q<VisualElement>("JoystickMove");
var joystickLook = m_Document.rootVisualElement.Q<VisualElement>("JoystickLook");
m_MoveJoystick = new VirtualJoystick(joystickMove);
m_MoveJoystick.JoystickEvent.AddListener(mov =>
{
MoveEvent.Invoke(mov * MoveMagnitudeMultiplier);
});;
m_LookJoystick = new VirtualJoystick(joystickLook);
m_LookJoystick.JoystickEvent.AddListener(mov =>
{
if (InvertLookY)
mov.y *= -1;
LookEvent.Invoke(mov * LookMagnitudeMultiplier);
});
var jumpButton = m_Document.rootVisualElement.Q<VisualElement>("ButtonJump");
jumpButton.RegisterCallback<PointerEnterEvent>(evt => { JumpEvent.Invoke(true); });
jumpButton.RegisterCallback<PointerLeaveEvent>(evt => { JumpEvent.Invoke(false); });
var sprintButton = m_Document.rootVisualElement.Q<VisualElement>("ButtonSprint");
sprintButton.RegisterCallback<PointerEnterEvent>(evt => { SprintEvent.Invoke(true); });
sprintButton.RegisterCallback<PointerLeaveEvent>(evt => { SprintEvent.Invoke(false); });
}
}
public class VirtualJoystick
{
public VisualElement BaseElement;
public VisualElement Thumbstick;
public UnityEvent<Vector2> JoystickEvent = new();
public VirtualJoystick(VisualElement root)
{
BaseElement = root;
Thumbstick = root.Q<VisualElement>("JoystickHandle");
BaseElement.RegisterCallback<PointerDownEvent>(HandlePress);
BaseElement.RegisterCallback<PointerMoveEvent>(HandleDrag);
BaseElement.RegisterCallback<PointerUpEvent>(HandleRelease);
}
void HandlePress(PointerDownEvent evt)
{
BaseElement.CapturePointer(evt.pointerId);
}
void HandleRelease(PointerUpEvent evt)
{
BaseElement.ReleasePointer(evt.pointerId);
Thumbstick.style.left = Length.Percent(50);
Thumbstick.style.top = Length.Percent(50);
JoystickEvent.Invoke(Vector2.zero);
}
void HandleDrag(PointerMoveEvent evt)
{
if (!BaseElement.HasPointerCapture(evt.pointerId)) return;
var width = BaseElement.contentRect.width;
var center = new Vector3(width / 2, width / 2);
var centerToPosition = evt.localPosition - center;
if (centerToPosition.magnitude > width/2)
{
centerToPosition = centerToPosition.normalized * width / 2;
}
var newPos = center + centerToPosition;
Thumbstick.style.left = newPos.x;
Thumbstick.style.top = newPos.y;
centerToPosition /= (width / 2);
//we invert y as the y of UI goes down, but pushing the joystick up is expected to give a positive y value
centerToPosition.y *= -1;
JoystickEvent.Invoke(centerToPosition);
}
}

View file

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

View file

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

View file

@ -0,0 +1,35 @@
/*
The PlayerInput component has an auto-switch control scheme action that allows automatic changing of connected devices.
IE: Switching from Keyboard to Gamepad in-game.
When built to a mobile phone; in most cases, there is no concept of switching connected devices as controls are typically driven through what is on the device's hardware (Screen, Tilt, etc)
In Input System 1.0.2, if the PlayerInput component has Auto Switch enabled, it will search the mobile device for connected devices; which is very costly and results in bad performance.
This is fixed in Input System 1.1.
For the time-being; this script will disable a PlayerInput's auto switch control schemes; when project is built to mobile.
*/
using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
public class MobileDisableAutoSwitchControls : MonoBehaviour
{
#if ENABLE_INPUT_SYSTEM && (UNITY_IOS || UNITY_ANDROID)
[Header("Target")]
public PlayerInput playerInput;
void Start()
{
DisableAutoSwitchControls();
}
void DisableAutoSwitchControls()
{
playerInput.neverAutoSwitchControlSchemes = true;
}
#endif
}

View file

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

View file

@ -0,0 +1,28 @@
using StarterAssets;
using UnityEngine;
public class VirtualInput : MonoBehaviour
{
[Header("Output")]
public StarterAssetsInputs StarterAssetsInputs;
public void VirtualMoveInput(Vector2 virtualMoveDirection)
{
StarterAssetsInputs.MoveInput(virtualMoveDirection);
}
public void VirtualLookInput(Vector2 virtualLookDirection)
{
StarterAssetsInputs.LookInput(virtualLookDirection);
}
public void VirtualJumpInput(bool virtualJumpState)
{
StarterAssetsInputs.JumpInput(virtualJumpState);
}
public void VirtualSprintInput(bool virtualSprintState)
{
StarterAssetsInputs.SprintInput(virtualSprintState);
}
}

View file

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

View file

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

View file

@ -0,0 +1,41 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
public class UIVirtualButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler
{
[System.Serializable]
public class BoolEvent : UnityEvent<bool> { }
[System.Serializable]
public class Event : UnityEvent { }
[Header("Output")]
public BoolEvent buttonStateOutputEvent;
public Event buttonClickOutputEvent;
public void OnPointerDown(PointerEventData eventData)
{
OutputButtonStateValue(true);
}
public void OnPointerUp(PointerEventData eventData)
{
OutputButtonStateValue(false);
}
public void OnPointerClick(PointerEventData eventData)
{
OutputButtonClickEvent();
}
void OutputButtonStateValue(bool buttonState)
{
buttonStateOutputEvent.Invoke(buttonState);
}
void OutputButtonClickEvent()
{
buttonClickOutputEvent.Invoke();
}
}

View file

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

View file

@ -0,0 +1,113 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
public class UIVirtualJoystick : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler
{
[System.Serializable]
public class Event : UnityEvent<Vector2> { }
[Header("Rect References")]
public RectTransform containerRect;
public RectTransform handleRect;
[Header("Settings")]
public float joystickRange = 50f;
public float magnitudeMultiplier = 1f;
public bool invertXOutputValue;
public bool invertYOutputValue;
[Header("Output")]
public Event joystickOutputEvent;
void Start()
{
SetupHandle();
}
private void SetupHandle()
{
if(handleRect)
{
UpdateHandleRectPosition(Vector2.zero);
}
}
public void OnPointerDown(PointerEventData eventData)
{
OnDrag(eventData);
}
public void OnDrag(PointerEventData eventData)
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(containerRect, eventData.position, eventData.pressEventCamera, out Vector2 position);
position = ApplySizeDelta(position);
Vector2 clampedPosition = ClampValuesToMagnitude(position);
Vector2 outputPosition = ApplyInversionFilter(position);
OutputPointerEventValue(outputPosition * magnitudeMultiplier);
if(handleRect)
{
UpdateHandleRectPosition(clampedPosition * joystickRange);
}
}
public void OnPointerUp(PointerEventData eventData)
{
OutputPointerEventValue(Vector2.zero);
if(handleRect)
{
UpdateHandleRectPosition(Vector2.zero);
}
}
private void OutputPointerEventValue(Vector2 pointerPosition)
{
joystickOutputEvent.Invoke(pointerPosition);
}
private void UpdateHandleRectPosition(Vector2 newPosition)
{
handleRect.anchoredPosition = newPosition;
}
Vector2 ApplySizeDelta(Vector2 position)
{
float x = (position.x/containerRect.sizeDelta.x) * 2.5f;
float y = (position.y/containerRect.sizeDelta.y) * 2.5f;
return new Vector2(x, y);
}
Vector2 ClampValuesToMagnitude(Vector2 position)
{
return Vector2.ClampMagnitude(position, 1);
}
Vector2 ApplyInversionFilter(Vector2 position)
{
if(invertXOutputValue)
{
position.x = InvertValue(position.x);
}
if(invertYOutputValue)
{
position.y = InvertValue(position.y);
}
return position;
}
float InvertValue(float value)
{
return -value;
}
}

View file

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

View file

@ -0,0 +1,125 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
public class UIVirtualTouchZone : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler
{
[System.Serializable]
public class Event : UnityEvent<Vector2> { }
[Header("Rect References")]
public RectTransform containerRect;
public RectTransform handleRect;
[Header("Settings")]
public bool clampToMagnitude;
public float magnitudeMultiplier = 1f;
public bool invertXOutputValue;
public bool invertYOutputValue;
//Stored Pointer Values
private Vector2 pointerDownPosition;
private Vector2 currentPointerPosition;
[Header("Output")]
public Event touchZoneOutputEvent;
void Start()
{
SetupHandle();
}
private void SetupHandle()
{
if(handleRect)
{
SetObjectActiveState(handleRect.gameObject, false);
}
}
public void OnPointerDown(PointerEventData eventData)
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(containerRect, eventData.position, eventData.pressEventCamera, out pointerDownPosition);
if(handleRect)
{
SetObjectActiveState(handleRect.gameObject, true);
UpdateHandleRectPosition(pointerDownPosition);
}
}
public void OnDrag(PointerEventData eventData)
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(containerRect, eventData.position, eventData.pressEventCamera, out currentPointerPosition);
Vector2 positionDelta = GetDeltaBetweenPositions(pointerDownPosition, currentPointerPosition);
Vector2 clampedPosition = ClampValuesToMagnitude(positionDelta);
Vector2 outputPosition = ApplyInversionFilter(clampedPosition);
OutputPointerEventValue(outputPosition * magnitudeMultiplier);
}
public void OnPointerUp(PointerEventData eventData)
{
pointerDownPosition = Vector2.zero;
currentPointerPosition = Vector2.zero;
OutputPointerEventValue(Vector2.zero);
if(handleRect)
{
SetObjectActiveState(handleRect.gameObject, false);
UpdateHandleRectPosition(Vector2.zero);
}
}
void OutputPointerEventValue(Vector2 pointerPosition)
{
touchZoneOutputEvent.Invoke(pointerPosition);
}
void UpdateHandleRectPosition(Vector2 newPosition)
{
handleRect.anchoredPosition = newPosition;
}
void SetObjectActiveState(GameObject targetObject, bool newState)
{
targetObject.SetActive(newState);
}
Vector2 GetDeltaBetweenPositions(Vector2 firstPosition, Vector2 secondPosition)
{
return secondPosition - firstPosition;
}
Vector2 ClampValuesToMagnitude(Vector2 position)
{
return Vector2.ClampMagnitude(position, 1);
}
Vector2 ApplyInversionFilter(Vector2 position)
{
if(invertXOutputValue)
{
position.x = InvertValue(position.x);
}
if(invertYOutputValue)
{
position.y = InvertValue(position.y);
}
return position;
}
float InvertValue(float value)
{
return -value;
}
}

View file

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

View file

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

View file

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

Binary file not shown.

View file

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: b74c31d447d2f5d41a61081bdf5e7126
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
vTOnly: 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: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

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