浏览代码

Big Push: First Milestone of V2

/V2
andytouch 4 年前
当前提交
16e5f4ed
共有 77 个文件被更改,包括 3389 次插入784 次删除
  1. 17
      InputSystem_Warriors_Project/Assets/DeviceDisplayConfigurator/DeviceDisplayConfigurator.asset
  2. 18
      InputSystem_Warriors_Project/Assets/Input/InputActions_Player.inputactions
  3. 32
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Canvas_World_PlayerDisplay.prefab
  4. 4
      InputSystem_Warriors_Project/Assets/RenderPipeline/RenderPasses/KawaseBlur.shader
  5. 3
      InputSystem_Warriors_Project/Assets/RenderPipeline/RenderPasses/KawaseBlur_Material.mat
  6. 4
      InputSystem_Warriors_Project/Assets/RenderPipeline/UniversalRenderPipeline_Renderer_MenuBlur.asset
  7. 948
      InputSystem_Warriors_Project/Assets/Scenes/Scene_Example_Warriors.unity
  8. 197
      InputSystem_Warriors_Project/Assets/Scripts/Managers/GameManager.cs
  9. 5
      InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs
  10. 40
      InputSystem_Warriors_Project/Assets/Scripts/Utilities/DeviceDisplayConfigurator.cs
  11. 1
      InputSystem_Warriors_Project/Assets/Warrior/Materials/MAT_Warrior_DeviceColors.mat
  12. 6
      InputSystem_Warriors_Project/Assets/Warrior/ShaderGraphs/Warrior_DeviceColors_ShaderGraph.shadergraph
  13. 2
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs.meta
  14. 6
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs
  15. 46
      InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI/RebindingUISampleScene.unity
  16. 2
      InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs.meta
  17. 296
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Button_Option.prefab
  18. 7
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Button_Option.prefab.meta
  19. 159
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Label.prefab
  20. 7
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Label.prefab.meta
  21. 159
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Paragraph.prefab
  22. 7
      InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Paragraph.prefab.meta
  23. 628
      InputSystem_Warriors_Project/Assets/Prefabs/Warrior/Player_Warrior.prefab
  24. 7
      InputSystem_Warriors_Project/Assets/Prefabs/Warrior/Player_Warrior.prefab.meta
  25. 8
      InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0.meta
  26. 8
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player.meta
  27. 8
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI.meta
  28. 8
      InputSystem_Warriors_Project/Assets/Scripts/Editor.meta
  29. 33
      InputSystem_Warriors_Project/Assets/Scripts/Managers/CameraManager.cs
  30. 11
      InputSystem_Warriors_Project/Assets/Scripts/Managers/CameraManager.cs.meta
  31. 33
      InputSystem_Warriors_Project/Assets/Scripts/Managers/EventSystemManager.cs
  32. 11
      InputSystem_Warriors_Project/Assets/Scripts/Managers/EventSystemManager.cs.meta
  33. 26
      InputSystem_Warriors_Project/Assets/Scripts/Managers/UIManager.cs
  34. 11
      InputSystem_Warriors_Project/Assets/Scripts/Managers/UIManager.cs.meta
  35. 8
      InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI.meta
  36. 36
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs
  37. 247
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs
  38. 29
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerUIDisplayBehaviour.cs
  39. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerUIDisplayBehaviour.cs.meta
  40. 69
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerVisualsBehaviour.cs
  41. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerVisualsBehaviour.cs.meta
  42. 29
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIBillboardBehaviour.cs
  43. 29
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIContextPanelsBehaviour.cs
  44. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIContextPanelsBehaviour.cs.meta
  45. 100
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuBehaviour.cs
  46. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuBehaviour.cs.meta
  47. 13
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuOptionBehaviour.cs
  48. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuOptionBehaviour.cs.meta
  49. 16
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIPanelRebindBehaviour.cs
  50. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIPanelRebindBehaviour.cs.meta
  51. 46
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIRebindActionBehaviour.cs
  52. 11
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIRebindActionBehaviour.cs.meta
  53. 76
      InputSystem_Warriors_Project/Assets/Scripts/Editor/DeviceDisplayConfiguratorEditor.cs
  54. 98
      InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs
  55. 139
      InputSystem_Warriors_Project/Assets/Prefabs/Warrior/WeaponTrail.prefab
  56. 7
      InputSystem_Warriors_Project/Assets/Prefabs/Warrior/WeaponTrail.prefab.meta
  57. 8
      InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0-preview.4.meta
  58. 215
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerController.cs
  59. 135
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerVisualDisplayBehaviour.cs
  60. 30
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UIBillboardBehaviour.cs
  61. 8
      InputSystem_Warriors_Project/Assets/Editor.meta
  62. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs.meta
  63. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs
  64. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs.meta
  65. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs.meta
  66. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIBillboardBehaviour.cs.meta
  67. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs
  68. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs.meta
  69. 0
      /InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI
  70. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Editor/DeviceDisplayConfiguratorEditor.cs.meta
  71. 0
      /InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs.meta

17
InputSystem_Warriors_Project/Assets/DeviceDisplayConfigurator/DeviceDisplayConfigurator.asset


m_Script: {fileID: 11500000, guid: fa6f1fbaea804c34cab896669f1e362b, type: 3}
m_Name: DeviceDisplayConfigurator
m_EditorClassIdentifier:
deviceSettings:
listDeviceSettings:
deviceDisplayColor: {r: 1, g: 0.57594675, b: 0, a: 1}
deviceDisplayColor: {r: 1, g: 0.5764706, b: 0, a: 1}
deviceDisplayName: Xbox One
deviceDisplayColor: {r: 0.5118305, g: 0.9056604, b: 0.31185475, a: 1}
deviceDisplayName: Xbox
deviceDisplayColor: {r: 0.5137255, g: 0.9058824, b: 0.3137255, a: 1}
deviceDisplayColor: {r: 0, g: 0.44719267, b: 1, a: 1}
deviceDisplayColor: {r: 0, g: 0.44705886, b: 1, a: 1}
deviceDisplayColor: {r: 1, g: 0.12588629, b: 0, a: 1}
deviceDisplayColor: {r: 1, g: 0.1254902, b: 0, a: 1}
deviceDisplayColor: {r: 0.51540035, g: 0, b: 1, a: 1}
deviceDisplayColor: {r: 0.5137255, g: 0, b: 1, a: 1}
disconnectedDeviceSettings:
disconnectedDisplayName: Disconnected!
disconnectedDisplayColor: {r: 0.7075472, g: 0.7075472, b: 0.7075472, a: 1}

18
InputSystem_Warriors_Project/Assets/Input/InputActions_Player.inputactions


"interactions": "Press"
},
{
"name": "OpenPauseMenu",
"name": "TogglePause",
"type": "Button",
"id": "a70a208e-b491-4921-b460-a0144030ef2a",
"expectedControlType": "Button",

"interactions": "",
"processors": "",
"groups": "Keyboard And Mouse",
"action": "OpenPauseMenu",
"action": "TogglePause",
"isComposite": false,
"isPartOfComposite": false
},

"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "OpenPauseMenu",
"action": "TogglePause",
"isComposite": false,
"isPartOfComposite": false
},

