浏览代码

start work on rocket launcher

/hh-develop-fps_game_project
HH 4 年前
当前提交
d8384d5a
共有 38 个文件被更改,包括 6311 次插入58 次删除
  1. 511
      Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/FPSAgent.prefab
  2. 101
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  3. 33
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/GameController.cs
  4. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat
  5. 2
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Projectile.mat
  6. 81
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/GrayDark.mat
  7. 8
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/GrayDark.mat.meta
  8. 8
      Project/Assets/Samples/Input System/1.0.1/Visualizers.meta
  9. 4
      Project/Assets/Samples/Input System/1.0.1/Visualizers/.sample.json
  10. 1001
      Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVis.prefab
  11. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVis.prefab.meta
  12. 274
      Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVisualizer.unity
  13. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVisualizer.unity.meta
  14. 322
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputActionVisualizer.cs
  15. 11
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputActionVisualizer.cs.meta
  16. 359
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputControlVisualizer.cs
  17. 11
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputControlVisualizer.cs.meta
  18. 83
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputVisualizer.cs
  19. 11
      Project/Assets/Samples/Input System/1.0.1/Visualizers/InputVisualizer.cs.meta
  20. 561
      Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVis.prefab
  21. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVis.prefab.meta
  22. 274
      Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVisualizer.unity
  23. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVisualizer.unity.meta
  24. 897
      Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVis.prefab
  25. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVis.prefab.meta
  26. 274
      Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVisualizer.unity
  27. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVisualizer.unity.meta
  28. 137
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControls.inputactions
  29. 14
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControls.inputactions.meta
  30. 291
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVis.prefab
  31. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVis.prefab.meta
  32. 337
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVisualizer.unity
  33. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVisualizer.unity.meta
  34. 15
      Project/Assets/Samples/Input System/1.0.1/Visualizers/Unity.InputSystem.Visualizers.asmdef
  35. 7
      Project/Assets/Samples/Input System/1.0.1/Visualizers/Unity.InputSystem.Visualizers.asmdef.meta
  36. 670
      Project/Assets/Samples/Input System/1.0.1/Visualizers/VisualizationHelpers.cs
  37. 11
      Project/Assets/Samples/Input System/1.0.1/Visualizers/VisualizationHelpers.cs.meta

511
Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/FPSAgent.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &77824473
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 77824474}
- component: {fileID: 77824476}
- component: {fileID: 77824475}
m_Layer: 0
m_Name: symbol_circle (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &77824474
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 77824473}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0.75, y: 0, z: 0}
m_LocalScale: {x: 0.4533162, y: 0.4610894, z: 0.40397945}
m_Children: []
m_Father: {fileID: 638259340}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &77824476
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 77824473}
m_Mesh: {fileID: 4300000, guid: 809601725d53c41fb9c7a75071bfbf51, type: 3}
--- !u!23 &77824475
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 77824473}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 69fefdd39d2b34b169e921910bed9c0d, 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: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &638259339
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 638259340}
- component: {fileID: 6246577351805587936}
m_Layer: 11
m_Name: ROCKET LAUNCHER
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &638259340
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 638259339}
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: 1661045545}
- {fileID: 77824474}
- {fileID: 3422985799768274851}
- {fileID: 1292978747}
- {fileID: 939402961825695041}
m_Father: {fileID: 7796409946673122438}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6246577351805587936
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 638259339}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f25a3868f6567418d8fca3276794e44a, type: 3}
m_Name:
m_EditorClassIdentifier:
initialized: 0
projectilePrefab: {fileID: 3911029810215854908, guid: 01e75f85d5a3c451b9a5bed7070be0a0,
type: 3}
numberOfProjectilesToPool: 25
projectileStartingPos: {fileID: 2747490484821474612}
projectileLaunchAngle: 3
shootingRate: 0.5
coolDownWait: 0
autoShootEnabled: 0
autoShootDistance: 30
useStandaloneInput: 0
shootKey: 111
--- !u!1 &982403917
GameObject:
m_ObjectHideFlags: 0

m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &1292978746
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1292978747}
m_Layer: 11
m_Name: Projectile Origin
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1292978747
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1292978746}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0.75, y: 0, z: 0.86435527}
m_LocalScale: {x: 0.40901, y: 0.53686655, z: 0.40901005}
m_Children: []
m_Father: {fileID: 638259340}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1661045544
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1661045545}
- component: {fileID: 1661045548}
- component: {fileID: 1661045547}
- component: {fileID: 1661045546}
m_Layer: 11
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1661045545
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1661045544}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0.75, y: 0, z: 0}
m_LocalScale: {x: 0.40901, y: 0.38493332, z: 0.40901002}
m_Children: []
m_Father: {fileID: 638259340}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &1661045548
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1661045544}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1661045547
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1661045544}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 828a9b9954e5f44769be3aba7d5026a6, 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
--- !u!136 &1661045546
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1661045544}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!1 &1828481691
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 7796409947774005653}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &937568083786121243
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 939402961825695041}
- component: {fileID: 968420919910762991}
- component: {fileID: 960082238652054993}
m_Layer: 0
m_Name: symbol_circle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &939402961825695041
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 937568083786121243}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0.75, y: 0, z: 0.44559926}
m_LocalScale: {x: 0.2095953, y: 0.21318929, z: 0.72042567}
m_Children: []
m_Father: {fileID: 638259340}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &968420919910762991
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 937568083786121243}
m_Mesh: {fileID: 4300000, guid: 809601725d53c41fb9c7a75071bfbf51, type: 3}
--- !u!23 &960082238652054993
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 937568083786121243}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, 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: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &1826354612978772804
GameObject:
m_ObjectHideFlags: 0

m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!108 &879476474
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7541092914985962352}
m_Enabled: 1
serializedVersion: 10
m_Type: 2
m_Shape: 0
m_Color: {r: 1, g: 0.68598413, b: 0, a: 1}
m_Intensity: 8
m_Range: 3
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 0
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!1 &7796409946673122439
GameObject:
m_ObjectHideFlags: 0

- {fileID: 2747490485814106614}
- {fileID: 2747490485226133339}
- {fileID: 2747490485406847267}
- {fileID: 638259340}
m_Father: {fileID: 7796409947774005653}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &7796409947774005653
Transform:
m_ObjectHideFlags: 0

m_ActionName: UI/Restart[/Keyboard/r,/XboxOneGampadMacOSWireless/buttonNorth]
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: bb797917-97ca-47e1-b3c9-0572380e9376
m_DefaultActionMap: Player
m_SplitScreenIndex: -1
m_Camera: {fileID: 1828481695}
--- !u!1 &7796409948114465862

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &8227337536825805965
Transform:
m_ObjectHideFlags: 0

m_CorrespondingSourceObject: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
m_PrefabInstance: {fileID: 5755437831330597732}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8697938320195144439
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 638259340}
m_Modifications:
- target: {fileID: 1158006594261827975, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_Name
value: MuzzleFlash (2)
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.75
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalPosition.z
value: 1.1762745
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.013089583
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.9999144
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8494615155775840143, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: cb2aa8892bed247b58476624d7896b0f, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b24fe96fd75b4646a6e7bf65b6a4943, type: 3}
--- !u!4 &3422985799768274851 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6284117573631589716, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
m_PrefabInstance: {fileID: 8697938320195144439}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7541092914985962352 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1158006594261827975, guid: 1b24fe96fd75b4646a6e7bf65b6a4943,
type: 3}
m_PrefabInstance: {fileID: 8697938320195144439}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8697938321011002431
PrefabInstance:

101
Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity


m_Father: {fileID: 227613370}
m_RootOrder: 4
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -191.66669}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &43715803

m_Father: {fileID: 981231124}
m_RootOrder: 1
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -66.66667}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &88145021

m_Father: {fileID: 227613370}
m_RootOrder: 5
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -233.33336}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &97764606

m_Father: {fileID: 981231124}
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -25}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &419356774

m_Father: {fileID: 227613370}
m_RootOrder: 1
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -66.66667}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &654475876

m_Father: {fileID: 227613370}
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -25}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &695066533

m_Father: {fileID: 981231124}
m_RootOrder: 5
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -233.33336}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &737556610

m_Father: {fileID: 227613370}
m_RootOrder: 2
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -108.33334}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1251752432

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1302122855
RectTransform:
m_ObjectHideFlags: 0

m_Father: {fileID: 981231124}
m_RootOrder: 4
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -191.66669}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1569858439

triggerExplosion: 0
BlueSpawn: {fileID: 1669694872}
PurpleSpawn: {fileID: 247758844}
SpawnPlayer: 0
SpawnBaddies: 1
AITarget: {fileID: 0}
AITarget: {fileID: 1947904074}
NumberOfEnemiesToSpawn: 8
NumberOfEnemiesToSpawn: 3
gameMode: 0
DamagePerHit: 25
--- !u!1 &1628638785

m_Father: {fileID: 981231124}
m_RootOrder: 3
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -150.00002}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1728711168

m_Father: {fileID: 1419764706}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1947904074 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7796409947774005658, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
m_PrefabInstance: {fileID: 8697938320926635008}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1950169285
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 981231124}
m_RootOrder: 2
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -108.33334}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1972672122

