浏览代码

Actions map, Simple input testing

/main
Ciro Continisio 4 年前
当前提交
93b4aa7d
共有 24 个文件被更改,包括 1392 次插入0 次删除
  1. 5
      ProjectSettings/Packages/com.unity.probuilder/Settings.json
  2. 2
      Assets/Settings/Graphics/ForwardRenderer.asset
  3. 8
      Assets/Settings/Graphics.meta
  4. 8
      Assets/Settings/Input.meta
  5. 341
      Assets/Scenes/InputTesting.unity
  6. 7
      Assets/Scenes/InputTesting.unity.meta
  7. 8
      Assets/Scripts/Test.meta
  8. 62
      Assets/Scripts/Test/InputTesting.cs
  9. 11
      Assets/Scripts/Test/InputTesting.cs.meta
  10. 548
      Assets/Settings/Input/GameInput.cs
  11. 11
      Assets/Settings/Input/GameInput.cs.meta
  12. 360
      Assets/Settings/Input/GameInput.inputactions
  13. 14
      Assets/Settings/Input/GameInput.inputactions.meta
  14. 7
      ProjectSettings/Packages/com.unity.polybrush/Settings.json
  15. 0
      /Assets/Settings/Graphics/ForwardRenderer.asset
  16. 0
      /Assets/Settings/Graphics/ForwardRenderer.asset.meta
  17. 0
      /Assets/Settings/Graphics/UniversalRP-HighQuality.asset
  18. 0
      /Assets/Settings/Graphics/UniversalRP-HighQuality.asset.meta

5
ProjectSettings/Packages/com.unity.probuilder/Settings.json


"type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
"key": "preferences.version",
"value": "{\"m_Value\":{\"m_Major\":4,\"m_Minor\":2,\"m_Patch\":3,\"m_Build\":-1,\"m_Type\":\"\",\"m_Metadata\":\"\",\"m_Date\":\"\"}}"
},
{
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
"key": "lightmapping.autoUnwrapLightmapUV",
"value": "{\"m_Value\":true}"
}
]
}

2
Assets/Settings/Graphics/ForwardRenderer.asset


m_Name: ForwardRenderer
m_EditorClassIdentifier:
m_RendererFeatures: []
m_RendererFeatureMap:
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
shaders:
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}

passOperation: 0
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1

8
Assets/Settings/Graphics.meta


fileFormatVersion: 2
guid: 032203fbbbe9e224099ec691f04894f1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Settings/Input.meta


fileFormatVersion: 2
guid: 3d9fc864e1e41124a85858136bd28ddc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

341
Assets/Scenes/InputTesting.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &990581425
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 990581428}
- component: {fileID: 990581427}
- component: {fileID: 990581426}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &990581426
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 990581425}
m_Enabled: 1
--- !u!20 &990581427
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 990581425}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 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!4 &990581428
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 990581425}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1032368263
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1032368265}
- component: {fileID: 1032368264}
m_Layer: 0
m_Name: Input
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1032368264
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1032368263}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7d535e31c73ba5849911dab5121f96bb, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1032368265
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1032368263}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1829473280
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1829473282}
- component: {fileID: 1829473281}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1829473281
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829473280}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1829473282
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829473280}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}

7
Assets/Scenes/InputTesting.unity.meta


fileFormatVersion: 2
guid: b8bad9c8ec0378942899f944da80b0da
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts/Test.meta


fileFormatVersion: 2
guid: 4e61a32d26d5a6e4dbd4260b366898c2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

62
Assets/Scripts/Test/InputTesting.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputTesting : MonoBehaviour, GameInput.IGameplayActions
{
GameInput gameInput;
private void OnEnable()
{
if(gameInput == null)
{
gameInput = new GameInput();
gameInput.Gameplay.SetCallbacks(this);
}
gameInput.Gameplay.Enable();
Debug.Log("I'm enabled");
}
private void OnDisable()
{
gameInput.Gameplay.Disable();
}
public void OnAttack(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Started)
Debug.Log("Attack");
}
public void OnExtraAction(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Started)
Debug.Log("ExtraAction");
}
public void OnInteract(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Started)
Debug.Log("Interact");
}
public void OnJump(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Started)
Debug.Log("Jump");
}
public void OnMove(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Performed)
Debug.Log("Move " + context.ReadValue<Vector2>());
}
public void OnPause(InputAction.CallbackContext context)
{
if(context.phase == InputActionPhase.Started)
Debug.Log("Pause");
}
}

11
Assets/Scripts/Test/InputTesting.cs.meta


fileFormatVersion: 2
guid: 7d535e31c73ba5849911dab5121f96bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