"id": "0914fb5b-51f6-4b26-9ed7-a3e72d065118",
"actions": [
{
"name": "ClosePauseMenu",
"name": "TogglePause",
"type": "Button",
"id": "e773b1f9-ce5b-4fa2-9c1f-d194202c43b7",
"expectedControlType": "",

{
"name": "Navigate",
"type": "Value",
"type": "PassThrough",
"id": "538ffe95-ba92-4acb-84f7-314f6ac8e0a5",
"expectedControlType": "Vector2",
"processors": "",

"name": "Submit",
"type": "Button",
"type": "PassThrough",
"id": "5f571f6a-e9e7-4120-ae3c-79f846bdd202",
"expectedControlType": "Button",
"processors": "",

"name": "Cancel",
"type": "Button",
"type": "PassThrough",
"id": "146e681c-77dd-4ff0-9ad5-f4351fea14cc",
"expectedControlType": "Button",
"processors": "",

"interactions": "",
"processors": "",
"groups": "Keyboard And Mouse",
"action": "ClosePauseMenu",
"action": "TogglePause",
"isComposite": false,
"isPartOfComposite": false
},

"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "ClosePauseMenu",
"action": "TogglePause",
"isComposite": false,
"isPartOfComposite": false
},

32
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Canvas_World_PlayerDisplay.prefab


m_Material: {fileID: 2100000, guid: 811fed6c6e8cbb34aba310644733f4a7, type: 2}
m_Color: {r: 0.3773585, g: 0.3773585, b: 0.3773585, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 5587485869381001236}
characterCount: 10
characterCount: 11
spaceCount: 0
wordCount: 1
spaceCount: 1
wordCount: 2
linkCount: 0
lineCount: 1
pageCount: 1

- component: {fileID: 6265031667269413090}
- component: {fileID: 3402453836007236829}
- component: {fileID: 8872492311519671937}
- component: {fileID: 2641655560739439992}
- component: {fileID: 1539462861}
m_Layer: 9
m_Name: UI_Canvas_World_PlayerDisplay

m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &2641655560739439992
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5548200517043333964}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1539462861
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 0d237ecbece995f4b99ac5ebab0f1baf, type: 3}
m_Name:
m_EditorClassIdentifier:
camera: {fileID: 0}
--- !u!1 &8802647436708355642
GameObject:
m_ObjectHideFlags: 0

m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 7256949955326275866}
characterCount: 1
characterCount: 2
spaceCount: 0
spaceCount: 1
wordCount: 1
linkCount: 0
lineCount: 1

4
InputSystem_Warriors_Project/Assets/RenderPipeline/RenderPasses/KawaseBlur.shader


Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Tint("Color Tint", Color) = (.34, .85, .92, 1)
// _offset ("Offset", float) = 0.5
}

// sampler2D _CameraOpaqueTexture;
float4 _MainTex_TexelSize;
float4 _MainTex_ST;
float4 _Tint;
float _offset;
v2f vert (appdata v)

col.rgb += tex2D( _MainTex, input.uv + float2( -i, i ) * res ).rgb;
col.rgb += tex2D( _MainTex, input.uv + float2( -i, -i ) * res ).rgb;
col.rgb /= 5.0f;
col.rgb *= _Tint.rgb;
return col;
}

3
InputSystem_Warriors_Project/Assets/RenderPipeline/RenderPasses/KawaseBlur_Material.mat


m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: []
m_Colors: []
m_Colors:
- _Tint: {r: 0.8962264, g: 0.8962264, b: 0.8962264, a: 0.9647059}

4
InputSystem_Warriors_Project/Assets/RenderPipeline/UniversalRenderPipeline_Renderer_MenuBlur.asset


passOperation: 0
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1
m_ShadowTransparentReceive: 0
--- !u!114 &1219297600775061884
MonoBehaviour:
m_ObjectHideFlags: 0

settings:
renderPassEvent: 250
blurMaterial: {fileID: 2100000, guid: 6356e7fdfba4594419a42f024df505a9, type: 2}
blurPasses: 8
blurPasses: 6
downsample: 1
copyToFramebuffer: 1
targetName: _blurTexture

948
InputSystem_Warriors_Project/Assets/Scenes/Scene_Example_Warriors.unity
文件差异内容过多而无法显示
查看文件

197
InputSystem_Warriors_Project/Assets/Scripts/Managers/GameManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.Universal;
using UnityEngine.InputSystem;
public enum GameMode
{
SinglePlayer,
LocalMultiplayer
}
{
{
[Header("Camera")]
public Camera mainCamera;
//Game Mode
public GameMode currentGameMode;
[Header("In-Scene Player Settings")]
//Single Player
[Header("Spawn Player Settings")]
public bool spawnMultiplePlayers = false;
//Local Multiplayer
[Header("Spawn Ring Settings")]
[Header("UI")]
public GameObject pauseMenu;
private bool isPaused;
private PlayerController focusedPlayerController;
SetupUIMenu();
SetupActivePlayers();
isPaused = false;
SetupBasedOnGameState();
SetupUI();
void SetupUIMenu()
void SetupBasedOnGameState()
UIMenuManager.Instance.ToggleMenu(false);
switch(currentGameMode)
{
case GameMode.SinglePlayer:
SetupSinglePlayer();
break;
case GameMode.LocalMultiplayer:
SetupLocalMultiplayer();
break;
}
void SetupActivePlayers()
void SetupSinglePlayer()
activePlayerControllers = new List<PlayerController>();
activePlayerControllers = new List<PlayerController>(numberOfPlayers);
if(inScenePlayer == true)
{
AddPlayerToActivePlayerList(inScenePlayer.GetComponent<PlayerController>());
}
SetupActivePlayers();
}
void SetupLocalMultiplayer()
{
if(spawnMultiplePlayers)
if(inScenePlayer == true)
SpawnPlayers();
else if(!spawnMultiplePlayers)
{
PlayerController inScenePlayerController = inScenePlayer.GetComponent<PlayerController>();
activePlayerControllers.Add(inScenePlayerController);
SetupUIMenuPlayerList();
SpawnPlayers();
}
SetupActivePlayers();
activePlayerControllers = new List<PlayerController>();
GameObject spawnedPlayer = Instantiate(playerPrefab, transform.position, transform.rotation);
activePlayerControllers.Insert(i, spawnedPlayer.GetComponent<PlayerController>());
Vector3 spawnPosition = CalculatePositionInRing(i, numberOfPlayers);
Quaternion spawnRotation = CalculateRotation();
Vector3 spawnPosition = PositionInRing(i);
spawnedPlayer.transform.position = spawnPosition;
GameObject spawnedPlayer = Instantiate(playerPrefab, spawnPosition, spawnRotation) as GameObject;
AddPlayerToActivePlayerList(spawnedPlayer.GetComponent<PlayerController>());
}
}
Quaternion randomSpawnRotation = Quaternion.Euler(new Vector3(0, Random.Range(0, 360), 0));
spawnedPlayer.transform.rotation = randomSpawnRotation;
void AddPlayerToActivePlayerList(PlayerController newPlayer)
{
activePlayerControllers.Add(newPlayer);
}
void SetupActivePlayers()
{
for(int i = 0; i < activePlayerControllers.Count; i++)
{
activePlayerControllers[i].SetupPlayer(i);
}
SetupUIMenuPlayerList();
void SetupUI()
{
UIManager.Instance.SetupManager();
void SetupUIMenuPlayerList()
public void TogglePauseState(PlayerController newFocusedPlayerController)
UIMenuManager.Instance.SetupUIMenuPlayerPanelList();
}
focusedPlayerController = newFocusedPlayerController;
isPaused = !isPaused;
ToggleTimeScale();
UpdateActivePlayerInputs();
SwitchFocusedPlayerControlScheme();
public void TogglePauseMenu(bool newState)
{
UpdateUIMenu();
UIMenuManager.Instance.ToggleMenu(newState);
}
void UpdateActivePlayerInputs()
{
//Pause Menu Is On -> Switch from Player Controls to Menu Controls
if(newState == true)
{
activePlayerControllers[i].EnablePauseMenuControls();
}
//Pause Menu Is Off -> Switch from Menu Controls to Player Controls
else if(newState == false)
if(activePlayerControllers[i] != focusedPlayerController)
activePlayerControllers[i].EnableGameplayControls();
activePlayerControllers[i].SetInputActiveState(isPaused);
void SwitchFocusedPlayerControlScheme()
{
switch(isPaused)
{
case true:
focusedPlayerController.EnablePauseMenuControls();
break;
case false:
focusedPlayerController.EnableGameplayControls();
break;
}
}
void UpdateUIMenu()
{
UIManager.Instance.UpdateUIMenuState(isPaused);
}
//Get Data ----
Vector3 PositionInRing(int positionID)
public PlayerController GetFocusedPlayerController()
{
return focusedPlayerController;
}
public int NumberOfConnectedDevices()
return InputSystem.devices.Count;
}
//Pause Utilities ----
void ToggleTimeScale()
{
float newTimeScale = 0f;
switch(isPaused)
{
case true:
newTimeScale = 0f;
break;
case false:
newTimeScale = 1f;
break;
}
Time.timeScale = newTimeScale;
}
//Spawn Utilities
Vector3 CalculatePositionInRing(int positionID, int numberOfPlayers)
{
if(numberOfPlayers == 1)
return spawnRingCenter.position;

return spawnRingCenter.position + new Vector3(x, 0, z);
}
Quaternion CalculateRotation()
{
return Quaternion.Euler(new Vector3(0, Random.Range(0, 360), 0));
}
}