m_Father: {fileID: 227613370}
m_RootOrder: 3
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_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 150, y: -150.00002}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2040797276

m_Modification:
m_TransformParent: {fileID: 4595975476135097}
m_Modifications:
- target: {fileID: 638259339, guid: a0e7db83e097b4a3e96a89b390d1ebed, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1376546389932612024, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: UISlider

propertyPath: m_ActionEvents.Array.data[7].m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 914861360}
- target: {fileID: 4453630946124038627, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: m_Actions
value:
objectReference: {fileID: -944628639613478452, guid: 77b3cef930f53497fa86a02fe6c7f145,
type: 3}
- target: {fileID: 6246577351805587936, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: projectileLaunchAngle
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6753286230780216836, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: UISlider

33
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/GameController.cs


public bool triggerExplosion;
[Header("SPAWN POINTS")] public GameObject BlueSpawn;
[Header("SPAWN SETTINGS")]
public GameObject BlueSpawn;
public bool SpawnPlayer;
public bool SpawnBaddies;
[Header("PLAYER PREFABS")]
public GameObject PlayerPrefab;

void Awake()
{
if (PlayerPrefab && BlueSpawn)
if (SpawnPlayer && PlayerPrefab && BlueSpawn)
{
var randomPos = Random.insideUnitSphere * 3;
randomPos.y = 0;

}
if (AIPrefab && PurpleSpawn)
{
var randomPos = Random.insideUnitSphere * 5;
randomPos.y = 0;
var go = Instantiate(AIPrefab, PurpleSpawn.transform.position + randomPos, quaternion.identity);
go.SetActive(true);
}
for (int i = 0; i < NumberOfEnemiesToSpawn; i++)
if (SpawnBaddies)
var randomPos = Random.insideUnitSphere * 40;
randomPos.y = 3;
var go = Instantiate(AIPrefab, SpawnPlatform.position + randomPos, quaternion.identity);
var randomPos = Random.insideUnitSphere * 5;
randomPos.y = 0;
var go = Instantiate(AIPrefab, PurpleSpawn.transform.position + randomPos, quaternion.identity);
for (int i = 0; i < NumberOfEnemiesToSpawn; i++)
{
if (AIPrefab && PurpleSpawn)
{
var randomPos = Random.insideUnitSphere * 40;
randomPos.y = 3;
var go = Instantiate(AIPrefab, SpawnPlatform.position + randomPos, quaternion.identity);
go.SetActive(true);
}
}
}
Rigidbody[] rbs = Resources.FindObjectsOfTypeAll<Rigidbody>();

5
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Black.mat


Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Black
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:

2
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Projectile.mat


- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0

81
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/GrayDark.mat


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

8
Project/Assets/ML-Agents/Examples/SharedAssets/Materials/GrayDark.mat.meta


fileFormatVersion: 2
guid: 828a9b9954e5f44769be3aba7d5026a6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

8
Project/Assets/Samples/Input System/1.0.1/Visualizers.meta


fileFormatVersion: 2
guid: 570ecb08f434e4aab9f54ff765223168
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

4
Project/Assets/Samples/Input System/1.0.1/Visualizers/.sample.json


{
"displayName": "Visualizers",
"description": "Several example visualizations of input controls/devices and input actions."
}

1001
Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVis.prefab
文件差异内容过多而无法显示
查看文件

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVis.prefab.meta


fileFormatVersion: 2
guid: b8429651427a640919754290f3704312
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

274
Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVisualizer.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: 1
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_ShowResolutionOverlay: 1
m_ExportTrainingData: 0
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 &676010914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 676010918}
- component: {fileID: 676010917}
- component: {fileID: 676010916}
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 &676010916
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
--- !u!20 &676010917
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
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 &676010918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
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!1001 &5430831075364511436
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5430831075476541849, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_Name
value: GamepadVis
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalPosition.x
value: 955.3655
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalPosition.y
value: 464.9797
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalPosition.z
value: -160.45508
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5430831075476541851, guid: b8429651427a640919754290f3704312,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b8429651427a640919754290f3704312, type: 3}

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/GamepadVisualizer.unity.meta


fileFormatVersion: 2
guid: 60155d44a3f544d08a44a9fa0b5e2c4e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

322
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputActionVisualizer.cs


using System;
using System.Collections.Generic;
////TODO: support ProcessEventsManually
////TODO: add way to pick by player index
// Some fields assigned through only through serialization.
#pragma warning disable CS0649
namespace UnityEngine.InputSystem.Samples
{
/// <summary>
/// A component for debugging purposes that adds an on-screen display which shows
/// activity on an input action over time (<see cref="InputActionVisualizer.Visualization.Interaction"/>)
/// or an action's current value (<see cref="InputActionVisualizer.Visualization.Value"/>).
/// </summary>
/// <seealso cref="InputControlVisualizer"/>
[AddComponentMenu("Input/Debug/Input Action Visualizer")]
[ExecuteInEditMode]
public class InputActionVisualizer : InputVisualizer
{
/// <summary>
/// The action that is being visualized. May be null.
/// </summary>
public InputAction action => m_Action;
protected void FixedUpdate()
{
if (m_Visualization != Visualization.Value || m_Action == null || m_Visualizer == null)
return;
if (InputSystem.settings.updateMode != InputSettings.UpdateMode.ProcessEventsInFixedUpdate)
return;
RecordValue(Time.fixedTime);
}
protected void Update()
{
if (m_Visualization != Visualization.Value || m_Action == null || m_Visualizer == null)
return;
if (InputSystem.settings.updateMode != InputSettings.UpdateMode.ProcessEventsInDynamicUpdate)
return;
RecordValue(Time.time);
}
protected new void OnEnable()
{
if (m_Visualization == Visualization.None)
return;
base.OnEnable();
ResolveAction();
SetupVisualizer();
if (s_EnabledInstances == null)
s_EnabledInstances = new List<InputActionVisualizer>();
if (s_EnabledInstances.Count == 0)
InputSystem.onActionChange += OnActionChange;
s_EnabledInstances.Add(this);
}
protected new void OnDisable()
{
base.OnDisable();
s_EnabledInstances.Remove(this);
if (s_EnabledInstances.Count == 0)
InputSystem.onActionChange -= OnActionChange;
if (m_Visualization == Visualization.Interaction && m_Action != null)
{
m_Action.started -= OnActionTriggered;
m_Action.performed -= OnActionTriggered;
m_Action.canceled -= OnActionTriggered;
}
}
protected new void OnGUI()
{
if (m_Visualization == Visualization.None)
return;
if (Event.current.type != EventType.Repaint)
return;
base.OnGUI();
if (m_ShowControlName && m_ActiveControlName != null)
VisualizationHelpers.DrawText(m_ActiveControlName, new Vector2(m_Rect.x, m_Rect.yMax),
VisualizationHelpers.ValueTextStyle);
}
private void RecordValue(double time)
{
Debug.Assert(m_Action != null);
Debug.Assert(m_Visualizer != null);
var value = m_Action.ReadValueAsObject();
m_Visualizer.AddSample(value, time);
if (m_ShowControlName)
RecordControlName();
}
private void RecordControlName()
{
var control = m_Action.activeControl;
if (control == m_ActiveControl)
return;
m_ActiveControl = control;
m_ActiveControlName = control != null ? new GUIContent(control.path) : null;
}
private void ResolveAction()
{
// If we have a reference to an action, try that first.
if (m_ActionReference != null)
m_Action = m_ActionReference.action;
// If we didn't get an action from that but we have an action name,
// just search through the currently enabled actions for one that
// matches by name.
if (m_Action == null && !string.IsNullOrEmpty(m_ActionName))
{
var slashIndex = m_ActionName.IndexOf('/');
var mapName = slashIndex != -1 ? m_ActionName.Substring(0, slashIndex) : null;
var actionName = slashIndex != -1 ? m_ActionName.Substring(slashIndex + 1) : m_ActionName;
var enabledActions = InputSystem.ListEnabledActions();
foreach (var action in enabledActions)
{
if (string.Compare(actionName, action.name, StringComparison.InvariantCultureIgnoreCase) != 0)
continue;
if (mapName != null && action.actionMap != null && string.Compare(mapName, action.actionMap.name,
StringComparison.InvariantCultureIgnoreCase) != 0)
continue;
m_Action = action;
break;
}
}
// If we still don't have an action, there's nothing much for us to do.
// The action may show up at a later point.
if (m_Action == null)
return;
if (m_Visualization == Visualization.Interaction)
{
m_Action.performed += OnActionTriggered;
m_Action.started += OnActionTriggered;
m_Action.canceled += OnActionTriggered;
}
}
private void SetupVisualizer()
{
m_Visualizer = null;
if (m_Action == null)
return;
switch (m_Visualization)
{
case Visualization.Value:
switch (m_Action.type)
{
case InputActionType.Button:
m_Visualizer = new VisualizationHelpers.ScalarVisualizer<float>
{
limitMax = 1
};
break;
case InputActionType.Value:
case InputActionType.PassThrough:
if (!string.IsNullOrEmpty(m_Action.expectedControlType))
{
var layout = InputSystem.LoadLayout(m_Action.expectedControlType);
if (layout != null)
{
var valueType = layout.GetValueType();
if (valueType == typeof(float))
m_Visualizer = new VisualizationHelpers.ScalarVisualizer<float>
{
limitMax = 1
};
else if (valueType == typeof(int))
m_Visualizer = new VisualizationHelpers.ScalarVisualizer<int>
{
limitMax = 1
};
else if (valueType == typeof(Vector2))
m_Visualizer = new VisualizationHelpers.Vector2Visualizer();
}
}
break;
}
break;
case Visualization.Interaction:
// We don't really know which interactions are sitting on the action and its bindings
// and while we could do and perform work to find out, it's simpler to just wait until
// we get input and then whatever interactions we encounter as we go along. Also keeps
// the visualization a little less cluttered.
m_Visualizer = new VisualizationHelpers.TimelineVisualizer();
break;
}
}
private void OnActionDisabled()
{
}
private void OnActionTriggered(InputAction.CallbackContext context)
{
Debug.Assert(m_Visualization == Visualization.Interaction);
var timelineName = "Default";
var interaction = context.interaction;
if (interaction != null)
{
timelineName = interaction.GetType().Name;
if (timelineName.EndsWith("Interaction"))
timelineName = timelineName.Substring(0, timelineName.Length - "Interaction".Length);
}
var visualizer = (VisualizationHelpers.TimelineVisualizer)m_Visualizer;
var timelineIndex = visualizer.GetTimeline(timelineName);
if (timelineIndex == -1)
{
Color color;
timelineIndex = visualizer.timelineCount;
if (timelineIndex < s_InteractionColors.Length)
color = s_InteractionColors[timelineIndex];
else
color = new Color(Random.value, Random.value, Random.value, 1);
visualizer.AddTimeline(timelineName, color);
if (timelineIndex > 0)
visualizer.showLegend = true;
}
var time = (float)context.time;
switch (context.phase)
{
case InputActionPhase.Canceled:
visualizer.AddSample(timelineIndex, 0f, time);
break;
case InputActionPhase.Performed:
visualizer.AddSample(timelineIndex, 1f, time);
visualizer.AddSample(timelineIndex, 0f, time);
break;
case InputActionPhase.Started:
visualizer.AddSample(timelineIndex, 0.5f, time);
break;
}
if (m_ShowControlName)
RecordControlName();
}
private static void OnActionChange(object actionOrMap, InputActionChange change)
{
switch (change)
{
case InputActionChange.ActionEnabled:
case InputActionChange.ActionMapEnabled:
for (var i = 0; i < s_EnabledInstances.Count; ++i)
if (s_EnabledInstances[i].m_Action == null)
{
s_EnabledInstances[i].ResolveAction();
if (s_EnabledInstances[i].m_Action != null)
s_EnabledInstances[i].SetupVisualizer();
}
break;
case InputActionChange.ActionDisabled:
for (var i = 0; i < s_EnabledInstances.Count; ++i)
if (actionOrMap == s_EnabledInstances[i].m_Action)
s_EnabledInstances[i].OnActionDisabled();
break;
case InputActionChange.ActionMapDisabled:
for (var i = 0; i < s_EnabledInstances.Count; ++i)
if (s_EnabledInstances[i].m_Action?.actionMap == actionOrMap)
s_EnabledInstances[i].OnActionDisabled();
break;
}
}
[SerializeField] private Visualization m_Visualization;
[SerializeField] private InputActionReference m_ActionReference;
[SerializeField] private string m_ActionName;
[SerializeField] private bool m_ShowControlName;
[NonSerialized] private InputAction m_Action;
[NonSerialized] private InputControl m_ActiveControl;
[NonSerialized] private GUIContent m_ActiveControlName;
private static List<InputActionVisualizer> s_EnabledInstances;
private static readonly Color[] s_InteractionColors =
{
new Color(1, 0, 0, 1),
new Color(0, 0, 1, 1),
new Color(1, 1, 0, 1),
new Color(1, 0, 1, 1),
new Color(0, 1, 1, 1),
new Color(0, 1, 0, 1),
};
public enum Visualization
{
None,
Value,
Interaction,
}
}
}