548
Assets/Settings/Input/GameInput.cs


// GENERATED AUTOMATICALLY FROM 'Assets/Settings/Input/GameInput.inputactions'
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public class @GameInput : IInputActionCollection, IDisposable
{
public InputActionAsset asset { get; }
public @GameInput()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""GameInput"",
""maps"": [
{
""name"": ""Gameplay"",
""id"": ""37734faa-64e4-48a4-901b-e0ff80b636be"",
""actions"": [
{
""name"": ""Move"",
""type"": ""Value"",
""id"": ""103cf56a-d357-491a-8559-592da00641cc"",
""expectedControlType"": ""Analog"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Jump"",
""type"": ""Button"",
""id"": ""d603fc26-b424-4cff-a593-71ee48e3d0ef"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Attack"",
""type"": ""Button"",
""id"": ""65a85ccc-c121-43d5-b6c9-83674e675ddc"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Interact"",
""type"": ""Button"",
""id"": ""d0d85176-6fc5-486b-bc5c-36cdd4cb6a54"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""f788c753-f77b-43bf-b5b7-bc98b77814ec"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""ExtraAction"",
""type"": ""Button"",
""id"": ""1b6ae4df-f5e6-42fc-92b6-3dcc2e126563"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": ""Gamepad Left Stick"",
""id"": ""bb70cc63-ec03-4bda-b1f6-edc72656ba83"",
""path"": ""2DVector(mode=2)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""39063a94-c3b3-4fd9-8dd6-f53600a700dd"",
""path"": ""<Gamepad>/leftStick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""49ff05d5-0d8a-4f79-bd99-fd41cdf0d7bd"",
""path"": ""<Gamepad>/leftStick/down"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""1fc52241-074a-41ac-8a81-2ce840b0290b"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""dfd22222-a8e3-4cdb-8f48-6cbffc53def7"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard WASD"",
""id"": ""f8b893c4-85c2-492d-89ab-41f8d1520def"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""896f18e7-b01d-47a3-a018-7c2230b42022"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""2247f5b8-f6a1-4a90-89f4-9846090bd18c"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""204e90e1-b388-4636-9ba9-6f13df8ba19f"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""611822fd-3a0d-49e1-9c2b-960f877aba76"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Keyboard Arrows"",
""id"": ""b437a09d-8ca4-4996-a2f1-edf980623f6e"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""d0910d75-c140-4885-b9be-5bb8deae80e0"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""47380ccb-897f-4a93-bac4-3ea860b26105"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""42344a1d-be6c-4a9b-855c-bb33dd318651"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""13a640b3-5350-4478-8218-495187c01f40"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""265ab87e-ba29-4a65-8b54-518f12192e5d"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""645ba428-0631-4e32-b9b0-eaac5d9ed36d"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""95428e26-6672-49d7-b72b-ccbfd5b4267d"",
""path"": ""<Gamepad>/buttonWest"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""91ce58d8-88e1-4ade-945b-59c4f0939828"",
""path"": ""<Keyboard>/j"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""8b85e5da-3435-4347-9595-50cc57356b80"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Interact"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""433e8393-e1b1-484a-af51-d084849fe7c3"",
""path"": ""<Keyboard>/k"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Interact"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""d0e5ef4e-a086-4861-be73-3ab5ea76521f"",
""path"": ""<Gamepad>/start"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Pause"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""cd45c714-729f-438c-bdda-bbfa1bfd66ca"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""Pause"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""937b421c-9467-4b47-a1fd-445b9b44d5c9"",
""path"": ""<Keyboard>/l"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""ExtraAction"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""ceb892d5-04df-4ccf-8ef6-2a5124d4a2e7"",
""path"": ""<Gamepad>/buttonNorth"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyboardOrGamepad"",
""action"": ""ExtraAction"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Menus"",
""id"": ""a6b0dc37-2ef3-420d-990a-eef5df26ae21"",
""actions"": [],
""bindings"": []
}
],
""controlSchemes"": [
{
""name"": ""KeyboardOrGamepad"",
""bindingGroup"": ""KeyboardOrGamepad"",
""devices"": [
{
""devicePath"": ""<Gamepad>"",
""isOptional"": true,
""isOR"": false
},
{
""devicePath"": ""<Keyboard>"",
""isOptional"": false,
""isOR"": false
}
]
}
]
}");
// Gameplay
m_Gameplay = asset.FindActionMap("Gameplay", throwIfNotFound: true);
m_Gameplay_Move = m_Gameplay.FindAction("Move", throwIfNotFound: true);
m_Gameplay_Jump = m_Gameplay.FindAction("Jump", throwIfNotFound: true);
m_Gameplay_Attack = m_Gameplay.FindAction("Attack", throwIfNotFound: true);
m_Gameplay_Interact = m_Gameplay.FindAction("Interact", throwIfNotFound: true);
m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true);
m_Gameplay_ExtraAction = m_Gameplay.FindAction("ExtraAction", throwIfNotFound: true);
// Menus
m_Menus = asset.FindActionMap("Menus", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
// Gameplay
private readonly InputActionMap m_Gameplay;
private IGameplayActions m_GameplayActionsCallbackInterface;
private readonly InputAction m_Gameplay_Move;
private readonly InputAction m_Gameplay_Jump;
private readonly InputAction m_Gameplay_Attack;
private readonly InputAction m_Gameplay_Interact;
private readonly InputAction m_Gameplay_Pause;
private readonly InputAction m_Gameplay_ExtraAction;
public struct GameplayActions
{
private @GameInput m_Wrapper;
public GameplayActions(@GameInput wrapper) { m_Wrapper = wrapper; }
public InputAction @Move => m_Wrapper.m_Gameplay_Move;
public InputAction @Jump => m_Wrapper.m_Gameplay_Jump;
public InputAction @Attack => m_Wrapper.m_Gameplay_Attack;
public InputAction @Interact => m_Wrapper.m_Gameplay_Interact;
public InputAction @Pause => m_Wrapper.m_Gameplay_Pause;
public InputAction @ExtraAction => m_Wrapper.m_Gameplay_ExtraAction;
public InputActionMap Get() { return m_Wrapper.m_Gameplay; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); }
public void SetCallbacks(IGameplayActions instance)
{
if (m_Wrapper.m_GameplayActionsCallbackInterface != null)
{
@Move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Attack.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
@Attack.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
@Attack.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
@Interact.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
@Interact.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
@Interact.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
@Pause.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
@Pause.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
@Pause.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
@ExtraAction.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
@ExtraAction.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
@ExtraAction.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)
{
@Move.started += instance.OnMove;
@Move.performed += instance.OnMove;
@Move.canceled += instance.OnMove;
@Jump.started += instance.OnJump;
@Jump.performed += instance.OnJump;
@Jump.canceled += instance.OnJump;
@Attack.started += instance.OnAttack;
@Attack.performed += instance.OnAttack;
@Attack.canceled += instance.OnAttack;
@Interact.started += instance.OnInteract;
@Interact.performed += instance.OnInteract;
@Interact.canceled += instance.OnInteract;
@Pause.started += instance.OnPause;
@Pause.performed += instance.OnPause;
@Pause.canceled += instance.OnPause;
@ExtraAction.started += instance.OnExtraAction;
@ExtraAction.performed += instance.OnExtraAction;
@ExtraAction.canceled += instance.OnExtraAction;
}
}
}
public GameplayActions @Gameplay => new GameplayActions(this);
// Menus
private readonly InputActionMap m_Menus;
private IMenusActions m_MenusActionsCallbackInterface;
public struct MenusActions
{
private @GameInput m_Wrapper;
public MenusActions(@GameInput wrapper) { m_Wrapper = wrapper; }
public InputActionMap Get() { return m_Wrapper.m_Menus; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MenusActions set) { return set.Get(); }
public void SetCallbacks(IMenusActions instance)
{
if (m_Wrapper.m_MenusActionsCallbackInterface != null)
{
}
m_Wrapper.m_MenusActionsCallbackInterface = instance;
if (instance != null)
{
}
}
}
public MenusActions @Menus => new MenusActions(this);
private int m_KeyboardOrGamepadSchemeIndex = -1;
public InputControlScheme KeyboardOrGamepadScheme
{
get
{
if (m_KeyboardOrGamepadSchemeIndex == -1) m_KeyboardOrGamepadSchemeIndex = asset.FindControlSchemeIndex("KeyboardOrGamepad");
return asset.controlSchemes[m_KeyboardOrGamepadSchemeIndex];
}
}
public interface IGameplayActions
{
void OnMove(InputAction.CallbackContext context);
void OnJump(InputAction.CallbackContext context);
void OnAttack(InputAction.CallbackContext context);
void OnInteract(InputAction.CallbackContext context);
void OnPause(InputAction.CallbackContext context);
void OnExtraAction(InputAction.CallbackContext context);
}
public interface IMenusActions
{
}
}