5
InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs


using UnityEngine;
using UnityEngine.InputSystem;
public class UIMenuManager : Singleton<UIMenuManager>
public class OldUIMenuBehaviour : MonoBehaviour
/*
[Header("References")]
public Camera UICamera;
private List<PlayerController> activePlayerControllers;

UICamera.enabled = newState;
}
*/
}

40
InputSystem_Warriors_Project/Assets/Scripts/Utilities/DeviceDisplayConfigurator.cs


public Color deviceDisplayColor;
}
public List<DeviceSettings> deviceSettings = new List<DeviceSettings>();
[System.Serializable]
public struct DisconnectedSettings
{
public string disconnectedDisplayName;
public Color disconnectedDisplayColor;
}
public List<DeviceSettings> listDeviceSettings = new List<DeviceSettings>();
public DisconnectedSettings disconnectedDeviceSettings;
public string GetDeviceDisplayName(string playerInputDeviceRawPath)
public string GetDeviceName(string playerInputDeviceRawPath)
for(int i = 0; i < deviceSettings.Count; i++)
for(int i = 0; i < listDeviceSettings.Count; i++)
if(deviceSettings[i].deviceRawPath == playerInputDeviceRawPath)
if(listDeviceSettings[i].deviceRawPath == playerInputDeviceRawPath)
newDisplayName = deviceSettings[i].deviceDisplayName;
newDisplayName = listDeviceSettings[i].deviceDisplayName;
}
}

}
public Color GetDeviceDisplayColor(string playerInputDeviceRawPath)
public Color GetDeviceColor(string playerInputDeviceRawPath)
for(int i = 0; i < deviceSettings.Count; i++)
for(int i = 0; i < listDeviceSettings.Count; i++)
if(deviceSettings[i].deviceRawPath == playerInputDeviceRawPath)
if(listDeviceSettings[i].deviceRawPath == playerInputDeviceRawPath)
newDisplayColor = deviceSettings[i].deviceDisplayColor;
newDisplayColor = listDeviceSettings[i].deviceDisplayColor;
}
}

public Color GetFallbackDisplayColor()
public string GetDisconnectedName()
return fallbackDisplayColor;
return disconnectedDeviceSettings.disconnectedDisplayName;
public Color GetDisconnectedColor()
{
return disconnectedDeviceSettings.disconnectedDisplayColor;
}
}

1
InputSystem_Warriors_Project/Assets/Warrior/Materials/MAT_Warrior_DeviceColors.mat


- Color_326CE7D1: {r: 0.8207547, g: 0.509624, b: 0.019357419, a: 1}
- Color_41AB6E49: {r: 0.3873129, g: 1, b: 0, a: 1}
- _ArmorTint: {r: 1, g: 0, b: 0, a: 1}
- _Clothing_Tint: {r: 1, g: 0.59063, b: 0, a: 1}
- _Tint_Armor: {r: 1, g: 0.57594675, b: 0, a: 1}
- _Tint_Beard: {r: 1, g: 0.92189616, b: 0.051886797, a: 1}
- _Tint_Fur: {r: 0.4716981, g: 0.17758048, b: 0, a: 1}

6
InputSystem_Warriors_Project/Assets/Warrior/ShaderGraphs/Warrior_DeviceColors_ShaderGraph.shadergraph
文件差异内容过多而无法显示
查看文件

2
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs.meta


fileFormatVersion: 2
guid: 22f60998fed7e6347be0522621b18b5b
guid: 733c62aa19a5f384ea007d48fd472e50
MonoImporter:
externalObjects: {}
serializedVersion: 2

6
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs


}
public void UpdatePlayerDeviceDisplay(string playerDevicePath)
{
{
/*
playerDeviceDisplayIcon.color = deviceDisplayConfigurator.GetDeviceDisplayColor(playerDevicePath);
playerDeviceDisplayIcon.color = deviceDisplayConfigurator.GetDeviceDisplayColor(playerDevicePath);
*/
}
}

46
InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI/RebindingUISampleScene.unity


m_GameObject: {fileID: 221984824}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0

m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &221984827
CanvasRenderer:
m_ObjectHideFlags: 0

m_EditorClassIdentifier:
m_RepeatDelay: 0.5
m_RepeatRate: 0.1
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018,

type: 3}
m_TrackedDeviceSelectAction: {fileID: 2559092417903258184, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_DeselectOnBackgroundClick: 1
--- !u!114 &780148236
MonoBehaviour:
m_ObjectHideFlags: 0

m_Component:
- component: {fileID: 1709564084}
- component: {fileID: 1709564086}
- component: {fileID: 1709564085}
- component: {fileID: 1709564087}
m_Layer: 5
m_Name: ActionBindingIcon
m_TagString: Untagged

m_AnchoredPosition: {x: 0.000011444, y: -0.000011444}
m_SizeDelta: {x: 24.61, y: 24.61}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1709564085
--- !u!222 &1709564086
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1709564083}
m_CullTransparentMesh: 0
--- !u!114 &1709564087
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0

m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1709564086
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1709564083}
m_CullTransparentMesh: 0
--- !u!1 &1870027503
GameObject:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 1870027503}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0

m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1870027506
CanvasRenderer:
m_ObjectHideFlags: 0

2
InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs.meta


fileFormatVersion: 2
guid: f80afc2351fc1b34d965907fa53d8db0
guid: f45b0bd15cb9f794db2e1170669f343f
MonoImporter:
externalObjects: {}
serializedVersion: 2

296
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Button_Option.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3909768097800649234
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3909768097800649245}
- component: {fileID: 3909768097800649246}
- component: {fileID: 3909768097800649247}
- component: {fileID: 3909768097800649244}
- component: {fileID: 5289028378733753934}
m_Layer: 8
m_Name: UI_Button_Option
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3909768097800649245
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3909768097800649234}
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: 8706195312454505377}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 300, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3909768097800649246
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3909768097800649234}
m_CullTransparentMesh: 0
--- !u!114 &3909768097800649247
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3909768097800649234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8679245, g: 0.8679245, b: 0.8679245, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1e93b15590e970f4eb7c0e498f8a7d87, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 18
--- !u!114 &3909768097800649244
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3909768097800649234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0.6981132, g: 0.6981132, b: 0.6981132, a: 1}
m_HighlightedColor: {r: 0.8915094, g: 0.97985953, b: 1, a: 1}
m_PressedColor: {r: 0.8018868, g: 0.8018868, b: 0.8018868, a: 1}
m_SelectedColor: {r: 1, g: 1, b: 1, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3909768097800649247}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 5289028378733753934}
m_MethodName: ButtonOptionSelected
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &5289028378733753934
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3909768097800649234}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab404cb73cfd59041ae6fa39d672efef, type: 3}
m_Name:
m_EditorClassIdentifier:
contextPanelID: 0
--- !u!1001 &5694196718135537687
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3909768097800649245}
m_Modifications:
- target: {fileID: 4023763117680649137, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_Name
value: UI_Text_Label
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649143, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_textInfo.characterCount
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649143, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_textInfo.spaceCount
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649143, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_textInfo.wordCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649143, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_textInfo.lineCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4023763117680649143, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
propertyPath: m_textInfo.pageCount
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c3c71f98a6fdb1a4da1aac6d2aead309, type: 3}
--- !u!224 &8706195312454505377 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4023763117680649142, guid: c3c71f98a6fdb1a4da1aac6d2aead309,
type: 3}
m_PrefabInstance: {fileID: 5694196718135537687}
m_PrefabAsset: {fileID: 0}

7
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Button_Option.prefab.meta


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