11
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputActionVisualizer.cs.meta


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

359
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputControlVisualizer.cs


using System;
using System.Collections.Generic;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.LowLevel;
////TODO: add way to plot values over time
// Goal is to build this out into something that can visualize a large number of
// aspects about an InputControl/InputDevice especially with an eye towards making
// it a good deal to debug any input collection/processing irregularities that may
// be seen in players (or the editor, for that matter).
// Some fields assigned through only through serialization.
#pragma warning disable CS0649
namespace UnityEngine.InputSystem.Samples
{
/// <summary>
/// A component for debugging purposes that adds an on-screen display which shows
/// activity on an input control over time.
/// </summary>
/// <remarks>
/// This component is most useful for debugging input directly on the source device.
/// </remarks>
/// <seealso cref="InputActionVisualizer"/>
[AddComponentMenu("Input/Debug/Input Control Visualizer")]
[ExecuteInEditMode]
public class InputControlVisualizer : InputVisualizer
{
/// <summary>
/// What kind of visualization to show.
/// </summary>
public Mode visualization
{
get => m_Visualization;
set
{
if (m_Visualization == value)
return;
m_Visualization = value;
SetupVisualizer();
}
}
/// <summary>
/// Path of the control that is to be visualized.
/// </summary>
/// <seealso cref="InputControlPath"/>
/// <seealso cref="InputControl.path"/>
public string controlPath
{
get => m_ControlPath;
set
{
m_ControlPath = value;
if (m_Control != null)
ResolveControl();
}
}
/// <summary>
/// If, at runtime, multiple controls are matching <see cref="controlPath"/>, this property
/// determines the index of the control that is retrieved from the possible options.
/// </summary>
public int controlIndex
{
get => m_ControlIndex;
set
{
m_ControlIndex = value;
if (m_Control != null)
ResolveControl();
}
}
/// <summary>
/// The control resolved from <see cref="controlPath"/> at runtime. May be null.
/// </summary>
public InputControl control => m_Control;
protected new void OnEnable()
{
if (m_Visualization == Mode.None)
return;
if (s_EnabledInstances == null)
s_EnabledInstances = new List<InputControlVisualizer>();
if (s_EnabledInstances.Count == 0)
{
InputSystem.onDeviceChange += OnDeviceChange;
InputSystem.onEvent += OnEvent;
}
s_EnabledInstances.Add(this);
ResolveControl();
base.OnEnable();
}
protected new void OnDisable()
{
if (m_Visualization == Mode.None)
return;
s_EnabledInstances.Remove(this);
if (s_EnabledInstances.Count == 0)
{
InputSystem.onDeviceChange -= OnDeviceChange;
InputSystem.onEvent -= OnEvent;
}
m_Control = null;
base.OnDisable();
}
protected new void OnGUI()
{
if (m_Visualization == Mode.None)
return;
base.OnGUI();
}
protected new void OnValidate()
{
ResolveControl();
base.OnValidate();
}
[Tooltip("The type of visualization to perform for the control.")]
[SerializeField] private Mode m_Visualization;
[Tooltip("Path of the control that should be visualized. If at runtime, multiple "
+ "controls match the given path, the 'Control Index' property can be used to decide "
+ "which of the controls to visualize.")]
[InputControl, SerializeField] private string m_ControlPath;
[Tooltip("If multiple controls match 'Control Path' at runtime, this property decides "
+ "which control to visualize from the list of candidates. It is a zero-based index.")]
[SerializeField] private int m_ControlIndex;
[NonSerialized] private InputControl m_Control;
private static List<InputControlVisualizer> s_EnabledInstances;
private void ResolveControl()
{
m_Control = null;
if (string.IsNullOrEmpty(m_ControlPath))
return;
using (var candidates = InputSystem.FindControls(m_ControlPath))
{
var numCandidates = candidates.Count;
if (numCandidates > 1 && m_ControlIndex < numCandidates && m_ControlIndex >= 0)
m_Control = candidates[m_ControlIndex];
else if (numCandidates > 0)
m_Control = candidates[0];
}
SetupVisualizer();
}
private void SetupVisualizer()
{
if (m_Control == null)
{
m_Visualizer = null;
return;
}
switch (m_Visualization)
{
case Mode.Value:
{
var valueType = m_Control.valueType;
if (valueType == typeof(Vector2))
m_Visualizer = new VisualizationHelpers.Vector2Visualizer(m_HistorySamples);
else if (valueType == typeof(float))
m_Visualizer = new VisualizationHelpers.ScalarVisualizer<float>(m_HistorySamples)
{
////TODO: pass actual min/max limits of control
limitMax = 1,
limitMin = 0
};
else if (valueType == typeof(int))
m_Visualizer = new VisualizationHelpers.ScalarVisualizer<int>(m_HistorySamples)
{
////TODO: pass actual min/max limits of control
limitMax = 1,
limitMin = 0
};
else
{
////TODO: generic visualizer
}
break;
}
case Mode.Events:
{
var visualizer = new VisualizationHelpers.TimelineVisualizer(m_HistorySamples)
{
timeUnit = VisualizationHelpers.TimelineVisualizer.TimeUnit.Frames,
historyDepth = m_HistorySamples,
showLimits = true,
limitsY = new Vector2(0, 5) // Will expand upward automatically
};
m_Visualizer = visualizer;
visualizer.AddTimeline("Events", Color.green,
VisualizationHelpers.TimelineVisualizer.PlotType.BarChart);
break;
}
case Mode.MaximumLag:
{
var visualizer = new VisualizationHelpers.TimelineVisualizer(m_HistorySamples)
{
timeUnit = VisualizationHelpers.TimelineVisualizer.TimeUnit.Frames,
historyDepth = m_HistorySamples,
valueUnit = new GUIContent("ms"),
showLimits = true,
limitsY = new Vector2(0, 6)
};
m_Visualizer = visualizer;
visualizer.AddTimeline("MaxLag", Color.red,
VisualizationHelpers.TimelineVisualizer.PlotType.BarChart);
break;
}
case Mode.Bytes:
{
var visualizer = new VisualizationHelpers.TimelineVisualizer(m_HistorySamples)
{
timeUnit = VisualizationHelpers.TimelineVisualizer.TimeUnit.Frames,
valueUnit = new GUIContent("bytes"),
historyDepth = m_HistorySamples,
showLimits = true,
limitsY = new Vector2(0, 64)
};
m_Visualizer = visualizer;
visualizer.AddTimeline("Bytes", Color.red,
VisualizationHelpers.TimelineVisualizer.PlotType.BarChart);
break;
}
default:
throw new NotImplementedException();
}
}
private static void OnDeviceChange(InputDevice device, InputDeviceChange change)
{
if (change != InputDeviceChange.Added && change != InputDeviceChange.Removed)
return;
for (var i = 0; i < s_EnabledInstances.Count; ++i)
{
var component = s_EnabledInstances[i];
if (change == InputDeviceChange.Removed && component.m_Control != null &&
component.m_Control.device == device)
component.ResolveControl();
else if (change == InputDeviceChange.Added)
component.ResolveControl();
}
}
private static void OnEvent(InputEventPtr eventPtr, InputDevice device)
{
// Ignore very first update as we usually get huge lag spikes and event count
// spikes in it from stuff that has accumulated while going into play mode or
// starting up the player.
if (InputState.updateCount <= 1)
return;
if (InputState.currentUpdateType == InputUpdateType.Editor)
return;
if (!eventPtr.IsA<StateEvent>() && !eventPtr.IsA<DeltaStateEvent>())
return;
for (var i = 0; i < s_EnabledInstances.Count; ++i)
{
var component = s_EnabledInstances[i];
if (component.m_Control?.device != device || component.m_Visualizer == null)
continue;
component.OnEventImpl(eventPtr);
}
}
private unsafe void OnEventImpl(InputEventPtr eventPtr)
{
switch (m_Visualization)
{
case Mode.Value:
{
var statePtr = m_Control.GetStatePtrFromStateEvent(eventPtr);
if (statePtr == null)
return; // No value for control in event.
var value = m_Control.ReadValueFromStateAsObject(statePtr);
m_Visualizer.AddSample(value, eventPtr.time);
break;
}
case Mode.Events:
{
var visualizer = (VisualizationHelpers.TimelineVisualizer)m_Visualizer;
var frame = (int)InputState.updateCount;
ref var valueRef = ref visualizer.GetOrCreateSample(0, frame);
var value = valueRef.ToInt32() + 1;
valueRef = value;
visualizer.limitsY =
new Vector2(0, Mathf.Max(value, visualizer.limitsY.y));
break;
}
case Mode.MaximumLag:
{
var visualizer = (VisualizationHelpers.TimelineVisualizer)m_Visualizer;
var lag = (Time.realtimeSinceStartup - eventPtr.time) * 1000; // In milliseconds.
var frame = (int)InputState.updateCount;
ref var valueRef = ref visualizer.GetOrCreateSample(0, frame);
if (lag > valueRef.ToDouble())
{
valueRef = lag;
if (lag > visualizer.limitsY.y)
visualizer.limitsY = new Vector2(0, Mathf.Ceil((float)lag));
}
break;
}
case Mode.Bytes:
{
var visualizer = (VisualizationHelpers.TimelineVisualizer)m_Visualizer;
var frame = (int)InputState.updateCount;
ref var valueRef = ref visualizer.GetOrCreateSample(0, frame);
var value = valueRef.ToInt32() + eventPtr.sizeInBytes;
valueRef = value;
visualizer.limitsY =
new Vector2(0, Mathf.Max(value, visualizer.limitsY.y));
break;
}
}
}
/// <summary>
/// Determines which aspect of the control should be visualized.
/// </summary>
public enum Mode
{
None = 0,
Value = 1,
Events = 4,
MaximumLag = 6,
Bytes = 7,
}
}
}

