This commit is contained in:
2025-05-11 00:46:26 +08:00
parent 366f9e95ec
commit 618f75f911
2404 changed files with 154475 additions and 924730 deletions

View File

@@ -1,9 +1,5 @@
fileFormatVersion: 2
guid: 0d9d26e2162aa4d11ab075b34c029673
labels:
- ObiCloth
- ObiRope
- ObiSoftbody
ModelImporter:
serializedVersion: 19301
internalIDToNameTable:
@@ -2165,9 +2161,9 @@ ModelImporter:
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionY: 0
keepOriginalPositionXZ: 0
heightFromFeet: 0
heightFromFeet: 1
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
@@ -2471,7 +2467,7 @@ ModelImporter:
weight: 0
maskType: 0
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
additiveReferencePoseFrame: 56
isReadable: 1
meshes:
lODScreenPercentages: []

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 67b5b2972e42249f6b0218ab166e0a66
labels:
- Input
folderAsset: yes
DefaultImporter:
userData:

View File

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

View File

@@ -1,19 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1822101463, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name: EditorSettings
m_EditorClassIdentifier:
programVersion1: 1
programVersion2: 1
programVersion3: 57
programVersion4: 3
dataVersion: 1

View File

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

View File

@@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 34c7bef5c84872341b7be0322b72cc64
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -1,52 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 114: {fileID: 11400000}
m_Layer: 0
m_Name: DebugInformation
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
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}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1559198062, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: b1bb11887b0e1ce49aa3433d94d1900b
NativeFormatImporter:
userData:

View File

@@ -1,66 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 114: {fileID: 11400000}
- 114: {fileID: 11400002}
m_Layer: 0
m_Name: JoystickElementIdentifier
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
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}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -567314509, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 625082174, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
_pixelOffset: {x: 0, y: 0}
_useUnityUI: 1
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 9b25557305ecedf448b4c43532aac32e
NativeFormatImporter:
userData:

View File

@@ -1,525 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!196 &5
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!1 &84910976
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 84910981}
- 20: {fileID: 84910980}
- 124: {fileID: 84910978}
- 81: {fileID: 84910977}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &84910977
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
--- !u!124 &84910978
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
--- !u!20 &84910980
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_HDR: 0
m_OcclusionCulling: 1
--- !u!4 &84910981
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
--- !u!1 &311556634
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 311556636}
- 114: {fileID: 311556635}
m_Layer: 0
m_Name: Rewired Input Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &311556635
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 311556634}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 581b3e3c96df0ef42aef16b63b27b87f, type: 3}
m_Name:
m_EditorClassIdentifier:
_dontDestroyOnLoad: 1
_userData:
configVars:
updateLoop: 1
alwaysUseUnityInput: 0
windowsStandalonePrimaryInputSource: 0
osx_primaryInputSource: 0
linux_primaryInputSource: 0
windowsUWP_primaryInputSource: 0
xboxOne_primaryInputSource: 0
gameCoreXboxOne_primaryInputSource: 0
gameCoreScarlett_primaryInputSource: 0
ps4_primaryInputSource: 0
ps5_primaryInputSource: 0
webGL_primaryInputSource: 0
stadia_primaryInputSource: 0
useXInput: 0
useNativeMouse: 1
useEnhancedDeviceSupport: 1
osxStandalone_useEnhancedDeviceSupport: 1
android_supportUnknownGamepads: 1
ps4_assignJoysticksByPS4JoyId: 1
useSteamControllerSupport: 1
logToScreen: 0
runInEditMode: 0
allowInputInEditorSceneView: 0
platformVars_windowsStandalone:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
useNativeKeyboard: 1
joystickRefreshRate: 240
useWindowsGamingInput: 0
platformVars_linuxStandalone:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_osxStandalone:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
useAppleGameController: 0
assignJoysticksByUserId: 0
platformVars_windowsUWP:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
useGamepadAPI: 1
useHIDAPI: 1
platformVars_iOS:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_tvOS:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_android:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_ps4:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_ps5:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
assignJoysticksByPS5JoyId: 1
platformVars_psVita:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_xboxOne:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_gameCoreXboxOne:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
assignJoysticksByUserId: 0
platformVars_gameCoreScarlett:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
assignJoysticksByUserId: 0
platformVars_switch:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_webGL:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_stadia:
disableKeyboard: 0
disableMouse: 0
ignoreInputWhenAppNotInFocus: 1
useNativeKeyboard: 1
useNativeMouse: 1
maxJoysticksPerPlayer: 1
autoAssignJoysticks: 1
assignJoysticksToPlayingPlayersOnly: 0
distributeJoysticksEvenly: 1
reassignJoystickToPreviousOwnerOnReconnect: 1
defaultJoystickAxis2DDeadZoneType: 1
defaultJoystickAxis2DSensitivityType: 0
defaultAxisSensitivityType: 0
force4WayHats: 0
throttleCalibrationMode: 0
activateActionButtonsOnNegativeValue: 0
deferControllerConnectedEventsOnStart: 0
logLevel: 7
editorSettings:
exportConsts_useParentClass: 0
exportConsts_parentClassName: RewiredConsts
exportConsts_useNamespace: 1
exportConsts_namespace: RewiredConsts
exportConsts_actions: 1
exportConsts_actionsClassName: Action
exportConsts_actionsIncludeActionCategory: 0
exportConsts_actionsCreateClassesForActionCategories: 0
exportConsts_mapCategories: 1
exportConsts_mapCategoriesClassName: Category
exportConsts_layouts: 1
exportConsts_layoutsClassName: Layout
exportConsts_players: 1
exportConsts_playersClassName: Player
exportConsts_inputBehaviors: 0
exportConsts_inputBehaviorsClassName: InputBehavior
exportConsts_customControllers: 1
exportConsts_customControllersClassName: CustomController
exportConsts_customControllersAxesClassName: Axis
exportConsts_customControllersButtonsClassName: Button
exportConsts_layoutManagerRuleSets: 1
exportConsts_layoutManagerRuleSetsClassName: LayoutManagerRuleSet
exportConsts_mapEnablerRuleSets: 1
exportConsts_mapEnablerRuleSetsClassName: MapEnablerRuleSet
exportConsts_allCapsConstantNames: 0
players:
- _id: 9999999
_name: System
_descriptiveName: System
_startPlaying: 1
_defaultJoystickMaps: []
_defaultMouseMaps: []
_defaultKeyboardMaps: []
_defaultCustomControllerMaps: []
_startingCustomControllers: []
_assignMouseOnStart: 1
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 1
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
actions: []
actionCategories:
- _name: Default
_descriptiveName: Default
_tag:
_id: 0
_userAssignable: 1
actionCategoryMap:
list:
- categoryId: 0
actionIds:
inputBehaviors:
- _id: 0
_name: Default
_joystickAxisSensitivity: 1
_digitalAxisSimulation: 1
_digitalAxisSnap: 1
_digitalAxisInstantReverse: 0
_digitalAxisGravity: 3
_digitalAxisSensitivity: 3
_mouseXYAxisMode: 0
_mouseOtherAxisMode: 0
_mouseXYAxisSensitivity: 1
_mouseXYAxisDeltaCalc: 0
_mouseOtherAxisSensitivity: 1
_customControllerAxisSensitivity: 1
_buttonDoublePressSpeed: .300000012
_buttonShortPressTime: .25
_buttonShortPressExpiresIn: 0
_buttonLongPressTime: 1
_buttonLongPressExpiresIn: 0
_buttonDeadZone: .5
_buttonDownBuffer: 0
_buttonRepeatRate: 30
_buttonRepeatDelay: 0
mapCategories:
- _name: Default
_descriptiveName: Default
_tag:
_id: 0
_userAssignable: 1
_checkConflictsWithAllCategories: 1
_checkConflictsCategoryIds:
joystickLayouts:
- _name: Default
_descriptiveName: Default
_id: 0
keyboardLayouts:
- _name: Default
_descriptiveName: Default
_id: 0
mouseLayouts:
- _name: Default
_descriptiveName: Default
_id: 0
customControllerLayouts:
- _name: Default
_descriptiveName: Default
_id: 0
joystickMaps: []
keyboardMaps: []
mouseMaps: []
customControllerMaps: []
customControllers: []
controllerMapLayoutManagerRuleSets: []
controllerMapEnablerRuleSets: []
playerIdCounter: 1
actionIdCounter: 0
actionCategoryIdCounter: 1
inputBehaviorIdCounter: 1
mapCategoryIdCounter: 1
joystickLayoutIdCounter: 1
keyboardLayoutIdCounter: 1
mouseLayoutIdCounter: 1
customControllerLayoutIdCounter: 1
joystickMapIdCounter: 0
keyboardMapIdCounter: 0
mouseMapIdCounter: 0
customControllerMapIdCounter: 0
customControllerIdCounter: 0
controllerMapLayoutManagerSetIdCounter: 0
controllerMapEnablerSetIdCounter: 0
_controllerDataFiles: {fileID: 11400000, guid: d21d2b20df8369642b76aafbb2576ba7,
type: 2}
--- !u!4 &311556636
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 311556634}
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}
--- !u!1 &845884272
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
m_PrefabInternal: {fileID: 1431304253}
serializedVersion: 4
m_Component:
- 4: {fileID: 845884275}
- 114: {fileID: 845884273}
- 114: {fileID: 845884274}
m_Layer: 0
m_Name: JoystickElementIdentifier
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &845884273
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: 9b25557305ecedf448b4c43532aac32e,
type: 2}
m_PrefabInternal: {fileID: 1431304253}
m_GameObject: {fileID: 845884272}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -567314509, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &845884274
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400002, guid: 9b25557305ecedf448b4c43532aac32e,
type: 2}
m_PrefabInternal: {fileID: 1431304253}
m_GameObject: {fileID: 845884272}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 625082174, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
_pixelOffset: {x: 0, y: 0}
_useUnityUI: 1
--- !u!4 &845884275
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
m_PrefabInternal: {fileID: 1431304253}
m_GameObject: {fileID: 845884272}
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}
--- !u!1001 &1431304253
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 9b25557305ecedf448b4c43532aac32e, type: 2}
m_RootGameObject: {fileID: 845884272}
m_IsPrefabParent: 0
m_IsExploded: 1

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: f1add3d573270314f9989babd5c4a3c1
DefaultImporter:
userData:

View File

@@ -1,66 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 400000}
- 114: {fileID: 11400000}
- 114: {fileID: 11400002}
m_Layer: 0
m_Name: UnityJoystickElementIdentifier
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
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}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1558239198, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &11400002
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 625082174, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
_pixelOffset: {x: 0, y: 0}
_useUnityUI: 1
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1
m_IsExploded: 1

View File

@@ -1,21 +0,0 @@
fileFormatVersion: 2
guid: 9431ba5b04ae3934a8cde0abd640ad65
labels:
- Input
- Joysticks
- Controllers
- Rewired
- Hotplugging
- Keyboard
- Mouse
- Touch
- InputManager
- Control
- Gamepad
- Controller
- Joystick
- Xbox360
- XInput
- DirectInput
NativeFormatImporter:
userData:

View File

@@ -1,242 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 0}
m_ObjectHideFlags: 0
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
m_LightProbes: {fileID: 0}
m_Lightmaps: []
m_LightmapsMode: 1
m_BakedColorSpace: 0
m_UseDualLightmapsInForward: 0
m_LightmapEditorSettings:
m_Resolution: 50
m_LastUsedResolution: 0
m_TextureWidth: 1024
m_TextureHeight: 1024
m_BounceBoost: 1
m_BounceIntensity: 1
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1}
m_SkyLightIntensity: 0
m_Quality: 0
m_Bounces: 1
m_FinalGatherRays: 1000
m_FinalGatherContrastThreshold: .0500000007
m_FinalGatherGradientThreshold: 0
m_FinalGatherInterpolationPoints: 15
m_AOAmount: 0
m_AOMaxDistance: .100000001
m_AOContrast: 1
m_LODSurfaceMappingDistance: 1
m_Padding: 0
m_TextureCompression: 0
m_LockAtlas: 0
--- !u!196 &5
NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
widthInaccuracy: 16.666666
heightInaccuracy: 10
m_NavMesh: {fileID: 0}
--- !u!1 &84910976
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 84910981}
- 20: {fileID: 84910980}
- 124: {fileID: 84910978}
- 81: {fileID: 84910977}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &84910977
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
--- !u!124 &84910978
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
--- !u!20 &84910980
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_HDR: 0
m_OcclusionCulling: 1
--- !u!4 &84910981
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 84910976}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
--- !u!1001 &282959991
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
m_RootGameObject: {fileID: 1800550507}
m_IsPrefabParent: 0
m_IsExploded: 1
--- !u!1 &1800550507
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
m_PrefabInternal: {fileID: 282959991}
serializedVersion: 4
m_Component:
- 4: {fileID: 1800550510}
- 114: {fileID: 1800550508}
- 114: {fileID: 1800550509}
m_Layer: 0
m_Name: UnityJoystickElementIdentifier
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1800550508
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: 9431ba5b04ae3934a8cde0abd640ad65,
type: 2}
m_PrefabInternal: {fileID: 282959991}
m_GameObject: {fileID: 1800550507}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1558239198, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1800550509
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400002, guid: 9431ba5b04ae3934a8cde0abd640ad65,
type: 2}
m_PrefabInternal: {fileID: 282959991}
m_GameObject: {fileID: 1800550507}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 625082174, guid: 09c9b883b79ef864a99683bb36c5776d, type: 3}
m_Name:
m_EditorClassIdentifier:
_pixelOffset: {x: 0, y: 0}
_useUnityUI: 1
--- !u!4 &1800550510
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: 9431ba5b04ae3934a8cde0abd640ad65, type: 2}
m_PrefabInternal: {fileID: 282959991}
m_GameObject: {fileID: 1800550507}
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}

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 616b862448906a846bd333011203531d
DefaultImporter:
userData:

View File

@@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: bc641e77f1220894e8a0f5673dfa7407
labels:
- Input
- Joysticks
- Controllers
- Rewired
- Hotplugging
- Keyboard
- Mouse
- Touch
- InputManager
- Control
- Gamepad
- Controller
- Joystick
- Xbox360
- XInput
- DirectInput
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -1,5 +0,0 @@
fileFormatVersion: 2
guid: 0a9908f8c93bd0843841292fda5f6c5e
folderAsset: yes
DefaultImporter:
userData:

View File

@@ -1,207 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Actions</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Actions
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>An Action can represent any type of event that should take place as a result of input. Generally, Actions are named for the in-game action they represent, such as: Move Horizontal, Jump, Fire, Reload, Change Weapon, Punch, etc. Actions can also represent system actions such as Menu, Save, Load, Cancel, Back, Forward, etc. How you name and use Actions is entirely up to your game's needs.</p>
<p><strong>Getting Input</strong></p>
<p>Actions are generally how you get input in Rewired. Instead of getting input from a specific button on a specific controller which may change if the user switches controllers, you get input from the Action through the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player.htm">Player</a> class. For example:</p>
<pre class="code">
private Rewired.Player player;
void Awake() {
player = Rewired.ReInput.players.GetPlayer(0); <span class="comment">// get the player by id</span>
}
void Update() {
player.GetButtonDown("Fire");
}</pre>
<p>This way, you don't have to worry about what type or how many controllers the player is using -- you simply get your input based on the Action.</p>
<p>You can also get input based on the Action id instead. The Action id is displayed in the <a href="RewiredEditor.html#Actions">Rewired Editor under Actions</a>. You can <a href="HowTos.html#exporting-constants">export a list of Action Id constants</a> which adds the convenience of letting you use your IDE's auto-complete to find Actions when coding. Looking up Actions by id is significantly faster than by name and is the recommended method.</p>
<p>Additionally, you have the option of using input events instead of polling for input as shown in the above example. See <a href="HowTos.html#get-input">How To's - Getting Input</a> for more information.</p>
<p><strong>Buttons and Axes</strong></p>
<p>An Action is neither a button nor an axis. An Action is a virtual element
that can be queried as both a button (boolean value) and an axis (floating
point value). All <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player.htm">Player Button and Axis methods</a> work regardless of what type or how many
underlying elements make up the value of the Action.</p>
<p>When querying an Action's Button value, if the underlying element bound to the Action is a physical or virtual axis, the Action's <a href="InputBehaviors.html#button-dead-zone">Input Behavior Button Dead Zone</a> is used to determine at what axis value the Button state change occurs. In addition, an underlying axis will only trigger a Button state change based on a positive axis value. If the axis has a negative value, this value is ignored for the purposes of the Button state, but instead contributes to a Negative Button state. <a href="HowTos.html#button-press-types-negative-buttons">See this form more information</a>.</p>
<p>When querying an Action's Axis value, if the underlying element bound to the Action is a physical or virtual button, the Action's <a href="InputBehaviors.html#digital-axis-settings">Input Behavior Digital Axis Settings</a> are used to determine how the axis value is calculated. </p>
<p><strong>Creating/Editing Actions</strong></p>
<p>You must create and edit Actions in the <a href="RewiredEditor.html">Rewired Editor</a>. See <a href="RewiredEditor.html#Actions">Rewired Editor - Actions</a> for more information.</p>
<p><strong>Action Categories</strong></p>
<p>Actions can be categorized into different lists through the use of Action Categories.</p>
<p>Action Categories are only for organizational purposes in the Rewired Editor or in lists of Actions for displaying in a UI (a control remapping screen, for example). They have no impact whatsoever on what controls are mapped in a Player and do not affect input in any way.</p>
<p><strong>Rewired&rsquo;s Purpose and Responsibilities</strong></p>
<p>It is common for Rewired's Action system to be used in an unintended manner as an integral part of or in place of a separate game state management system. This is not what Rewired was designed for and not how it is intended to be used.
</p>
<ul>
<li>Rewired&rsquo;s sole purpose is to read user input.</li>
<li>All &ldquo;Actions&rdquo; in Rewired are actually &ldquo;Input Actions&rdquo; and should not be used for any other purpose than to get information about the user&rsquo;s intent. They should not be confused with or used as game states or actions.</li>
<li>The Action &ldquo;Jump&rdquo; does not designate &ldquo;Player is jumping,&rdquo; but rather &ldquo;The user wants to jump.&rdquo;</li>
<li>The game should implement permission and state management systems that evaluate user input and then change states. After that point, what happens is outside the responsibility of the input system.</li>
</ul>
<h3></h3>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Players.html" title="Players"><span class="button-img"></span>Players</a>
<a class="forward-button" href="InputBehaviors.html" title="Input Behaviors"><span class="button-img"></span>Input Behaviors</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: f1bd19dc0db8c9b4fa1f1d926aa085fa
TextScriptImporter:
userData:

View File

@@ -1,191 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Basic Usage</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Basic Usage
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<h3>Accessing Rewired in Scripts</h3>
<p>To access Rewired classes from a script, add the following line to the top of the script so you don't have to type the Rewired namespace each time:</p>
<p><strong>C#:</strong></p>
<pre class="code">using Rewired;</pre>
<p><strong>Javascript (add below any #pragma statements):</strong></p>
<pre class="code">import Rewired;</pre>
<p><strong>Boo:</strong></p>
<pre class="code">import Rewired</pre>
<h3>&nbsp;</h3>
<h3>The Most Important Classes</h3>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ReInput.htm">Rewired.ReInput</a> - The primary static input class. Access Players, Controllers, and much more.</p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player.htm">Rewired.Player</a> - Access input through Player.</p>
<p><a href="HowTos.html#important-classes">For more important classes, see How To's - Important Classes</a> </p>
<p>See the <a href="https://guavaman.com/projects/rewired/docs/api-reference">API Reference</a> for a complete list of classes.</p>
<p>&nbsp;</p>
<p><strong>&quot;Id&quot; is NOT an &quot;Index&quot;</strong></p>
<p>Anywhere the term Id is used in the API is a UNIQUE ID, not an Index, and cannot be used to iterate over items or get the first Joystick.</p>
<p>&nbsp;</p>
<h3>Debugging and Troubleshooting</h3>
<p>The single most important tool for debugging and troubleshooting is <a href="Troubleshooting.html#debug-information">Debug Information</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="QuickStart.html" title="Quick Start"><span class="button-img"></span>Quick Start</a>
<a class="forward-button" href="Deployment.html" title="Deployment"><span class="button-img"></span>Deployment</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 6729b996d83747749938e87ddfbb7b10
TextScriptImporter:
userData:

View File

@@ -1,198 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Best Practices</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Best Practices
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<h3><a name="input-manager" id="input-manager"></a>Input Manager:</h3>
<ul>
<li>Create the Rewired Input Manager as a prefab and <a href="InputManager.html#rewired-initializer">Rewired Initializer</a> to manage instantiation of the Rewired Input Manager prefabin all your scenes.</li>
</ul>
<h3><a name="controller-mapping" id="controller-mapping"></a>Controller Mapping:</h3>
<ul>
<li><strong>Always make a mapping for the <a href="ControllerMaps.html#gamepad-template">Gamepad Template</a></strong>. The vast majority of players using controllers will be using a gamepad. To save time, map for the Gamepad Template and <a href="SupportedControllers.html">all gamepads recognized by Rewired</a> will just work.</li>
<li><strong>Always make a mapping for the <a href="ControllerMaps.html#unknown-controllers">Unknown Controller</a></strong>. If a player uses a controller that isn't recognized, they can at least have some kind of input without manual mapping. <a href="ControllerMaps.html#unknown-controllers">Please see this for more information and recommended mapping guidelines</a>.</li>
<li><strong>Always provide some means for your users to remap their controls.</strong> Many controllers <a href="FAQ.html#addding-controller-definitions">cannot ever be recognized by Rewired due to bad practices by manufacturers</a>. To support these controllers properly and give your users the best experience, you must provide them a way to remap their controls. You can either include <a href="ControlMapper.html">Control Mapper</a> directly in your game or <a href="HowTos.html#controller-mapping-screen">create your own control remapping system</a>.</li>
</ul>
<h3><a name="controller-assignment" id="controller-assignment"></a>Controller Assignment:</h3>
<ul>
<li><strong>Always provide some means for your users to change controller assignments.</strong> It is especially important if you are making a multi-player game. You cannot know what devices, physical or virtual, will be present on a user's system, appear as Joysticks to Rewired, and be assigned to a Player. Device emulation software (VJoy, DS4Win, SCPToolkit, etc.) and certain device drivers can and frequently do cause problems by creating extra, non-functional virtual devices. Allowing the user to make their own controller assignments solves this issue as well as making it possible for users to swap controllers, etc. You can either include <a href="ControlMapper.html">Control Mapper</a> directly in your game or <a href="HowTos.html#assigning-controllers">create your own system</a>.</li>
<li><a name="one-player-games" id="one-player-games"></a><strong>If your game is 1-Player: </strong> Set <a href="RewiredEditor.html#Settings">Max Joysticks Per Player</a> to 100 so all controllers attached to the system may be used by the player.</li>
</ul>
<h3><a name="windows" id="windows"></a>Windows Standalone Platform:</h3>
<ul>
<li><strong>Always enable Use Windows Gaming Input + Use XInput.</strong> Windows Gaming Input provides universal comaptibility with all XInput-compatible controllers such as Xbox controllers and clones. It also provides support for vibration including trigger vibration, independent trigger values, and support for more than 4 controllers at once with all special features. Also enabling Use XInput allows for falling back to XInput on older systems that do not support Windows Gaming Input. The only exception to this rule would be if your game requires support for more than 4 XBox controllers at once <a href="KnownIssues.html#more-than-4-xbox-controllers">(XInput has a limit of 4)</a>, in which case, Use XInput can be disabled to allow Raw Input to be used as the fallback in case Windows Gaming Input is not available on the system to be able to support more than 4 XBox controllers at once, <a href="KnownIssues.html#more-than-4-xbox-controllers">albeit with caveats</a>.</li>
</ul>
<h3><a name="steam" id="steam"></a>Steam:</h3>
<ul>
<li><a href="Troubleshooting.html#steam">Read this important information about Rewired and Steam.</a></li>
<li><a href="Troubleshooting.html#steam-rewired-setup">Initialize Steam before initializing Rewired.</a></li>
<li><a href="Troubleshooting.html#steam-controller">Configure the Steam Controller settings correctly in the Steam developer backend.</a></li>
<li><a href="Troubleshooting.html#steam-controller">Make sure you are using the correct input source(s) for each platform.</a></li>
<li><a href="Troubleshooting.html#steam-configured-controllers-recommendations">Decide if you want to opt in to Steam controller configuration support for any controllers.</a></li>
<li>Make sure you have Joystick Maps configured for the <a href="ControllerTemplates.html#gamepad-template">Gamepad Template</a>.</li>
<li><a href="Troubleshooting.html#steam">See these topics for more information on Steam and Steam issues.</a><br/>
</li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="Deployment.html" title="Documentation"><span class="button-img"></span>Deployment</a>
<a class="forward-button" href="RewiredEditor.html" title="Rewired Editor"><span class="button-img"></span>Rewired Editor</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,360 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Component Controls</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Component Controls<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<h3><strong>General Information</strong></h3>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#overview">Overview</a></li>
</ul>
<p><strong>Controllers</strong></p>
<ul>
<li><a href="#custom-controller">Custom Controller</a></li>
</ul>
<p><strong>Controls</strong></p>
<ul>
<li><a href="#tilt-control">Tilt Control</a> </li>
</ul>
<p><strong>Other Controls</strong></p>
<ul>
<li><a href="TouchControls.html">Touch Controls</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h2>General Information</h2>
<h3><a name="requirements" id="requirements"></a>Requirements</h3>
<ul>
<li>Understanding of <a href="Documentation.html">Rewired</a> and <a href="ControllerMaps.html">Controller Maps</a></li>
<li>Understanding of <a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="overview" id="overview"></a>Overview</h3>
<p>Component controls are MonoBehaviour based controls that can be configured using the Unity inspector. <a href="TouchControls.html">Touch controls</a> and <a href="#tilt-control">tilt controls</a> are two examples of component controls. Component controls are most commonly used to provide input values to a <a href="CustomControllers.html">Custom Controller</a> which has been configured beforehand in the <a href="RewiredEditor.html">Rewired Editor</a>.</p>
<p>Component controls consist of two component types:</p>
<ol>
<li>Component Controller - Manages a set of controls.</li>
<li>Component Control - Individual buttons, joysticks, touch pads, tilt control, etc.</li>
</ol>
<p>Each Component Control must always be the child of a Component Controller in the Unity scene Hierarchy. The Component Controller is responsible for collecting input data from its individual child controls, and in most cases, sending that data to a <a href="CustomControllers.html">Custom Controller</a>. The hierarchy of a an example Component Controller with its child controls would look like this:</p>
<p><img src="files/images/touch-controller-hierarchy.png" alt="Touch Controller hierarchy" /><br />
</p>
<p>In the example above, the Touch Controller component points to a Rewired.CustomController class object which will receive the data from the touch joystick, the two touch buttons, and a tilt control. Each control will get the user input and send that data back to the Touch Controller component, which will feed it into the target Custom Controller elements pointed to in the inspector. The input will be piped into the Rewired Player-Action system and the Player who is assigned the Custom Controller will receive the input. The game-side code for getting input remains unchanged regardless of whether the input is coming from a physical joystick, keyboard, mouse, touch controller, tilt control, etc.</p>
<p>You will notice the Tilt Control in the list above parented underneath a Touch Controller component. Even though a Tilt Control isn't a touch control, it can still be parented underneath a Touch Controller component and it will work because Touch Controller inherits from Custom Controller component and fulfills all requirements of the Tilt Control. You could just as easily parent the Tilt Control underneath a Custom Controller component instead, for example, if you aren't using any touch controls.</p>
<p><img src="files/images/custom-controller-tilt-hierarchy.png" /></p>
<p> For Touch Controls, however, the Touch Controller component must be used instead of the Custom Controller component.</p>
<p>The most common use of Component Controls is on-screen Touch Controls for mobile games. Rewired includes touch controls which you can customize and use directly in your games. See <a href="TouchControls.html">Touch Controls</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h2>Controllers </h2>
<h3><a name="custom-controller" id="tilt-control2"></a>Custom Controller</h3>
<p>The Custom Controller component is responsible for sending user input data received from its child Component Controls into the Rewired.CustomController.</p>
<p>The Custom Controller component is essentially a component wrapper for the Rewired.CustomController class. The Custom Controller component cannot function without an underlying target Rewired.CustomController. This component's inspector allows you to set options which will tell it which Rewired.CustomController to point to.</p>
<p>The first thing you should do is link the Rewired Input Manager you intend to use to the Rewired Input Manager field of the Custom Controller. This is optional, but highly recommended as it allows you to select the Custom Controller and the target elements on that controller by simply selecting them from a drop-down. If you do not link the Rewired Input Manager, you will have to use either string names or id integers to tell the controller and each control which Custom Controller and which elements in which to feed the incoming data.</p>
<p>Click the &quot;Find Rewired Input Manager&quot; button in the inspector to find any enabled Rewired Input Manager in the scene and link it. Otherwise, you can manually link it to the Rewired Input Manager.</p>
<p><img src="files/images/componentcontrols_customcontroller_inspector_rim.png" alt="Custom Controller inspector" /></p>
<p>There are two ways to determine the target Rewired.CustomController:</p>
<ol>
<li>Instantiate a new Custom Controller from a controller defined in the Rewired Input Manager.</li>
<li>Search through existing Custom Controllers that have already been instantiated. </li>
</ol>
<p><strong>Instantiating a new Custom Controller:</strong><br />
The Custom Controller component can instantiate a new Rewired.CustomController from an existing controller definition that you have created beforehand in the Rewired Input Manager. This is the easiest way to work with Custom Controllers and is the recommended option.
</p>
<p>A new Rewired.CustomController will be instantiated on Awake of the Custom Controller component and optionally destroyed when the Custom Controller component is destroyed. To enable this, check &quot;Create Custom Controller&quot; and &quot;Destroy Custom Controller&quot; in the inspector. Select a Custom Controller from the list or enter its Source Id, then choose a Player to assign it to when it's instantiated.</p>
<p><img src="files/images/componentcontrols_customcontroller_inspector_create_rimlinked.png" alt="Custom Controller inspector" /></p>
<table width="100%" border="0">
<tr>
<td>Create Custom Controller</td>
<td>If true, a new Custom Controller will be created. Otherwise, an existing Custom Controller will be found using the selector properties.</td>
</tr>
<tr>
<td>Custom Controller / Source Id</td>
<td><p>(Custom Controller is shown if the Rewired Input Manager has been linked in the Rewired Input Manager field, otherwise Source Id is shown.)</p>
<p>Custom Controller:<br />
The Custom Controller to create.</p>
<p>Source Id:<br />
The source id of the Custom Controller to create. Get this from the Rewired Input Manager.</p></td>
</tr>
<tr>
<td>Assign To Player / Assign To Player Id</td>
<td><p>(Assign To Player is shown if the Rewired Input Manager has been linked in the Rewired Input Manager field, otherwise Assign To Player Id is shown.)</p>
<p>Assign To Player:<br />
The Player that will be assigned this Custom Controller when it is created. </p>
<p>Assign To Player Id:<br />
The Player that will be assigned this Custom Controller when it is created.</p></td>
</tr>
<tr>
<td>Destroy Custom Controller</td>
<td>If true, the Custom Controller created by this component will be destroyed when this component is destroyed.</td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong>Searching for an existing Custom Controller:</strong><br />
If you have already instiantated a Rewired.CustomController through scripting or have set up Rewired to automatically create a Custom Controller on start by adding it under &quot;Starting Custom Controllers&quot; on the <a href="RewiredEditor.html#Players">Players page of the Rewired Editor</a>, you can set up the Custom Controller component to find that existing Rewired.CustomController and use it for its target.</p>
<p>If you want to search for an existing Rewired.CustomController, the &quot;Create Custom Controller&quot; field must not be checked:</p>
<p><img src="files/images/componentcontrols_customcontroller_inspector_search_rimlinked.png" alt="Custom Controller inspector" /></p>
<p>Additional options will appear in the inspector allowing you to set the search parameters:</p>
<table width="100%" border="0">
<tr>
<td>Find Using Source Id</td>
<td>If true, the Custom Controller will be searched for by its source controller id. This can be used with Find in Player and/or Find Using Tag to further refine the search parameters.</td>
</tr>
<tr>
<td>Custom Controller / Custom Controller Id</td>
<td><p>(Custom Controller is shown if the Rewired Input Manager has been linked in the Rewired Input Manager field, otherwise Custom Controller Id is shown.)</p>
<p>Custom Controller:<br />
The target Custom Controller. This is used to find the Custom Controller if Find Using Source Id is True.</p>
<p>Custom Controller Id:<br />
The source id of the Custom Controller. This is used to find the Custom Controller if Find Using Source Id is True.</p></td>
</tr>
<tr>
<td>Find Using Tag</td>
<td>If true, the Custom Controller will be found using the tag specified here. This can be used with Find in Player and/or Find Using Source Id to further refine the search parameters.</td>
</tr>
<tr>
<td>Tag</td>
<td>The tag on the Custom Controller you wish to use. This is used to find the Custom Controller.</td>
</tr>
<tr>
<td>Find In Player</td>
<td>If true, the Custom Controller will be searched for in the Player specified in the Player Id field. This can be used with Find Using Source Id and/or Find Using Tag to further refine the search parameters.</td>
</tr>
<tr>
<td>Player / Player Id</td>
<td>The Player Id of the Player that owns the Custom Controller.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h2>Controls </h2>
<h3><a name="tilt-control" id="tilt-control"></a>Tilt Control</h3>
<p>The Tilt Control uses a device's accelerometer and gyro to determine forward and horizontal tilt. The output values are in the -1 to +1 range.</p>
<p>A <a href="#custom-controller">Custom Controller</a> component or a component that inherits from it must exist on a parent of the control's GameObject.</p>
<p><strong>Inspector Options</strong></p>
<p><img src="files/images/componentcontrols_tiltcontrol_inspector.png" width="445" height="440" alt="Tilt Control inspector" /></p>
<table width="100%" border="0">
<tr>
<td><strong>Custom Controller Options</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Horizontal Tilt Custom Controller Element</td>
<td>The Custom Controller element that will receive input values from the X axis.</td>
</tr>
<tr>
<td>Forward Tilt Custom Controller Element</td>
<td>The Custom Controller element that will receive input values from the Y axis.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Tilt Options</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Allowed Tilt Directions</td>
<td>The tilt directions in which movement is allowed. You can restrict movement to one or both directions.</td>
</tr>
<tr>
<td>Horizontal Tilt Limit</td>
<td>The maximum horizontal tilt angle in degrees. When the device is tilted to this angle or further in either direction, the axis will return a value of 1/-1.</td>
</tr>
<tr>
<td>Horizontal Rest Angle</td>
<td>The offset angle from horizontal which will be considered the resting angle. This represents the angle at which the user holds the device without generating tilt.</td>
</tr>
<tr>
<td>Forward Tilt Limit</td>
<td>The maximum forward tilt angle in degrees. When the device is tilted to this angle or further in either direction, the axis will return a value of 1/-1.</td>
</tr>
<tr>
<td>Forward Rest Angle</td>
<td>The offset angle from vertical which will be considered the resting angle. This represents the angle at which the user holds the device without generating tilt. A typical value would be around 40 degrees.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Axis Options</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Invert Horizontal Tilt</td>
<td>Inverts the X axis value.</td>
</tr>
<tr>
<td>Invert Forward Tilt</td>
<td>Inverts the Y axis value.</td>
</tr>
<tr>
<td>Advanced</td>
<td>Advanced configuration options for the axes.</td>
</tr>
</table>
<p><br />
</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Actions.html" title="Actions"><span class="button-img"></span></a><a class="back-button" href="Documentation.html" title="Actions">Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,852 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Control Mapper</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Control Mapper
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#setup">Setup</a>
<ul>
<li><a href="#rewiredstandaloneinputmodule">Rewired Standalone Input Module</a></li>
<li><a href="#setup-rewired-input-manager">Rewired Input Manager Settings</a></li>
<li><a href="#setup-recommended-control-scheme">Recommended UI control scheme</a></li>
</ul>
</li>
<li><a href="#saving-and-loading">Saving and Loading User Data</a></li>
<li><a href="#conflict-checking">Conflict Checking</a></li>
<li><a href="#theming">Theming</a></li>
<li><a href="#glyphs">Glyphs</a></li>
<li><a href="#language">Lanugage</a></li>
<li><a href="#misc-notes">Misc Notes</a></li>
<li><a href="#faq">FAQ</a></li>
<li><a href="#inspector-options">Inspector Options</a></li>
</ul>
<p>&nbsp;</p>
<h2><a name="overview" id="overview"></a>Overview</h2>
<p>Control Mapper is a customizable, responsive control mapping system included with Rewired that you can use in your games. This system provides complete controller remapping including keyboard, mouse, and joystick support, axis calibration, joystick and mouse sensitivity, single or multiple players, controller maps, and much more. Control Mapper can be fully controlled with keyboard, mouse, joystick, and/or touch controls. Control Mapper uses Unity's new GUI system and requires Unity 5.0+.</p>
<p>Control Mapper has many options which you can customize to fit your game's needs:</p>
<ul>
<li>Optional display of Players for multiplayer games.</li>
<li>Optional multiple controllers per-player.</li>
<li>Optional Input Behavior customization.</li>
<li>Optional Map Category display.</li>
<li>Customizable list of Actions to show per category.</li>
<li>Optional display of Action category names.</li>
<li>Optional Keyboard, Mouse, and Controller support.</li>
<li>Choose the number of alternate fields per controller type.</li>
<li>Customizable theme settings for changing colors and button styles.</li>
<li>Optional display of controller element glyphs.</li>
<li>Customizable language settings for changing button and window labels and messages.</li>
<li>Menu control by your choice of Rewired Player(s).</li>
<li>Customizable Actions for opening, closing, and canceling.</li>
</ul>
<p>Example screen showing multiple players, multiple controllers per-player, sensitivity settings, multiple map categories, with keyboard, mouse, and controller support with glyphs.</p>
<p><img src="files/images/controlmapper_screen3.png" width="600" height="594" alt="Control Mapper" /></p>
<p>Example screen showing a view of a simple 1-player game with only one map category, one controller, keyboard support with 1 mapping per keyboard key, text-only, and using a different theme.</p>
<p><img src="files/images/controlmapper_screen2.png" width="400" height="518" alt="Control Mapper" /></p>
<p>&nbsp;</p>
<p>The information that follows assumes you are familiar with working with input in Rewired. If you are not, read through the <a href="Documentation.html">documentation</a> first. Step by step basics of how to use Rewired will not be covered here.</p>
<p>Control Mapper files including examples can be found in the Rewired/Extras/ControlMapper folder.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="installation" id="installation"></a>Installation</h2>
<p>Control Mapper can be installed during installation of Rewired or at any time from the menu. To install Control Mapper from the menu:</p>
<ul>
<li>Window -&gt; Rewired -&gt; Extras -&gt; Control Mapper -&gt; Install (Standard)</li>
<li>Window -&gt; Rewired -&gt; Extras -&gt; Control Mapper -&gt; Install (Text Mesh Pro)</li>
</ul>
<p> Control Mapper comes in two varieties:</p>
<ul>
<li>Standard - uses Unity UI Text components for text.</li>
<li>Text Mesh Pro - uses Text Mesh Pro for text.</li>
</ul>
<p>The Text Mesh Pro version requires Unity 2018.1+. Text Mesh Pro must be installed from the Package Manager and the Text Mesh Pro Essential Resources pack must be installed before installing Control Mapper.</p>
<p>Only one version can be installed in the project at a time.</p>
<h3>Important</h3>
<p>If you have an existing Control Mapper setup, you will not be able to easily migrate to a different version of Control Mapper because your copy will not automatically inherit all the changes required to work. The Text Mesh Pro version uses different text components than the Unity UI version, and all the object references to text components will be lost when switching between versions. The best way to switch from Standard to the Text Mesh Pro version is to rebuild your setup using the Text Mesh Pro version.</p>
<h3>Uninstalling</h3>
<p>Delete the Rewired/Extras/ControlMapper folder.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="setup" id="setup"></a>Setup</h2>
<p>The Control Mapper is a prefab which you can drag into your scene and use. This prefab includes the Canvas which will be used to render the UI elements.</p>
<p>To add Control Mapper to your scene, you can add it from either of the following menus:</p>
<ul>
<li>Window -&gt; Rewired -&gt; Create -&gt; UI -&gt; Control Mapper</li>
<li>Game Object -&gt; Create Other -&gt; Rewired -&gt; UI -&gt; Control Mapper</li>
</ul>
<p>Or you can add it as a live prefab by dragging it in from the project view. (Note: If using a live prefab, do not commit any changes to the prefab source or they will be overwritten the next time you update Rewired. You can, however, make a new prefab of your own out if it and modify that.)</p>
<p>Once the Control Mapper is in your scene, you can customize many options by changing settings in the inspector. The first thing you must do is to link your Rewired Input Manager object to the Control Mapper object in the Rewired Input Manager field in the inspector. Once you have done this, you can proceed to customize settings.</p>
<p><img src="files/images/controlmapper_inspector_rewired-input-manager.png" width="676" height="47" /></p>
<p>See <a href="#inspector-options">Inspector Options</a> for more details about the Control Mapper inspector settings. </p>
<h3><a name="rewiredstandaloneinputmodule" id="rewiredstandaloneinptmodule"></a>RewiredStandaloneInputModule</h3>
<p>Control of the UI is handled by the RewiredStandaloneInputModule. This component must be added to the EventSystem in the scene and the default StandaloneInputModule must be disabled or removed.</p>
<p>You can either create a normal Unity Event System and replace the Standalone Input Module with the Rewired Standalone Input Module component or you can create a Rewired Event System from either of the menu items:</p>
<ul>
<li>GameObject -&gt; Create Other -&gt; Rewired -&gt; UI -&gt; Rewired Event System</li>
<li>Window -&gt; Rewired -&gt; Create -&gt; UI -&gt; Rewired Event System</li>
</ul>
<p><img src="files/images/rewiredstandaloneinputmodule_inspector_actions.png" class="right" />Four Actions must be set up in the Rewired Input Manager and the RewiredStandaloneInputModule in order to control the UI. <strong>These four Actions must have names that match exactly in both the Rewired Input Manager and the RewiredStandaloneInputModule</strong>.</p>
<ol>
<li>Horizontal Axis - The Action that will control Left/Right movement in the UI.</li>
<li>Vertical Axis - The Action that will control Up/Down movement in the UI.</li>
<li>Submit - The Action that submits a button.</li>
<li>Cancel - The Action that cancels.</li>
</ol>
<p>The actual names you use are up to you. Of course these Actions must also be assigned to one or more keyboard or joystick maps and assigned to a Player to be functional. </p>
<p>If you want to use <a href="RewiredStandaloneInputModule.html#virtual-mouse">mouse pointers</a> exclusively to interact with the UI, you can set all these Actions to blank strings.</p>
<p>Alternately, you can set Actions by id by enabling &quot;Set Actions By Id.&quot;</p>
<p>NOTE: It is <strong>HIGHLY</strong> recommended that you create unique menu-only Actions for these UI controls in a separate controller map category from your game Actions. If you use your in-game actions such as &quot;Move Horizonal&quot; or &quot;Jump&quot; for these UI controls, you run the risk of allowing the user to render the UI unusable because they removed an assignment for one of these game Actions which was also controlling the UI.</p>
<p>The settings in the RewiredStandaloneInputModule will determine which Players can control the UI. If you check &quot;Use All Rewired Game Players&quot;, all Players besides the System Player that have a map configured with these UI Actions will be able to control the UI. If you check &quot;Use Rewired System Player&quot;, the same will be true for the System Player. If instead you only want specific Players to control the UI, you can set these Player Ids individually.</p>
<p>If the UI control speed with a Joystick seems too slow or fast, adjust the &quot;Input Actions Per Second&quot; setting.</p>
<h3><a name="setup-rewired-input-manager" id="setup-rewired-input-manager"></a>Rewired Input Manager settings
</h3>
<p>This image shows the 4 actions that have been set up for controlling the UI.</p>
<p><img src="files/images/controlmapper_rewiredinputmanager_uiactions.png" width="484" height="291" /></p>
<h3><a name="setup-recommended-control-scheme" id="setup-recommended-control-scheme"></a>Recommended UI control scheme</h3>
<p>Rewired and the Control Mapper system are very flexible. As such, every possible situation cannot be &quot;automagically&quot; taken care of for you. You need to spend some time to plan and understand your control scheme.</p>
<p>It is possible to create a situation where the user is able to break his ability to control the UI by unassigning necessary Actions such as the Submit button. With a mouse available on the system, this would not be a problem as it is not dependent on Actions, but on platforms without mouse or touch input to fall back on in the case of user error, you need to consider these situations. It may not be advisable to allow users to remap everything.</p>
<p><strong><a name="setup-keyboard" id="setup-keyboard"></a>Keyboard:</strong><br />
It is generally a good idea to have fixed keyboard UI controls that the user cannot remap, such as the arrow keys for navigation and the enter keys for submit. These can either be owned by the System Player or any/all of your Players. You can set up a separate Map Category for these protected UI controls and protect them from being replaced during reassignment excluding this Map Category from conflict checking in all your other Map Categories in the Rewired Input Manager. Also, do not add this Map Category to the list of assignable maps in the Control Mapper inspector options.</p>
<p><strong><a name="setup-mouse" id="setup-mouse"></a>Mouse</strong>:<br />
Do not assign UI Submit or Cancel Actions to Mouse Left Button or Mouse Right Button or you will receive double-clicks evey time the mouse button is pressed over a button. The mouse button click on a UI element is based on mouse cursor screen position and does not use the Action system. If you assign these UI Actions to the mouse buttons, if a button/field is currently selected and you click anywhere on the screen, the selected buton/field will receive the UISubmit or UICancel Action regardless of where you click on the screen.</p>
<p><strong><a name="setup-joysticks" id="setup-joysticks"></a>Joysticks:</strong><br />
Recognized joysticks should have a map created for UI control if you wish to support joystick UI navigation. If you want the user to be able to remap these menu controls, it is recommended that you create yet another separate Map Category for these user-configurable joystick controls. By making a separate Map Category for these controls, you are able to allow the user to remap these joystick controls while still keeping the keyboard controls protected. Conflict checking settings for the Map Category should exclude all game controls and vice versa if you want the user to be able to map the same elements in different categories without being warned about conflicts.</p>
<p><strong><a name="setup-unknown-controllers" id="setup-unknown-controllers"></a>Unknown Controllers:</strong><br />
It is recommended that you create a map for the Unknown Controller in the UI control category. This way, if a user attaches a controller Rewired does not recognize, they should still be able to control the UI reasonably well.</p>
<p>There is no way to know what axes or buttons will actually be available on these controllers, but you can make some basic assumptions that should allow most controllers to control the UI.</p>
<ul>
<li>Axis 0: Map to your &quot;UIHorizontal&quot; Action. (Axis 0 is almost always the horizontal axis on the first joystick)</li>
<li>Axis 1: Map to your &quot;UIVertical&quot; Action and Invert this axis. (Axis 1 is almost always the vertical axis on the first joystick and is always inverted.)</li>
<li>Button 0: Map to your &quot;UISubmit&quot; Action.</li>
<li>Button 1: Map to your &quot;UICancel&quot; Action.</li>
</ul>
<p><img src="files/images/controlmapper_unknowncontrollermap.png" width="712" height="171" /></p>
<p>Of course, the above are only recommendations. You can set up your control scheme however you decide.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="saving-and-loading" id="saving-and-loading"></a>Saving and Loading User Data</h2>
<p><img src="files/images/controlmapper_userdatastore.png" width="554" height="97" /></p>
<p>Saving and loading of user data is handled by the <a href="UserDataStore.html">UserDataStore</a> component on the Rewired Input Manager. By default, this component does not exist on the Rewired Input Manager. Without this component, data will never be saved or loaded and will not persist between game sessions.</p>
<p>If you add a UserDataStore derived component to the Rewired Input Manager, it will be used to save and load data. Rewired includes a UserDataStore_PlayerPrefs component which will use PlayerPrefs to save the controller data. Simply add this component to your Rewired Input Manager and data will be loaded and saved as needed.</p>
<p>Control Mapper will save data when any of the following occur:</p>
<ul>
<li>The Control Mapper window is closed by the user.</li>
<li>A joystick is unplugged.</li>
</ul>
<p>Control Mapper will load saved data when any of the following occur:</p>
<ul>
<li>At runtime start if &quot;Load Data On Start&quot; is checked in the UserDataStore_PlayerPrefs component inspector.</li>
<li>A joystick is plugged in.</li>
</ul>
<p>If you are using multiple different Rewired Input Managers in different scenes, they all must have a UserDataStore_PlayerPrefs component and the &quot;Player Prefs Key Prefix&quot; must match in order for the same save data to be loaded by each Rewired Input Manager.</p>
<p>If you don't want to use PlayerPrefs, you can create your own data storage system using UserDataStore. See <a href="UserDataStore.html">User Data Store</a> for more information.</p>
<p><strong>IMPORTANT: Saved XML data is not updated when you make changes to the Rewired Input Manager</strong></p>
<p>Control Mapper does not manage changes between the Rewired Input Manager and data that is already saved to XML. If you make changes to the Rewired Input Manager settings such as adding new controls to a Joystick Map, these new changes will not be preserved when loading saved XML data. The only automated solutions would be to either clear the save data by clearing Player Prefs so that the Rewired Input Manager defaults are used instead or load the default maps in the Player for the any controllers that changed and save those to XML overwriting the existing saved mappings.</p>
<p>Management of saved user data is up to the developer. If you have special needs beyond the basic use cases, you should extend and replace the <a href="UserDataStore.html#playerprefs">UserDataStore_PlayerPrefs</a> component with a new UserDataStore component that meets your specific needs.</p>
<h3 style="background-color:#FF6"><a name="clear-xml-data" id="clear-xml-data"></a>***IMPORTANT***:</h3>
<p>When doing testing, if you open and close the Control Mapper screen or unplug a joystick while the Control Mapper screen is open, you are causing it to save XML data in the registry even if you didn't change any mappings or settings. The next time you start the game (provided the Rewired Input Manager with the UserDataStore_PlayerPrefs component is present in the scene), it will load that saved XML data from the registry, NOT the default settings stored in the Rewired Input Manager. While doing testing, you will most likely want to clear this saved data so the default settings in the Rewired Input Manager are loaded instead of the saved data. This can be done by clearing Player Prefs by opening the &quot;Debug Options&quot; foldout on the Rewired Input Manager inspector.</p>
<p>If you are confused by your input configuration not matching what you defined in the Rewired Input Manager, or you are seeing different behaviors in the Unity Editor versus a game build, you most likely are loading XML data that you are unaware that you saved. Clear Player Prefs and everything will reset to the defaults.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="conflict-checking" id="conflict-checking"></a>Conflict Checking</h2>
<p><a href="HowTos.html#conflict-checking">See How To's - Conflict Checking.</a></p>
<p>(See <a href="#inspector-options">Inspector Options</a> for the option to allow conflicting assignments.)</p>
<p>&nbsp;</p>
<hr />
<h2><a name="theming" id="theming"></a>Theming</h2>
<p><img src="files/images/controlmapper_theme1.png" width="300" height="279" /></p>
<p>Control Mapper comes with a basic theming system to allow you to change colors, fonts, and sprites by simply editing a theme file.</p>
<p><strong>The process:</strong></p>
<ol>
<li>Make a copy of the DefaultTheme file in the ControlMapper/Themes directory.</li>
<li>Move this copy to somewhere inside your project (outside the Rewired folder).</li>
<li>On the Control Mapper game object in your scene, assign the new theme file you created to the Theme field in the inspector.</li>
</ol>
<p><strong>Editing the theme:</strong></p>
<p>Edit the theme file in the inspector. There is no user-friendly inspector for this theming process, but the names of the fields should be self-explanatory. Make your changes and they will show up when you launch the game. (Theme setting changes can not be viewed in real-time in the editor.)</p>
<p>These theme options just mirror the various options available on Unity UI components such as Image, Button, Slider, etc. If you don't understand what these options mean, see the Unity UI documentation on these components.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="glyphs" id="glyphs"></a>Glyphs</h2>
<p>Glyphs will be displayed instead of text for controller elements, where avaiable, as long as a Glyph Provider has been set up and <a href="#inspector-style-options">Show Glyphs</a> is enabled in the inspector. See the <a href="Glyphs.html">Glyphs documentation</a> for more details.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="language" id="language"></a>Language</h2>
<p></p>
<p>Control Mapper has a basic language system which you can use to customize button and section labels, window titles, and more.</p>
<p><strong>The process:</strong></p>
<ol>
<li>Make a copy of the DefaultEnglish file in the ControlMapper/Languages directory.</li>
<li>Move this copy to somewhere inside your project (outside the Rewired folder).</li>
<li>On the Control Mapper game object in your scene, assign the new language file you created to the Language field in the inspector.</li>
</ol>
<p><strong>Editing the language:</strong></p>
<p>Edit the language file in the inspector. There is no user-friendly inspector for this language editing process, but the names of the fields should be self-explanatory. Make your changes and they will show up when you launch the game. (Language setting changes can not be viewed in real-time in the editor.)</p>
<p><strong>Translating strings of Rewired objects (Players, Actions, Controller names, Controller elements, etc.):</strong></p>
<p><strong>As of Rewired 1.1.56.0, strings for these objects can be localized using the built-in localization system. <a href="PlayerControllers.html">See this for more information.</a> The below information has been left for legacy reference purposes.</strong></p>
<p><strong>ADVANCED USERS ONLY</strong> </p>
<p>Do not attempt to do this if you are inexperienced at C# or are a beginner with Unity. This is an unsupported feature and step-by-step guidance will not be provided.</p>
<p>Rewired does not presently have a localization system built in where all strings in the system can be translated into different languages. Because I have been asked numerous times about how to translate these strings when using Control Mapper, I have added an interim translation framework to Control Mapper for you to be able to translate these items when displayed through the Control Mapper interface. If at some point in the future a core localization system is developed, this Control Mapper translation of these elements is likely to become obsolete.</p>
<p>The LanguageData class provides framework for translating all the Rewired elements, but it does not provide a way to store the translation data. You will have to provide that part in an extended class. LanguageData merely provides an interface for Control Mapper to call into for all strings.</p>
<p>In order to implement translation of these elements, you will have to override the LanguageDataBase class and extend it in order to plug in your translation and override each function pertaining to translation of Rewired core item names. Copy LanguageData.cs to a location outside the Rewired folder hierarchy, rename it to something else, change the class name to match, and modify all the functions below the line that reads &quot;// Translation of Rewired core items&quot; to translate the elements you want to translate using whatever lookup system you have set up for that. You will then have to <a href="https://docs.unity3d.com/ScriptReference/ScriptableObject.CreateInstance.html">make a ScriptableObject instance</a> of your new extended class, then attach that to Control Mapper in the inspector so it uses it instead of the default language object.</p>
<p>Relevant topics:</p>
<ul>
<li> <a href="HowTos.html#identifying-recognized-controllers">Idenfying recognized joysticks</a><a href="HowTos.html#identifying-recognized-controllers"><br />
</a></li>
<li><a href="https://guavaman.com/rewired/files/docs/RewiredControllersCSV.zip">CSV file of Joysticks</a></li>
<li><a href="https://guavaman.com/rewired/files/docs/RewiredControllerElementIdentifiersCSV.zip">CSV file of Joystick elements</a></li>
<li><a href="https://guavaman.com/rewired/files/docs/RewiredKeyboardElementIdentifiersCSV.zip">CSV file of Keyboard elements</a></li>
<li><a href="https://guavaman.com/rewired/files/docs/RewiredMouseElementIdentifiersCSV.zip">CSV file of Mouse elements</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h2><a name="misc-notes" id="misc-notes"></a>Misc Notes</h2>
<p><strong>Other UI Selectables outside or behind Control Mapper</strong></p>
<ul>
<li>UI auto navigation will find other UI elements outside Control Mapper and try to navigate to them when a direction is pressed. If you have other UI elements behind Control Mapper, you must disable interactability on them. The easiest way to do that is with a Canvas Group setting CanvasGroup.interactable to false.</li>
<li>If you have multiple Canvases in your scene and you want auto navigation to work between elements on the different Canvases, all Canvases must have the same Render Mode.</li>
</ul>
<p><strong>Opening and closing the screen</strong></p>
<p>The easiest way to control the screen is by assigning Actions in the <a href="#screen-control-actions">Screen Control Actions section of the inspector</a>.</p>
<p>Another way is by using a Unity UI button and assigning ControlMapper.Open to the OnClick event.</p>
<p>You can also control the screen through scripting:</p>
<ul>
<li>Opening the screen: ControlMapper.Open</li>
<li>Closing the screen: ControlMapper.Close</li>
</ul>
<p>Control Mapper also has events for when the screen is opened and closed should you need that information.</p>
<p><strong>Changing settings through scripting</strong></p>
<p> Certain Control Mapper options can be changed through scripting, but not in real-time while the screen is open. This can be useful should you need to make changes based on some criteria such as platform-specific settings. For example, before initializing the Control Mapper (before opening it), you could disable keyboard support. This may be useful if you're publishing your game on a platform that doesn't support keyboards, but you don't want to create a separate Control Mapper for this. </p>
<p>The ControlMapper class inherits from UnityEngine.MonoBehaviour, and like any other MonoBehavior subclass, you must get a reference to the ControlMapper instance in order to call any methods in the class.</p>
<pre class="code">var controlMapper = UnityEngine.Object.FindObjectOfType&lt;Rewired.UI.ControlMapper.ControlMapper&gt;();
if(controlMapper != null) {
controlMapper.Open();
}</pre>
<p><strong>Screen scale</strong></p>
<p>Scale of the Control Mapper by default is handled by the Canvas Scaler Fitter component on the Canvas below the main Control Mapper game object. The Canvas Scaler Fitter component controls the scale settings for the display based on the current aspect ratio of the screen. Breakpoints have been predefined to help keep the display usable at various screen aspect ratios.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="faq" id="faq"></a>Frequently Asked Questions</h2>
<p class="question">How do I center the Control Mapper window?</p>
<p>ControlMapper -&gt; Canvas -&gt; MainPageGroup</p>
<p>Set equal paddings on Left, Top, Right, and Bottom and the window will be centered.</p>
<p class="question">Is it possible to visually edit the Control Mapper layout in real-time?</p>
<p>Not easily. Control Mapper has many dynamically-generated UI elements which are generated at runtime based on the options set in the inspector. It is not a static UI layout that can easily be edited in real-time. However, you can press Play in the editor and edit some settings to get a preview of how changes might look. In order to commit those settings though, you have to stop Play mode and remake the changes to the game objects while it is not in Play mode.</p>
<p class="question">I want to customize more than what's available in the theme settings. How do I do that?</p>
<p>The theme was meant to provide basic customization of the styles on all elements because they're dynamically generated. Basic functional customization is done through the Control Mapper inspector. Anything beyond that is out of the scope of the tool and up to you to implement if you choose to and requires a very good knowledge of Unity UI.</p>
<p>There are certain areas which you cannot change the layout because they're generated by scripting such as the columns of input fields. Other things can be moved and reordered such as the various sections at the top. But be aware that some changes will cause problems. One thing everyone seems to want to do is to move the Done button to the bottom. I advise against this because the auto-scroll system put in place for the input field grid will make it so you have to scroll through every Action entry before it will jump down to the Done button. </p>
<p>Alignments, padding, spacing, etc. can be changed with the standard options in Unity's UI system for the various UI game objects in the hierarchy.</p>
<p> You have to know Unity UI very well and you can customize it pretty much however you want with the exception of the input grid. If you want to change that (beyond styling), you'll have to edit source code. And be aware that the layout, especially concerning the input grid scroll area, is prone to breaking depending on what you do.</p>
<p>The basic groupings that pre-exist in the scene can all be rearranged at will:</p>
<ul>
<li>WindowButtonGroup</li>
<li>PlayersGroup</li>
<li>ControllerGroup</li>
<li>SettingAndMapCategoriesGroup</li>
<li>InputGridGroup</li>
</ul>
<p>You can press Play and change the order of these in the hierarchy and see them switch places in real-time. Committing changes requires you do it again outside Play mode though. The objects inside these groups are dynamically generated based on settings in the Control Mapper inspector. In addition, visibility of these groups may also be affected by Control Mapper inspector options. You could manually set backgrounds on these groups in by adding Image components to them.</p>
<p>Any dynamically generated elements are loaded from the prefabs: Rewired/Extras/ControlMapper/Prefabs/Parts</p>
<p>Some things you could customize by modifying the prefabs, while some options would be overridden by the theme when it loads.</p>
<p>The ControlMapper-&gt;Canvas: Canvas Scaler Fitter component governs responsive break points. It can be disabled if you don't need that functionality.</p>
<p>If you need to modify any source prefab components, it's best to work with copies of everything so you can still update Rewired and not lose your changes. If you copy all the prefabs, you will need to re-assign the copies as the sources for the dynamically generated objects in the ControlMapper inspector -&gt; Advanced Settings -&gt; Internal Data -&gt; Prefabs section. If you want to customize the popup windows, they are also in the prefabs folder. Same rules apply. Copy them, then re-assign the copies as the prefab sources.</p>
<p class="question">How can I disable/hide the Pre-Input Assignment Time screen? I don't really need it because my game doesn't use analog input. I tried setting the time to 0 but it still flashes for a moment.</p>
<p>There is no way to disable that without changing the source code.<br />
<br />
Even if your game doesn't use analog input, your players may still use physical analog controls. Disabling this would be a bad idea because the purpose of it is to prevent any inadvertent assignments such as when releasing a stick and its action of auto-centering itself registers as a negative stick movement mapping that to your Action.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="inspector-options" id="inspector-options"></a>Inspector Options</h2>
<p>Many configuration options are available through the inspector. Most options have tool-tip help.</p>
<p>&nbsp;</p>
<p><strong><a name="inspector-rewired-input-manager" id="inspector-rewired-input-manager"></a>Rewired Input Manager</strong></p>
<p><img src="files/images/controlmapper_inspector_rewired-input-manager.png" width="676" height="47" /></p>
<p>You must link a Rewired Input Manager to this field in the inspector. All input data will be read from the Rewired Input Manager linked here. </p>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-dont-destroy-on-load" id="inspector-dont-destroy-on-load"></a>Don't Destroy On Load</strong></p>
<p>Set to True to prevent the Game Object from being destroyed when a new scene is loaded.</p>
<p>NOTE: Changing this value from True to False at runtime will have no effect because Object.DontDestroyOnLoad cannot be undone once set.</p>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-screen-options" id="inspector-screen-options"></a>Screen Options</strong></p>
<p><img src="files/images/controlmapper_inspector_screen-options.png" width="676" height="65" /></p>
<p>Various options for the control mapper screen.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Open On Start</td>
<td width="78%" valign="top"><p>Open the control mapping screen immediately on start. Mainly used for testing.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-player-options" id="inspector-player-options"></a>Player Options</strong></p>
<p><img src="files/images/controlmapper_inspector_player-options.png" alt="" width="676" height="90" /></p>
<p>Various options for Players.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Show Players</td>
<td width="78%" valign="top"><p>Display a selectable list of Players. If your game only supports 1 player, you can disable this.</p></td>
</tr>
<tr>
<td valign="top">Show Players Group Label</td>
<td valign="top">Show the label for the Players button group?</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-controller-options" id="inspector-controller-options"></a>Controller Options</strong></p>
<p><img src="files/images/controlmapper_inspector_controller-options.png" alt="" width="676" height="164" /></p>
<p>Various options for controllers.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Show Controller</td>
<td width="78%" valign="top"><p>Display the Controller column for input mapping.</p></td>
</tr>
<tr>
<td valign="top">Max Controllers Per Player</td>
<td valign="top"><p>The maximum number of controllers allowed to be assigned to a Player. If set to any value other than 1, a selectable list of currently-assigned controller will be displayed to the user. [0 = infinite]</p>
<p>This field is only displayed if &quot;Auto-Assign Joysticks&quot; is disabled in the Rewired Input Manager -&gt; Settings. In this case, the max number of controllers displayed per player is equal to the &quot;Max Joysticks Per Player&quot; setting in the Rewired Input Manager -&gt; Settings.</p></td>
</tr>
<tr>
<td valign="top">Controller Input Field Count</td>
<td valign="top">The number of input fields to display for joysticks. If you want to support alternate mappings on the same device, set this to 2 or more.</td>
</tr>
<tr>
<td valign="top">Show Assigned Controllers</td>
<td valign="top">Show the Assigned Controllers group? If joystick auto-assignment is enabled in the Rewired Input Manager and the max joysticks per player is set to any value other than 1, the Assigned Controllers group will always be displayed.</td>
</tr>
<tr>
<td valign="top">Show Assigned Controllers Group Label</td>
<td valign="top">Show the label for the Assigned Controllers button group?</td>
</tr>
<tr>
<td valign="top">Show Controller Group Label</td>
<td valign="top">Show the label for the Controller button group?</td>
</tr>
<tr>
<td valign="top">Show Controller Name Label</td>
<td valign="top">Show the label for the current controller name?</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-keyboard-options" id="inspector-keyboard-options"></a>Keyboard Options</strong></p>
<p><img src="files/images/controlmapper_inspector_keyboard-options.png" alt="" width="687" height="90" /><br />
</p>
<p>Various options for the Keyboard.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Show Keyboard</td>
<td width="78%" valign="top"><p>Display the Keyboard column for input mapping.</p></td>
</tr>
<tr>
<td valign="top">Keyboard Input Field Count</td>
<td valign="top">The number of input fields to display for the keyboard. If you want to support alternate mappings on the same device, set this to 2 or more.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-mouse-options" id="inspector-mouse-options"></a>Mouse Options</strong></p>
<p><img src="files/images/controlmapper_inspector_mouse-options.png" alt="" width="687" height="127" /></p>
<p>Various options for the Mouse.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Show Mouse</td>
<td valign="top">Display the Mouse column for input mapping.</td>
</tr>
<tr>
<td valign="top">Mouse Input Field Count</td>
<td valign="top">The number of input fields to display for the mouse. If you want to support alternate mappings on the same device, set this to 2 or more.</td>
</tr>
<tr>
<td valign="top">Ignore Mouse X Axis Assignment</td>
<td valign="top">If checked, mouse X-axis movement will always be ignored during input assignment. Check this if you don't want the horizontal mouse axis to be user-assignable to any Actions.</td>
</tr>
<tr>
<td width="22%" valign="top">Ignore Mouse Y Axis Assignment</td>
<td width="78%" valign="top"><p>If checked, mouse Y-axis movement will always be ignored during input assignment. Check this if you don't want the vertical mouse axis to be user-assignable to any Actions.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-input-field-options" id="inspector-map-categories-and-actions2"></a>Input Field Options</strong></p>
<p><img src="files/images/controlmapper_inspector_input-field-options.png" alt="" width="674" height="88" /></p>
<p>Various options for the input field grid.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Show Full Axis Input Fields</td>
<td width="78%" valign="top"><p>Display a full-axis input assignment field for every axis-type Action in the input field grid. Also displays an invert toggle for the user to invert the full-axis assignment direction.</p>
<p>IMPORTANT: This field is required if you have made any full-axis assignments in the Rewired Input Manager or in saved XML user data. Disabling this field when you have full-axis assignments will result in the inability for the user to view, remove, or modify these full-axis assignments. In addition, these assignments may cause conflicts when trying to remap the same axes to Actions.</p></td>
</tr>
<tr>
<td valign="top">Show Split Axis Input Fields</td>
<td valign="top"><p>Display a positive and negative input assignment field for every axis-type Action in the input field grid.</p>
<p>IMPORTANT: These fields are required to assign buttons, keyboard keys, and hat or D-Pad directions to axis-type Actions. If you have made any split-axis assignments or button/key/D-pad assignments to axis-type Actions in the Rewired Input Manager or in saved XML user data, disabling these fields will result in the inability for the user to view, remove, or modify these assignments. In addition, these assignments may cause conflicts when trying to remap the same elements to Actions.</p></td>
</tr>
</table>
<p></p>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-map-categories-and-actions" id="inspector-map-categories-and-actions"></a>Map Categories and Actions</strong></p>
<p><img src="files/images/controlmapper_inspector_maps-and-actions.png" alt="" width="676" height="451" /></p>
<p>Options for the Map Categories and Actions displayed to the user for input mapping.</p>
<p>You can define a list of Map Categories to be shown to the user for remapping. You can choose to show one or multiple Map Categories. If you define multiple Map Categories here, a new row of buttons will be shown that will allow the user to select a Map Category for which to create input assignments.</p>
<p> You must define a list of assignable Actions to displayed to the user for each Map Category. You can choose to show the user a list of all user-assignable Actions contained in an one or more Action Categories or a customized list of individual Actions.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Show Action Category Labels</td>
<td valign="top">Display section labels for each Action Category in the input field grid. Only applies if Action Categories are used to display the Action list.</td>
</tr>
<tr>
<td valign="top">Show Map Categories Group Label</td>
<td valign="top">Show the label for the Map Categories button group?</td>
</tr>
<tr>
<td width="22%" valign="top">Map Category</td>
<td width="78%" valign="top"><p>The Map Category that will be displayed to the user for mapping.</p></td>
</tr>
<tr>
<td valign="top">Action List Mode</td>
<td valign="top">Choose whether you want to list Actions to display for this Map Category by individual Action or by all the Actions in an Action Category.</td>
</tr>
<tr>
<td valign="top">Action Categories</td>
<td valign="top">List each Action Category you want to be displayed for this map category. This will list all user-assignable Actions in that category allowing the user to make assignments for each of these Actions.</td>
</tr>
<tr>
<td valign="top">Actions</td>
<td valign="top">List each Action you want to be displayed for this map category. This will allow the user to make assignments for each of these Actions.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-default-layouts" id="inspector-default-layouts"></a>Default Layouts</strong></p>
<p><img src="files/images/controlmapper_inspector_default-layouts.png" alt="" width="687" height="163" /></p>
<p>The controller map Layout that will be shown to the user. This remapping system only supports a single fixed Layout per controller type.</p>
<p>This Layout defined here is only a suggestion. If a ControllerMap with this Layout is found in the Player, it will be used. Otherwise, the first ControllerMap in the correct category found will be used regardless of the Layout id.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Keyboard Map Default Layout</td>
<td valign="top">The Layout of the Keyboard Maps to be displayed.</td>
</tr>
<tr>
<td valign="top">Mouse Map Default Layout</td>
<td valign="top">The Layout of the Mouse Maps to be displayed.</td>
</tr>
<tr>
<td width="22%" valign="top">Joystick Map Default Layout</td>
<td width="78%" valign="top"><p>The Layout of the Joystick Maps to be displayed.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-input-behaviors" id="inspector-input-behaviors"></a>Input Behaviors</strong></p>
<p><img src="files/images/controlmapper_inspector_input-behaviors.png" alt="" width="676" height="512" /></p>
<p>Settings for user-modifiable Input Behaviors. Only certain properties are supported.</p>
<p>You can define a list of Input Behaviors to be shown to the user for modification. If enabled, new controls will be displayed so the user can modify these settings. This is useful if you need to allow the user to set certain per-Action sensitivity levels such as Mouse Look Sensitivity.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Show Input Behavior Settings</td>
<td width="78%" valign="top"><p>If checked, controls will be displayed which will allow the user to customize certain Input Behavior settings.</p></td>
</tr>
<tr>
<td valign="top">Show Settings Group Label</td>
<td valign="top">Show the label for the Settings button group?</td>
</tr>
<tr>
<td valign="top">Input Behavior</td>
<td valign="top">The Input Behavior that will be displayed to the user for modification.</td>
</tr>
<tr>
<td valign="top">Label Language Key</td>
<td valign="top">If set to a non-blank value, this key will be used to look up the name in Language to be displayed as the title for the Input Behavior control set. Otherwise, the name field of the InputBehavior will be used.</td>
</tr>
<tr>
<td valign="top">Joystick Axis Sensitivity Label Language Key</td>
<td valign="top">If set to a non-blank value, this name will be displayed above the individual slider control. Otherwise, no name will be displayed.</td>
</tr>
<tr>
<td valign="top">Show Joystick Axis Sensitivity</td>
<td valign="top">If checked, a slider will be displayed so the user can change this value.</td>
</tr>
<tr>
<td valign="top">Joystick Axis Sensitivity Icon</td>
<td valign="top">The icon to display next to the slider. Set to none for no icon.</td>
</tr>
<tr>
<td valign="top">Joystick Axis Sensitivity Min</td>
<td valign="top">Minimum value the user is allowed to set for this property.</td>
</tr>
<tr>
<td valign="top">Joystick Axis Sensitivity Max</td>
<td valign="top">Maximum value the user is allowed to set for this property.</td>
</tr>
<tr>
<td valign="top">Mouse XY Axis Sensitivity Label Language Key</td>
<td valign="top">If set to a non-blank value, this name will be displayed above the individual slider control. Otherwise, no name will be displayed.</td>
</tr>
<tr>
<td valign="top">Show Mouse XY Axis Sensitivity</td>
<td valign="top">If checked, a slider will be displayed so the user can change this value.</td>
</tr>
<tr>
<td valign="top">Mouse XY Axis Sensitivity Icon</td>
<td valign="top">The icon to display next to the slider. Set to none for no icon.</td>
</tr>
<tr>
<td valign="top">Mouse XY Axis Sensitivity Min</td>
<td valign="top">Minimum value the user is allowed to set for this property.</td>
</tr>
<tr>
<td valign="top">Mouse XY Axis Sensitivity Max</td>
<td valign="top">Maximum value the user is allowed to set for this property.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-element-assignment-options" id="inspector-element-assignment-options"></a>Element Assignment Options</strong></p>
<p><img src="files/images/controlmapper_inspector_element-assignment-options.png" /></p>
<p>Various options for the element assignment.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Allow Element Assignment Conflicts</td>
<td width="78%" valign="top">If enabled, when an element assignment conflict is found, an option will be displayed that allows the user to make the conflicting assignment anyway.</td>
</tr>
<tr>
<td valign="top">Allow Element Assignment Swap</td>
<td valign="top">If enabled, when an element assignment conflict is found, an option will be displayed that allows the user to swap conflicting assignments. This only applies to the first conflicting assignment found. This option will not be displayed if Allow Element Assignment Conflicts is enabled.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-timer-options" id="inspector-timer-options"></a>Timer Options</strong></p>
<p><img src="files/images/controlmapper_inspector_timer-options.png" alt="" width="687" height="128" /></p>
<p>Various timer options.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Pre Input Assignment Timeout</td>
<td valign="top">The time in seconds the user has to press an element on a controller while waiting for axes to be centered before assigning input.</td>
</tr>
<tr>
<td valign="top">Input Assignment Timeout</td>
<td valign="top">The time in seconds the user has to press an element on a controller when assigning input. If this time elapses with no user input on the target controller, the assignment will be canceled.</td>
</tr>
<tr>
<td valign="top">Controller Assignment Timeout</td>
<td valign="top">The time in seconds the user has to press an element on a controller when assigning a controller to a Player. If this time elapses with no user input a controller, the assignment will be canceled.</td>
</tr>
<tr>
<td width="22%" valign="top">Axis Calibration Timeout</td>
<td width="78%" valign="top"><p>The time in seconds the user has to press an element on a controller during calibration.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-input-grid-layout-options" id="inspector-input-grid-layout-options"></a>Input Grid Layout Options</strong></p>
<p><img src="files/images/controlmapper_inspector_input-grid-layout-options.png" alt="" width="676" height="200" /></p>
<p>Dimensions for various elements in the input grid.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Action Label Width</td>
<td valign="top">The width in relative pixels of the Action label column.</td>
</tr>
<tr>
<td valign="top">Keyboard Col Max Width</td>
<td valign="top">The width in relative pixels of the Keyboard column.</td>
</tr>
<tr>
<td valign="top">Mouse Col Max Width</td>
<td valign="top">The width in relative pixels of the Mouse column.</td>
</tr>
<tr>
<td valign="top">Controller Col Max Width</td>
<td valign="top">The width in relative pixels of the Controller column.</td>
</tr>
<tr>
<td valign="top">Input Row Height</td>
<td valign="top">The height in relative pixels of the input grid button rows.</td>
</tr>
<tr>
<td valign="top">Input Column Spacing</td>
<td valign="top">The width in relative pixels of spacing between columns.</td>
</tr>
<tr>
<td valign="top">Input Row Category Spacing</td>
<td valign="top">The height in relative pixels of the space between Action Category sections. Only applicable if Show Action Category Labels is checked.</td>
</tr>
<tr>
<td width="22%" valign="top">Invert Toggle Width</td>
<td width="78%" valign="top"><p>The width in relative pixels of the invert toggle buttons.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-popup-window-options" id="inspector-popup-window-options"></a>Popup Window Options</strong></p>
<p><img src="files/images/controlmapper_inspector_popup-window-options.png" alt="" width="687" height="91" /></p>
<p>Various options for popup windows.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Default Window Width</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td width="22%" valign="top">Default Window Height</td>
<td width="78%" valign="top"><p>&nbsp;</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="screen-control-actions" id="screen-control-actions"></a><a name="inspector-screen-control-actions" id="inspector-screen-control-actions"></a>Screen Control Actions</strong></p>
<p><img src="files/images/controlmapper_inspector_screen-control-actions.png" width="662" height="147" /></p>
<p>Actions that control the mapping screen.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Screen Open Action</td>
<td valign="top">An Action that when activated will close the main screen as long as no popup windows are open.</td>
</tr>
<tr>
<td valign="top">Screen Close Action</td>
<td valign="top">An Action that when activated will open the main screen if it is closed.</td>
</tr>
<tr>
<td valign="top">Screen Toggle Action</td>
<td valign="top">An Action that when activated will alternately close or open the main screen as long as no popup windows are open.</td>
</tr>
<tr>
<td valign="top">Universal Cancel Action</td>
<td valign="top">An Action that when activated will cancel and close any open popup window. Use with care because the element assigned to this Action can never be mapped by the user (because it would just cancel his assignment).</td>
</tr>
<tr>
<td width="22%" valign="top">Universal Cancel Closes Screen</td>
<td width="78%" valign="top"><p>If enabled, Universal Cancel will also close the main screen if pressed when no windows are open.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-theme-options" id="inspector-theme-options"></a><a name="inspector-style-options" id="inspector-style-options"></a>Style Options</strong></p>
<p><img src="files/images/controlmapper_inspector_style-options.png" alt="" /></p>
<p>UI style and theme options.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Use Theme Settings</td>
<td valign="top">If enabled, UI elements will be themed based on the settings in Theme Settings.</td>
</tr>
<tr>
<td width="22%" valign="top">Theme Settings</td>
<td width="78%" valign="top"><p>Must be assigned a ThemeSettings object. Used to theme UI elements.</p></td>
</tr>
<tr>
<td valign="top">Show Glyphs</td>
<td valign="top">Show glyphs if available. Glyph Provider must be configured for glyphs to be displayed. See <a href="Glyphs.html">Glyphs documentation</a> for more information.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-language-actions" id="inspector-language-actions"></a>Language Options</strong></p>
<p><img src="files/images/controlmapper_inspector_language-options.png" alt="" width="687" height="74" /></p>
<p>Language options.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Language</td>
<td width="78%" valign="top"><p>Must be assigned a LanguageData object. Used to retrieve language entries for UI elements.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-events" id="inspector-events"></a>Events</strong></p>
<p><img src="files/images/controlmapper_inspector_events.png" alt="" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top"><p>On Screen Opened</p></td>
<td width="78%" valign="top"><p>Event sent when the UI is opened.</p></td>
</tr>
<tr>
<td valign="top">On Screen Closed</td>
<td valign="top">Event sent when the UI is closed.</td>
</tr>
<tr>
<td valign="top">On Popup Window Opened</td>
<td valign="top">Event sent when a popup window is opened.</td>
</tr>
<tr>
<td valign="top">On Popup Window Closed</td>
<td valign="top">Event sent when a popup window is closed.</td>
</tr>
<tr>
<td valign="top">On Input Polling Started</td>
<td valign="top">Event sent when polling for input has started.</td>
</tr>
<tr>
<td valign="top">On Input Polling Ended</td>
<td valign="top">Event sent when polling for input has ended.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<p><strong><a name="inspector-advanced-settings" id="inspector-advanced-settings"></a>Advanced Settings</strong></p>
<p><img src="files/images/controlmapper_inspector_advanced-settings.png" alt="" width="687" height="68" /></p>
<p>These are internal settings like references to GameObject and Prefabs. You should not have to change these.</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Actions"><span class="button-img"></span>Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,303 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Controller Maps</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Controller Maps
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>One of the most unique and powerful features of Rewired is the Controller Map system. </p>
<p>A Controller Map is a map of bindings between Controller elements and <a href="Actions.html">Actions</a> for a single Controller.</p>
<p> Controller Maps are owned by the <a href="Players.html">Player</a>, not the Controller, so changes you make to one Player's maps don't affect the other Players' even if they're using the same Controller. Each Controller assigned to a Player must have its own Controller Maps with bindings defined for Action-based input to function.</p>
<p>You can create pre-defined Controller Map configurations for known controller types and controller templates and load the maps at runtime or when a compatible Joystick is assigned. Pre-defined maps for controllers are created in the <a href="RewiredEditor.html">Rewired Editor.</a> For more information about how to create maps, see <a href="#creating-and-editing-controller-maps">Creating and Editing Controller Maps</a>.</p>
<p>If you create a user control assignment screen, the user can customize his Controller Maps for any joystick or controller. (See <a href="HowTos.html#controller-mapping-screen">Creating a Controller Mapping screen</a> for information.)</p>
<p>Maps co-exist so you can have as many maps for each controller as you need. For example: If you have multiple game modes such as Infantry, Tank, Airplane, you can have shared controls on one map, and mode-specific controls each on its own map. You can have even more maps as needed: A Menu map for when you're in the menus, a system map for controls like Save/Load and Quit, multiple maps for different players on the keyboard, etc. All the maps can co-exist simultaneously and can be <a href="HowTos.html#enabling-disabling-controller-maps">enabled or disabled as needed</a>, for example, when changing game modes.</p>
<p>A shared controller (the keyboard for example) can be mapped by any number of Players with any number of maps.</p>
<p>Maps can be saved to XML or JSON. (See <a href="HowTos.html#saving-loading-controller-maps">Saving and loading Controller Maps</a> for more information.)</p>
<p>Each Controller Map belongs to one <a href="MapCategories.html">Map Category</a> and one <a href="Layouts.html">Layout</a>. The combination of the two serves to identify the Controller Map when selecting a Controller Map in the Rewired Editor or from the API.</p>
<p><strong><a name="creating-and-editing-controller-maps" id="creating-and-editing-controller-maps"></a>Creating and Editing Controller Maps:</strong></p>
<p>Controller Maps are created and edited in the <a href="RewiredEditor.html">Rewired Editor</a>.</p>
<p><a href="RewiredEditor.html#JoystickMaps">Rewired Editor - Joystick Maps</a><br />
<a href="RewiredEditor.html#KeyboardMaps">Rewired Editor - Keyboard Maps</a><br />
<a href="RewiredEditor.html#MouseMaps">Rewired Editor - Mouse Maps</a><br />
<a href="RewiredEditor.html#CustomControllerMaps">Rewired Editor - Custom Controller Maps</a></p>
<p><strong><a name="assigning-loading" id="creating-and-editing-controller-maps2"></a>Assigning/Loading Controller Maps:</strong></p>
<p>When you create a Controller Map (Joystick Map, Keyboard Map, etc.) in the Rewired Input Manager, you are defining a default Map that can be used by any Player. In order for a Player to make use of a Controller Map, it must first be assigned to that Player and enabled. You can assign the Controller Map in the <a href="RewiredEditor.html#Players">Rewired Input Manager under the Players page</a>, and when the game starts and Rewired initializes, it will load the map into the Player. You can also assign/load Controller Maps at runtime through scripting. <a href="HowTos.html#loading-controller-maps-runtime">See How To's - Loading Controller Maps at runtime</a> for more information.</p>
<div>
<p><strong><a name="enabling-disabling" id="creating-and-editing-controller-maps3"></a>Enabling and Disabling Controller Maps:</strong></p>
<p>Controller Maps can be enabled or disabled at will via scripting. This can be useful if you want to change game modes and have a different set of controls become active. For example, opening a menu screen. Disabled Controller Maps will not return any value when the Player is queried for an Action's input value. Controller Maps are stored in the <a href="https://guavaman.com/projects/rewired/docs/api-reference/?topic=html/T_Rewired_Player.htm">Player</a> class.</p>
<p>For a Controller Map to be processed and contribute to input, it must be enabled. The starting enabled state of the map can be set in the <a href="RewiredEditor.html#Players">Rewired Input Manager on the Players page</a> where you have assigned the Controller Maps to be loaded at start. To enable or disable a Controller Map at runtime via scripting, see <a href="HowTos.html#enabling-disabling-controller-maps">How Tos Enabling and Disabling Controller Maps</a>.</p>
<p>Individual Action Element Maps (Action bindings) in each Controller Map <a href="HowTos.html#enabling-disabling-action-element-maps">can also be enabled and disabled</a> via scripting.</p>
</div>
<div></div>
<p><strong><a name="joystick-maps" id="joystick-maps"></a>Joystick Maps:</strong></p>
<p>When a controller (excluding mouse and keyboard) is attached to the system, Rewired will attempt to identify that controller and load a hardware definition. When the Joystick is assigned to a Player, it will load Joystick Maps into the Player if you have created any Joystick Maps in the <a href="RewiredEditor.html#JoystickMaps">Rewired Input Manager </a>that are compatible with that controller. (You can see the the <a href="SupportedControllers.html">current list of recognized controllers with extended support here</a>.)</p>
<p>If you want your players to be able to plugin in a controller and have it &quot;just work&quot;, you should create a Joystick Map for each controller you want to explicitly support. To save time, you can create a Joystick Map for a <a href="#controller-templates">Controller Template</a> that includes the controller you wish to support.</p>
<p>Joystick input returned by a Player is determined by the buttons and axes bound to Actions in one or more Joystick Maps assigned to a Player. When a button or axis is activated that is bound to an Action, the Player will return a value for that Action. You create these maps in the Rewired Input Manager and assign them to each Player and they will be loaded at start. You can also enable, disable, remove, add, load, and save Joystick Maps at runtime. </p>
<p>A joystick must be assigned to a Player, have at least one Joystick Map with valid button/axis mappings assigned in that Player, and be enabled before any input will be returned through the Player.</p>
<p>How Joystick Maps are Loaded<br />
Joystick Maps for a particular Joystick do not exist in the Player unless that Joystick is currently connected and assigned to that Player. By default, <a href="Controllers.html#joystick-assignment">Rewired auto-assigns Joysticks</a> to each Player as controllers are detected. The Joystick Maps are loaded at assignment time based on the settings defined in the <a href="RewiredEditor.html#Players">Rewired Input Manager - Player</a> page for that particular Player.</p>
<p><strong><a name="keyboard-maps" id="joystick-maps2"></a>Keyboard Maps</strong></p>
<p>Keyboard input returned by a Player is determined by the keys bound to Actions in one or more Keyboard Maps assigned to a Player. When a key is pressed that is bound to an Action, the Player will return a value for that Action. You create these maps in the Rewired Input Manager and assign them to each Player and they will be loaded at start. You can also enable, disable, remove, add, load, and save Keyboard Maps at runtime. </p>
<p>The keyboard is similar to a Joystick in that it must be assigned to a Player before you can receive input from it. (This can be set in the Rewired Input Manager or through the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasKeyboard.htm">player.controllers.hasKeyboard</a> property.) </p>
<p><strong><a name="mouse-maps" id="joystick-maps3"></a>Mouse Maps</strong></p>
<p>Mouse input returned by a Player is determined by the axes and buttons bound to Actions in one or more Mouse Maps assigned to a Player. When a button or axis is activated that is bound to an Action, the Player will return a value for that Action. You create these maps in the Rewired Input Manager and assign them to each Player and they will be loaded at start. You can also enable, disable, remove, add, load, and save Mouse Maps at runtime. </p>
<p>The mouse is similar to a Joystick in that it must be assigned to a Player before you can receive input from it. (This can be set in the Rewired Input Manager or through the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasMouse.htm">player.controllers.hasMouse</a> property.) </p>
<p><strong><a name="controller-templates" id="controller-templates"></a>Controller Templates:</strong></p>
<p>A <a href="ControllerTemplates.html">Controller Template</a> represents a generalized controller layout that applies to all compatible controllers providing a common interface to work with these controllers. When you create a map for a Controller Template, any controller that implements the template will inherit that map automatically without the need for you to create a map specifically for that controller. For example, Rewired comes with a Gamepad Template. When you create a map for this Gamepad Template, you do not need to create individual maps specifically for any of the gamepads <a href="SupportedControllers.html">listed on this page</a> because they are all covered by the Gamepad Template. This makes is much quicker to create pre-defined Controller Maps for a huge variety of controllers. Additionally, as more controllers are added to the Template in the future, the map you've already created will work with these new controllers as well.</p>
<p>It is important to understand that a Controller Template map as defined in the Rewired Editor is merely an interim map that is not used directly, but instead is converted into a Controller Map for a specific controller at runtime when the Controller Map is loaded. For example, when an Xbox Controller is connected, if a map for the Gamepad Template has been defined, the Gamepad Template map will be converted into an Xbox Controller map and loaded into the Player. At this point, the Controller Map no longer has any connection to the Gamepad Template map from which it was created, and it is just a Controller Map specifically to the Xbox One Controller.</p>
<p>When Controller Maps are loaded into a Player, if a Controller Map exists for a specific controller, it will override any applicable Controller Template Map (in the same Map Category and Layout) and be used instead. This can be useful if you need to create a mapping for a specific controller that differs from the template. For example, some Controllers have elements that are not mappable using a Controller Template. The Sony Dual Shock 4 controller has a touchpad button that is not covered by any of the Gamepad Template elements, so you would need to create a Controller Map specifically for the Dual Shock 4 to map an Action to the touchpad button.</p>
<p>Please see <a href="ControllerTemplates.html">Controller Templates</a> for detailed information.</p>
<p><strong><a name="controllers-without-templates" id="controllers-without-templates"></a>Controllers without Templates:</strong></p>
<p>For the other controllers that do not currently have Controller Templates, you have to create a map for each you want supported out of the box (meaning you don't want the user to manually have to map them before playing). If you don't create a map and you want the user to be able to use that controller, you'll have to make a remapping screen where the user can map his controls manually (see <a href="HowTos.html#controller-mapping-screen">Creating a Controller Mapping Screen</a> for more information).</p>
<p><strong><a name="unknown-controllers" id="unknown-controllers"></a>Unknown Controllers (Joysticks only):</strong></p>
<p>For unrecognized controllers (<a href="SupportedControllers.html">controllers not listed here</a>), Rewired will use the Unknown Controller map (whether you define a map for this or not). This is a generic map that is just a sequential list of axes and buttons, each corresponding to an axis and button on the controller in the order they are defined by the controller hardware. You should always provide the user with a way to remap controls so they can set up their unknown controllers how they see fit. See <a href="HowTos.html#controller-mapping-screen">Creating a Controller Mapping Screen</a> for more information.</p>
<p>Note that even though a controller is unknown to Rewired, saved mapping data can still be saved and loaded for these controllers. This means that if your users make custom control mappings for unrecognized controllers, they can still save their configurations and continue off with the same controller layouts after quitting and restarting the game. All saving and loading of controller data is up to the developer to implement. See <a href="HowTos.html#saving-loading-controller-maps">Saving and Loading Controller Maps</a> for more information.</p>
<p> It is recommended that you create an Unknown Controller map so unrecognized controllers can at least work to some degree immediately without manual user mapping. While there's no way for you to know which axis or button corresponds to which element on the controller the user plugs in, the following table shows the most common layout for unknown gamepads:</p>
<table width="100%" border="0" style="font-size: 70%">
<tr>
<td><strong>Controller Element</strong></td>
<td><strong>Maps To</strong></td>
</tr>
<tr>
<td>Left Stick X</td>
<td>Axis 0</td>
</tr>
<tr>
<td>Left Stick Y</td>
<td>Axis 1 (inverted)</td>
</tr>
<tr>
<td>Right Stick X</td>
<td>Axis 2</td>
</tr>
<tr>
<td>Right Stick Y</td>
<td>Axis 3 (inverted)</td>
</tr>
<tr>
<td>Buttons</td>
<td>Button 0-X</td>
</tr>
<tr>
<td>D-Pad (optional)</td>
<td>Hat 1</td>
</tr>
</table>
<p>&nbsp;</p>
<p><a name="supported-controller-elements" id="supported-controller-elements"></a><strong>Supported Controller Elements:</strong></p>
<ul>
<li>All controller elements on a controller are not guaranteed to be supported on every platform and input source. Which elements are supported is up to the specific input API in use for the controller.</li>
<li> If a controller element is not supported on a specific platform and input source, no Action mapping will be created in the final runtime Controller Map for that element.</li>
</ul>
<p><strong><a name="xinput-devices-windows" id="xinput-devices-windows"></a>Special Considerations for XInput-compatible gamepads on Windows Standalone and Windows App Store</strong>:</p>
<p>On Windows Standalone builds and in the Windows Unity Editor, when Use XInput is enabled (and Use Windows Gaming Input is disabled), and always on Windows App Store and Windows 10 Universal builds, Rewired uses XInput for all XInput-compatible controllers instead of the chosen primary input source. This has some implications on creating Joystick Maps:</p>
<p>When using XInput, Rewired has no way of determining the actual controller type because this information is not available through XInput. The only information Rewired has to identify the controller is that it is XInput-compatible. Therefore, all XInput devices are treated as &quot;XBox 360 Controller&quot;. This means, with Use XInput enabled, if you plug in a XBox One Controller, Rewired cannot identify that it's an XBox One Controller and load the Joystick Maps you created specifically for the XBox One Controller. Instead, it identifies it simply as an &quot;XInput Gamepad&quot; and loads the Joystick Maps from the XBox 360 Controller maps you've created. This is an inherent limitation in XInput.</p>
<p>Windows Gaming Input has fewer limitations and more features than XInput and can independently identify Xbox 360 and Xbox One controllers, so it is recommended to use <a href="RewiredEditor.html#settings-windows-use-windows-gaming-input">Windows Gaming Input</a> instead of XInput.</p>
<p>But because Rewired has the Gamepad Template that is compatible with these controllers, it's easiest to just create a Gamepad Template Joystick Map instead and it will work for any XInput device when Use XInput or Use Windows Gaming Input is enabled. This way, you don't have to worry about making separate maps for XBox 360 Controller, XBox One Controller, etc. and everything will just work. This also works cross-platform.</p>
<p><strong><a name="mfi-gamepads" id="mfi-gamepads"></a>Special Considerations for MFI gamepads on iOS, tvOS, and OSX</strong>:</p>
<p>Rewired supports many MFI gamepads on iOS, tvOS, and OSX. However, these platforms identify controllers differently so it affects which Joystick Maps are loaded.</p>
<p><strong>iOS/tvOS</strong><br />
All MFI-compatible gamepads are recognized simply as &quot;iOS MFI Gamepad&quot; and will load the &quot;iOS MFI Gamepad&quot; Joystick Maps you've created (if any). All MFI gamepads are supported. Joystick Maps created for specific controllers such as SteelSeries Nimbus will not be loaded and do not apply to iOS/tvOS.</p>
<p><strong>OSX</strong><br />
If &quot;Use Game Controller Framework&quot; is enabled or the Primary Input Source is set to &quot;Game Controller&quot;, all gamepads that conform to to the Game Controller Framework &quot;Extended Gamepad&quot; profile (except those that have specific definitions) will be recognized as &quot;iOS MFI Gamepad&quot; and will load the &quot;iOS MFI Gamepad&quot; Joystick Maps. Controllers with specific definitions will not use the &quot;iOS MFI Gamepad&quot; definition but will instead use the specific controller defintion. Controllers with specific definitions include Xbox controllers, Sony Dual Shock 4, and Sony Dual Sense controllers.</p>
<p> If &quot;Use Game Controller Framework&quot; is disabled or a Primary Input Source that doesn't support the Game Controller Framework is in use, MFI-compatible gamepads cannot be automatically recognized as such and are identified on an individual basis like any other controller on OSX. Joystick Maps created for the specific controller will be loaded such as SteelSeries Nimbus. Joystick Maps created for the &quot;iOS MFI Gamepad&quot; will not be loaded on OSX.</p>
<p>In order to provide coverage for all supported MFI and other gamepads, simply create your Joystick Maps for the Gamepad Template and they will work across platforms. By using the template, you don't have to worry about any of these platform-specific issues. </p>
<p><strong><a name="how-input-is-processed" id="how-input-is-processed"></a>How Input Is Processed by Controller Maps:</strong></p>
<p>This diagram illustrates how input received from controllers gets mapped to Actions by the Player class.
This diagram shows one possible example of a more advanced input scheme that you can create with Rewired.</p>
<p>The maps in this diagram are based on an input scheme which allows you to switch among various game modes. Only one game mode is active at any one time. The purpose for this is to
allow for different control sets based on the current state of the game. For example, when the user opens a menu, the game mode would change to Menu and all
maps with controls no longer valid in the Menu mode would be disabled. This is achieved through the use of <a href="MapCategories.html">Map Categories</a>. See <a href="HowTos.html#enabling-disabling-controller-maps">Enabling and Disabling Controller Maps</a> for information on how to manage game mode switching.</p>
<ul>
<li><strong>Gameplay Shared</strong> represent controls that are common to all gameplay modes: Infantry, Vehicle, and Airplane. This might include actions such as Fire.</li>
<li> <strong>Vehicle</strong> represents controls specific to vehicle control.</li>
<li> <strong>System</strong> represents system controls such as switching to Menu mode, Save, Load, Pause, etc.</li>
</ul>
<p>In this example, the current game mode is <strong>Vehicle</strong>, so only maps in the categories Vehicle, Gameplay Shared, and System are currently active.</p>
<p style="text-align: center"><img src="files/images/input-mapping-diagram-1.png" alt="Input Mapping Diagram" /></p>
<hr />
<p>&nbsp;</p>
<p>The two diagrams below show how input from a source controller element is processed by the Controller Maps in Player, returning a result to the calling script. Note that some Controller Maps are disabled, while others are enabled (disabled maps are greyed out). When a Controller Map is disabled, input is not passed through.</p>
<p>&nbsp;</p>
<p><img src="files/images/input-mapping-diagram-2.png" /></p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<p>This diagram shows in more detail the relationship of Players, Controllers, Controller Maps, Action Element Maps, Controller Elements, and Actions. Specifically, it shows how individual Action Element Maps in the Controller Map serve to bind Actions to Controller elements.</p>
<p>&nbsp;</p>
<p><img src="files/images/input-mapping-diagram-3.png" /></p>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<p><strong>Working with Controller Maps</strong></p>
<p><a href="HowTos.html#enabling-disabling-controller-maps">How To's - Enabling and Disabling Controller Maps<br />
</a><a href="HowTos.html#enabling-disabling-action-element-maps">How To's - Enabling and Disabling Action Element Maps</a><br />
<a href="HowTos.html#managing-controller-maps-runtime">How To's - Managing Controller Maps at runtime</a><br />
<a href="HowTos.html#saving-loading-controller-maps">How To's - Saving and Loading Controller Maps</a></p>
<p><strong>Loading Default Controller Maps</strong></p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_ControllerHelper_MapHelper_LoadMap.htm">player.controllers.maps.LoadMap</a><br />
<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_Player_ControllerHelper_MapHelper_LoadDefaultMaps.htm">player.controllers.maps.LoadDefaultMaps</a></p>
<p><strong>See Also</strong></p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_JoystickMap.htm">API Reference - Joystick Map</a><br />
<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_KeyboardMap.htm">API Reference - Keyboard Map</a><br />
<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_MouseMap.htm">API Reference - Mouse Map</a><br />
<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_CustomControllerMap.htm">API Reference - Custom Controller Map </a></p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Controllers.html" title="Input Behaviors"><span class="button-img"></span>Controllers</a>
<a class="forward-button" href="ControllerTemplates.html" title="Map Categories"><span class="button-img"></span>Controller Templates</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 78b31b54880400c49b790a10cc6a7ec8
TextScriptImporter:
userData:

View File

@@ -1,386 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Controller Templates</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Controller Templates
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>A Controller Template represents a generalized controller layout that applies to all compatible controllers providing a common interface to work with these controllers. When you create a map for a Controller Template, any controller that implements the template will inherit that map automatically without the need for you to create a map specifically for that controller. For example, Rewired comes with a Gamepad Template. When you create a map for this Gamepad Template, you do not need to create individual maps specifically for any of the gamepads <a href="SupportedControllers.html">listed on this page</a> because they are all covered by the Gamepad Template. This makes is much quicker to create pre-defined controller maps for a huge variety of controllers. Additionally, as more controllers are added to the Template in the future, the map you've already created will work with these new controllers as well.</p>
<p>If you have created a map for a Controller Template but still want to make a map for a specific controller that is covered by the Controller Template, just create the map for the specific controller and it will override the map defined in the Template.</p>
<p>See this for more information about <a href="ControllerMaps.html#controller-templates">how Controller Templates relate to Controller Maps</a>.</p>
<p>Controller Templates can also be <a href="#scripting">accessed at runtime through scripting</a> for a variety of purposes. </p>
<p>For information about which controllers are compatible with which Controller Templates, please see <a href="SupportedControllers.html">Supported Controllers</a>. </p>
<p><strong><a name="supported-controller-elements" id="supported-controller-elements"></a>Supported Controller Elements:</strong></p>
<ul>
<li>All controller elements mappable on a Controller Template are not guaranteed to exist on every compatible controller.</li>
<li>All controller elements on a controller are not guaranteed to be supported on every platform and input source. Which elements are supported is up to the specific input API in use for the controller.</li>
<li> If a controller element does not exist on a controller or if that element is not supported on a specific platform and input source, no Action mapping will be created in the <a href="ControllerMaps.html#controller-templates">final runtime Controller Map</a> for that element.</li>
<li>All elements on a controller are not guaranteed to be mappable by a Controller Template. If a controller contains elements that are not supported by the template, you must create a Controller Map for that specific controller, overriding the template, if you want to map Actions to these unsupported elements.</li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="gamepad-template" id="gamepad-template"></a><a name="dual-analog-gamepad-template" id="dual-analog-gamepad-template"></a>Gamepad Template:</strong></p>
<p>The Gamepad Template allows you to make a map which will cover <a href="SupportedControllers.html#gamepads">all of the gamepads listed here</a>.</p>
<p><strong>NOTE:</strong> Do not be confused and assume that the Gamepad Template will apply to and work with every gamepad in existence. The Template only applies to and works with <a href="SupportedControllers.html">recognized gamepads</a> that have controller definitions. There is no possible way to create a system that can automatically recognize and map all gamepads, steering wheels, flight controllers, or any other type of device because the required information to do this simply does not exist in the USB or HID data provided by the device. Only <a href="SupportedControllers.html">devices that have controller definitions</a> can work with the Template system.</p>
<p> The element names of the Gamepad Template are generalized because not all gamepads use the same names for all elements. Note that even though the Template element names are generalized, during gameplay, Rewired will use the controller's element's actual name instead of the generalized name. For example, an XBox 360 controller will report &quot;A&quot; instead of &quot;Action Bottom Row 1&quot; for the green button.</p>
<p>To avoid confusion when mapping the Gamepad Template, refer to the following element naming guide:</p>
<p><img src="files/images/gamepad-template-element-name-guide.png" alt="Rewired Gamepad Template Name Guide" /></p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IGamepadTemplate.htm">IGamepadTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_GamepadTemplate.htm">GamepadTemplate</a></li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="racing-wheel-template" id="racing-wheel-template"></a>Racing Wheel Template:</strong></p>
<p>The Racing Wheel Template allows you to make a map which will cover <a href="SupportedControllers.html#racing-controllers">all of the wheels listed here</a>. No diagram exists showing the elements visually because there is no generally accepted universal racing wheel layout as there is for gamepads. The element names should be straightforward enough to understand what they would map to on a device.</p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IRacingWheelTemplate.htm">IRacingWheelTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_RacingWheelTemplate.htm">RacingWheelTemplate</a></li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="hotas-template" id="hotas-template"></a>Hotas Template:</strong></p>
<p>The HOTAS Template allows you to make a map which will cover <a href="SupportedControllers.html#flight-controllers">all of the HOTAS devices and flight sticks listed here</a>. No diagram exists showing the elements visually because there is no generally accepted universal HOTAS layout as there is for gamepads. The element names should be straightforward enough to understand what they would map to on a device.</p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IHOTASTemplate.htm">IHOTASTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_HOTASTemplate.htm">HOTASTemplate</a></li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="flight-yoke-template" id="flight-yoke-template"></a>Flight Yoke Template:</strong></p>
<p>The Flight Yoke Template allows you to make a map which will cover <a href="SupportedControllers.html#flight-controllers">all of the flight yokes listed here</a>. No diagram exists showing the elements visually because there is no generally accepted universal flight yoke layout as there is for gamepads. The element names should be straightforward enough to understand what they would map to on a device.</p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IFlightYokeTemplate.htm">IFlightYokeTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_FlightYokeTemplate.htm">FlightYokeTemplate</a></li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="flight-pedals-template" id="flight-pedals-template"></a>Flight Pedals Template:</strong></p>
<p>The Flight Pedals Template allows you to make a map which will cover <a href="SupportedControllers.html#flight-controllers">all of the flight pedals listed here</a>. No diagram exists showing the elements visually because there is no generally accepted universal flight pedal layout as there is for gamepads. The element names should be straightforward enough to understand what they would map to on a device.</p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IFlightPedalsTemplate.htm">IFlightPedalsTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_FlightPedalsTemplate.htm">FlightPedalsTemplate</a></li>
</ul>
<p>&nbsp;</p>
<p><strong><a name="6-dof-controller-template" id="6-dof-controller-template"></a>6 DoF Controller Template:</strong></p>
<p>The 6 DoF Controller Template allows you to make a map which will cover <a href="SupportedControllers.html#6-dof-controllers">all of the 6 DoF controllers listed here</a>.</p>
<p>The primary elements of the 6 DoF Controller Template are the 6 axes which can be used to retrieve 3D directional and rotational input:</p>
<ul>
<li>Horizontal<span class="note"> (Position X)</span></li>
<li>Vertical<span class="note"> (Position Y)</span></li>
<li>Forward/Back<span class="note"> (Position Z)</span></li>
<li>Rotate X</li>
<li>Rotate Y</li>
<li>Rotate Z</li>
</ul>
<p>No diagram exists showing the elements visually because there is no generally accepted universal 6 DoF controller layout as there is for gamepads. The element names should be straightforward enough to understand what they would map to on a device.</p>
<p>Scripting Reference:</p>
<ul>
<li>Interface - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ISixDofControllerTemplate.htm">ISixDofControllerTemplate</a></li>
<li>Class - <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_SixDofControllerTemplate.htm">SixDofControllerTemplate</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><strong><a name="scripting" id="scripting"></a></strong>Scripting</h3>
<p>Generally, you define Controller Maps for the Controller Template in the Rewired Editor, and when a user connects a compatible controller, it just works. You don't need to write any extra code to make Controller Templates work, nor do you even need to be aware they exist outside of creating the Controller Maps in the Rewired Editor. However, for some special cases, it can be useful to have access to the Controller Template at runtime through scripting. You can skip this entire section if you do not anticipate needing to work directly with Controller Templates in code.</p>
<p>Controller Templates can be accessed at runtime through scripting for a variety of purposes such as <a href="HowTos.html#display-glyph-for-action-template-specific">to display generalized Controller Template UI glyphs for a controller</a> or to <a href="#getting-input-directly">get input from the Controller Template elements directly</a>.</p>
<p>&nbsp;</p>
<p><strong>Accessing Controller Templates:</strong></p>
<p>Each <a href="Controller.html">Controller</a> has a list of Controller Templates that it implements. The following shows various ways of accessing them:</p>
<pre class="code">
<span class="comment">// Get the first Controller assigned to the Player that implements Gamepad Template</span>
var controller = player.controllers.GetFirstControllerWithTemplate&lt;IGamepadTemplate&gt;();
<span class="comment">// Get the Gamepad Template from the Controller</span>
var gamepad = controller.GetTemplate&lt;IGamepadTemplate&gt;();
<span class="comment">// Get a list of all Controller Templates of a particular type in all Controllers found on the system</span>
var gamepads = ReInput.controllers.GetControllerTemplates&lt;IGamepadTemplate&gt;();
<span class="comment">// Iterate through all Controller Templates implemented by a Controller</span>
for(int i = 0; i &lt; controller.templateCount; i++) {
Debug.Log(controller.name + &quot; implements the &quot; + controller.Templates[i].name + &quot; Template.&quot;);
} </pre>
<p><strong><a name="determining-if-controller-implements-template" id="determining-if-controller-implements-template"></a>Determining if a Controller implements a particular Controller Template:</strong></p>
<p>Sometimes it can be useful to know whether a Controller implements a particular Controller Template. This can be done as follows:</p>
<pre class="code">
<span class="comment">// Check whether the Controller implements the Controller Template type</span>
if(controller.ImplementsTemplate&lt;IGamepadTemplate&gt;()) {
<span class="comment">// Controller implements IGamepadTemplate</span>
}
<span class="comment">// You can also just try to get the Template directly and check if the result is null</span>
var gamepad = controller.GetTemplate&lt;IGamepadTemplate&gt;();
if(gamepad != null) {
<span class="comment">// Controller implements IGamepadTemplate</span>
}</pre>
<p><strong><a name="getting-input-directly" id="getting-input-directly"></a>Getting input directly from Controller Templates:</strong></p>
<p>Normally, you would use the <a href="HowTos.html#get-input">Player-Action system to get input</a>, but you can also get input values directly from the elements in a Controller Template if you choose. Each Controller Template interface has a list of elements accessible through scripting. The following illustrates the process:</p>
<pre class="code">
<span class="comment">// Get the Gamepad Template from the Controller</span>
IGamepadTemplate gamepad = controller.GetTemplate&lt;IGamepadTemplate&gt;();
<span class="comment">// If the result is null, the Controller does not implement the Gamepad Template</span>
if (gamepad == null) continue;
<span class="comment">// Read values directly from the elements
// Note that most elements on the Gamepad Template have aliases
// available such as a, b, x, y, back, start for elements which correspond to
// Xbox controller naming standards for your convenience.
// The standard names of actionBottomRow1, leftShoulder2, etc., are also available.</span>
Vector2 moveVector = gamepad.leftStick.value;
Vector2 lookVector = gamepad.rightStick.value;
float fire = gamepad.rightTrigger.value;
<span class="comment">// Any Axis can also be queried as a Button using the AsButton convenience property</span>
bool fireJustPressed = gamepad.rightTrigger.AsButton.justPressed;
bool punch = gamepad.b.justPressed;
bool reload = gamepad.y.justPressed;
bool aim = gamepad.leftStick.press.value;
bool jump = gamepad.x.justPressed;
bool start = gamepad.start.justPressed;
bool up = gamepad.dPad.up.value;
bool down = gamepad.dPad.down.value;
Vector2 dPadVector = gamepad.dPad.value;</pre>
<p><strong><a name="interface-vs-concrete-class" id="interface-vs-concrete-class"></a>Interface vs concrete class:</strong></p>
<p>Controller Templates are exposed as both a concrete class and an interface. You should always use the interface when interacting with the API. The concrete class is only exposed for its static members (element identifier id constants, type guid, etc.)</p>
<pre class="code">
<span class="comment"></span><span class="comment">// Each Controller Template concrete class lists public
// constants for accessing the various elements should you need them</span>
int id = GamepadTemplate.elementId_leftStickX;
id = GamepadTemplate.elementId_leftStickY;
id = GamepadTemplate.elementId_rightShoulder;
<span class="comment">// The GUID is also available</span>
Guid guid = GamepadTemplate.typeGuid;</pre>
<p><strong><a name="action-map-to-controller-template-element" id="action-map-to-controller-template-element"></a>Getting a Controller Template Element from a Controller Action mapping:</strong></p>
<p>If you want to determine the Controller Template Element that corresponds to a Player-Action mapping in a Controller Map, it can be converted to a Controller Template Element Target by using the method <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_IControllerTemplate_GetElementTargets.htm">IControllerTemplate.GetElementTargets</a>.</p>
<pre class="code">int count = template.GetElementTargets(actionElementMap, results);</pre>
<p><span class="comment"> This gets what Controller Template Elements the Action Element Map is pointing to.
Note that this may return two targets in some rare cases where the Action Element Map
binds to multiple elements on the Template such as the Racing Wheel template which has Shifer 1-10 and Reverse Gear, two of which may be bound to the same Controller element.
Two elements would also be returned if two Template Buttons are mapped to both poles of a single Controller Axis.</span></p>
<p>A more complete example can be found in the <a href="Examples.html#gamepad-template-ui">Gamepad Template UI example</a>.</p>
<p><strong>Controller Template Element Sources:</strong></p>
<p>Each Controller Template Element points back to a Controller Element where input values are actually drawn from. This information can be found in the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_IControllerTemplateElement_source.htm">IControllerTemplateElement.source</a> property. The source type can be determined using the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_IControllerTemplateElementSource_type.htm">IControllerTemplateElementSource.type</a> property and then cast to the appropriate <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IControllerTemplateAxisSource.htm">IControllerTemplateAxisSource</a> or <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_IControllerTemplateButtonSource.htm">IControllerTemplateButtonSource</a>.</p>
<p><a name="saving-and-loading-controller-template-mappings" id="saving-and-loading-controller-template-mappings"></a><strong>Saving and loading Controller Template mappings:</strong></p>
<p>Normally, Controller mappings are saved on a per-controller-type basis. However, it is possible to save and load mappings for a Controller Template instead. You would do this if you wanted all Gamepads for example to share saved control mappings instead of each having its own saved data. This would allow you to, for example, map and save on an Xbox 360 Controller, then when plugging in a Sony Dual Shock 4, it would inherit those mappings created for the Xbox 360 Controller.</p>
<p>Controller Maps always exist per-device, but you can convert the Controller Map to a Controller Template Map before saving. After loading, you convert it back to a Controller Map and load it in the Player:</p>
<pre class="code">
<span class="comment">// Quick Example
// Convert Controller Map to a Controller Template Map and then export to XML</span>
string xml = controllerMap.ToControllerTemplateMap&lt;IGamepadTemplate&gt;().ToXmlString();
<span class="comment">// Convert exported Controller Template XML to a Controller Map again</span>
ControllerMap controllerMap = ControllerTemplateMap.FromXml(xml).ToControllerMap(joystick);
<span class="comment">// Load it in the Player</span>
player.controllers.maps.AddMap(joystick, controllerMap);</pre>
<pre class="code">
<span class="comment">// More detailed example below showing using the first implemented Controller Template
// instead of the using Gamepad Template specifically.</span>
<span class="comment">// Saving</span>
if(controller.templateCount &gt; 0) {
<span class="comment">// Get the first Controller Template implemented by this Controller</span>
IControllerTemplate template = controller.Templates[0];
<span class="comment"> // Convert the Controller Map to a Controller Template Map</span>
ControllerTemplateMap templateMap = controllerMap.ToControllerTemplateMap(template.typeGuid);
<span class="comment">// Export the Controller Template Map to XML</span>
string xml = templateMap.ToXmlString();
<span class="comment">// Save the XML</span>
}
<span class="comment">// ...</span>
<span class="comment">// Loading</span>
foreach(Joystick joystick in player.controllers.Joysticks) {
if (joystick.templateCount == 0) continue; <span class="comment">// this Joystick does not implement any Controller Templates</span>
<span class="comment">
// Get the first Controller Template implemented by this Controller</span>
IControllerTemplate template = controller.Templates[0];
<span class="comment">// Call some method to get the Xml for the template</span>
string xml = GetXml(player, joystick.Templates[0]);
<span class="comment">// Create the Controller Template Map from XML</span>
ControllerTemplateMap templateMap = ControllerTemplateMap.FromXml(xml);
if (templateMap == null) continue; <span class="comment">// failed to load from xml, skip</span>
<span class="comment">// Convert to a Controller Map and add it to the Player</span>
player.controllers.maps.AddMap(joystick, templateMap.ToControllerMap(joystick));
}</pre>
<p></p>
<p><a name="viewing-default-controller-template" id="viewing-default-controller-template"></a><strong>Viewing a default Controller Template Map when no Joystick is attached:</strong></p>
<p>If you need to see what a Controller Template's elements are mapped to without a Joystick attached that implements that Template, you can get an instance of a default Controller Template Map as defined in the Rewired Input Manager as follows:</p>
<pre class="code">ReInput.mapping.GetControllerTemplateMapInstance(GamepadTemplate.typeGuid, categoryId, layoutId);</pre>
<p>This will return a Controller Template Map which will show the default bindings in a particular Map Category and Layout. Note that this will not load any data from saved user XML/JSON, so if your users have remapped their controls and you've saved that information, this will not be reflected in the returned map. You would have to load the saved map from data storage in order to see the user-modified bindings.</p>
<p><strong>Limitations:</strong></p>
<ul>
<li>It is not possible to allow the user to map and apply a Controller Template to an Unknown Controller (or any other incompatible Controller) during runtime at this time.</li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="ControllerMaps.html" title="Map Categories"><span class="button-img"></span>Controller Maps</a>
<a class="forward-button" href="CustomControllers.html" title="Custom Controllers"><span class="button-img"></span></a><a class="forward-button" href="MapCategories.html" title="Map Categories">Map Categories</a> </div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 98cc7457b0421054daa0e1efd293d6f9
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,235 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Controllers</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Controllers
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>A Controller is a virtual object that represents a physical or virtual controller of some type. Each Controller object contains a list of elements (buttons, axes, etc.) each of which represents a physical or virtual element on a controller. While you can access element input values directly from the Controller object, generally there is little reason to do this in Rewired because you normally access input through Rewired's <a href="Players.html">Player</a>-based, <a href="Actions.html">Action</a>-driven input system instead.</p>
<h3><a name="controller-types" id="joysticks2"></a>Controller Types</h3>
<p>The controller types in Rewired are:</p>
<ul>
<li><a href="#joysticks">Joysticks</a></li>
<li><a href="#keyboard">Keyboard</a></li>
<li><a href="#mouse">Mouse</a></li>
<li><a href="#custom-controllers">Custom Controllers</a></li>
</ul>
<p>Different controller types have some differences in the way they are used by Players to determine input values.</p>
<h3><a name="joysticks" id="joysticks"></a>Joysticks</h3>
<p>Joysticks are the most common Controller type and include most external non-mouse, non-keyboard USB or Bluetooth input peripherals that are connected to the system. (Certain exotic device types cannot be seen as Joysticks by Rewired.) Joysticks may come in various forms such as gamepads, flight sticks, steering wheels, balance boards, etc.</p>
<p>When a controller is attached to the system, Rewired will attempt to identify that controller and load a hardware definition. If a hardware definition is found, it will have human-readable element names, standardized axis directions, can have default mappings created for it in the Rewired Editor so your players can just connect and go, and even may be compatible with a <a href="ControllerTemplates.html">Controller Template</a> for even quicker mapping. Please see <a href="SupportedControllers.html">Supported Controllers</a> for more information about recognized controllers. For all other controllers that are not recognized, <a href="SupportedControllers.html#controllers-without-definitions">see this for more information</a>.</p>
<p><strong><a name="joystick-assignment" id="joysticks3"></a>Joystick Assignment</strong><br />
In order to use a Joystick in Rewired's Player-based system, first the Player which should be in control of the Joystick must have that joystick assigned. (<a href="#joystick-auto-assignment">See Joystick Auto-Assignment</a>.) Once the Joystick is assigned to the Player, Rewired will attempt to load any Joystick Maps for that Player from the defaults assigned to the Player in the Rewired Input Manager for the particular Joystick in question. The Player will then use that Joystick as one of its input sources when calculating the values of its input Actions provided the Player also has one or more Joystick Maps which map joystick elements to Actions. (<a href="ControllerMaps.html">See Controller Maps for more information</a>.) A Player may have any number of Joysticks assigned, and Joysticks may be shared among any number of Players (this is rare.)</p>
<p>Joysticks can be assigned and removed from a Player via scripting (<a href="HowTos.html#assigning-joysticks">see here for more information</a>), but it is more common to allow Rewired to automatically assign Joysticks to Players.</p>
<p><a name="joystick-auto-assignment" id="joysticks4"></a><strong>Joystick Auto-Assignment</strong></p>
<p>By default, Joysticks will be assigned to Players (excluding the System Player) automatically based on the Joystick Auto-Assignment settings in the <a href="https://guavaman.com/projects/rewired/docs/RewiredEditor.html#Settings">Rewired Editor - Settings</a>. These settings allow you to change various options for how Joysticks are auto-assigned to Players based on the needs of your game. Joystick auto-assignment can be disabled if you'd prefer to <a href="HowTos.html#assigning-joysticks">assign joysticks manually through scripting</a>. Joystick auto-assignment can also be <a href="RewiredEditor.html#Players">selectively disabled per player in the Rewired Editor</a> and <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_excludeFromControllerAutoAssignment.htm">via scripting</a>.</p>
<p>Note: One common issue that arises is when you connect multiple controllers and want a single Player to be able to use any of the connected controllers. Based on the default settings, Rewired will assign only one controller per-Player. In order to allow auto-assignment of multiple Joysticks to the same Player, Max Joysticks Per Player must be raised to a value greater than 1. All these settings are configurable and have descriptions as to their function.</p>
<p><strong><a name="joystick-maps" id="joysticks5"></a>Joystick Maps</strong><br />
Please see <a href="ControllerMaps.html#joystick-maps">Controller Maps - Joystick Maps</a> for more information. </p>
<p><strong><a name="joystick-events" id="joysticks6"></a>Joystick Connect and Disconnect Events</strong><br />
You can detect when a Joystick is connected or disconnected through the use of events. <a href="HowTos.html#connect-disconnect-events">See How To's - Receiving joystick connect and disconnect events</a> for more information.</p>
<p><strong><a name="detecting-joysticks-at-start" id="joysticks13"></a>Checking for Joysticks at the Start of the Game</strong></p>
<p>Please see <a href="https://guavaman.com/projects/rewired/docs/HowTos.html#connect-disconnect-events">How To's - Receiving Joystick connect and disconnect events</a> for important information.</p>
<p><strong><a name="identifying-joysticks-by-type" id="identifying-joysticks-by-type"></a>Identifying Joysticks</strong></p>
<p>Please see <a href="HowTos.html#https://guavaman.com/projects/rewired/docs/HowTos.html#identifying-recognized-controllers">How To's - Identifying recognized Joysticks.</a></p>
<p>&nbsp;</p>
<hr />
<h3><strong><a name="keyboard" id="joysticks7"></a></strong>Keyboard</h3>
<p>The keyboard works similarly to Joysticks in many ways, but there are a few notable differences:</p>
<ul>
<li>At the present time, Rewired only supports a single, universal keyboard. Multiple keyboards attached to the system will simply act as a single keyboard.</li>
<li>Keyboards do not send connect/disconnect events.</li>
</ul>
<p><strong><a name="keyboard-assignment" id="joysticks14"></a>Keyboard Assignment</strong><br />
Similar to Joysticks, the Keyboard must be assigned to a Player before that Player can use it for input. However, the method of assigning the Keyboard to a Player differs from Joysticks.</p>
<p>To allow a Player access to the keyboard at the start of your game, you should ensure that &quot;Assign Keyboard on Start&quot; is checked in the <a href="RewiredEditor.html#Players">Rewired Editor - Players</a> page. (The keyboard is assigned to all Players on start by default.)</p>
<p>To assign the keyboard manually via scripting:</p>
<ul>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasKeyboard.htm">player.controllers.hasKeyboard</a> - Set to True to give the Player access to the keyboard.</li>
</ul>
<p><strong><a name="keyboard-maps" id="joysticks8"></a>Keyboard Maps</strong><br />
Like Joysticks, a Player will only be able to return input values for keyboard keys if the Player has one or more enabled Keyboard Maps assigned. Please see <a href="ControllerMaps.html#keyboard-maps">Controller Maps - Keyboard Maps</a> for more information.</p>
<p>&nbsp; </p>
<hr />
<h3><strong><a name="mouse" id="joysticks9"></a></strong>Mouse</h3>
<p>The mouse also works similarly to Joysticks in many ways, but there are a few notable differences:</p>
<ul>
<li>At the present time, Rewired only supports a single, universal mouse. Multiple mice attached to the system will simply act as a single mouse.</li>
<li>Mice do not send connect/disconnect events.</li>
</ul>
<p><strong><a name="mouse-assignment" id="joysticks11"></a>Mouse Assignment</strong><br />
Similar to Joysticks, the Mouse must be assigned to a Player before that Player can use it for input. However, the method of assigning the Mouse to a Player differs from Joysticks.</p>
<p>To allow a Player access to the mouse at the start of your game, you should check &quot;Assign Mouse on Start&quot; in the <a href="RewiredEditor.html#Players">Rewired Editor - Players</a> page.</p>
<p>To assign the mouse manually via scripting:</p>
<ul>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasMouse.htm">player.controllers.hasMouse</a> - Set to True to give the Player access to the mouse.</li>
</ul>
<p><strong><a name="keyboard-maps" id="joysticks10"></a>Mouse Maps</strong><br />
Like Joysticks and the Keyboard, a Player will only be able to return input values for mouse input if the Player has one or more enabled Mouse Maps assigned. Please see <a href="ControllerMaps.html#mouse-maps">Controller Maps - Mouse Maps</a> for more information. </p>
<p>&nbsp;</p>
<hr />
<h3><strong><a name="custom-controllers" id="joysticks12"></a></strong>Custom Controllers</h3>
<p>Please see <a href="CustomControllers.html">Custom Controllers</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="enabling-and-disabling" id="enabling-and-disabling"></a>Enabling / Disabling</h3>
<p>All Controllers can be enabled or disabled via scripting by setting the Controller.enabled property. Disabled Controllers do not generate any input.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="InputBehaviors.html" title="Input Behaviors"><span class="button-img"></span>Input Behaviors</a>
<a class="forward-button" href="ControllerMaps.html" title="Map Categories"><span class="button-img"></span>Controller Maps</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 69a88242ddb000e4abbecc71e1f8a360
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,188 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Custom Controllers</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Custom Controllers
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Custom Controllers are a type of virtual controller that you can customize, adding as many axes and buttons as you need. A Custom Controller allows you to set your own sources for axis and button input. This could be any type of physical or virtual controller. Anything that can return a float or a boolean value can be used as an element source. Custom Controllers can be used for on-screeen touch controllers and more. (See the example in the Rewired/Examples folder.)</p>
<p><strong>IMPORTANT NOTE:</strong> Custom Controllers are NOT meant to be used to create new HID joystick definitions for controllers that Rewired doesn't automatically recognize and map for you. They are virtual controllers that know nothing but what axis and button data is fed into them by your script. They are entirely separate from the Joystick system, are not auto-assigned, don't generate connect or disconnect events, etc. If you are planning to use a Custom Controller to add support for controller that Rewired can detect but doesn't recognize and automatically map for you, don't -- it's the wrong tool for the job. Instead you want to <a href="HowTos.html#new-controller-definitions">create a new controller definition</a> for that or else define a Joystick Map for <a href="ControllerMaps.html#unknown-controllers">Unknown Controller</a> instead. Custom Controllers can however be used to support devices that do not show up as joysticks such as special controllers that require the use of an SDK (most VR controllers).</p>
<p><strong>Creating/Editing Custom Controllers</strong></p>
<p>You create and edit Custom Controllers in the <a href="RewiredEditor.html">Rewired Editor</a>. See <a href="RewiredEditor.html#CustomControllers">Rewired Editor - Custom Controllers</a> for more information.</p>
<p><strong>Assigning Custom Controllers to Players </strong></p>
<p>You assign starting Custom Controllers in the <a href="RewiredEditor.html">Rewired Editor</a>. See <a href="RewiredEditor.html#Players">Rewired Editor - Players</a> for more information.</p>
<p>Custom Controllers, unlike Joysticks, are instantiated for each player. When you add a Custom Controller, the controller will be created on game start and assigned to the Player. If you add the same controller to multiple Players, the Custom Controller will be instantiated for each, therefore setting a Tag on each can be helpful to differentiate the controllers.</p>
<p>You can also assign and un-assign Custom Controllers via scripting at runtime. This can be useful if you want to detect the presence of a certain type of non-standard controller (some VR controller for example) and auto-assign that to a Player. Assignment of Custom Controllers is <a href="HowTos.html#assigning-joysticks">similar to assigning Joysticks to Players</a>.</p>
<p><strong>Instantiating Custom Controllers via scripting</strong></p>
<p>Normally, Rewired will instantiate the controllers assigned to each Player upon initialization. If you need to instantiate new Custom Controller objects at runtime, they can be instantiated from the pre-defined definitions in the Rewired Input Manager at via scripting using the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ReInput_ControllerHelper.htm">CreateCustomController methods in ReInput.controllers</a>.</p>
<p><strong>Updating Element Values</strong></p>
<p>Element (axes and buttons) values must be updated on the Custom Controller each frame. There are 2 different ways you can do this:</p>
<p>1) Register for the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/E_Rewired_ReInput_InputSourceUpdateEvent.htm">ReInput.InputSourceUpdateEvent</a>, then when that event fires, push the new values into the elements directly through <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_CustomController_SetAxisValue.htm">CustomController.SetAxisValue</a> and <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_CustomController_SetButtonValue.htm">CustomController.SetButtonValue</a>.</p>
<p>2) Set callbacks in the CustomController with <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_CustomController_SetAxisUpdateCallback.htm">CustomController.SetAxisUpdateCallback</a> and <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_CustomController_SetButtonUpdateCallback.htm">SetButtonUpdateCallback</a>. These callback functions will be called during the input update step and you can push the latest values into the element at this time.</p>
<p>Examples of both methods can be seen in the Touch Controller example in the Rewired/Examples folder.</p>
<p>Note: Both the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/E_Rewired_ReInput_InputSourceUpdateEvent.htm">InputSourceUpdateEvent</a> and the callbacks may be called more than once per frame. They will be called each time input is updated, which is dependent on the Update Loop setting in the Input Manager. If you're updating input in multiple loops, for example Update and FixedUpdate, the event and the callbacks will be called once for each update loop.</p>
<p><strong>Examples</strong></p>
<ul>
<li><a href="Examples.html#custom-controllers-touch">Custom Controllers Touch</a></li>
<li><a href="Examples.html#custom-controllers-tilt">Custom Controllers Tilt</a></li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="ControllerTemplates.html" title="Layouts"><span class="button-img"></span>Controller Templates</a>
<a class="forward-button" href="HowTos.html" title="How To's"><span class="button-img"></span>How To's</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 1f7584321eca3cf4da3bfe0a24d21ffe
TextScriptImporter:
userData:

View File

@@ -1,206 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Custom Platforms</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Custom Platforms
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>If you need to support additional platforms that Rewired does not support natively, you can do so using the Custom Platform system.You can create custom input managers for joysticks, keyboard, and mouse, and pipe input in from any source.</p>
<p><strong>Warning: </strong>Implementing a custom platform requires <em>expert</em> C# and Unity knowledge. Do not attempt to create a custom platform if you are not an expert or are not willing to read through C# code to understand the concepts. I will not provide any support on any C# or Unity concepts you do not understand.</p>
<p>The following is a brief overview of the concepts. The primary source of documentation for adding a Custom Platform is the code provided in the <a href="Examples.html#custom-platform">Custom Platform example</a> included with Rewired. Refer to this to learn all the details of how to set up a custom platform.</p>
<h3>Code</h3>
<p>The namespace for all classes related to custom platforms is <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/N_Rewired_Platforms_Custom.htm">Rewired.Platforms.Custom</a>. You should add a using statement with this namespace in your scripts.</p>
<h3>Concepts </h3>
<ul>
<li><a href="#custom-platform-input-source">Custom Platform Input Source </a></li>
<li><a href="#custom-platform-keyboard-input-source">Custom Platform Keyboard Input Source</a></li>
<li><a href="#custom-platform-mouse-input-source">Custom Platform Mouse Input Source</a></li>
<li><a href="#custom-platform-initializer">Custom Platform Initializer</a></li>
<li><a href="#custom-platform-hardware-joystick-map-platform-map-provider">Custom Platform Hardware Joystick Map Platform Map Provider</a></li>
<li><a href="#hardware-joystick-map-platform-maps">Hardware Joystick Map Platform Maps</a></li>
<li><a href="#controller-extensions">Controller Extensions</a></li>
</ul>
<h3><a name="custom-platform-input-source" id="custom-platform-input-source"></a>Custom Platform Input Source</h3>
<p>Manages input devices, reads input from the low-level input API on the platform, pipes input into Rewired, and handles any output (vibration, etc.) if any.</p>
<p>Create an implementation that extends <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_CustomPlatformInputSource.htm">Rewired.Platforms.Custom.CustomPlatformInputSource</a>. </p>
<h3><a name="custom-platform-keyboard-input-source" id="custom-platform-keyboard-input-source"></a>Custom Platform Keyboard Input Source</h3>
<p>(optional) Handles keyboard input. Reads low-level keyboard input and pipes input values into Rewired. If no keyboard input source is provided, Rewired will fall back to UnityEngine.Input keyboard handling.</p>
<p>Optionally create an implementation that extends <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_CustomPlatformUnifiedKeyboardSource.htm">Rewired.Platforms.Custom.CustomPlatformUnifiedKeyboardSource</a>.</p>
<p>Additional features include supplying key labels which allows supporting keyboard layouts and localization.</p>
<h3><a name="custom-platform-mouse-input-source" id="custom-platform-mouse-input-source"></a>Custom Platform Mouse Input Source</h3>
<p>(optional) Handles mouse input. Reads low-level mouse input and pipes input values into Rewired. If no mouse input source is provided, Rewired will fall back to UnityEngine.Input mouse handling.</p>
<p>Optionally create an implementation that extends <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_CustomPlatformUnifiedMouseSource.htm">Rewired.Platforms.Custom.CustomPlatformUnifiedMouseSource</a>.</p>
<h3><a name="custom-platform-initializer" id="custom-platform-initializer"></a>Custom Platform Initializer</h3>
<p>Initializes the platform input source on Rewired initialization.</p>
<p>Create a MonoBehaviour script that implements <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_ICustomPlatformInitializer.htm">Rewired.Platforms.Custom.ICustomPlatformInitializer</a> and add the component to the Rewired Input Manager GameObject or a child GameObject of the Rewired Input Manager. When Rewired initializes, the custom platform will be initialized and used as the source of input.</p>
<h3><a></a><a name="custom-platform-hardware-joystick-map-platform-map-provider" id="custom-platform-hardware-joystick-map-platform-map-provider"></a>Custom Platform Hardware Joystick Map Platform Map Provider</h3>
<p>Provides platform-specific, user-defined joystick element mappings for specific joysticks.</p>
<p>Create a class that implements <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_IHardwareJoystickMapCustomPlatformMapProvider.htm">Rewired.Platforms.Custom.IHardwareJoystickMapCustomPlatformMapProvider</a>. </p>
<h3><a name="hardware-joystick-map-platform-maps" id="hardware-joystick-map-platform-maps"></a>Hardware Joystick Map Platform Maps</h3>
<p>User-defined mappings of low-level joystick elements to software Joystick buttons and axes. For each platform, you will need to create maps that map low-level controller elements to Rewired Controller axes and buttons.</p>
<p>For a basic implmentation (string device name matching only), you can use the built-in <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_Custom_HardwareJoystickMapCustomPlatformMapSimpleSO.htm">HardwareJoystickMapCustomPlatformMapSimpleSO</a> class. Create an instance from the right-click menu:</p>
<ul>
<li> Create -&gt; Rewired -&gt; Custom Platform -&gt; Simple Joystick Platform Map</li>
</ul>
<p>For more advanced features such as adding custom matching criteria properties, see the example code. </p>
<p><strong>IMPORTANT</strong>: If there is ever any possibility on a platform that a controller could be connected that is not recognized, you must create a platform map for Unknown Controller. This is a definition that defines a long list of axes and buttons that should include enough of each to cover any device that might be used on the platform. It does not have to define all 128 supported buttons and 32 supported axes though. You can define however many elements as needed for the specific platform in question, or however many you want to support as a maximum.</p>
<h3><a name="controller-extensions" id="controller-extensions"></a>Controller Extensions</h3>
<p>If you need to provide platform-specific functionality, you can create a custom Controller Extension extending <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerExtensions_CustomControllerExtension.htm">Rewired.ControllerExtensions.CustomControllerExtension</a> to expose any functionality you want through the Controller Extension. You can also implement <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Interfaces_IControllerVibrator.htm">Rewired.Interfaces.IControllerVibrator</a> to support standard Rewired Player and Controller vibration. You can also implement any of the device-specific interfaces such as <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerExtensions_IDualShock4Extension.htm">IDualShock4Extension</a> or <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerExtensions_IDualSenseExtension.htm">IDualSenseExtension</a> to allow you to use platform-agnostic code for these devices.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Actions"><span class="button-img"></span>Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,256 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Deployment</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Deployment<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<h2>Dependencies</h2>
<p><strong>Windows Standalone</strong></p>
<p>OPTIONAL: If using XInput or Direct Input, the <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8109" target="_blank">DirectX End-user Runtimes (June 2010)</a>from Microsoft may need to be installed. You should include this runtime in your game installer. This is not necessary if only using Raw Input or Unity input.</p>
<p>If XInput is enabled, Rewired can use any of these versions of XInput if they are installed on the system:</p>
<p>XInput_1_4.dll<br />
XInput_1_3.dll<br />
XInput_1_2.dll<br />
XInput_1_1.dll<br />
XInput_9_1_0.dll </p>
<p>Windows Vista, Windows 7, Windows 8, and Windows 10 all come with a version of XInput pre-installed.</p>
<p>If using Direct Input, the <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019</a> must be installed.</p>
<p><strong>SDL2</strong></p>
<p>If you are using SDL2 as the input source (optional) on any platforms, you must include the appropriate SDL2 libraries in your build package, unless you know the target operating system already provides this library (eg: SteamOS). The library you include and the location in your package in which to place it depends on the target platform and architecture. Failure to include the SDL2 libraries will result in an error being logged and input falling back to Unity input as the source.</p>
<p>The latest libraries for Windows and OSX can be obtained at the <a href="https://www.libsdl.org/download-2.0.php" target="_blank">SDL2 website</a>.</p>
<p><strong>Windows:</strong> </p>
<p>No special steps are required for Unity 5.x+.</p>
<p>Direct Input on Unity 4.x:<br />
The free version of Unity 4.x does not support native plugins. A native plugin is required to use Direct Input (optional) as the primary input source on the Windows Standalone platform. If you want to use Direct Input, you will need to manually copy the DLL from Assets/Plugins/x86/Rewired_DirectInput.dll file into the root folder of your project (above the Assets folder). After you make a build, you will need to copy the appropriate Rewired_DirectInput.dll file for your chosen architecture (x86 or x64) into a folder called Plugins inside the build folder. This is a hack to get around the Unity 4.x native plugin limitation. Unity 5.x+ does not require this hack. </p>
<p><strong>OSX:</strong> The SDL2 website does not include an SDL2 bundle, which is the format that Unity requires if you are to include a native OSX library in the Unity project's Plugins folder. You will either have to build the bundle manually, or use the bundle included with Rewired.</p>
<p><strong>Linux:</strong> To include SDL in the game build, you must place the libSDL2-2.0.so.0 file in same location as the executable game file. Placing the library in the data folder in Plugins, Plugins/x86, Plugins/x86_64 or Mono or its sub-directories will not work. For 32-bit builds, you must copy the library in the Plugins/x86 folder and for 64-bit builds, copy the library in the Plugins/x86_64 folder.</p>
<p>Rewired includes pre-built SDL2 libraries for each platform, but they must be installed manually through the menu option:</p>
<ul>
<li><strong>Window -&gt; Rewired -&gt; Setup -&gt; Install Libraries -&gt; SDL2 </strong></li>
</ul>
<p>For Linux, after installing the libraries above, you can copy the libSDL2-2.0.so.0 file from the Assets/Plugins/x86 or Assets/Plugins/x86_64 folder. Unity will automatically copy the Windows and OSX libraries on build to the right locations.</p>
<p>NOTE: Unity 4.x free does not officially allow you to include native libraries while Unity 5+ does. There are workarounds available for Unity 4.x that involve placing the library in the root folder of your editor project and manually copying the library to your final game build. The exact procedure depends on your target platform. There are resources available by searching the Unity forums. Or <a href="https://guavaman.com/rewired#support">contact support</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h2>Build Minimum OS Version Requirements </h2>
<p>&nbsp;</p>
<table width="100%" border="1">
<tr>
<td><strong>Windows Standalone</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Raw Input</td>
<td>Unity base requirements</td>
</tr>
<tr>
<td>Direct Input</td>
<td>Windows 10 version 1803 (Build 17134)</td>
</tr>
<tr>
<td>Windows Gaming Input</td>
<td>Windows 10 version 1809 (Build 17763)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Windows Universal</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Native</td>
<td>Windows 10 version 1709 (Build 16299)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>MacOS</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Native</td>
<td>Unity base requirements</td>
</tr>
<tr>
<td>Game Controller Framework</td>
<td>MacOS 10.11</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Linux</strong></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Native</td>
<td>Ubuntu 12.04</td>
</tr>
</table>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="BasicUsage.html" title="Basic Usage"><span class="button-img"></span>Basic Usage</a>
<a class="forward-button" href="BestPractices.html" title="Best Practices"><span class="button-img"></span>Best Practices</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 004936bedb153ed48b301f5bfb0162a3
TextScriptImporter:
userData:

View File

@@ -1,315 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="true" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body root">
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Rewired Documentation<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<h2 >For Rewired version 1.1.57.3</h2>
<!--<div style="border: 3px solid; padding: 2em; font-weight: bold; font-size: 24px">Notice:
<ul>
<li><a href="KnownIssues.html#windows-standalone-il2cpp-vs2019-hang">Visual Studio 2019 -- All platforms compiled with IL2CPP on Windows: Builds never finish, build fails with errors, builds crash, built exe hangs at launch, or builds throw exceptions about duplicate Actions</a><br />
</li>
</ul>
</div>
<p></p>-->
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<br/>
<h3 style="background-color:#ddd">Essentials:</h3>
<ol>
<li><a href="Installation.html">Installation</a> - Walks you through the installation process.</li>
<li><a href="QuickStart.html">Quick Start</a> - A quick guide showing how to do basic setup. All newcomers to Rewired should follow this tutorial to understand the workflow.</li>
<li><a href="BasicUsage.html">Basic Usage</a> - Basic guidelines for scripting.</li>
<li><a href="Deployment.html">Deployment</a> - Important notes on deplyoing your game on various platforms.</li>
<li><a href="BestPractices.html">Best Practices</a> - Important guidelines on various topics.</li>
<li><a href="RewiredEditor.html">Rewired Editor</a> - Detailed information about the Rewired Input Manager editor.</li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a> - A complete reference for the Rewired scripting API.</li>
</ol>
<p>&nbsp;</p>
<h3 style="background-color: #ddd">Concepts:</h3>
<p>The topics in this section are <em>CRITICAL</em> to understanding the Rewired system. Do not skip over these sections! The answers to the vast majority of support questions I receive on a daily basis are already clearly outlined in these topics. It is very important that you take the time to read this information and familiarize yourself with the Rewired system before contacting support for basic usage and conceptual questions.</p>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="ControllerMaps.html"></a><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<p><br />
</p>
<h3 style="background-color: #ddd">Support issues:</h3>
<p><span style="background-color:yellow"><a href="Troubleshooting.html#debug-information"><strong>Debug Information</strong> is the single most powerful tool to figure out why &quot;it doesn't work.&quot;</a></span> Use it. It allows you to visualize every single Rewired object in the system at runtime including Controller Maps and bindings. Before contacting support asking why something doesn't work, debug your issue using Debug Information.</p>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">Extras:</h3>
<ul>
<li><a href="ControlMapper.html">Control Mapper</a></li>
<li><a href="Glyphs.html">Glyphs</a></li>
<li><a href="TouchControls.html">Touch Controls</a></li>
<li><a href="UnityInputOverride.html">Unity Input Override</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">Misc:</h3>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a> - <strong><em>*Required to control Unity UI with Rewired</em></strong><em>*</em> -- If you are not using the Rewired Standalone Input Module instead of the default Standalone Input Module on your EventSystem, <em>Rewired input is not controlling the UI -- Unity is</em>.</li>
<li><a href="ComponentControls.html">Component Controls</a></li>
<li><a href="PlayerControllers.html">Player Controllers</a></li>
<li><a href="InputMapper.html">Input Mapper</a></li>
<li><a href="UserDataStore.html">User Data Store</a></li>
<li><a href="CustomPlatforms.html">Custom Platforms</a></li>
<li><a href="Localization.html">Localization</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">How To's:</h3>
<ul>
<li><a href="HowTos.html#important-classes">Important classes</a></li>
<li><a href="HowTos.html#get-player">Getting a Player</a></li>
<li><a href="HowTos.html#get-input">Getting input</a></li>
<li><a href="HowTos.html#get-controller">Getting a Controller</a></li>
<li><a href="HowTos.html#connect-disconnect-events">Receiving Joystick connect and disconnect events</a></li>
<li><a href="HowTos.html#assigning-controllers">Assigning Controllers to Players</a></li>
<li><a href="HowTos.html#enabling-disabling-controller-maps">Enabling and disabling Controller Maps</a></li>
<li><a href="HowTos.html#managing-controller-maps-runtime">Managing Controller Maps at runtime</a></li>
<li><a href="HowTos.html#loading-controller-maps-runtime">Loading Controller Maps at runtime</a></li>
<li><a href="HowTos.html#get-element-name-for-action">Displaying a button/axis/key name to the user for an Action</a></li>
<li><a href="HowTos.html#display-glyph-for-action">Displaying a glyph for a Controller element mapped to an Action</a></li>
<li><a href="HowTos.html#display-glyph-for-active-elements">Displaying a glyph for the currently active Controller elements</a></li>
<li><a href="HowTos.html#get-mappings-for-joystick-not-attached">Getting Controller Maps for a Joystick not currently attached</a></li>
<li><a href="HowTos.html#get-contributing-input-sources">Getting contributing input sources for an Action</a></li>
<li><a href="HowTos.html#last-used-controller">Determining which Controller was last used</a></li>
<li><a href="HowTos.html#is-controller-gamepad">Determining if a Controller is a Gamepad</a></li>
<li><a href="HowTos.html#relative-absolute-axes">Handling Mouse and Joystick axes</a></li>
<li><a href="HowTos.html#calibrating-controller-axes">Calibrating Joystick axes</a></li>
<li><a href="HowTos.html#Vibration-Rumble">Vibration/Rumble</a></li>
<li><a href="HowTos.html#button-press-types">Handling buttons presses of various types</a></li>
<li><a href="HowTos.html#button-combos">Handling multi-button Actions</a></li>
<li><a href="HowTos.html#excluding-players-from-joystick-assignment">Excluding certain Players from Joystick auto-assignment</a></li>
<li><a href="HowTos.html#changing-configuration-settings-at-runtime">Changing configuration settings at runtime</a></li>
<li><a href="HowTos.html#simulating-input">Simulating Input</a></li>
<li><a href="HowTos.html#converting-scripts">Converting scripts from UnityEngine.Input to Rewired</a></li>
<li><a href="HowTos.html#exporting-constants">Exporting constants for use in scripting</a></li>
<li><a href="HowTos.html#actionid-property-drawer">Displaying a drop-down list of Actions in the inspector of a script</a></li>
<li><a href="HowTos.html#copying-input-config">Copying input configuration to another project</a></li>
<li><a href="HowTos.html#press-start-to-join">Implementing a &quot;Press Start to Join&quot; Joystick assignment system</a></li>
<li><a href="HowTos.html#saving-loading-controller-maps">Saving and loading Controller Maps</a></li>
<li><a href="HowTos.html#saving-loading-calibration-maps">Saving and loading Calibration Maps</a></li>
<li><a href="HowTos.html#modifying-input-behaviors-during-runtime">Modifying Input Behaviors during runtime</a></li>
<li><a href="HowTos.html#touch-controls">Creating on-screen touch controls</a></li>
<li><a href="HowTos.html#controller-mapping-screen">Creating a controller mapping screen</a></li>
<li><a href="HowTos.html#conflict-checking">Conflict Checking</a></li>
<li><a href="HowTos.html#new-controller-definitions">Creating new controller definitions</a></li>
<li><a href="HowTos.html#new-controller-templates">Creating new controller templates</a></li>
<li><a href="HowTos.html#add-controller-to-existing-controller-template">Adding a controller to an existing controller template</a></li>
<li><a href="HowTos.html#excluding-controller-definitions">Excluding controller definitions</a></li>
<li><a href="HowTos.html#identifying-recognized-controllers">Identifying recognized Joysticks</a></li>
<li><a href="HowTos.html#identifying-joysticks-windows-fallback-or-webplayer">Identifying controllers on Windows fallback or Windows Webplayer platforms</a></li>
<li><a href="HowTos.html#hide-input-settings-launcher">Hiding input settings on the Unity launcher</a></li>
<li><a href="HowTos.html#optimization">Optimizing performance</a></li>
<li><a href="HowTos.html#unity-ui">Using Rewired to control Unity's new UI</a></li>
<li><a href="HowTos.html#appletv-siri-remote">Using Apple Siri Remote on Apple TV</a></li>
<li><a href="HowTos.html#using-arcadeguns-g500">Using ArcadeGuns G-500 AimTrak Light Guns</a><a href="HowTos.html#configuring-arcadeguns-g500"></a></li>
<li><a href="HowTos.html#dualshock-4-special-features">Using Sony DualShock 4 special features</a></li>
<li><a href="HowTos.html#dualsense-special-features">Using Sony DualSense special features</a></li>
<li><a href="HowTos.html#nintendo-switch-controller-special-features">Using Nintendo Switch controller special features</a></li>
<li><a href="HowTos.html#raildriver-special-features">Using P.I. Engineering Rail Driver special features</a></li>
<li><a href="HowTos.html#xbox-one-controller-special-features">Using XBox One controller special features on XBox One platform</a></li>
<li><a href="HowTos.html#apple-game-controller-framework">Apple Game Controller Framework special features</a></li>
<li><a href="HowTos.html#raw-input-controller-extension">Additional Windows Raw Input controller information</a></li>
<li><a href="HowTos.html#direct-input-controller-extension">Additional Windows Direct Input controller information</a></li>
<li><a href="HowTos.html#xinput-controller-extension">Additional Windows XInput controller information</a></li>
<li><a href="HowTos.html#wgi-controller-extension">Additional Windows Windows Gaming Input controller information</a></li>
<li><a href="HowTos.html#uwp-controller-extension">Additional Universal Windows Platform (UWP) controller information</a></li>
<li><a href="HowTos.html#macos-controller-extension">Additional MacOS controller information</a></li>
<li><a href="HowTos.html#linux-controller-extension">Additional Linux controller information</a></li>
<li><a href="HowTos.html#enhanced-device-support-linux">Enhanced Device Support permissions on Linux</a></li>
<li><a href="HowTos.html#asmdef-files">Using asmdef files with Rewired</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">Help:</h3>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a><a href="SupportedControllers.html" title="Supported Controllers"></a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html">Special Platform Support</a>
<ul>
<li><a href="SpecialPlatformSupport.html#windows-uwp">Microsoft Windows 10 Universal</a></li>
<li><a href="SpecialPlatformSupport.html#xbox-one">Microsoft XBox One (XDK)</a></li>
<li><a href="SpecialPlatformSupport.html#xbox-game-core">Microsoft Xbox Game Core</a></li>
<li><a href="SpecialPlatformSupport.html#ps4">PlayStation<sup>&reg;</sup>4</a></li>
<li><a href="SpecialPlatformSupport.html#ps5">Playstation<sup>&reg;</sup>5</a></li>
<li><a href="SpecialPlatformSupport.html#nintendo-switch">Nintendo Switch</a></li>
<li><a href="SpecialPlatformSupport.html#stadia">Google Stadia</a></li>
<li><a href="SpecialPlatformSupport.html#steam">Steam</a></li>
</ul>
</li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a>
<ul>
<li><a href="Integration.html#BehaviorDesigner">Behavior Designer</a></li>
<li><a href="Integration.html#Bolt">Bolt</a></li>
<li><a href="Integration.html#Cinemachine2">Cinemachine 2</a></li>
<li><a href="Integration.html#Cinemachine3">Cinemachine 3</a></li>
<li><a href="Integration.html#CorgiEngine">Corgi Engine - 2D + 2.5D Platformer</a></li>
<li><a href="Integration.html#Deftly">Deftly: Top Down Shooter Framework</a></li>
<li><a href="Integration.html#DialogueSystem">Dialogue System for Unity</a></li>
<li><a href="Integration.html#FirstPersonController">First Person Controller</a></li>
<li><a href="Integration.html#GAC">GAC (Great Animation Combos) System</a></li>
<li><a href="Integration.html#HorseAnimsetPro">Horse Animset Pro</a></li>
<li><a href="Integration.html#InventoryPro">Inventory Pro</a></li>
<li><a href="Integration.html#iRDS">iRDS - Intelligent Race Driver System</a></li>
<li><a href="Integration.html#MotionController">Motion Controller</a></li>
<li><a href="Integration.html#ORKFramework">ORK Framework - RPG Engine</a></li>
<li><a href="Integration.html#PlatformerPro">Platformer Pro</a></li>
<li><a href="Integration.html#PlayMaker">PlayMaker</a></li>
<li><a href="Integration.html#QuestMachine">Quest Machine</a></li>
<li><a href="Integration.html#QuestSystemPro">Quest System Pro</a></li>
<li><a href="Integration.html#RacingGameStarterKit">Racing Game Starter Kit</a></li>
<li><a href="Integration.html#RealisticFPS">Realistic FPS Prefab</a></li>
<li><a href="Integration.html#RealisticTankController">Realistic Tank Controller</a></li>
<li><a href="Integration.html#RexEngine">Rex Engine: A 2D Platformer Engine</a></li>
<li><a href="Integration.html#Rucksack">Rucksack - Multiplayer Inventory System</a></li>
<li><a href="Integration.html#SciFiShipController">Sci-Fi Ship Controller</a></li>
<li><a href="Integration.html#SpaceCombatKit">Space Combat Kit</a></li>
<li><a href="Integration.html#UFPM">UFPM: Ultimate First Person Melee</a></li>
<li><a href="Integration.html#UFPS">UFPS 1.x</a></li>
<li><a href="Integration.html#UFPS2">UFPS: Ultimate First Person Shooter</a></li>
<li><a href="Integration.html#UFS">uFS - Flight Simulation Engine</a></li>
<li><a href="Integration.html#UltimateCharacterController">Ultimate Character Controller</a></li>
<li><a href="Integration.html#unity-ui">Unity UI</a></li>
<li><a href="Integration.html#UniversalFightingEngine">Universal Fighting Engine (UFE)</a></li>
<li><a href="Integration.html#UniversalFightingEngine2">Universal Fighting Engine 2 (UFE2)</a></li>
<li><a href="Integration.html#uSimAirModule">uSim Air Module</a></li>
<li><a href="Integration.html#UTPM">UTPM: Ultimate Third Person Melee</a></li>
<li><a href="Integration.html#UTPS">UTPS: Ultimate Third Person Shooter</a></li>
<li><a href="Integration.html#others">Others</a></li>
</ul>
</li>
<li><a href="Updating.html">Updating Rewired</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">FAQ:</h3>
<ul>
<li><a href="FAQ.html#does-rewired-support-vr-controllers">Does Rewired support Oculus Touch, HTC Vive, etc?</a></li>
<li><a href="FAQ.html#does-rewired-support-x-controller">Does Rewired support this controller?</a></li>
<li><a href="FAQ.html#addding-controller-definitions">Can you/I add support for this controller?</a></li>
<li><a href="FAQ.html#supported-platforms">What platforms does Rewired support?</a></li>
<li><a href="FAQ.html#wiiu-support">Does Rewired support WiiU?</a></li>
<li><a href="FAQ.html#switch-support">Does Rewired support Nintendo Switch?</a></li>
<li><a href="FAQ.html#webgl-support">Does Rewired support WebGL?</a></li>
<li><a href="FAQ.html#touch-gyro-accelerometer">Does Rewired support touch and gyro/accelerometer input?</a></li>
<li><a href="FAQ.html#force-feedback">Does Rewired support force feedback?</a></li>
<li><a href="FAQ.html#framerate-independent-input">Does Rewired support framerate-independent input?</a></li>
<li><a href="FAQ.html#fixed-update-framerate-independent-input">Can't Fixed Update be used for low-latency input at low frame rates?</a></li>
<li><a href="FAQ.html#multiple-mice-and-keyboards">Does Rewired support multiple independent mice and keyboards?</a></li>
<li><a href="FAQ.html#where-is-data-saved">Where is Rewired's input configuration data saved?</a></li>
<li><a href="FAQ.html#copy-input-config">How can I copy my input configuration to another project?</a></li>
<li><a href="FAQ.html#consume-input">How do you consume/use an input?</a></li>
<li><a href="FAQ.html#code-purist">I don't like using visual editors and like to code everything myself. Can I use Rewired without using the Rewired Editor?</a></li>
<li><a href="FAQ.html#edit-rewired-input-manager-data-scripting">Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor through scripting in the Unity Editor instead of using the Rewired Editor?</a></li>
<li><a href="FAQ.html#edit-rewired-input-manager-data-at-runtime">Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor at runtime?</a></li>
<li><a href="FAQ.html#default-dead-zone">My joystick's dead zone is too large/small. How do I change it?</a></li>
<li><a href="FAQ.html#gesture-bindings">How can I bind an Action to a button short-press and another Action to a long-press?</a></li>
<li><a href="FAQ.html#nintendo-wiiu-adapter-driver">Can the Nintendo WiiU 4-player adapter be used without requiring users to install a driver?</a></li>
<li><a href="FAQ.html#set-mouse-cursor-position">Can Rewired set the mouse cursor position?</a></li>
<li><a href="FAQ.html#source-code">Can I get the Rewired source code?</a></li>
<li><a href="FAQ.html#seat-license">What does &quot;this extension requires one licence per seat&quot; mean?</a></li>
<li><a href="FAQ.html#discounts">Do you offer educational or bulk license discounts?</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">Unity Help:</h3>
<ul>
<li><a href="https://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="https://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="https://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="background-color:#ddd">Links:</h3>
<ul>
<li><a href="https://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="https://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 5dc64ab558aed7f4c9893815fe96da4a
TextScriptImporter:
userData:

View File

@@ -1,282 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Examples</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Examples
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>All examples can be found in the Rewired/Examples folder. You should use these examples to learn how to work with the more advanced features of Rewired. More examples will be added in future updates.</p>
<ul>
<li><a href="#simple-control-remapping">Simple Control Remapping</a></li>
<li><a href="#simple-combined-keyboard-mouse-remapping">Simple Combined Keyboard Mouse Remapping</a></li>
<li><a href="#control-remapping-1">Control Remapping 1</a></li>
<li><a href="#custom-controllers-touch">Custom Controllers Touch</a></li>
<li><a href="#custom-controllers-tilt">Custom Controllers Tilt</a></li>
<li><a href="#custom-platform">Custom Platform</a></li>
<li><a href="#eight-players">Eight Players</a></li>
<li><a href="#fallback-joystick-identification">Fallback Joystick Identification</a></li>
<li><a href="#press-start-to-join">Press Start To Join</a></li>
<li><a href="#press-any-button-to-join">Press Any Button to Join</a></li>
<li><a href="#touch-controls-1">Touch Controls 1</a></li>
<li><a href="#touch-buttons-1">Touch Buttons 1</a></li>
<li><a href="#touch-joysticks-1">Touch Joysticks 1</a></li>
<li><a href="#gamepad-template-ui">Gamepad Template UI</a></li>
<li><a href="#player-mouse-sprite">Player Mouse Sprite</a></li>
<li><a href="#player-mouse-unity-ui">Player Mouse Unity UI</a></li>
<li><a href="#dualshock-4-special-features">DualShock 4 Special Features</a></li>
</ul>
<hr />
<h3><a name="simple-control-remapping" id="simple-control-remapping"></a>Simple Control Remapping</h3>
<p>(Included for Unity 5.0+)</p>
<p>NOTE: Rewired includes <a href="ControlMapper.html">Control Mapper</a>, a complete, configurable, responsive Unity UI-based control remapping system which can be used directly in your games. You can use it instead of writing your own remapping screen.</p>
<p>This is a very basic example of control remapping using the <a href="InputMapper.html">InputMapper</a> class. This example only supports 1 Player, 1 Joystick, 1 Controller Map, and 1 mapping per Action, per controller type. No UI windows are used and conflict checking is handled automatically by InputMapper to keep this example small and focused.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="simple-combined-keyboard-mouse-remapping" id="simple-combined-keyboard-mouse-remapping"></a>Simple Combined Keyboard Mouse Remapping</h3>
<p>(Included for Unity 5.0+)</p>
<p>NOTE: Rewired includes <a href="ControlMapper.html">Control Mapper</a>, a complete, configurable, responsive Unity UI-based control remapping system which can be used directly in your games. You can use it instead of writing your own remapping screen.</p>
<p>This is a very basic example of control remapping using the <a href="InputMapper.html">InputMapper</a> class to combine keyboard and mouse bindings into a single column. This is not how
Rewired is intended to work, but because some developers want to present it this way, this example has been provided.<br />
<br />
This example only supports 1 Player, 1 mapping per Action, and only supports keyboard and mouse input. This example is exclusively meant to illustrate how to use multiple Input Mappers to poll for input on multiple input devices simultaneously. It also illustrates how to handle replacement assignments across controller types and Controller Maps.<br />
<br />
No UI windows are used and conflict checking is handled automatically by InputMapper to keep this example small and focused.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="controller-remapping-1" id="dll-not-found-xinput"></a><a name="control-remapping-1" id="control-remapping-1"></a>Control Remapping 1</h3>
<p>NOTE: Rewired includes <a href="ControlMapper.html">Control Mapper</a>, a complete, configurable, responsive Unity UI-based control remapping system which can be used directly in your games. You can use it instead of writing your own remapping screen.</p>
<p>This example demonstrates how to create a controller remapping screen using legacy Unity's GUI system. The demo shows examples of:</p>
<ul>
<li>Assigning controllers to players</li>
<li>Mapping actions to controller, keyboard, and mouse elements</li>
<li>Conflict checking during element assignment</li>
<li>Using Map Categories and Action Categories to filter actions shown to user</li>
<li>Calibrating controller axes</li>
<li>Saving and loading controller maps, input behaviors, and calibration maps</li>
<li>Joystick identification for Unity input fallback platforms</li>
</ul>
<p>The example is not meant to be a finished, drop-in controller remapping screen. (If you're looking for that, use <a href="ControlMapper.html">Control Mapper</a>.) Many games may not need such a complex setup, and you'll very likely want to replace Unity's legacy GUI with nGUI, Unity's new UI, or another GUI system. You can use this example to learn how to implement each aspect and customize it for your game's needs.</p>
<p>For a simpler example, see <a href="#simple-control-remapping">Simple Control Remapping.</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="custom-controllers-touch" id="custom-controllers-touch"></a>Custom Controllers Touch</h3>
<p>Note: Rewired now includes Touch Controls which can be used directly in your game. See <a href="TouchControls.html">Touch Controls</a> for more information.</p>
<p>This example shows how to implement Custom Controllers, one possible use of which is on-screen touch controllers. The demo is not meant to be a drop-in touch controller. Use the sample code to learn how to work with Custom Controllers.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="custom-controllers-tilt" id="custom-controllers-tilt"></a>Custom Controllers Tilt</h3>
<p>Note: Rewired now includes a Tilt Control which can be used directly in your game. See <a href="ComponentControls.html#tilt-control">Component Controls - Tilt Control</a> for more information.</p>
<p>This example shows how to handle basic tilt control on a mobile device using a Custom Controller. </p>
<p>&nbsp;</p>
<hr />
<h3><a name="custom-platform" id="custom-platform"></a>Custom Platform</h3>
<p>(Included for Unity 5.0+)</p>
<p>This example shows how to add support for platforms that are not natively supported by Rewired. This is an advanced topic and requires expert knowledge in C#.</p>
<p><a href="CustomPlatforms.html">See the documentation on this topic.</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="eight-players" id="eight-players"></a>Eight Players</h3>
<p>This example shows how to create basic joystick controls for 8 players and how to get input.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="fallback-joystick-identification" id="fallback-joystick-identification"></a>Fallback Joystick Identification</h3>
<p>This example shows how you identify which joystick is which using Unity's input system as the input source on Windows. See <a href="HowTos.html#identifying-joysticks-windows-fallback-or-webplayer">Identifying joysticks on Windows fallback or Windows Webplayer platforms</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="press-start-to-join" id="press-start-to-join"></a>Press Start To Join</h3>
<p>This example shows one possible implementation of a &quot;Press Start to Join&quot; joystick assignment system. This is based on <a href="HowTos.html#press-start-to-join-method-1">the example shown here under Method 1</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="press-any-button-to-join" id="press-any-button-to-join"></a>Press Any Button To Join</h3>
<p>This example shows one possible implementation of a &quot;Press Any Button to Join&quot; joystick assignment system. This is based on <a href="HowTos.html#press-start-to-join-method-2">the example shown here under Method 2</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><img src="files/images/examples_touchcontrols1.png" alt="Touch Controls 1" class="right" /><a name="touch-controls-1" id="touch-controls-1"></a>Touch Controls 1</h3>
<p>This example shows a working touch controller setup including a Touch Joystick, Touch Button, Touch Pad, Touch Region, and a Tilt Control. See <a href="TouchControls.html">Touch Controls</a> for more information on touch controls and <a href="ComponentControls.html#tilt-control">Component Controls - Tilt Control</a> for more information on tilt control.</p>
<p>Example files are located in Rewired/Extras/TouchControls/Examples.</p>
<p>&nbsp;</p>
<hr class="clear" />
<h3><img src="files/images/examples_touchbuttons1.png" alt="Touch Buttons 1" class="right" /><a name="touch-buttons-1" id="touch-buttons-1"></a>Touch Buttons 1</h3>
<p>This example shows various configuration options of Touch Buttons. See <a href="TouchControls.html">Touch Controls</a> for more information on touch controls and <a href="ComponentControls.html#tilt-control">Component Controls - Tilt Control</a> for more information on tilt control.</p>
<p>Example files are located in Rewired/Extras/TouchControls/Examples.</p>
<hr class="clear" />
<h3><a name="touch-joysticks-1" id="touch-joysticks-1"></a>Touch Joysticks 1</h3>
<p>This example shows various Touch Joysticks. See <a href="TouchControls.html">Touch Controls</a> for more information on touch controls.</p>
<p>Example files are located in Rewired/Extras/TouchControls/Examples.</p>
<p>&nbsp;</p>
<hr class="clear" />
<h3><img src="files/images/examples_gamepadtemplateui.png" alt="Gamepad Template UI" class="right" /><a name="gamepad-template-ui" id="gamepad-template-ui"></a>Gamepad Template UI</h3>
<p>(Included for Unity 5.0+)</p>
<p>This example shows how determine which Controller Template elements correspond to mapped Actions in a Player, both those that are currently active and those that are mapped. These concepts can be used to display a Controller Template based mapping UI, display Controller Template element names / glyphs instead of Controller-specific element names / glyphs, etc. The same concepts can be used to display help UI using Controller Template elements instead of Controller-specific elements.</p>
<p>This example is NOT meant to be modified and used in your game. It is only intended to teach the API.</p>
<p>&nbsp;</p>
<hr class="clear" />
<h3><img src="files/images/examples_playermousesprite.png" alt="Gamepad Template UI" class="right" /><a name="player-mouse-sprite" id="player-mouse-sprite"></a>Player Mouse Sprite</h3>
<p>(Included for Unity 5.0+)</p>
<p>This example shows how to use a <a href="PlayerControllers.html#player-mouse">Player Mouse</a> through scripting to control as Sprite mouse pointer using any input device.</p>
<hr class="clear" />
<h3><img src="files/images/examples_playermouseunityui.png" alt="Gamepad Template UI" class="right" /><a name="player-mouse-unity-ui" id="player-mouse-unity-ui"></a>Player Mouse Unity UI</h3>
<p>(Included for Unity 5.0+)</p>
<p>This example shows how to use <a href="PlayerControllers.html#player-mouse">Player Mouse</a> components and the <a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a> to control 4 mouse pointers using any input device to interact with Unity UI.</p>
<hr class="clear" />
<h3><img src="files/images/examples_dualshock4specialfeatures.png" alt="Gamepad Template UI" class="right" /><a name="dualshock-4-special-features" id="dualshock-4-special-features"></a>DualShock 4 Special Features</h3>
<p>This example shows how to access the special features on the Dual Shock 4.</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 080fdab19492a05428f9ceba9784d3ea
TextScriptImporter:
userData:

View File

@@ -1,591 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Frequently Asked Questions</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Frequently Asked Questions<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p><strong>Topics:</strong></p>
<ul>
<li><a href="#does-rewired-support-vr-controllers">Does Rewired support Oculus Touch, HTC Vive, etc?</a></li>
<li><a href="#does-rewired-support-x-controller">Does Rewired support this controller?</a></li>
<li><a href="#addding-controller-definitions">Can you/I add support for this controller?</a></li>
<li><a href="#supported-platforms">What platforms does Rewired support?</a></li>
<li><a href="#wiiu-support">Does Rewired support WiiU?</a></li>
<li><a href="#switch-support">Does Rewired support Nintendo Switch?</a></li>
<li><a href="#webgl-support">Does Rewired support WebGL?</a></li>
<li><a href="#touch-gyro-accelerometer">Does Rewired support touch and gyro/accelerometer input?</a></li>
<li><a href="#force-feedback">Does Rewired support force feedback?</a></li>
<li><a href="#framerate-independent-input">Does Rewired support framerate-independent input?</a></li>
<li><a href="#fixed-update-framerate-independent-input">Can't Fixed Update be used for low-latency input at low frame rates?</a></li>
<li><a href="#multiple-mice-and-keyboards">Does Rewired support multiple independent mice and keyboards?</a></li>
<li><a href="#where-is-data-saved">Where is Rewired's input configuration data saved?</a></li>
<li><a href="#copy-input-config">How can I copy my input configuration to another project?</a></li>
<li><a href="#code-purist">I don't like using visual editors and like to code everything myself. Can I use Rewired without using the Rewired Editor?</a></li>
<li><a href="#edit-rewired-input-manager-data-scripting">Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor through scripting in the Unity Editor instead of using the Rewired Editor?</a></li>
<li><a href="#edit-rewired-input-manager-data-at-runtime">Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor at runtime?</a></li>
<li><a href="#consume-input">How do you consume/use an input?</a></li>
<li><a href="#default-dead-zone">My joystick's dead zone is too large/small. How do I change it?</a></li>
<li><a href="#gesture-bindings">How can I bind an Action to a button short-press and another Action to a long-press?</a></li>
<li><a href="#nintendo-wiiu-adapter-driver">Can the Nintendo WiiU 4-player adapter be used without requiring users to install a driver?</a></li>
<li><a href="#nintendo-wiiu-adapter-desktop">Does Rewired support the official Nintendo WiiU adapter on desktop platforms?</a></li>
<li><a href="#set-mouse-cursor-position">Can Rewired set the mouse cursor position?</a></li>
<li><a href="#source-code">Can I get the Rewired source code?</a></li>
<li><a href="#seat-license">What does &quot;this extension requires one licence per seat&quot; mean?</a></li>
<li><a href="#discounts">Do you offer educational or bulk license discounts?</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="does-rewired-support-vr-controllers" id="does-rewired-support-vr-controllers"></a>Does Rewired support Oculus Touch, HTC Vive, etc?
</h3>
<p>Rewired has limited support for Oculus Touch and HTC Vive controllers. Please see the following sections for more information:</p>
<ul>
<li><a href="SupportedControllers.html#oculus-touch">Oculus Touch</a></li>
<li><a href="SupportedControllers.html#openvr-controller">HTC Vive / OpenVR</a></li>
</ul>
<p>Also, see <a href="#does-rewired-support-x-controller">Does Rewired support this controller?</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="does-rewired-support-x-controller" id="does-rewired-support-x-controller"></a>Does Rewired support this controller?</h3>
<p>Usually, this question is asked about exotic controllers such as Arduino, Oculus Touch and Remote, HTC Vive, exotic VR controllers, or some other special-purpose controller that requires its own SDK to use. Rewired does not support such controllers directly. Any use of such controller would require you set up the company's SDK and use a <a href="CustomControllers.html">Custom Controller</a> to add support for the device. Even this may not work for all devices. (See <a href="#does-rewired-support-vr-controllers">this topic for information</a> on limited support for Oculus Touch and HTC Vive / OpenVR.)</p>
<p>Rewired is not a general-purpose, low-level API for working with any and all HID devices.</p>
<p>See <a href="SupportedControllers.html">Supported Controllers</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="addding-controller-definitions" id="does-rewired-support-x-controller3"></a>Can you/I add support for this controller?</h3>
<p>It depends. Not all controllers are candidates for Rewired's automatic controller recognition system. The controller would have to be evaulated for inclusion.</p>
<p>Rewired's controller recognition system relies on information returned by the controller in order to be able to recognize it and load a hardware definition. Many times, the identifying information provided by the device is inadequate or too generic to be relied upon for recognition, for example those that show up as &quot;Generic USB Joystick&quot;, &quot;USB Gamepad&quot;, etc. This is true of a huge number of generic PC gamepads. The manufacturers of these gamepads create dozens and dozens of different products under a large variety of brands, some even with different button layouts, yet all of these devices provide exactly the same identifying USB/HID information (both product name and VID/PID). This makes it impossible to auto-recognize these controllers. If you were to add a controller definition for just one of these controllers, all others that don't match the button layout exactly would report incorrect element names and default mappings in the best case, and would be essentially unusable in the worst case. For these controllers, the only solution is to not provide a controller definition so that they will be treated as <a href="ControllerMaps.html#unknown-controllers">Unknown Controller</a> which the user can map manually using <a href="ControlMapper.html">Control Mapper</a> or <a href="HowTos.html#controller-mapping-screen">your own custom control remapping system</a>.</p>
<p>The solution to allowing users to use these kinds of controllers and others without definitions is to give your players a way to remap their controls. It is a must that you have a system to let your player remap their controllers so they can use any controller they want. It is a core feature of Rewired to allow users to be able to use any controller regardless of whether or not it is recognized, including the ability to save and load their configurations. The controller recognition system is only really there as a convenience so that the most common controllers work without manual configuration out of the box, but it is not a substitute for being able to map controllers.</p>
<p>See <a href="HowTos.html#new-controller-definitions">How To's - Creating new controller definitions</a> for more information on adding your own controller definitions.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="supported-platforms" id="does-rewired-support-x-controller4"></a>What platforms does Rewired support?</h3>
<p><a href="Overview.html#tested-platforms">See the list of tested platforms here.</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="wiiu-support" id="default-dead-zone3"></a>Does Rewired support WiiU?</h3>
<p>WiiU is not a directly supported platform. In addition, WiiU controllers do not work through UnityEngine.Input so the default fallback mode doesn't work. However, it is possible to support WiiU through the use of <a href="CustomControllers.html">Custom Controllers</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="switch-support" id="switch-support"></a>Does Rewired support Nintendo Switch?</h3>
<p>Yes, but it requires installation of a separate plugin and is only available to licensed Nintendo developers. Please visit the <a href="https://developer.nintendo.com" target="_blank">Nintendo Developer Portal</a> for more information on how to obtain the plugin.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="webgl-support" id="default-dead-zone6"></a> Does Rewired support WebGL?</h3>
<p>Rewired does run on WebGL and includes a native library for WebGL (Unity 5.0+) allowing it to get input directly from the web browser avoid many issues with Unity's input system on WebGL. <a href="SupportedControllers.html#webgl">With the exception of a few of the most common gamepads</a>, most controllers on WebGL will not be recognized automatically are only supported via manual user mapping of controls at runtime through the use of a system like <a href="ControlMapper.html">Control Mapper</a>.</p>
<p>Even with a native input librarly, controller support on WebGL is problematic at best. Rewired does its best to make things work when possible, but there are many bugs and issues that vary by web browser, version of the browser, operating system, version of the operating system, and drivers in use which simply cannot be fixed by any layer above the web browser itself.</p>
<p>A few issues / limitations:</p>
<ul>
<li>Some controllers do not work properly or at all on some platforms in some web browsers.</li>
<li>Individual elements on certain controllers may not work properly or at all such as many D-Pads not working, buttons being stuck on permanently, etc.</li>
<li>There is a limit on the number of controllers simultaneously supported that varies depending on the browser in use.</li>
<li>As a security measure by the browser, controllers do not appear to the system until a button is pressed on a controller.</li>
<li>Vibration is not supported. (Support for gamepad vibration in browsers is at the very early experimental stages.)</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="touch-gyro-accelerometer" id="touch-gyro-accelerometer"></a>Does Rewired support touch and gyro/accelerometer control?</h3>
<p><strong>On-screen touch joysticks</strong><br />
Rewired comes with set of pre-built <a href="TouchControls.html">touch controls</a> for use directly in your games. For other special needs, you can use the <a href="CustomControllers.html">Custom Controller</a> system to pipe in data from any kind of control which you can either build or download from the <a href="https://www.assetstore.unity3d.com/en/" target="_blank">Unity Asset Store</a> or elsewhere. There is a simple <a href="https://guavaman.com/projects/rewired/docs/Examples.html#touch-controls-1">on-screen touch joystick example</a> included with Rewired showing the concept.</p>
<p><strong>Touch swipes and gestures</strong><br />
Rewired does not include any handling of swipe or gesture recognition. For gestures, if it makes sense to map them to input <a href="Actions.html">Actions</a>, you can use the <a href="CustomControllers.html">Custom Controller</a> system coupled with a gesture recognizer script/asset and pipe the gestures in as button values in a <a href="CustomControllers.html">Custom Controller</a> and then map those buttons to Actions.</p>
<p><strong>Gyro and accelerometer input</strong><br />
Rewired comes with a <a href="ComponentControls.html#tilt-control">Tilt Control</a> component which can be used for basic tilt input. It also supports <a href="HowTos.html#appletv-siri-remote">tilt and rotate on the Siri Remote on tvOS</a>, and the <a href="HowTos.html#dualshock-4-special-features">gyro on the Sony Dual Shock 4</a> and Nintendo Joy-Cons (Switch platform only). For any other tilt/motion needs, you can use UnityEngine.Input to get the motion data, process it, and then use that information to feed into a <a href="CustomControllers.html">Custom Controller</a> to map certain types of motion to Actions. Rewired also comes with a simple tilt control <a href="https://guavaman.com/projects/rewired/docs/Examples.html">example</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="force-feedback" id="default-dead-zone5"></a>Does Rewired support force feedback?</h3>
<p>The only forms of force feedback currently supported by Rewired are gamepad vibration and DualSense trigger haptics. Vibration works with certain controllers on certain platforms and input sources.</p>
<p>Currently vibration is only supported on the following controllers and platforms and input sources:</p>
<table width="100%" border="0" class="supported-controllers-table">
<tr>
<td>&nbsp;</td>
<td align="center"><strong>Windows</strong></td>
<td align="center"><strong>OSX</strong></td>
<td align="center"><strong>Linux</strong></td>
<td align="center"><strong>Windows 8.0 &amp; 8.1 Store</strong></td>
<td align="center"><strong>Windows 10 Universal</strong></td>
<td align="center"><strong>Xbox One</strong></td>
<td align="center"><strong>Xbox Series S/X</strong></td>
<td align="center"><strong>PlayStation 4</strong></td>
<td align="center"><strong>PlayStation 5</strong></td>
<td align="center"><strong>Nintendo Switch</strong></td>
<td align="center"><strong>Stadia</strong></td>
</tr>
<tr>
<td valign="top">Xbox 360 Controller</td>
<td align="center" valign="top"><ul>
<li>XInput</li>
<li> SDL2*</li>
</ul></td>
<td align="center" valign="top"><ul>
<li>Native<br />
</li>
<li>Game Controller Framework</li>
</ul> </td>
<td align="center" valign="top"><ul>
<li> Native</li>
<li>SDL2*</li>
</ul></td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Xbox One Controller</td>
<td align="center" valign="top"><ul>
<li>XInput<br />
<span class="note">(2 of 4 motors supported)</span></li>
<li>Windows Gaming Input<br />
<span class="note">(All motors supported)</span> </li>
<li> SDL2*</li>
</ul></td>
<td align="center" valign="top"><ul>
<li>Native<br />
<span class="note">(2 of 4 motors supported)<br />
</span></li>
<li>Game Controller Framework</li>
</ul> </td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">Native<br />
<span class="note">(2 of 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Xbox One S Controller</td>
<td align="center" valign="top"><ul>
<li>XInput<br />
<span class="note">(2 of 4 motors supported)</span></li>
<li>Windows Gaming Input<br />
<span class="note">(All motors supported)<br />
</span></li>
<li> SDL2*</li>
</ul></td>
<td align="center" valign="top">Game Controller Framework</td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">Native<br />
<span class="note">(2 of 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(All 4 motors supported)</span></td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Sony DualShock 4</td>
<td align="center" valign="top">Raw Input<br />
<span class="note">(<a href="RewiredEditor.html#settings-windows-enhanced-device-support">Enhanced Device Support</a> required)</span></td>
<td align="center" valign="top"><ul>
<li>Native<br />
<span class="note">(<a href="RewiredEditor.html#settings-osx-enhanced-device-support">Enhanced Device Support</a> required,)</span></li>
<li>Game Controller Framework</li>
</ul> </td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Sony DualSense</td>
<td align="center" valign="top">Raw Input<br />
<span class="note">(<a href="RewiredEditor.html#settings-windows-enhanced-device-support">Enhanced Device Support</a> required)</span></td>
<td align="center" valign="top"><ul>
<li>Native<br />
<span class="note">(<a href="RewiredEditor.html#settings-osx-enhanced-device-support">Enhanced Device Support</a> required)</span></li>
<li>Game Controller Framework</li>
</ul> </td>
<td align="center" valign="top">Native<br />
<span class="note">(<a href="RewiredEditor.html#settings-linux-enhanced-device-support">Enhanced Device Support</a> required for haptic triggers)</span></td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Nintendo Joy-Cons </td>
<td align="center" valign="top">Raw Input<br />
<span class="note">(<a href="RewiredEditor.html#settings-windows-enhanced-device-support">Enhanced Device Support</a> required)</span></td>
<td align="center" valign="top">Native<br />
<span class="note">(<a href="RewiredEditor.html#settings-windows-enhanced-device-support">Enhanced Device Support</a> required)</span></td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native<br />
<span class="note">(All motors and features supported)</span></td>
<td align="center" valign="top">&mdash;</td>
</tr>
<tr>
<td valign="top">Nintendo Pro Controller</td>
<td align="center" valign="top">Raw Input<br />
<span class="note">(<a href="RewiredEditor.html#settings-windows-enhanced-device-support">Enhanced Device Support</a> required)</span></td>
<td align="center" valign="top"><ul>
<li>Native<br />
<span class="note">(<a href="RewiredEditor.html#settings-osx-enhanced-device-support">Enhanced Device Support</a> required,)</span></li>
<li>Game Controller Framework<br />
<span class="note">(Wireless only.)</span></li>
</ul></td>
<td align="center" valign="top">Native</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native<br />
<span class="note">(All motors and features supported)</span></td>
<td align="center" valign="top">Native</td>
</tr>
<tr>
<td valign="top">Stadia Controller</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">&mdash;</td>
<td align="center" valign="top">Native</td>
</tr>
</table>
<p>&nbsp;</p>
<p>* SDL2 does not support separate motor speed values, so all motors are treated as a single motor.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="framerate-independent-input" id="framerate-independent-input"></a>Does Rewired support framerate-independent input?</h3>
<p>Not at the present time. If framerate-independent input were to be supported in the future, it would only allow you to access a queue of Action events that took place over the last frame for analysis and not the ability to instantly respond to input events that occur in the middle of the current frame. This is because if you were to use any of the Unity API in response to an event that was triggered from another thread, Unity would throw an exception or crash because the entire Unity API is not thread-safe and can only be accessed via the main thread. This means you could not, for example, move the camera instantaneously based on a mouse input event that occured in the middle of the current frame in order to reduce input latency. Unity would just throw an exception when you tried to modify anything on the Camera, Transform, or any other component from another thread.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="fixed-update-framerate-independent-input" id="fixed-update-framerate-independent-input"></a>Can't Fixed Update be used for low-latency input at low frame rates?</h3>
<p>It is sometimes suggested to me that if you were able to get and process fresh input values in Fixed Update, games running at low frame rates could maintain responsive input because Fixed Update runs at 60 fps even when the game is only running at 20 fps. This sounds reasonable on the surface, but it's not true. In order to understand why, you need to understand how Fixed Update works.</p>
<p><em><strong>Fixed Update is not a fixed-time-step update. It is a simulation of one.</strong></em></p>
<p>It is true that over 1 second, Fixed Update will attempt to run at the specified rate -- 60 fps, for example.<br />
Depending on the current main thread update rate, Unity will execute 0, 1, or multiple Fixed Update frames for every Update frame it executes. These Fixed Update frames are executed on the same thread as Update immediately before Update is executed. It varies the number of Fixed Update frames it executes per frame to try to maintain the desired rate over 1 second of time (60 fps).</p>
<p>The most important thing to understand is that these <em><strong>Fixed Update frames are not actually spaced out over time in increments of 1/60th of a second</strong></em>. When multiple Fixed Update frames are executed sequentially in a frame (when the render frame rate is lower than physics time step), several Fixed Update frames are rendered back-to-back <em><strong>as fast as the CPU will possibly allow</strong></em>. This can easily be illustrated by timing frame time delta of Fixed Update frames using Time.realtimeSinceStartup. You will see the value is an extremely tiny number, not the expected 0.1667 seconds you should see at 60 fps. Physics and other code that uses the time or delta time value work corretly because the Time class reports the <em><strong>simulated delta time</strong></em> of 0.1667 seconds, not the <strong><em>actual delta time</em></strong> of a CPU speed and workload dependent value. </p>
<p>So over the course of a single render frame, the time window for recording input changes using Fixed Update is equal to the <em><strong>actual time</strong></em> it takes for those Fixed Update frames to execute, not the simulated time. In most cases, the actual time elapsed across successive Fixed Update frames is so short as to be completely useless to get any useful input data. For the entire remainder of the render frame (Update, Vsync, etc.), no new input values can be sampled. This is the reason Fixed Update is totally unsuitable for solving the input latency problem.</p>
<p>&nbsp;</p>
<p><img src="files/images/faq-fixed-update-explanation.png" alt="Fixed Update Explanation" /></p>
<p>&nbsp;</p>
<hr />
<h3><a name="multiple-mice-and-keyboards" id="multiple-mice-and-keyboards"></a>Does Rewired support multiple independent mice and keyboards?</h3>
<p>Not at this time. Multiple mice will act as one mouse and multiple keyboards will act as one keyboard.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="where-is-data-saved" id="default-dead-zone2"></a>Where is Rewired's input configuration data saved?</h3>
<p>In each Rewired Input Manager game object as serialized data. See <a href="InputManager.html">Input Manager</a> for more details.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="copy-input-config" id="copy-input-config"></a>How can I copy my input configuration to another project?</h3>
<p><a href="HowTos.html#copying-input-config">See How To's - Copying input configuration to another project</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="consume-input" id="does-rewired-support-x-controller2"></a>How do you consume/use an input?</h3>
<p>There is no &quot;consume&quot; or &quot;use&quot; concept in Rewired. You cannot change or override
the final Action input values because they are set by the hardware events and then calculated
based on combined values of all input sources that contribute to that Action.<br />
<br />
This question is almost always asked due to the desire to use the input system as part of in-game player state/permission management. For example, you should not think of
Rewired's Player.GetButtonDown as a flag denoting &quot;game player is now firing&quot;. It
should be thought of as a signal of the user's intent entirely separate
from the game simulation. GetButtonDown(&quot;Fire&quot;) is equal to &quot;the user wants
to fire&quot;. Whether or not the game player is allowed to fire at that moment is a
game player state management issue and needs to be handled in your game
code.</p>
<p>&quot;User wants to fire&quot; -&gt; If &quot;game player is allowed to fire&quot; -&gt; then &quot;fire&quot;.</p>
<p>Using Rewired or any input system as an integral part of game state or permission management
is not a correct usage. This way there is no need for something like
consuming input and injecting your game state permission management into the input
system.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="code-purist" id="code-purist"></a>I don't like using visual editors and like to code everything myself. Can I use Rewired without using the Rewired Editor?</h3>
<p>Generally, no. The Rewired Editor is the heart of Rewired. The entire Player-Action system is dependent on data configured in the editor before runtime. If you want to use Rewired's Player-Action system (Controller Maps, etc.), you must configure the data using the Rewired Editor.</p>
<p>The only way you could use Rewired without using the Rewired Editor to configure data is if you completely ignore the entire Player-Action system and read input directly from the Controllers, largely defeating the purpose of using Rewired.</p>
<p>If you want to manage and configure every single thing in code instead of in an editor or you don't want to rely on Unity's serialization system for storing this data, you should use a different input system.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="edit-rewired-input-manager-data-scripting" id="edit-rewired-input-manager-data-scripting"></a>Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor through scripting in the Unity Editor instead of using the Rewired Editor?</h3>
<p>No. The Rewired Editor is the only supported way to configure the data stored in the Rewired Input Manager. The API for modifying this data through scripting is undocumented and partially internal. Rewired's data is intended to be configured using the Rewired Editor, not through scripting.</p>
<p>Do not mistake this for meaning you cannot change settings and bindings at runtime. The developer-defined data stored in the Rewired Input Manager is static at runtime and cannot be changed, but the live instances created from that static data can certainly be changed at runtime through scripting. (Live instances include Players, Controller Maps, Input Behaviors, Rules and Rule Sets, etc.)</p>
<p>&nbsp;</p>
<hr />
<h3><a name="edit-rewired-input-manager-data-at-runtime" id="edit-rewired-input-manager-data-at-runtime"></a>Can I create new Players, Actions, Controller Map definitions, Input Behaviors, and other data managed by the Rewired Editor at runtime?</h3>
<p>No. The majority of data stored in the Rewired Input Manager is totally static at runtime (everything except settings). Upon initialization, Rewired instantiates all objects in the system including Players, Actions, Input Behaviors, Controller Maps, Custom Controllers, Rules and Rule Sets, etc. based on what you've configured in the editor. The static data in the Rewired Input Manager cannot be changed at runtime. This means you cannot define new Actions, Players, Input Behaviors, etc. at runtime. However, the live instances of these objects (Players, Controller Maps, etc.) can be modified at runtime through scripting, and can even be saved to XML/JSON and reloaded at runtime. This means you can change controller bindings and various other properties at runtime and have those changes persist to the next game session.</p>
<p>You could think of the data stored in the Rewired Input Manager as the &quot;parent&quot; data (similar to the Prefab system in Unity) and the runtime Players, Controller Maps, etc., as instances of their parent. The parent cannot be changed at runtime, but the instances can. Parent data (Players, Actions, etc.) can only be created or modified at edit time in the Rewired Editor.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="default-dead-zone" id="default-dead-zone"></a>My joystick's dead zone is too large/small. How do I change it?</h3>
<p>Rewired includes default dead zones for every recognized joystick. They are
built into the hardware definition for each joystick and specified
per-platform, per-input source. These defaults should not be changed because they
will be overwritten when you update Rewired. There is not currently a means of non-destructively overriding default hardware definition settings per-device.<br />
<br />
Controller dead zones are very individualized to each physical joystick and
can vary due to manufacturing, wear and tear, etc. As such, you should not
simply set an extremely large default dead zone if your joystick drifts. Instead, you need to allow
your users to set their own dead zone specific to their joystick. Rewired
allows you set all kinds of calibration information for joysticks through
scripting. See <a href="HowTos.html#calibrating-controller-axes">How To's - Calibrating controller axes</a> for more information. You can see this implemented in both the <a href="Examples.html#controller-remapping-1">ControlRemappingDemo1</a> and <a href="ControlMapper.html">Control Mapper</a>.<br />
<br />
Using Control Mapper in your game will give users the option to remap and
calibrate their controllers.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="gesture-bindings" id="gesture-bindings"></a>How can I bind one Action to a button short-press and another Action to a long-press?</h3>
<p>That would require the ability to bind an Action to a gesture, a gesture being an event triggered when some element value changes over time matching some pre-defined pattern. Rewired does not support this at the present time.</p>
<p>There are dozens of potential gestures that one could possibly want to handle for every type of controller element (axes especially). Rewired does not provide any binding of Actions to gestures. Action bindings are only to controller elements. That Action can then be queried for axis value, button on, button off, button just pressed, button just released, button double clicked, button short pressed, and button long pressed events. The Action bindings are not bound to gestures but to the button/axis element, and the Action can then be queried for those events listed above.<br />
<br />
Allowing binding Actions to gestures such as &quot;short press X&quot;, &quot;press and hold X&quot;, etc. would <em>greatly</em> complicate user control rebinding. It would also complicate the Rewired editor requiring potentially dozens of options per supported gesture type (timings, activation exclusivity, cancellation behaviors, etc.) Because of the vast number of possible variables, these things are better handled in code based on the individual needs of the game in question.<br />
<br />
A gesture recognition and binding system would likely have to be an entirely separate layer on top of Rewired's current system. Gesture recognition and Action binding are not currently planned features.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="nintendo-wiiu-adapter-driver" id="nintendo-wiiu-adapter-driver"></a>Can the Nintendo WiiU 4-player adapter be used without requiring users to install a driver?</h3>
<p>It is not possible. The Nintendo WiiU adapter is not a standard HID device and cannot use the default Windows HID driver. This is an issue with the device because it was not designed for use on Windows / PCs. It cannot be used by any program without a 3rd party driver installed that can make it appear as a standard HID device. There is no way around this.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="nintendo-wiiu-adapter-desktop" id="nintendo-wiiu-adapter-desktop"></a>Does Rewired support the official Nintendo WiiU adapter on desktop platforms?</h3>
<p>Rewired <a href="SupportedControllers.html">does not provide extended support</a> for the Nintendo WiiU adapter.<br />
<br />
As it states there:
<br />
<em>Any controller which does not have a hardware definition will be usable only
through user mapping or by mapping actions to numbered axes and buttons in
the Unknown Controller map. These unrecognized controllers can only be
supported if you provide your users a way to remap their controls, such as
by using the included Control Mapper or by creating a custom control
remapping screen. If you do not provide users with a way to map their
controls, only the above listed recognized controllers will be usable. If
you do provide your users a way to map their controls, virtually any
controller will be usable.</em><br />
<br />
The Nintendo WiiU adapter does not have an official driver and cannot be
used without some form of hack or 3rd party driver.
<a href="#nintendo-wiiu-adapter-driver">This device cannot even be detected without a HID driver.</a> If you look at the Dolphin
Wiki, which is where most people use this adapter, you'll see <a href="https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin">several
methods to make it work in Dolphin</a>.<br />
<br />
All of these methods are hacks and none of them can provide any proper
identifying HID information which could be used to make a controller
definition for automatic recognition. There is no official or generally-used driver for this device that would identify it explicitly as a Nintendo WiiU Adapter, so it is not a candidate for
automatic controller recognition.<br />
<br />
If you've provided a way to remap and assign controls to your users, they
should be able to use the device through user assignment and mapping as long
as they've gone through all the steps to set up the driver to make it be <br />
recognized as a HID device.<br />
</p>
<p>&nbsp;</p>
<hr />
<h3><a name="set-mouse-cursor-position" id="set-mouse-cursor-position"></a>Can Rewired set the mouse cursor position?</h3>
<p>No. Rewired does not allow you to set the OS mouse cursor position on any platform.</p>
<p>You can use <a href="https://guavaman.com/projects/rewired/docs/PlayerControllers.html#player-mouse">Player Mouse</a> to move one or more sprite-based cursors with a joystick, keyboard, etc.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="source-code" id="default-dead-zone4"></a>Can I get the Rewired source code?</h3>
<p>There is no source code licensing option at this time. If having the source code is critical to your project, you should not purchase Rewired.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="seat-license" id="seat-license"></a>What does &quot;this extension requires one licence per seat&quot; mean?</h3>
<p>The EULA terms are defined by the <a href="https://unity3d.com/legal/as_terms">Unity Asset Store EULA</a>. See Appendix I for information on assets purchased through the Unity Asset Store. Specifically Appendix I, section 2.3 outlines terms for all editor extension assets.</p>
<p>Rewired is only sold on the Unity Asset Store and the license is bound by these terms as created and defined by Unity. I do not have legal authority to interpret these terms in any other way except as written and defined by the <a href="https://unity3d.com/legal/as_terms">Unity Asset Store EULA</a>. I cannot provide further clarification of or exceptions to these terms.</p>
<p>Please <a href="https://support.unity3d.com/hc/en-us/requests/new" target="_blank">contact Unity</a> for clarification of or questions about the EULA terms.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="discounts" id="discounts"></a>Do you offer educational or bulk license discounts?</h3>
<p>Rewired is sold only through the Unity Asset Store, therefore there are no other licensing options but what is available through the Unity Asset Store.</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,871 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Glyphs</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Glyphs
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>As of version 1.1.56.0, Rewired includes a glyph system that can be used to display glyphs for controller elements. Rewired comes with a default set of glyphs for some commonly-used controllers and components to display them in Unity UI. (Unity 5+)</p>
<p>The glyph system was written to be highly customizable. The included glyph sets use Unity's Sprite and Unity UI, but the system could be modified to use any data format or UI system (advanced developers only).</p>
<p><img src="files/images/glyphs-example-glyphs.png" width="300" height="219" alt="Some glyphs" /></p>
<h3><a name="contents" id="contents"></a>Contents</h3>
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#quick-setup">Quick Setup</a></li>
<li><a href="#namespace">Namespace</a></li>
<li><a href="#important-classes">Important Classes</a></li>
<li><a href="#glyph-provider">Glyph Provider</a></li>
<li><a href="#unity-ui-player-controller-element-glyph">Unity UI Player Controller Element Glyph</a></li>
<li><a href="#unity-ui-controller-element-glyph">Unity UI Controller Element Glyph</a></li>
<li><a href="#default-unity-ui-controller-element-glyph-settings">Default Unity UI Controller Element Glyph Settings</a></li>
<li><a href="#glyph-set">Glyph Set</a></li>
<li><a href="#glyph-set-collection">Glyph Set Collection</a></li>
<li><a href="#custom-glyph-types">Custom Glyph Types (Advanced)</a></li>
<li><a href="#unity-ui-text-mesh-pro-glyph-helper">Unity UI Text Mesh Pro Glyph Helper</a></li>
<li><a href="#accessing-glyphs-from-scripts">Accessing Glyphs from Scripts</a></li>
<li><a href="#key-format">Key Format</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="installation" id="installation"></a>Installation</h3>
<p>Install the Glyphs pack from the menu:</p>
<ul>
<li>Window -&gt; Rewired -&gt; Extras -&gt; Glyphs -&gt; Install</li>
</ul>
<p>Rewired will automatically install an additional addon pack if Text Mesh Pro is installed in the project. If you installed the glyphs pack before Text Mesh Pro was installed, you will be unable to use features that are dependent upon Text Mesh Pro. After installing Text Mesh Pro, install the glyphs pack again.</p>
<p><strong>Uninstalling</strong></p>
<p> Delete the Rewired/Extras/Glyphs folder.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="quick-setup" id="quick-setup"></a>Quick Setup</h3>
<p>Add the Glyph Provider component to the Rewired Input Manager (or a child object) by selecting the Game Object and from the menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Glyphs -&gt; Glyph Provider<br />
</li>
</ul>
<p>This will add the component and automatically assign the default glyph collection. </p>
<p><strong>Displaying Glyphs
</strong></p>
<p>To display a glyph, select a Canvas (or child of Canvas) and create a Unity UI Player Controller Element Glyph from the menu:</p>
<ul>
<li>GameObject -&gt; Create Other -&gt; Rewired -&gt; Glyphs -&gt; Unity UI -&gt; Unity UI Player Controller Element Glyph</li>
</ul>
<p>Set the required inspector options:</p>
<ul>
<li>Player Id: The id of the Player.</li>
<li>Action Name: The name of the Action.</li>
<li>Action Range: The range of the Action for which to show glyphs / text. This determines whether to show the glyph for an axis-type Action (ex: Move Horizontal), or the positive/negative pole of an Action (ex: Move Right). For button-type Actions, Full and Positive are equivalent.</li>
</ul>
<p><a href="#unity-ui-text-mesh-pro-glyph-helper">Or, see this to display glyphs inline in Text Mesh Pro text.</a></p>
<p>&nbsp;</p>
<hr />
<h3><a name="namespace" id="namespace"></a>Namespace</h3>
<p>All Glyph-related classes are in the Rewired.Glyphs namespace.</p>
<pre class="code">using Rewired.Glyphs;
// If using Unity UI classes
using Rewired.Glyphs.UnityUI;</pre>
<p>&nbsp;</p>
<hr />
<h3><a name="important-classes" id="important-classes"></a>Important Classes</h3>
<ul>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Properties_T_Rewired_ReInput_GlyphHelper.htm">ReInput.GlyphHelper</a> - Provides access to all glyph-related members. Access via ReInput.glyphs.</li>
</ul>
<p>&nbsp;</p>
<p></p>
<hr />
<h3><a name="glyph-provider" id="glyph-provider"></a>Glyph Provider</h3>
<p>The glyph provider is responsible for performing a string key lookup and returning a glyph. A glyph provider is required to use the glyph system.</p>
<p>Any class that implements Rewired.Interfaces.IGlyphProvider can be used as the glyph provider by assigning it to ReInput.glyphs.glyphProvider. The GlyphProvider component implements this interface and sets itself as the glyph provider in OnEnable. (The glyph provider should always null the ReInput.glyphs.glyphProvider property when no longer needed, usually in OnDisable.)</p>
<p>If you want to implement your own glyph provider, you can extend the GlyphProvider class, or create a new class that implements Rewired.Interfaces.IGlyphProvider.</p>
<p><strong> GlyphProvider</strong></p>
<p>The GlyphProvider component is the default implementation of a glyph provider.</p>
<p>Add the Glyph Provider component to the Rewired Input Manager (or a child object) by selecting the Game Object and from the menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Glyphs -&gt; Glyph Provider</li>
</ul>
<p><strong><a name="glyph-provider-inspector" id="glyph-provider-inspector"></a>Inspector</strong></p>
<p><img src="files/images/glyphs-glyph-provider-inspector.png" alt="Glyph Provider Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top"><strong><a name="glyph-provider-prefetch" id="glyph-provider-prefetch"></a></strong>Prefetch</td>
<td width="78%" valign="top"><p>Determines if glyphs should be fetched immediately in bulk when available. If false, glyphs will be fetched when queried.</p>
<p>By default, glyphs are fetched on an as-needed basis. That is, no key lookup is done until the glyph is first displayed. If you want all keys for connected devices to be loaded in bulk, set prefetch to true in the Glyph Provider inspector, or in code, ReInput.glyphs.prefetch = true. Controllers that are not presently connected cannot have their glyphs prefetched, but if prefetch is enabled, all glyphs for that controller will be fetched when it is connected.</p></td>
</tr>
<tr>
<td valign="top">Glyph Set Collections</td>
<td valign="top"><p>A list of glyph set collections. At least one collection must be assigned.<br />
</p></td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong><a name="caching" id="caching"></a>Caching</strong></p>
<p>Glyphs are cached when returned from the glyph provider. This prevents wasting CPU resources by constantly doing expensive string key lookups. The glyph cache can be cleared by calling ReInput.glyphs.Reload. The cache will also be cleared automatically after setting a new glyph provider.</p>
<p><strong><a name="glyph-provider-changing-glyphs-at-runtime" id="glyph-provider-changing-glyphs-at-runtime"></a>Changing Glyphs at Runtime</strong></p>
<p>You might want to create a different set of glyphs to display different characters for keys on for the specific language of keyboard in use, for example. You can create your own Glyph Set and swap out glyphs based on the current keyboard in use. (Note: Rewired does not provide any keyboard layout or locale information from the operating system on any platform. This would have to be implemented by the developer on a per-platform basis.)</p>
<p>You can either change out the entire Glyph Set Collection in the Glyph Provider, or you can change out one or more Glyph Sets assigned to a particular collection. When the collection list is replaced in Glyph Provider, it will automatically collect all the glyphs from all chained glyph collections and clear the glyph cache so glyphs can be reloaded. If you change an element in the collection list or one of the chained collections, you must call GlyphProvider.Reload to collect all the glyphs and clear the glyph cache.</p>
<p>You can also replace the Glyph Provider and all cached glyphs will be cleared automatically. Just set ReInput.glyphs.glyphProvider to your new provider.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="unity-ui-player-controller-element-glyph" id="unity-ui-player-controller-element-glyph"></a>Unity UI Player Controller Element Glyph</h3>
<p>This component is responsible for displaying the glyph(s) or text for a particular Action, Player, and Action Range. If a glyph is not available, text will be displayed instead.</p>
<p>Create a GameObject with the default values from the menu:</p>
<ul>
<li>GameObject -&gt; Create Other -&gt; Rewired -&gt; Glyphs -&gt; Unity UI -&gt; Unity UI Player Controller Element Glyph</li>
</ul>
<p><strong><a name="unity-ui-player-controller-element-glyph-inspector" id="unity-ui-player-controller-element-glyph-inspector"></a>Inspector</strong></p>
<p><img src="files/images/glyphs-unity-ui-player-controller-element-glyph-inspector.png" alt="Unity UI Player Controller Element Glyph Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Glyph or Text Prefab</td>
<td width="78%" valign="top">If set, when glyph/text objects are created, they will be instantiated from this prefab. If left blank, the global default prefab will be used.</td>
</tr>
<tr>
<td valign="top">Allowed Types</td>
<td valign="top"><p>Determines what types of objects are allowed.</p>
<ul>
<li> All - All types are allowed. Glyphs will be displayed, or text if no glyph is available.</li>
<li> Glyphs - Only glyphs will be displayed.</li>
<li> Text - Only text will be displayed.<br />
</li>
</ul></td>
</tr>
<tr>
<td valign="top">Options</td>
<td valign="top">Optional reference to an object that defines options. If blank, the global default options will be used.</td>
</tr>
<tr>
<td valign="top">Action Range</td>
<td valign="top">The range of the Action for which to show glyphs / text. This determines whether to show the glyph for an axis-type Action (ex: Move Horizontal), or the positive/negative pole of an Action (ex: Move Right). For button-type Actions, Full and Positive are equivalent.</td>
</tr>
<tr>
<td valign="top">Group 1</td>
<td valign="top">Optional parent Transform of the first group of instantiated glyph / text objects. If an axis-type Action is bound to multiple elements, the glyphs bound to the negative pole of the Action will be instantiated under this Transform. This allows you to separate negative and positive groups in order to stack glyph groups horizontally or vertically, for example. If an Action is only bound to one element, the glyph will be instantiated under this transform. If blank, objects will be created as children of this object's Transform.</td>
</tr>
<tr>
<td valign="top">Group 2</td>
<td valign="top">Optional parent Transform of the second group of instantiated glyph / text objects. If an axis-type Action is bound to multiple elements, the glyphs bound to the positive pole of the Action will be instantiated under this Transform. This allows you to separate negative and positive groups in order to stack glyph groups horizontally or vertically, for example. If an Action is only bound to one element, the glyph will be instantiated under group1 instead. If blank, objects will be created as children of either group1 if set or the object's Transform.</td>
</tr>
<tr>
<td valign="top">Player Id</td>
<td valign="top">The Player id.</td>
</tr>
<tr>
<td valign="top">Action Name</td>
<td valign="top">The Action name.</td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong><a name="controller-element-glyph-selector-options" id="controller-element-glyph-selector-options"></a>Options</strong></p>
<p>Various options can be set that determine which glyph will be selected. This includes choosing to use the last active controller or not and the priority order of different controller types. For example, you might choose to prioritze keyboard glyphs over mouse glyphs or vice versa. (In this class, the keyboard and mouse are treated as a single controller for the purposes of last active controller.)</p>
<p>If the options field is left blank, it will use the default options specified in ControllerElementGlyphSelectorOptions.defaultOptions. You can set this value or change the individual options values and all glyphs that use the default options will reflect these changes. (You can also set the default options in the inspector <a href="#default-unity-ui-controller-element-glyph-settings">using this convenience component</a>.) If the options field is set, the local options will be used.</p>
<p>You can create a selector options asset file and share the settings among different glyphs. The options field takes a reference to an object of type ControllerElementGlyphSelectorOptionsSOBase. You can create a ControllerElementGlyphSelectorOptionsSO from the menu:</p>
<ul>
<li>Assets -&gt; Create -&gt; Rewired -&gt; Glyphs -&gt; Controller Element Glyph Selector Options</li>
</ul>
<p><strong><a name="glyph-or-text-prefab" id="glyph-or-text-prefab"></a>Glyph or Text Prefab</strong></p>
<p>It is important to understand that an Action Element Map may be bound to a number of different controller elements. Also, the two poles of an Action (positive, negative) may be bound on separate Action Element Maps. This means, when querying for an Action Range of Full, it is possible that up to 8 glyphs will need to be displayed. (One set of 3 keyboard modifier keys and 1 primary key for up to the two poles of a split axis Action.) This class handles that, and will instantiate enough child objects as necessary from the specified prefab.</p>
<p>To create the individual glyph or text objects, a prefab is used to instantiate the child objects. By default, no prefab is set, so it will use the current default prefab. By default, it is created automatically by Rewired, but it can be overridden. If a glyph or text prefab is set locally, it will be used, otherwise it will fall back to the default.</p>
<p>The root GameObject of the prefab must include a component that inherits from GlyphOrTextBase.</p>
<p><strong><a name="default-glyph-or-text-prefab" id="default-glyph-or-text-prefab"></a>Default Glyph or Text Prefab</strong></p>
<p> The default Unity UI glyph or text prefab is specified in UnityUIControllerElementGlyphBase.defaultGlyphOrTextPrefab. You can set this to override the default prefab for all Unity UI glyphs at once by setting that value. (You can also set the default prefab in the inspector <a href="#default-unity-ui-controller-element-glyph-settings">using this convenience component</a>.) Existing glyph objects will be automatically rebuilt when changing this value. You should not modify the existing default prefab by changing values on it, but instead replace it with a new GameObject, otherwise existing glyphs will not be rebuilt because they detect changes to the prefab by comparing object references.</p>
<p><strong><a name="unity-ui-player-controller-element-glyph-child-object-layout" id="unity-ui-player-controller-element-glyph-child-object-layout"></a>Child Object Layout</strong></p>
<p>The default UnityUIPlayerControllerElementGlyph when created from Component -&gt; Rewired -&gt; Glyphs -&gt; Glyph Provider includes a HorizontalLayout component. In the case multiple glyphs are displayed, they will be aligned horizontally. If you want them to be laid out vertically, remove the HorizontalLayout component and replace it with a VerticalLayout component. Or, you can choose to use any type of layout available in Unity UI, but be aware you may need to replace the prefab used for the child objects to fully control layout.</p>
<p><strong><a name="unity-ui-player-controller-element-glyph-groups" id="unity-ui-player-controller-element-glyph-groups"></a>Groups</strong></p>
<p>By default, child objects will be created as children of the primary GameObject. However, for some layouts, you may want to group child objects. The group1 and group2 fields allow you specify Transforms which will be used as the parents for child objects. Most child objects will be displayed under group1, however, if you are querying for an Axis-type Action, Full Action Range, and it finds a separate binding for each pole of the axis, the glyphs/text for the negative pole will be displayed in group1 and the glyphs/text for the positive pole will be displayed in group2.</p>
<p>While this is probably a very rare scenario, the most likely use case for this would be in the case of keyboard bindings with modifier keys. For example, if you have bindings to two poles of an Action, Ctrl + A, Ctrl + S, you can stack these groups of horizontal elements vertically to save horizontal space. You would do this by placing a VerticalLayoutGroup component on the primary GameObject, then create two child GameObjects, Group1 and Group2, then on each Group, add a HorizontalLayoutGroup component.</p>
<p><strong><a name="unity-ui-player-controller-element-glyph-player-action-dropdowns" id="unity-ui-player-controller-element-glyph-player-action-dropdowns"></a>Player and Action Dropdowns in the Inspector</strong></p>
<p><img src="files/images/glyphs-player-action-dropdowns.png" alt="Player Action Dropdowns" /></p>
<p>It is recommended that you configure the Player Id and Action Id values using dropdowns in the inspector instead of using raw ints and strings for these values. This avoids possible error, and also makes it a lot easier if you want to change the name of an Action at a later date.</p>
<p>To do this, first you must <a href="HowTos.html#exporting-constants">export constants</a> for your Rewired Input Manager configuration.</p>
<p>Next, create a class that extends UnitUIPlayerControllerElementGlyphBase and add PlayerIdProperty and ActionIdProperty attributes, referencing the exported types. Replace the script reference of the UnityUIPlayerControllerElementGlyph with your new class. (Switch inspector to Debug mode by right clicking the Inspector tab, choosing Debug. The Script field can be replaced with your new script.)</p>
<pre class="code">
using Rewired;
using Rewired.Glyphs.UnityUI;
using UnityEngine;
namespace MyNamespace {
public class MyUnityUIPlayerControllerElementGlyph : UnityUIPlayerControllerElementGlyphBase {
[SerializeField]
[PlayerIdProperty(typeof(MyRewiredConsts.Player))]
private int _playerId;
[SerializeField]
[ActionIdProperty(typeof(MyRewiredConsts.Action))]
private int _actionId;
public override int playerId { get { return _playerId; } set { _playerId = value; } }
public override int actionId { get { return _actionId; } set { _actionId = value; } }
}
}</pre>
<p></p>
<p>&nbsp;</p>
<hr />
<h3><a name="unity-ui-controller-element-glyph" id="unity-ui-controller-element-glyph"></a>Unity UI Controller Element Glyph</h3>
<p>This component displays glyphs / text for a specific Action Element Map or Controller Element Identifier using Unity UI.</p>
<p>This component cannot be used alone. It requires a script to set either the actionElementMap property or the controllerElementIdentifier and axisRange properties. This is mainly useful if you need to display a glyph for a specific controller element, such as when showing a list of glyphs for controller elements in a controller or when showing glyphs for controller elements currently contributing to an Action value. If you want to display a glyph for a controller element bound to an Action for a Player, use <a href="#unity-ui-player-controller-element-glyph">Unity UI Player Controller Element Glyph</a> instead.</p>
<p>Add component from menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Glyphs -&gt; Unity UI -&gt; Unity UI Controller Element Glyph</li>
</ul>
<p>Inspector</p>
<p><img src="files/images/glyphs-unity-ui-controller-element-glyph-inspector.png" alt="Unity UI Controller Element Glyph Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Glyph or Text Prefab</td>
<td valign="top">If set, when glyph/text objects are created, they will be instantiated from this prefab. If left blank, the global default prefab will be used.</td>
</tr>
<tr>
<td valign="top">Allowed Types</td>
<td valign="top"><p>Determines what types of objects are allowed.</p>
<ul>
<li> All - All types are allowed. Glyphs will be displayed, or text if no glyph is available.</li>
<li> Glyphs - Only glyphs will be displayed.</li>
<li> Text - Only text will be displayed.<br />
</li>
</ul></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h3><a name="default-unity-ui-controller-element-glyph-settings" id="default-unity-ui-controller-element-glyph-settings"></a>Default Unity UI Controller Element Glyph Settings</h3>
<p>This is a convenience component that allows you to set default Unity UI glyph settings in the inspector. This allows you to change settings easily in one place and any glyph that doesn't set local options or prefab settings but instead falls back to default options will use these values.</p>
<p>Add component from menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Glyphs -&gt; Unity UI -&gt; Unity UI Default Controller Element Glyph Settings</li>
</ul>
<p><strong><a name="default-unity-ui-controller-element-glyph-settings-inspector" id="default-unity-ui-controller-element-glyph-settings-inspector"></a>Inspector</strong></p>
<p><img src="files/images/glyphs-default-unity-ui-controller-element-glyph-settings.png" width="463" height="202" alt="Default Unity UI Controller Element Glyph Settings" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Options</td>
<td width="78%" valign="top">The Controller element glyph options.</td>
</tr>
<tr>
<td valign="top">Use Last Active Controller</td>
<td valign="top">Determines if the Player's last active controller is used for glyph selection.</td>
</tr>
<tr>
<td valign="top">Controller Type Order</td>
<td valign="top"><p>List of controller type priority.
First in list corresponds to highest priority.</p>
<p>This determines which controller types take precedence when displaying glyphs. If use last active controller is enabled, the active controller will always take priority, however, if there is no last active controller, selection will fall back based on this priority.</p>
<p> In addition, keyboard and mouse are treated as a single controller for the purposes of glyph handling, so to prioritze keyboard over mouse or vice versa, the one that is lower in the list will take precedence.</p></td>
</tr>
<tr>
<td valign="top">Glyph or Text Prefab</td>
<td valign="top"><p>The prefab used for each glyph or text object.</p>
<p><a href="#glyph-or-text-prefab">See this for more information.</a></p></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h3><a name="glyph-set" id="glyph-set"></a>Glyph Set</h3>
<p>A glyph set represents a list of string-keyed glyphs. You can create your own glyphs, for example, if you want different styling, to create glyphs for a controller that doesn't have any default glyphs, to create glyphs for your Custom Controllers, etc.</p>
<p>The default implementation is SpriteGlyphSet. This uses UnityEngine.Sprite as the glyph type. It is possible to use your own custom glyph types. <a href="#custom-glyph-types">See this for more information</a>.</p>
<p><strong><a name="sprite-glyph-set" id="sprite-glyph-set"></a>SpriteGlyphSet</strong></p>
<p>A Sprite glyph set for a controller or controller template. The inspector contains various convenience tools for generating glyph sets from controller and controller template definitions and Custom Controllers.</p>
<p>To create a Sprite Glyph Set:</p>
<ul>
<li>Assets -&gt; Create -&gt; Rewired -&gt; Glyphs -&gt; Sprite Glyph Set</li>
</ul>
<p><strong><a name="sprite-glyph-set-inspector" id="sprite-glyph-set-inspector"></a>Inspector</strong></p>
<p><img src="files/images/glyphs-sprite-glyph-set-inspector.png" alt="Sprite Glyph Set Inspector" /><br/>
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Base Keys</td>
<td width="78%" valign="top">A list of base keys. Final keys will be composed of base key + glyph key. Setting multiple base keys allows one glyph set to apply to multiple controllers, for example.</td>
</tr>
<tr>
<td valign="top">Glyphs</td>
<td valign="top">The list of glyphs.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h3><a name="glyph-set-collection" id="glyph-set-collection"></a>Glyph Set Collection</h3>
<p>A glyph set collection represents a list of glyph sets. This can be used to organize glyph sets into categories to work with them more easily. Glyph Set Collections can be chained, allowing you to organize glyph sets under one top-level collection, making it easy to swap out the entire set of glyphs for a different set. Examples of this might include having different glyph styles for different consoles / platforms or for localization purposes.</p>
<p><strong><a></a>GlyphSetCollection</strong></p>
<p>To create a Glyph Set Collection:</p>
<ul>
<li>Assets -&gt; Create -&gt; Rewired -&gt; Glyphs -&gt; Glyph Set Collection</li>
</ul>
<p><strong><a name="glyph-set-collection-so-inspector" id="glyph-set-collection-so-inspector"></a>Inspector</strong></p>
<p><img src="files/images/glyph-set-collection-inspector.png" alt="Glyph Set Collection Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Sets</td>
<td width="78%" valign="top">The list of glyph sets.</td>
</tr>
<tr>
<td valign="top">Collections</td>
<td valign="top">The list of glyph set collections.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h3><a name="custom-glyph-types" id="custom-glyph-types"></a>Custom Glyph Types (Advanced)</h3>
<p>Glyphs are exposed by the API as System.Object. This allows you to use any object type you want as a glyph and still access it through the API. You are not limited to UnityEngine.Sprite.</p>
<p>The various glyph set and glyph set collection classes can be reimplemented from their base classes to support any glyph object type.</p>
<ul>
<li>Create a class that inherits from GlyphSet, the base class of SpriteGlyphSet, specifying the new type. Copy the code of SpriteGlyphSet to start. (The Sprite Glyph Set custom inspector will also need to be copied and re-implemented if you want those features.)</li>
<li>Create a class that inherits from GlyphOrTextBase&lt;TGlyphComponent, TGlyphGraphic, TTextComponent&gt;. Copy the code of UnityUIGlyphOrText to start. Create a new GlyphOrText prefab using the new class, then <a href="#default-glyph-or-text-prefab">set that prefab to the default UnityUI glyph or text prefab</a>.</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="unity-ui-text-mesh-pro-glyph-helper" id="unity-ui-text-mesh-pro-glyph-helper"></a>Unity UI Text Mesh Pro Glyph Helper</h3>
<p><img src="files/images/glyphs-unity-ui-text-mesh-pro-glyph-helper-example1.png" alt="Press A to Shoot" width="362" height="100" style="float: right; margin-left: 2em; padding-bottom: 2em;" />A helper class to display Rewired glyphs and display names inline in TMPro Text (Unity UI). Parses tags within text and replaces them with Sprites or text. Enter text in this component's text field, not in the TMPro Text field. Text entered here will be parsed, then the Text Mesh Pro Text component will be updated with the text, including Sprite tags.</p>
<p>To use it, create a Text Mesh Pro UGUI object, select the GameObject, and add the component from the menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Glyphs -&gt; Unity UI -&gt; Unity UI Text Mesh Pro Glyph Helper</li>
</ul>
<p>&nbsp;</p>
<p><strong>Inspector</strong></p>
<p><img src="files/images/glyphs-unity-ui-text-mesh-pro-glyph-helper-inspector.png" alt="Unity UI Text Mesh Pro Glyph Helper Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">Text</td>
<td valign="top">Enter text into this field and not in the TMPro Text field directly. Text will be parsed for special tags, and the final result will be passed on to the Text Mesh Pro Text component. <a href="#unity-ui-text-mesh-pro-glyph-helper-tags">See this for more information about tags.</a></td>
</tr>
<tr>
<td width="22%" valign="top">Options</td>
<td width="78%" valign="top">Optional reference to an object that defines options. If blank, the global default options will be used.</td>
</tr>
<tr>
<td valign="top">Sprite Options</td>
<td valign="top"><p>Options that control how Text Mesh Pro displays Sprites.</p>
<ul>
<li>Scale - Scale.</li>
<li>Offset Size Multiplier - This value will be multiplied by the Sprite width and height and applied to offset.</li>
<li>Extra Offset - An extra offset that is cumulative with Offset Size Multiplier.</li>
<li>X Advance Width Multiplier - This value will be multiplied by the Sprite width applied to X Advance.</li>
<li>Extra X Advance - An extra offset that is cumulative with X Advance Width Multiplier.</li>
</ul> </td>
</tr>
<tr>
<td valign="top">Base Sprite Material</td>
<td valign="top">Optional material for Sprites. If blank, the default material will be used. Material is instantiated for each Sprite Asset, so making changes to values in the base material later will not affect Sprites. Changing the base material at runtime will copy only certain properties from the new material to Sprite materials.</td>
</tr>
<tr>
<td valign="top"><p>Override Sprite Material Properties</p></td>
<td valign="top">If enabled, local values such as Sprite color will be used instead of the value on the base material.</td>
</tr>
<tr>
<td valign="top">Sprite Material Properties</td>
<td valign="top"><p>These properties will override the properties on the Sprite material if Override Sprite Material Properties is enabled.</p>
<ul>
<li>Color - Sprite material color.</li>
</ul></td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong><a name="unity-ui-text-mesh-pro-glyph-helper-tags" id="unity-ui-text-mesh-pro-glyph-helper-tags"></a>Tags:</strong></p>
<p>Text containing the below tags will be converted into glyphs / text for the specified parameters.</p>
<pre><strong>Display glyph / text for a controller element bound to an Action for a Player:</strong>
&lt;rewiredElement [attributes]&gt;
Attributes:
type="[glyphOrText|glyph|text]" (optional, default: glyphOrText)
playerId=[player_id] (id or name required)
playerName="[player_name]" (id or name required)
actionId=[action_id] (id or name required)
actionName="[action_name]" (id or name required)
actionRange="[full|positive|negative]" (optional, default: full)
Example:
&lt;rewiredElement playerId=5 actionName="MoveHorizontal" actionRange="full"&gt;
<strong>Display the name of an Action:</strong>
&lt;rewiredAction [attributes]&gt;
Attributes:
id=[action_id] (id or name required)
name=[action_name] (id or name required)
range="[full|positive|negative]" (optional, default: full)
Example:
&lt;rewiredAction name="MoveHorizontal" range="positive"&gt;
<strong>Display the name of a Player:</strong>
&lt;rewiredPlayer [attributes]&gt;
Attributes:
id=[action_id] (id or name required)
name=[action_name] (id or name required)
Example:
&lt;rewiredPlayer id=0&gt;
</pre>
<p>&nbsp;</p>
<hr />
<h3><a name="accessing-glyphs-from-scripts" id="accessing-glyphs-from-scripts"></a>Accessing Glyphs from Scripts</h3>
<p>The various glyph-related members are as follows:</p>
<ul>
<li>ControllerElementIdentifier.glyph</li>
<li>ControllerElementIdentifier.positiveGlyph</li>
<li>ControllerElementIdentifier.negativeGlyph</li>
<li>ControllerTemplateElementIdentifier.glyph</li>
<li>ControllerTemplateElementIdentifier.positiveGlyph</li>
<li>ControllerTemplateElementIdentifier.negativeGlyph</li>
<li>ActionElementMap.glyph</li>
<li>ActionElementMap.positiveGlyph</li>
<li>ActionElementMap.negativeGlyph</li>
<li>ActionElementMap.GetElementIdentifierGlyphs</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="key-format" id="key-format"></a>Key Format</h3>
<p>Glyph keys are strings that are formatted as a path.</p>
<p>All keys, with the exception of <a href="#keys-special-matching">special fallback keys</a>, can be exported from the <a href="RewiredEditor.html#Tools">Rewired Editor -&gt; Tools page</a>.</p>
<p>Note: The [brackets] below are not part of the key. Items in brackets represent a variable value.</p>
<p><strong><a name="key-format-controller-keys" id="key-format-controller-keys"></a>Controller-related keys</strong></p>
<p>For recognized controllers of all types:</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">controller/[controller_key]</td>
<td valign="top"><p>A specific controller.</p></td>
</tr>
<tr>
<td width="78%" valign="top">controller/[controller_key]/[element_key]</td>
<td width="22%" valign="top"><p>An element on a specific controller.</p></td>
</tr>
<tr>
<td valign="top">controller/keyboard</td>
<td valign="top">The keyboard.</td>
</tr>
<tr>
<td valign="top">controller/keyboard/[element_key]</td>
<td valign="top">A keyboard key.</td>
</tr>
<tr>
<td valign="top">controller/mouse</td>
<td valign="top">The mouse.</td>
</tr>
<tr>
<td valign="top">controller/mouse/[element_key]</td>
<td valign="top">A mouse element.</td>
</tr>
<tr>
<td valign="top">controller/custom/[controller_key]</td>
<td valign="top">A specific custom controller.</td>
</tr>
<tr>
<td valign="top">controller/custom/[controller_key]/[element_key]</td>
<td valign="top">An element on a specific custom controller.</td>
</tr>
<tr>
<td valign="top">controller/element/[element_key]</td>
<td valign="top">A generic controller element.</td>
</tr>
<tr>
<td valign="top">controller/template/[controller_template_key]</td>
<td valign="top">A specific controller template.</td>
</tr>
<tr>
<td valign="top">controller/template/[controller_template_key]/[element_key]</td>
<td valign="top">An element on a specific controller template.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>Example:<br />
The glyph key for an Xbox One controller is:<br />
controller/microsoft_xbox_one_controller</p>
<p>The glyph key for the left stick horizontal axis on an Xbox One controller is:<br />
controller/microsoft_xbox_one_controller/left_stick/horizontal</p>
<p><strong><a name="keys-unrecognized-controllers" id="keys-unrecognized-controllers"></a>Unrecognized Controllers</strong></p>
<p>On most platforms, unrecognized controllers will use the Unknown Controller definition and its keys. On specific platforms when using specific input sources, handling for unrecognized controllers of specific types may be handled differently. <a href="#keys-special-matching">See this</a>.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">controller/unknown_controller</td>
<td valign="top">Unknown Controller.</td>
</tr>
<tr>
<td valign="top">controller/unknown_controller/[element_key]</td>
<td valign="top">An element on an Unknown Controller.</td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong><a name="keys-fallback-matching" id="keys-fallback-matching"></a>Fallback Matching</strong></p>
<p>When controller element glyph key lookups are performed, if a matching glyph is not found, additional keys will be tried. Most-specific keys are tried first, falling back progressively to least-specific until a match is found or no there are no more fallback options.</p>
<p>Keys in the tables below are listed in order of precedence, with first in list being highest precedence. This list applies to recognized Joysticks.</p>
<p><br />
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">controller/[controller_key]/[input_source_hardware_info]/[element_key]</td>
<td valign="top"><p>Hardware Specific</p>
Rare special case for certain devices on some input sources / platforms. See below.</td>
</tr>
<tr>
<td width="78%" valign="top">controller/[controller_key]/[element_key]</td>
<td width="22%" valign="top"><p>Base Controller</p>
<p>This is the most common match type.</p></td>
</tr>
<tr>
<td valign="top">controller/[input_source_special_controller_key]/[element_key]</td>
<td valign="top"><p>Input Source Special Fallback</p>
<p>Only if controller on current input source has additional fallbacks.</p></td>
</tr>
<tr>
<td valign="top">controller/element/[element_key]</td>
<td valign="top">Element Only Fallback</td>
</tr>
<tr>
<td valign="top">controller/template/[element_key]</td>
<td valign="top"><p>Controller Template</p>
<p>Only if controller implements a Controller Template.</p></td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong><a name="keys-element-only-fallback" id="keys-element-only-fallback"></a>Element Only Fallback</strong></p>
<p>If no glyph is found for the specific controller, you can still match on element only. This allows you to define glyphs for generic controller elements without knowing anything about the controller they may appear on. For example, creating a glyph with the key controller/element/dpad/up will match to any controller element that has the key dpad/up. This isn't terribly useful for gamepads, because they will be handled by Controller Template fallback (see below), but for other controller types, this may prove useful. (Racing wheels, flight sticks, Custom Controllers, etc.)</p>
<p><strong><a name="keys-controller-template-fallback" id="keys-controller-template-fallback"></a>Controller Template Fallback</strong></p>
<p>You can see from the above list that, if a controller implements a Controller Template, if no matching keys are found for the specific device or the elements themselves, it will fallback to Controller Template keys for the controller elements. For example, this allows all recognized gamepads that implement the Gamepad Template to automatically display Gamepad Template glyphs. If controller-specific glyphs are available, they will take precedence over Template glyphs.</p>
<p><strong><a name="keys-special-matching" id="keys-special-matching"></a>Special Matching on Specific Input Source</strong>s</p>
<p>On specific platforms, when using specific input sources, for specific devices, additional key variants may be used. In some cases, these key variants are more specific and will be attempted before the primary key, in other cases the key variants are act as additional fallback options.</p>
<p>Keys in the tables below are listed in order of precedence, with first in list being highest precedence.</p>
<p><strong><a name="keys-special-matching-limitations" id="keys-special-matching-limitations"></a>IMPORTANT LIMITATIONS:</strong></p>
<p>Because the below special keys rely on information supplied by a connected controller, you cannot get glyphs or localized strings for these special keys when the controller is not connected. The ReInput.mapping.GetControllerMapInstance functions to see mappings for a non-connected controller cannot generate these special keys because they are dependent on data supplied by the hardware. To avoid issues, if you intend to display glyphs or element names for controllers that are not connected, do not localize names or make glyphs for these special special keys below.</p>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>Windows Gaming Input, unrecognized, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Xbox One Controller definition)</td>
</tr>
<tr>
<td colspan="2" valign="top">This list only applies to unrecognized controllers. For recognized devices, such as Dual Shock 4, the following does not apply.</td>
</tr>
<tr>
<td valign="top">controller/windows_gaming_input_gamepad/[vendor_id_hex:product_id_hex]</td>
<td valign="top">Specific hardware target<br />
Vendor / Product Id example:<br />
045e:0202 (lower case)</td>
</tr>
<tr>
<td valign="top">controller/windows_gaming_input_gamepad</td>
<td valign="top">Universal fallback gamepad</td>
</tr>
<tr>
<td valign="top">controller/microsoft_xbox_one_controller</td>
<td valign="top">Xbox One fallback</td>
</tr>
<tr>
<td colspan="2" valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Windows Gaming Input, Steam-Configured, unrecognized, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Steam Controller definition)</td>
</tr>
<tr>
<td colspan="2" valign="top">This list only applies to unrecognized controllers. For recognized devices, such as Dual Shock 4, the following does not apply.</td>
</tr>
<tr>
<td valign="top">controller/steam_controller/[vendor_id_hex:product_id_hex]</td>
<td valign="top"><p>Specific hardware target<br />
Vendor / Product Id example:<br />
045e:0202 (lower case)</p></td>
</tr>
<tr>
<td valign="top">controller/steam_controller</td>
<td valign="top">Steam Controller fallback</td>
</tr>
</table>
<p><br />
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>MacOS, Game Controller Framework, unrecognized, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Apple Mfi Gamepad definition)</td>
</tr>
<tr>
<td colspan="2" valign="top">This list only applies to unrecognized controllers. For recognized devices, such as Dual Shock 4, the following does not apply.</td>
</tr>
<tr>
<td valign="top">controller/apple_mfi_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target
<br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/apple_mfi_gamepad/[product_category]</td>
<td valign="top"><p>Product category target<br />
<a href="https://developer.apple.com/documentation/gamecontroller/gcdevice/product_category_constants/#3878747">Product Category is a constant returned by Game Controller Framework.</a> Valid values will not be documented here.</p>
<p>(matching case)<br />
</p></td>
</tr>
<tr>
<td valign="top">controller/apple_mfi_gamepad</td>
<td valign="top">Apple MFi fallback</td>
</tr>
</table>
<p><br />
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>iOS/tvOS, Unity Input, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Apple Mfi Gamepad definition)</td>
</tr>
<tr>
<td valign="top">controller/apple_mfi_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target <br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/apple_mfi_gamepad</td>
<td valign="top">Apple MFi fallback</td>
</tr>
</table>
<p><br />
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>Android, Unity Input, Standardized Gamepad (if Support Unknown Gamepads enabled):</strong></td>
<td valign="top">(Element keys from Standardized Gamepad definition)</td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target <br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad</td>
<td valign="top">Standardized Gamepad fallback</td>
</tr>
</table>
<p><br />
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>Linux, Unity Input, Pre-Configured Gamepad:</strong></td>
<td valign="top">(Element keys from Unity Preconfigured Controller definition)</td>
</tr>
<tr>
<td valign="top">controller/unity_linux_preconfigured_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target <br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/unity_linux_preconfigured_gamepad</td>
<td valign="top">Unity Pre-Configured Gamepad fallback</td>
</tr>
</table>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>WebGL, Native, unknown, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Standardized Gamepad definition)</td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad/[vendor_id_hex:product_id_hex]</td>
<td valign="top">Specific hardware target<br />
Vendor / Product Id example:<br />
045e:0202 (lower case)</td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target <br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad</td>
<td valign="top">Standardized Gamepad fallback</td>
</tr>
</table>
<p>&nbsp;</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><strong>SDL2, unknown, Gamepad profile:</strong></td>
<td valign="top">(Element keys from Standardized Gamepad definition)</td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad/[vendor_id_hex:product_id_hex]</td>
<td valign="top">Specific hardware target<br />
Vendor / Product Id example:<br />
045e:0202 (lower case)</td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad/[product_name]</td>
<td valign="top"><p>Specific hardware target <br />
Product name example:<br />
DUALSHOCK 4 Wireless Controller (matching case)</p></td>
</tr>
<tr>
<td valign="top">controller/standardized_gamepad</td>
<td valign="top">Standardized Gamepad fallback</td>
</tr>
</table>
<p><br />
</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Actions"><span class="button-img"></span>Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 387293f4ed304cf4ab462f2bc3a60c50
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 1cad436de1f6ba24a8975d3c20646ff6
TextScriptImporter:
userData:

View File

@@ -1,192 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Input Behaviors</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Input Behaviors
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>An Input Behavior is a modifier that affects certain properties of an <a href="Actions.html">Action</a> or changes its final value in a variety of ways. For example, Input Behaviors allow you to set options for digital axis simulation (sensitivity, gravity, etc.), how to handle mouse axes, apply controller-type specific sensitivity, set button double press speed, set button dead zone, and much more. Each <a href="Actions.html">Action</a> is always assigned a single Input Behavior. If you have many Actions that need to behave in the same manner, you don't have to duplicate the information -- just assign the same Input Behavior to each Action.</p>
<p><strong><a name="creating" id="digital-axis-settings4"></a>Creating/Editing Input Behaviors</strong></p>
<p>You create and edit Input Behaviors in the <a href="RewiredEditor.html">Rewired Editor</a>. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong><a name="runtime-modifiable" id="digital-axis-settings3"></a>Per-Player, Run-Time Modifiable</strong></p>
<p>At runtime, Input Behaviors are duplicated for each <a href="Players.html">Player</a>. This allows you to modify Input Behaviors during runtime if necessary for each Player individually. Additionally, Input Behaviors can be saved to XML and re-loaded. See <a href="HowTos.html#modifying-input-behaviors-during-runtime">Modifying Input Behaviors during runtime</a> for more information.</p>
<p><strong><a name="joystick-axis-settings" id="digital-axis-settings2"></a>Joystick Axis Sensitivity</strong></p>
<p>This allows you to change joystick axis sensitivity for a particular Action or Actions. This can be used to change look sensitivity for example across all joysticks that are assigned to a player. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong><a name="digital-axis-settings" id="digital-axis-settings"></a>Digital Axis Settings</strong></p>
<p>These settings allow buttons and keyboard keys to be treated like axes and return values ranging from -1 to 1 instead of just True and False as is the usual case. This allows you, for instance, to have smooth character movement when using the keyboard for movement controls. The GetAxis value of the Action can be smoothed over time based on the Digital Axis Settings (gravity and sensitivity). See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information about each setting.</p>
<p><strong><a name="mouse-axis-settings" id="button-double-press-speed4"></a>Mouse Axis Settings</strong></p>
<p>Input Behaviors support various mouse axis modes. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong><a name="custom-controller-axis-settings" id="button-double-press-speed3"></a>Custom Controller Axis Sensitivity</strong></p>
<p>This allows you to change Custom Controller axis sensitivity for a particular Action or Actions. This can be used to change look sensitivity for example across all Custom Controllers that are assigned to a player. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong><a name="button-dead-zone" id="button-dead-zone2"></a>Button Dead Zone</strong></p>
<p>This is useful if you map axes as buttons. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong><a name="button-double-press-speed" id="button-double-press-speed"></a>Button Double Press Speed</strong></p>
<p>If you need to detect a double press, set the double press speed and call <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_GetButtonDoublePressDown.htm">player.GetButtonDoublePressDown</a> or <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_GetButtonDoublePressHold.htm">player.GetButtonDoublePressHold</a>.</p>
<p><strong><a name="button-short-long-press-time" id="button-double-press-speed5"></a>Button Short and Long Press</strong></p>
<p>If you need to detect a short or a long press, set the required time and an optional expiration for these events and call one of the <a href="HowTos.html#button-press-types">Short or Long Press methods listed here</a>.</p>
<p><strong><a name="button-repeating" id="button-repeating"></a>Button Repeating</strong></p>
<p>If you need to detect a button press that repeats on a regular interval, set the repeat rate and optional delay for these events and call one of the the <a href="HowTos.html#button-press-types">button repeating method listed here</a>.</p>
<p><strong><a name="button-down-buffer" id="button-double-press-speed2"></a>Button Down Buffer</strong></p>
<p>This makes <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_GetButtonDown.htm">player.GetButtonDown</a> return TRUE for extra time beyond a single frame. See <a href="RewiredEditor.html#InputBehaviors">Rewired Editor - Input Behaviors</a> for more information.</p>
<p><strong>See Also</strong></p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_InputBehavior.htm">API Reference - Input Behavior</a></p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Actions.html" title="Actions"><span class="button-img"></span>Actions</a>
<a class="forward-button" href="Controllers.html" title="Controller Maps"><span class="button-img"></span>Controllers</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 7d880e4f58309e946bfeebf228faadd3
TextScriptImporter:
userData:

View File

@@ -1,245 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Input Manager</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Input Manager
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>The Input Manager is responsible for storing all the input configuration data and making it accessible during runtime. You must always have one Input Manager in the scene or Rewired input will be unavailable.</p>
<p><strong>IMPORTANT:</strong></p>
<ul>
<li>You may have one and only one Input Manager in the scene.</li>
<li>Do not disable or enable the Input Manager during runtime.</li>
</ul>
<p><strong>Creating an Input Manager</strong></p>
<p>Create an Input Manager in the scene from the menu:
Window -&gt; Rewired -&gt; Create -&gt; Input Manager</p>
<ul>
<li>Input Manager (prefab) - Will create the Rewired Input Manager as a prefab asset in the project. This is the recommended option to use. (* Do not save the prefab anywhere within the Rewired folder. This will avoid data loss issues should you need to delete and re-install Rewired. *)</li>
<li>Input Manager (in scene) - Will create the Rewired Input Manager in the current scene. (Not recommended.)</li>
</ul>
<p><em><strong>It is highly recommended that you create an Input Manager prefab and use Rewired Initializer to instantiate. <a href="#rewired-initializer">See this for more information</a>.</strong></em></p>
<p><strong>Editing Input</strong></p>
<p>The <a href="RewiredEditor.html">Rewired Editor</a> allows you to create and edit input. Launch the Rewired Editor by clicking on the Rewired Input Manager in the scene hierarchy and clicking the &quot;Launch Rewired Editor&quot; button in the inspector. This will allow you to edit the input configuration data stored in the selected Rewired Input Manager.</p>
<p><strong>Settings</strong></p>
<p>Configure settings in <a href="RewiredEditor.html#Settings">Rewired Editor - Settings</a>.</p>
<p><strong><a name="how-data-is-stored" id="how-data-is-stored"></a>How Data is Stored</strong></p>
<p>Unlike most input systems, Rewired does not store its input configuration data (maps, Actions, etc.) in a single location for the entire project. Instead, the data is stored in the current Rewired Input Manager game object. This means that you can have entirely different input setups for different scenes in your project if you like because each Rewired Input Manager is completely separate. It also means that input data is not globally available, especially in editor scripts or when Rewired has not been initialized.</p>
<p>At runtime, the current input configuration is loaded from the active Rewired Input Manager in the scene. To change to a completely different input configuration, you can disable one Rewired Input Manager and enable another in the editor. (Make sure you only have one active any any time or all others will be disabled.) The Rewired Input Manager can also be made into a prefab and instances placed into each scene for a shared configuration.</p>
<p><strong>OnDestroy</strong></p>
<p>When the active Rewired Input Manager is destroyed, it will completely reset Rewired, thereby invalidating Player, Controller, etc. object references, losing controller assignments, etc. Any references to these objects you have in scripts will no longer be valid. You must be aware of this if destroying the Rewired Input Manager, particularly on level loading if &quot;Don't Destroy on Load&quot; is not checked.</p>
<p><strong>Note: </strong>This also affects runtime recompiling of scripts in the editor. When scripts are recompiled at runtime, Rewired is reset. Cached references to Rewired objects become invalid at this point, so your scripts may begin to throw null reference exceptions if this is not accounted for. <a href="Troubleshooting.html#null-reference-during-recompile">See this link for more information</a> if runtime script recompiling is part of your workflow.</p>
<p><strong><a name="inspector" id="inspector"></a>Input Manager Inspector</strong></p>
<p><img src="files/images/inputmanager_inspector.png" alt="Input Manager Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="21%" valign="top">Don't Destroy On Load</td>
<td width="79%" valign="top">When this is checked, the Input Manager will not be destroyed when a new scene is loaded.</td>
</tr>
<tr>
<td valign="top">Data Files</td>
<td valign="top">An object reference to the ControllerDataFiles object. This object contains a list of all supported joysticks and templates and is required for Rewired to function correctly. If you want to customize your own list of supported controllers, you can link this to a separate copy of ControllerDataFiles that you have modified. (See <a href="HowTos.html#new-controller-definitions">Creating Controller Definitions</a> for more information.)</td>
</tr>
<tr>
<td valign="top">Run in Edit Mode</td>
<td valign="top"><p>Makes Rewired run in the editor outside of Play mode.</p>
<p><a href="#run-in-edit-mode">See this for important information on running in Edit mode.</a></p></td>
</tr>
<tr>
<td valign="top">Debug Information</td>
<td valign="top">Shows a wealth of useful information during runtime on Players, Controllers, Controller Maps, etc. Allows you to visualize most runtime objects in the system.</td>
</tr>
</table>
<p>&nbsp;</p>
<p><strong>Using the Rewired Input Manager in your game</strong></p>
<p>For finished game builds, the Rewired Input Manager (or a Rewired Initializer) should exist in your initial game scene. Make sure &quot;Don't Destroy On Load&quot; is checked so Rewired will persist throughout the entire game session. </p>
<p><strong>Testing Individual Scenes</strong></p>
<h5><strong><a name="rewired-initializer" id="rewired-initializer"></a>Rewired Initializer</strong></h5>
<p>It is recommended you create a Rewired Initializer in each of your scenes. The Initializer will spawn the Rewired Input Manager as needed on Awake, but will not spawn multiple Rewired Input Managers when loading new scenes avoiding errors. This will allow you to use the same Rewired Input Manager in each scene and be able to test these scenes individually in the editor or load them during gameplay.</p>
<p>Create a Rewired Initializer from the menu: Window -&gt; Rewired -&gt; Create -&gt; Initializer</p>
<p>After the Rewired Initializer is created, you will need set up a link to a Rewired Input Manager prefab in the inspector.</p>
<h5>Alternate method</h5>
<p>You can create a prefab (see note below) out of your Rewired Input Manager and place an instance of it in all your scenes, leaving &quot;Don't Destroy on Load&quot; checked. When a new scene is loaded, the additional Rewired Input Manager in the loaded scene will destroy itself automatically leaving the original intact and continuing to handle input without causing any errors.</p>
<p>This method is not recommended however because it is prone to user error. The Rewired Input Manager instance in each scene can be edited directly causing there to be differences in configuration between different instances of the prefab across scenes. This is a frequent cause of support requests, and it is recommended to use the Rewired Initializer method instead to avoid any potential mistakes.</p>
<p><strong>Important Note:</strong> If you make a prefab out of the Rewired Input Manager, always open the Rewired Editor on the prefab, not the one in the scene or your changes will be applied to the scene instance. If you do accidentally make changes to the instance in the scene, you can apply the changes to the prefab and everything will be in sync. </p>
<h3><a name="run-in-edit-mode" id="run-in-edit-mode"></a>Run in Edit Mode</h3>
<p>Makes Rewired run in the editor outside of Play mode. This can be used to process input in the Unity editor when not in Play mode for a variety of purposes.</p>
<p>Press the &quot;Run in Edit Mode&quot; button in the Rewired Input Manager inspector to start Rewired in Edit mode. Note that this button acts as a toggle, so if you leave it enabled, every time you open the scene or exit Play mode, Rewired will immediately start running in Edit mode.</p>
<p><strong>Important information:</strong></p>
<ul>
<li>Switching between Play and Edit mode will reset Rewired. The state of objects is not maintained between modes. For example, Joystick assignments or other runtime changes you make to any Rewired objects do not persist.</li>
<li>You cannot edit the Rewired Input Manager configuration while Rewired is running in Edit mode.</li>
<li>Not all editor platforms and input sources support running in Edit mode fully or at all. Some types of input devices may not work on some editor platforms and/or when using certain input sources for input.</li>
<li>If you need input to function while a Scene View has focus, enable the option <a href="settings-editor-settings-allow-input-in-editor-scene-views">Allow Input in Editor Scene Views.</a></li>
<li>Rewired does not update in the standard Unity Update, FixedUpdate, OnGUI loops in Edit mode because Unity does not execute these loops every frame when outside Play mode. Because of this, Rewired only runs in a special Editor update loop when in Edit mode. This has some important side effects:
<ul>
<li>Unity's Time class cannot be used when processing input. For example, if you need to multiply a value by Time.deltaTime, it will always return 0. Instead, you must use <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_ReInput_TimeHelper_unscaledDeltaTime.htm">ReInput.time.unscaledDeltaTime</a>.</li>
<li>When writing scripts, it's recommended you use the <a href="HowTos.html#get-input-player-eventsa">input events method</a> to get input as opposed to polling in Update because the Update loop will not be executed every frame by Unity.</li>
<li>Rewired will never run in FixedUpdate in Edit mode. If using input events, only subscribe to events in the Update loop.</li>
<li>If you want to poll for input, do so from the <a href="https://docs.unity3d.com/ScriptReference/EditorApplication-update.html">EditorApplication.update</a> callback.</li>
</ul>
</li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Mouse_screenPosition.htm">Mouse.screenPosition</a> and related properties do not work in Edit mode.</li>
<li>To start running in Edit mode from an editor script, set the InputManager.runInEditMode property to true.</li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
<a class="forward-button" href="Players.html" title="Players"><span class="button-img"></span>Players</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 83d698bda717f2c4f8cff48b1c6bf195
TextScriptImporter:
userData:

View File

@@ -1,281 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Input Mapper</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Input Mapper
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Input Mapper is a class that greatly simplifies the process of remapping controls. It handles listening for controller input, conflict checking, and creating Action-element assignments in a Controller Map.</p>
<p>Please see <a href="HowTos.html#controller-mapping-screen">How To's - Creating a Control Mapping Screen</a> before creating a control remapping system using Input Mapper.</p>
<p><strong>Usage</strong></p>
<p>The basic process is as follows:</p>
<ol>
<li><a href="#create">Create an Input Mapper.</a></li>
<li><a href="#options">Configure Options.</a></li>
<li><a href="#events">Subscribe to events.</a></li>
<li><a href="#context">Create a mapping Context.</a></li>
<li><a href="#listen">Start listening for input.</a></li>
<li><a href="#conflicts">Handle assignment conflicts (optional).</a></li>
<li><a href="#advanced">Advanced operations (optional).</a></li>
</ol>
<p>For additional issues, see the <a href="#faq">FAQ</a>.</p>
<p><strong><a name="create" id="create"></a>1. Create an Input Mapper</strong></p>
<p>You can either create a new instance of an Input Mapper or use the Default instance as shown below:</p>
<pre class="code"><span class="comment">// Create a new instance</span>
InputMapper inputMapper = new InputMapper();
inputMapper.Start(context);
<span class="comment">// Or you can use the Default instance instead if you only need one Input Mapper</span>
InputMapper.Default.Start(context);</pre>
<p><strong><a name="options" id="options"></a>2. Configure Options</strong></p>
<p>Each Input Mapper has an <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_InputMapper_Options.htm">Options</a> object which allows you to configure various settings to fit your needs. These settings should be configured before starting the Input Mapper. <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_InputMapper_Options.htm">Each available option is described in the class documentation.</a></p>
<pre class="code">inputMapper.options.timeout = 5f; <span class="comment">// set the timeout to 5 seconds</span>
inputMapper.options.ignoreMouseXAxis = true; <span class="comment">// ignore the mouse X axis when polling for input</span>
inputMapper.options.ignoreMouseYAxis = true; <span class="comment">// ignore the mouse Y axis when polling for input</span><br /></pre>
<p><strong><a name="events" id="events"></a>3. Subscribe to events</strong></p>
<p>There are numerous events to which you can subscribe to receive notifications when important events take place such as when an input assignment is made or when an assignment conflict is found.</p>
<pre class="code">
inputMapper.InputMappedEvent += OnInputMapped;
inputMapper.ConflictFoundEvent += OnConflictFound;<span class="comment"></span><span class="comment"></span>
</pre>
<p><strong><a name="context" id="context"></a>4. Create a mapping Context</strong></p>
<p>A mapping context provides information about the current mapping session. The mapping context is just a few pieces of information that informs the Input Mapper about what is being mapped.</p>
<pre class="code">
InputMapper.Context context = new InputMapper.Context() {
actionId = action.id, <span class="comment">// the id of the Action being mapped</span><br /> controllerMap = controllerMap, <span class="comment">// the Controller Map which will have the new mapping added</span><br /> actionRange = AxisRange.Full, <span class="comment">// the range of the Action being mapped</span><br /> actionElementMapToReplace = actionElementMap <span class="comment">// the Action Element Map to be replaced (optional)</span><br />};
</pre>
<p><strong><a name="listen" id="listen"></a>5. Start listening for input</strong></p>
<pre class="code">
inputMapper.Start(context);
</pre>
<p><strong><a name="conflicts" id="conflicts"></a>6. Handle assignment conflicts (optional)</strong></p>
<p>Conflict checking is enabled by default in InputMapper.Options. <a href="HowTos.html#conflict-checking">See How To's - Conflict Checking for more information.</a></p>
<p>If you subscribed to the InputMapper.ConflictFoundEvent, you will receive a notification when a conflicting assignment was found during input mapping. The object returned contains complete information about the assignment, the conflicts that were found, and provides a callback to be used to respond to the event.</p>
<pre class="code">
private InputMapper.ConflictFoundEventData conflictData;
void OnConflictFound(InputMapper.ConflictFoundEventData data) {
conflictData = data; <span class="comment">// store the event data for use in user response</span>
if(data.isProtected) { <span class="comment">// the conflicting assignment was protected and cannot be replaced</span>
<span class="comment">// Display some message to the user asking whether to cancel or add the new assignment.
// Protected assignments cannot be replaced.
// ...</span>
<span class="comment"> // ... After the user has made a decision</span>
conflictData.responseCallback(InputMapper.ConflictResponse.Cancel); <span class="comment">// cancel polling</span>
} else {
<span class="comment">// Display some message to the user asking whether to cancel, replace the existing,
// or add the new assignment.
// ...</span>
<span class="comment"> // ... After the user has made a decision</span>
<span class="comment"> // Tell the Input Mapper to replace the conflicting assignments</span>
conflictData.responseCallback(InputMapper.ConflictResponse.Replace);
}
}</pre>
<p>If you do not subscribe to the ConflictsFoundEvent and you have left conflict checking enabled in the Options.checkForConflicts property, the default action specified in Options.defaultActionWhenConflictFound will be used to resolve the conflict(s).</p>
<p><strong><a name="advanced" id="advanced"></a>7. Advanced operations (optional)</strong></p>
<p>Ignoring certain controller elements:</p>
<pre class="code">
void Setup() {
<span class="comment">// When setting up Options, add a callback to handle element confirmation</span>
inputMapper.options.isElementAllowedCallback = OnIsElementAllowed; <span class="comment">// manually allow or ignore specific elements</span>
}
<span class="comment">// Called by InputMapper when a controller element is activated while polling</span>
bool OnIsElementAllowed(ControllerPollingInfo info) {
<span class="comment">// Ignore the Space key on the keyboard</span>
if(info.controllerType == ControllerType.Keyboard &amp;&amp; info.keyboardKey == KeyCode.Space) return false;
<span class="comment">
// Allow all other controller elements</span>
return true;
}</pre>
<p>Using multiple Input Mappers to listen to multiple input devices at the same time:</p>
<p><a href="Examples.html#simple-combined-keyboard-mouse-remapping">See Simple Combined Keyboard Mouse Remapping example</a> for a working example.</p>
<pre class="code">// Begin listening for input on both keyboard and mouse at the same time
inputMapper_keyboard.Start(
new InputMapper.Context() {
actionId = actionId,
controllerMap = keyboardMap,
actionRange = actionRange,
actionElementMapToReplace = keyboardMap.GetElementMap(actionElementMapToReplaceId)
}
);
inputMapper_mouse.Start(
new InputMapper.Context() {
actionId = actionId,
controllerMap = mouseMap,
actionRange = actionRange,
actionElementMapToReplace = mouseMap.GetElementMap(actionElementMapToReplaceId)
}
); </pre>
<p>&nbsp;</p>
<hr />
<p>&nbsp;</p>
<h3><a name="faq" id="faq"></a>Frequently Asked Questions</h3>
<p class="question">Why is binding replacement not working?</p>
<p>You must pass the ActionElementMap to be replaced in <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_InputMapper_Context_actionElementMapToReplace.htm">InputMapper.Context.actionElementMapToReplace</a> when calling <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_InputMapper_Start.htm">InputMapper.Start</a>. After an ActionElementMap is replaced, a new ActionElementMap is created. If you are storing a reference to the ActionElementMap and then it is replaced, the reference to the old ActionElementMap is no longer valid because itpoints to an ActionElementMap that is no longer present in the Controller Map. If you are storing a reference to the ActionElementMap, you must update your reference to the new ActionElementMap after it is replaced.</p>
<p>In addition, whether replacement happens automatically when a mapping conflict is found is determined by <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_InputMapper_Options_defaultActionWhenConflictFound.htm">InputMapper.Options.defaultActionWhenConflictFound</a>. You can also <a href="#conflicts">handle conflicts manually</a> and determine what happens to conflicting bindings.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Actions"><span class="button-img"></span>Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 006af282a4f3bfb48b5830c023ea4b29
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,188 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Installation</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Installation
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Rewired features an easy-to-use installer that will take you step-by-step through the installation process. The installer should run automatically after installing the Rewired package, but if it does not or you want to run it again at some point, you can launch the installer from the menu: <strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong></p>
<p><img src="files/images/installation_menu_setup.png" alt="Run Installer" /></p>
<p>During installation, a number of things will happen:</p>
<ol>
<li>The Rewired.InputManager script will be added to the Script Execution Order and set to -32000 so it will run before any other scripts. This is very important and should not be changed.</li>
<li>The Unity InputManager.asset file in YourProjectFolder/ProjectSettings will be appended with new settings that contain all the joystick and mouse buttons and axes needed by Rewired. This is required for platforms that make use of Unity's input system such as Webplayer, Android, iOS, etc. IMPORTANT: If you have already created custom entries in Unity's input manager, these entries will not be overwritten by Rewired, and your original InputManager.asset file will be backed up a location which will be shown in the installer window.</li>
<li>A few files that contain necessary data for the Rewired editor will be created in Rewired/Data.</li>
</ol>
<p>Once installation is complete you can start using Rewired. See <a href="QuickStart.html">Quick Start</a> for a step-by-step guide to getting started.</p>
<h3>Dependencies:</h3>
<p><strong>Windows:</strong><br />
Certain dependencies may need to be installed depending on the version of Windows and the selected input sources. See <a href="Deployment.html">Deployment</a> for details.</p>
<p>Direct Input on Unity 4.x (Unity 4.x ONLY -- this applies to no other version of Unity):<br />
The free version of Unity 4.x does not support native plugins. A native plugin is required to use Direct Input (optional) as the primary input source on the Windows Standalone platform. If you want to use Direct Input, you will need to manually copy the DLL from Assets/Plugins/x86/Rewired_DirectInput.dll file into the root folder of your project (above the Assets folder). See <a href="Deployment.html">Deployment</a> for additional notes on steps required after making a build.</p>
<p><strong>OSX:</strong><br />
For Xbox 360 controller support, install <a href="https://github.com/360Controller/360Controller/releases" target="_blank">this driver</a> (includes XBox One controller support).</p>
<p><strong>SDL2:</strong><br />
If using SDL2 as an input source on any platform, the appropriate SDL2 library must be installed for both the editor and builds. It is likely you will need to include the SDL2 library in your final package also. See <a href="Deployment.html">Deployment</a> for details.</p>
<h3>Setup for Special Platforms:</h3>
<p>A few platforms require special setup steps in order to function. Please see <a href="SpecialPlatformSupport.html">Special Platform Support</a> for details.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Overview"><span class="button-img"></span>Documentation</a>
<a class="forward-button" href="QuickStart.html" title="Quick Start"><span class="button-img"></span>Quick Start</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: c44fc5f904a103548a0f25732348e564
TextScriptImporter:
userData:

View File

@@ -1,714 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Integration with Other Packages</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Integration with Other Packages
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p><strong>Packages:</strong></p>
<ul>
<li><a href="#BehaviorDesigner">Behavior Designer</a></li>
<li><a href="#Bolt">Bolt</a></li>
<li><a href="#Cinemachine2">Cinemachine 2</a></li>
<li><a href="#Cinemachine3">Cinemachine 3</a></li>
<li><a href="#CorgiEngine">Corgi Engine - 2D + 2.5D Platformer</a></li>
<li><a href="#Deftly">Deftly: Top Down Shooter Framework</a></li>
<li><a href="#DialogueSystem">Dialogue System for Unity</a></li>
<li><a href="#FirstPersonController">First Person Controller</a></li>
<li><a href="#GAC">GAC (Great Animation Combos) System</a></li>
<li><a href="#HorseAnimsetPro">Horse Animset Pro</a></li>
<li><a href="#InventoryPro">Inventory Pro</a></li>
<li><a href="#iRDS">iRDS - Intelligent Race Driver System</a></li>
<li><a href="#MotionController">Motion Controller</a></li>
<li><a href="#ORKFramework">ORK Framework - RPG Engine</a></li>
<li><a href="#PlatformerPro">Platformer Pro</a></li>
<li><a href="#PlayMaker">PlayMaker</a></li>
<li><a href="#QuestMachine">Quest Machine</a></li>
<li><a href="#QuestSystemPro">Quest System Pro</a></li>
<li><a href="#RacingGameStarterKit">Racing Game Starter Kit</a></li>
<li><a href="#RealisticFPS">Realistic FPS Prefab</a></li>
<li><a href="#RealisticTankController">Realistic Tank Controller</a></li>
<li><a href="#RexEngine">Rex Engine: A 2D Platformer Engine</a></li>
<li><a href="#Rucksack">Rucksack - Multiplayer Inventory System</a></li>
<li><a href="#SciFiShipController">Sci-Fi Ship Controller</a></li>
<li><a href="#SpaceCombatKit">Space Combat Kit</a></li>
<li><a href="#ThirdPersonController">Third Person Controller</a></li>
<li><a href="#UFPM">UFPM: Ultimate First Person Melee</a></li>
<li><a href="#UFPS">UFPS 1.x</a></li>
<li><a href="#UFPS2">UFPS: Ultimate First Person Shooter</a></li>
<li><a href="#UFS">uFS - Flight Simulation Engine</a></li>
<li><a href="#UltimateCharacterController">Ultimate Character Controller</a></li>
<li><a href="#unity-ui">Unity UI</a></li>
<li><a href="#UniversalFightingEngine">Universal Fighting Engine (UFE)</a></li>
<li><a href="#UniversalFightingEngine2">Universal Fighting Engine 2 (UFE2)</a></li>
<li><a href="#uSimAirModule">uSim Air Module</a></li>
<li><a href="#UTPM">UTPM: Ultimate Third Person Melee</a></li>
<li><a href="#UTPS">UTPS: Ultimate Third Person Shooter</a></li>
<li><a href="#others">Others</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="BehaviorDesigner" id="UFPS3"></a>Behavior Designer</h3>
<p><a href="https://www.opsive.com/assets/BehaviorDesigner/" target="_blank"><img src="files/images/behavior-designer-logo.png" alt="PlayMaker" width="160" height="160" class="right" /></a>Rewired can be used with <a href="https://www.assetstore.unity3d.com/en/#!/content/15277?aid=1011l3LkF" target="_blank">Behavior Designer</a> by Opsive, a popular visual scripting and behavior tree tool for Unity.</p>
<p><strong>To install the Behavior Designer Integration Pack, do the following:</strong></p>
<ol>
<li>Install Rewired and Behavior Designer first. If Behavior Designer is not installed, you will get errors when the integration pack is installed.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Behavior Designer -&gt; Install Integration Pack</strong></li>
<li>Follow the on-screen prompts.</li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/BehaviorDesigner folder </li>
</ol>
<p><strong>Documentation:</strong></p>
<p>There is no Behavior Designer-specific documentation. Behaviour Designer Tasks are direct analogues to the methods, properties, fields, and events in the <a href="https://guavaman.com/projects/rewired/docs/api-reference" target="_blank">Rewired API</a>. All the standard <a href="Documentation.html">Rewired documentation</a> applies.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="Bolt" id="Bolt"></a>Bolt</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/87491?aid=1011l3LkF" target="_blank">Bolt</a> by <a href="https://ludiq.io/" target="_blank">Ludiq</a> brings complete visual scripting to Unity, empowering artists, designers and programmers to create gameplay mechanics and interactive systems without writing a single line of code.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li> Bolt 1.4.0f11. (No future version compatibility is guaranteed due to frequent breaking changes in Bolt.)</li>
<li> Unity 2017.4.13f1+</li>
</ul>
<p><strong>To install the Bolt Integration Pack, do the following:</strong></p>
<ol>
<li>Install Bolt first. If Bolt is not installed, you will get errors when the integration pack is installed.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Bolt -&gt; Install Integration Pack</strong></li>
<li>Follow the on-screen prompts.</li>
<li>Add the Rewired_Core and Rewired_Bolt_Runtime libraries to Bolt Assembly Options by running the Unit Options Wizard from the menu:<br />
<strong>Tools -&gt; Bolt -&gt; Unit Options Wizard<br />
</strong><br />
<img src="files/images/integration_bolt_assemblyoptions.png" width="501" height="431" alt="Bolt Assembly Options" /> <br />
<br />
</li>
<li>Next, add the Rewired classes you intend to use in the Type Options dialog. Any Rewired class you want to access through Bolt must be added here or it will not be available.<br />
<br />
<img src="files/images/integration_bolt_typeoptions.png" width="500" height="431" alt="Bolt Type Options" /> <br />
<br />
</li>
<li>It is recommended that you add at least the following types:
<ul>
<li> Rewired.ReInput</li>
<li> Rewired.ReInput.PlayerHelper</li>
<li> Rewired.Player</li>
<li>Rewired.InputActionEventData</li>
</ul>
</li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Remove the Rewired assemblies and types from the Bolt Unit Options Wizard.</li>
<li>Delete the Rewired/Integration/Bolt folder.</li>
</ol>
<p><strong>Usage:</strong></p>
<p>The Bolt integration pack includes Units for events which can be found in the Bolt Unit inspector under Events/Input/Rewired. All other Rewired members must be added manually (see Step 5 above) and can be accessed through the Bolt Unit inspector under Codebase/Rewired after being added.</p>
<p><strong>Examples:</strong></p>
<p>Two very simple examples showing polling for input and using input events are included in the Rewired/Integration/Bolt/Examples/Scenes folder.</p>
<p><strong>Documentation:</strong></p>
<p>There is no Bolt-specific documentation. Bolt Units are direct analogues to the methods, properties, fields, and events in the <a href="https://guavaman.com/projects/rewired/docs/api-reference" target="_blank">Rewired API</a>. All the standard <a href="Documentation.html">Rewired documentation</a> applies.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="Cinemachine" id="Cinemachine"></a><a name="Cinemachine2" id="Cinemachine2"></a>Cinemachine 2</h3>
<p>NOTE: The Cinemachine 2 integration is not compatible with Cinemachine 3. See the <a href="#Cinemachine3">Cinemachine 3 integration instructions</a> if you are using Cinemachine 3.</p>
<p><a href="https://assetstore.unity.com/packages/essentials/cinemachine-79898?aid=1011l3LkF">Cinemachine 2</a> by <a href="https://assetstore.unity.com/publishers/1?aid=1011l3LkF">Unity Technologies</a> is unified procedural camera system for in-game cameras, cinematics and cutscenes, film pre-visualization and virtual cinematography eSports solutions.<br />
</p>
<p><strong>To install the Cinemachine Integration Pack, do the following:</strong></p>
<ol>
<li>Download and install Cinemachine.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Cinemachine 2 -&gt; Install Integration Pack</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/Cinemachine folder</li>
</ol>
<p><strong>Usage:</strong></p>
<ol>
<li>Add a RewiredCinemachineBridge component to a GameObject in the scene. If you add it to the Rewired Input Manager GameObject, you can assign Actions easier by using dropdowns instead of typing strings.</li>
<li>Create Actions for controlling Cinemachine in the Rewired input manager assign them to Controller Maps in Players per standard Rewired practice. By default, the Cinemachine look camera uses two axes: &quot;Mouse X&quot; and &quot;Mouse Y&quot;.</li>
<li>Create Cinemachine Axis to Rewired Action mappings in the Rewired Cinemachine Bridge inspector to map Cinemachine Axis names to Rewired Actions for each Player.</li>
<li>All axis string names used by Cinemachine must match exactly to Action names you specify in the Rewired Cinemachine Bridge inspector.</li>
</ol>
<p>To use multiple Cinemachine cameras with multiple Players:</p>
<ol>
<li>Set up the Axis names in the Cinemachine camera inspectors for each Player. Use different strings for each Player. For example: &quot;Player 1 Look X&quot;, &quot;Player 1 Look Y&quot; for Player 1, &quot;Player 2 Look X&quot;, &quot;Player 2 Look Y&quot; for Player 2, etc.</li>
<li>Create Axis to Action mappings in the Rewired Cinemachine Bridge for the Axis names you set up in the cameras for each Player.</li>
<li>See the the image below for an example:</li>
</ol>
<p><img src="files/images/integration_cinemachine_inspector.png" alt="Cinemachine Inspector" /></p>
<p>&nbsp;</p>
<hr />
<h3><a name="Cinemachine3" id="Cinemachine3"></a>Cinemachine 3</h3>
<p>Cinemachine 3 by <a href="https://assetstore.unity.com/publishers/1?aid=1011l3LkF">Unity Technologies</a> is unified procedural camera system for in-game cameras, cinematics and cutscenes, film pre-visualization and virtual cinematography eSports solutions.<br />
</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Unity 2022+</li>
<li>Cinemachine 3<br />
(This integration was built for Cinemachine 3.11. No guarantee of compatibility with past or future versions of Cinemachine is implied.)</li>
</ul>
<p><strong>To install the Cinemachine 3 Integration Pack, do the following:</strong></p>
<ol>
<li>Install Cinemachine 3 from the Package Manager.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Cinemachine 3 -&gt; Install Integration Pack</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/Cinemachine3 folder</li>
</ol>
<p><strong>Usage:</strong></p>
<ol>
<li>Add a Rewired Cinemachine Input Axis Controller to your Cinemachine Camera from the menu:<br />
<strong>Components -&gt; Rewired -&gt; Integrations -&gt; Cinemachine 3 -&gt; Rewired Cinemachine Input Axis Controller</strong></li>
<li>All axis string names used by Cinemachine must match exactly to Action names you specify in the Rewired Cinemachine Bridge inspector.</li>
</ol>
<p><strong>Advanced Users:</strong></p>
<p>It is possible to use <a href="HowTos.html#exporting-constants">exported Player and Action constants</a> in the Rewired Cinemachine Input Axis Controller inspector so you can select Actions and Players from <a href="HowTos.html#actionid-property-drawer">drop-down lists</a> instead of having to type strings. Two script templates are included which you can copy and edit for this purpose. They are located in the Cinmachine3/Scripts/Templates and Cinemachine3/Scripts/Templates/Editor directories. There is one runtime script file and one editor script. Instructions are included in the scripts. Add the new axis controller component instead of the default one on your Cinemachine Cameras.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="CorgiEngine" id="CorgiEngine"></a>Corgi Engine - 2D + 2.5D Platformer</h3>
<p><a href="https://assetstore.unity.com/packages/templates/systems/corgi-engine-2d-2-5d-platformer-26617?aid=1011l3LkF" target="_blank">Corgi Engine</a> by <a href="https://moremountains.com/" target="_blank">More Mountains</a> is a popular 2D + 2.5D platformer template for Unity.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li> Corgi Engine v4.0 (No future version compatibility is guaranteed.)</li>
<li> Unity 5.6.7f1+</li>
</ul>
<p><strong>To install the Corgi Engine Integration Pack, do the following:</strong></p>
<ol>
<li>Install Corgi Engine first before you install Rewired. If you installed Rewired before Corgi Engine, be sure to re-launch the Rewired installer after Corgi Engine finishes installing and allow it to install the Unity input manager entries again because installing Corgi Engine will have replaced Rewired's entries. To re-launch the installer from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong></li>
<li>When installing Rewired, install the Touch Controls pack when prompted. If you skipped installation, you can install the Touch Controls from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Extras -&gt; Touch Controls -&gt; Install</strong></li>
<li>To install the Corgi Engine integration pack, run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Corgi Engine -&gt; Install Integration Pack</strong></li>
<li>After the pack is installed, you may need to run the setup script which will set the Script Execution Order on the Corgi Engine input manager script:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Corgi Engine -&gt; Setup -&gt; Run Setup</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/CorgiEngine folder</li>
</ol>
<p><strong>Usage:</strong></p>
<p>Add a Rewired Input Manager to the scene. You can add a pre-configured Rewired Input Manager for Corgi Engine to the scene from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Corgi Engine -&gt; Create -&gt; Rewired Input Manager</strong></p>
<p>Anywhere where you use the Corgi Engine InputManager component, replace it with the RewiredCorgiEngineInputManager component. You can add the component through the menu:<br />
<strong>Component -&gt; Corgi Engine -&gt; Manager -&gt; Rewired Input Manager</strong></p>
<p><strong>Touch Controls:</strong></p>
<p>A default Touch Controller prefab is included in the Rewired/Integration/CorgiEngine/Prefabs folder. You can use this Touch Controller in place of the one that comes with CorgiEngine. To to replace the existing Touch Controller in the demos, you need to add the Touch Controller prefab into the scene underneath the UICamera. Next, find the GUIManager component and replace the references in the fields &quot;Buttons&quot;, &quot;Arrows&quot;, and &quot;Joystick&quot; with references to the new Touch Controller elements. Specifically hook the main Touch Controller object to the &quot;Buttons&quot; field, then hook the Arrows sub-object to the &quot;Arrows&quot; field, then the Joystick sub-object to the &quot;Joystick&quot; field. These steps are just so you can use the same CorgiEngine InputManager options to display the touch controls and are not mandatory if you'd rather manage their display yourself. You can look at the demo scene Mesa1 located in Rewired/Integration/CorgiEngine/Demos to see the Touch Controls in use. For general information on Rewired's Touch Controls, <a href="TouchControls.html">see the documentation on Touch Controls</a>.</p>
<p><strong>Inventory System:</strong></p>
<ol>
<li>The Corgi Engine inventory system uses the Unity UI StandaloneInputModule to control navigation. To change this to use Rewired instead, remove the StandaloneInputModule from the EventSystem in the scene and add a RewiredStandaloneInputModule. <a href="RewiredStandaloneInputModule.html">See this more information on configuring the RewiredStandaloneInputModule</a>.</li>
<li>Replace all InventoryInputManager components with the RewiredInventoryInputManager component and copy all relevant inspector values from the old component to the new component.</li>
<li>Replace all InventoryHotbar components with the RewiredInventoryHotbar component and copy all relevant inspector values from the old component to the new component.</li>
<li>If the replaced components were referenced by other components, you must re-assign these references using the new components.</li>
</ol>
<p>&nbsp;</p>
<hr />
<h3><a name="Deftly" id="Deftly"></a>Deftly: Top Down Shooter Framework</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/34177?aid=1011l3LkF" target="_blank">Deftly: Top Down Shooter Framework</a> by Cleverous aims to deliver flexibility and ease of use into a stable top down shooter environment with AAA quality. </p>
<p>The Rewired integration is included in the package. Please see the Deftly documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="DialogueSystem" id="DialogueSystem"></a>Dialogue System for Unity</h3>
<p><a href="https://assetstore.unity.com/packages/tools/ai/dialogue-system-for-unity-11672?aid=1011l3LkF" target="_blank">Dialogue System for Unity</a> by <a href="https://www.pixelcrushers.com/" target="_blank">Pixel Crushers</a> makes it easy to add interactive dialogue and quests to your game. It's a complete, robust solution including a visual node-based editor, dialogue UIs, cutscenes, quest logs, save/load, and more.</p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="FirstPersonController" id="FirstPersonController"></a>First Person Controller</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/first-person-controller-92082?aid=1011l3LkF" target="_blank">First Person Controller</a> by Opsive, a professional, deterministic character controller designed to have the smoothest first person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations/?pid=807" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="GAC" id="ThirdPersonController4"></a>GAC (Great Animation Combos) System</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/15812?aid=1011l3LkF" target="_blank">GAC (Great Animation Combos) System</a> by Eric Turgott is an asset that allows you to implement combos for any action game. The integration is included in the package. Please see the GAC documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="HorseAnimsetPro" id="HorseAnimsetPro"></a>Horse Animset Pro</h3>
<p><a href="https://assetstore.unity.com/packages/3d/characters/animals/horse-animset-pro-riding-system-79902?aid=1011l3LkF" target="_blank">Horse Animset Pro</a> by <a href="https://assetstore.unity.com/publishers/16163?aid=1011l3LkF" target="_blank">Malbers Animation</a> is an animation framework and Riding System controller, root-motion based, for any humanoid character. The integration is included in the package. Please see the Horse Animset Pro documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="InventoryPro" id="ThirdPersonController5"></a>Inventory Pro</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/66801?aid=1011l3LkF" target="_blank">Inventory Pro</a> by Devdog is a highly flexible inventory system for Unity. Inventory Pro can be used for RPG, RTS, FPS, and other game types. The integration is included in the package. Please see the Inventory Pro documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="iRDS" id="ThirdPersonController7"></a>iRDS - Intelligent Race Driver System</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/15672?aid=1011l3LkF" target="_blank">iRDS - Intelligent Race Driver System</a> by Jose Garrido is a racing game toolkit that helps you to develop Racing Games. Please see the iRDS documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="MotionController" id="ThirdPersonController2"></a>Motion Controller</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/15672?aid=1011l3LkF" target="_blank">Motion Controller</a> by ootii is an animation framework and character controller for any character and any game. You can download the intregration from <a href="https://www.ootii.com/UnityMotionVault.cshtml" target="_blank">ootii's Vault</a>. (Search the page for Rewired.)</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="ORKFramework" id="ORKFramework"></a>ORK Framework - RPG Engine</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/14419?aid=1011l3LkF" target="_blank">ORK Framework - RPG Engine</a> by Gaming is Love is a highly flexible system that allows you to create your own role-playing game without any coding.</p>
<p>Rewired can be used with ORK Framework by following <a href="https://forum.orkframework.com/discussion/3214/using-custom-input-with-rewired-tutorial" target="_blank">braytendo's tutorial here</a>. Or you can use <a href="UnityInputOverride.html">Unity Input Override</a> instead.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="PlatformerPro" id="PlatformerPro"></a>Platformer Pro</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/14419?aid=1011l3LkF" target="_blank">Platformer Pro</a> by JNA Mobile is a powerful and flexible kit for making platform games. Please see the Platformer Pro documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises. </p>
<p>&nbsp;</p>
<hr />
<h3><a name="PlayMaker" id="PlayMaker"></a>PlayMaker</h3>
<p><a href="https://hutonggames.com" target="_blank"><img src="files/images/playmaker-logo.png" alt="PlayMaker" width="160" height="160" class="right" /></a>Rewired can be used with <a href="https://www.assetstore.unity3d.com/en/#!/content/368?aid=1011l3LkF" target="_blank">PlayMaker</a> by Hutong Games, a popular visual scripting tool for Unity.</p>
<p>To install the PlayMaker Integration Pack, do the following:</p>
<ol>
<li>Install Rewired and PlayMaker first. If PlayMaker is not installed, you will get errors when the integration pack is installed.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; PlayMaker -&gt; Install Integration Pack</strong></li>
<li>Follow the on-screen prompts.</li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/PlayMaker folder</li>
</ol>
<p><strong>Documentation:</strong></p>
<p>There is no PlayMaker-specific documentation. PlayMaker Actions are direct analogues to the methods, properties, fields, and events in the <a href="https://guavaman.com/projects/rewired/docs/api-reference" target="_blank">Rewired API</a>. All the standard <a href="Documentation.html">Rewired documentation</a> applies.</p>
<p>For example, the Rewired API method:<br />
player.GetButtonDown</p>
<p>Corresponds directly to the PlayMaker Action:<br />
RewiredPlayerGetButtonDown</p>
<p>&nbsp;</p>
<hr />
<h3><a name="QuestMachine" id="QuestMachine"></a>Quest Machine</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/39834?aid=1011l3LkF">Quest Machine</a> by <a href="https://www.pixelcrushers.com/">Pixel Crushers</a> is a full-featured, extensible quest system that lets you add procedurally-generated and hand-written quests to your project. The integration is included in the package. Please see the Quest Machine documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="QuestSystemPro" id="QuestSystemPro"></a>Quest System Pro </h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/63460?aid=1011l3LkF" target="_blank">Quest System Pro</a> by <a href="https://devdog.io/" target="_blank">Devdog</a> is an extremely flexible quest, achievement and dialogue / conversation trees system. The integration is included in the package. Please see the Quest System Pro documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="RacingGameStarterKit" id="ThirdPersonController3"></a>Racing Game Starter Kit</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/22615?aid=1011l3LkF" target="_blank">Racing Game Starter Kit</a> by Intense Games is an easy to use asset for creating racing games. The integration is included in the package. Please see the Racing Game Starter Kit documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="RealisticFPS" id="RealisticFPS"></a>Realistic FPS Prefab</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/7739?aid=1011l3LkF" target="_blank">Realistic FPS Prefab</a> by Azuline Studios is a first-person shooter complete project.</p>
<p><a href="https://forum.unity3d.com/threads/realistic-fps-prefab-released.176985/page-69#post-2921727">This forum post by longroadhwy shows how to do the integration by modifying a bit of source code.</a></p>
<p>Note: This integration is a 3rd party integration and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="RealisticTankController" id="RealisticTankController"></a>Realistic Tank Controller</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/18036?aid=1011l3LkF" target="_blank">Realistic Tank Controller</a> by <a href="https://www.bonecrackergames.com/" target="_blank">Bonecracker Games</a> allows you to build highly customizable battle tanks for your project. </p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp; </p>
<hr />
<h3><a name="RexEngine" id="RexEngine"></a>Rex Engine: A 2D Platformer Engine</h3>
<p> <a href="https://assetstore.unity.com/packages/templates/systems/rex-engine-a-2d-platformer-engine-92333?aid=1011l3LkF" target="_blank">Rex Engine: A 2D Platformer Engine</a> is a 2D platformer engine by <a href="https://www.skytyrannosaur.com/" target="_blank">Sky Tyroannosaur</a> with a huge suite of features designed to save you time and help you create amazing 2D games. </p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Rex Engine 1.38 (No future version compatibility is guaranteed.)</li>
<li> Unity 5.6.5f1+</li>
</ul>
<p><strong>To install the Rex Engine Integration Pack, do the following:</strong></p>
<ol>
<li>Install Rex Engine first before you install Rewired. If you installed Rewired before Rex Engine, be sure to re-launch the Rewired installer after Rex Engine finishes installing and allow it to install the Unity input manager entries again because installing Rex Engine will have replaced Rewired's entries. To re-launch the installer from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong></li>
<li>When installing Rewired, install the Touch Controls pack when prompted. If you skipped installation, you can install the Touch Controls from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Extras -&gt; Touch Controls -&gt; Install</strong></li>
<li>To install the Rex Engine integration pack, run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Rex Engine -&gt; Install Integration Pack</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/RexEngine folder</li>
</ol>
<p><strong>Usage:</strong></p>
<p>Add a pre-configured Rewired Input Manager for Rex Engine to the scene from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Rex Engine -&gt; Create -&gt; Rewired Input Manager</strong></p>
<p>&nbsp;</p>
<hr />
<h3><a name="Rucksack" id="Rucksack"></a>Rucksack - Multiplayer Inventory System</h3>
<p><a href="https://www.assetstore.unity3d.com/en/?stay#!/content/114921?aid=1011l3LkF" target="_blank">Rucksack - Multiplayer Inventory System</a> by <a href="https://devdog.io/" target="_blank">Devdog</a> enables you to easily setup player inventories, NPC inventories, banks, premium shops and much more in offline and online multiplayer games! </p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="SciFiShipController" id="SciFiShipController"></a>Sci-Fi Ship Controller</h3>
<p>Rewired can be used with <a href="https://scsmmedia.com/sci-fi-ship-controller" target="_blank">Sci-Fi Ship Controller</a> by SCSMMedia which allows you to easily turn your ship models into fully-functioning flying spacecraft..</p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="SpaceCombatKit" id="SpaceCombatKit"></a>Space Combat Kit</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/space-combat-kit-108097?aid=1011l3LkF" target="_blank">Space Combat Kit</a> by VSX Games, designed to help you create anything from a simple arcade space shooter to a sophisticated space sim.</p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="ThirdPersonController" id="ThirdPersonController"></a>Third Person Controller</h3>
<p>Rewired can be used with <a href="https://www.assetstore.unity3d.com/en/#!/content/27438?aid=1011l3LkF" target="_blank">Third Person Controller</a> by Opsive, a professional, deterministic character controller designed to have the smoothest third person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations/?pid=926" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UFPM" id="UFPM"></a>UFPM: Ultimate First Person Melee</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/ufpm-ultimate-first-person-melee-99036?aid=1011l3LkF" target="_blank">UFPM: Ultimate First Person Melee</a> by Opsive, It is a professional, deterministic character controller designed to include the smoothest first person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations?pid=1106" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UFPS" id="UFPS"></a><img src="files/images/works-with-ufps.png" width="250" height="132" alt="Works with UFPS" style="float:right; margin-left: 2em; margin-bottom: 1em" />UFPS 1.x</h3>
<p>Rewired can be used to provide input for <a href="https://www.assetstore.unity3d.com/en/#!/content/2943?aid=1011l3LkF" target="_blank">UFPS</a> by Opsive, a popular first person shooter kit. Rewired comes pre-packaged with an integration kit that was designed to work with UFPS 1.4.9.</p>
<p><strong>The UFPS integration was designed for UFPS 1.x and is not compatible with UFPS 2.x. For UFPS 2.x, see <a href="#UFPS2">UFPS: Ultimate First Person Shooter</a>.</strong></p>
<p>To install the UFPS Integration Pack, do the following:</p>
<ol>
<li>Ensure that you are running Unity 4.5 or greater.</li>
<li>Install Rewired and UFPS first. If UFPS is not installed, you will get errors when the integration pack is installed.</li>
<li>Run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; UFPS -&gt; Install Integration Pack</strong></li>
<li>Follow the on-screen prompts.</li>
<li>When installation is complete, you will need to create a Rewired UFPS Input Manager in your scene before Rewired will be able to handle input. You can do this from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; UFPS -&gt; Create UFPS Rewired Input Manager</strong></li>
<li>The Rewired UFPS Input Manager contains default settings for all of UFPS's controls for the keyboard, mouse, and dual analog gamepads. If you want to customize the controls, simply click the &quot;Rewired UFPS Input Manager&quot; then edit the settings in the <a href="RewiredEditor.html">Rewired Editor</a>.</li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/UFPS folder</li>
<li>Delete the Rewired UFPS Input Manager from the scene</li>
</ol>
<p><strong>Notes:</strong></p>
<ul>
<li>UFPS's built-in input manager will no longer have any effect as long as the Rewired UFPS Input Manager exists in the scene. Additionally, some UFPS functions such as those designed to let you remap keys will no longer have any effect. You should manage key remapping using Rewired instead.</li>
<li>The Rewired UFPS integration pack makes no changes to the UFPS source code. You are therefore free to update UFPS as you see fit without losing the integration with Rewired.</li>
<li>If you install UFPS after installing Rewired, UFPS will overwrite the /ProjectSettings/InputManager.asset in your project. This will overwrite Unity input manager entries that Rewired needs to be able to get mouse input or to get joystick input on platforms that fall back on Unity input as the input source. If this happens, simply reinstall Rewired's Input Manager settings by running the installer from the menu <strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong> and allow it to add the necessary entries in the InputManager.asset file.</li>
</ul>
<p><strong>FAQ:</strong></p>
<p class="question">The fire button (gamepad right trigger) and right stick look do not work unless I click the mouse button in the main window first. This happens in both the editor and game build. How do I fix this?</p>
<p>This issue is not with Rewired, but rather it is an intentional functionality of UFPS.</p>
<p>The Rewired integration only goes so far as to change the input sources for the Actions requested by the various UFPS scripts by replacing the underlying input manager. It doesn't alter the functionality or code of UFPS in any way so it cannot modify this behavior because the Action processing is blocked in the UFPS character script.</p>
<p>UFPS is in control of the mouse pointer control. It doesn't allow you to fire or move the right stick (mouse look) unless the mouse pointer is captured regardless of the platform. There is an inspector option on the UFPS character controller (VP_FPInput -&gt; Mouse Cursor -&gt; Blocks Mouselook) that changes the mouse capture behavior for the right stick, however this doesn't solve the issue with firing.</p>
<p>The only way to &quot;fix&quot; the issue with the fire button (right trigger) is to change UFPS source code. In VP_FPInput.cs, search for the function called InputAttack and find the two lines that read. </p>
<pre class="code">if (!vp_Utility.LockCursor) <strong><span class="comment">// &lt;-- Comment out this line</span></strong>
return; <strong><span class="comment">// &lt;-- Comment out this line</span></strong></pre>
<p>Note that I cannot provide support on how to use UFPS. This information was only added here because I receive support requests on this issue on a regular basis. If you have issues with UFPS, you should contact the developer, <a href="https://opsive.com" target="_blank">Opsive</a> for support.</p>
<p class="question">I get warnings in the console saying the Actions &quot;LeftTrigger&quot; and &quot;RightTrigger&quot; are missing the first time I press the gamepad triggers in every game session. How do I fix this?</p>
<p>This occurs because the developer of UFPS added LeftTrigger and RightTrigger Actions to UFPS recently when they added joystick support. They were not added to the default UFPS Rewired Input Manager because they were only added to UFPS as a way to convert analog gamepad trigger axis values to button values, but Rewired handles this already using the default Attack action. Adding the Actions would just add confusion since they would be unused and only added to silence those warnings. The warnings are harmless and only show up the first time you press the triggers. If you really want to get rid of the warnings, add two Actions called LeftTrigger and RightTrigger.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UFPS2" id="UFPS2"></a>UFPS: Ultimate First Person Shooter</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/ufps-ultimate-first-person-shooter-106748?aid=1011l3LkF" target="_blank">UFPS: Ultimate First Person Shooter</a> by Opsive, It is a professional, deterministic character controller designed to include the smoothest first person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations/?pid=185" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UFS" id="ThirdPersonController6"></a>uFS - Flight Simulation Engine</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/11321?aid=1011l3LkF" target="_blank">uFS - Flight Simulation Engine</a> by REMEX Software Ltd delivers previously unseen Flight Simulation accuracy to the Unity Asset Store.</p>
<p>Rewired includes an integration pack for uFS which can be installed from the menu:<br />
<strong>Rewired -&gt; Integration -&gt; uFS -&gt; Install Integration Pack</strong></p>
<p>In addition to the integration pack, <a href="UnityInputOverride.html">Unity Input Override</a> must be installed.</p>
<p><strong>Usage</strong></p>
<p>Create a Rewired UnityFS Input Manager from the menu:<br />
<strong>Rewired -&gt; Integration -&gt; uFS -&gt; Create uFS Rewired Input Manager</strong></p>
<p>This will set up default controls that will work with uFS.</p>
<p><strong>To Uninstall</strong></p>
<ol>
<li>Delete the Rewired/Integration/UFS folder.</li>
<li>Optionally uninstall <a href="UnityInputOverride.html">Unity Input Override</a>.</li>
</ol>
<p>&nbsp;</p>
<hr />
<h3><a name="UltimateCharacterController" id="UltimateCharacterController"></a>Ultimate Character Controller</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/ultimate-character-controller-99962?aid=1011l3LkF" target="_blank">Ultimate Character Controller</a> by Opsive, is a professional, deterministic character controller designed to include the smoothest first and third person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations/?pid=923" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p></p>
<p>&nbsp;</p>
<hr />
<h3><a name="unity-ui" id="unity-ui"></a>Unity UI</h3>
<p>Rewired can be used as the input source for Unity's UI system introduced in Unity 4.6. In order to use Rewired to control Unity's UI, you must replace the StandaloneInputModule component on the UI EventSystem object with the RewiredStandaloneInputModule. Please see <a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a> for more information.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UniversalFightingEngine" id="UniversalFightingEngine"></a>Universal Fighting Engine (UFE)</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/13754?aid=1011l3LkF" target="_blank">Universal Fighting Engine</a> by <a href="https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:5345" target="_blank">Mind Studios</a> is  a toolkit designed to help you develop your own 2.5D fighting game, using a highly customizable framework and easy to use visual editors.</p>
<p><strong>NOTE: This integration pack is designed to work with Universal Fighting Engine (1.x) and is not compatible with UFE2. UFE2 is a separate product and not code-compatible with Universal Fighting Engine. <a href="#UniversalFightingEngine2">Use the UFE2 integration instead if you are using UFE2</a>.</strong></p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Universal Fighting Engine 1.8.4 (not compatible with UFE2) (No future version compatibility is guaranteed.)</li>
<li> Unity 2017.2.0f3+</li>
</ul>
<p><strong>To install the Universal Fighting Engine Integration Pack, do the following:</strong></p>
<ol>
<li>Install Universal Fighting Engine first before you install Rewired. If you installed Rewired before Universal Fighting Engine, be sure to re-launch the Rewired installer after Universal Fighting Engine finishes installing and allow it to install the Unity input manager entries again because installing Universal Fighting Engine will have replaced Rewired's entries. To re-launch the installer from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong></li>
<li>Install Control Mapper from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Extras -&gt; Control Mapper -&gt; Install (Standard)</strong><br />
</li>
<li>To install the integration pack, run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Universal Fighting Engine -&gt; Install Integration Pack</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/UniversalFightingEngine folder</li>
</ol>
<p><strong>Usage:</strong></p>
<ol>
<li>In the UFE Global Editor &gt; Input Options:
<ul>
<li>Set &ldquo;Input Manager&rdquo; to &ldquo;Rewired&rdquo;</li>
<li>Change the names of all inputs for both players to:
<ul>
<li>For the horizontal axis: &ldquo;Horizontal&rdquo;</li>
<li>For the vertical axis: &ldquo;Vertical&rdquo;<br />
For each numbered button: &ldquo;Button1&rdquo;, &ldquo;Button2&rdquo;, &ldquo;Button3&rdquo;, &ldquo;Button4&rdquo;, &ldquo;Button5&rdquo;, &ldquo;Button6&rdquo;</li>
<li>For the Start button: &ldquo;Start&rdquo;</li>
<li>Be sure to remove the &quot;p1&quot; / &quot;p2&quot; prefix from the input names as Rewired does not use this. Both Player 1 and Player 2's input names should be identical.</li>
</ul>
</li>
</ul>
</li>
<li>Add a pre-configured Rewired Input Manager for Universal Fighting Engine to the scene from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Universal Fighting Engine -&gt; Create -&gt; Rewired Input Manager</strong></li>
</ol>
<p><strong>Customizing Action Names:</strong></p>
<p>You can change the display names or the actual scripting names of the Actions in the Rewired Input Manager, but if you change the scripting names, make sure you change them in the UFE global configuration to match.</p>
<p><strong>Touch Controls:</strong></p>
<p> The integration comes with pre-built touch-screen controls. You can set which platforms and under what circumstances the touch controls will be shown by setting the options on the Rewired UFE Input Manager inspector. For more information on customizing the touch controls, see the <a href="TouchControls.html">Touch Controls documentation</a>.</p>
<p>To test touch controls (using the mouse) in the editor, you can enable them in the editor by going to the Rewired UFE Input Manager and in the inspector under Rewired UFE Input Manager, check the box &ldquo;Editor&rdquo; under &ldquo;Show Touch Controls On&rdquo; and unplug any joysticks or disable the option &ldquo;Hide Touch Controls When Joysticks Connected.&rdquo; </p>
<p><strong>In-Game Control Remapping:</strong></p>
<p>To remap controls, go to the Options page in UFE and select &ldquo;Change Controls&rdquo;. When you press &ldquo;Done&rdquo; the configuration will be saved to XML and will be used the next time you use that controller on that Player. To clear the XML data if you want to make changes in the Rewired Input Manager, clear Player Prefs using the debug options foldout on the UserDataStore_PlayerPrefs component on the Rewired Input Manager. </p>
<p><strong>Important:</strong></p>
<p>This integration requires the Standard version of Control Mapper to be installed. It is not compatible with the Text Mesh Pro version of Control Mapper.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UniversalFightingEngine2" id="UniversalFightingEngine2"></a>Universal Fighting Engine 2 (UFE2)</h3>
<p><a href="https://assetstore.unity.com/packages/templates/systems/ufe-2-source-126124?aid=1011l3LkF" target="_blank">Universal Fighting Engine 2</a> by <a href="https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:5345" target="_blank">Mind Studios</a> is  a toolkit designed to help you develop your own 2.5D fighting game, using a highly customizable framework and easy to use visual editors.</p>
<p><strong>NOTE: This integration pack is designed to work with Universal Fighting Engine 2 and is not compatible with Universal Fighting Engine 1.x. UFE2 is a separate product and not code-compatible with Universal Fighting Engine (1.x). <a href="#UniversalFightingEngine">Use the Universal Fighting Engine integration instead if you are using Universal Fighting Engine 1.x</a>.</strong></p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Universal Fighting Engine 2.4.1 (not compatible with Universal Fighting Engine 1.x) <strong>No future version compatibility is guaranteed.</strong></li>
</ul>
<p><strong>To install the Universal Fighting Engine 2 Integration Pack, do the following:</strong></p>
<ol>
<li>Install Universal Fighting Engine 2 first before you install Rewired. If you installed Rewired before Universal Fighting Engine 2, be sure to re-launch the Rewired installer after Universal Fighting Engine 2 finishes installing and allow it to install the Unity input manager entries again because installing Universal Fighting Engine 2 will have replaced Rewired's entries. To re-launch the installer from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Setup -&gt; Run Installer</strong></li>
<li>Install Control Mapper from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Extras -&gt; Control Mapper -&gt; Install (Standard)</strong><br />
</li>
<li>To install the integration pack, run the following menu item in the Unity editor:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Universal Fighting Engine 2 -&gt; Install Integration Pack</strong></li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Rewired/Integration/UniversalFightingEngine2 folder</li>
</ol>
<p><strong>Usage:</strong></p>
<ol>
<li>In the UFE Global Editor &gt; Input Options:
<ul>
<li>Set &ldquo;Input Manager&rdquo; to &ldquo;Rewired&rdquo;</li>
<li>Change the names of all inputs for both players to:
<ul>
<li>For the horizontal axis: &ldquo;Horizontal&rdquo;</li>
<li>For the vertical axis: &ldquo;Vertical&rdquo;<br />
For each numbered button: &ldquo;Button1&rdquo;, &ldquo;Button2&rdquo;, &ldquo;Button3&rdquo;, &ldquo;Button4&rdquo;, &ldquo;Button5&rdquo;, &ldquo;Button6&rdquo;</li>
<li>For the Start button: &ldquo;Start&rdquo;</li>
<li>Be sure to remove the &quot;p1&quot; / &quot;p2&quot; prefix from the input names as Rewired does not use this. Both Player 1 and Player 2's input names should be identical.</li>
</ul>
</li>
</ul>
</li>
<li>Add a pre-configured Rewired Input Manager for Universal Fighting Engine to the scene from the menu:<br />
<strong>Window -&gt; Rewired -&gt; Integration -&gt; Universal Fighting Engine 2 -&gt; Create -&gt; Rewired Input Manager</strong></li>
</ol>
<p><strong>Customizing Action Names:</strong></p>
<p>You can change the display names or the actual scripting names of the Actions in the Rewired Input Manager, but if you change the scripting names, make sure you change them in the UFE global configuration to match.</p>
<p><strong>Touch Controls:</strong></p>
<p> The integration comes with pre-built touch-screen controls. You can set which platforms and under what circumstances the touch controls will be shown by setting the options on the Rewired UFE Input Manager inspector. For more information on customizing the touch controls, see the <a href="TouchControls.html">Touch Controls documentation</a>.</p>
<p>To test touch controls (using the mouse) in the editor, you can enable them in the editor by going to the Rewired UFE Input Manager and in the inspector under Rewired UFE Input Manager, check the box &ldquo;Editor&rdquo; under &ldquo;Show Touch Controls On&rdquo; and unplug any joysticks or disable the option &ldquo;Hide Touch Controls When Joysticks Connected.&rdquo; </p>
<p><strong>In-Game Control Remapping:</strong></p>
<p>To remap controls, go to the Options page in UFE and select &ldquo;Change Controls&rdquo;. When you press &ldquo;Done&rdquo; the configuration will be saved to XML and will be used the next time you use that controller on that Player. To clear the XML data if you want to make changes in the Rewired Input Manager, clear Player Prefs using the debug options foldout on the UserDataStore_PlayerPrefs component on the Rewired Input Manager.</p>
<p><strong>Important:</strong></p>
<p>This integration requires the Standard version of Control Mapper to be installed. It is not compatible with the Text Mesh Pro version of Control Mapper.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="uSimAirModule" id="uSimAirModule"></a>uSim Air Module</h3>
<p><a href="https://www.assetstore.unity3d.com/en/#!/content/15674?aid=1011l3LkF" target="_blank">uSim Air Module</a> by <a href="https://softdimensiongames.com/" target="_blank">Softdimension Games</a> helps you build flight models for any aircraft. Smooth and realistic results. </p>
<p>The Rewired integration is included in the package. Please see the package documentation for details.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UTPM" id="UTPM"></a>UTPM: Ultimate Third Person Melee</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/utpm-ultimate-third-person-melee-99037" target="_blank">UTPM: Ultimate Third Person Melee by Opsive</a>, It is a professional, deterministic character controller designed to include the smoothest first person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations?pid=1108" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="UTPS" id="UTPS"></a>UTPS: Ultimate Third Person Shooter</h3>
<p>Rewired can be used with <a href="https://assetstore.unity.com/packages/templates/systems/utps-ultimate-third-person-shooter-99035" target="_blank">UTPS: Ultimate Third Person Shooter</a> by Opsive, It is a professional, deterministic character controller designed to include the smoothest first person controls and to excel in all areas: PC, mobile, console, AI, networking, and VR. The integration pack can be <a href="https://opsive.com/integrations?pid=1107" target="_blank">downloaded from Opsive's site here</a>.</p>
<p>Note: This integration is a 3rd party integration package and not maintained or supported by Guavaman Enterprises.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="others" id="others"></a>Others</h3>
<p>Most Unity Asset Store assets can be used with Rewired by using the <a href="UnityInputOverride.html">Unity Input Override</a> system. <a href="UnityInputOverride.html">Please see Unity Input Override for details</a>.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 880f07925184b47469d1d75b0e8811b0
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -1,291 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Layout Manager</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Layout Manager <!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p> Layout Manager can be used to manage loading and unloading of <a href="ControllerMaps.html">Controller Maps</a> in a <a href="Players.html">Player</a> to force the specified Layouts to be used. This can be used to make specific Controller Maps be loaded in a Player with specific <a href="Layouts.html">Layouts</a>, for example when changing Controller Maps for a &quot;Left-Handed&quot; input scheme. These settings will persist and be inherited by new Controllers assigned to the Player based on your rules. This will enforce a single Layout per managed <a href="MapCategories.html">Map Category</a> be loaded in the Player. Layout Manager cannot manage mutliple simultaneous Layouts in the same Map Category being loaded in the Player.</p>
<p>This does not manage enabled state of the Controller Maps. It only manages loading and unloading of Controller Maps. See <a href="MapEnabler.html">Map Enabler</a> to manage Controller Map enabled states. Normally, you would use both systems together.</p>
<h3>How it Works:</h3>
<p><img src="files/images/layout-manager-diagram-1.png" alt="Layout Manager Diagram" /></p>
<p>&nbsp;</p>
<ol>
<li>Each Player has its own Layout Manager that can be used to manage the Controller Maps for that Player.</li>
<li>The Layout Manager contains a list of <a href="#rule-sets">Rule Sets</a>.</li>
<li>Each Rule Set contains a list of <a href="#rules">Rules</a> which determine what Controller Maps are to be loaded and/or unloaded.</li>
<li>When Apply is called on the Layout Manager (manually or when certain things happen such as when assigning a Controller to a Player), all Rules in all enabled Rule Sets are processed one at a time in order. Controller Maps for the matching Controllers are unloaded or loaded as needed to comply with each Rule.</li>
</ol>
<h3>Tips:</h3>
<ul>
<li>Rule Sets can be disabled so the Rules contained within are ignored when Apply is called.</li>
<li>MapEnabler.Apply is called in the Player automatically every time Apply is called in the Layout Manager to make sure newly loaded Controller Maps are enabled or disabled as required.</li>
<li>Only Controller Maps that are matched by one or more Rule in an enabled Rule Set will be managed. Any other Controller Maps in the Player will be unmanaged.</li>
<li>One way of working with Rule Sets is to split up your Rules into many single-purpose Rule Sets, assign all the Rule Sets to your Player, starting them disabled, and selectively enable combinations of groups of Rule Sets to achieve different modes.</li>
<li>Another way of working with Rule Sets is to stack many Rules into a Rule Set definining an entire mode in one Rule Set and just enable or swap out the Rule Set.</li>
<li>If a Rule designates that maps for a Controller should be loaded in a specific Map Category and Layout but no Controller Map is found that matches those settings, a blank Controller Map with that Map Category and Layout will be created, resulting in no input through that Controller Map. For example, if you create a &quot;Left-Handed&quot; Layout for Joysticks in the &quot;Default&quot; Map Category, you should create a &quot;Default&quot;, &quot;Left-Handed&quot; Controller Map for every Joystick you want to support (Controller Template Maps can be used to cover all the Controllers to which they apply.)</li>
<li>Do not assign multple Controller Maps in the same Map Category but different Layouts to the Player if those Controller Maps are to be managed by Layout Manager. Layout Manager will keep only one Controller Map loaded per Controller, per Map Category if that Controller Map is managed.</li>
<li>Layout Manager works in conjuction with <a href="MapEnabler.html">Map Enabler</a>. It's recommended you use both systems together to manage both Layouts and Controller Map enabled states.</li>
<li>The Layout Manager must be enabled or it will not manage Layouts. The Layout Manager can be enabled and disabled from a script at runtime or on start from the <a href="RewiredEdtior.html#Players">Rewired Editor - Players</a> page.</li>
<li>The Load From User Data Store setting in the Layout Manager (set in the Rewired Editor or via scripting) determines whether loaded Controller Maps should first search the <a href="UserDataStore.html">UserDataStore</a> before loading from the Rewired Input Manager defaults. This allows saved user mappings created by <a href="ControlMapper.html">Control Mapper</a> or other custom control mapping systems to be loaded by Layout Manager when loading Controller Maps. Note that the UserDataStore implementation must implement the Rewired.Interfaces.IControllerMapStore interface in order for this to function.</li>
<li>After changing Rule Sets or Rules in the Layout Manager, you should call LayoutManager.Apply to make these changes commit to the Player's Controller Maps.</li>
<li>MapEnabler.Apply is called in the Player automatically every time Apply is called in the Layout Manager to make sure newly loaded Controller Maps are enabled or disabled as required. (The opposite is not true.)</li>
</ul>
<h3>Accessing from Scripts:</h3>
<pre class="code">player.controllers.maps.layoutManager</pre>
<h3><a name="rule-sets" id="rule-sets"></a>Rule Sets:</h3>
<p>A Rule Set is a collection of Rules.</p>
<p><strong><a name="creating-rule-sets" id="creating-rule-sets"></a>Creating Rule Sets:</strong></p>
<p>Rule Sets can be created in the <a href="RewiredEditor.html#LayoutManagerRules">Rewired Editor</a> or created at runtime via scripting.</p>
<p><strong><a name="creating-rule-sets-editor" id="creating-rule-sets-editor"></a>Creating Rule Sets in the Rewired Editor:</strong></p>
<p>Rule Sets can be created in the <a href="RewiredEditor.html#LayoutManagerRules">Rewired Editor on the Layout Manager Rules page</a>. After creating the Rule Sets, you must assign them to Players on the <a href="RewiredEditor.html#Players">Players</a> page or they will not be used.</p>
<p>Alternately, Rule Sets created in the Rewired Editor can be loaded via scripting and added to the Player's Layout Manager as follows:</p>
<pre class="code">
<span class="comment">// Load an instance of the Rule Set</span>
var ruleSet = ReInput.mapping.GetControllerMapLayoutManagerRuleSetInstance(ruleSetId);
<span class="comment">// Add the Rule Set to the Player's Layout Manager</span>
player.controllers.maps.layoutManager.ruleSets.Add(ruleSet);
<span class="comment">// Apply the changes to the Player's Controller Maps</span>
player.controllers.maps.layoutManager.Apply(); </pre>
<p>Rule Sets created in the Rewired Editor are instantiated per-Player on initialization. They are not shared among Players. A Rule Set can be modified at runtime on one Player and that change will not be reflected in the Rule Sets owned by other Players.</p>
<p><strong><a name="creating-rule-sets-scripting" id="creating-rule-sets-scripting"></a>Creating Rule Sets via Scripting:</strong></p>
<p>Rule Sets can be created and assigned at runtime.</p>
<p>This example shows creating two Layout Manager Rule Sets that could be used to switch between the &quot;Default&quot; Layout and the &quot;Leftie&quot; Layout for Joysticks in the Map Categories &quot;GameplayShared&quot;, &quot;Airplane&quot;, and &quot;Infantry.&quot; All other Controller Maps for other Controllers are unmanaged in this example and will not be affected by the Layout Manager.</p>
<pre class="code">
private ControllerMapLayoutManager.RuleSet layoutManager_joysticks_default = new ControllerMapLayoutManager.RuleSet() {
<span class="comment">// Enable the Rule Set. This is unnecessary since Rule Sets start enabled by default.</span>
enabled = true,
<span class="comment">// Create a tag if you want to find this Rule Set via scripting in the list</span>
tag = "default",
<span class="comment">// Create the list of Rules for this Rule Set</span>
rules = {
<span class="comment">// Load Default Layout for GameplayShared, Airplane, and Infantry categories in all Joysticks</span>
new ControllerMapLayoutManager.Rule() {
<span class="comment">// Create the Controller Set Selector to determine which Controller(s) this applies to</span>
controllerSetSelector = ControllerSetSelector.SelectControllerType(ControllerType.Joystick),
<span class="comment">// Set which Map Catetories of the Controller Maps to be loaded</span>
categoryNames = new[] { "GameplayShared", "Airplane", "Infantry" },
<span class="comment">// Set the Layout of the Controller Maps to be loaded</span>
layoutName = "Default"
}
}
};
private ControllerMapLayoutManager.RuleSet layoutManager_joysticks_leftie = new ControllerMapLayoutManager.RuleSet() {
tag = "leftie",
rules = {
<span class="comment">// Load Leftie Layout for GameplayShared, Airplane, and Infantry categories in all Joysticks</span>
new ControllerMapLayoutManager.Rule() {
controllerSetSelector = ControllerSetSelector.SelectControllerType(ControllerType.Joystick),
categoryNames = new[] { "GameplayShared", "Airplane", "Infantry" },
layoutName = "Leftie"
}
}
};</pre>
<p><strong><a name="enabling-disabling-rule-sets" id="enabling-disabling-rule-sets"></a>Enabling and disabling Rule Sets:</strong></p>
<p>Rule Sets can be enabled and disabled to control whether they are evaluated or not when <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_ControllerMapLayoutManager_Apply.htm">ControllerMapLayoutManager.Apply</a> is called or whenever rules are evaluated.</p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_ControllerMapLayoutManager_ruleSets.htm">ControllerMapLayoutManager.ruleSets</a> contains a List&lt;<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapLayoutManager_RuleSet.htm">ControllerMapLayoutManager.RuleSet</a>&gt; which can be searched and modified like any other generic list. Find the Rule Set(s) you want to change the enabled state on, change the state, then call <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_ControllerMapLayoutManager_Apply.htm">ControllerMapLayoutManager.Apply</a><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_ControllerMapEnabler_Apply.htm"></a> to evaluate the rules and apply the changes to the Player's Controller Maps.</p>
<pre class="code"><span class="comment">// Disable all Rule Sets</span>
foreach(var ruleSet in player.controllers.maps.layoutManager.ruleSets) {
ruleSet.enabled = false;
}
<span class="comment">// Enable the Rule Set with the tag &quot;leftie&quot;</span>
player.controllers.maps.layoutManager.ruleSets.Find(item =&gt; item.tag == &quot;leftie&quot;).enabled = true;
<span class="comment">// Apply the changes to the Player's Controller Maps</span>
player.controllers.maps.layoutManager.Apply();</pre>
<h3><a name="rules" id="rules"></a>Rules:</h3>
<p>Rules are individual commands that are evaluated and applied to all matching Controller Maps in the Player to determine which Controller Maps should be loaded or removed. Each Rule in a Rule Set is evaluated in sequence.</p>
<p>Rules contain 3 pieces of information:</p>
<ol>
<li>Controller Selector - Determines which Controller(s) the Rule applies to. Only Controller Maps for the specific Controller(s) will be managed by this Rule.</li>
<li>Categories - Determines which Map Categories are managed by this Rule.</li>
<li>Layout - Determines the Layout of the Controller Map(s) to load / maintain.</li>
</ol>
<p>When Layout Manager evaluates the Rules, for the specified Controller(s), it will unload any Controller Maps in Map Categories that match the specified Catgories in the Rule but do not match the specified Layout in the Rule. Then it will load Controller Maps in the specified Map Categories in the specified Layout.</p>
<p>Rules can be created in the <a href="RewiredEditor.html#LayoutManagerRules">Rewired Editor on the Layout Manager Rules page</a> or created <a href="#creating-rule-sets-scripting">at runtime via scripting</a>.</p>
<h3><a name="faq" id="faq"></a>FAQ:</h3>
<p><strong>Q: Can I select a Rule Set or Rule at runtime using the Id instead of a Tag?</strong></p>
<p>A: The Id cannot be used to select a Rule Set or Rule in a Player at runtime. Rule Sets can be defined entirely in code and can also be duplicated at runtime, in which case they would not have an id that would correspond to the other Rule Set definitions that exist in the Rewired Input Manager.</p>
<p>The Id constant which can be exported for rule sets exists only for the purpose of instantiating that Rule Set (loading it from the Rewired Input Manager) into a Player. That is not a common thing to do since most of the time you will assign these Rule Sets to your Player in the Rewired Editor and they will be loaded for you when the application starts. Once the application starts, Rule Sets are instantiated for each Player, after which point they have no connection anymore to the parent Rule Set definition from which they came.</p>
<h3>API Reference:</h3>
<ul>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapLayoutManager.htm">ControllerMapLayoutManager</a></li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapLayoutManager_RuleSet.htm">ControllerMapLayoutManager.RuleSet</a></li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapLayoutManager_Rule.htm">ControllerMapLayoutManager.Rule</a></li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="Layouts.html" title="Documentation"><span class="button-img"></span>Layouts</a>
<a class="forward-button" href="Players.html" title="Players"><span class="button-img"></span>Map Enabler</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,180 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Layouts</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Layouts
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Layouts are the second level of categorization of <a href="ControllerMaps.html">Controller Maps</a>. Each Controller Map belongs to one <a href="MapCategories.html">Map Category</a> and one Layout. The combination of the two serves to identify the Controller Map when selecting a Controller Map in the Rewired Editor or from the API.</p>
<p> Layouts are specific to each controller type and are not shared by all controller types as <a href="MapCategories.html">Map Categories</a> are.</p>
<p>A Layout simply provides a way to retrieve a particular Controller Map in a particular Map Category. All modification, enabling/disabling, and other processes are done on the <a href="ControllerMaps.html">Controller Map</a>, not the Layout. You could think of a Layout a sort of a tag -- it helps you get the Controller Map you want to work with in the right Map Category. To learn about working with Controller Maps, see the <a href="ControllerMaps.html">Controller Maps</a> page.</p>
<p>One possible use of a Layout would be to have alternate map layouts for a controller. For example, you may have several pre-defined alternate controller layouts such as: Default, Inverted, Leftie, Classic, etc. You could choose to load a specific layout based on the player's choice.</p>
<p>Layouts could also be used as simply another categorization level. For example, for a shared controller such as the keyboard, it may be useful to have specific layouts for each player. Your Map Categories could be Default, System, Menu, Infantry, Vehicle, etc. to organize your maps by game mode, while your layouts could be System, Player0, Player1, Player2, etc., to further organize your maps by player.</p>
<p>For any controller type, only one Controller Map may exist in a specific Map Category and Layout.</p>
<p><strong>Creating and Editing Layouts:</strong></p>
<p><a href="RewiredEditor.html#JoystickLayouts">Rewired Editor - Joystick Layouts</a><br />
<a href="RewiredEditor.html#KeyboardLayouts">Rewired Editor - Keyboard Layouts</a><br />
<a href="RewiredEditor.html#MouseLayouts">Rewired Editor - Mouse Layouts</a><br />
<a href="RewiredEditor.html#CustomControllerLayouts">Rewired Editor - Custom Controller Layouts</a></p>
<p><strong>Changing between Controller Maps in different Layouts at runtime:</strong></p>
<p>Controller Maps in a Player can be <a href="HowTos.html#managing-controller-maps-runtime">managed manually</a>, or by using <a href="LayoutManager.html">Layout Manager</a>, a system that assists in managing Controller Maps by Layout.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="MapCategories.html" title="Map Categories"><span class="button-img"></span>Map Categories</a>
<a class="forward-button" href="CustomControllers.html" title="Custom Controllers"><span class="button-img"></span>Layout Manager</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 13709ad3ac2694044957cd437146235f
TextScriptImporter:
userData:

View File

@@ -1,260 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Localization</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Localization
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>As of version 1.1.56.0, Rewired includes a localization system can be used to display localized names for controllers, controller elements, Actions, Action Categories, Map Categories, and other things. Anywhere a name is returned in the API, it will return a localized name if available.</p>
<h3><a name="contents" id="contents"></a>Contents</h3>
<ul>
<li><a href="#quick-setup">Quick Setup</a></li>
<li><a href="#namespace">Namespace</a></li>
<li><a href="#important-classes">Important Classes</a></li>
<li><a href="#localized-string-provider">Localized String Provider</a></li>
<li><a href="#key-format">Key Format</a> </li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="quick-setup" id="quick-setup"></a>Quick Setup</h3>
<p>Add the Localized String Provider component to the Rewired Input Manager (or a child object) by selecting the Game Object and from the menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Localization -&gt;Localized String Provider<br />
</li>
</ul>
<p>Create a JSON file with the keys and localized strings and <a href="#localized-string-provider-inspector">assign it in the inspector</a>. See <a href="#key-format">Key Format</a> and <a href="RewiredEditor.html#tools-export-keys">Exporting JSON keys</a> for more information on how to create the JSON file.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="namespace" id="namespace"></a>Namespace</h3>
<p>All Localization-related classes are in the Rewired.Localization namespace.</p>
<pre class="code">using Rewired.Localization;</pre>
<p>&nbsp;</p>
<hr />
<h3><a name="important-classes" id="important-classes"></a>Important Classes</h3>
<ul>
<li>ReInput.LocalizationHelper - Provides access to all localization-related members. Access via ReInput.localization.</li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="localized-string-provider" id="localized-string-provider"></a>Localized String Provider</h3>
<p>The localized string provider is responsible for performing a string key lookup and returning a localized string. A localized string provider is required to use the localization system.</p>
<p>Any class that implements Rewired.Interfaces.ILocalizedStringProvider can be used as the localized string provider by assigning it to ReInput.localization.localizedStringProvider. The LocalizedStringProviderBase component implements this interface and sets itself as the localized string provider in OnEnable. (The localized string provider should always null the ReInput.localization.localizedStringProvider property when no longer needed, usually in OnDisable.)</p>
<p><strong>LocalizedStringProvider</strong></p>
<p>The LocalizedStringProvider component is the default implementation of a localized string provider.</p>
<p>Add the Localized STring Provider component to the Rewired Input Manager (or a child object) by selecting the Game Object and from the menu:</p>
<ul>
<li>Component -&gt; Rewired -&gt; Localization -&gt; Localized String Provider</li>
</ul>
<p><strong><a name="localized-string-provider-inspector" id="localized-string-provider-inspector"></a>Inspector</strong></p>
<p><img src="files/images/localization-localized-string-provider-inspector.png" width="392" height="76" alt="Localized String Provider inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top">Prefetch</td>
<td width="78%" valign="top"><p>Determines if localized strings should be fetched immediately in bulk when available. If false, localized strings will be fetched when queried.</p>
<p>By default, localized strings are fetched on an as-needed basis. That is, no key lookup is done until the localized string is first displayed. If you want all keys for connected devices to be loaded in bulk, set prefetch to true in the inspector, or in code, ReInput.localizedStringProvider.prefetch = true. Controllers that are not presently connected cannot have their localized strings prefetched, but if prefetch is enabled, all localized strings for that controller will be fetched when it is connected.</p></td>
</tr>
<tr>
<td valign="top">Localized Strings File</td>
<td valign="top"><p>A JSON file containing localizied string key value pairs.<br />
</p></td>
</tr>
</table>
<p></p>
<p><strong><a name="caching" id="caching"></a>Caching</strong></p>
<p>Localized strings are cached when returned from the localized string provider. This prevents wasting CPU resources by constantly doing expensive string key lookups. The localized string cache can be cleared by calling ReInput.localization.Reload. The cache will also be cleared automatically after setting a new localized string provider.</p>
<p><strong><a></a><a></a><a name="localized-string-provider-changing-strings-at-runtime" id="localized-string-provider-changing-strings-at-runtime"></a>Changing Localized Strings at Runtime</strong></p>
<p>You might want to create a different set of localized strings for different languages.</p>
<p>You can set the LocalizedStringProvider.localizedStringsFile property to load a new set of localized strings.</p>
<p>You can also replace the Localized String Provider and all cached strings will be cleared automatically. Just set ReInput.localization.localizedStringProvider to your new provider.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="key-format" id="key-format"></a>Key Format</h3>
<p>The Localization system and the Glyph system share the same keys, so all the information in the glyphs documentation on this topic applies to Localization as well. To avoid duplication of documentation, <a href="Glyphs.html#key-format">please read the the Key Format section of the Glyphs documentation first.</a></p>
<p>Beyond controllers and controller elements covered in the Glyphs documentation, a number of additional names can be localized.</p>
<p>All keys can be exported from the <a href="RewiredEditor.html#Tools">Rewired Editor -&gt; Tools page</a>.</p>
<p>Note: The [brackets] below are not part of the key. Items in brackets represent a variable value.</p>
<p><strong>Additional Localization Keys:</strong></p>
<p>Each of these keys can be defined in the <a href="RewiredEditor.html">Rewired Editor</a>.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">player/[key]</td>
<td valign="top"><p>A Player name.</p></td>
</tr>
<tr>
<td width="78%" valign="top">action/[key]</td>
<td width="22%" valign="top"><p>An Action name, or the name of one pole of an Action (pos/neg).</p></td>
</tr>
<tr>
<td valign="top">action/category/[key]</td>
<td valign="top">An Action Category name.</td>
</tr>
<tr>
<td valign="top">controller_map/category/[key]</td>
<td valign="top">A Controller Map Category name.</td>
</tr>
<tr>
<td valign="top">controller_map/layout/[key]</td>
<td valign="top">A Controller Map Layout name.</td>
</tr>
</table>
<p><br />
</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Actions"><span class="button-img"></span>Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 8a79864d61591a04b8cdd606c4cd293a
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,174 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Map Categories</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Map Categories
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Map Categories are the first level of categorization of <a href="ControllerMaps.html">Controller Maps</a>. Each Controller Map belongs to one <a href="MapCategories.html">Map Category</a> and one <a href="Layouts.html">Layout</a>. The combination of the two serves to identify the Controller Map when selecting a Controller Map in the Rewired Editor or from the API.</p>
<p>Unlike <a href="https://guavaman.com/projects/rewired/docs/Layouts.html">Layouts</a>, all types of controller maps share the same set of Map Categories.</p>
<p>Depending on your game's design, you may choose to use Map Categories for a variety of purposes. One example use would be for a game that has multiple different game modes. In such a game, Map Categories can help you organize controls for your different game modes easier. For example, if you have the following categories each of which correspond to a different game mode: System, Menu, Gameplay Shared, Infantry, Vehicle, Airplane. This allows you to have different control mappings for each game mode. You can use the category to determine which maps should be enabled/disabled when you change your game mode, for example going to the menu screen or getting on/out of a vehicle.</p>
<p>When creating user control assignment screens, you can use the &quot;User Assignable&quot; flag to help determine which categories to display to the user. For example, if your System category contains controls reserved for the system (Save, Load, Exit, etc), you may not want the user to be able to re-assign these. If that's the case, uncheck &quot;User Assignable&quot; and then check for this flag in your mapping screen code. (Some example mapping screen code is included in the Rewired/Examples directory.) Controls in non-user-assignable categories can also be locked from change during assignment conflict checking.</p>
<p>Category selective conflict checking - choose to conflict check some categories with other categories, but not necessarily in both directions. (Useful for complex stacked map setups). To choose which categories the current category should conflict check against, uncheck &quot;Check Conflicts With All&quot; and add categories to &quot;Check Conflicts With Specific Categories.&quot;</p>
<p><strong>Creating and Editing Map Categories:</strong></p>
<p><a href="RewiredEditor.html#MapCategories">Rewired Editor - Map Categories</a></p>
<div class="bottom-pager clearfix">
<a class="back-button" href="ControllerMaps.html" title="Controller Maps"><span class="button-img"></span>Controller Templates</a>
<a class="forward-button" href="Layouts.html" title="Layouts"><span class="button-img"></span>Layouts</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: bb96752bd425da643b692c3c55acde63
TextScriptImporter:
userData:

View File

@@ -1,299 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Map Enabler</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Map Enabler <!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p> Map Enabler enforces persistent enabled states on Controller Maps in a Player. This can be used to make specific Controller Maps be enabled or disabled in a Player, for example when changing game modes that require different input schemes. These settings will persist and be inherited by new Controllers assigned to the Player based on your rules. Enabled states will be sync'd when new Controllers are added, when Controller Maps are loaded, etc.</p>
<p>See <a href="LayoutManager.html">Layout Manager</a> to manage Controller Map Layouts.</p>
<h3>How it Works:</h3>
<p><img src="files/images/map-enabler-diagram-1.png" alt="Map Enabler Diagram" /></p>
<p>&nbsp;</p>
<ol>
<li>Each Player has its own Map Enabler that can be used to manage the Controller Maps for that Player.</li>
<li>The Map Enabler contains a list of <a href="#rule-sets">Rule Sets</a>.</li>
<li>Each Rule Set contains a list of <a href="#rules">Rules</a> which determine what Controller Maps are to be enabled or disabled.</li>
<li>When Apply is called on the Map Enabler (manually or when certain things happen such as when assigning a Controller to a Player or loading Controller Maps), all Rules in all enabled Rule Sets are processed one at a time in order. Controller Maps for the matching Controllers are enabled or disabled to comply with each Rule.</li>
</ol>
<h3>Tips:</h3>
<ul>
<li>Rule Sets can be disabled so the Rules contained within are ignored when Apply is called.</li>
<li>Only Controller Maps that are matched by one or more Rule in an enabled Rule Set will be managed. Any other Controller Maps in the Player will be unmanaged.</li>
<li>Controller Maps managed by Map Enabler must already be loaded in the Player. Map Enabler does not load or unload any Controller Maps. It only changes the enabled state on already-loaded Controller Maps or on Controller Maps at the time they are loaded in the Player.</li>
<li>One way of working with Rule Sets is to split up your Rules into many single-purpose Rule Sets, assign all the Rule Sets to your Player, starting them disabled, and selectively enable combinations of groups of Rule Sets to achieve different modes.</li>
<li>Another way of working with Rule Sets is to stack many Rules into a Rule Set definining an entire mode in one Rule Set and just enable or swap out the Rule Set.</li>
<li>You should not manually set enabled states
on Controller Maps that are managed by this class, but instead change enabled state settings by changing the Rule Sets and/or Rules and applying those changes to the Map Enabler.</li>
<li>Map Enabler works in conjuction with <a href="LayoutManager.html">Layout Manager</a>. It's recommended you use both systems together to manage both Layouts and Controller Map enabled states.</li>
<li>The Map Enabler must be enabled or it will not manage Controller Maps. The Map Enabler can be enabled and disabled from a script at runtime or on start from the <a href="RewiredEdtior.html#Players">Rewired Editor - Players</a> page.</li>
<li>After changing Rule Sets or Rules in the Map Enabler, you should call MapEnabler.Apply to make these changes commit to the Player's Controller Maps.</li>
<li>MapEnabler.Apply is called in the Player automatically every time Apply is called in the Layout Manager to make sure newly loaded Controller Maps are enabled or disabled as required.</li>
</ul>
<h3>Accessing from Scripts:</h3>
<pre class="code">player.controllers.maps.mapEnabler
</pre>
<h3><a name="rule-sets" id="rule-sets"></a>Rule Sets: </h3>
<p>A Rule Set is a collection of Rules.</p>
<p><strong><a name="creating-rule-sets" id="creating-rule-sets"></a>Creating Rule Sets:</strong></p>
<p>Rule Sets can be created in the <a href="RewiredEditor.html#MapEnablerRules">Rewired Editor</a> or created at runtime via scripting.</p>
<p><strong><a name="creating-rule-sets-editor" id="creating-rule-sets-editor"></a>Creating Rule Sets in the Rewired Editor:</strong></p>
<p>Rule Sets can be created in the <a href="RewiredEditor.html#MapEnablerRules">Rewired Editor on the Map Enabler Rules page</a>. After creating the rules, you must assign them to Players on the Players page or they will not be used. </p>
<p>Alternately, Rule Sets created in the Rewired Editor can be loaded via scripting and added to the Player's Map Enabler as follows:</p>
<pre class="code">
<span class="comment">// Create an instance of a Rule Set defined in the Rewired Editor</span>
var ruleSet = ReInput.mapping.GetControllerMapEnablerRuleSetInstance(ruleSetId);
<span class="comment">// Add the Rule Set to the Player's Map Enabler</span>
player.controllers.maps.mapEnabler.ruleSets.Add(ruleSet);
<span class="comment">// Apply the changes to the Player's Controller Maps</span>
player.controllers.maps.mapEnabler.Apply(); </pre>
<p>Rule Sets created in the Rewired Editor are instantiated per-Player on initialization. They are not shared among Players. A Rule Set can be modified at runtime on one Player and that change will not be reflected in the Rule Sets owned by other Players. </p>
<p><strong><a name="creating-rule-sets-scripting" id="creating-rule-sets-scripting"></a>Creating Rule Sets via Scripting:</strong></p>
<p>Rule Sets can be created and assigned at runtime.</p>
<p>This example shows creating two Rule Sets.</p>
<pre class="code">
<span class="comment">// Exclusively enables Controller Maps in the &quot;GameplayShared&quot; and &quot;Infantry&quot; categories for all Controllers</span>
private ControllerMapEnabler.RuleSet mapEnabler_default = new ControllerMapEnabler.RuleSet() {
<span class="comment"> // Enable the Rule Set. This is unnecessary since Rule Sets start enabled by default.</span>
enabled = true,
<span class="comment"> // Create a tag if you want to find this Rule Set via scripting in the list</span>
tag = "default",
<span class="comment">// Create the list of Rules for this Rule Set</span>
rules = {
<span class="comment">// First disable all Controller Maps for all Controllers</span>
new ControllerMapEnabler.Rule() {
enable = false,
controllerSetSelector = ControllerSetSelector.SelectAll()
},
<span class="comment">// Enable Controller Maps in the &quot;GameplayShared&quot; and &quot;Infantry&quot; categories in all Layouts for all Controllers</span>
new ControllerMapEnabler.Rule() {
enable = true,
controllerSetSelector = ControllerSetSelector.SelectAll(),
categoryNames = new[] { "GameplayShared", &quot;Infantry&quot; }
}
}
};
<span class="comment">// Exclusively enables Controller Maps in the &quot;GameplayShared&quot; category in the &quot;Leftie&quot; Layout for Joysticks only</span>
private ControllerMapEnabler.RuleSet mapEnabler_default_leftieJoystick = new ControllerMapEnabler.RuleSet() {
tag = "leftie_joystick",
rules = {
<span class="comment">// First disable all Controller Maps for all Joysticks</span>
new ControllerMapEnabler.Rule() {
enable = false,
controllerSetSelector = ControllerSetSelector.SelectControllerType(ControllerType.Joystick)
},
<span class="comment">// Enable Controller Maps in the &quot;GameplayShared&quot; category in the &quot;Leftie&quot; Layout for all Joysticks</span>
new ControllerMapEnabler.Rule() {
enable = true,
controllerSetSelector = ControllerSetSelector.SelectControllerType(ControllerType.Joystick),
categoryName = "GameplayShared",
layoutName = "Leftie"
}
}
};</pre>
<p><strong><a name="enabling-disabling-rule-sets" id="enabling-disabling-rule-sets"></a>Enabling and disabling Rule Sets:</strong></p>
<p>Rule Sets can be enabled and disabled to control whether they are evaluated or not when <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_ControllerMapEnabler_Apply.htm">ControllerMapEnabler.Apply</a> is called or whenever rules are evaluated.</p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_ControllerMapEnabler_ruleSets.htm">ControllerMapEnabler.ruleSets</a> contains a List&lt;<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapEnabler_RuleSet.htm">ControllerMapEnabler.RuleSet</a>&gt; which can be searched and modified like any other generic list. Find the Rule Set(s) you want to change the enabled state on, change the state, then call <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/M_Rewired_ControllerMapEnabler_Apply.htm">ControllerMapEnabler.Apply</a> to evaluate the rules and apply the changes to the Player's Controller Maps.</p>
<pre class="code"><span class="comment">// Disable all Rule Sets</span>
foreach(var ruleSet in player.controllers.maps.mapEnabler.ruleSets) {
ruleSet.enabled = false;
}
<span class="comment">// Enable the Rule Set with the tag &quot;UI&quot;</span>
player.controllers.maps.mapEnabler.ruleSets.Find(item =&gt; item.tag == &quot;UI&quot;).enabled = true;
<span class="comment">// Apply the changes to the Player's Controller Maps</span>
player.controllers.maps.mapEnabler.Apply(); </pre>
<h3><a name="rules" id="rules"></a>Rules:</h3>
<p>Rules are individual commands that are evaluated and applied to all matching Controller Maps in the Player to determine which Controller Maps should be enabled or disabled. Each Rule in a Rule Set is evaluated in sequence.</p>
<p>Rules contain 4 pieces of information:</p>
<ol>
<li>Controller Selector - Determines which Controller(s) the Rule applies to. Only Controller Maps for the specific Controller(s) will be managed by this Rule.</li>
<li>Categories - Determines which Controller Map(s) this Rule applies to by Map Category.</li>
<li>Layouts - Determines which Controller Map(s) this Rule applies to by Layout.</li>
<li>Enabled - Determines whether the Controller Map(s) should be enabled or disabled.</li>
</ol>
<p>When Map Enabler evaluates the Rules, for the specified Controller(s), it will enable or disable any Controller Maps in the Player that match the specified criteria in the Rule.</p>
<p>Rules can be created in the <a href="RewiredEditor.html#MapEnablerRules">Rewired Editor on the Map Enabler Rules page</a> or created <a href="#creating-rule-sets-scripting">at runtime via scripting</a>.</p>
<h3><a name="faq" id="faq"></a>FAQ:</h3>
<p><strong>Q: Can I select a Rule Set or Rule at runtime using the Id instead of a Tag?</strong></p>
<p>A: The Id cannot be used to select a Rule Set or Rule in a Player at runtime. Rule Sets can be defined entirely in code and can also be duplicated at runtime, in which case they would not have an id that would correspond to the other Rule Set definitions that exist in the Rewired Input Manager.</p>
<p>The Id constant which can be exported for rule sets exists only for the purpose of instantiating that Rule Set (loading it from the Rewired Input Manager) into a Player. That is not a common thing to do since most of the time you will assign these Rule Sets to your Player in the Rewired Editor and they will be loaded for you when the application starts. Once the application starts, Rule Sets are instantiated for each Player, after which point they have no connection anymore to the parent Rule Set definition from which they came.</p>
<h3>API Reference:</h3>
<ul>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapEnabler.htm">ControllerMapEnabler</a></li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapEnabler_RuleSet.htm">ControllerMapEnabler.RuleSet</a></li>
<li><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ControllerMapEnabler_Rule.htm">ControllerMapEnabler.Rule</a></li>
</ul>
<div class="bottom-pager clearfix">
<a class="back-button" href="LayoutManager.html" title="Documentation"><span class="button-img"></span>Layout Manager</a>
<a class="forward-button" href="CustomControllers.html" title="Players"><span class="button-img"></span>Custom Controllers</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 916f61e969405fe4e88b5ae194cff2ff
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,416 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Overview</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Overview
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Rewired is an advanced input system for Unity with many powerful features.</p>
<h2>Features:<br />
</h2>
<ul>
<li>Works in Unity free and Pro.</li>
<li>Player-centric input system.</li>
<li>Full hot-plugging support on Windows, OSX, Linux, Windows 10 Universal, WebGL, Xbox One, Xbox Series S/X, PS4, PS5, and Nintendo Switch. (Other platforms depend on Unity's input system's support for hot-plugging on that platform.)</li>
<li>Extended native input support on several platforms.</li>
<li>Optional XInput support for Windows (mandatory for Windows 8 Store).</li>
<li>Fallback on Unity input for all other platforms. Most features still work.</li>
<li>Intelligent auto assignment and re-assignment of controllers to players on connect/disconnect with configurable options to tune the assignment to your needs.</li>
<li>Connect, pre-disconnect, and disconnect events.</li>
<li>Get input in Update, Fixed Update, and OnGUI -- you choose which loops update runs in, one or multiple as needed.</li>
<li>Customizable and saveable controller maps -- export mappings to XML or JSON and save how you choose (example included using PlayerPrefs, but save however you like.)</li>
<li>Included Control Mapper system using Unity GUI allows your players to rebind controls at runtime.</li>
<li>Display glyphs or text for controller elements for UI help. Create your own glyphs or use the included ones.</li>
<li>User-defined localization of all strings including controller and controller element names.</li>
<li>Unlimited mapping layouts per controller.</li>
<li>Controller Templates (see Controllers section).</li>
<li>Included on-screen touch controls for mobile platforms. (Unity 5.0+)</li>
<li>Editor GUI for creating Actions, Input Behaviors, Joystick/Keyboard/Mouse maps, categories, etc.</li>
<li>Editor GUI for creating and editing Joystick Hardware Maps (for adding new fully-supported joysticks).</li>
<li>Editor GUI for creating and editing Controller Templates (for adding new templates or adding new joysticks to a template).</li>
<li>Extremely versatile -- can be used for simple 1-player games all the way to highly complex multi-player games with complex mapping requirements. Gives the developer a high level of control and doesn't try to force you into a specific one-size-fits-all mold.</li>
</ul>
<h4>Controllers:<br>
</h4>
<ul>
<li>Functional support for most USB and Bluetooth controllers <span style="vertical-align: super; font-size: 65%;">[<a href="#clarifications">1</a>]</span> (see below).</li>
<li><a href="SupportedControllers.html">Extended support for many game controllers of all types</a> on numerous platforms.</li>
<li>Supported controllers are recognized on each platform and are fully mapable by element name and have standardized axis directions.</li>
<li>For any controller not included, you can map an Unknown controller which includes all possible buttons/axes on the platform (Windows 128 buttons &amp; 32 axes, etc.) Regardless of whether you define a map for this, users will always be able to manually map every element on the controller. This means support for the vast majority of USB and Bluetooth controllers. <span style="vertical-align: super; font-size: 65%;">[<a href="#clarifications">1</a>]</span></li>
<li>Controller template system so you can either choose to create default maps for every controller you wish to explicitly support, or save time and just map the template. All controllers that use that template will be mapped automatically. Rewired comes with controller templates for gamepads, flight controllers, racing wheels, and 6-dof controllers. User can always map any remaining controller elements even if they're not defined on the template.</li>
<li>Named buttons and controller elements for supported controllers (for help messages and config screens).</li>
<li>Vibration (Windows, Windows 10 Universal, OSX, Linux, XBox One, Xbox Series S/X, PS4, PS5, and Nintendo Switch currently).</li>
<li>Advanced controller features such as vibration, touchpad, light, and gyro on the Sony DualShock 4 and DualSense controllers.</li>
<li>Custom Controllers - Any source can be used to drive the controller's element values. Custom Controllers can be used for on-screeen touch controllers and more.</li>
</ul>
<h4>Mapping:<br>
</h4>
<ul>
<li>Powerful controller mapping system that allows you to create highly complex input schemes for any style of game.</li>
<li>Unlimited maps per controller, per Player.</li>
<li>Maps stack so you can have as many maps for each controller as you need. For example: If you have multiple game modes such as Infantry, Tank, Airplane, you can have shared controls on one map, and mode-specific controls each on its own map. You can have even more maps as needed: A Menu map for when you're in the menus, a system map for controls like Save/Load and Quit, multiple maps for different players on the keyboard, etc.</li>
<li>Enable / disable maps as needed, for example, when changing game modes.</li>
<li>A shared controller (the keyboard for example) can be mapped by any number of players with any number of maps.</li>
<li>All maps are owned by the player, so changes you make to one player's maps don't affect the others even if it's on the same controller.</li>
<li>Map axes to buttons and buttons to axes if you choose.</li>
<li>Split axes - allows you to map one pole of an axis to an action and the other pole to another action if you want.</li>
<li>Axis Contribution - you can choose how your button or axis affects the final Action's value. A button can generate positive or negative values on an Action's final axis value.</li>
<li>Save maps to XML or JSON.</li>
</ul>
<h4>Input:<br />
</h4>
<ul>
<li>Standard Unity lingo: GetButton, GetButtonDown, GetAxis.</li>
<li>Poll for input as per Unity standard practice or use event-based input to get input without polling.</li>
<li>Input is handled through the Player class: player.GetAxis(&quot;actionName&quot;).</li>
<li>Get input directly from elements by index if necessary.</li>
<li>Get Action input by action name or action id.</li>
<li>Positive and negative buttons.</li>
<li>Double-press/click support with customizable timing.</li>
<li>GetButtonDown buffer -- allows you to make GetButtonDown respond for longer than a single frame to help with timing issues when user is pressing the button rapidly.</li>
<li>Keyboard modifier support - Map keyboard controls with up to 3 modifiers - Control, Alt, Shift, and Command (mac).</li>
<li>Axis calibration (min, max, zero, deadzone, sensitivity)</li>
</ul>
<h4>Players:<br />
</h4>
<ul>
<li>Unlimited number of players.</li>
<li>Supports multiple controllers per player.</li>
<li>Convenient System player for handling system actions - Save, Load, etc.</li>
<li>Define starting maps for joystick, keyboard, and mouse per-player.</li>
</ul>
<h4>Actions:<br />
</h4>
<ul>
<li>Define actions in the editor.</li>
<li>Action categories for organizational convenience.</li>
<li>Set user-assignable flag on an Action or Action Category to allow or prevent certain actions from showing up in lists (useful for mapping screens.)</li>
</ul>
<h4>Input Behaviors:<br />
</h4>
<ul>
<li>Input Behaviors allow you to set options for digital axis simulation (sensitivity, gravity, etc.), how to handle mouse axes, a GetButtonDown buffer, button double press speed, button dead zone, and more.</li>
<li>Each Action is assigned an Input Behavior, so if you have many actions that need to behave the same way, you don't have to duplicate the information, just set them to use the same Input Behavior.</li>
<li>Per-player, and run-time modifiable.</li>
<li>Save to XML or JSON.</li>
</ul>
<h4>Map categories:<br />
</h4>
<ul>
<li>Categorize your maps by any criteria you choose. For example: System, Menu, Gameplay Shared, Infantry, Vehicle, Airplane.</li>
<li>Set user-assignable flag on a category to allow or prevent user-assignment of certain controls (system controls should be protected from change, for example).</li>
<li>Category selective conflict checking - choose to conflict check some categories with other categories, but not necessarily in both directions. (Useful for complex stacked map setups).</li>
</ul>
<h4>Map Layouts:<br />
</h4>
<ul>
<li>Multiple layouts per category. Allows you to have optional controller layouts.</li>
</ul>
<h4>Other:<br />
</h4>
<ul>
<li>Input Manager is self-contained so you can actually have separate input managers for different levels if you choose with entirely different mappings, etc. (Not necessary but interesting!)</li>
<li>Functions for mapping conflict checking</li>
<li>Documentation</li>
</ul>
<h4>Performance:</h4>
<ul>
<li>Rewired is fast, written in C#, and tuned for performace.</li>
<li>ZERO bytes of memory allocated per-frame during gameplay situations means no garbage collection overhead.* (Some allocations required during remapping).<br />
* Fallback platforms have periodic very small allocations as it polls Input.GetJoystickNames() every second or two to detect joystick changes.<!-- end .content --></li>
<li>The vast majority of code is included in a DLL, so it won't slow down your script compilation during development.</li>
</ul>
<h4>Limitations:</h4>
<ul>
<li>Rewired is not for those who want to make games with zero coding knowledge. <strong>Coding is required.</strong></li>
</ul>
<h4>Requirements:</h4>
<ul>
<li><a href="https://unity3d.com" target="_blank">Unity 4.3</a> or later, Free or Pro.</li>
<li><a href="https://unity3d.com" target="_blank">Unity 5.0</a> or later required for Control Mapper.</li>
<li><a href="https://unity3d.com" target="_blank">Unity 5.0</a> or later required for Glyphs.</li>
<li><a href="https://unity3d.com" target="_blank">Unity 5.0</a> or later required for WebGL native input and Touch Controls.</li>
<li>OSX 10.5 or later is required for the OSX Unity editor and OSX Standalone builds.</li>
</ul>
<h4><a name="tested-platforms" id="tested-platforms"></a>Tested Platforms:</h4>
<p>Rewired has been tested on the following platforms. Others may work but have not been tested. The following table shows which platforms / scripting backends include native input libraries for enhanced reliability and feature support. All non-native platforms will run on top of Unity's input system and still provide most features.</p>
<p>For platforms using native libraries, the devices supported natively are listed below. If a device type is not listed such as &quot;mouse&quot;, it is supported through the use of Unity's input system at the base but will still work as expected.</p>
<table width="100%" border="1">
<tr>
<td><strong>Platform</strong></td>
<td><strong>.NET/Mono Scripting Backend</strong></td>
<td><p><strong>IL2CPP Scripting Backend</strong></p></td>
</tr>
<tr>
<td>Windows Standalone 32-bit/64-bit</td>
<td align="center"><span class="native">Native</span><br />
<span class="note">(keyboard, mouse, controllers)</span></td>
<td align="center"><span class="native">Native</span><br />
<span class="note">(keyboard, mouse, controllers)</span></td>
</tr>
<tr>
<td>Windows 10 Universal 32-bit/64-bit</td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span> </span></td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span> </span></td>
</tr>
<tr>
<td>Windows Webplayer</td>
<td align="center"><p><span class="unity-input">Unity</span></p></td>
<td align="center">--</td>
</tr>
<tr>
<td>OSX Standalone 32-bit/64-bit/Universal</td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span> </span></td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span></span></td>
</tr>
<tr>
<td>OSX Webplayer</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center">--</td>
</tr>
<tr>
<td>Linux <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">3</a>]</span></td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span> </span></td>
<td align="center">--</td>
</tr>
<tr>
<td>WebGL</td>
<td align="center">--</td>
<td align="center"><span class="native">Native<br />
<span class="note">(controllers)</span> </span></td>
</tr>
<tr>
<td>Android</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center"><span class="unity-input">Unity</span></td>
</tr>
<tr>
<td>iOS</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center"><span class="unity-input">Unity</span></td>
</tr>
<tr>
<td>Sony PSM (Sony PlayStation Vita)</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center">--</td>
</tr>
<tr>
<td>Sony PlayStation 4 <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">4</a>]</span></td>
<td align="center"><span class="semi-native">Semi Native</span> <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">2</a>]</span><br />
<span class="note">(controllers)</span></td>
<td align="center"><span class="semi-native">Semi Native</span> <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">2</a>]</span><br /><span class="note">(controllers)</span></td>
</tr>
<tr>
<td>Sony PlayStation 5 <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">4</a>]</span></td>
<td align="center">--</td>
<td align="center"><span class="semi-native">Semi Native</span> <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">2</a>]</span><br />
<span class="note">(controllers)</span></td>
</tr>
<tr>
<td>Microsoft XBox One (XDK)</td>
<td align="center"><span class="semi-native">Semi Native</span> <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">2</a>]</span><br />
<span class="note">(controllers)</span></td>
<td align="center"><span class="semi-native">Semi Native</span> <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">2</a>]</span><br />
<span class="note">(controllers)</span></td>
</tr>
<tr>
<td>Microsoft Xbox One, Series S/X (Game Core) <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">4</a>]</span></td>
<td align="center">--</td>
<td align="center"><span class="native">Native</span></td>
</tr>
<tr>
<td>Nintendo Switch <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">4</a>]</span></td>
<td align="center">--</td>
<td align="center"><span class="native">Native<br />
<span class="note">(keyboard, controllers)</span><br />
</span></td>
</tr>
<tr>
<td>Google Stadia <span style="vertical-align: super; font-size: 65%">[<a href="#clarifications">4</a>]</span></td>
<td align="center">--</td>
<td align="center"><span class="native">Native<br />
<span class="note">(keyboard, mouse, controllers)</span></span></td>
</tr>
<tr>
<td>Apple TV (tvOS)</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center"><span class="unity-input">Unity</span></td>
</tr>
<tr>
<td>Amazon Fire TV</td>
<td align="center"><span class="unity-input">Unity</span></td>
<td align="center"><span class="unity-input">Unity</span></td>
</tr>
</table>
<p><a name="clarifications" id="clarifications"></a> </p>
<p style="font-size: 65%"><span style="vertical-align: super">1</span> Controller must be compatible with underlying system. On Windows the controller must be compatible with Raw Input, Direct Input, or XInput. On OSX, it must be compatible with I/O Kit. On Linux, it must be compatible with UDev. Support for exotic controller types not guaranteed.</p>
<p style="font-size: 65%"><span class="superscript">2</span> These platforms make use of Unity's special platform-specific input classes which allow for much greater control over input than with just UnityEngine.Input and are functionally equivalent to native input libraries.</p>
<p style="font-size: 65%">3 Linux native support has been tested under Ubuntu 12.04 amd64, Ubuntu 14.04 x86/amd64, Ubuntu 15.04 amd64, Ubuntu 17.04 amd64, Mint 17.2 amd64, and SteamOS. Compatibility with other distros is not guranteed or implied. </p>
<p style="font-size: 65%">4 Platform requires additional plugin. <a href="SpecialPlatformSupport.html">See documentation for details.</a></p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
<a class="forward-button" href="ReleaseNotes.txt" title="Installation"><span class="button-img"></span>Release Notes</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 8ba6ef1727db116498b47616c0bb2a2d
TextScriptImporter:
userData:

View File

@@ -1,440 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Player Controllers</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Player Controllers<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p><strong><a href="#overview">Overview</a></strong></p>
<p><strong><a href="#controllers">Controllers</a></strong></p>
<ul>
<li><a href="#player-controller">Player Controller</a></li>
<li><a href="#player-mouse">Player Mouse</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h2><a name="overview" id="overview"></a>Overview</h2>
<p>A Player Controller is a form of a controller that uses a Player's Actions as the source of input for element values. Essentially, it is a controller-shaped interface for a Rewired Player. Player Controllers were primarily developed for the Player Mouse which can be used to easily create a virtual mouse pointer which can be used to interact with Unity UI using any underlying controller type. Regardless, a Player Controller could be used for any purpose you want.</p>
<p>Player Controllers are not equivalent to other Rewired Controllers and do not perform the same function. They do not exist unless you instantiate them, they cannot be mapped with Controller Maps, their bindings can't be saved and loaded, etc. They exist completely separately from all other Controllers in Rewired, and they are completely managed from creation to destruction by you.</p>
<p>To illustrate the relationship between a Player Controller's element values and the underlying Player, take for example, a Player Controller with 2 axes and 1 button. These elements could be mapped as follows:</p>
<ul>
<li>X Axis = Player 0, &quot;Move Horizontal&quot;</li>
<li>Y Axis = Player 0, &quot;Move Vertical&quot;</li>
<li>Button 1 = Player 0, &quot;Fire&quot;</li>
</ul>
<p>When you get the value of &quot;Button 1&quot; from the Player Controller, it is equivalent to calling player.GetButton(&quot;Fire&quot;) on Player 0.</p>
<p>Player Controller elements may modify the values received from the Player and output a processed value. For example, for a Player Mouse, you would normally want the X and Y axes to return relative delta values like a real mouse. The Player Mouse's axes can transform absolute axis input coming from a Player into a relative delta value so the consumer of the input can be written to simply expect mouse delta values.</p>
<p>Do not confuse Player Controllers with <a href="CustomControllers.html">Custom Controllers</a>. They do not serve the same purpose.</p>
<p>&nbsp;</p>
<hr />
<h2><a name="controllers" id="controllers"></a>Controllers</h2>
<h3><a name="player-controller" id="player-controller"></a>Player Controller</h3>
<p>Player Controller is a controller that uses Player Actions as the input sources for controller elements. Player Controller can be created with any number of axes and buttons and may be configured however you like.</p>
<p>A Player Controller uses a single Player as the source of input for its elements. Each element must have an Action assigned to it in order for it to return input values.</p>
<p><strong>Creating</strong></p>
<p>You can create a Player Controller in two ways:</p>
<ul>
<li>Add the Player Controller component to a GameObject and configure settings in the inspector.</li>
<li>Instantiate a PlayerController via scripting:</li>
</ul>
<pre class="code"><span class="comment">// Create definition object to pass in values when creating the Player Controller</span>
PlayerController.Definition definition = new PlayerController.Definition() {
playerId = 0 <span class="comment">// set the owning Player</span>
};
<span class="comment">// Create a list of elements you want in the Player Controller</span>
definition.elements = new List&lt;PlayerController.Element.Definition&gt;() {
<span class="comment">// Create an Axis 2D called "Stick" and assign "Horizontal" and "Vertical" to the two axes.</span>
new PlayerController.Axis2D.Definition() {
name = "Stick",
xAxis = new PlayerController.Axis.Definition() {
actionName = "Horizontal"
},
yAxis = new PlayerController.Axis.Definition() {
actionName = "Vertical"
}
},
<span class="comment">// Create a Button called "Button 1" and assign "Fire".</span>
new PlayerController.Button.Definition() {
name = "Button 1",
actionName = "Fire"
}
};
<span class="comment">// Create the Player Controller</span>
PlayerController playerController = PlayerController.Factory.Create(definition);
<span class="comment">// ... use the controller</span>
</pre>
<p style="background-color: #ffff00"><strong><a name="player-controller-additional-info" id="player-controller-additional-info"></a>Additional Info</strong></p>
<p>The PlayerController Component is a wrapper class for the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_PlayerController.htm">PlayerController</a> class and exists in the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/N_Rewired_Components.htm">Rewired.Components</a> namespace. If you create a PlayerController by adding a Component on a GameObject, you can access it from scripts by calling GetComponent&lt;<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Components_PlayerController.htm">Rewired.Components.PlayerController</a>&gt;(). You cannot use GetComponent with the non-Monobehaviour derived class PlayerController.</p>
<p><strong><a name="player-controller-inspector-options" id="player-controller-inspector-options"></a>Inspector Options</strong></p>
<p><img src="files/images/playercontrollers_playercontroller_inspector.png" alt="Touch Controller Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top"><strong>General Options</strong></td>
<td width="78%" valign="top"><p>&nbsp;</p></td>
</tr>
<tr>
<td valign="top">Rewired Input Manager</td>
<td valign="top">(Optional) Link the Rewired Input Manager here for easier access to Action ids, Player ids, etc.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Properties</strong></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">Player Id / Player</td>
<td valign="top">The Player used for the source of input.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Elements</strong></td>
<td valign="top">The elements that will be created in the controller.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Events</strong></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">On Button State Changed</td>
<td valign="top">Triggered the first frame the button is pressed or released.</td>
</tr>
<tr>
<td valign="top">On Axis Value Changed</td>
<td valign="top">Triggered when the axis value changes.</td>
</tr>
<tr>
<td valign="top">On Enabled State Changed</td>
<td valign="top">Triggered when the controller is enabled or disabled.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h3><a name="player-mouse" id="player-mouse"></a>Player Mouse</h3>
<p>A Player Mouse is a type of <a href="#player-controller">Player Controller</a>. In addition to the features of Player Controller, Player Mouse also tracks a screen position which can be used to drive a software mouse pointer. The default setup's axes output delta values regardless of the underlying input source for those axes, so a Player Mouse can be used in scripts that were written expecting mouse input, but the actual input can come from a joystick or the keyboard for example.</p>
<p><strong>Creating</strong></p>
<p>You can create a Player Mouse in two ways:</p>
<ul>
<li>Add the Player Mouse component to a GameObject and configure settings in the inspector.</li>
<li>Instantiate a PlayerMouse via scripting:</li>
</ul>
<pre class="code"><span class="comment">// Create the Player Mouse with the default elements and options</span>
PlayerMouse mouse = PlayerMouse.Factory.Create();
<span class="comment">
// Set the owner</span>
mouse.playerId = playerId;
<span class="comment">// Set up Actions for each axis and button</span>
mouse.xAxis.actionName = horizontalAction;
mouse.yAxis.actionName = verticalAction;
mouse.wheel.yAxis.actionName = wheelAction;
mouse.leftButton.actionName = leftButtonAction;
mouse.rightButton.actionName = rightButtonAction;
mouse.middleButton.actionName = middleButtonAction;
<span class="comment">// ... use the mouse</span></pre>
<p><strong>Element Actions</strong></p>
<p>Actions are used to provide value to each controller element.</p>
<p>You must create Actions in the Rewired Input Manager for each of mouse elements you want to use. It doesn't matter what these Actions are named, but each Player Mouse element must be assigned an Action from which it will draw its value. As per standard Rewired practice, the you must assign these Actions to Controller Maps of various types and assign those to the Player in order for them to be used.</p>
<p>For example, if you want to control the mouse pointer with the physical mouse, you will need to create a Mouse Map with at least the Left Button assigned to your Action, then assign that Mouse Map to your Player. (The X and Y axis values will be taken from the physical mouse's screen position if Use Hardware Pointer Position is enabled and the Player has the physical mouse assigned to it -- player.controllers.hasMouse == true.) </p>
<p>If you want to control the mouse pointer with a gamepad, you will need to create a Joystick Map with the Actions assigned to at least the Left Stick X/Y and some buttons. That Joysick Map needs to be assigned to the same Player that owns the Player Mouse.</p>
<p>In both cases, you must assign the Actions that you want to control the Player Mouse's X, Y, Wheel axes and Left, Right, and Middle buttons in the Elements fields in the inspector or via scripting after instantiating the Player Mouse.</p>
<p>If this sounds confusing, study the <a href="#player-mouse-inspector-options">Player Controller inspector</a> above looking at the Elements section. See how the X axis is assigned the Action &quot;Horizontal&quot; and the Y axis is assigned the Action &quot;Vertical&quot;. This means the value of the X axis comes from the Player's &quot;Horizontal&quot; Action and the value of the Y axis comes from the Player's &quot;Vertical&quot; Action. It's exactly the equvalent of this:</p>
<ul>
<li>Player Mouse X = player0.GetAxis(&quot;Horizontal&quot;);</li>
<li>Player Mouse Y = player0.GetAxis(&quot;Vertical&quot;);</li>
</ul>
<p><strong>Displaying a Pointer</strong></p>
<p>The Player Mouse does not include a pointer. It is up to you to provide a pointer of the type you choose and set it up to be driven by the Player Mouse's screen position. The most common way to do this would be to use the OnScreenPositionChangedEvent in the inspector and link it to a script on your pointer which takes the screen position and moves the object. (You can also use the equivalent event in scripting to achieve the same thing.)</p>
<p>An example of how to position a Sprite pointer:</p>
<pre class="code">public void OnScreenPositionChanged(Vector2 screenPosition) {
Vector3 worldPos = Camera.main.ScreenToWorldPoint(new Vector3(screenPosition.x, screenPosition.y, distanceFromCamera));
pointer.transform.position = worldPos;
}</pre>
<p>An example of how to position the pointer on a Unity UI Canvas:</p>
<pre class="code">public void OnScreenPositionChanged(Vector2 screenPosition) {
RectTransform canvasRectTransform = transform.root.GetComponentInChildren&lt;Canvas&gt;().GetComponent&lt;RectTransform&gt;();
Rect rootCanvasRect = canvasRectTransform.rect;
Vector2 viewportPos = Camera.main.ScreenToViewportPoint(screenPosition);
viewportPos.x = (viewportPos.x * rootCanvasRect.width) - canvasRectTransform.pivot.x * rootCanvasRect.width;
viewportPos.y = (viewportPos.y * rootCanvasRect.height) - canvasRectTransform.pivot.y * rootCanvasRect.height;
(transform as RectTransform).anchoredPosition = viewportPos;
}</pre>
<p><strong>Enabling and Disabling</strong></p>
<p>When the Player Mouse component or GameObject is disabled, the Player Mouse will no longer return any values or trigger any events. You can use the OnEnabledStateChanged event to enable and disable the target pointer by simply enabling and disabling the Player Mouse.</p>
<p><strong>Absolute and Relative Coordinate modes</strong></p>
<p>Axes must be set to either Absolute or Relative coordinate mode. This determines the final output value of the axes and how they affect the Screen Position.</p>
<p>Relative coordinate mode should be used when the pointer is intended to be controlled by a joystick or keyboard. Absolute values are converted into delta values and added to the current Screen Position to determine the new position.</p>
<p>Absolute coordinate mode should be used when the pointer is intended to be controlled by a Custom Controller that provides absolute screen coordinates. Values will be applied directly to the Screen Position.</p>
<p>If you have special needs that require you be able to move a single Player Mouse using both Absolute and Relative axis values, you should set up the axes in Relative mode and feed those values in as Actions, and for the Absolute values, feed them in directly into the Screen Position property using a script.</p>
<p style="background-color: #ffff00"><strong><a name="player-mouse-additional-info" id="player-mouse-additional-info"></a>Additional Info</strong></p>
<p>The PlayerMouse Component is a wrapper class for the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_PlayerMouse.htm">PlayerMouse</a> class and exists in the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/N_Rewired_Components.htm">Rewired.Components</a> namespace. If you create a PlayerMouse by adding a Component on a GameObject, you can access it from scripts by calling GetComponent&lt;<a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Components_PlayerMouse.htm">Rewired.Components.PlayerMouse</a>&gt;(). You cannot use GetComponent with the non-Monobehaviour derived class PlayerMouse.</p>
<p><strong>FAQ:</strong></p>
<p><strong>Q: Why does the software cursor lag behind the OS cursor?</strong></p>
<div></div>
<p>You are simply seeing the difference between hardware cursor rendering and software cursor rendering:<br />
<a href="https://stackoverflow.com/questions/48833250/why-is-the-mouse-cursor-drawn-faster-than-applications"> https://stackoverflow.com/questions/48833250/why-is-the-mouse-cursor-drawn-faster-than-applications</a></p>
<p>There is a reason they use hardware cursor rendering on operating systems -- it's faster and not prone to lag. It won't slow down when the application slows down either.</p>
<p>There is no way possible to make a software cursor perform identically to a hardware cursor. This is simply the nature of software cursors vs hardware.</p>
<p>Other posts on the topic:<br />
<a href="https://www.reddit.com/r/witcher/comments/3cwwfm/what_does_the_hardware_cursor_option_on_pc_do/"> https://www.reddit.com/r/witcher/comments/3cwwfm/what_does_the_hardware_cursor_option_on_pc_do/</a></p>
<p>----------------</p>
<p><strong>Examples</strong></p>
<ul>
<li><a href="Examples.html#player-mouse-sprite">Player Mouse Sprite</a></li>
<li><a href="Examples.html#player-mouse-unity-ui">Player Mouse Unity UI</a></li>
</ul>
<p><strong><a name="player-mouse-inspector-options" id="player-mouse-inspector-options"></a>Inspector Options</strong></p>
<p><img src="files/images/playercontrollers_playermouse_inspector.png" alt="Touch Controller Inspector" /></p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="22%" valign="top"><strong>General Options</strong></td>
<td width="78%" valign="top"><p>&nbsp;</p></td>
</tr>
<tr>
<td valign="top">Rewired Input Manager</td>
<td valign="top">(Optional) Link the Rewired Input Manager here for easier access to Action ids, Player ids, etc.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Properties</strong></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">Player Id / Player</td>
<td valign="top">The Player used for the source of input.</td>
</tr>
<tr>
<td valign="top">Pointer Speed</td>
<td valign="top">The pointer speed. This does not affect the speed of input from the mouse x/y axes if useHardwarePointerPosition is enabled. It only affects the speed from input sources other than mouse x/y or if mouse x/y are mapped to Actions assigned to Axes.</td>
</tr>
<tr>
<td valign="top">Clamp to Movement Area</td>
<td valign="top">If enabled, movement will be clamped to the Movement Area.</td>
</tr>
<tr>
<td valign="top">Movement Area</td>
<td valign="top">The allowed movement area for the mouse pointer.
Set Movement Area Unit to determine the data format of this value.
This rect is a screen-space rect with 0, 0 at the lower-left corner.</td>
</tr>
<tr>
<td valign="top">Movement Area Unit</td>
<td valign="top">The unit format of the movement area. This is used to determine the data format of Movement Area.</td>
</tr>
<tr>
<td valign="top">Use Hardware Pointer Position</td>
<td valign="top">If enabled, the hardware pointer position will be used for mouse input. Otherwise, the position of the pointer will be calculated only from the Axis Action values. The Player that owns this Player Mouse must have the physical mouse assigned to it in order for the hardware position to be used, ex: player.controllers.hasMouse == true.</td>
</tr>
<tr>
<td valign="top"><p>Default To Center</p></td>
<td valign="top"> If enabled, the screen position will default to the center of the allowed movement area. Otherwise, it will default to the lower-left corner of the allowed movement area.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Elements</strong></td>
<td valign="top">The elements that will be created in the controller.</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Events</strong></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">On Button State Changed</td>
<td valign="top">Triggered the first frame the button is pressed or released.</td>
</tr>
<tr>
<td valign="top">On Axis Value Changed</td>
<td valign="top">Triggered when the axis value changes.</td>
</tr>
<tr>
<td valign="top">On Enabled State Changed</td>
<td valign="top">Triggered when the controller is enabled or disabled.</td>
</tr>
<tr>
<td valign="top">On Screen Position Changed</td>
<td valign="top">Triggers when the screen position changes. Link this to your pointer to drive its position.</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Actions.html" title="Actions"><span class="button-img"></span></a><a class="back-button" href="Documentation.html" title="Actions">Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4d386bb188aa5514480a85c7e12e32b7
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,215 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Players</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Players
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>Rewired features a player-centric input system. This means that generally all input is handled through the Player and not the controllers. You simply call <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_GetAxis.htm">player.GetAxis</a>, <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_GetButton.htm">player.GetButton</a>, etc. or register to receive input events with <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/Overload_Rewired_Player_AddInputEventDelegate.htm">player.AddInputEventDelegate</a> to get access to all input regardless of the input sources. For example, you may need to respond to input from the keyboard, mouse, any number of joysticks, and any number of <a href="CustomControllers.html">Custom Controllers</a>. This is handled simply by assigning the controllers and the appropriate maps to the Player and then getting the input directly from the Player. The input you receive from the Player is a combination of input received from all the assigned controllers. Additionally, joysticks can (optionally) be <a href="RewiredEditor.html#Settings">intelligently auto-assigned</a> to Players on connect and disconnect, so you don't have to worry about what controllers each Player owns. Instead, you simply get input for the specific Action you're looking for and Rewired handles the rest.</p>
<p>It may help to think of a Player as a &quot;controller container&quot;. In other words, the Player can contain any number of controllers and controller maps. When you get input from the Player, you're really getting input from any controller owned by the Player that has an enabled Action -&gt; Element mapping.</p>
<p>&nbsp;</p>
<p><img src="files/images/input-mapping-diagram-3.png" alt="Player Input Diagram" /></p>
<p>&nbsp;</p>
<p><strong>Creating / Editing Players</strong></p>
<p>Players are created at runtime by the Input Manager in the scene. You must define Players in the Rewired Editor in order for them to be created at runtime.</p>
<p><strong>Accessing Players</strong></p>
<p>The <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_ReInput_PlayerHelper.htm">ReInput.players</a> property has methods to get access to a Player by id or name or to get a list of all Players. It's recommended you store a reference to the Player in Awake and maintain that reference for the duration of the game. See <a href="HowTos.html#get-player">Getting a Player</a> for an example of how to get a Player.</p>
<p><strong><a name="system-player" id="system-player"></a>System Player</strong></p>
<p>The System player exists as an option for handling system Actions such as Save, Load, etc. You can assign controllers and maps to the System player just as with any other player. Joysticks are never auto-assigned to the System player, but you can assign them manually to the System player through scripting.</p>
<p><strong>Getting Input</strong></p>
<p>In Rewired, you generally get input from the Player, not the controllers themselves. Please see <a href="HowTos.html#get-input">How To's - Getting Input</a> for more information.</p>
<p><strong>Players and Controller Maps</strong></p>
<p><a href="ControllerMaps.html">Controller Maps</a> are what associates controller elements to Actions. As Rewired is a player-centric input system, controller maps aren't stored in the controller, but rather in the Player. This has the benefit of allowing you to share controllers among as many Players as you want while each maintains its own separate set of Action mappings.</p>
<p>The <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player.htm">Player</a> class contains many methods for getting, adding, and removing all types of controller maps. (Access these methods through the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player_ControllerHelper_MapHelper.htm">Player.controllers.maps</a> helper object.) Additionally, assignment conflict checking and saving/loading maps is handled through the Player class.</p>
<p>Even if a controller is assigned to a Player, if no maps are assigned, no input will be possible. You should define starting maps for joysticks, the keyboard, and the mouse for each Player in the <a href="RewiredEditor.html">Rewired Editor</a>. You can also load and assign maps during runtime through scripting via the <a href="https://guavaman.com/projects/rewired/docs/api-reference/?topic=html/T_Rewired_Player.htm">Player</a> class. </p>
<p><strong><a name="controllers" id="controllers"></a>Players and Controllers</strong></p>
<p>A Player is essentially a container for controllers and Controller Maps. The Controller Maps contained in Player provide a means to associate Actions to controller elements (button, key, axis, etc.). There are some slight differences between how the different types of controllers are handled by the Player.</p>
<p>Rewired currently has 4 types of Controller classes:</p>
<ul>
<li>Joystick (a device attached to the system that is not a keyboard or mouse.)</li>
<li>Keyboard</li>
<li>Mouse</li>
<li>Custom Controller</li>
</ul>
<p><strong><a name="joysticks" id="joysticks"></a>Joysticks</strong></p>
<p>Before a Player can return input for a Joystick, that joystick must first be assigned to the Player. The joystick must be added to the Player's list of joysticks before it can receive input from that device. A joystick may be assigned to multiple Players and shared if desired (this would be rare).</p>
<p>By default, Rewired's Joystick Auto-Assignment system is enabled in the Rewired Input Manager. This ensures that each Player is assigned one joystick when it is attached to the system based on rules set in the <a href="RewiredEditor.html#settings">Rewired Input Manager - Settings page</a>. You may disable the auto-assignment system if you have special needs that are not covered by its options. <a href="HowTos.html#assigning-joysticks">See How To's - Assigning Joysticks to Players</a> for information on how to assign Joysticks manually.</p>
<p>For input to be returned in a Player from a Joystick, all of the following must be true:</p>
<ul>
<li>The Joystick must be assigned to the Player.</li>
<li>The Player must have at least one enabled Joystick Map applicable to that joystick.</li>
<li>The Joystick Map must bind at least one joystick element to an Action.</li>
</ul>
<p><strong>Do not be confused:</strong> The fact that a Player &quot;has a Joystick Map&quot; in the Rewired Input Manager is not the same thing as the joystick being assigned to that Player. Maps are entirely separate from joystick assignment and do not influence what joysticks (if any) will be assigned to a Player by the joystick auto-assignment system. Joystick assignment involves adding the Joystick class object to the Player. Once the Joystick is assigned, Rewired will load the Joystick Maps for that particular Joystick in the Player (if one or more applicable Joystick Maps were created and assigned to the Player in the Rewired Editor) and then the Joystick Maps will perform the function of mapping Actions to the elements on that Joystick. If a joystick is assigned to a Player but no matching Joystick Maps are found, that Joystick will not contribute any input in that Player.</p>
<p><strong><a name="keyboard" id="keyboard"></a>Keyboard</strong></p>
<p>In Rewired, the keyboard is a shared controller. Similar to Joysticks, the keyboard must also be assigned to the Player(s) before it will return any input. This can be set at start in the <a href="RewiredEditor.html#players">Rewired Input Manager - Players</a> page, or set via scripting using the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasKeyboard.htm">player.controllers.hasKeyboard</a> property. By default, the keyboard is assigned to all Players on start unless disabled in the Rewired Input Manager.</p>
<p>Just like Joysticks, the keyboard will only return input in a Player if the Player has at least one Keyboard Map that associates some Actions to keys.</p>
<p><strong><a name="mouse" id="mouse"></a>Mouse</strong></p>
<p>Similar to Joysticks, the mouse must also be assigned to the Player(s) before it will return any input. This can be set at start in the <a href="RewiredEditor.html#players">Rewired Input Manager - Players</a> page, or set via scripting using the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/P_Rewired_Player_ControllerHelper_hasMouse.htm">player.controllers.hasMouse</a> property. The mouse may be shared by multiple Players if desired.</p>
<p>Just like Joysticks and the Keyboard, the mouse will only return input in a Player if the Player has at least one Mouse Map that associates some Actions to mouse buttons and axes.</p>
<p><strong><a name="custom-controller" id="custom-controller"></a>Custom Controller</strong></p>
<p><a href="CustomControllers.html">Custom Controllers</a> are very similar to Joysticks in treatment except for the fact that they are never disconnected from the system and are always available. The same rules apply -- the Custom Controller must be assigned to a Player and have one or more valid Custom Controller Maps to return any input value.</p>
<p><strong>See Also</strong></p>
<p><a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Player.htm">API Reference - Player</a></p>
<div class="bottom-pager clearfix">
<a class="back-button" href="InputManager.html" title="Input Manager"><span class="button-img"></span>Input Manager</a>
<a class="forward-button" href="Actions.html" title="Actions"><span class="button-img"></span>Actions</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 44b26b3c1fe7ca2408e87d0dddd441c1
TextScriptImporter:
userData:

View File

@@ -1,294 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Quick Start</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Quick Start
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>This guide will show you how to create a Rewired Input Manager and set up basic input for a 1-player game.</p>
<hr />
<p>1. Install Rewired. Refer to <a href="Installation.html">Installation</a> for more information.</p>
<p>2. Create a Rewired Input Manager in the scene from the menu:<br />
Window -&gt; Rewired -&gt; Create -&gt; Input Manager (in scene).</p>
<p><img src="files/images/quickstart_menu_createinputmanager.png" alt="Create Input Manager" /></p>
<hr />
<p>3. Select the Rewired Input Manager from the scene Hierarchy.</p>
<p><img src="files/images/quickstart_inputmanagerinhierarchy.png" alt="Input Manager in Hierarchy" /></p>
<hr />
<p>4. In the Inspector, click &quot;Launch Rewired Editor.&quot; (See <a href="RewiredEditor.html">Rewired Editor</a> for detailed usage information.)</p>
<p><img src="files/images/quickstart_inputmanagerinspector.png" alt="Launch Rewired Editor" /></p>
<hr />
<p>5. In the navigation bar at the top of the Rewired Editor window, click &quot;Players&quot;.</p>
<p><img src="files/images/quickstart_editor_players1.png" alt="Players" /></p>
<hr />
<p>6. You must have at least one Player to use input. Add a new Player by clicking the &quot;New&quot; button below the Players box.</p>
<p><img src="files/images/quickstart_editor_players2.png" alt="Add new Player" /></p>
<hr />
<p>7. We will come back to Players later to assign controller maps, but first you need to create some Actions. Click the &quot;Actions&quot; button in the navigation bar and create a new Action by clicking the &quot;New&quot; button below the Actions box.</p>
<p><img src="files/images/quickstart_editor_actions1.png" alt="Actions" /></p>
<hr />
<p>8. For each input you will need for your game, create one Action. Create a few actions such as pictured in the example below. The selected Action's properties can be edited in the fields to the right under &quot;Properties.&quot; For movement actions, change the Type to &quot;Axis&quot;. You can give each action a Name, a Descriptive Name, and if the Type is Axis, also give it a Positive Name and a Negative Name. Hover the mouse over each property label to see a description of that property.</p>
<p>Note: Actions can be categorized by first creating Action Categories (or later moved into categories), but to keep this example simple, we will just leave all actions in the Default category.</p>
<p><img src="files/images/quickstart_editor_actions2.png" alt="Actions" /></p>
<hr />
<p>9. Each Action can be assigned an Input Behavior which determines how keyboard keys, buttons, and mouse axes behave. By default, all actions are assigned the &quot;Default&quot; Input Behavior. If you wish to tweak any of the settings or create new Input Behaviors, click the &quot;Input Behaviors&quot; button in the navigation bar. Hover the mouse over each property label for a description. For this guide's purposes, we will just leave the default behavior as is.</p>
<p><img src="files/images/quickstart_editor_inputbehaviors1.png" alt="Input Behaviors" /></p>
<hr />
<p>10. Now let's create a Joystick map. Click &quot;Joystick Maps&quot; in the navigation bar.</p>
<p><img src="files/images/quickstart_editor_joystickmaps1.png" alt="Joystick Maps" /></p>
<hr />
<p>11. You can create maps for any of the fully-supported controllers individually, or to save time, just create a map for the Gamepad Template and all controllers that use that template will automatically have maps created for them. (Any Joystick preceeded by [T] is a template.) Select the &quot;[T] Gamepad Template&quot;, then click &quot;Create Map.&quot;</p>
<p><img src="files/images/quickstart_editor_joystickmaps2.png" alt="Create Joystick Map" /></p>
<hr />
<p>12. Now you will need to create elements and assign actions to them. Click &quot;New&quot; under the &quot;Element&quot; box to create an element. Element Properties will appear to the right for the selected element. Assign a joystick element by clicking the drop-down &quot;Element.&quot; Select an action to assign to this element under &quot;Action.&quot; Create an element for each Action you created in step 8 and assign one Action to each element.</p>
<p><img src="files/images/quickstart_editor_joystickmaps3.png" alt="Create Joystick Map elements" /></p>
<hr />
<p>13. Now we will do the same thing, only this time for the keyboard. Click &quot;Keyboard Maps&quot; in the nagivation bar, create a map by clicking &quot;Create Map&quot;, then create some elements by clicking the &quot;New&quot; button below the &quot;Element&quot; box. Assign actions to each element as you did with the Joystick map above. For movement actions that use an axis, since a keyboard key acts like a button and not an axis, you will use the &quot;Axis Contribution&quot; setting to determine whether the key contributes a positive or negative value to the final axis. For example, if the &quot;W&quot; key should move the character up, the Action should be set to &quot;Move Vertical&quot; and the &quot;Axis Contribution&quot; should be &quot;Positive&quot;. For the &quot;S&quot; key which should move the character down, the Action should also be &quot;Move Vertical&quot;, but the &quot;Axis Contribution&quot; should be &quot;Negative.&quot;</p>
<p><img src="files/images/quickstart_editor_keyboardmaps1.png" alt="Keyboard Maps" /></p>
<hr />
<p>14. If you want to create a Mouse Map, repeat the same steps as above for keyboard and joystick, but this time click &quot;Mouse Maps&quot; in the navigation bar.</p>
<p><img src="files/images/quickstart_editor_mousemaps1.png" alt="Mouse Maps" /></p>
<hr />
<p>15. Now that we have created joystick, mouse, and keyboard maps, we need to assign them to the Player. Click back to the &quot;Players&quot; page in the navigation bar and select the Player to which you want to assign the maps.</p>
<p><img src="files/images/quickstart_editor_players3.png" alt="Players" /></p>
<hr />
<p>16. Assign a joystick map to the player by clicking the &quot;Add Joystick Map&quot; button. If you have more than one joystick map to assign, you can add as many as you need. For this demo, just add the map you created above. To choose a different joystick map, change the Category and Layout drop-downs. Ensure &quot;Start Enabled&quot; is checked so this joystick map will be active by default. When gameplay begins, if any joysticks are assigned to this Player, it will load the proper map for that joystick.</p>
<p><img src="files/images/quickstart_editor_players4.png" alt="Add Joystick Map" /></p>
<hr />
<p>17. Do the same for any keyboard maps you have created. Note: For keyboard control, ensure the &quot;Assign Keyboard on Start&quot; checkbox is checked, otherwise the Player will not be assigned the keyboard unless you assign it manually through scripting.</p>
<p><img src="files/images/quickstart_editor_players5.png" alt="Add Keyboard Map" width="1015" height="763" /></p>
<hr />
<p>18. Do the same for mouse maps. Note: For mouse control, ensure the &quot;Assign Mouse on Start&quot; checkbox is checked, otherwise the Player will not be assigned the mouse unless you assign it manually through scripting.</p>
<p><img src="files/images/quickstart_editor_players6.png" alt="Add Mouse Map" /></p>
<hr />
<p>19. Close the Rewired Editor and save the scene.</p>
<p>20. Now you will need to create a script to process input for your character. Since the script could vary significantly based on the type of game you're making, this example will just show the basics of how to get input from Rewired. </p>
<p>21. Create a new script in your project, for example, MyCharacter.cs, and attach the script to your character game object.</p>
<p>NOTE: This example is not meant for use in your project. It serves no purpose other than to teach you how to get input from a Player. You will have to write your own scripts to move your characters/objects around the scene.</p>
<pre class="code">
<span class="comment">// MyCharacter.cs - A simple example showing how to get input from Rewired.Player</span>
using UnityEngine;
using System.Collections;
using Rewired;
[RequireComponent(typeof(CharacterController))]
public class MyCharacter : MonoBehaviour {
<span class="comment"> // The Rewired player id of this character</span>
public int playerId = 0;
<span class="comment">// The movement speed of this character</span>
public float moveSpeed = 3.0f;
<span class="comment">// The bullet speed</span>
public float bulletSpeed = 15.0f;
<span class="comment">// Assign a prefab to this in the inspector.
// The prefab must have a Rigidbody component on it in order to work.</span>
public GameObject bulletPrefab;
private Player player; <span class="comment">// The Rewired Player</span>
private CharacterController cc;
private Vector3 moveVector;
private bool fire;
void Awake() {
<span class="comment">// Get the Rewired Player object for this player and keep it for the duration of the character's lifetime</span>
player = ReInput.players.GetPlayer(playerId);
<span class="comment">// Get the character controller</span>
cc = GetComponent<CharacterController>&lt;CharacterController&gt;();
}
void Update () {
GetInput();
ProcessInput();
}
private void GetInput() {
<span class="comment">// Get the input from the Rewired Player. All controllers that the Player owns will contribute, so it doesn't matter</span>
<span class="comment">// whether the input is coming from a joystick, the keyboard, mouse, or a custom controller.</span>
moveVector.x = player.GetAxis("Move Horizontal"); <span class="comment">// get input by name or action id</span>
moveVector.y = player.GetAxis("Move Vertical");
fire = player.GetButtonDown("Fire");
}
private void ProcessInput() {
<span class="comment">// Process movement</span>
if(moveVector.x != 0.0f || moveVector.y != 0.0f) {
cc.Move(moveVector * moveSpeed * Time.deltaTime);
}
<span class="comment">// Process fire</span>
if(fire) {
GameObject bullet = (GameObject)Instantiate(bulletPrefab, transform.position + transform.right, transform.rotation);
bullet.GetComponent&lt;Rigidbody&gt;().AddForce(transform.right * bulletSpeed, ForceMode.VelocityChange);
}
}
}</pre>
<p>22. That's it! You've leared how to set up basic input for a single player game using Rewired. There's a whole lot more powerful features available in Rewired, so be sure to read the rest of the <a href="Documentation.html">documentation</a> for more advanced topics.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Installation.html" title="Installation"><span class="button-img"></span>Installation</a>
<a class="forward-button" href="BasicUsage.html" title="Basic Usage"><span class="button-img"></span>Basic Usage</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: edd5c360263d65f4689d005e03c9cad1
TextScriptImporter:
userData:

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 477dc2bdb89a51340a913d2eaad8de17
TextScriptImporter:
userData:

View File

@@ -1,424 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Rewired Standalone Input Module</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Rewired Standalone Input Module
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#quick-setup">Quick Setup</a></li>
<li><a href="#event-system-and-component">Event System and Component</a></li>
<li><a href="#rewired-actions">Rewired Actions</a></li>
<li><a href="#rewired-input-manager-settings">Rewired Input Manager Settings</a></li>
<li><a href="#inspector-options">Inspector Options</a></li>
<li><a href="#player-mouse">Player Mouse</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="overview" id="overview"></a>Overview</h3>
<p>This is an EventSystem input module component that can be used in place of Unity's StandaloneInputModule. The purpose of this module is to allow Rewired to control navigation of Unity's UI instead of the default UnityEngine.Input.</p>
<p>When you install or upgrade Rewired, it will automatically install the RewiredStandaloneInputModule.cs file in the Rewired/Integration/UnityUI folder provided you are running Unity 4.6 or greater.</p>
<p>This component must be added to the Event System in the scene and the default StandaloneInputModule must be disabled or removed. This will allow the UnityUI system to receive input from Rewired. You must also create the appropriate Actions in the Rewired Editor to match the Actions listed in the RewiredStandaloneInputModule and assign these Actions to one or more Controller Maps then assign those to one or more Players.</p>
<p><strong>IMPORTANT:</strong></p>
<p>The Rewired Standalone Input Module is not a re-invention of Unity's UI system. It is not a new UI system, it does not attempt to solve issues with Unity UI's design, it does not attempt to add a bunch of new features to Unity UI. It is a simple bridge between Unity UI and Rewired. It does not change how Unity UI works and it has no control over the vast majority of Unity UI functionality which is handled in the UI element components themselves. Once the input is received from Rewired and input events are sent out to the Event System, what happens after that is out of Rewired's responsibility or knowledge.</p>
<p> The Rewired Standalone Input Module does nothing besides control input in Unity's UI system by changing the underlying input source from UnityEngine.Input to Rewired. If you are having difficulties with controlling the UI, please make sure your problems aren't really pertaining to usage of Unity's UI system before contacting support. I frequently get questions that are actually issues with Unity UI setup and have nothing to do with Rewired. When in doubt, test with the StandaloneInputModule instead of the RewiredStandaloneInputModule. If the problem persists, you know that the issue is not with Rewired but rather something you've missed when setting up Unity UI. </p>
<p>Please refer to the <a href="https://docs.unity3d.com/Manual/com.unity.ugui.html">Unity UI documentation</a> and <a href="https://docs.unity3d.com/Manual/script-StandaloneInputModule.html">Unity documentation on the StandaloneInputModule</a> for basic usage.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="quick-setup" id="quick-setup"></a>Quick Setup</h3>
<ol>
<li>Create your Unity UI as per normal practice.</li>
<li>Select the EventSystem object in the scene.</li>
<li>Disable the StandaloneInputModule component on the EventSystem object.</li>
<li>Add the RewiredStandaloneInputModule component to the EventSystem object.</li>
<li>Customize the settings on the RewiredStandaloneInputModule if desired.</li>
<li>Open the <a href="RewiredEditor.html">Rewired Editor</a> and create an Action for each of the controls listed in the RewiredStandaloneInputModule. By default, these are &quot;UIHorizontal&quot;, &quot;UIVertical&quot;, &quot;UISubmit&quot;, and &quot;UICancel.&quot; The names you create in the Rewired Editor must match exactly those in the RewiredStandaloneInputModule's inspector. If you'd like to change the names of these Actions, you may do so, but they must match between the Rewired Editor and the RewiredStandaloneInputModule.</li>
<li>Create one or more Joystick, Keyboard, or CustomController maps with the Actions you created above assigned to elements.</li>
<li>Assign the controller maps map(s) to one or more Player.</li>
<li>Adjust the settings in the RewiredStandaloneInputModule to change which Player(s) input is drawn from and other options.</li>
</ol>
<p>Now your Unity UI should be controlled by Rewired instead of Unity's input system.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="event-system-and-component" id="event-system-and-component"></a>Event System and Component</h3>
<p>You can either create a normal Unity Event System and replace the Standalone Input Module with the Rewired Standalone Input Module component or you can create a Rewired Event System from either of the menu items:</p>
<ul>
<li>GameObject -&gt; Create Other -&gt; Rewired -&gt; UI -&gt; Rewired Event System</li>
<li>Window -&gt; Rewired -&gt; Create -&gt; UI -&gt; Rewired Event System </li>
</ul>
<p>Rewired also comes with the RewiredEventSystem component which has the additional option to allow multiple Event Systems to run in the scene at the same time. This can be useful if you want to create <a href="#faq-multiple-independent-uis">multiple independent UI's</a> for different Players.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="rewired-actions" id="rewired-actions"></a>Rewired Actions</h3>
<p><img src="files/images/rewiredstandaloneinputmodule_inspector_actions.png" class="right" />Four Actions must be set up in the Rewired Input Manager and the RewiredStandaloneInputModule in order to control the UI with a keyboard or joystick. <strong>These four Actions must have names that match exactly in both the Rewired Input Manager and the RewiredStandaloneInputModule</strong>.</p>
<ol>
<li>Horizontal Axis - The Action that will control Left/Right movement in the UI.</li>
<li>Vertical Axis - The Action that will control Up/Down movement in the UI.</li>
<li>Submit - The Action that submits a button.</li>
<li>Cancel - The Action that cancels.</li>
</ol>
<p>The actual names you use are up to you. Of course these Actions must also be assigned to one or more keyboard or joystick maps and assigned to a Player to be functional. </p>
<p>If you want to use <a href="#player-mouse">mouse pointers</a> exclusively to interact with the UI, you can set all these Actions to blank strings.</p>
<p>Alternately, you can set Actions by id by enabling &quot;Set Actions By Id.&quot;</p>
<p>NOTE: It is <strong>HIGHLY</strong> recommended that you create unique menu-only Actions for these UI controls in a separate controller map category from your game Actions. If you use your in-game actions such as &quot;Move Horizonal&quot; or &quot;Jump&quot; for these UI controls, you run the risk of allowing the user to render the UI unusable because they removed an assignment for one of these game Actions which was also controlling the UI.</p>
<p>The settings in the RewiredStandaloneInputModule will determine which Players can control the UI. If you check &quot;Use All Rewired Game Players&quot;, all Players besides the System Player that have a map configured with these UI Actions will be able to control the UI. If you check &quot;Use Rewired System Player&quot;, the same will be true for the System Player. If instead you only want specific Players to control the UI, you can set these Player Ids individually.</p>
<p>If the UI control speed with a Joystick seems too slow or fast, adjust the &quot;Input Actions Per Second&quot; setting.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="rewired-input-manager-settings" id="rewired-input-manager-settings"></a>Rewired Input Manager settings
</h3>
<p>This image shows the 4 actions that have been set up for controlling the UI with the keyboard or a joystick.</p>
<p><img src="files/images/controlmapper_rewiredinputmanager_uiactions.png" width="484" height="291" /></p>
<p>&nbsp;</p>
<p><strong>Unknown Controllers:</strong><br />
It is recommended that you create a map for the <a href="ControllerMaps.html#unknown-controllers">Unknown Controller</a>. This way, if a user attaches a controller Rewired does not recognize, they should still be able to control the UI reasonably well.</p>
<p>There is no way to know what axes or buttons will actually be available on these controllers, but you can make some basic assumptions that should allow most controllers to control the UI.</p>
<ul>
<li>Axis 0: Map to your &quot;UIHorizontal&quot; Action. (Axis 0 is almost always the horizontal axis on the first joystick)</li>
<li>Axis 1: Map to your &quot;UIVertical&quot; Action and Invert this axis. (Axis 1 is almost always the vertical axis on the first joystick and is always inverted.)</li>
<li>Button 0: Map to your &quot;UISubmit&quot; Action.</li>
<li>Button 1: Map to your &quot;UICancel&quot; Action.</li>
</ul>
<p><img src="files/images/controlmapper_unknowncontrollermap.png" width="712" height="171" /></p>
<p>Of course, the above are only recommendations. You can set up your control scheme however you decide.</p>
<p><strong>Mouse:</strong></p>
<p>DO NOT map any UI Actions to Mouse buttons or axes. This is a very common mistake and will lead to many problems. <a href="#troubleshooting-duplicate-mouse-clicks">See this for more information</a>.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="inspector-options" id="inspector-options"></a>Inspector Options:</h3>
<p><img src="files/images/rewiredstandaloneinputmodule_inspector.png" alt="Inspector" /></p>
<table width="100%" border="1">
<tr>
<td>Rewired Input Manager</td>
<td>(Optional) Link the Rewired Input Manager here for easier access to Player ids, etc.</td>
</tr>
<tr>
<td>Use Playing Players Only</td>
<td>Allow only Players with Player.isPlaying = true to control the UI.</td>
</tr>
<tr>
<td>Use All Rewired Game Players</td>
<td>Use all Rewired game Players to control the UI. This does not include the System Player. If enabled, this setting overrides individual Player Ids set in Rewired Player Ids.</td>
</tr>
<tr>
<td>Use Rewired System Player</td>
<td>Allow the Rewired System Player to control the UI.</td>
</tr>
<tr>
<td>Rewired Player Ids</td>
<td>A list of Player Ids that are allowed to control the UI. If Use All Rewired Game Players = True, this list will be ignored.</td>
</tr>
<tr>
<td>Set Actions By Id</td>
<td>If enabled, Action Ids will be used to set the Actions. If disabled, string names will be used to set the Actions.</td>
</tr>
<tr>
<td><p>Horizontal Axis</p></td>
<td>Name of the horizontal axis for movement (if axis events are used).</td>
</tr>
<tr>
<td>Vertical Axis</td>
<td>Name of the vertical axis for movement (if axis events are used).</td>
</tr>
<tr>
<td>Submit Button</td>
<td>Name of the action used to submit.</td>
</tr>
<tr>
<td>Cancel Button</td>
<td>Name of the action used to cancel.</td>
</tr>
<tr>
<td>Input Actions Per Second</td>
<td>Number of selection changes allowed per second when a movement button/axis is held in a direction.</td>
</tr>
<tr>
<td>Repeat Delay</td>
<td>Delay in seconds before vertical/horizontal movement starts repeating continouously when a movement direction is held.</td>
</tr>
<tr>
<td>Move One Element Per Axis Press</td>
<td>Makes an axis press always move only one UI selection. Enable if you do not want to allow scrolling through UI elements by holding an axis direction.</td>
</tr>
<tr>
<td>Allow Mouse Input</td>
<td>Allows the mouse to be used to select elements.</td>
</tr>
<tr>
<td>Allow Mouse Input If Touch Supported</td>
<td>Allows the mouse to be used to select elements if the device also supports touch control.</td>
</tr>
<tr>
<td>Allow Touch Input</td>
<td>Allows touch input to be used to select elements.</td>
</tr>
<tr>
<td>Deselect If Background Clicked</td>
<td>Deselects the current selection on mouse/touch click when the pointer is not over a selectable object.</td>
</tr>
<tr>
<td>Deselect Before Selecting</td>
<td>Deselects the current selection on mouse/touch click before selecting the next object.</td>
</tr>
<tr>
<td>Force Module Active</td>
<td>Forces the module to always be active.</td>
</tr>
<tr>
<td>Player Mice</td>
<td>Player Mice allowed to interact with the UI. Each Player that owns a Player Mouse must also be allowed to control the UI or the Player Mouse will not function.</td>
</tr>
</table>
<p>&nbsp;</p>
<hr />
<h3><a name="player-mouse" id="player-mouse"></a>Player Mouse:</h3>
<p><strong>Background:</strong></p>
<p>Unity's Standalone Input Module supports 3 methods of user interaction: </p>
<ul>
<li>Mouse pointer interaction.</li>
<li>Touch interaction.</li>
<li>Keyboard, joystick, other interaction using the &quot;Selectable&quot; system.</li>
</ul>
<p>Mouse pointer and touch interaction work in a similar way, using a &quot;pointer&quot; screen position and &quot;clicks&quot; to send enter, exit, click, drag, etc. events to UI components. The pointer position must be over a UI element for the event to be sent.</p>
<p>Keyboard, joystick, and other interaction work differently from mouse/touch in that they do not use a &quot;pointer&quot;, but instead use Unity's &quot;Selectable&quot; system which is part of the Event System and the individual UI components. The Event System supports a single &quot;currently selected&quot; GameObject which acts as the highlighted GameObject. UI element navigation happens when a UI element receives a navigation move event. Submit and Cancel happens when the currently selected GameObject is sent a Submit or Cancel event when the correct button/key is pressed.</p>
<p><strong>Overview:</strong></p>
<p>The Rewired Standalone Input Module allows you to use a <a href="PlayerControllers.html#player-mouse">Player Mouse</a> to control a software mouse pointer using any input device to interact with the UI. This can be useful if you want to be able to interact with a UI using a gamepad but do not want the limitations of the &quot;Selectable&quot; UI system. You can also have multiple separate mouse pointers that can interact with the UI simultaneously*. (<a href="#player-mouse-mutli-player-ui-limitations">See important limitations / issues.</a>)</p>
<p>You do not have to use a Player Mouse for mouse pointer interaction to work. If you do not assign a Player Mouse, the default hardware mouse will be used which works just like the Standalone Input Module.</p>
<p><strong>Using a Player Mouse to control the UI:</strong></p>
<ul>
<li>See <a href="PlayerControllers.html">Player Controllers</a> and <a href="PlayerControllers.html#player-mouse">Player Mouse</a> to understand the concepts.</li>
<li>Create a GameObject with a Player Mouse component and configure its Player and element Actions.</li>
<li>Create a pointer GameObject and drive it from the Player Mouse's screen position.</li>
<li>Disable Raycast Target on the pointer's Image component or it will catch the mouse raycasts and block raycasts from hitting the UI elements below the pointer.</li>
<li>Add the Player Mouse in the Rewired Standalone Input Module inspector (or add it through scripting at runtime).</li>
<li>Make sure the Player that owns the Player Mouse is allowed to control the UI. (<a href="#inspector-options">See inspector options</a> for setting the Players that can control the UI.)</li>
<li><em><a href="HowTos.html#enabling-disabling-controller-maps">Make sure you disable UI navigation Actions</a> in all Players that control a software pointer. If you have both UI navigation Actions controlling the UI and are moving a mouse pointer around with the same controls, the UI will be completely uncontrollable as the two control systems fight each other.</em></li>
</ul>
<p><strong>Using multiple Player Mouse pointers:</strong></p>
<p>You can use multiple Player Mice to drive multiple mouse pointers that can all interact with the UI.* (<a href="#player-mouse-mutli-player-ui-limitations">See important limitations.</a>) Simply create multiple Player Mice, set them up for each Player, and assign them to Player Mice field in the inspector.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a href="Examples.html#player-mouse-unity-ui">Player Mouse Unity UI</a></li>
</ul>
<p><strong>Player Pointer Event Data</strong>:</p>
<p>The Rewired Standalone Input Module will send a PlayerPointerEventData object to all mouse pointer event handlers (Buttons, your scripts that implement the pointer event handler interfaces, etc.) If the handler script is written to support it, you can get Player, button index, and even source Player Mouse information from each event. See the <a href="Examples.html#player-mouse-unity-ui">Player Mouse Unity UI</a> example for a demonstration.</p>
<p>
<a name="player-mouse-mutli-player-ui-limitations" id="player-mouse-mutli-player-ui-limitations"></a><strong>*Important Limitations / Issues:</strong></p>
<p>Unity's UI controls were not written to support interaction from multiple sources at the same time. Generally, UI controls work when being interacted with by multiple pointers, but there are some issues/artifacts:</p>
<ul>
<li>Selectable (Button, Toggle, Slider, etc.) highlighting shows artifacts when multiple pointers interact with it simultaneously. If two mouse pointers are pressing on a Button and one pointer moves out of the Button's area, a PointerExit event will be sent to the Button and it will no longer be highlighted. The pointer remaining over the Button can be clicking on the button, but the visual Button graphic will not show any change as the Button is clicked. The Button will still send events, but the visual feedback will be lost.</li>
<li>Mutiple pointers trying to drag on a UI slider at the same time will yield unpredictable results.</li>
<li>Probably others.</li>
</ul>
<p>Rewired cannot overcome these inherent limitations of Unity UI. The only way to remedy these issues would be to replace all UI components and their base classes with new versions that are multi-pointer aware. This is outside the scope of Rewired, which as input system and not a replacement UI system.</p>
<p>&nbsp;</p>
<hr />
<h3><strong><a name="troubleshooting" id="troubleshooting"></a></strong>Troubleshooting:</h3>
<p>Before contacting support for RewiredStandaloneInputModule issues, be sure your issue has to do with Rewired and not just Unity's UI system in general.</p>
<ul>
<li>The Rewired Standalone Input Module does nothing besides control input in Unity's UI system by changing the underlying input source from UnityEngine.Input to Rewired. If you are having difficulties with controlling the UI, please make sure your problems aren't really pertaining to usage of Unity's UI system before contacting support. I frequently get questions that are actually issues with Unity UI setup and have nothing to do with Rewired. When in doubt, test with the StandaloneInputModule instead of the RewiredStandaloneInputModule. If the problem persists, you know that the issue is not with Rewired but rather something you've missed when setting up Unity UI. </li>
</ul>
<p>Please refer to the <a href="https://docs.unity3d.com/Manual/com.unity.ugui.html">Unity UI documentation</a> and <a href="https://docs.unity3d.com/Manual/script-StandaloneInputModule.html">Unity documentation on the StandaloneInputModule</a> for basic usage.</p>
<p><strong><a name="troubleshooting-duplicate-mouse-clicks" id="troubleshooting-duplicate-mouse-clicks"></a>Problem: Receiving duplicate mouse clicks when clicking on a UI button</strong></p>
<p>Do not assign UI Submit or Cancel Actions to Mouse Left Button or Mouse Right Button or you will receive double-clicks evey time the mouse button is pressed over a button. The mouse button click on a UI element is based on mouse cursor position and does not use the Action system.</p>
<p>Unity's UI is designed to have two completely different systems for Keyboard/Joystick and Mouse. The Keyboard/Joystick system uses the Navigation system, which involves setting an active selected GameObject in the EventSystem, and the InputModule sends directional navigation events, OnSubmit, and OnCancel events to the currently selected Selectable GameObject in the Event System. This system is only for keyboard/joystick navigation.<br />
<br />
Mouse navigation does not use any of the above. It uses the mouse pointer position on-screen and the InputModule sends OnClick, OnPointerEnter, OnPointerExit, etc., events to the Selectable on the Game Object under the mouse pointer. Unity's system does not support a Cancel functionality for mouse input.<br />
<br />
Mapping OnSubmit or OnCancel to mouse buttons will cause the currently selected GameObject in the EventSystem (if one is selected) to receive these events regardless of where the mouse is on the screen. This is normally not what you want to happen when using a mouse pointer.</p>
<p></p>
<p><strong><a name="troubleshooting-joystick-keyboard-doesnt-work" id="troubleshooting-joystick-keyboard-doesnt-work"></a>Problem: Unity UI navigation with joystick or keyboard doesn't work</strong></p>
<p>While this is a general Unity UI usage issue and not a Rewired issue in any way, because I've received so many support requests where this ends up being the answer, I've decided to post it here.</p>
<ul>
<li><em>Unity UI cannot be controlled by keyboard or joystick unless you specify a current or starting Selectable GameObject in the Unity UI EventSystem.</em></li>
</ul>
<p>Unity UI requires a Selectable to be selected before any navigation will work for joystick or keyboard, otherwise it has no starting point from which to navigate when you press a key or a stick direction. You must either set the <a href="https://docs.unity3d.com/Manual/script-EventSystem.html" target="_blank">First Selected field in the inspector of the EventSystem component</a>, or set the current selected GameObject via scripting as shown below.<br />
</p>
<pre class="code">using UnityEngine.EventSystems;
void SetSelected(GameObject selectableObject) {
<span class="comment">// Set the currently selected GameObject</span>
EventSystem.current.<a href="https://docs.unity3d.com/ScriptReference/EventSystems.EventSystem.SetSelectedGameObject.html" target="_blank">SetSelectedGameObject</a>(selectableObject);
}<br />
</pre>
<p>Please refer to the <a href="https://docs.unity3d.com/Manual/UISystem.html" target="_blank">Unity documentation</a> for information on how to use Unity UI.</p>
<p>&nbsp;</p>
<hr />
<p><strong><a name="troubleshooting-exceptions-in-callbacks-changing-settings" id="troubleshooting-exceptions-in-callbacks-changing-settings"></a>Problem: Exceptions thrown when making changes to various properties in the Rewired Standalone Input Module from a UI button press</strong></p>
<p>You should not change certain properties in the Rewired Standalone Input Module from the callback of a UI button press or other UI event (the Action list, the Players list, Player Mouse list, etc.). The module executes its code sequentially, firing UI events synchronously, then continuing execution. If you change certain Rewired properties in the callback of one of these events, lists or objects may be change mid-execution causing it to throw an exception, for example, changing the list of Players that can control the UI in response to a UI button click. This list of Players will be changed, possible during iteration of the same list resulting in null reference exceptions or index out of range exceptions. This is akin to modifying a List in the middle of a foreach loop, which will throw an exception because they have included measures to watch for such illegal operations.</p>
<p>If you must change a Rewired property from a UI event, use a Coroutine to defer execution of the change until the end of the frame.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="faq" id="faq"></a>FAQ:</h3>
<p class="question">Does it support multi-player UIs?</p>
<p>Only partially through the use of <a href="#player-mouse">Player Mouse pointers</a> or by creating a separate independent UI for each Player.</p>
<p>It does not support shared multi-player UI navigation using the Unity UI Selectable system. (The system used for joystick/keyboard navigation.)</p>
<p>The issue here is Unity's UI controls and Event System do not support more
than one simultaneous &quot;selected&quot; object. Their entire system is designed
around the concept of one single user and one selection at a time. The Rewired Standalone Input Module cannot overcome the inherent limitations of Unity's UI system. Supporting multiple simultaneous Selectables would require a complete
rewrite of Unity's Event System and all interactable UI components including Button, Toggle, Slider, etc., and their base classes with new versions that are multi-pointer aware including a new highlighting/transition system. This is outside the scope of Rewired, which is an input system and not a replacement UI system.</p>
<p><a name="faq-multiple-independent-uis" id="faq-multiple-independent-uis"></a>Multiple Independent UI's</p>
<p>You can, however, create multiple independent UI's for each Player by creating multiple Rewired Event Systems and enabling Always Update on each Rewired Event System in the inspector. Each event system will have its own Rewired Standalone Input Module with its own settings. Each event system will have its own selectable controllable by the Players designated to control it in the Rewired Standalone Input Module.</p>
<p>You must take care when working with mouse input. If you allow mouse input to control multiple event systems, clicking on a Selectable object with the mouse will cause all event systems to select that same GameObject. This is unlikely to be desirable, so you need to manage which event systems are allowed mouse control. This can be done by disabling mouse input on all but one event system or by using Player Mouse to handle mouse input on all event systems and designating only one Player Mouse to use the hardware pointer position.<br />
</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Actions.html" title="Actions"><span class="button-img"></span></a><a class="back-button" href="Documentation.html" title="Actions">Documentation</a></div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,135 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Save Data Store</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<strong>The Essentials:</strong>
<ol>
<li><a href="Overview.html">Overview</a></li>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Tools:</strong>
<ul>
<li><a href="SaveDataStore.html" title="Save Data Store">Save Data Store</a></li>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
</ul>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="ControllerMaps.html"></a><a href="Layouts.html">Layouts</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>How To's</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Save Data Store
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p>The SaveDataStore component can be used to easily save and load user control configuration data from Rewired. This component is a base class which you can extend to support any data storage format you like.</p>
<p>Rewired also comes with a SaveDataStore_PlayerPrefs component complete with source code which you can use as a template for designing your own custom data storage system using any storage medium (database, binary files, etc.). The SaveDataStore_PlayerPrefs component can also be used directly in your game and will store your user data in Unity's PlayerPrefs.</p>
<p><strong>Usage</strong></p>
<p>Just add a component derived from SaveDataStore (such as SaveDataStore_PlayerPrefs) to your Rewired Input Manager Game Object. When the Rewired Input Manager initializes, it will automatically initialize the SaveDataStore component and make a reference to it accessible via the ReInput.saveDataStore property.</p>
<p>To save user data: ReInput.saveDataStore.Save().<br />
To load user data: ReInput.saveDataStore.Load().</p>
<p><strong>SaveDataStore_PlayerPrefs</strong></p>
<p>This is a user data storage component that uses Unity's PlayerPrefs class for storing data. Whenever a controller is attached, if any data has been saved before for that controller, it will be loaded from PlayerPrefs. If the user has customized his control mappings, these will be loaded on a per-player, per-controller basis. Controller calibration settings and customized Input Behavior settings will also be loaded. Data will be saved manually when Save() is called or automatically when a controller is disconnected from the system.</p>
<p>If &quot;Load Data on Start&quot; is checked in the inspector, all controller data will be loaded at the beginning of the session. This is useful if you want the player's last settings to be loaded automatically for any controllers already attached to the system at runtime.</p>
<p>&nbsp;</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Actions.html" title="Actions"><span class="button-img"></span>Actions</a>
<a class="forward-button" href="ControllerMaps.html" title="Controller Maps"><span class="button-img"></span>Controller Maps</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

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

View File

@@ -1,271 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/BasicTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Rewired Documentation | Special Platform Support</title>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="isRoot" type="boolean" value="false" -->
<!-- InstanceParam name="wide" type="boolean" value="false" -->
<link href="files/css/styles.css" rel="stylesheet" type="text/css" />
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/projects/rewired/files/images/favicon.ico?v=1" />
<!-- Apple Icons -->
<!-- For iPad with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="files/images/favicon_152x152.png?v=1">
<!-- For iPad with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/images/favicon_144x144.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="files/images/favicon_120x120.png?v=1">
<!-- For iPhone with high-resolution Retina display running iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/images/favicon_114x114.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="files/images/favicon_76x76.png?v=1">
<!-- For the iPad mini and the first- and second-generation iPad on iOS = 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/images/favicon_72x72.png?v=1">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="files/images/favicon_57x57.png?v=1">
</head>
<body>
<div class="container">
<div class="google-search-bar">
<script>
(function() {
var cx = '007961148920562332911:oocvtwz5jce';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<div class="content">
<div class="page-body">
<div class="sidebar-nav">
<h4><a href="Documentation.html">Documentation</a></h4>
<ul>
<li><a href="Overview.html">Overview</a></li>
<li><a href="ReleaseNotes.txt">Release Notes</a></li>
</ul>
<strong>Essentials:</strong>
<ol>
<li><a href="Installation.html">Installation</a></li>
<li><a href="QuickStart.html">Quick Start</a></li>
<li><a href="BasicUsage.html">Basic Usage</a></li>
<li><a href="Deployment.html">Deployment</a></li>
<li><a href="BestPractices.html">Best Practices</a></li>
<li><a href="RewiredEditor.html">Rewired Editor</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs/api-reference" target="_blank">API Reference</a></li>
</ol>
<strong>Concepts:</strong>
<ul>
<li><a href="InputManager.html">Input Manager</a></li>
<li><a href="Players.html">Players</a></li>
<li><a href="Actions.html">Actions</a></li>
<li><a href="InputBehaviors.html">Input Behaviors</a></li>
<li><a href="Controllers.html">Controllers</a></li>
<li><a href="ControllerMaps.html">Controller Maps</a></li>
<li><a href="ControllerTemplates.html">Controller Templates</a></li>
<li><a href="MapCategories.html">Map Categories</a></li>
<li><a href="Layouts.html">Layouts</a></li>
<li><a href="LayoutManager.html">Layout Manager</a></li>
<li><a href="MapEnabler.html">Map Enabler</a></li>
<li><a href="CustomControllers.html">Custom Controllers</a></li>
</ul>
<strong>Extras:</strong>
<ul>
<li><a href="ControlMapper.html" title="Control Mapper">Control Mapper</a></li>
<li><a href="Glyphs.html" title="Glyphs">Glyphs</a></li>
<li><a href="TouchControls.html" title="Touch Controls">Touch Controls</a></li>
<li><a href="UnityInputOverride.html" title="Unity Input Override">Unity Input Override</a></li>
</ul>
<strong>Misc:</strong>
<ul>
<li><a href="RewiredStandaloneInputModule.html">Rewired Standalone Input Module</a></li>
<li><a href="ComponentControls.html" title="Component Controls">Component Controls</a></li>
<li><a href="PlayerControllers.html" title="Player Controllers">Player Controllers</a></li>
<li><a href="InputMapper.html" title="Input Mapper">Input Mapper</a></li>
<li><a href="UserDataStore.html" title="User Data Store">User Data Store</a></li>
<li><a href="CustomPlatforms.html" title="User Data Store">Custom Platforms</a></li>
<li><a href="Localization.html" title="Localization">Localization</a></li>
</ul>
<strong>How To's:</strong>
<ul>
<li><a href="HowTos.html">See all topics...</a></li>
</ul>
<strong>Help:</strong>
<ul>
<li><a href="SupportedControllers.html" title="Supported Controllers">Supported Controllers</a></li>
<li><a href="Overview.html#tested-platforms" title="Tested Platforms">Tested Platforms</a></li>
<li><a href="Troubleshooting.html" title="Troubleshooting">Troubleshooting</a></li>
<li><a href="KnownIssues.html">Known Issues</a></li>
<li><a href="SpecialPlatformSupport.html" title="Special Platform Support">Special Platform Support</a></li>
<li><a href="Examples.html" title="Examples">Examples</a></li>
<li><a href="Integration.html">Integrations</a></li>
<li><a href="Updating.html" title="Updating Rewired">Updating Rewired</a></li>
</ul>
<strong>FAQ</strong>
<ul>
<li><a href="FAQ.html">See all topics...</a></li>
</ul>
<strong>Unity Help:</strong>
<ul>
<li><a href="http://docs.unity3d.com/Manual/" target="_blank">Unity Manual</a></li>
<li><a href="http://docs.unity3d.com/ScriptReference/" target="_blank">Unity Script Reference</a></li>
<li><a href="http://unity3d.com/learn/tutorials/modules" target="_blank">Unity Tutorials</a></li>
</ul>
<strong>Links:</strong>
<ul>
<li><a href="http://guavaman.com/projects/rewired">Rewired Website</a></li>
<li><a href="http://guavaman.com/projects/rewired/docs">Web Documentation</a></li>
</ul>
</div>
<div class="main-body">
<div class="logo"><a href="http://guavaman.com/projects/rewired" title="Rewired"><img src="files/images/rewired-logo.png" width="173" height="139" alt="Rewired" /></a></div>
<h1>
<!-- InstanceBeginEditable name="PageHeader" -->Special Platform Support
<!-- InstanceEndEditable -->
</h1>
<!-- InstanceBeginEditable name="MainBody" -->
<p><strong>Platforms:</strong></p>
<ul>
<li><a href="#windows-uwp">Microsoft Windows 10 Universal</a></li>
<li><a href="#xbox-one">Microsoft Xbox One (XDK)</a></li>
<li><a href="#xbox-game-core">Microsoft Xbox Game Core</a></li>
<li><a href="#ps4">PlayStation<sup>&reg;</sup>4</a></li>
<li><a href="#ps5">PlayStation<sup>&reg;</sup>5</a></li>
<li><a href="#nintendo-switch">Nintendo Switch</a></li>
<li><a href="#stadia">Google Stadia</a></li>
<li><a href="#steam">Steam</a></li>
</ul>
<p>&nbsp;</p>
<hr />
<h3><a name="windows-uwp" id="windows-app-store2"></a>Microsoft Windows 10 Universal</h3>
<p>Windows 10 Universal support requires Unity 5.2+</p>
<p><a href="KnownIssues.html#uwp">See Known Issues for Windows 10 Universal</a></p>
<p><strong>CRITICAL WARNING:</strong> Versions of Rewired prior to 1.1.38.4 no longer work on the UWP platform as of Unity 2020.2.0f1 due to a new bug in IL2CPP. Update to Rewired 1.1.38.4+ to build on this platform.</p>
<p><strong>CRITICAL WARNING:</strong> There is a known issue with Unity on both .NET and IL2CPP builds in Unity 2018.2.0 - 2018.2.18 that causes the application to crash when a gamepad is disconnected. It is recommended you update to a version of Unity of 2018.2.19 or greater. <a href="KnownIssues.html#uwp-il2cpp-controller-disconnect-crash">See this form more information</a>.</p>
<p><strong>End-User Requirements:</strong></p>
<ul>
<li>Windows 10, Fall Creators Update version 1709 or greater (10.0.16299.0).</li>
<li><a href="https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist" target="_blank">Visual Studio C++ 2019 Redistributable</a> (required for IL2CPP build).</li>
</ul>
<p><strong>Installation:</strong></p>
<p>To build for the Windows 10 Universal platform, you must install Windows 10 Universal support. In order to build for this platform, you must be using the Windows Unity editor.</p>
<p>Install Windows 10 Universal platform support through the menu:<br />
<strong>Window -&gt; Rewired -&gt; Setup -&gt; Install Platform Support -&gt; Windows 10 Universal</strong></p>
<p><strong>IMPORTANT NOTE:</strong></p>
<p><strong><em>The following applies ONLY if you have moved the Rewired folder from its default location. If you have not moved the Rewired folder, skip this section and do not make any changes to any DLLs.</em></strong></p>
<p>Unity 5+ requires that a Placeholder path be set in the Rewired/Internal/Libraries/Runtime/UWP/Rewired_Core.dll and/or Rewired/Internal/Libraries/Runtime/UWP/IL2CPP/Rewired_Core.dll (depending on your scripting backend) inpspector or you will get compilation errors when you try to compile. If you move Rewired from its default install location, you must set this path to the current location of the main Rewired_Core.dll in your project. If you move the Rewired folder to another directory, this path will have to be changed manually because Unity stores a path here instead of a GUID. Do not make any changes to any DLL unless you have moved Rewired out of its default location.</p>
<p>Here are the steps:</p>
<ol>
<li>Rewired/Internal/Libraries/Runtime/UWP/Rewired_Core.dll and/or Rewired/Internal/Libraries/Runtime/UWP/IL2CPP/Rewired_Core.dll in the project view (select and change one at a time).</li>
<li>In the inspector, click the Placeholder field and navigate to Assets/Rewired/Internal/Libraries/Runtime/Rewired_Core.dll.</li>
<li>Click Apply.</li>
</ol>
<p>This is not automated because users tend to move Rewired around into various folders in the project. Because Unity chose to store a path here instead of a GUID, the link will break each time the Rewired folder is moved.</p>
<p><strong><a name="uwp-enabling-hid-joystick-support" id="uwp-enabling-hid-joystick-support"></a>Enabling HID Joystick Support</strong></p>
<p>In Unity 5.6+, you can enable HID device support through the Unity Build Player settings:</p>
<p>Build Settings -&gt; Player Settings -&gt; Publishing Settings -&gt; Capabilities -&gt; HumanInterfaceDevice</p>
<p><img src="files/images/specialplatformsupport_uwp_playersettings_hid.png" alt="HID" /></p>
<p>While this option was available in older versions of Unity, it did not enable both HID usages 4 and 5 causing some gamepads not to appear to the system.</p>
<p>For older versions of Unity, in order to enable support for HID joysticks, after building the project in Unity, open the new Windows 10 Universal project in Visual Studio and edit the Package.appxmanifest file with the XML text editor and add the following lines:</p>
<pre class="code">&lt;Capabilities&gt;<br /> &lt;DeviceCapability Name=&quot;humaninterfacedevice&quot;&gt;<br /> &lt;Device Id=&quot;any&quot;&gt;<br /> &lt;Function Type=&quot;usage:0001 0004&quot; /&gt;<br /> &lt;Function Type=&quot;usage:0001 0005&quot; /&gt;<br /> &lt;/Device&gt;<br /> &lt;/DeviceCapability&gt;<br />&lt;/Capabilities&gt;</pre>
<p>The &lt;Capabilities&gt; tag and its contents must be placed between the &lt;Package&gt; and &lt;/Package&gt; tags. This gives the app permission to read HID joysticks and gamepads. If you do not add this or do not add it correctly, HID joysticks will not work. However, the XBox 360 Controller and other XInput-compatible controllers will still function.</p>
<p><strong>WARNING:</strong> Unity 2018.2.0 - 2018.2.18: There is a known issue with Unity in IL2CPP builds when enabling support for HID joysticks. <a href="KnownIssues.html#uwp-il2cpp-controller-disconnect-crash">See this for more information</a>.</p>
<p><strong>Error On DLL Import</strong></p>
<p>Unity reports this error every time the Rewired_Core.dll for Windows 10 Universal .NET is imported or reimported into the project:</p>
<pre class="code">System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
</pre>
<p><span class="code">Ignore this error. There is no reason for this error and no way to silence it. It has no effect on the functionality of the library.</span></p>
<p>&nbsp;</p>
<hr />
<h3><a name="xbox-one" id="xbox-one"></a>Microsoft Xbox One (XDK)</h3>
<p><strong>The following information applies only to XDK builds:</strong></p>
<p>Rewired includes special support for XBox One for better controller support and more accurate hot-plugging behavior. Rewired supports gamepad vibration on XBox One, however you must first install the prerequisite Xbox One native library provided by Unity.</p>
<p>If you receive an error when switching to the Xbox One build target in Unity, make sure the <a href="Troubleshooting.html#compile-errors-ps4-xbone">Xbox One platform is checked on the Rewired_Core.dll import options</a>.</p>
<p><strong>Dependencies</strong></p>
<p> Xbox One support requires that you install the following native library provided by Unity in the Plugins/XboxOne folder in your project:</p>
<ul>
<li>Gamepad.dll</li>
</ul>
<p>To get the library, go to:<br />
Unity Xbox Forums &gt; Unity for Xbox One Downloads (Sticky Topic) &gt; Under the &quot;Plugins&quot; section</p>
<p>The file Gamepad.dll can be found in Binaries\Native\Variations\Durango_Release in the plugins package.</p>
<p>If this dependiency is not installed correctly, XBox One builds will not function. You will only see black screen when launching the build on the Xbox One if the library is not installed.</p>
<p>If Gamepad.dll throws exceptions or causes errors, you will need to rebuild it from source code. Unity provides the source code. They do not continually update the built DLL for every new version of the SDK, so it may not work without being rebuilt to the version of the SDK you are using.</p>
<p><strong>Crashes on Start</strong></p>
<p>This is <em>always</em> due to improper set up of the dependency noted above. If Gamepad.dll is not found, not in the proper location, or does not have the proper inspector settings to enable it to be included with the XBox One build, all p/invoke calls to Gamepad.dll will fail, which crashes the XBox One rather than throwing an exception which can be caught and handled as happens on all other platforms. If the version of Gamepad.dll you are using does not have the exact method signature Rewired expects, it will also crash. If you upgrade Unity versions but do not update the Gamepad.dll also, it may also crash if the gamepad.dll has been built to a different version of the Xbox One SDK.</p>
<p>If for any reason you cannot get the Gamepad.dll, you can disable all calls to the DLL by setting &quot;Xbox One: Disable Vibration&quot; in the Rewired Global Options window which can be found at: Window -&gt; Rewired -&gt; Global Options. This will disable support for gamepad vibration.</p>
<p><strong>Accessing XBox One Controller Features</strong></p>
<p>Special controller features of the XBox One gamepad such as vibration can be accessed via the <a href="https://guavaman.com/projects/rewired/docs/api-reference/html/T_Rewired_Platforms_XboxOne_XboxOneGamepadExtension.htm">XboxOneGamepadExtension</a> class available in the Joystick class <a href="HowTos.html#xbox-one-controller-special-features">as seen in this example</a>.</p>
<p><strong>Troubleshooting</strong></p>
<p>See <a href="Troubleshooting.html#xbox-one">Troubleshooting - Xbox One</a> for solutions to issues on the Xbox One platform.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="xbox-game-core" id="xbox-game-core"></a>Microsoft Xbox Game Core</h3>
<p>Rewired requires a separate plugin to support the Xbox Game Core platforms. This plugin is only available to licensed Xbox Game Core developers. <a href="https://guavaman.com/rewired#support">Please fill out the Xbox Game Core Plugin request form</a> requesting access to the Game Core plugin providing your email address and contact information (including company) that is reigstered with Microsoft and is authorized for Xbox Game Core development. Please be patient as the information has to be validated with Microsoft. You will receive download instructions when the information has been validated.</p>
<p>Be sure to check your email spam folder for the download instructions email.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="ps4" id="ps4"></a>PlayStation<sup>&reg;</sup>4</h3>
<p>Rewired requires a separate plugin to support the PlayStation<sup>&reg;</sup>4 platform. This plugin is only available to licensed PlayStation 4 developers. You can register for the Rewired plugin on PS4 DevNet under the Tools &amp; Middleware section. You will receive an email with download instructions when your registration has been processed.</p>
<p>Be sure to check your email spam folder for the download instructions email. If you have not received download instructions 24 hours after registering, contact support.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="ps5" id="ps5"></a>PlayStation<sup>&reg;</sup>5</h3>
<p>Rewired requires a separate plugin to support the PlayStation<sup>&reg;</sup>5 platform. This plugin is only available to licensed PlayStation 5 developers. You can register for the Rewired plugin on PS5 DevNet under the Tools &amp; Middleware section. You will receive an email with download instructions when your registration has been processed.</p>
<p>Be sure to check your email spam folder for the download instructions email. If you have not received download instructions 24 hours after registering, contact support.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="nintendo-switch" id="nintendo-switch"></a>Nintendo Switch</h3>
<p>Rewired requires a separate plugin to support the Nintendo Switch platform. This plugin is only available to licensed Nintendo developers. More information can be found on the <a href="https://developer.nintendo.com" target="_blank">Nintendo Developer Portal</a>.</p>
<p>Fill out the form on the Nintendo Developer Portal for the Rewired Nintendo Switch Plugin and wait until you receive a response by email with instructions on how to download it. You will receive an email with download instructions when your registration has been processed.</p>
<p>Be sure to check your email spam folder for the download instructions email. If you have not received download instructions 24 hours after registering, contact support.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="stadia" id="stadia"></a>Google Stadia</h3>
<p>Rewired requires a separate plugin to support the Stadia platform. This plugin is only available to licensed Stadia developers. Please contact your Stadia developer account manager for details on how to register for the plugin.</p>
<p>Be sure to check your email spam folder for the download instructions email.</p>
<p>&nbsp;</p>
<hr />
<h3><a name="steam" id="steam"></a>Steam</h3>
<p>See <a href="BestPractices.html#steam">Best Practices - Steam</a> and the <a href="Troubleshooting.html#steam">Troubleshooting - Steam</a> documentation for more information.</p>
<div class="bottom-pager clearfix">
<a class="back-button" href="Documentation.html" title="Documentation"><span class="button-img"></span>Documentation</a>
</div>
<!-- InstanceEndEditable -->
</div>
</div>
<div class="footer clearfix">
<p class="left">Copyright &copy;2014-2021 <a href="http://guavaman.com" title="Guavaman Enterprises">Guavaman Enterprises</a>. All rights reserved. No materials may be reproduced without permission.</p>
<p class="right"><a href="http://guavaman.com/projects/rewired" title="Return to Rewired Website">Return to Rewired Website</a></p>
</div>
<!-- end .content --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 32707207777fa9e4f8e824d427712f03
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

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