11
Assets/Settings/Input/GameInput.cs.meta


fileFormatVersion: 2
guid: cdb72574c3b76764bb65f1a1cf18ffbb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

360
Assets/Settings/Input/GameInput.inputactions


{
"name": "GameInput",
"maps": [
{
"name": "Gameplay",
"id": "37734faa-64e4-48a4-901b-e0ff80b636be",
"actions": [
{
"name": "Move",
"type": "Value",
"id": "103cf56a-d357-491a-8559-592da00641cc",
"expectedControlType": "Analog",
"processors": "",
"interactions": ""
},
{
"name": "Jump",
"type": "Button",
"id": "d603fc26-b424-4cff-a593-71ee48e3d0ef",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Attack",
"type": "Button",
"id": "65a85ccc-c121-43d5-b6c9-83674e675ddc",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Interact",
"type": "Button",
"id": "d0d85176-6fc5-486b-bc5c-36cdd4cb6a54",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Pause",
"type": "Button",
"id": "f788c753-f77b-43bf-b5b7-bc98b77814ec",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ExtraAction",
"type": "Button",
"id": "1b6ae4df-f5e6-42fc-92b6-3dcc2e126563",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "Gamepad Left Stick",
"id": "bb70cc63-ec03-4bda-b1f6-edc72656ba83",
"path": "2DVector(mode=2)",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "39063a94-c3b3-4fd9-8dd6-f53600a700dd",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "49ff05d5-0d8a-4f79-bd99-fd41cdf0d7bd",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "1fc52241-074a-41ac-8a81-2ce840b0290b",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "dfd22222-a8e3-4cdb-8f48-6cbffc53def7",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard WASD",
"id": "f8b893c4-85c2-492d-89ab-41f8d1520def",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "896f18e7-b01d-47a3-a018-7c2230b42022",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "2247f5b8-f6a1-4a90-89f4-9846090bd18c",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "204e90e1-b388-4636-9ba9-6f13df8ba19f",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "611822fd-3a0d-49e1-9c2b-960f877aba76",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard Arrows",
"id": "b437a09d-8ca4-4996-a2f1-edf980623f6e",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "d0910d75-c140-4885-b9be-5bb8deae80e0",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "47380ccb-897f-4a93-bac4-3ea860b26105",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "42344a1d-be6c-4a9b-855c-bb33dd318651",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "13a640b3-5350-4478-8218-495187c01f40",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "265ab87e-ba29-4a65-8b54-518f12192e5d",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "645ba428-0631-4e32-b9b0-eaac5d9ed36d",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "95428e26-6672-49d7-b72b-ccbfd5b4267d",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "91ce58d8-88e1-4ade-945b-59c4f0939828",
"path": "<Keyboard>/j",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8b85e5da-3435-4347-9595-50cc57356b80",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "433e8393-e1b1-484a-af51-d084849fe7c3",
"path": "<Keyboard>/k",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d0e5ef4e-a086-4861-be73-3ab5ea76521f",
"path": "<Gamepad>/start",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cd45c714-729f-438c-bdda-bbfa1bfd66ca",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "937b421c-9467-4b47-a1fd-445b9b44d5c9",
"path": "<Keyboard>/l",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "ExtraAction",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ceb892d5-04df-4ccf-8ef6-2a5124d4a2e7",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "ExtraAction",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Menus",
"id": "a6b0dc37-2ef3-420d-990a-eef5df26ae21",
"actions": [],
"bindings": []
}
],
"controlSchemes": [
{
"name": "KeyboardOrGamepad",
"bindingGroup": "KeyboardOrGamepad",
"devices": [
{
"devicePath": "<Gamepad>",
"isOptional": true,
"isOR": false
},
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
}
]
}
]
}

14
Assets/Settings/Input/GameInput.inputactions.meta


fileFormatVersion: 2
guid: 47a7bd10b734b954e95d4dbf166f5578
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 1
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace:

7
ProjectSettings/Packages/com.unity.polybrush/Settings.json


{
"m_Name": "Settings",
"m_Path": "ProjectSettings/Packages/com.unity.polybrush/Settings.json",
"m_Dictionary": {
"m_DictionaryValues": []
}
}

/Assets/Settings/ForwardRenderer.asset → /Assets/Settings/Graphics/ForwardRenderer.asset

/Assets/Settings/ForwardRenderer.asset.meta → /Assets/Settings/Graphics/ForwardRenderer.asset.meta

/Assets/Settings/UniversalRP-HighQuality.asset → /Assets/Settings/Graphics/UniversalRP-HighQuality.asset

/Assets/Settings/UniversalRP-HighQuality.asset.meta → /Assets/Settings/Graphics/UniversalRP-HighQuality.asset.meta

正在加载...
取消
保存