11
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputControlVisualizer.cs.meta


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

83
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputVisualizer.cs


using System;
// Some fields assigned through only through serialization.
#pragma warning disable CS0649
namespace UnityEngine.InputSystem.Samples
{
/// <summary>
/// Base class for <see cref="InputActionVisualizer"/> and <see cref="InputControlVisualizer"/>.
/// Not meant to be extended outside of input system.
/// </summary>
public abstract class InputVisualizer : MonoBehaviour
{
protected void OnEnable()
{
ResolveParent();
}
protected void OnDisable()
{
m_Parent = null;
m_Visualizer = null;
}
protected void OnGUI()
{
if (Event.current.type != EventType.Repaint)
return;
// If we have a parent, offset our rect by the parent.
var rect = m_Rect;
if (m_Parent != null)
rect.position += m_Parent.m_Rect.position;
if (m_Visualizer != null)
m_Visualizer.OnDraw(rect);
else
VisualizationHelpers.DrawRectangle(rect, new Color(1, 1, 1, 0.1f));
// Draw label, if we have one.
if (!string.IsNullOrEmpty(m_Label))
{
if (m_LabelContent == null)
m_LabelContent = new GUIContent(m_Label);
if (s_LabelStyle == null)
{
s_LabelStyle = new GUIStyle();
s_LabelStyle.normal.textColor = Color.yellow;
}
////FIXME: why does CalcSize not calculate the rect width correctly?
var labelSize = s_LabelStyle.CalcSize(m_LabelContent);
var labelRect = new Rect(rect.x + 4, rect.y, labelSize.x + 4, rect.height);
s_LabelStyle.Draw(labelRect, m_LabelContent, false, false, false, false);
}
}
protected void OnValidate()
{
ResolveParent();
m_LabelContent = null;
}
protected void ResolveParent()
{
var parentTransform = transform.parent;
if (parentTransform != null)
m_Parent = parentTransform.GetComponent<InputControlVisualizer>();
}
[SerializeField] internal string m_Label;
[SerializeField] internal int m_HistorySamples = 500;
[SerializeField] internal float m_TimeWindow = 3;
[SerializeField] internal Rect m_Rect = new Rect(10, 10, 300, 30);
[NonSerialized] internal GUIContent m_LabelContent;
[NonSerialized] internal VisualizationHelpers.Visualizer m_Visualizer;
[NonSerialized] internal InputVisualizer m_Parent;
private static GUIStyle s_LabelStyle;
}
}

11
Project/Assets/Samples/Input System/1.0.1/Visualizers/InputVisualizer.cs.meta


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