159
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Label.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4023763117680649137
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4023763117680649142}
- component: {fileID: 4023763117680649140}
- component: {fileID: 4023763117680649143}
m_Layer: 8
m_Name: UI_Text_Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4023763117680649142
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4023763117680649137}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4023763117680649140
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4023763117680649137}
m_CullTransparentMesh: 0
--- !u!114 &4023763117680649143
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4023763117680649137}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 03579131436451b468aa4aa9a06e80cd, type: 2}
m_sharedMaterial: {fileID: -549880065730588403, guid: 03579131436451b468aa4aa9a06e80cd,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4284966759
m_fontColor: {r: 0.4056604, g: 0.4056604, b: 0.4056604, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_textAlignment: 514
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 4023763117680649143}
characterCount: 4
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

7
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Label.prefab.meta


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

159
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Paragraph.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4447203967360394975
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4447203967360394972}
- component: {fileID: 4447203967360394962}
- component: {fileID: 4447203967360394973}
m_Layer: 8
m_Name: UI_Text_Paragraph
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4447203967360394972
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4447203967360394975}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 4.860016, y: 27.559982}
m_SizeDelta: {x: 419.38257, y: 186.16867}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4447203967360394962
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4447203967360394975}
m_CullTransparentMesh: 0
--- !u!114 &4447203967360394973
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4447203967360394975}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: This is a paragraph of text.
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 03579131436451b468aa4aa9a06e80cd, type: 2}
m_sharedMaterial: {fileID: -549880065730588403, guid: 03579131436451b468aa4aa9a06e80cd,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 24.5
m_fontSizeBase: 24.5
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_textAlignment: 514
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 4447203967360394973}
characterCount: 28
spriteCount: 0
spaceCount: 5
wordCount: 6
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

7
InputSystem_Warriors_Project/Assets/Prefabs/UI/UI_Text_Paragraph.prefab.meta


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

628
InputSystem_Warriors_Project/Assets/Prefabs/Warrior/Player_Warrior.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1743518200311987069
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1743518200311987014}
- component: {fileID: 1743518200311987065}
- component: {fileID: 1743518200311987064}
- component: {fileID: 1743518200311987067}
- component: {fileID: 1743518200311987066}
- component: {fileID: 16277596}
m_Layer: 0
m_Name: Player_Warrior
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1743518200311987014
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
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: 7582353321118616866}
- {fileID: 1743518200780429239}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1743518200311987065
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e20fb9a3b0e7eae4e9e630fc6e8b1a3f, type: 3}
m_Name:
m_EditorClassIdentifier:
playerAnimationBehaviour: {fileID: 7582353321118191811}
playerVisualsBehaviour: {fileID: 16277596}
playerRigidbody: {fileID: 1743518200311987066}
useOldInputManager: 0
playerInput: {fileID: 1743518200311987064}
movementSpeed: 3
smoothingSpeed: 3
--- !u!114 &1743518200311987064
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: aa45cad44afd790488f6540bc766db91,
type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_ControlsChangedEvent:
m_PersistentCalls:
m_Calls: []
m_ActionEvents: []
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: Player Controls
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!136 &1743518200311987067
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
m_Material: {fileID: 13400000, guid: 03b71a9b19b997643bee36d3413800b9, type: 2}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.6
m_Height: 1.77
m_Direction: 1
m_Center: {x: 0, y: 0.9, z: 0}
--- !u!54 &1743518200311987066
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 84
m_CollisionDetection: 0
--- !u!114 &16277596
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200311987069}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3b9c7226a9b7db047a442efcb4f263ea, type: 3}
m_Name:
m_EditorClassIdentifier:
deviceDisplaySettings: {fileID: 11400000, guid: 1ae90af367a37dc47b0ecc2b81a75099,
type: 2}
playerUIDisplayBehaviour: {fileID: 233393978}
playerSkinnedMeshRenderer: {fileID: 7582353321106627706}
--- !u!1 &1743518200780429236
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1743518200780429239}
m_Layer: 0
m_Name: Anchor_Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1743518200780429239
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1743518200780429236}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: -0.12, y: 2.079, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4562489772671135640}
m_Father: {fileID: 1743518200311987014}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &233393978
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2693099407422876726}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 90ce320e2fa6597478b575fc077d0c27, type: 3}
m_Name:
m_EditorClassIdentifier:
IDDisplayText: {fileID: 942722184034563680}
deviceNameDisplayText: {fileID: 2605993838031464302}
deviceDisplayIcon: {fileID: 534452894127111580}
--- !u!1 &7582353321118191808
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7582353321118616864}
- component: {fileID: 7582353321106627706}
m_Layer: 0
m_Name: Warrior_Body
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7582353321118616864
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191808}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.000070700284, y: 0.57204556, z: 0.03029277}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7582353321118616866}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!137 &7582353321106627706
SkinnedMeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191808}
m_Enabled: 1
m_CastShadows: 2
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 731650be44c05f8459778c3726da7e7f, 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
serializedVersion: 2
m_Quality: 0
m_UpdateWhenOffscreen: 0
m_SkinnedMotionVectors: 1
m_Mesh: {fileID: 4300002, guid: 9e52c160328d68b4799c73e4e5cd0ed7, type: 3}
m_Bones: []
m_BlendShapeWeights: []
m_RootBone: {fileID: 0}
m_AABB:
m_Center: {x: -0.00013512373, y: 0.28332242, z: -0.05701849}
m_Extent: {x: 1.3802807, y: 0.9429414, z: 0.38078022}
m_DirtyAABB: 0
--- !u!1 &7582353321118191810
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7582353321118616866}
- component: {fileID: 7582353321110905530}
- component: {fileID: 7582353321118191811}
m_Layer: 0
m_Name: Character_Warrior
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7582353321118616866
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191810}
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7582353321118616864}
- {fileID: 7582353321118616868}
m_Father: {fileID: 1743518200311987014}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!95 &7582353321110905530
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191810}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: 9e52c160328d68b4799c73e4e5cd0ed7, type: 3}
m_Controller: {fileID: 9100000, guid: 46f4abf23171983419b0e5361d6c21ec, type: 2}
m_CullingMode: 1
m_UpdateMode: 0
m_ApplyRootMotion: 1
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 0
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &7582353321118191811
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 733c62aa19a5f384ea007d48fd472e50, type: 3}
m_Name:
m_EditorClassIdentifier:
playerAnimator: {fileID: 7582353321110905530}
--- !u!1 &7582353321118191812
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7582353321118616868}
- component: {fileID: 7582353321106627704}
m_Layer: 0
m_Name: Warrior_Weapon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7582353321118616868
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191812}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.7915499, y: 0.9887566, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7582353321118616866}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!137 &7582353321106627704
SkinnedMeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582353321118191812}
m_Enabled: 1
m_CastShadows: 2
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 75803c1c5a43b06428b2975fe0d7fc48, 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
serializedVersion: 2
m_Quality: 0
m_UpdateWhenOffscreen: 0
m_SkinnedMotionVectors: 1
m_Mesh: {fileID: 4300000, guid: 9e52c160328d68b4799c73e4e5cd0ed7, type: 3}
m_Bones: []
m_BlendShapeWeights: []
m_RootBone: {fileID: 0}
m_AABB:
m_Center: {x: -0.00000011920929, y: -0.25621593, z: 0.000000014901161}
m_Extent: {x: 0.22819102, y: 0.7619151, z: 0.08429241}
m_DirtyAABB: 0
--- !u!1001 &7611335561965520762
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1743518200780429239}
m_Modifications:
- target: {fileID: 5548200517043333964, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_Name
value: UI_Canvas_World_PlayerDisplay
objectReference: {fileID: 0}
- target: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.characterCount
value: 11
objectReference: {fileID: 0}
- target: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.wordCount
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.lineCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.pageCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.spaceCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.959314
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.28234145
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_SizeDelta.x
value: 720
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_SizeDelta.y
value: 300
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.characterCount
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.wordCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.lineCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.pageCount
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
propertyPath: m_textInfo.spaceCount
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 63726dc7d2cb37d4a8b414560f2fcf1f, type: 3}
--- !u!1 &2693099407422876726 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5548200517043333964, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
m_PrefabInstance: {fileID: 7611335561965520762}
m_PrefabAsset: {fileID: 0}
--- !u!224 &4562489772671135640 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6265031667269413090, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
m_PrefabInstance: {fileID: 7611335561965520762}
m_PrefabAsset: {fileID: 0}
--- !u!114 &534452894127111580 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7983236508161211110, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
m_PrefabInstance: {fileID: 7611335561965520762}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &942722184034563680 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7256949955326275866, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
m_PrefabInstance: {fileID: 7611335561965520762}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2605993838031464302 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5587485869381001236, guid: 63726dc7d2cb37d4a8b414560f2fcf1f,
type: 3}
m_PrefabInstance: {fileID: 7611335561965520762}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:

7
InputSystem_Warriors_Project/Assets/Prefabs/Warrior/Player_Warrior.prefab.meta


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

8
InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0.meta


fileFormatVersion: 2
guid: 0e2ae6f1e9b97b34f8fa35294fd0fcdd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player.meta


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

8
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI.meta


fileFormatVersion: 2
guid: 045edeee3a7092d418dde20ef8ae339b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
InputSystem_Warriors_Project/Assets/Scripts/Editor.meta


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

33
InputSystem_Warriors_Project/Assets/Scripts/Managers/CameraManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraManager : Singleton<CameraManager>
{
[Header("Component References")]
public GameObject gameplayCameraObject;
public GameObject uiOverlayCameraObject;
public void SetupManager()
{
SetCameraObjectNewState(gameplayCameraObject, true);
SetCameraObjectNewState(uiOverlayCameraObject, false);
}
void SetCameraObjectNewState(GameObject cameraObject, bool newState)
{
cameraObject.SetActive(newState);
}
//This is called by UIBillboardBehaviour so they can orient to wherever the gameplay camera is.
public Transform GetGameplayCameraTransform()
{
return gameplayCameraObject.transform;
}
public Camera GetGameplayCamera()
{
return gameplayCameraObject.GetComponent<Camera>();
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Managers/CameraManager.cs.meta


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

33
InputSystem_Warriors_Project/Assets/Scripts/Managers/EventSystemManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.UI;
using UnityEngine.EventSystems;
public class EventSystemManager : Singleton<EventSystemManager>
{
public EventSystem eventSystem;
public InputSystemUIInputModule inputSystemUIInputModule;
public void SetCurrentSelectedGameObject(GameObject newSelectedGameObject)
{
eventSystem.SetSelectedGameObject(newSelectedGameObject);
Button newSelectable = newSelectedGameObject.GetComponent<Button>();
newSelectable.Select();
newSelectable.OnSelect(null);
}
public void UpdateActionAssetToFocusedPlayer()
{
PlayerController focusedPlayerController = GameManager.Instance.GetFocusedPlayerController();
inputSystemUIInputModule.actionsAsset = focusedPlayerController.GetActionAsset();
}
public InputActionAsset GetInputActionAsset()
{
return inputSystemUIInputModule.actionsAsset;
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Managers/EventSystemManager.cs.meta


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

26
InputSystem_Warriors_Project/Assets/Scripts/Managers/UIManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIManager : Singleton<UIManager>
{
[Header("Sub-Behaviours")]
public UIMenuBehaviour uiMenuBehaviour;
public void SetupManager()
{
uiMenuBehaviour.SetupBehaviour();
}
public void UpdateUIMenuState(bool newState)
{
uiMenuBehaviour.UpdateUIMenuState(newState);
}
public void MenuButtonOptionSelected(int newPanelID)
{
uiMenuBehaviour.SwitchUIContextPanels(newPanelID);
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Managers/UIManager.cs.meta


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

8
InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI.meta


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

36
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAnimationBehaviour : MonoBehaviour
{
[Header("Component References")]
public Animator playerAnimator;
//Animation String IDs
private int playerMovementAnimationID;
private int playerAttackAnimationID;
public void SetupBehaviour()
{
SetupAnimationIDs();
}
void SetupAnimationIDs()
{
playerMovementAnimationID = Animator.StringToHash("Movement");
playerAttackAnimationID = Animator.StringToHash("Attack");
}
public void UpdateMovementAnimation(float movementBlendValue)
{
playerAnimator.SetFloat(playerMovementAnimationID, movementBlendValue);
}
public void PlayAttackAnimation()
{
playerAnimator.SetTrigger(playerAttackAnimationID);
}
}

247
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.EventSystems;
public class PlayerController : MonoBehaviour
{
//Player ID
private int playerID;
[Header("Sub Behaviours")]
public PlayerAnimationBehaviour playerAnimationBehaviour;
public PlayerVisualsBehaviour playerVisualsBehaviour;
[Header("Physics")]
public Rigidbody playerRigidbody;
[Header("Input")]
public bool useOldInputManager = false;
public PlayerInput playerInput;
private string actionMapGameplay = "Player Controls";
private string actionMapMenu = "Menu Controls";
private Vector3 inputDirection;
private Vector2 movementInput;
private bool currentInput = false;
//Camera
private Camera mainCamera;
[Header("Movement Settings")]
public float movementSpeed = 3;
public float smoothingSpeed = 1;
private Vector3 currentDirection;
private Vector3 rawDirection;
private Vector3 smoothDirection;
private Vector3 movement;
//This is called from the GameManager; after the player has been spawned
public void SetupPlayer(int newPlayerID)
{
playerID = newPlayerID;
playerAnimationBehaviour.SetupBehaviour();
playerVisualsBehaviour.SetupBehaviour(playerID, playerInput.devices[0].ToString());
FindGameplayCamera();
}
void FindGameplayCamera()
{
mainCamera = CameraManager.Instance.GetGameplayCamera();
}
void Update()
{
CalculateMovementInput();
CalculateAttackInput();
}
void FixedUpdate()
{
CalculateDesiredDirection();
ConvertDirectionFromRawToSmooth();
MoveThePlayer();
AnimatePlayerMovement();
TurnThePlayer();
}
void CalculateMovementInput()
{
if(useOldInputManager)
{
var v = Input.GetAxisRaw("Vertical");
var h = Input.GetAxisRaw("Horizontal");
inputDirection = new Vector3(h, 0, v);
}
if(inputDirection == Vector3.zero)
{
currentInput = false;
}
else if(inputDirection != Vector3.zero)
{
currentInput = true;
}
}
void CalculateAttackInput()
{
if(useOldInputManager)
{
if(Input.GetKeyDown(KeyCode.Space))
{
playerAnimationBehaviour.PlayAttackAnimation();
}
}
}
void CalculateDesiredDirection()
{
//Camera Direction
var cameraForward = mainCamera.transform.forward;
var cameraRight = mainCamera.transform.right;
cameraForward.y = 0f;
cameraRight.y = 0f;
rawDirection = cameraForward * inputDirection.z + cameraRight * inputDirection.x;
}
void ConvertDirectionFromRawToSmooth()
{
if(currentInput == true)
{
smoothDirection = Vector3.Lerp(smoothDirection, rawDirection, Time.deltaTime * smoothingSpeed);
} else if(currentInput == false)
{
smoothDirection = Vector3.zero;
}
}
void MoveThePlayer()
{
if(currentInput == true)
{
movement.Set(smoothDirection.x, 0f, smoothDirection.z);
movement = movement.normalized * movementSpeed * Time.deltaTime;
playerRigidbody.MovePosition(transform.position + movement);
}
}
void TurnThePlayer()
{
if(currentInput == true)
{
Quaternion newRotation = Quaternion.LookRotation(-smoothDirection);
playerRigidbody.MoveRotation(newRotation);
}
}
void AnimatePlayerMovement()
{
playerAnimationBehaviour.UpdateMovementAnimation(inputDirection.sqrMagnitude);
}
//Action Callbacks from the new Input System ----
private void OnMovement(InputValue value)
{
Vector2 inputMovement = value.Get<Vector2>();
inputDirection = new Vector3(inputMovement.x, 0, inputMovement.y);
}
private void OnAttack(InputValue value)
{
playerAnimationBehaviour.PlayAttackAnimation();
}
private void OnTogglePause(InputValue value)
{
GameManager.Instance.TogglePauseState(this);
}
public void OnControlsChanged()
{
playerVisualsBehaviour.UpdatePlayerVisuals(playerInput.devices[0].ToString());
}
public void OnDeviceLost()
{
playerVisualsBehaviour.SetDisconnectedDeviceVisuals();
}
public void OnDeviceRegained()
{
StartCoroutine(WaitForDeviceToBeRegained());
}
IEnumerator WaitForDeviceToBeRegained()
{
yield return new WaitForSeconds(0.1f);
playerVisualsBehaviour.UpdatePlayerVisuals(playerInput.devices[0].ToString());
}
public void SetInputActiveState(bool gameIsPaused)
{
switch (gameIsPaused)
{
case true:
playerInput.DeactivateInput();
break;
case false:
playerInput.ActivateInput();
break;
}
}
//Switching Action Maps ----
public void EnableGameplayControls()
{
playerInput.SwitchCurrentActionMap(actionMapGameplay);
}
public void EnablePauseMenuControls()
{
playerInput.SwitchCurrentActionMap(actionMapMenu);
}
//Get Data ----
public int GetPlayerID()
{
return playerID;
}
public string GetRawDevicePath()
{
return playerInput.devices[0].ToString();
}
public InputActionAsset GetActionAsset()
{
return playerInput.actions;
}
}

29
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerUIDisplayBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class PlayerUIDisplayBehaviour : MonoBehaviour
{
public TextMeshProUGUI IDDisplayText;
public TextMeshProUGUI deviceNameDisplayText;
public Image deviceDisplayIcon;
public void UpdatePlayerIDDisplayText(int newPlayerID)
{
IDDisplayText.SetText((newPlayerID + 1).ToString());
}
public void UpdatePlayerDeviceNameDisplayText(string newDeviceName)
{
deviceNameDisplayText.SetText(newDeviceName);
}
public void UpdatePlayerIconDisplayColor(Color newColor)
{
deviceDisplayIcon.color = newColor;
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerUIDisplayBehaviour.cs.meta


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

69
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerVisualsBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerVisualsBehaviour : MonoBehaviour
{
//Player ID
private int playerID;
[Header("Device Display Settings")]
public DeviceDisplayConfigurator deviceDisplaySettings;
[Header("Sub Behaviours")]
public PlayerUIDisplayBehaviour playerUIDisplayBehaviour;
[Header("Player Material")]
public SkinnedMeshRenderer playerSkinnedMeshRenderer;
private int clothingTintShaderID;
public void SetupBehaviour(int newPlayerID, string newDeviceRawPath)
{
playerID = newPlayerID;
SetupShaderIDs();
UpdatePlayerVisuals(newDeviceRawPath);
}
void SetupShaderIDs()
{
clothingTintShaderID = Shader.PropertyToID("_Clothing_Tint");
}
public void UpdatePlayerVisuals(string deviceRawPath)
{
UpdateUIDisplay(deviceRawPath);
UpdateCharacterShader(deviceRawPath);
}
void UpdateUIDisplay(string deviceRawPath)
{
playerUIDisplayBehaviour.UpdatePlayerIDDisplayText(playerID);
string deviceName = deviceDisplaySettings.GetDeviceName(deviceRawPath);
playerUIDisplayBehaviour.UpdatePlayerDeviceNameDisplayText(deviceName);
Color deviceColor = deviceDisplaySettings.GetDeviceColor(deviceRawPath);
playerUIDisplayBehaviour.UpdatePlayerIconDisplayColor(deviceColor);
}
void UpdateCharacterShader(string deviceRawPath)
{
Color deviceColor = deviceDisplaySettings.GetDeviceColor(deviceRawPath);
playerSkinnedMeshRenderer.material.SetColor(clothingTintShaderID, deviceColor);
}
public void SetDisconnectedDeviceVisuals()
{
string disconnectedName = deviceDisplaySettings.GetDisconnectedName();
playerUIDisplayBehaviour.UpdatePlayerDeviceNameDisplayText(disconnectedName);
Color disconnectedColor = deviceDisplaySettings.GetDisconnectedColor();
playerUIDisplayBehaviour.UpdatePlayerIconDisplayColor(disconnectedColor);
playerSkinnedMeshRenderer.material.SetColor(clothingTintShaderID, disconnectedColor);
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerVisualsBehaviour.cs.meta


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

29
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIBillboardBehaviour.cs


using UnityEngine;
using System.Collections;
[ExecuteAlways]
public class UIBillboardBehaviour : MonoBehaviour
{
private Transform gameplayCameraTransform;
void OnEnable()
{
gameplayCameraTransform = CameraManager.Instance.GetGameplayCameraTransform();
}
void OnDisable()
{
gameplayCameraTransform = null;
}
void LateUpdate()
{
if(gameplayCameraTransform)
{
transform.LookAt(transform.position + gameplayCameraTransform.rotation * Vector3.forward, gameplayCameraTransform.rotation * Vector3.up);
}
}
}

29
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIContextPanelsBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIContextPanelsBehaviour : MonoBehaviour
{
public GameObject[] contextPanels;
private int currentContextPanelID;
public void SetupContextPanels()
{
currentContextPanelID = 0;
for(int i = 0; i < contextPanels.Length; i++)
{
contextPanels[i].SetActive(false);
}
contextPanels[currentContextPanelID].SetActive(true);
}
public void UpdateContextPanels(int newContextPanelID)
{
contextPanels[currentContextPanelID].SetActive(false);
currentContextPanelID = newContextPanelID;
contextPanels[currentContextPanelID].SetActive(true);
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIContextPanelsBehaviour.cs.meta


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

100
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class UIMenuBehaviour : MonoBehaviour
{
[Header("Sub-Behaviours")]
public UIContextPanelsBehaviour uiContextPanelsBehaviour;
public UIPanelRebindBehaviour uiPanelRebindBehaviour;
[Header("Core Object References")]
public GameObject uiMenuCameraObject;
public GameObject uiMenuCanvasObject;
[Header("Default Selected")]
public GameObject defaultSelectedGameObject;
[Header("Player Display")]
public DeviceDisplayConfigurator deviceDisplayconfigurator;
public Image deviceDisplayIcon;
public TextMeshProUGUI IDDisplayText;
public void SetupBehaviour()
{
UpdateUIMenuState(false);
}
public void UpdateUIMenuState(bool newState)
{
switch (newState)
{
case true:
ResetContextPanels();
UpdateEventSystemDefaultSelected();
UpdateEventSystemUIInputModule();
UpdateUIPlayerDisplay();
UpdateUIRebindActions();
break;
case false:
break;
}
UpdateCoreUIObjectsState(newState);
}
void ResetContextPanels()
{
uiContextPanelsBehaviour.SetupContextPanels();
}
void UpdateCoreUIObjectsState(bool newState)
{
uiMenuCameraObject.SetActive(newState);
uiMenuCanvasObject.SetActive(newState);
}
void UpdateUIPlayerDisplay()
{
PlayerController focusedPlayerController = GameManager.Instance.GetFocusedPlayerController();
//ID
int focusedPlayerID = focusedPlayerController.GetPlayerID();
IDDisplayText.SetText((focusedPlayerID + 1).ToString());
//Color
Color focusedPlayerDeviceColor = deviceDisplayconfigurator.GetDeviceColor(focusedPlayerController.GetRawDevicePath());
deviceDisplayIcon.color = focusedPlayerDeviceColor;
}
void UpdateEventSystemDefaultSelected()
{
EventSystemManager.Instance.SetCurrentSelectedGameObject(defaultSelectedGameObject);
}
void UpdateEventSystemUIInputModule()
{
EventSystemManager.Instance.UpdateActionAssetToFocusedPlayer();
}
void UpdateUIRebindActions()
{
uiPanelRebindBehaviour.UpdateRebindActions();
}
public void SwitchUIContextPanels(int selectedPanelID)
{
uiContextPanelsBehaviour.UpdateContextPanels(selectedPanelID);
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuBehaviour.cs.meta


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

13
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuOptionBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIMenuOptionBehaviour : MonoBehaviour
{
public int contextPanelID;
public void ButtonOptionSelected()
{
UIManager.Instance.MenuButtonOptionSelected(contextPanelID);
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuOptionBehaviour.cs.meta


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

16
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIPanelRebindBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIPanelRebindBehaviour : MonoBehaviour
{
public UIRebindActionBehaviour[] uiRebindActionBehaviours;
public void UpdateRebindActions()
{
for(int i = 0; i < uiRebindActionBehaviours.Length; i++)
{
uiRebindActionBehaviours[i].UpdateBehaviour();
}
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIPanelRebindBehaviour.cs.meta


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

46
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIRebindActionBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.UI;
using TMPro;
public class UIRebindActionBehaviour : MonoBehaviour
{
private InputActionAsset focusedInputActionAsset;
private bool listeningForInput;
[Header("Rebind Settings")]
public string actionName;
[Header("UI Display")]
public Image bindingIconDisplayImage;
public GameObject listeningObject;
public void UpdateBehaviour()
{
GetFocusedInputActionAsset();
}
void GetFocusedInputActionAsset()
{
focusedInputActionAsset = EventSystemManager.Instance.GetInputActionAsset();
}
public void RebindButtonPressed()
{
StartListeningForRebind();
}
void StartListeningForRebind()
{
listeningForInput = true;
}
}

11
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIRebindActionBehaviour.cs.meta


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

76
InputSystem_Warriors_Project/Assets/Scripts/Editor/DeviceDisplayConfiguratorEditor.cs


using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
[CustomEditor(typeof(DeviceDisplayConfigurator))]
public class DeviceDisplayConfiguratorEditor : Editor
{
private ReorderableList listDevices;
private SerializedProperty disconnectedDeviceProperty;
private Rect rawPathColumn;
private Rect displayNameColumn;
private Rect displayColorColumn;
private void OnEnable()
{
DrawListOfDevices();
disconnectedDeviceProperty = serializedObject.FindProperty("disconnectedDeviceSettings");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.LabelField("Device Settings", EditorStyles.boldLabel);
listDevices.DoLayoutList();
EditorGUILayout.PropertyField(disconnectedDeviceProperty);
serializedObject.ApplyModifiedProperties();
}
void DrawListOfDevices()
{
listDevices = new ReorderableList(serializedObject, serializedObject.FindProperty("listDeviceSettings"), true, true, true, true);
listDevices.drawHeaderCallback = (Rect rect) => {
DrawColumnHeaders(rect);
};
listDevices.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
var element = listDevices.serializedProperty.GetArrayElementAtIndex(index);
rect.y += 2;
CalculateColumnSizes(rect);
EditorGUI.PropertyField(rawPathColumn, element.FindPropertyRelative("deviceRawPath"), GUIContent.none);
EditorGUI.PropertyField(displayNameColumn, element.FindPropertyRelative("deviceDisplayName"), GUIContent.none);
EditorGUI.PropertyField(displayColorColumn, element.FindPropertyRelative("deviceDisplayColor"), GUIContent.none);
};
}
void DrawColumnHeaders(Rect rect)
{
CalculateColumnSizes(rect);
EditorGUI.LabelField(rawPathColumn, "Raw Path Name");
EditorGUI.LabelField(displayNameColumn, "Display Name");
EditorGUI.LabelField(displayColorColumn, "Display Color");
}
void CalculateColumnSizes(Rect rect)
{
rawPathColumn = new Rect(rect.x, rect.y, rect.width/2 - 50 - 10, EditorGUIUtility.singleLineHeight);
displayNameColumn = new Rect(rect.x + rect.width/2 - 50, rect.y, rect.width/2 - 60, EditorGUIUtility.singleLineHeight);
displayColorColumn = new Rect(rect.x + rect.width - 100, rect.y, 100, EditorGUIUtility.singleLineHeight);
}
}

98
InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.InputSystem;
[CustomEditor(typeof(GameManager))]
public class GameManagerEditor : Editor
{
private GameManager gameManager;
//Game Mode
private SerializedProperty currentGameModeProperty;
//Single Player
private SerializedProperty inScenePlayerProperty;
//Local Multiplayer
private SerializedProperty playerPrefabProperty;
private SerializedProperty numberOfPlayersProperty;
private SerializedProperty spawnRingCenterProperty;
private SerializedProperty spawnRingRadiusProperty;
void OnEnable()
{
//Game Mode
currentGameModeProperty = serializedObject.FindProperty("currentGameMode");
//Single Player
inScenePlayerProperty = serializedObject.FindProperty("inScenePlayer");
//Local Multiplayer
playerPrefabProperty = serializedObject.FindProperty("playerPrefab");
numberOfPlayersProperty = serializedObject.FindProperty("numberOfPlayers");
spawnRingCenterProperty = serializedObject.FindProperty("spawnRingCenter");
spawnRingRadiusProperty = serializedObject.FindProperty("spawnRingRadius");
}
public override void OnInspectorGUI()
{
gameManager = (GameManager)target;
serializedObject.Update();
DrawGameModeGUI();
DrawSpaceGUI(3);
EditorGUILayout.LabelField("Mode Settings", EditorStyles.boldLabel);
if(gameManager.currentGameMode == GameMode.SinglePlayer)
{
DrawSinglePlayerGUI();
}
if(gameManager.currentGameMode == GameMode.LocalMultiplayer)
{
DrawLocalMultiplayerGUI();
}
serializedObject.ApplyModifiedProperties();
}
void DrawGameModeGUI()
{
EditorGUILayout.LabelField("Game Mode", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(currentGameModeProperty);
}
void DrawSinglePlayerGUI()
{
EditorGUILayout.PropertyField(inScenePlayerProperty);
}
void DrawLocalMultiplayerGUI()
{
EditorGUILayout.PropertyField(playerPrefabProperty);
EditorGUILayout.PropertyField(numberOfPlayersProperty);
EditorGUILayout.PropertyField(spawnRingCenterProperty);
EditorGUILayout.PropertyField(spawnRingRadiusProperty);
}
void DrawSpaceGUI(int amountOfSpace)
{
for(int i = 0; i < amountOfSpace; i++)
{
EditorGUILayout.Space();
}
}
}

139
InputSystem_Warriors_Project/Assets/Prefabs/Warrior/WeaponTrail.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8461215612231668206
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8461215612231668207}
- component: {fileID: 8461215612231668204}
m_Layer: 0
m_Name: WeaponTrail
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8461215612231668207
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8461215612231668206}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.777, y: 0.506, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!96 &8461215612231668204
TrailRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8461215612231668206}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6ddc3ed69fff44c409ff48f83a177748, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Time: 30
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: -2.1708405
outSlope: -2.1708405
tangentMode: 0
weightedMode: 0
inWeight: 0.32124352
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 65535
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 1
textureMode: 2
shadowBias: 0.5
generateLightingData: 0
m_MinVertexDistance: 0.01
m_Autodestruct: 1
m_Emitting: 1

7
InputSystem_Warriors_Project/Assets/Prefabs/Warrior/WeaponTrail.prefab.meta


fileFormatVersion: 2
guid: 7add984aa101198469845a27c4df457b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0-preview.4.meta


fileFormatVersion: 2
guid: 062bfd9c9444a614db20ae88eb8ac1d1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

215
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerController.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerController : MonoBehaviour
{
//Camera
private Camera mainCamera;
[Header("Physics")]
public Rigidbody playerRigidbody;
[Header("Animation")]
public Animator playerAnimator;
private int playerMovementID;
private int playerAttackID;
[Header("Input")]
public bool useOldInputManager = false;
public PlayerInput playerInput;
private string actionMapGameplay = "Player Controls";
private string actionMapMenu = "Menu Controls";
private Vector3 inputDirection;
private Vector2 movementInput;
private bool currentInput = false;
[Header("Movement Settings")]
public float movementSpeed = 3;
public float smoothingSpeed = 1;
private Vector3 currentDirection;
private Vector3 rawDirection;
private Vector3 smoothDirection;
private Vector3 movement;
void Start()
{
FindCamera();
SetupAnimationIDs();
}
void FindCamera()
{
mainCamera = GameManager.Instance.mainCamera;
}
void SetupAnimationIDs()
{
playerMovementID = Animator.StringToHash("Movement");
playerAttackID = Animator.StringToHash("Attack");
}
void Update()
{
CalculateMovementInput();
CalculateAttackInput();
}
void FixedUpdate()
{
CalculateDesiredDirection();
ConvertDirectionFromRawToSmooth();
MoveThePlayer();
AnimatePlayerMovement();
TurnThePlayer();
}
void CalculateMovementInput()
{
if(useOldInputManager)
{
var v = Input.GetAxisRaw("Vertical");
var h = Input.GetAxisRaw("Horizontal");
inputDirection = new Vector3(h, 0, v);
}
if(inputDirection == Vector3.zero)
{
currentInput = false;
}
else if(inputDirection != Vector3.zero)
{
currentInput = true;
}
}
void CalculateAttackInput()
{
if(useOldInputManager)
{
if(Input.GetKeyDown(KeyCode.Space))
{
playerAnimator.SetTrigger(playerAttackID);
}
}
}
void CalculateDesiredDirection()
{
//Camera Direction
var cameraForward = mainCamera.transform.forward;
var cameraRight = mainCamera.transform.right;
cameraForward.y = 0f;
cameraRight.y = 0f;
rawDirection = cameraForward * inputDirection.z + cameraRight * inputDirection.x;
}
void ConvertDirectionFromRawToSmooth()
{
if(currentInput == true)
{
smoothDirection = Vector3.Lerp(smoothDirection, rawDirection, Time.deltaTime * smoothingSpeed);
} else if(currentInput == false)
{
smoothDirection = Vector3.zero;
}
}
void MoveThePlayer()
{
if(currentInput == true)
{
movement.Set(smoothDirection.x, 0f, smoothDirection.z);
movement = movement.normalized * movementSpeed * Time.deltaTime;
playerRigidbody.MovePosition(transform.position + movement);
}
}
void TurnThePlayer()
{
if(currentInput == true)
{
Quaternion newRotation = Quaternion.LookRotation(smoothDirection);
playerRigidbody.MoveRotation(newRotation);
}
}
void AnimatePlayerMovement()
{
playerAnimator.SetFloat(playerMovementID, inputDirection.sqrMagnitude);
}
//Action Callbacks from the new Input System ----
private void OnMovement(InputValue value)
{
Vector2 inputMovement = value.Get<Vector2>();
inputDirection = new Vector3(inputMovement.x, 0, inputMovement.y);
}
private void OnAttack(InputValue value)
{
playerAnimator.SetTrigger("Attack");
}
private void OnOpenPauseMenu(InputValue value)
{
if(value.isPressed)
{
GameManager.Instance.TogglePauseMenu(true);
}
}
private void OnClosePauseMenu(InputValue value)
{
if(value.isPressed)
{
GameManager.Instance.TogglePauseMenu(false);
}
}
//Switching Action Maps ----
public void EnableGameplayControls()
{
playerInput.SwitchCurrentActionMap(actionMapGameplay);
}
public void EnablePauseMenuControls()
{
playerInput.SwitchCurrentActionMap(actionMapMenu);
}
public PlayerInput GetPlayerInput()
{
return playerInput;
}
}

135
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerVisualDisplayBehaviour.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using TMPro;
using UnityEngine.UI;
public class PlayerVisualDisplayBehaviour : MonoBehaviour
{
[Header("Input")]
public PlayerInput playerInput;
[Header("Device Display")]
public DeviceDisplayConfigurator deviceDisplayConfigurator;
[Header("UI")]
public GameObject playerDisplay;
public TextMeshProUGUI playerIDDisplayText;
public TextMeshProUGUI playerDeviceDisplayText;
public Image playerDeviceDisplayIcon;
[Header("Material")]
public SkinnedMeshRenderer playerSkinnedMeshRenderer;
//Current Values
private int currentPlayerID;
private string currentPlayerDevice;
private Color currentDeviceColor;
//Shader IDs
private string armorTintString = "_Tint_Armor";
private int armorTintShaderID;
void Start()
{
SetupShaderIDs();
if(playerInput.enabled)
{
TogglePlayerVisualDisplay(true);
SetPlayerVisualDisplay();
} else if(!playerInput.enabled)
{
TogglePlayerVisualDisplay(false);
}
}
void SetupShaderIDs()
{
armorTintShaderID = Shader.PropertyToID(armorTintString);
}
void GetPlayerInputID()
{
currentPlayerID = playerInput.playerIndex;
}
void SetPlayerVisualDisplay()
{
GetPlayerInputID();
GetPlayerDeviceDisplayName();
GetPlayerDeviceDisplayColor();
SetPlayerDisplayText();
SetPlayerDisplayColor();
}
void GetPlayerDeviceDisplayName()
{
currentPlayerDevice = deviceDisplayConfigurator.GetDeviceDisplayName(playerInput.devices[0].ToString());
}
void GetPlayerDeviceDisplayColor()
{
currentDeviceColor = deviceDisplayConfigurator.GetDeviceDisplayColor(playerInput.devices[0].ToString());
}
void SetPlayerDisplayText()
{
playerIDDisplayText.SetText((currentPlayerID + 1).ToString());
playerDeviceDisplayText.SetText(currentPlayerDevice);
}
void SetPlayerDisplayColor()
{
playerSkinnedMeshRenderer.material.SetColor(armorTintShaderID, currentDeviceColor);
playerDeviceDisplayIcon.color = currentDeviceColor;
}
//Device Callbacks from the new Input System ----
private void OnDeviceLost()
{
SetDisconnectedPlayerText();
SetDisconnectedPlayerColor();
}
private void OnDeviceRegained()
{
SetPlayerDisplayText();
SetPlayerDisplayColor();
}
//Disconnect Behaviours
void SetDisconnectedPlayerText()
{
playerIDDisplayText.SetText("X");
playerDeviceDisplayText.SetText("Controller Disconnected!");
}
void SetDisconnectedPlayerColor()
{
playerSkinnedMeshRenderer.material.SetColor(armorTintShaderID, new Color(1, 1, 1));
playerDeviceDisplayIcon.color = new Color(0,0,0);
}
//Utilities
void TogglePlayerVisualDisplay(bool newState)
{
playerDisplay.SetActive(newState);
}
void OnControlsChanged()
{
SetPlayerVisualDisplay();
}
}

30
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UIBillboardBehaviour.cs


using UnityEngine;
using System.Collections;
[ExecuteAlways]
public class UIBillboardBehaviour : MonoBehaviour
{
public Camera camera;
void OnEnable()
{
camera = GameManager.Instance.mainCamera;
}
void OnDisable()
{
camera = null;
}
//Orient the camera after all movement is completed this frame to avoid jittering
void LateUpdate()
{
if(camera)
{
transform.LookAt(transform.position + camera.transform.rotation * Vector3.forward, camera.transform.rotation * Vector3.up);
}
}
}

8
InputSystem_Warriors_Project/Assets/Editor.meta


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

/InputSystem_Warriors_Project/Assets/Scripts/Managers/UIMenuManager.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs.meta

/InputSystem_Warriors_Project/Assets/Scripts/Managers/UIMenuManager.cs → /InputSystem_Warriors_Project/Assets/Scripts/Managers/OldUIMenuManager.cs

/InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerController.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs.meta

/InputSystem_Warriors_Project/Assets/Scripts/Behaviours/PlayerVisualDisplayBehaviour.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerAnimationBehaviour.cs.meta

/InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UIBillboardBehaviour.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIBillboardBehaviour.cs.meta

/InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UIMenuPlayerDeviceDisplayBehaviour.cs → /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs

/InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UIMenuPlayerDeviceDisplayBehaviour.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Behaviours/UI/UIMenuPlayerDeviceDisplayBehaviour.cs.meta

/InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0-preview.4/Rebinding UI → /InputSystem_Warriors_Project/Assets/Samples/Input System/1.0.0/Rebinding UI

/InputSystem_Warriors_Project/Assets/Editor/DeviceDisplayConfiguratorEditor.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Editor/DeviceDisplayConfiguratorEditor.cs.meta

/InputSystem_Warriors_Project/Assets/Editor/ReorderableListUtility.cs.meta → /InputSystem_Warriors_Project/Assets/Scripts/Editor/GameManagerEditor.cs.meta

正在加载...
取消
保存