This commit is contained in:
2025-05-10 18:06:44 +08:00
parent e010759358
commit dea9a4f58e
47 changed files with 421 additions and 359 deletions

View File

@@ -938,8 +938,8 @@ MonoBehaviour:
gravityStrength: 1.962 gravityStrength: 1.962
totalNodes: 500 totalNodes: 500
velocityDampen: 0.95 velocityDampen: 0.95
stiffness: 0.8 stiffness: 0.99
iterateCollisionsEvery: 1 iterateCollisionsEvery: 2
iterations: 20 iterations: 20
colliderBufferSize: 1 colliderBufferSize: 1
ropeWidth: 0.02 ropeWidth: 0.02

View File

@@ -53,7 +53,7 @@ MonoBehaviour:
m_AdditionalLightsShadowResolutionTierHigh: 1024 m_AdditionalLightsShadowResolutionTierHigh: 1024
m_ReflectionProbeBlending: 1 m_ReflectionProbeBlending: 1
m_ReflectionProbeBoxProjection: 1 m_ReflectionProbeBoxProjection: 1
m_ShadowDistance: 50 m_ShadowDistance: 150
m_ShadowCascadeCount: 4 m_ShadowCascadeCount: 4
m_Cascade2Split: 0.25 m_Cascade2Split: 0.25
m_Cascade3Split: {x: 0.1, y: 0.3} m_Cascade3Split: {x: 0.1, y: 0.3}
@@ -78,11 +78,11 @@ MonoBehaviour:
m_UseAdaptivePerformance: 1 m_UseAdaptivePerformance: 1
m_ColorGradingMode: 0 m_ColorGradingMode: 0
m_ColorGradingLutSize: 32 m_ColorGradingLutSize: 32
m_AllowPostProcessAlphaOutput: 0
m_UseFastSRGBLinearConversion: 0 m_UseFastSRGBLinearConversion: 0
m_SupportDataDrivenLensFlare: 1 m_SupportDataDrivenLensFlare: 1
m_SupportScreenSpaceLensFlare: 1 m_SupportScreenSpaceLensFlare: 1
m_GPUResidentDrawerMode: 0 m_GPUResidentDrawerMode: 0
m_UseLegacyLightmaps: 0
m_SmallMeshScreenPercentage: 0 m_SmallMeshScreenPercentage: 0
m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0 m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
m_ShadowType: 1 m_ShadowType: 1
@@ -100,15 +100,16 @@ MonoBehaviour:
m_Keys: [] m_Keys: []
m_Values: m_Values:
m_PrefilteringModeMainLightShadows: 3 m_PrefilteringModeMainLightShadows: 3
m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLight: 0
m_PrefilteringModeAdditionalLightShadows: 0 m_PrefilteringModeAdditionalLightShadows: 2
m_PrefilterXRKeywords: 1 m_PrefilterXRKeywords: 1
m_PrefilteringModeForwardPlus: 1 m_PrefilteringModeForwardPlus: 2
m_PrefilteringModeDeferredRendering: 0 m_PrefilteringModeDeferredRendering: 0
m_PrefilteringModeScreenSpaceOcclusion: 1 m_PrefilteringModeScreenSpaceOcclusion: 2
m_PrefilterDebugKeywords: 1 m_PrefilterDebugKeywords: 1
m_PrefilterWriteRenderingLayers: 0 m_PrefilterWriteRenderingLayers: 1
m_PrefilterHDROutput: 1 m_PrefilterHDROutput: 1
m_PrefilterAlphaOutput: 1
m_PrefilterSSAODepthNormals: 0 m_PrefilterSSAODepthNormals: 0
m_PrefilterSSAOSourceDepthLow: 1 m_PrefilterSSAOSourceDepthLow: 1
m_PrefilterSSAOSourceDepthMedium: 1 m_PrefilterSSAOSourceDepthMedium: 1
@@ -120,10 +121,10 @@ MonoBehaviour:
m_PrefilterSSAOSampleCountHigh: 1 m_PrefilterSSAOSampleCountHigh: 1
m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT1: 1
m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT2: 1
m_PrefilterDBufferMRT3: 0 m_PrefilterDBufferMRT3: 1
m_PrefilterSoftShadowsQualityLow: 0 m_PrefilterSoftShadowsQualityLow: 1
m_PrefilterSoftShadowsQualityMedium: 0 m_PrefilterSoftShadowsQualityMedium: 1
m_PrefilterSoftShadowsQualityHigh: 0 m_PrefilterSoftShadowsQualityHigh: 1
m_PrefilterSoftShadows: 0 m_PrefilterSoftShadows: 0
m_PrefilterScreenCoord: 1 m_PrefilterScreenCoord: 1
m_PrefilterNativeRenderPass: 1 m_PrefilterNativeRenderPass: 1

View File

@@ -60,7 +60,19 @@ MonoBehaviour:
- rid: 7166519162571063300 - rid: 7166519162571063300
- rid: 7166519162571063301 - rid: 7166519162571063301
m_RuntimeSettings: m_RuntimeSettings:
m_List: [] m_List:
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 6852985685364965392
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 7166519162571063296
- rid: 7166519162571063298
- rid: 7166519162571063301
m_AssetVersion: 8 m_AssetVersion: 8
m_ObsoleteDefaultVolumeProfile: {fileID: 0} m_ObsoleteDefaultVolumeProfile: {fileID: 0}
m_RenderingLayerNames: m_RenderingLayerNames:

View File

@@ -49,7 +49,7 @@ namespace Rewired.Demos {
private bool setupFinished; private bool setupFinished;
// Editor state management // Editor state management
[NonSerialized] [System.NonSerialized]
private bool initialized; private bool initialized;
private bool isCompiling; private bool isCompiling;
@@ -1009,7 +1009,7 @@ namespace Rewired.Demos {
case ElementAssignmentChangeType.ConflictCheck: case ElementAssignmentChangeType.ConflictCheck:
return ProcessElementAssignmentConflictCheck(entry); return ProcessElementAssignmentConflictCheck(entry);
default: default:
throw new NotImplementedException(); throw new System.NotImplementedException();
} }
} }
@@ -1141,7 +1141,7 @@ namespace Rewired.Demos {
conflictFoundEventData.responseCallback(InputMapper.ConflictResponse.Replace); conflictFoundEventData.responseCallback(InputMapper.ConflictResponse.Replace);
} else if(entry.response == UserResponse.Custom1) { // add without removing } else if(entry.response == UserResponse.Custom1) { // add without removing
conflictFoundEventData.responseCallback(InputMapper.ConflictResponse.Add); conflictFoundEventData.responseCallback(InputMapper.ConflictResponse.Add);
} else throw new NotImplementedException(); } else throw new System.NotImplementedException();
return true; // finished return true; // finished
} }
@@ -1338,11 +1338,11 @@ namespace Rewired.Demos {
#region Mapping Listener Event Handlers #region Mapping Listener Event Handlers
private void OnConflictFound(InputMapper.ConflictFoundEventData data) { private void OnConflictFound(InputMapper.ConflictFoundEventData data) {
conflictFoundEventData = data; this.conflictFoundEventData = data;
} }
private void OnStopped(InputMapper.StoppedEventData data) { private void OnStopped(InputMapper.StoppedEventData data) {
conflictFoundEventData = null; this.conflictFoundEventData = null;
} }
#endregion #endregion
@@ -1677,7 +1677,7 @@ namespace Rewired.Demos {
bool assign bool assign
) )
: base(QueueActionType.JoystickAssignment) { : base(QueueActionType.JoystickAssignment) {
playerId = newPlayerId; this.playerId = newPlayerId;
this.joystickId = joystickId; this.joystickId = joystickId;
this.assign = assign; this.assign = assign;
} }

View File

@@ -10,6 +10,6 @@ namespace Rewired.Demos.CustomPlatform {
[System.Serializable] [System.Serializable]
public class CustomPlatformHardwareJoystickMapPlatformDataSet : UnityEngine.ScriptableObject { public class CustomPlatformHardwareJoystickMapPlatformDataSet : UnityEngine.ScriptableObject {
public System.Collections.Generic.List<Platforms.Custom.HardwareJoystickMapCustomPlatformMapSO> platformMaps; public System.Collections.Generic.List<Rewired.Platforms.Custom.HardwareJoystickMapCustomPlatformMapSO> platformMaps;
} }
} }

View File