561
Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVis.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1425893226964488728
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8404550706546444740}
- component: {fileID: 9057694317555835649}
m_Layer: 0
m_Name: Scroll
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8404550706546444740
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1425893226964488728}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &9057694317555835649
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1425893226964488728}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Scroll
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 350
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Mouse>/scroll
m_ControlIndex: 0
--- !u!1 &2680667828813364402
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667828813364403}
- component: {fileID: 2680667828813364412}
m_Layer: 0
m_Name: MMB
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667828813364403
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828813364402}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667828813364412
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828813364402}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: MMB
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 85
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Mouse>/middleButton
m_ControlIndex: 0
--- !u!1 &2680667828976453752
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667828976453753}
- component: {fileID: 2680667828976453754}
m_Layer: 0
m_Name: LMB
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667828976453753
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828976453752}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667828976453754
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828976453752}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: LMB
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 25
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Mouse>/leftButton
m_ControlIndex: 0
--- !u!1 &2680667828982178413
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667828982178415}
- component: {fileID: 2680667828982178414}
m_Layer: 0
m_Name: Events
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667828982178415
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828982178413}
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: 2680667830796240931}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667828982178414
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667828982178413}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Events
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 375
width: 700
height: 70
m_Visualization: 4
m_ControlPath: <Mouse>
m_ControlIndex: 0
--- !u!1 &2680667830654736508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830654736509}
- component: {fileID: 2680667830654736510}
m_Layer: 0
m_Name: Lag
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830654736509
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830654736508}
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: 2680667830796240931}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830654736510
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830654736508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Lag (ms)
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 460
width: 700
height: 70
m_Visualization: 6
m_ControlPath: <Mouse>
m_ControlIndex: 0
--- !u!1 &2680667830751945958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830751945952}
- component: {fileID: 2680667830751945959}
m_Layer: 0
m_Name: Position
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830751945952
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830751945958}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830751945959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830751945958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Position
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 0
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Mouse>/position
m_ControlIndex: 0
--- !u!1 &2680667830796240929
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830796240931}
- component: {fileID: 2680667830796240930}
m_Layer: 0
m_Name: MouseVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830796240931
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830796240929}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 955.3655, y: 464.9797, z: -160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2680667830751945952}
- {fileID: 2680667830847656253}
- {fileID: 8404550706546444740}
- {fileID: 2680667828976453753}
- {fileID: 2680667828813364403}
- {fileID: 2680667830881149239}
- {fileID: 2680667828982178415}
- {fileID: 2680667830654736509}
- {fileID: 2680667830892693960}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830796240930
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830796240929}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label:
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 15
y: 10
width: 300
height: 30
m_Visualization: 0
m_ControlPath:
m_ControlIndex: 0
--- !u!1 &2680667830847656252
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830847656253}
- component: {fileID: 2680667830847656254}
m_Layer: 0
m_Name: Delta
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830847656253
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830847656252}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830847656254
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830847656252}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Delta
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 175
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Mouse>/delta
m_ControlIndex: 0
--- !u!1 &2680667830881149238
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830881149239}
- component: {fileID: 2680667830881149232}
m_Layer: 0
m_Name: RMB
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830881149239
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830881149238}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2680667830796240931}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830881149232
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830881149238}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: RMB
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 145
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Mouse>/rightButton
m_ControlIndex: 0
--- !u!1 &2680667830892693967
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2680667830892693960}
- component: {fileID: 2680667830892693961}
m_Layer: 0
m_Name: Bytes
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2680667830892693960
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830892693967}
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: 2680667830796240931}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2680667830892693961
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2680667830892693967}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Bytes
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 550
width: 700
height: 70
m_Visualization: 7
m_ControlPath: <Mouse>
m_ControlIndex: 0

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVis.prefab.meta


fileFormatVersion: 2
guid: 76c62aa07f01945d4b9afdb34d7a3396
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

274
Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVisualizer.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: 1
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_ShowResolutionOverlay: 1
m_ExportTrainingData: 0
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 &676010914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 676010918}
- component: {fileID: 676010917}
- component: {fileID: 676010916}
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 &676010916
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
--- !u!20 &676010917
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
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 &676010918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
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!1001 &2680667830097201012
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2680667830796240929, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_Name
value: MouseVis
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalPosition.x
value: 955.3655
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalPosition.y
value: 464.9797
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalPosition.z
value: -160.45508
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2680667830796240931, guid: 76c62aa07f01945d4b9afdb34d7a3396,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 76c62aa07f01945d4b9afdb34d7a3396, type: 3}

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/MouseVisualizer.unity.meta


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

897
Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVis.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3520677240532848139
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677240532848138}
- component: {fileID: 3520677240532848141}
m_Layer: 0
m_Name: Eraser
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677240532848138
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677240532848139}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677240532848141
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677240532848139}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Eraser
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 375
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/eraser
m_ControlIndex: 0
--- !u!1 &3520677240764781865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677240764781864}
- component: {fileID: 3520677240764781867}
m_Layer: 0
m_Name: Twist
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677240764781864
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677240764781865}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677240764781867
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677240764781865}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Twist
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 250
y: 250
width: 150
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/twist
m_ControlIndex: 0
--- !u!1 &3520677241026549177
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241026549176}
- component: {fileID: 3520677241026549179}
m_Layer: 0
m_Name: Lag
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241026549176
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241026549177}
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: 3520677241453528550}
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241026549179
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241026549177}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Lag (ms)
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 460
width: 700
height: 70
m_Visualization: 6
m_ControlPath: <Pen>
m_ControlIndex: 0
--- !u!1 &3520677241337048307
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241337048306}
- component: {fileID: 3520677241337048309}
m_Layer: 0
m_Name: Barrel2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241337048306
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241337048307}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241337048309
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241337048307}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: 2nd
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 145
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/barrel2
m_ControlIndex: 0
--- !u!1 &3520677241357042698
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241357042701}
- component: {fileID: 3520677241357042700}
m_Layer: 0
m_Name: Bytes
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241357042701
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241357042698}
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: 3520677241453528550}
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241357042700
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241357042698}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Bytes
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 550
width: 700
height: 70
m_Visualization: 7
m_ControlPath: <Pen>
m_ControlIndex: 0
--- !u!1 &3520677241370664185
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241370664184}
- component: {fileID: 3520677241370664187}
m_Layer: 0
m_Name: Delta
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241370664184
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241370664185}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241370664187
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241370664185}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Delta
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 175
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Pen>/delta
m_ControlIndex: 0
--- !u!1 &3520677241453528548
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241453528550}
- component: {fileID: 3520677241453528551}
m_Layer: 0
m_Name: PenVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241453528550
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241453528548}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 955.3655, y: 464.9797, z: -160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3520677241460091173}
- {fileID: 3520677241370664184}
- {fileID: 3520677241761661964}
- {fileID: 3520677241631212988}
- {fileID: 3520677241919970684}
- {fileID: 3520677240764781864}
- {fileID: 3520677241827783030}
- {fileID: 3520677241337048306}
- {fileID: 3520677242431053811}
- {fileID: 3520677242357097670}
- {fileID: 3520677240532848138}
- {fileID: 3520677242061452019}
- {fileID: 3520677241652670378}
- {fileID: 3520677241026549176}
- {fileID: 3520677241357042701}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241453528551
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241453528548}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label:
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 15
y: 10
width: 300
height: 30
m_Visualization: 0
m_ControlPath:
m_ControlIndex: 0
--- !u!1 &3520677241460091171
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241460091173}
- component: {fileID: 3520677241460091170}
m_Layer: 0
m_Name: Position
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241460091173
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241460091171}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241460091170
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241460091171}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Position
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 0
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Pen>/position
m_ControlIndex: 0
--- !u!1 &3520677241631212989
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241631212988}
- component: {fileID: 3520677241631212991}
m_Layer: 0
m_Name: Tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241631212988
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241631212989}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241631212991
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241631212989}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Tip
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 25
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/tip
m_ControlIndex: 0
--- !u!1 &3520677241652670376
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241652670378}
- component: {fileID: 3520677241652670379}
m_Layer: 0
m_Name: Events
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241652670378
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241652670376}
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: 3520677241453528550}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241652670379
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241652670376}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Events
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 20
y: 375
width: 700
height: 70
m_Visualization: 4
m_ControlPath: <Pen>
m_ControlIndex: 0
--- !u!1 &3520677241761661965
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241761661964}
- component: {fileID: 3520677241761661967}
m_Layer: 0
m_Name: Tilt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241761661964
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241761661965}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241761661967
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241761661965}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Tilt
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 350
y: 0
width: 150
height: 150
m_Visualization: 1
m_ControlPath: <Pen>/tilt
m_ControlIndex: 0
--- !u!1 &3520677241827783031
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241827783030}
- component: {fileID: 3520677241827783033}
m_Layer: 0
m_Name: Barrel1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241827783030
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241827783031}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241827783033
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241827783031}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: 1st
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 85
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/barrel1
m_ControlIndex: 0
--- !u!1 &3520677241919970685
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677241919970684}
- component: {fileID: 3520677241919970687}
m_Layer: 0
m_Name: Pressure
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677241919970684
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241919970685}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677241919970687
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677241919970685}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Pressure
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 25
y: 250
width: 200
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/pressure
m_ControlIndex: 0
--- !u!1 &3520677242061452016
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677242061452019}
- component: {fileID: 3520677242061452018}
m_Layer: 0
m_Name: InRange
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677242061452019
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242061452016}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677242061452018
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242061452016}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: InRange
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 435
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/inRange
m_ControlIndex: 0
--- !u!1 &3520677242357097671
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677242357097670}
- component: {fileID: 3520677242357097673}
m_Layer: 0
m_Name: Barrel4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677242357097670
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242357097671}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677242357097673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242357097671}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: 4th
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 265
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/barrel4
m_ControlIndex: 0
--- !u!1 &3520677242431053808
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3520677242431053811}
- component: {fileID: 3520677242431053810}
m_Layer: 0
m_Name: Barrel3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3520677242431053811
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242431053808}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -955.3655, y: -464.9797, z: 160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3520677241453528550}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3520677242431053810
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3520677242431053808}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 50c7363fac4d24ae8a679e3e8f1fa838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: 3rd
m_HistorySamples: 100
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 205
y: 175
width: 50
height: 50
m_Visualization: 1
m_ControlPath: <Pen>/barrel3
m_ControlIndex: 0

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVis.prefab.meta


fileFormatVersion: 2
guid: 15e76881a88c849388ecd62eb8a05750
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

274
Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVisualizer.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: 1
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_ShowResolutionOverlay: 1
m_ExportTrainingData: 0
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 &676010914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 676010918}
- component: {fileID: 676010917}
- component: {fileID: 676010916}
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 &676010916
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
--- !u!20 &676010917
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
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 &676010918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
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!1001 &3520677240537631409
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3520677241453528548, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_Name
value: PenVis
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalPosition.x
value: 955.3655
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalPosition.y
value: 464.9797
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalPosition.z
value: -160.45508
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3520677241453528550, guid: 15e76881a88c849388ecd62eb8a05750,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 15e76881a88c849388ecd62eb8a05750, type: 3}

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/PenVisualizer.unity.meta


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

