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

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