@@ -9,14 +9,14 @@ namespace Rewired.Demos.CustomPlatform {
/// Finds the matching platform map for the controller in question for the current custom platform. /// Finds the matching platform map for the controller in question for the current custom platform.
/// </summary> /// </summary>
[System.Serializable] [System.Serializable]
public class CustomPlatformHardwareJoystickMapProvider : Platforms.Custom.IHardwareJoystickMapCustomPlatformMapProvider { public class CustomPlatformHardwareJoystickMapProvider : Rewired.Platforms.Custom.IHardwareJoystickMapCustomPlatformMapProvider {
/// <summary> /// <summary>
/// The list of Platform joystick data sets. /// The list of Platform joystick data sets.
/// </summary> /// </summary>
public System.Collections.Generic.List<PlatformDataSet> platformJoystickDataSets; public System.Collections.Generic.List<PlatformDataSet> platformJoystickDataSets;
public Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap(int customPlatformId, System.Guid hardwareTypeGuid) { public Rewired.Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap(int customPlatformId, System.Guid hardwareTypeGuid) {
var platformDataSet = GetPlatformDataSet(customPlatformId); var platformDataSet = GetPlatformDataSet(customPlatformId);
if (platformDataSet == null) return null; if (platformDataSet == null) return null;
return GetPlatformMap(platformDataSet, hardwareTypeGuid); return GetPlatformMap(platformDataSet, hardwareTypeGuid);
@@ -32,7 +32,7 @@ namespace Rewired.Demos.CustomPlatform {
return null; return null;
} }
static private Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap(CustomPlatformHardwareJoystickMapPlatformDataSet platformDataSet, System.Guid hardwareTypeGuid) { static private Rewired.Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap(CustomPlatformHardwareJoystickMapPlatformDataSet platformDataSet, System.Guid hardwareTypeGuid) {
if (platformDataSet == null || platformDataSet.platformMaps == null) return null; if (platformDataSet == null || platformDataSet.platformMaps == null) return null;
int count = platformDataSet.platformMaps.Count; int count = platformDataSet.platformMaps.Count;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {

View File

@@ -12,7 +12,7 @@ namespace Rewired.Demos.CustomPlatform {
/// found that returns a non-null <see cref="Rewired.Platforms.Custom.CustomPlatformInitOptions"/> will be used by /// found that returns a non-null <see cref="Rewired.Platforms.Custom.CustomPlatformInitOptions"/> will be used by
/// Rewired during initialization to set the custom platform. /// Rewired during initialization to set the custom platform.
/// </summary> /// </summary>
public sealed class CustomPlatformManager : UnityEngine.MonoBehaviour, Platforms.Custom.ICustomPlatformInitializer { public sealed class CustomPlatformManager : UnityEngine.MonoBehaviour, Rewired.Platforms.Custom.ICustomPlatformInitializer {
/// <summary> /// <summary>
/// Provides custom platform joystick definition maps. /// Provides custom platform joystick definition maps.
@@ -25,12 +25,12 @@ namespace Rewired.Demos.CustomPlatform {
/// Return null to not use a custom platform. /// Return null to not use a custom platform.
/// </summary> /// </summary>
/// <returns>Custom platform init options</returns> /// <returns>Custom platform init options</returns>
public Platforms.Custom.CustomPlatformInitOptions GetCustomPlatformInitOptions() { public Rewired.Platforms.Custom.CustomPlatformInitOptions GetCustomPlatformInitOptions() {
// You can use #if conditionals or other means to determine which custom platform to initialize, if any. // You can use #if conditionals or other means to determine which custom platform to initialize, if any.
// Create platform options // Create platform options
var options = new Platforms.Custom.CustomPlatformInitOptions(); var options = new Rewired.Platforms.Custom.CustomPlatformInitOptions();
// Set the platform id // Set the platform id
options.platformId = (int)CustomPlatformType.MyPlatform; options.platformId = (int)CustomPlatformType.MyPlatform;
@@ -42,7 +42,7 @@ namespace Rewired.Demos.CustomPlatform {
options.hardwareJoystickMapCustomPlatformMapProvider = mapProvider; options.hardwareJoystickMapCustomPlatformMapProvider = mapProvider;
// Create platform configuration values // Create platform configuration values
var configVars = new Platforms.Custom.CustomPlatformConfigVars() { var configVars = new Rewired.Platforms.Custom.CustomPlatformConfigVars() {
ignoreInputWhenAppNotInFocus = true, ignoreInputWhenAppNotInFocus = true,
useNativeKeyboard = true, useNativeKeyboard = true,
useNativeMouse = true useNativeMouse = true

View File

@@ -7,7 +7,7 @@ namespace Rewired.Demos.CustomPlatform {
/// This allows supporting special features such as vibration and other custom functionality. /// This allows supporting special features such as vibration and other custom functionality.
/// Implementing Rewired.Interfaces.IControllerVibrator allows Rewired's Controller and Player vibration function calls to work. /// Implementing Rewired.Interfaces.IControllerVibrator allows Rewired's Controller and Player vibration function calls to work.
/// </summary> /// </summary>
public sealed class MyPlatformControllerExtension : ControllerExtensions.CustomControllerExtension, Interfaces.IControllerVibrator { public sealed class MyPlatformControllerExtension : ControllerExtensions.CustomControllerExtension, Rewired.Interfaces.IControllerVibrator {
/// <summary> /// <summary>
/// Constructor. /// Constructor.
@@ -62,7 +62,7 @@ namespace Rewired.Demos.CustomPlatform {
((Source)GetSource()).sourceJoystick.StopVibration(); ((Source)GetSource()).sourceJoystick.StopVibration();
} }
class Source : Interfaces.IControllerExtensionSource { class Source : Rewired.Interfaces.IControllerExtensionSource {
public readonly MyPlatformInputSource.Joystick sourceJoystick; public readonly MyPlatformInputSource.Joystick sourceJoystick;

View File

@@ -19,7 +19,7 @@ namespace Rewired.Demos.CustomPlatform {
/// This requires no code. Simply create an instance from the right-click menu: /// This requires no code. Simply create an instance from the right-click menu:
/// Create -> Rewired -> Custom Platform -> Simple Joystick Platform Map /// Create -> Rewired -> Custom Platform -> Simple Joystick Platform Map
/// </summary> /// </summary>
public sealed class MyPlatformHardwareJoystickMapPlatformMap : Platforms.Custom.HardwareJoystickMapCustomPlatformMapSO { public sealed class MyPlatformHardwareJoystickMapPlatformMap : Rewired.Platforms.Custom.HardwareJoystickMapCustomPlatformMapSO {
/// <summary> /// <summary>
/// The platform map. /// The platform map.
@@ -33,7 +33,7 @@ namespace Rewired.Demos.CustomPlatform {
/// Returns the Platform Map. /// Returns the Platform Map.
/// </summary> /// </summary>
/// <returns>Platform Map</returns> /// <returns>Platform Map</returns>
public override Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap() { public override Rewired.Data.Mapping.HardwareJoystickMap.Platform GetPlatformMap() {
return platformMap; return platformMap;
} }
@@ -46,7 +46,7 @@ namespace Rewired.Demos.CustomPlatform {
/// Variants must be serialized in the child class below to avoid infinite recursion. /// Variants must be serialized in the child class below to avoid infinite recursion.
/// </summary> /// </summary>
[System.Serializable] [System.Serializable]
public class PlatformMapBase : Platforms.Custom.HardwareJoystickMapCustomPlatformMap<MatchingCriteria> { public class PlatformMapBase : Rewired.Platforms.Custom.HardwareJoystickMapCustomPlatformMap<MatchingCriteria> {
/// <summary> /// <summary>
/// Creates a new instance of this object. /// Creates a new instance of this object.
@@ -79,7 +79,7 @@ namespace Rewired.Demos.CustomPlatform {
/// This function must be implemented if using variants. /// This function must be implemented if using variants.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public override System.Collections.Generic.IList<Data.Mapping.HardwareJoystickMap.Platform> GetVariants() { return variants; } public override System.Collections.Generic.IList<Rewired.Data.Mapping.HardwareJoystickMap.Platform> GetVariants() { return variants; }
/// <summary> /// <summary>
/// Creates a new instance of this object. /// Creates a new instance of this object.

View File

@@ -13,7 +13,7 @@ namespace Rewired.Demos.CustomPlatform {
/// If multi-threaded input is required, input should be read on a separate thread, enqueued, /// If multi-threaded input is required, input should be read on a separate thread, enqueued,
/// and consumed by the Joystick/Controller on Update in a thread-safe manner (mutex). /// and consumed by the Joystick/Controller on Update in a thread-safe manner (mutex).
/// </summary> /// </summary>
public sealed class MyPlatformInputSource : Platforms.Custom.CustomPlatformInputSource { public sealed class MyPlatformInputSource : Rewired.Platforms.Custom.CustomPlatformInputSource {
/// <summary> /// <summary>
/// Source of joysticks. This is just for this example. /// Source of joysticks. This is just for this example.
@@ -40,7 +40,7 @@ namespace Rewired.Demos.CustomPlatform {
/// Constructor. /// Constructor.
/// </summary> /// </summary>
/// <param name="configVars">Custom platform configuration variables</param> /// <param name="configVars">Custom platform configuration variables</param>
public MyPlatformInputSource(Platforms.Custom.CustomPlatformConfigVars configVars) : public MyPlatformInputSource(Rewired.Platforms.Custom.CustomPlatformConfigVars configVars) :
base( base(
configVars, configVars,
new InitOptions() { new InitOptions() {
@@ -184,7 +184,7 @@ namespace Rewired.Demos.CustomPlatform {
/// <summary> /// <summary>
/// Example Joystick implementation that supports vibration. /// Example Joystick implementation that supports vibration.
/// </summary> /// </summary>
new public sealed class Joystick : Rewired.Platforms.Custom.CustomPlatformInputSource.Joystick, Interfaces.IControllerVibrator { new public sealed class Joystick : Rewired.Platforms.Custom.CustomPlatformInputSource.Joystick, Rewired.Interfaces.IControllerVibrator {
private UnityInputJoystickSource.Joystick _sourceJoystick; private UnityInputJoystickSource.Joystick _sourceJoystick;

View File

@@ -5,9 +5,9 @@ namespace Rewired.Demos.CustomPlatform {
/// <summary> /// <summary>
/// An example custom keyboard input source that wraps UnityEngine.Input. /// An example custom keyboard input source that wraps UnityEngine.Input.
/// </summary> /// </summary>
public class MyPlatformUnifiedKeyboardSource : Platforms.Custom.CustomPlatformUnifiedKeyboardSource { public class MyPlatformUnifiedKeyboardSource : Rewired.Platforms.Custom.CustomPlatformUnifiedKeyboardSource {
private static readonly KeyboardKeyCode[] keyCodes = (KeyboardKeyCode[])System.Enum.GetValues(typeof(KeyboardKeyCode)); private static readonly Rewired.KeyboardKeyCode[] keyCodes = (Rewired.KeyboardKeyCode[])System.Enum.GetValues(typeof(Rewired.KeyboardKeyCode));
protected override void OnInitialize() { protected override void OnInitialize() {
base.OnInitialize(); base.OnInitialize();
@@ -24,7 +24,7 @@ namespace Rewired.Demos.CustomPlatform {
// Set a single key label // Set a single key label
map.Set( map.Set(
new KeyPropertyMap.Key() { new KeyPropertyMap.Key() {
keyCode = KeyboardKeyCode.A, keyCode = Rewired.KeyboardKeyCode.A,
label = "[A]" label = "[A]"
} }
); );
@@ -32,9 +32,9 @@ namespace Rewired.Demos.CustomPlatform {
// Set multiple of key labels at the same time // Set multiple of key labels at the same time
map.Set( map.Set(
new [] { new [] {
new KeyPropertyMap.Key() { keyCode = KeyboardKeyCode.B, label = "[B]" }, new KeyPropertyMap.Key() { keyCode = Rewired.KeyboardKeyCode.B, label = "[B]" },
new KeyPropertyMap.Key() { keyCode = KeyboardKeyCode.C, label = "[C]" }, new KeyPropertyMap.Key() { keyCode = Rewired.KeyboardKeyCode.C, label = "[C]" },
new KeyPropertyMap.Key() { keyCode = KeyboardKeyCode.D, label = "[D]" } new KeyPropertyMap.Key() { keyCode = Rewired.KeyboardKeyCode.D, label = "[D]" }
} }
); );

View File

@@ -5,7 +5,7 @@ namespace Rewired.Demos.CustomPlatform {
/// <summary> /// <summary>
/// An example custom mouse input source that wraps UnityEngine.Input. /// An example custom mouse input source that wraps UnityEngine.Input.
/// </summary> /// </summary>
public class MyPlatformUnifiedMouseSource : Platforms.Custom.CustomPlatformUnifiedMouseSource { public class MyPlatformUnifiedMouseSource : Rewired.Platforms.Custom.CustomPlatformUnifiedMouseSource {
/// <summary> /// <summary>
/// Mouse screen position in pixels. /// Mouse screen position in pixels.

View File

@@ -37,7 +37,7 @@ namespace Rewired.Demos.CustomPlatform {
} }
private void CheckForJoystickChanges() { private void CheckForJoystickChanges() {
double time = ReInput.time.unscaledTime; double time = Rewired.ReInput.time.unscaledTime;
if (time >= _nextJoystickCheckTime) { if (time >= _nextJoystickCheckTime) {
_nextJoystickCheckTime = time + joystickCheckInterval; _nextJoystickCheckTime = time + joystickCheckInterval;
if (DidJoysticksChange()) { if (DidJoysticksChange()) {
@@ -159,7 +159,7 @@ namespace Rewired.Demos.CustomPlatform {
/// A represenatation of low-level system joystick. /// A represenatation of low-level system joystick.
/// This could provide an interface to a native input API, for example. /// This could provide an interface to a native input API, for example.
/// </summary> /// </summary>
public class Joystick : Interfaces.IControllerVibrator { public class Joystick : Rewired.Interfaces.IControllerVibrator {
private const int maxJoysticks = 8; private const int maxJoysticks = 8;
private const int maxAxes = 10; private const int maxAxes = 10;

View File

@@ -52,7 +52,7 @@
namespace Rewired.Demos { namespace Rewired.Demos {
using UnityEngine; using UnityEngine;
using System.Collections.Generic; using System.Collections.Generic;
using ControllerExtensions; using Rewired.ControllerExtensions;
[AddComponentMenu("")] [AddComponentMenu("")]
public class DualShock4SpecialFeaturesExample : MonoBehaviour { public class DualShock4SpecialFeaturesExample : MonoBehaviour {

View File

@@ -105,125 +105,13 @@ MonoBehaviour:
_userData: _userData:
configVars: configVars:
updateLoop: 7 updateLoop: 7
alwaysUseUnityInput: 1
windowsStandalonePrimaryInputSource: 0
osx_primaryInputSource: 0
linux_primaryInputSource: 0
windowsUWP_primaryInputSource: 0
xboxOne_primaryInputSource: 0
ps4_primaryInputSource: 0
webGL_primaryInputSource: 0
stadia_primaryInputSource: 0
useXInput: 1 useXInput: 1
useNativeMouse: 1 alwaysUseUnityInput: 1
useEnhancedDeviceSupport: 1
windowsStandalone_useSteamRawInputControllerWorkaround: 0
osxStandalone_useEnhancedDeviceSupport: 1
android_supportUnknownGamepads: 1
ps4_assignJoysticksByPS4JoyId: 1
useSteamControllerSupport: 1
logToScreen: 0
runInEditMode: 0
allowInputInEditorSceneView: 0
platformVars_windowsStandalone:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
useNativeKeyboard: 1
joystickRefreshRate: 240
platformVars_linuxStandalone:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_osxStandalone:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_windows8Store:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_windowsUWP:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
useGamepadAPI: 1
useHIDAPI: 1
platformVars_iOS:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_tvOS:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_android:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_ps3:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_ps4:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_psVita:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_xbox360:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_xboxOne:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_wii:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_wiiu:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_switch:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_webGL:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
platformVars_stadia:
disableKeyboard: 0
ignoreInputWhenAppNotInFocus: 1
useNativeKeyboard: 1
useNativeMouse: 1
maxJoysticksPerPlayer: 1 maxJoysticksPerPlayer: 1
autoAssignJoysticks: 1 autoAssignJoysticks: 1
assignJoysticksToPlayingPlayersOnly: 0 assignJoysticksToPlayingPlayersOnly: 0
distributeJoysticksEvenly: 1 distributeJoysticksEvenly: 1
reassignJoystickToPreviousOwnerOnReconnect: 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: players:
- _id: 0 - _id: 0
_name: System _name: System
@@ -247,15 +135,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 5 - _id: 5
_name: Player0 _name: Player0
_descriptiveName: Player 1 _descriptiveName: Player 1
@@ -305,15 +184,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 1 _assignMouseOnStart: 1
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 10 - _id: 10
_name: Player1 _name: Player1
_descriptiveName: Player 2 _descriptiveName: Player 2
@@ -351,15 +221,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 17 - _id: 17
_name: Player2 _name: Player2
_descriptiveName: Player 3 _descriptiveName: Player 3
@@ -397,15 +258,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 18 - _id: 18
_name: Player3 _name: Player3
_descriptiveName: Player 4 _descriptiveName: Player 4
@@ -443,15 +295,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 19 - _id: 19
_name: Player4 _name: Player4
_descriptiveName: Player 5 _descriptiveName: Player 5
@@ -489,15 +332,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 20 - _id: 20
_name: Player5 _name: Player5
_descriptiveName: Player 6 _descriptiveName: Player 6
@@ -535,15 +369,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
- _id: 21 - _id: 21
_name: Player6 _name: Player6
_descriptiveName: Player 7 _descriptiveName: Player 7
@@ -581,15 +406,6 @@ MonoBehaviour:
_defaultCustomControllerMaps: [] _defaultCustomControllerMaps: []
_startingCustomControllers: [] _startingCustomControllers: []
_assignMouseOnStart: 0 _assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_excludeFromControllerAutoAssignment: 0
_controllerMapLayoutManagerSettings:
_enabled: 1
_loadFromUserDataStore: 1
_ruleSets: []
_controllerMapEnablerSettings:
_enabled: 1
_ruleSets: []
actions: actions:
- _id: 3 - _id: 3
_name: Vertical _name: Vertical
@@ -979,8 +795,6 @@ MonoBehaviour:
inputBehaviors: inputBehaviors:
- _id: 0 - _id: 0
_name: Default _name: Default
_joystickAxisSensitivity: 1
_digitalAxisSimulation: 1
_digitalAxisSnap: 1 _digitalAxisSnap: 1
_digitalAxisInstantReverse: 0 _digitalAxisInstantReverse: 0
_digitalAxisGravity: 3 _digitalAxisGravity: 3
@@ -990,16 +804,9 @@ MonoBehaviour:
_mouseXYAxisSensitivity: 1 _mouseXYAxisSensitivity: 1
_mouseXYAxisDeltaCalc: 1 _mouseXYAxisDeltaCalc: 1
_mouseOtherAxisSensitivity: 1 _mouseOtherAxisSensitivity: 1
_customControllerAxisSensitivity: 1
_buttonDoublePressSpeed: .300000012 _buttonDoublePressSpeed: .300000012
_buttonShortPressTime: .25
_buttonShortPressExpiresIn: 0
_buttonLongPressTime: 1
_buttonLongPressExpiresIn: 0
_buttonDeadZone: .5 _buttonDeadZone: .5
_buttonDownBuffer: 0 _buttonDownBuffer: 0
_buttonRepeatRate: 30
_buttonRepeatDelay: 0
mapCategories: mapCategories:
- _name: Default - _name: Default
_descriptiveName: Default _descriptiveName: Default
@@ -2081,8 +1888,6 @@ MonoBehaviour:
actionElementMaps: [] actionElementMaps: []
customControllerMaps: [] customControllerMaps: []
customControllers: [] customControllers: []
controllerMapLayoutManagerRuleSets: []
controllerMapEnablerRuleSets: []
playerIdCounter: 22 playerIdCounter: 22
actionIdCounter: 47 actionIdCounter: 47
actionCategoryIdCounter: 7 actionCategoryIdCounter: 7
@@ -2097,8 +1902,6 @@ MonoBehaviour:
mouseMapIdCounter: 12 mouseMapIdCounter: 12
customControllerMapIdCounter: 7 customControllerMapIdCounter: 7
customControllerIdCounter: 4 customControllerIdCounter: 4
controllerMapLayoutManagerSetIdCounter: 0
controllerMapEnablerSetIdCounter: 0
_controllerDataFiles: {fileID: 11400000, guid: d21d2b20df8369642b76aafbb2576ba7, _controllerDataFiles: {fileID: 11400000, guid: d21d2b20df8369642b76aafbb2576ba7,
type: 2} type: 2}
--- !u!4 &220370785 --- !u!4 &220370785
@@ -2112,6 +1915,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1
--- !u!1 &311824353 --- !u!1 &311824353
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2151,6 +1955,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!1001 &420069592 --- !u!1001 &420069592
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2208,6 +2013,7 @@ GameObject:
m_Component: m_Component:
- 4: {fileID: 2100927960} - 4: {fileID: 2100927960}
- 20: {fileID: 2100927959} - 20: {fileID: 2100927959}
- 92: {fileID: 2100927958}
- 124: {fileID: 2100927957} - 124: {fileID: 2100927957}
- 81: {fileID: 2100927956} - 81: {fileID: 2100927956}
m_Layer: 0 m_Layer: 0
@@ -2225,6 +2031,13 @@ AudioListener:
m_GameObject: {fileID: 2100927955} m_GameObject: {fileID: 2100927955}
m_Enabled: 1 m_Enabled: 1
--- !u!124 &2100927957 --- !u!124 &2100927957
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2100927955}
m_Enabled: 1
--- !u!92 &2100927958
Behaviour: Behaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
@@ -2258,8 +2071,11 @@ Camera:
m_Bits: 4294967295 m_Bits: 4294967295
m_RenderingPath: -1 m_RenderingPath: -1
m_TargetTexture: {fileID: 0} m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0 m_HDR: 0
m_OcclusionCulling: 1 m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!4 &2100927960 --- !u!4 &2100927960
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2271,3 +2087,4 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0

View File

@@ -126,7 +126,7 @@ namespace Rewired.Demos {
void Awake() { void Awake() {
pointer = (GameObject)Instantiate(pointerPrefab); pointer = (GameObject)GameObject.Instantiate(pointerPrefab);
pointer.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale); pointer.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale);
#if UNITY_5_PLUS #if UNITY_5_PLUS
@@ -190,11 +190,11 @@ namespace Rewired.Demos {
} }
void CreateClickEffect(Color color) { void CreateClickEffect(Color color) {
GameObject go = (GameObject)Instantiate(clickEffectPrefab); GameObject go = (GameObject)GameObject.Instantiate(clickEffectPrefab);
go.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale); go.transform.localScale = new Vector3(spriteScale, spriteScale, spriteScale);
go.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(mouse.screenPosition.x, mouse.screenPosition.y, distanceFromCamera)); go.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(mouse.screenPosition.x, mouse.screenPosition.y, distanceFromCamera));
go.GetComponentInChildren<SpriteRenderer>().color = color; go.GetComponentInChildren<SpriteRenderer>().color = color;
Destroy(go, 0.5f); Object.Destroy(go, 0.5f);
} }
// Callback when the screen position changes // Callback when the screen position changes

View File

@@ -10,7 +10,7 @@ namespace Rewired.Demos {
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
using Integration.UnityUI; using Rewired.Integration.UnityUI;
/// <summary> /// <summary>
/// Example handler of Player Pointer Events. /// Example handler of Player Pointer Events.

View File

@@ -46,7 +46,7 @@ namespace Rewired.Demos {
// and re-connected and disable this script // and re-connected and disable this script
if(DoAllPlayersHaveJoysticks()) { if(DoAllPlayersHaveJoysticks()) {
ReInput.configuration.autoAssignJoysticks = true; ReInput.configuration.autoAssignJoysticks = true;
enabled = false; // disable this script this.enabled = false; // disable this script
} }
} }

View File

@@ -19,7 +19,7 @@ namespace Rewired.Demos {
private Vector3 moveVector; private Vector3 moveVector;
private bool fire; private bool fire;
private Player player { get { return ReInput.isReady ? ReInput.players.GetPlayer(playerId) : null; } } private Rewired.Player player { get { return ReInput.isReady ? ReInput.players.GetPlayer(playerId) : null; } }
void OnEnable() { void OnEnable() {
// Get the character controller // Get the character controller

View File

@@ -25,8 +25,8 @@ namespace Rewired.Demos {
private static PressStartToJoinExample_Assigner instance; private static PressStartToJoinExample_Assigner instance;
public static Player GetRewiredPlayer(int gamePlayerId) { public static Rewired.Player GetRewiredPlayer(int gamePlayerId) {
if(!ReInput.isReady) return null; if(!Rewired.ReInput.isReady) return null;
if(instance == null) { if(instance == null) {
Debug.LogError("Not initialized. Do you have a PressStartToJoinPlayerSelector in your scehe?"); Debug.LogError("Not initialized. Do you have a PressStartToJoinPlayerSelector in your scehe?");
return null; return null;

View File

@@ -18,7 +18,7 @@ namespace Rewired.Demos {
private Vector3 moveVector; private Vector3 moveVector;
private bool fire; private bool fire;
private Player player { get { return PressStartToJoinExample_Assigner.GetRewiredPlayer(gamePlayerId); } } private Rewired.Player player { get { return PressStartToJoinExample_Assigner.GetRewiredPlayer(gamePlayerId); } }
void OnEnable() { void OnEnable() {
// Get the character controller // Get the character controller

View File

@@ -134,10 +134,10 @@ namespace Rewired.Demos {
// Delete placeholders // Delete placeholders
foreach(Transform t in actionGroupTransform) { foreach(Transform t in actionGroupTransform) {
Destroy(t.gameObject); Object.Destroy(t.gameObject);
} }
foreach(Transform t in fieldGroupTransform) { foreach(Transform t in fieldGroupTransform) {
Destroy(t.gameObject); Object.Destroy(t.gameObject);
} }
// Create Action fields and input field buttons // Create Action fields and input field buttons
@@ -158,13 +158,13 @@ namespace Rewired.Demos {
private void CreateUIRow(InputAction action, AxisRange actionRange, string label) { private void CreateUIRow(InputAction action, AxisRange actionRange, string label) {
// Create the Action label // Create the Action label
GameObject labelGo = Instantiate<GameObject>(textPrefab); GameObject labelGo = Object.Instantiate<GameObject>(textPrefab);
labelGo.transform.SetParent(actionGroupTransform); labelGo.transform.SetParent(actionGroupTransform);
labelGo.transform.SetAsLastSibling(); labelGo.transform.SetAsLastSibling();
labelGo.GetComponent<Text>().text = label; labelGo.GetComponent<Text>().text = label;
// Create the input field button // Create the input field button
GameObject buttonGo = Instantiate<GameObject>(buttonPrefab); GameObject buttonGo = Object.Instantiate<GameObject>(buttonPrefab);
buttonGo.transform.SetParent(fieldGroupTransform); buttonGo.transform.SetParent(fieldGroupTransform);
buttonGo.transform.SetAsLastSibling(); buttonGo.transform.SetAsLastSibling();

View File

@@ -126,10 +126,10 @@ namespace Rewired.Demos {
// Delete placeholders // Delete placeholders
foreach(Transform t in actionGroupTransform) { foreach(Transform t in actionGroupTransform) {
Destroy(t.gameObject); Object.Destroy(t.gameObject);
} }
foreach(Transform t in fieldGroupTransform) { foreach(Transform t in fieldGroupTransform) {
Destroy(t.gameObject); Object.Destroy(t.gameObject);
} }
// Create Action fields and input field buttons // Create Action fields and input field buttons
@@ -150,13 +150,13 @@ namespace Rewired.Demos {
private void CreateUIRow(InputAction action, AxisRange actionRange, string label) { private void CreateUIRow(InputAction action, AxisRange actionRange, string label) {
// Create the Action label // Create the Action label
GameObject labelGo = Instantiate<GameObject>(textPrefab); GameObject labelGo = Object.Instantiate<GameObject>(textPrefab);
labelGo.transform.SetParent(actionGroupTransform); labelGo.transform.SetParent(actionGroupTransform);
labelGo.transform.SetAsLastSibling(); labelGo.transform.SetAsLastSibling();
labelGo.GetComponent<Text>().text = label; labelGo.GetComponent<Text>().text = label;
// Create the input field button // Create the input field button
GameObject buttonGo = Instantiate<GameObject>(buttonPrefab); GameObject buttonGo = Object.Instantiate<GameObject>(buttonPrefab);
buttonGo.transform.SetParent(fieldGroupTransform); buttonGo.transform.SetParent(fieldGroupTransform);
buttonGo.transform.SetAsLastSibling(); buttonGo.transform.SetAsLastSibling();

View File

@@ -97,7 +97,7 @@ namespace Rewired.Localization {
_dictionary.Clear(); _dictionary.Clear();
if (_localizedStringsFile != null) { if (_localizedStringsFile != null) {
try { try {
_dictionary = Utils.Libraries.TinyJson.JsonParser.FromJson<Dictionary<string, string>>(_localizedStringsFile.text); _dictionary = Rewired.Utils.Libraries.TinyJson.JsonParser.FromJson<Dictionary<string, string>>(_localizedStringsFile.text);
} catch (Exception ex) { } catch (Exception ex) {
UnityEngine.Debug.LogError(ex); UnityEngine.Debug.LogError(ex);
} }
@@ -122,7 +122,7 @@ namespace Rewired.Localization {
#if UNITY_EDITOR #if UNITY_EDITOR
private Rewired.Utils.Classes.Data.InspectorValue<UnityEngine.TextAsset>_inspector_localizedStringsFile = new Rewired.Utils.Classes.Data.InspectorValue<UnityEngine.TextAsset>(); private Rewired.Utils.Classes.Data.InspectorValue<UnityEngine.TextAsset>_inspector_localizedStringsFile = new Rewired.Utils.Classes.Data.InspectorValue<UnityEngine.TextAsset>();
protected override void CheckInspectorValues(ref Action actions) { protected override void CheckInspectorValues(ref System.Action actions) {
base.CheckInspectorValues(ref actions); base.CheckInspectorValues(ref actions);
if(_inspector_localizedStringsFile.SetIfChanged(_localizedStringsFile)) { if(_inspector_localizedStringsFile.SetIfChanged(_localizedStringsFile)) {
actions += () => localizedStringsFile = _localizedStringsFile; actions += () => localizedStringsFile = _localizedStringsFile;

View File

@@ -24,7 +24,7 @@
namespace Rewired.Localization { namespace Rewired.Localization {
using Rewired; using Rewired;
using Interfaces; using Rewired.Interfaces;
/// <summary> /// <summary>
/// Base class for management of localized strings. /// Base class for management of localized strings.
@@ -93,7 +93,7 @@ namespace Rewired.Localization {
ReInput.InitializedEvent -= TrySetLocalizedStringProvider; ReInput.InitializedEvent -= TrySetLocalizedStringProvider;
ReInput.InitializedEvent += TrySetLocalizedStringProvider; ReInput.InitializedEvent += TrySetLocalizedStringProvider;
if (!ReInput.isReady) return; if (!ReInput.isReady) return;
if (!Utils.UnityTools.IsNullOrDestroyed(ReInput.localization.localizedStringProvider)) { if (!Rewired.Utils.UnityTools.IsNullOrDestroyed(ReInput.localization.localizedStringProvider)) {
UnityEngine.Debug.LogWarning("A localized string provider is already set. Only one localized string provider can exist at a time."); UnityEngine.Debug.LogWarning("A localized string provider is already set. Only one localized string provider can exist at a time.");
return; return;
} }

View File

@@ -8,7 +8,7 @@ namespace Rewired.Integration.UnityUI {
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UI; using Rewired.UI;
/// <summary> /// <summary>
/// Each touch event creates one of these containing all the relevant information. /// Each touch event creates one of these containing all the relevant information.

View File

@@ -57,7 +57,7 @@ namespace Rewired.Integration.UnityUI {
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using System.Collections.Generic; using System.Collections.Generic;
using UI; using Rewired.UI;
// Content added for Rewired // Content added for Rewired
public abstract class RewiredPointerInputModule : BaseInputModule { public abstract class RewiredPointerInputModule : BaseInputModule {

View File

@@ -56,7 +56,7 @@ namespace Rewired.Integration.UnityUI {
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.Serialization; using UnityEngine.Serialization;
using System.Collections.Generic; using System.Collections.Generic;
using UI; using Rewired.UI;
[AddComponentMenu("Rewired/Rewired Standalone Input Module")] [AddComponentMenu("Rewired/Rewired Standalone Input Module")]
public sealed class RewiredStandaloneInputModule : RewiredPointerInputModule { public sealed class RewiredStandaloneInputModule : RewiredPointerInputModule {
@@ -402,8 +402,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(value == horizontalActionId) return; if(value == horizontalActionId) return;
horizontalActionId = value; horizontalActionId = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
m_HorizontalAxis = ReInput.mapping.GetAction(value) != null ? ReInput.mapping.GetAction(value).name : string.Empty; m_HorizontalAxis = Rewired.ReInput.mapping.GetAction(value) != null ? Rewired.ReInput.mapping.GetAction(value).name : string.Empty;
} }
} }
} }
@@ -418,8 +418,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(value == verticalActionId) return; if(value == verticalActionId) return;
verticalActionId = value; verticalActionId = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
m_VerticalAxis = ReInput.mapping.GetAction(value) != null ? ReInput.mapping.GetAction(value).name : string.Empty; m_VerticalAxis = Rewired.ReInput.mapping.GetAction(value) != null ? Rewired.ReInput.mapping.GetAction(value).name : string.Empty;
} }
} }
} }
@@ -434,8 +434,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(value == submitActionId) return; if(value == submitActionId) return;
submitActionId = value; submitActionId = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
m_SubmitButton = ReInput.mapping.GetAction(value) != null ? ReInput.mapping.GetAction(value).name : string.Empty; m_SubmitButton = Rewired.ReInput.mapping.GetAction(value) != null ? Rewired.ReInput.mapping.GetAction(value).name : string.Empty;
} }
} }
} }
@@ -450,8 +450,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(value == cancelActionId) return; if(value == cancelActionId) return;
cancelActionId = value; cancelActionId = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
m_CancelButton = ReInput.mapping.GetAction(value) != null ? ReInput.mapping.GetAction(value).name : string.Empty; m_CancelButton = Rewired.ReInput.mapping.GetAction(value) != null ? Rewired.ReInput.mapping.GetAction(value).name : string.Empty;
} }
} }
} }
@@ -523,8 +523,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(m_HorizontalAxis == value) return; if(m_HorizontalAxis == value) return;
m_HorizontalAxis = value; m_HorizontalAxis = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
horizontalActionId = ReInput.mapping.GetActionId(value); horizontalActionId = Rewired.ReInput.mapping.GetActionId(value);
} }
} }
} }
@@ -537,8 +537,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(m_VerticalAxis == value) return; if(m_VerticalAxis == value) return;
m_VerticalAxis = value; m_VerticalAxis = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
verticalActionId = ReInput.mapping.GetActionId(value); verticalActionId = Rewired.ReInput.mapping.GetActionId(value);
} }
} }
} }
@@ -551,8 +551,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(m_SubmitButton == value) return; if(m_SubmitButton == value) return;
m_SubmitButton = value; m_SubmitButton = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
submitActionId = ReInput.mapping.GetActionId(value); submitActionId = Rewired.ReInput.mapping.GetActionId(value);
} }
} }
} }
@@ -565,8 +565,8 @@ namespace Rewired.Integration.UnityUI {
set { set {
if(m_CancelButton == value) return; if(m_CancelButton == value) return;
m_CancelButton = value; m_CancelButton = value;
if(ReInput.isReady) { if(Rewired.ReInput.isReady) {
cancelActionId = ReInput.mapping.GetActionId(value); cancelActionId = Rewired.ReInput.mapping.GetActionId(value);
} }
} }
} }
@@ -583,7 +583,7 @@ namespace Rewired.Integration.UnityUI {
// Determine if touch is supported // Determine if touch is supported
isTouchSupported = defaultTouchInputSource.touchSupported; isTouchSupported = defaultTouchInputSource.touchSupported;
ReInput.InitializedEvent += OnRewiredInitialized; Rewired.ReInput.InitializedEvent += OnRewiredInitialized;
// Initialize Rewired // Initialize Rewired
InitializeRewired(); InitializeRewired();
@@ -592,7 +592,7 @@ namespace Rewired.Integration.UnityUI {
public override void UpdateModule() { public override void UpdateModule() {
CheckEditorRecompile(); CheckEditorRecompile();
if (recompiling) return; if (recompiling) return;
if (!ReInput.isReady) return; if (!Rewired.ReInput.isReady) return;
if (!m_HasFocus && ShouldIgnoreEventsOnNoFocus()) return; if (!m_HasFocus && ShouldIgnoreEventsOnNoFocus()) return;
} }
@@ -604,13 +604,13 @@ namespace Rewired.Integration.UnityUI {
public override bool ShouldActivateModule() { public override bool ShouldActivateModule() {
if (!base.ShouldActivateModule()) return false; if (!base.ShouldActivateModule()) return false;
if (recompiling) return false; if (recompiling) return false;
if (!ReInput.isReady) return false; if (!Rewired.ReInput.isReady) return false;
bool shouldActivate = m_ForceModuleActive; bool shouldActivate = m_ForceModuleActive;
// Combine input for all players // Combine input for all players
for (int i = 0; i < playerIds.Length; i++) { for (int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if (player == null) continue; if (player == null) continue;
if (usePlayingPlayersOnly && !player.isPlaying) continue; if (usePlayingPlayersOnly && !player.isPlaying) continue;
@@ -662,7 +662,7 @@ namespace Rewired.Integration.UnityUI {
} }
public override void Process() { public override void Process() {
if (!ReInput.isReady) return; if (!Rewired.ReInput.isReady) return;
if (!m_HasFocus && ShouldIgnoreEventsOnNoFocus()) return; if (!m_HasFocus && ShouldIgnoreEventsOnNoFocus()) return;
if (!enabled || !gameObject.activeInHierarchy) return; if (!enabled || !gameObject.activeInHierarchy) return;
@@ -739,7 +739,7 @@ namespace Rewired.Integration.UnityUI {
// Debug.Log("Pressed: " + newPressed); // Debug.Log("Pressed: " + newPressed);
double time = ReInput.time.unscaledTime; double time = Rewired.ReInput.time.unscaledTime;
if (newPressed == pointerEvent.lastPress) { if (newPressed == pointerEvent.lastPress) {
var diffTime = time - pointerEvent.clickTime; var diffTime = time - pointerEvent.clickTime;
@@ -813,7 +813,7 @@ namespace Rewired.Integration.UnityUI {
var data = GetBaseEventData(); var data = GetBaseEventData();
for (int i = 0; i < playerIds.Length; i++) { for (int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if (player == null) continue; if (player == null) continue;
if (usePlayingPlayersOnly && !player.isPlaying) continue; if (usePlayingPlayersOnly && !player.isPlaying) continue;
@@ -839,7 +839,7 @@ namespace Rewired.Integration.UnityUI {
// Combine inputs of all Players // Combine inputs of all Players
for (int i = 0; i < playerIds.Length; i++) { for (int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if (player == null) continue; if (player == null) continue;
if (usePlayingPlayersOnly && !player.isPlaying) continue; if (usePlayingPlayersOnly && !player.isPlaying) continue;
@@ -873,7 +873,7 @@ namespace Rewired.Integration.UnityUI {
private bool SendMoveEventToSelectedObject() { private bool SendMoveEventToSelectedObject() {
if (recompiling) return false; // never allow movement while recompiling if (recompiling) return false; // never allow movement while recompiling
double time = ReInput.time.unscaledTime; // get the current time double time = Rewired.ReInput.time.unscaledTime; // get the current time
// Check for zero movement and clear // Check for zero movement and clear
Vector2 movement = GetRawMoveVector(); Vector2 movement = GetRawMoveVector();
@@ -948,7 +948,7 @@ namespace Rewired.Integration.UnityUI {
downVertical = false; downVertical = false;
for (int i = 0; i < playerIds.Length; i++) { for (int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if (player == null) continue; if (player == null) continue;
if (usePlayingPlayersOnly && !player.isPlaying) continue; if (usePlayingPlayersOnly && !player.isPlaying) continue;
@@ -959,7 +959,7 @@ namespace Rewired.Integration.UnityUI {
private void ProcessMouseEvents() { private void ProcessMouseEvents() {
for(int i = 0; i < playerIds.Length; i++) { for(int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if(player == null) continue; if(player == null) continue;
if(usePlayingPlayersOnly && !player.isPlaying) continue; if(usePlayingPlayersOnly && !player.isPlaying) continue;
int pointerCount = GetMouseInputSourceCount(playerIds[i]); int pointerCount = GetMouseInputSourceCount(playerIds[i]);
@@ -1041,7 +1041,7 @@ namespace Rewired.Integration.UnityUI {
// Debug.Log("Pressed: " + newPressed); // Debug.Log("Pressed: " + newPressed);
double time = ReInput.time.unscaledTime; double time = Rewired.ReInput.time.unscaledTime;
if (newPressed == pointerEvent.lastPress) { if (newPressed == pointerEvent.lastPress) {
var diffTime = time - pointerEvent.clickTime; var diffTime = time - pointerEvent.clickTime;
@@ -1133,11 +1133,11 @@ namespace Rewired.Integration.UnityUI {
#if UNITY_EDITOR && UNITY_5_PLUS #if UNITY_EDITOR && UNITY_5_PLUS
if(UnityEditor.EditorApplication.isRemoteConnected) return false; if(UnityEditor.EditorApplication.isRemoteConnected) return false;
#endif #endif
if(!ReInput.isReady) return true; if(!Rewired.ReInput.isReady) return true;
#else #else
if (!Rewired.ReInput.isReady) return false; if (!Rewired.ReInput.isReady) return false;
#endif #endif
return ReInput.configuration.ignoreInputWhenAppNotInFocus; return Rewired.ReInput.configuration.ignoreInputWhenAppNotInFocus;
} }
#if UNITY_EDITOR #if UNITY_EDITOR
@@ -1151,16 +1151,16 @@ namespace Rewired.Integration.UnityUI {
protected override void OnDestroy() { protected override void OnDestroy() {
base.OnDestroy(); base.OnDestroy();
ReInput.InitializedEvent -= OnRewiredInitialized; Rewired.ReInput.InitializedEvent -= OnRewiredInitialized;
ReInput.ShutDownEvent -= OnRewiredShutDown; Rewired.ReInput.ShutDownEvent -= OnRewiredShutDown;
ReInput.EditorRecompileEvent -= OnEditorRecompile; Rewired.ReInput.EditorRecompileEvent -= OnEditorRecompile;
} }
#region Rewired Methods #region Rewired Methods
protected override bool IsDefaultPlayer(int playerId) { protected override bool IsDefaultPlayer(int playerId) {
if(playerIds == null) return false; if(playerIds == null) return false;
if(!ReInput.isReady) return false; if(!Rewired.ReInput.isReady) return false;
for(int tries = 0; tries < 3; tries++) { for(int tries = 0; tries < 3; tries++) {
@@ -1169,7 +1169,7 @@ namespace Rewired.Integration.UnityUI {
// Try 2: Find the first Player // Try 2: Find the first Player
for(int i = 0; i < playerIds.Length; i++) { for(int i = 0; i < playerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(playerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerIds[i]);
if(player == null) continue; if(player == null) continue;
if(tries < 1 && usePlayingPlayersOnly && !player.isPlaying) continue; if(tries < 1 && usePlayingPlayersOnly && !player.isPlaying) continue;
if(tries < 2 && !player.controllers.hasMouse) continue; if(tries < 2 && !player.controllers.hasMouse) continue;
@@ -1181,19 +1181,19 @@ namespace Rewired.Integration.UnityUI {
} }
private void InitializeRewired() { private void InitializeRewired() {
if (!ReInput.isReady) { if (!Rewired.ReInput.isReady) {
Debug.LogError("Rewired is not initialized! Are you missing a Rewired Input Manager in your scene?"); Debug.LogError("Rewired is not initialized! Are you missing a Rewired Input Manager in your scene?");
return; return;
} }
ReInput.ShutDownEvent -= OnRewiredShutDown; Rewired.ReInput.ShutDownEvent -= OnRewiredShutDown;
ReInput.ShutDownEvent += OnRewiredShutDown; Rewired.ReInput.ShutDownEvent += OnRewiredShutDown;
ReInput.EditorRecompileEvent -= OnEditorRecompile; Rewired.ReInput.EditorRecompileEvent -= OnEditorRecompile;
ReInput.EditorRecompileEvent += OnEditorRecompile; Rewired.ReInput.EditorRecompileEvent += OnEditorRecompile;
SetupRewiredVars(); SetupRewiredVars();
} }
private void SetupRewiredVars() { private void SetupRewiredVars() {
if(!ReInput.isReady) return; if(!Rewired.ReInput.isReady) return;
// Set up Rewired vars // Set up Rewired vars
@@ -1202,22 +1202,22 @@ namespace Rewired.Integration.UnityUI {
// Set up Rewired Players // Set up Rewired Players
if (useAllRewiredGamePlayers) { if (useAllRewiredGamePlayers) {
IList<Player> rwPlayers = useRewiredSystemPlayer ? ReInput.players.AllPlayers : ReInput.players.Players; IList<Rewired.Player> rwPlayers = useRewiredSystemPlayer ? Rewired.ReInput.players.AllPlayers : Rewired.ReInput.players.Players;
playerIds = new int[rwPlayers.Count]; this.playerIds = new int[rwPlayers.Count];
for (int i = 0; i < rwPlayers.Count; i++) { for (int i = 0; i < rwPlayers.Count; i++) {
playerIds[i] = rwPlayers[i].id; this.playerIds[i] = rwPlayers[i].id;
} }
} else { } else {
bool foundSystem = false; bool foundSystem = false;
List<int> playerIds = new List<int>(rewiredPlayerIds.Length + 1); List<int> playerIds = new List<int>(rewiredPlayerIds.Length + 1);
for (int i = 0; i < rewiredPlayerIds.Length; i++) { for (int i = 0; i < rewiredPlayerIds.Length; i++) {
Player player = ReInput.players.GetPlayer(rewiredPlayerIds[i]); Rewired.Player player = Rewired.ReInput.players.GetPlayer(rewiredPlayerIds[i]);
if(player == null) continue; if(player == null) continue;
if(playerIds.Contains(player.id)) continue; // already in list if(playerIds.Contains(player.id)) continue; // already in list
playerIds.Add(player.id); playerIds.Add(player.id);
if(player.id == Consts.systemPlayerId) foundSystem = true; if(player.id == Consts.systemPlayerId) foundSystem = true;
} }
if(useRewiredSystemPlayer && !foundSystem) playerIds.Insert(0, ReInput.players.GetSystemPlayer().id); if(useRewiredSystemPlayer && !foundSystem) playerIds.Insert(0, Rewired.ReInput.players.GetSystemPlayer().id);
this.playerIds = playerIds.ToArray(); this.playerIds = playerIds.ToArray();
} }
@@ -1225,7 +1225,7 @@ namespace Rewired.Integration.UnityUI {
} }
private void SetUpRewiredPlayerMice() { private void SetUpRewiredPlayerMice() {
if(!ReInput.isReady) return; if(!Rewired.ReInput.isReady) return;
ClearMouseInputSources(); ClearMouseInputSources();
for(int i = 0; i < playerMice.Count; i++) { for(int i = 0; i < playerMice.Count; i++) {
var mouse = playerMice[i]; var mouse = playerMice[i];
@@ -1235,57 +1235,57 @@ namespace Rewired.Integration.UnityUI {
} }
private void SetUpRewiredActions() { private void SetUpRewiredActions() {
if(!ReInput.isReady) return; if(!Rewired.ReInput.isReady) return;
if(!setActionsById) { if(!setActionsById) {
horizontalActionId = ReInput.mapping.GetActionId(m_HorizontalAxis); horizontalActionId = Rewired.ReInput.mapping.GetActionId(m_HorizontalAxis);
verticalActionId = ReInput.mapping.GetActionId(m_VerticalAxis); verticalActionId = Rewired.ReInput.mapping.GetActionId(m_VerticalAxis);
submitActionId = ReInput.mapping.GetActionId(m_SubmitButton); submitActionId = Rewired.ReInput.mapping.GetActionId(m_SubmitButton);
cancelActionId = ReInput.mapping.GetActionId(m_CancelButton); cancelActionId = Rewired.ReInput.mapping.GetActionId(m_CancelButton);
} else { } else {
InputAction action; InputAction action;
action = ReInput.mapping.GetAction(horizontalActionId); action = Rewired.ReInput.mapping.GetAction(horizontalActionId);
m_HorizontalAxis = action != null ? action.name : string.Empty; m_HorizontalAxis = action != null ? action.name : string.Empty;
if(action == null) horizontalActionId = -1; if(action == null) horizontalActionId = -1;
action = ReInput.mapping.GetAction(verticalActionId); action = Rewired.ReInput.mapping.GetAction(verticalActionId);
m_VerticalAxis = action != null ? action.name : string.Empty; m_VerticalAxis = action != null ? action.name : string.Empty;
if(action == null) verticalActionId = -1; if(action == null) verticalActionId = -1;
action = ReInput.mapping.GetAction(submitActionId); action = Rewired.ReInput.mapping.GetAction(submitActionId);
m_SubmitButton = action != null ? action.name : string.Empty; m_SubmitButton = action != null ? action.name : string.Empty;
if(action == null) submitActionId = -1; if(action == null) submitActionId = -1;
action = ReInput.mapping.GetAction(cancelActionId); action = Rewired.ReInput.mapping.GetAction(cancelActionId);
m_CancelButton = action != null ? action.name : string.Empty; m_CancelButton = action != null ? action.name : string.Empty;
if(action == null) cancelActionId = -1; if(action == null) cancelActionId = -1;
} }
} }
private bool GetButton(Player player, int actionId) { private bool GetButton(Rewired.Player player, int actionId) {
if(actionId < 0) return false; // silence warnings if(actionId < 0) return false; // silence warnings
return player.GetButton(actionId); return player.GetButton(actionId);
} }
private bool GetButtonDown(Player player, int actionId) { private bool GetButtonDown(Rewired.Player player, int actionId) {
if(actionId < 0) return false; // silence warnings if(actionId < 0) return false; // silence warnings
return player.GetButtonDown(actionId); return player.GetButtonDown(actionId);
} }
private bool GetNegativeButton(Player player, int actionId) { private bool GetNegativeButton(Rewired.Player player, int actionId) {
if(actionId < 0) return false; // silence warnings if(actionId < 0) return false; // silence warnings
return player.GetNegativeButton(actionId); return player.GetNegativeButton(actionId);
} }
private bool GetNegativeButtonDown(Player player, int actionId) { private bool GetNegativeButtonDown(Rewired.Player player, int actionId) {
if(actionId < 0) return false; // silence warnings if(actionId < 0) return false; // silence warnings
return player.GetNegativeButtonDown(actionId); return player.GetNegativeButtonDown(actionId);
} }
private float GetAxis(Player player, int actionId) { private float GetAxis(Rewired.Player player, int actionId) {
if(actionId < 0) return 0f; // silence warnings if(actionId < 0) return 0f; // silence warnings
return player.GetAxis(actionId); return player.GetAxis(actionId);
} }
private void CheckEditorRecompile() { private void CheckEditorRecompile() {
if (!recompiling) return; if (!recompiling) return;
if (!ReInput.isReady) return; if (!Rewired.ReInput.isReady) return;
recompiling = false; recompiling = false;
InitializeRewired(); InitializeRewired();
} }
@@ -1303,7 +1303,7 @@ namespace Rewired.Integration.UnityUI {
private bool DidAnyMouseMove() { private bool DidAnyMouseMove() {
for(int i = 0; i < playerIds.Length; i++) { for(int i = 0; i < playerIds.Length; i++) {
int playerId = playerIds[i]; int playerId = playerIds[i];
Player player = ReInput.players.GetPlayer(playerId); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerId);
if(player == null) continue; if(player == null) continue;
if(usePlayingPlayersOnly && !player.isPlaying) continue; if(usePlayingPlayersOnly && !player.isPlaying) continue;
int mouseCount = GetMouseInputSourceCount(playerId); int mouseCount = GetMouseInputSourceCount(playerId);
@@ -1319,7 +1319,7 @@ namespace Rewired.Integration.UnityUI {
private bool GetMouseButtonDownOnAnyMouse(int buttonIndex) { private bool GetMouseButtonDownOnAnyMouse(int buttonIndex) {
for(int i = 0; i < playerIds.Length; i++) { for(int i = 0; i < playerIds.Length; i++) {
int playerId = playerIds[i]; int playerId = playerIds[i];
Player player = ReInput.players.GetPlayer(playerId); Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerId);
if(player == null) continue; if(player == null) continue;
if(usePlayingPlayersOnly && !player.isPlaying) continue; if(usePlayingPlayersOnly && !player.isPlaying) continue;
int mouseCount = GetMouseInputSourceCount(playerId); int mouseCount = GetMouseInputSourceCount(playerId);
@@ -1352,11 +1352,11 @@ namespace Rewired.Integration.UnityUI {
} }
private PlayerSetting(PlayerSetting other) { private PlayerSetting(PlayerSetting other) {
if(other == null) throw new ArgumentNullException("other"); if(other == null) throw new ArgumentNullException("other");
playerId = other.playerId; this.playerId = other.playerId;
playerMice = new List<Components.PlayerMouse>(); this.playerMice = new List<Components.PlayerMouse>();
if(other.playerMice != null) { if(other.playerMice != null) {
foreach(var m in other.playerMice) { foreach(var m in other.playerMice) {
playerMice.Add(m); this.playerMice.Add(m);
} }
} }
} }

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 85290bbccbd1f7a48a669745f10dacc9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -17,17 +17,13 @@ PluginImporter:
enabled: 0 enabled: 0
settings: settings:
Exclude Editor: 0 Exclude Editor: 0
Exclude GameCoreScarlett: 1
Exclude GameCoreXboxOne: 1
Exclude Linux: 1 Exclude Linux: 1
Exclude Linux64: 0 Exclude Linux64: 1
Exclude LinuxUniversal: 1 Exclude LinuxUniversal: 1
Exclude OSXUniversal: 0 Exclude OSXUniversal: 0
Exclude Stadia: 1
Exclude Switch: 1 Exclude Switch: 1
Exclude WebGL: 1 Exclude Win: 1
Exclude Win: 0 Exclude Win64: 1
Exclude Win64: 0
- first: - first:
Any: Any:
second: second:
@@ -62,7 +58,7 @@ PluginImporter:
- first: - first:
Standalone: Linux64 Standalone: Linux64
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: AnyCPU CPU: AnyCPU
- first: - first:
@@ -74,15 +70,15 @@ PluginImporter:
- first: - first:
Standalone: Win Standalone: Win
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: None CPU: AnyCPU
- first: - first:
Standalone: Win64 Standalone: Win64
second: second:
enabled: 1 enabled: 0
settings: settings:
CPU: None CPU: AnyCPU
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@@ -0,0 +1,87 @@
fileFormatVersion: 2
guid: 9d803796a71178b4491d456268165689
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude GameCoreScarlett: 1
Exclude GameCoreXboxOne: 1
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude PS4: 1
Exclude PS5: 1
Exclude Switch: 1
Exclude Win: 0
Exclude Win64: 0
Exclude WindowsStoreApps: 1
- first:
Android: Android
second:
enabled: 0
settings:
AndroidSharedLibraryType: Executable
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: ARM64
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: false
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -0,0 +1,112 @@
fileFormatVersion: 2
guid: 4763196cde3e295499e2b0c784ca599a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude GameCoreScarlett: 1
Exclude GameCoreXboxOne: 1
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude PS4: 1
Exclude PS5: 1
Exclude Switch: 1
Exclude Win: 0
Exclude Win64: 0
Exclude WindowsStoreApps: 1
- first:
Android: Android
second:
enabled: 0
settings:
AndroidSharedLibraryType: Executable
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
GameCoreScarlett: GameCoreScarlett
second:
enabled: 0
settings: {}
- first:
GameCoreXboxOne: GameCoreXboxOne
second:
enabled: 0
settings: {}
- first:
Nintendo Switch: Switch
second:
enabled: 0
settings: {}
- first:
PS4: PS4
second:
enabled: 0
settings: {}
- first:
PS5: PS5
second:
enabled: 0
settings: {}
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: ARM64
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: false
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -18,10 +18,14 @@ PluginImporter:
settings: settings:
Exclude Android: 1 Exclude Android: 1
Exclude Editor: 0 Exclude Editor: 0
Exclude GameCoreScarlett: 1
Exclude GameCoreXboxOne: 1
Exclude Linux: 1 Exclude Linux: 1
Exclude Linux64: 1 Exclude Linux64: 1
Exclude LinuxUniversal: 1 Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1 Exclude OSXUniversal: 1
Exclude PS4: 1
Exclude PS5: 1
Exclude Stadia: 1 Exclude Stadia: 1
Exclude Switch: 1 Exclude Switch: 1
Exclude WebGL: 1 Exclude WebGL: 1
@@ -54,6 +58,7 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
AndroidSharedLibraryType: Executable
CPU: ARMv7 CPU: ARMv7
- first: - first:
Any: Any:
@@ -115,7 +120,7 @@ PluginImporter:
second: second:
enabled: 1 enabled: 1
settings: settings:
CPU: AnyCPU CPU: x86_64
- first: - first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:

View File

@@ -36,10 +36,8 @@ GraphicsSettings:
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: [] m_PreloadedShaders: []
m_PreloadShadersBatchTimeLimit: -1 m_PreloadShadersBatchTimeLimit: -1
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
type: 0} m_CustomRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd, type: 2}
m_CustomRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd,
type: 2}
m_TransparencySortMode: 0 m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1 m_DefaultRenderingPath: 1
@@ -60,8 +58,7 @@ GraphicsSettings:
m_FogKeepExp2: 1 m_FogKeepExp2: 1
m_AlbedoSwatchInfos: [] m_AlbedoSwatchInfos: []
m_RenderPipelineGlobalSettingsMap: m_RenderPipelineGlobalSettingsMap:
UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, type: 2}
type: 2}
m_LightsUseLinearIntensity: 1 m_LightsUseLinearIntensity: 1
m_LightsUseColorTemperature: 1 m_LightsUseColorTemperature: 1
m_LogWhenShaderIsCompiled: 0 m_LogWhenShaderIsCompiled: 0

View File

@@ -141,7 +141,8 @@ PlayerSettings:
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 0.1.0 bundleVersion: 0.1.0
preloadedAssets: [] preloadedAssets:
- {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1

View File

@@ -78,7 +78,7 @@ QualitySettings:
antiAliasing: 0 antiAliasing: 0
softParticles: 0 softParticles: 0
softVegetation: 1 softVegetation: 1
realtimeReflectionProbes: 0 realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1 billboardsFaceCameraPosition: 1
useLegacyDetailDistribution: 1 useLegacyDetailDistribution: 1
adaptiveVsync: 0 adaptiveVsync: 0
@@ -87,7 +87,7 @@ QualitySettings:
adaptiveVsyncExtraA: 0 adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0 adaptiveVsyncExtraB: 0
lodBias: 2 lodBias: 2
maximumLODLevel: 0 maximumLODLevel: 1
enableLODCrossFade: 1 enableLODCrossFade: 1
streamingMipmapsActive: 0 streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1 streamingMipmapsAddAllCameras: 1

View File

@@ -3,7 +3,12 @@
--- !u!5 &1 --- !u!5 &1
TimeManager: TimeManager:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
Fixed Timestep: 0.02 serializedVersion: 2
Fixed Timestep:
m_Count: 705599
m_Rate:
m_Denominator: 1
m_Numerator: 141120000
Maximum Allowed Timestep: 0.33333334 Maximum Allowed Timestep: 0.33333334
m_TimeScale: 1 m_TimeScale: 1
Maximum Particle Timestep: 0.03 Maximum Particle Timestep: 0.03