137
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControls.inputactions


{
"name": "SimpleControls",
"maps": [
{
"name": "gameplay",
"id": "265c38f5-dd18-4d34-b198-aec58e1627ff",
"actions": [
{
"name": "fire",
"type": "Button",
"id": "1077f913-a9f9-41b1-acb3-b9ee0adbc744",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "move",
"type": "Value",
"id": "50fd2809-3aa3-4a90-988e-1facf6773553",
"expectedControlType": "Stick",
"processors": "",
"interactions": ""
},
{
"name": "look",
"type": "Value",
"id": "c60e0974-d140-4597-a40e-9862193067e9",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "abb776f3-f329-4f7b-bbf8-b577d13be018",
"path": "*/{PrimaryAction}",
"interactions": "Tap,SlowTap",
"processors": "",
"groups": "",
"action": "fire",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e1b8c4dd-7b3a-4db6-a93a-0889b59b1afc",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "Dpad",
"id": "cefc16fc-557a-44b0-939f-2ad792876b07",
"path": "Dpad",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "07244659-79df-461d-b329-defbe2fbc5f6",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "f0ec75cb-f02c-40d2-a33f-1fd6eab2ae0b",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "21fe6bfe-4721-4483-9f4a-a0031ade105c",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "2dd39746-c75c-4a11-838a-e59eacaf4e0b",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "",
"action": "move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "c106d6e6-2780-47ff-b318-396171bd54cc",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "",
"groups": "",
"action": "look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "578caa03-6827-4797-adfc-a59770c437fe",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "ScaleVector2(x=2,y=2)",
"groups": "",
"action": "look",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
}

14
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControls.inputactions.meta


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

291
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVis.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1309930466035750405
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309930466035750406}
- component: {fileID: 1309930466035750407}
m_Layer: 0
m_Name: MoveActionVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1309930466035750406
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466035750405}
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: 1309930466712146553}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1309930466035750407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466035750405}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 939ce9f3839b54466af594f7854ed222, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Move
m_HistorySamples: 500
m_TimeWindow: 4
m_Rect:
serializedVersion: 2
x: 225
y: 125
width: 150
height: 150
m_Visualization: 1
m_ActionReference: {fileID: 0}
m_ActionName: move
m_PlayerIndex: 0
m_ShowControlName: 1
--- !u!1 &1309930466250040071
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309930466250040120}
- component: {fileID: 1309930466250040121}
m_Layer: 0
m_Name: FireActionVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1309930466250040120
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466250040071}
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: 1309930466712146553}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1309930466250040121
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466250040071}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 939ce9f3839b54466af594f7854ed222, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Fire
m_HistorySamples: 500
m_TimeWindow: 4
m_Rect:
serializedVersion: 2
x: 50
y: 50
width: 50
height: 50
m_Visualization: 1
m_ActionReference: {fileID: 0}
m_ActionName: fire
m_PlayerIndex: 0
m_ShowControlName: 1
--- !u!1 &1309930466712146503
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309930466712146553}
- component: {fileID: 1309930466712146552}
m_Layer: 0
m_Name: SimpleControlsVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1309930466712146553
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466712146503}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 955.3655, y: 464.9797, z: -160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1309930466250040120}
- {fileID: 1309930467610566051}
- {fileID: 1309930467894820737}
- {fileID: 1309930466035750406}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1309930466712146552
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930466712146503}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 939ce9f3839b54466af594f7854ed222, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label:
m_HistorySamples: 500
m_TimeWindow: 3
m_Rect:
serializedVersion: 2
x: 0
y: 0
width: 300
height: 30
m_Visualization: 0
m_ActionReference: {fileID: 0}
m_ActionName:
m_PlayerIndex: 0
m_ShowControlName: 0
--- !u!1 &1309930467610566049
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309930467610566051}
- component: {fileID: 1309930467610566050}
m_Layer: 0
m_Name: FireActionVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1309930467610566051
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930467610566049}
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: 1309930466712146553}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1309930467610566050
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930467610566049}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 939ce9f3839b54466af594f7854ed222, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label:
m_HistorySamples: 500
m_TimeWindow: 4
m_Rect:
serializedVersion: 2
x: 110
y: 50
width: 200
height: 50
m_Visualization: 2
m_ActionReference: {fileID: 0}
m_ActionName: fire
m_PlayerIndex: 0
m_ShowControlName: 0
--- !u!1 &1309930467894820736
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1309930467894820737}
- component: {fileID: 1309930467894820738}
m_Layer: 0
m_Name: LookActionVis
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1309930467894820737
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930467894820736}
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: 1309930466712146553}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1309930467894820738
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1309930467894820736}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 939ce9f3839b54466af594f7854ed222, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Label: Look
m_HistorySamples: 1000
m_TimeWindow: 4
m_Rect:
serializedVersion: 2
x: 50
y: 125
width: 150
height: 150
m_Visualization: 1
m_ActionReference: {fileID: 0}
m_ActionName: look
m_PlayerIndex: 0
m_ShowControlName: 1

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVis.prefab.meta


fileFormatVersion: 2
guid: cd3e0c715b35445fbb238f50ba9c9332
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

337
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVisualizer.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: 1
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_ShowResolutionOverlay: 1
m_ExportTrainingData: 0
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 &524695744
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 524695745}
- component: {fileID: 524695746}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &524695745
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 524695744}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 955.3655, y: 464.9797, z: -160.45508}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &524695746
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 524695744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: dc782cd8f65d34f0a9c0e85380a5b684,
type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.InputSystem.PlayerInput.PlayerInput+DeviceLostEvent, Unity.InputSystem,
Version=0.9.1.0, Culture=neutral, PublicKeyToken=null
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.InputSystem.PlayerInput.PlayerInput+DeviceRegainedEvent,
Unity.InputSystem, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null
m_ActionEvents: []
m_AutoSwitchControlScheme: 0
m_DefaultControlScheme:
m_DefaultActionMap: 265c38f5-dd18-4d34-b198-aec58e1627ff
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!1 &676010914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 676010918}
- component: {fileID: 676010917}
- component: {fileID: 676010916}
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 &676010916
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
--- !u!20 &676010917
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
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 &676010918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 676010914}
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!1001 &1309930466053861656
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1309930466712146503, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_Name
value: SimpleControlsVis
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalPosition.x
value: 955.3655
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalPosition.y
value: 464.9797
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalPosition.z
value: -160.45508
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1309930466712146553, guid: cd3e0c715b35445fbb238f50ba9c9332,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cd3e0c715b35445fbb238f50ba9c9332, type: 3}

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/SimpleControlsVisualizer.unity.meta


fileFormatVersion: 2
guid: 14281ec1c6daa42bc97c543e027b5839
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

15
Project/Assets/Samples/Input System/1.0.1/Visualizers/Unity.InputSystem.Visualizers.asmdef


{
"name": "InputSystem.Samples.Visualizers",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
}

7
Project/Assets/Samples/Input System/1.0.1/Visualizers/Unity.InputSystem.Visualizers.asmdef.meta


fileFormatVersion: 2
guid: 728e24aed463f43edbdc096fef896432
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

670
Project/Assets/Samples/Input System/1.0.1/Visualizers/VisualizationHelpers.cs


using System;
using UnityEngine.InputSystem.Utilities;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine.InputSystem.LowLevel;
////REVIEW: for vector2 visualizers of sticks, it could be useful to also visualize deadzones and raw values
namespace UnityEngine.InputSystem.Samples
{
internal static class VisualizationHelpers
{
public enum Axis { X, Y, Z }
public abstract class Visualizer
{
public abstract void OnDraw(Rect rect);
public abstract void AddSample(object value, double time);
}
public abstract class ValueVisualizer<TValue> : Visualizer
where TValue : struct
{
public RingBuffer<TValue> samples;
public RingBuffer<GUIContent> samplesText;
protected ValueVisualizer(int numSamples = 10)
{
samples = new RingBuffer<TValue>(numSamples);
samplesText = new RingBuffer<GUIContent>(numSamples);
}
public override void AddSample(object value, double time)
{
var v = default(TValue);
if (value != null)
{
if (!(value is TValue val))
throw new ArgumentException(
$"Expecting value of type '{typeof(TValue).Name}' but value of type '{value?.GetType().Name}' instead",
nameof(value));
v = val;
}
samples.Append(v);
samplesText.Append(new GUIContent(v.ToString()));
}
}
// Visualizes integer and real type primitives.
public class ScalarVisualizer<TValue> : ValueVisualizer<TValue>
where TValue : struct
{
public TValue limitMin;
public TValue limitMax;
public TValue min;
public TValue max;
public ScalarVisualizer(int numSamples = 10)
: base(numSamples)
{
}
public override void OnDraw(Rect rect)
{
// For now, only draw the current value.
DrawRectangle(rect, new Color(1, 1, 1, 0.1f));
if (samples.count == 0)
return;
var sample = samples[samples.count - 1];
if (Compare(sample, default) == 0)
return;
if (Compare(limitMin, default) != 0)
{
// Two-way visualization with positive and negative side.
throw new NotImplementedException();
}
else
{
// One-way visualization with only positive side.
var ratio = Divide(sample, limitMax);
var fillRect = rect;
fillRect.width = rect.width * ratio;
DrawRectangle(fillRect, new Color(0, 1, 0, 0.75f));
var valuePos = new Vector2(fillRect.xMax, fillRect.y + fillRect.height / 2);
DrawText(samplesText[samples.count - 1], valuePos, ValueTextStyle);
}
}
public override void AddSample(object value, double time)
{
base.AddSample(value, time);
if (value != null)
{
var val = (TValue)value;
if (Compare(min, val) > 0)
min = val;
if (Compare(max, val) < 0)
max = val;
}
}
private static unsafe int Compare(TValue left, TValue right)
{
var leftPtr = UnsafeUtility.AddressOf(ref left);
var rightPtr = UnsafeUtility.AddressOf(ref right);
if (typeof(TValue) == typeof(int))
return ((int*)leftPtr)->CompareTo(*(int*)rightPtr);
if (typeof(TValue) == typeof(float))
return ((float*)leftPtr)->CompareTo(*(float*)rightPtr);
throw new NotImplementedException("Scalar value type: " + typeof(TValue).Name);
}
private static unsafe void Subtract(ref TValue left, TValue right)
{
var leftPtr = UnsafeUtility.AddressOf(ref left);
var rightPtr = UnsafeUtility.AddressOf(ref right);
if (typeof(TValue) == typeof(int))
*(int*)leftPtr = *(int*)leftPtr - *(int*)rightPtr;
if (typeof(TValue) == typeof(float))
*(float*)leftPtr = *(float*)leftPtr - *(float*)rightPtr;
throw new NotImplementedException("Scalar value type: " + typeof(TValue).Name);
}
private static unsafe float Divide(TValue left, TValue right)
{
var leftPtr = UnsafeUtility.AddressOf(ref left);
var rightPtr = UnsafeUtility.AddressOf(ref right);
if (typeof(TValue) == typeof(int))
return (float)*(int*)leftPtr / *(int*)rightPtr;
if (typeof(TValue) == typeof(float))
return *(float*)leftPtr / *(float*)rightPtr;
throw new NotImplementedException("Scalar value type: " + typeof(TValue).Name);
}
}
////TODO: allow asymmetric center (i.e. center not being a midpoint of rectangle)
////TODO: enforce proper proportion between X and Y; it's confusing that X and Y can have different units yet have the same length
public class Vector2Visualizer : ValueVisualizer<Vector2>
{
// Our value space extends radially from the center, i.e. we have
// 360 discrete directions. Sampling at that granularity doesn't work
// super well in visualizations so we quantize to 3 degree increments.
public Vector2[] maximums = new Vector2[360 / 3];
public Vector2 limits = new Vector2(1, 1);
private GUIContent limitsXText;
private GUIContent limitsYText;
public Vector2Visualizer(int numSamples = 10)
: base(numSamples)
{
}
public override void AddSample(object value, double time)
{
base.AddSample(value, time);
if (value != null)
{
// Keep track of radial maximums.
var vector = (Vector2)value;
var angle = Vector2.SignedAngle(Vector2.right, vector);
if (angle < 0)
angle = 360 + angle;
var angleInt = Mathf.FloorToInt(angle) / 3;
if (vector.sqrMagnitude > maximums[angleInt].sqrMagnitude)
maximums[angleInt] = vector;
// Extend limits if value is out of range.
var limitX = Mathf.Max(Mathf.Abs(vector.x), limits.x);
var limitY = Mathf.Max(Mathf.Abs(vector.y), limits.y);
if (!Mathf.Approximately(limitX, limits.x))
{
limits.x = limitX;
limitsXText = null;
}
if (!Mathf.Approximately(limitY, limits.y))
{
limits.y = limitY;
limitsYText = null;
}
}
}
public override void OnDraw(Rect rect)
{
DrawRectangle(rect, new Color(1, 1, 1, 0.1f));
DrawAxis(Axis.X, rect, new Color(0, 1, 0, 0.75f));
DrawAxis(Axis.Y, rect, new Color(0, 1, 0, 0.75f));
var sampleCount = samples.count;
if (sampleCount == 0)
return;
// If limits aren't (1,1), show the actual values.
if (limits != new Vector2(1, 1))
{
if (limitsXText == null)
limitsXText = new GUIContent(limits.x.ToString());
if (limitsYText == null)
limitsYText = new GUIContent(limits.y.ToString());
var limitsXSize = ValueTextStyle.CalcSize(limitsXText);
var limitsXPos = new Vector2(rect.x - limitsXSize.x, rect.y - 5);
var limitsYPos = new Vector2(rect.xMax, rect.yMax);
DrawText(limitsXText, limitsXPos, ValueTextStyle);
DrawText(limitsYText, limitsYPos, ValueTextStyle);
}
// Draw maximums.
var numMaximums = 0;
var firstMaximumPos = default(Vector2);
var lastMaximumPos = default(Vector2);
for (var i = 0; i < 360 / 3; ++i)
{
var value = maximums[i];
if (value == default)
continue;
var valuePos = PixelPosForValue(value, rect);
if (numMaximums > 0)
DrawLine(lastMaximumPos, valuePos, new Color(1, 1, 1, 0.25f));
else
firstMaximumPos = valuePos;
lastMaximumPos = valuePos;
++numMaximums;
}
if (numMaximums > 1)
DrawLine(lastMaximumPos, firstMaximumPos, new Color(1, 1, 1, 0.25f));
// Draw samples.
var alphaStep = 1f / sampleCount;
var alpha = 1f;
for (var i = sampleCount - 1; i >= 0; --i) // Go newest to oldest.
{
var value = samples[i];
var valueRect = RectForValue(value, rect);
DrawRectangle(valueRect, new Color(1, 0, 0, alpha));
alpha -= alphaStep;
}
// Print value of most recent sample. Draw last so
// we draw over the other stuff.
var lastSample = samples[sampleCount - 1];
var lastSamplePos = PixelPosForValue(lastSample, rect);
lastSamplePos.x += 3;
lastSamplePos.y += 3;
DrawText(samplesText[sampleCount - 1], lastSamplePos, ValueTextStyle);
}
private Rect RectForValue(Vector2 value, Rect rect)
{
var pos = PixelPosForValue(value, rect);
return new Rect(pos.x - 1, pos.y - 1, 2, 2);
}
private Vector2 PixelPosForValue(Vector2 value, Rect rect)
{
var center = rect.center;
var x = Mathf.Abs(value.x) / limits.x * Mathf.Sign(value.x);
var y = Mathf.Abs(value.y) / limits.y * Mathf.Sign(value.y) * -1; // GUI Y is upside down.
var xInPixels = x * rect.width / 2;
var yInPixels = y * rect.height / 2;
return new Vector2(center.x + xInPixels,
center.y + yInPixels);
}
}
// Y axis is time, X axis can be multiple visualizations.
public class TimelineVisualizer : Visualizer
{
public bool showLegend { get; set; }
public bool showLimits { get; set; }
public TimeUnit timeUnit { get; set; } = TimeUnit.Seconds;
public GUIContent valueUnit { get; set; }
////REVIEW: should this be per timeline?
public int timelineCount => m_Timelines != null ? m_Timelines.Length : 0;
public int historyDepth { get; set; } = 100;
public Vector2 limitsY
{
get => m_LimitsY;
set
{
m_LimitsY = value;
m_LimitsYMin = null;
m_LimitsYMax = null;
}
}
public TimelineVisualizer(float totalTimeUnitsShown = 4)
{
m_TotalTimeUnitsShown = totalTimeUnitsShown;
}
public override void OnDraw(Rect rect)
{
var endTime = Time.realtimeSinceStartup;
var startTime = endTime - m_TotalTimeUnitsShown;
var endFrame = InputState.updateCount;
var startFrame = endFrame - (int)m_TotalTimeUnitsShown;
for (var i = 0; i < timelineCount; ++i)
{
var timeline = m_Timelines[i];
var sampleCount = timeUnit == TimeUnit.Frames
? timeline.frameSamples.count
: timeline.timeSamples.count;
// Set up clip rect so that we can do stuff like render lines to samples
// falling outside the render rectangle and have them get clipped.
GUI.BeginGroup(rect);
var plotType = timeline.plotType;
var lastPos = default(Vector2);
var timeUnitsPerPixel = rect.width / m_TotalTimeUnitsShown;
var color = m_Timelines[i].color;
for (var n = sampleCount - 1; n >= 0; --n)
{
var sample = timeUnit == TimeUnit.Frames
? timeline.frameSamples[n].value
: timeline.timeSamples[n].value;
////TODO: respect limitsY
float y;
if (sample.isEmpty)
y = 0.5f;
else
y = sample.ToSingle();
y /= limitsY.y;
var deltaTime = timeUnit == TimeUnit.Frames
? timeline.frameSamples[n].frame - startFrame
: timeline.timeSamples[n].time - startTime;
var pos = new Vector2(deltaTime * timeUnitsPerPixel, rect.height - y * rect.height);
if (plotType == PlotType.LineGraph)
{
if (n != sampleCount - 1)
{
DrawLine(lastPos, pos, color, 2);
if (pos.x < 0)
break;
}
}
else if (plotType == PlotType.BarChart)
{
////TODO: make rectangles have a progressively stronger hue or saturation
var barRect = new Rect(pos.x, pos.y, timeUnitsPerPixel, y * limitsY.y * rect.height);
DrawRectangle(barRect, color);
}
lastPos = pos;
}
GUI.EndGroup();
}
if (showLegend && timelineCount > 0)
{
var legendRect = rect;
legendRect.x += rect.width + 2;
legendRect.width = 400;
legendRect.height = ValueTextStyle.CalcHeight(m_Timelines[0].name, 400);
for (var i = 0; i < m_Timelines.Length; ++i)
{
var colorTagRect = legendRect;
colorTagRect.width = 5;
var labelRect = legendRect;
labelRect.x += 8;
labelRect.width -= 8;
DrawRectangle(colorTagRect, m_Timelines[i].color);
DrawText(m_Timelines[i].name, labelRect.position, ValueTextStyle);
legendRect.y += labelRect.height + 2;
}
}
if (showLimits)
{
if (m_LimitsYMax == null)
m_LimitsYMax = new GUIContent(m_LimitsY.y.ToString());
if (m_LimitsYMin == null)
m_LimitsYMin = new GUIContent(m_LimitsY.x.ToString());
DrawText(m_LimitsYMax, new Vector2(rect.x + rect.width, rect.y), ValueTextStyle);
DrawText(m_LimitsYMin, new Vector2(rect.x + rect.width, rect.y + rect.height), ValueTextStyle);
}
}
public override void AddSample(object value, double time)
{
if (timelineCount == 0)
throw new InvalidOperationException("Must have set up a timeline first");
AddSample(0, PrimitiveValue.FromObject(value), (float)time);
}
public int AddTimeline(string name, Color color, PlotType plotType = default)
{
var timeline = new Timeline
{
name = new GUIContent(name),
color = color,
plotType = plotType,
};
if (timeUnit == TimeUnit.Frames)
timeline.frameSamples = new RingBuffer<FrameSample>(historyDepth);
else
timeline.timeSamples = new RingBuffer<TimeSample>(historyDepth);
var index = timelineCount;
Array.Resize(ref m_Timelines, timelineCount + 1);
m_Timelines[index] = timeline;
return index;
}
public int GetTimeline(string name)
{
for (var i = 0; i < timelineCount; ++i)
if (string.Compare(m_Timelines[i].name.text, name, StringComparison.InvariantCultureIgnoreCase) == 0)
return i;
return -1;
}
// Add a time-based sample.
public void AddSample(int timelineIndex, PrimitiveValue value, float time)
{
m_Timelines[timelineIndex].timeSamples.Append(new TimeSample
{
value = value,
time = time
});
}
// Add a frame-based sample.
public ref PrimitiveValue GetOrCreateSample(int timelineIndex, int frame)
{
ref var timeline = ref m_Timelines[timelineIndex];
ref var samples = ref timeline.frameSamples;
var count = samples.count;
if (count > 0)
{
if (samples[count - 1].frame == frame)
return ref samples[count - 1].value;
Debug.Assert(samples[count - 1].frame < frame, "Frame numbers must be ascending");
}
return ref samples.Append(new FrameSample { frame = frame }).value;
}
private float m_TotalTimeUnitsShown;
private Vector2 m_LimitsY = new Vector2(-1, 1);
private GUIContent m_LimitsYMin;
private GUIContent m_LimitsYMax;
private Timeline[] m_Timelines;
private struct TimeSample
{
public PrimitiveValue value;
public float time;
}
private struct FrameSample
{
public PrimitiveValue value;
public int frame;
}
private struct Timeline
{
public GUIContent name;
public Color color;
public RingBuffer<TimeSample> timeSamples;
public RingBuffer<FrameSample> frameSamples;
public PrimitiveValue minValue;
public PrimitiveValue maxValue;
public PlotType plotType;
}
public enum PlotType
{
LineGraph,
BarChart,
}
public enum TimeUnit
{
Seconds,
Frames,
}
}
public static void DrawAxis(Axis axis, Rect rect, Color color = default, float width = 1)
{
Vector2 start, end, tickOffset;
switch (axis)
{
case Axis.X:
start = new Vector2(rect.x, rect.y + rect.height / 2);
end = new Vector2(start.x + rect.width, rect.y + rect.height / 2);
tickOffset = new Vector2(0, 3);
break;
case Axis.Y:
start = new Vector2(rect.x + rect.width / 2, rect.y);
end = new Vector2(start.x, rect.y + rect.height);
tickOffset = new Vector2(3, 0);
break;
case Axis.Z:
// From bottom left corner to upper right corner.
start = new Vector2(rect.x, rect.yMax);
end = new Vector2(rect.xMax, rect.y);
tickOffset = new Vector2(1.5f, 1.5f);
break;
default:
throw new NotImplementedException();
}
////TODO: label limits
DrawLine(start, end, color, width);
DrawLine(start - tickOffset, start + tickOffset, color, width);
DrawLine(end - tickOffset, end + tickOffset, color, width);
}
public static void DrawRectangle(Rect rect, Color color)
{
var savedColor = GUI.color;
GUI.color = color;
GUI.DrawTexture(rect, OnePixTex);
GUI.color = savedColor;
}
public static void DrawText(string text, Vector2 pos, GUIStyle style)
{
var content = new GUIContent(text);
DrawText(content, pos, style);
}
public static void DrawText(GUIContent text, Vector2 pos, GUIStyle style)
{
var content = new GUIContent(text);
var size = style.CalcSize(content);
var rect = new Rect(pos.x, pos.y, size.x, size.y);
style.Draw(rect, content, false, false, false, false);
}
// Adapted from http://wiki.unity3d.com/index.php?title=DrawLine
public static void DrawLine(Vector2 pointA, Vector2 pointB, Color color = default, float width = 1)
{
// Save the current GUI matrix, since we're going to make changes to it.
var matrix = GUI.matrix;
// Store current GUI color, so we can switch it back later,
// and set the GUI color to the color parameter
var savedColor = GUI.color;
GUI.color = color;
// Determine the angle of the line.
var angle = Vector3.Angle(pointB - pointA, Vector2.right);
// Vector3.Angle always returns a positive number.
// If pointB is above pointA, then angle needs to be negative.
if (pointA.y > pointB.y)
angle = -angle;
// Use ScaleAroundPivot to adjust the size of the line.
// We could do this when we draw the texture, but by scaling it here we can use
// non-integer values for the width and length (such as sub 1 pixel widths).
// Note that the pivot point is at +.5 from pointA.y, this is so that the width of the line
// is centered on the origin at pointA.
GUIUtility.ScaleAroundPivot(new Vector2((pointB - pointA).magnitude, width), new Vector2(pointA.x, pointA.y + 0.5f));
// Set the rotation for the line.
// The angle was calculated with pointA as the origin.
GUIUtility.RotateAroundPivot(angle, pointA);
// Finally, draw the actual line.
// We're really only drawing a 1x1 texture from pointA.
// The matrix operations done with ScaleAroundPivot and RotateAroundPivot will make this
// render with the proper width, length, and angle.
GUI.DrawTexture(new Rect(pointA.x, pointA.y, 1, 1), OnePixTex);
// We're done. Restore the GUI matrix and GUI color to whatever they were before.
GUI.matrix = matrix;
GUI.color = savedColor;
}
private static Texture2D s_OnePixTex;
private static GUIStyle s_ValueTextStyle;
internal static GUIStyle ValueTextStyle
{
get
{
if (s_ValueTextStyle == null)
{
s_ValueTextStyle = new GUIStyle();
s_ValueTextStyle.fontSize -= 2;
s_ValueTextStyle.normal.textColor = Color.white;
}
return s_ValueTextStyle;
}
}
internal static Texture2D OnePixTex
{
get
{
if (s_OnePixTex == null)
s_OnePixTex = new Texture2D(1, 1);
return s_OnePixTex;
}
}
public struct RingBuffer<TValue>
{
public TValue[] array;
public int head;
public int count;
public RingBuffer(int size)
{
array = new TValue[size];
head = 0;
count = 0;
}
public ref TValue Append(TValue value)
{
int index;
var bufferSize = array.Length;
if (count < bufferSize)
{
Debug.Assert(head == 0, "Head can't have moved if buffer isn't full yet");
index = count;
++count;
}
else
{
// Buffer is full. Bump head.
index = (head + count) % bufferSize;
++head;
}
array[index] = value;
return ref array[index];
}
public ref TValue this[int index]
{
get
{
if (index < 0 || index >= count)
throw new ArgumentOutOfRangeException(nameof(index));
return ref array[(head + index) % array.Length];
}
}
}
}
}

11
Project/Assets/Samples/Input System/1.0.1/Visualizers/VisualizationHelpers.cs.meta


fileFormatVersion: 2
guid: ad5cfc4797aad4aa1b10dc648646ba5e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存