增加一个左上角状态栏UI,用于显示当前已连接的输入设备,修复独占性设备(手柄)被错误的binding到多个模拟器虚拟输入设备的问题

This commit is contained in:
Alienjack 2025-06-21 15:39:52 +08:00
parent d1c150e1be
commit de7340ee39
39 changed files with 4172 additions and 113 deletions

File diff suppressed because it is too large Load Diff

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 7becc278ccc2a664d9482f042623c95f
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 8e43e435573541c41940d99f99f03582
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 3025a046e62dd884b92dde0a71bf62b0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 8b18487f95d9f874cb71f073bf85c0ad
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: d8d5accbc2f9ca84cae3db84ab86ca96
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: c018ffaba8708f64684883876932c38d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 6157ffb6d56b8a14bbc93ee13d42319e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 8cd798b4dcab9ba4880e3189f88679c5
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: ab8d52ee69dbdc54c9a75891603dbc38
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -677,6 +677,14 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6030618878828304669, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6030618878828304669, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6100013163502236362, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3} - target: {fileID: 6100013163502236362, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0

View File

@ -648,6 +648,84 @@ MonoBehaviour:
m_FlexibleWidth: -1 m_FlexibleWidth: -1
m_FlexibleHeight: -1 m_FlexibleHeight: -1
m_LayoutPriority: 1 m_LayoutPriority: 1
--- !u!1 &5328855647670170521
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4076923977615567036}
- component: {fileID: 37888837119744512}
- component: {fileID: 5535502572802983660}
m_Layer: 5
m_Name: "\u2196"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4076923977615567036
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5328855647670170521}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2180787260962546873}
m_Father: {fileID: 5353336693430589123}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &37888837119744512
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5328855647670170521}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 8
m_Right: 2
m_Top: 8
m_Bottom: 0
m_ChildAlignment: 2
m_Spacing: 10
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 1
m_ChildScaleHeight: 1
m_ReverseArrangement: 0
--- !u!114 &5535502572802983660
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5328855647670170521}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 2
--- !u!1 &5568161260996910275 --- !u!1 &5568161260996910275
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -678,6 +756,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 5681144522345305637} - {fileID: 5681144522345305637}
- {fileID: 4076923977615567036}
- {fileID: 6362836288749559125} - {fileID: 6362836288749559125}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -899,6 +978,77 @@ MonoBehaviour:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.3137255} m_EffectColor: {r: 0, g: 0, b: 0, a: 0.3137255}
m_EffectDistance: {x: 3, y: -3} m_EffectDistance: {x: 3, y: -3}
m_UseGraphicAlpha: 1 m_UseGraphicAlpha: 1
--- !u!1 &5841225593175283174
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3401503803137628060}
- component: {fileID: 209050608986704394}
- component: {fileID: 7323849352792172416}
m_Layer: 5
m_Name: TEMPLATE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3401503803137628060
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5841225593175283174}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5173410857689853898}
m_Father: {fileID: 2180787260962546873}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &209050608986704394
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5841225593175283174}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 60
m_PreferredHeight: 60
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &7323849352792172416
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5841225593175283174}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1135cda2fa7d714f9d4b8a2a3130b4d, type: 3}
m_Name:
m_EditorClassIdentifier:
UI_Icon: {fileID: 2750845858210034251}
--- !u!1 &6140890295709974557 --- !u!1 &6140890295709974557
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -974,6 +1124,81 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &6564643175566609500
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5173410857689853898}
- component: {fileID: 7508341607458121823}
- component: {fileID: 2750845858210034251}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5173410857689853898
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6564643175566609500}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3401503803137628060}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.000061035156, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7508341607458121823
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6564643175566609500}
m_CullTransparentMesh: 1
--- !u!114 &2750845858210034251
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6564643175566609500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8b18487f95d9f874cb71f073bf85c0ad, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6819636247886330503 --- !u!1 &6819636247886330503
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1056,6 +1281,83 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_HorizontalFit: 2 m_HorizontalFit: 2
m_VerticalFit: 2 m_VerticalFit: 2
--- !u!1 &7293448547499054900
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2180787260962546873}
- component: {fileID: 8293546264338150520}
- component: {fileID: 193311971021743745}
m_Layer: 5
m_Name: DevicesBar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2180787260962546873
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7293448547499054900}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3401503803137628060}
m_Father: {fileID: 4076923977615567036}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &8293546264338150520
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7293448547499054900}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8b33a9300654744488a5dd3d4810dc2, type: 3}
m_Name:
m_EditorClassIdentifier:
ITEM_TEMPLATE: {fileID: 7323849352792172416}
--- !u!114 &193311971021743745
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7293448547499054900}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &7520417476292222346 --- !u!1 &7520417476292222346
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b767f1eb97209254095985d8f6ba13fd

View File

@ -48,11 +48,10 @@ public abstract class EmuCoreBinder<T> : InternalEmuCoreBinder,
/// <summary> 获取指定设备的注册Binder对象 </summary> /// <summary> 获取指定设备的注册Binder对象 </summary>
/// <param name="device"></param> /// <param name="device"></param>
/// <returns>返回首个匹配对象</returns> /// <returns>返回首个匹配对象</returns>
public ControllerBinder GetRegistedBinder(InputDevice_D device) ControllerBinder GetRegistedBinder(InputDevice_D device)
{ {
foreach (var binding in m_controllerBinders) foreach (var binding in m_controllerBinders)
{ {
if (device.Exclusive && GetRegistedBinder(device) != null) continue;
if (binding.IsRegisted(device)) return binding; if (binding.IsRegisted(device)) return binding;
} }
@ -63,6 +62,7 @@ public abstract class EmuCoreBinder<T> : InternalEmuCoreBinder,
{ {
foreach (var binding in m_controllerBinders) foreach (var binding in m_controllerBinders)
{ {
if (connectDevice.Exclusive && GetRegistedBinder(connectDevice) != null) continue;
binding.RegistInputDevice(connectDevice); binding.RegistInputDevice(connectDevice);
} }
} }

View File

@ -1,8 +1,13 @@
namespace AxibugEmuOnline.Client.InputDevices using AxibugProtobuf;
namespace AxibugEmuOnline.Client.InputDevices
{ {
/// <summary> PS3,PS4控制器 </summary> /// <summary> PS3,PS4控制器 </summary>
public class DualShockController_D : InputDevice_D public class DualShockController_D : InputDevice_D
{ {
GamePadType m_gamePadType;
public override GamePadType PadType => m_gamePadType;
public Button_C Circle; public Button_C Circle;
public Button_C Triangle; public Button_C Triangle;
public Button_C Cross; public Button_C Cross;
@ -23,6 +28,12 @@
public Stick_C LeftStick; public Stick_C LeftStick;
public Stick_C RightStick; public Stick_C RightStick;
public DualShockController_D(InputResolver resolver) : base(resolver) { } public DualShockController_D(InputResolver resolver, bool ps3 = false, bool ps4 = false, bool ps5 = false) : base(resolver)
{
if (ps3) m_gamePadType = GamePadType.Ds3Control;
else if (ps4) m_gamePadType = GamePadType.Ds4Control;
else if (ps5) m_gamePadType = GamePadType.Ds5Control;
else m_gamePadType = GamePadType.GlobalGamePad;
}
} }
} }

View File

@ -1,10 +1,14 @@
namespace AxibugEmuOnline.Client.InputDevices using AxibugProtobuf;
namespace AxibugEmuOnline.Client.InputDevices
{ {
/// <summary> /// <summary>
/// 通用游戏控制器 /// 通用游戏控制器
/// </summary> /// </summary>
public class GamePad_D : InputDevice_D public class GamePad_D : InputDevice_D
{ {
public override GamePadType PadType => GamePadType.GlobalGamePad;
public Button_C Up; public Button_C Up;
public Button_C Down; public Button_C Down;
public Button_C Left; public Button_C Left;

View File

@ -1,4 +1,5 @@
using System; using AxibugProtobuf;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
@ -9,7 +10,8 @@ namespace AxibugEmuOnline.Client.InputDevices
/// <summary> 指示该设备是否只能由一个Binder独占 </summary> /// <summary> 指示该设备是否只能由一个Binder独占 </summary>
public virtual bool Exclusive => true; public virtual bool Exclusive => true;
public string UniqueName => m_resolver.GetDeviceName(this); public string UniqueName => m_resolver.GetDeviceName(this);
/// <summary> 指示该设备类型,这个类型将与服务器类型对齐 </summary>
public abstract GamePadType PadType { get; }
/// <summary> 指示该设备是否在线 </summary> /// <summary> 指示该设备是否在线 </summary>
public bool Online => m_resolver.CheckOnline(this); public bool Online => m_resolver.CheckOnline(this);
/// <summary> 指示该设备当前帧是否有任意控件被激发 </summary> /// <summary> 指示该设备当前帧是否有任意控件被激发 </summary>

View File

@ -1,4 +1,5 @@
using System.Collections.Generic; using AxibugProtobuf;
using System.Collections.Generic;
namespace AxibugEmuOnline.Client.InputDevices namespace AxibugEmuOnline.Client.InputDevices
{ {
@ -7,6 +8,8 @@ namespace AxibugEmuOnline.Client.InputDevices
/// </summary> /// </summary>
public class Keyboard_D : InputDevice_D public class Keyboard_D : InputDevice_D
{ {
public override GamePadType PadType => GamePadType.Keyboard;
public Button_C A; public Button_C A;
public Button_C B; public Button_C B;
public Button_C C; public Button_C C;

View File

@ -1,7 +1,11 @@
namespace AxibugEmuOnline.Client.InputDevices using AxibugProtobuf;
namespace AxibugEmuOnline.Client.InputDevices
{ {
public class PSVController_D : InputDevice_D public class PSVController_D : InputDevice_D
{ {
public override GamePadType PadType => GamePadType.PsvitaControl;
public Button_C Cross; public Button_C Cross;
public Button_C Circle; public Button_C Circle;
public Button_C Square; public Button_C Square;

View File

@ -1,4 +1,5 @@
using AxiInputSP; using AxibugProtobuf;
using AxiInputSP;
using AxiInputSP.UGUI; using AxiInputSP.UGUI;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -7,6 +8,8 @@ namespace AxibugEmuOnline.Client.InputDevices
{ {
public class ScreenGamepad_D : InputDevice_D public class ScreenGamepad_D : InputDevice_D
{ {
public override GamePadType PadType => GamePadType.TouchPanel;
public Button_C UP; public Button_C UP;
public Button_C DOWN; public Button_C DOWN;
public Button_C LEFT; public Button_C LEFT;

View File

@ -1,7 +1,11 @@
namespace AxibugEmuOnline.Client.InputDevices using AxibugProtobuf;
namespace AxibugEmuOnline.Client.InputDevices
{ {
public class XboxController_D : InputDevice_D public class XboxController_D : InputDevice_D
{ {
public override GamePadType PadType => GamePadType.Xboxonecontrol;
public Button_C X; public Button_C X;
public Button_C Y; public Button_C Y;
public Button_C A; public Button_C A;

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Android;
using UnityEngine.InputSystem.DualShock; using UnityEngine.InputSystem.DualShock;
using UnityEngine.InputSystem.XInput; using UnityEngine.InputSystem.XInput;
@ -23,8 +24,18 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
{ {
InputDevice_D newDevice = null; InputDevice_D newDevice = null;
if (ipdev is Keyboard) newDevice = new Keyboard_D(this); if (ipdev is Keyboard) newDevice = new Keyboard_D(this);
else if (ipdev is DualShockGamepad) newDevice = new DualShockController_D(this); else if (ipdev is DualShockGamepad)
else if (ipdev is XInputController) newDevice = new XboxController_D(this); {
if (ipdev is DualShock3GamepadHID) newDevice = new DualShockController_D(this, ps3: true);
else if (ipdev is DualShock4GamepadHID) newDevice = new DualShockController_D(this, ps4: true);
else if (ipdev is DualSenseGamepadHID) newDevice = new DualShockController_D(this, ps5: true);
else newDevice = new DualShockController_D(this);
}
else if (ipdev is XInputController)
{
newDevice = new XboxController_D(this);
}
else if (ipdev is Gamepad) newDevice = new GamePad_D(this); //注意Gamepad的优先级,因为任何手柄,Inputsystem中的基类都是GamePad else if (ipdev is Gamepad) newDevice = new GamePad_D(this); //注意Gamepad的优先级,因为任何手柄,Inputsystem中的基类都是GamePad
if (newDevice != null) if (newDevice != null)
@ -39,9 +50,9 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
{ {
if (m_devices.TryGetValue(ipdev, out var device)) if (m_devices.TryGetValue(ipdev, out var device))
{ {
m_devices.Remove(ipdev);
RemoveDeviceMapper(device); RemoveDeviceMapper(device);
RaiseDeviceLost(device); RaiseDeviceLost(device);
m_devices.Remove(ipdev);
} }
} }
@ -56,7 +67,7 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
var ipdev = GetInputSystemDevice<InputDevice>(inputDevice); var ipdev = GetInputSystemDevice<InputDevice>(inputDevice);
Debug.Assert(ipdev != null, "不能对已离线的设备获取名称"); Debug.Assert(ipdev != null, "不能对已离线的设备获取名称");
return $"{ipdev.description.deviceClass}_{ipdev.description.interfaceName}_{ipdev.deviceId}"; return $"{ipdev.description}_{ipdev.deviceId}";
} }
protected override bool OnCheckOnline(InputDevice_D device) protected override bool OnCheckOnline(InputDevice_D device)

View File

@ -0,0 +1,64 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.InputDevices;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace AxibugEmuOnline.Client.UI
{
/// <summary>
/// xmbÐÅÏ¢Ìõ,É豸ÐÅÏ¢ÌõUI
/// </summary>
public class DevicesBar : MonoBehaviour
{
[SerializeField]
DevicesInfoItem ITEM_TEMPLATE;
List<DevicesInfoItem> m_runtimeItemUI = new List<DevicesInfoItem>();
private void Awake()
{
ITEM_TEMPLATE.gameObject.SetActiveEx(false);
}
void OnEnable()
{
App.input.OnDeviceConnected += Input_OnDeviceConnected;
App.input.OnDeviceLost += Input_OnDeviceLost;
foreach (var device in App.input.GetDevices())
{
AddDeviceItemUI(device);
}
}
private void OnDisable()
{
App.input.OnDeviceConnected -= Input_OnDeviceConnected;
App.input.OnDeviceLost -= Input_OnDeviceLost;
foreach (var itemUI in m_runtimeItemUI)
{
Destroy(itemUI.gameObject);
}
m_runtimeItemUI.Clear();
}
private void AddDeviceItemUI(InputDevice_D device)
{
var newItemUI = GameObject.Instantiate(ITEM_TEMPLATE.gameObject, ITEM_TEMPLATE.transform.parent).GetComponent<DevicesInfoItem>();
newItemUI.gameObject.SetActiveEx(true);
newItemUI.SetData(device);
m_runtimeItemUI.Add(newItemUI);
}
void Input_OnDeviceConnected(InputDevice_D connectDevice)
{
AddDeviceItemUI(connectDevice);
}
private void Input_OnDeviceLost(InputDevice_D lostDevice)
{
var targetUI = m_runtimeItemUI.FirstOrDefault(itemUI => itemUI.Datacontext == lostDevice);
Destroy(targetUI.gameObject);
m_runtimeItemUI.Remove(targetUI);
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e8b33a9300654744488a5dd3d4810dc2

View File

@ -0,0 +1,25 @@
using AxibugEmuOnline.Client.InputDevices;
using UnityEngine;
using UnityEngine.UI;
namespace AxibugEmuOnline.Client.UI
{
/// <summary>
/// 设备信息条 ItemUI
/// </summary>
public class DevicesInfoItem : MonoBehaviour
{
[SerializeField]
Image UI_Icon;
public InputDevice_D Datacontext { get; private set; }
internal void SetData(InputDevice_D device)
{
Datacontext = device;
string resourcePath = $"Icons/DevicesIcons/{device.PadType}";
UI_Icon.sprite = Resources.Load<Sprite>(resourcePath);
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b1135cda2fa7d714f9d4b8a2a3130b4d

View File

@ -9,9 +9,8 @@
"com.unity.ext.nunit": { "com.unity.ext.nunit": {
"version": "2.0.5", "version": "2.0.5",
"depth": 1, "depth": 1,
"source": "registry", "source": "builtin",
"dependencies": {}, "dependencies": {}
"url": "https://packages.unity.cn"
}, },
"com.unity.ide.visualstudio": { "com.unity.ide.visualstudio": {
"version": "2.0.22", "version": "2.0.22",
@ -20,7 +19,7 @@
"dependencies": { "dependencies": {
"com.unity.test-framework": "1.1.9" "com.unity.test-framework": "1.1.9"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.inputsystem": { "com.unity.inputsystem": {
"version": "1.11.2", "version": "1.11.2",
@ -29,14 +28,14 @@
"dependencies": { "dependencies": {
"com.unity.modules.uielements": "1.0.0" "com.unity.modules.uielements": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.sysroot": { "com.unity.sysroot": {
"version": "2.0.10", "version": "2.0.10",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.sysroot.linux-x86_64": { "com.unity.sysroot.linux-x86_64": {
"version": "2.0.9", "version": "2.0.9",
@ -45,18 +44,17 @@
"dependencies": { "dependencies": {
"com.unity.sysroot": "2.0.10" "com.unity.sysroot": "2.0.10"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.test-framework": { "com.unity.test-framework": {
"version": "1.4.5", "version": "1.5.1",
"depth": 0, "depth": 0,
"source": "registry", "source": "builtin",
"dependencies": { "dependencies": {
"com.unity.ext.nunit": "2.0.3", "com.unity.ext.nunit": "2.0.3",
"com.unity.modules.imgui": "1.0.0", "com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0" "com.unity.modules.jsonserialize": "1.0.0"
}, }
"url": "https://packages.unity.cn"
}, },
"com.unity.toolchain.win-x86_64-linux-x86_64": { "com.unity.toolchain.win-x86_64-linux-x86_64": {
"version": "2.0.10", "version": "2.0.10",
@ -66,7 +64,7 @@
"com.unity.sysroot": "2.0.10", "com.unity.sysroot": "2.0.10",
"com.unity.sysroot.linux-x86_64": "2.0.9" "com.unity.sysroot.linux-x86_64": "2.0.9"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.com"
}, },
"com.unity.ugui": { "com.unity.ugui": {
"version": "2.0.0", "version": "2.0.0",

View File

@ -389,6 +389,9 @@ PlayerSettings:
- m_BuildTarget: AndroidPlayer - m_BuildTarget: AndroidPlayer
m_APIs: 0b000000 m_APIs: 0b000000
m_Automatic: 0 m_Automatic: 0
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0200000012000000
m_Automatic: 0
m_BuildTargetVRSettings: [] m_BuildTargetVRSettings: []
m_DefaultShaderChunkSizeInMB: 16 m_DefaultShaderChunkSizeInMB: 16
m_DefaultShaderChunkCount: 0 m_DefaultShaderChunkCount: 0
@ -401,6 +404,7 @@ PlayerSettings:
iPhone: 1 iPhone: 1
tvOS: 1 tvOS: 1
m_BuildTargetGroupLightmapEncodingQuality: [] m_BuildTargetGroupLightmapEncodingQuality: []
m_BuildTargetGroupHDRCubemapEncodingQuality: []
m_BuildTargetGroupLightmapSettings: [] m_BuildTargetGroupLightmapSettings: []
m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetGroupLoadStoreDebugModeSettings: []
m_BuildTargetNormalMapEncoding: [] m_BuildTargetNormalMapEncoding: []
@ -664,12 +668,12 @@ PlayerSettings:
webGLMemoryLinearGrowthStep: 16 webGLMemoryLinearGrowthStep: 16
webGLMemoryGeometricGrowthStep: 0.2 webGLMemoryGeometricGrowthStep: 0.2
webGLMemoryGeometricGrowthCap: 96 webGLMemoryGeometricGrowthCap: 96
webGLEnableWebGPU: 0
webGLPowerPreference: 2 webGLPowerPreference: 2
webGLWebAssemblyTable: 0 webGLWebAssemblyTable: 0
webGLWebAssemblyBigInt: 0 webGLWebAssemblyBigInt: 0
webGLCloseOnQuit: 0 webGLCloseOnQuit: 0
webWasm2023: 0 webWasm2023: 0
webEnableSubmoduleStrippingCompatibility: 0
scriptingDefineSymbols: scriptingDefineSymbols:
Android: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY;UNITY_POST_PROCESSING_STACK_V2 Android: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY;UNITY_POST_PROCESSING_STACK_V2
EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2
@ -816,3 +820,4 @@ PlayerSettings:
insecureHttpOption: 2 insecureHttpOption: 2
androidVulkanDenyFilterList: [] androidVulkanDenyFilterList: []
androidVulkanAllowFilterList: [] androidVulkanAllowFilterList: []
androidVulkanDeviceFilterListAsset: {fileID: 0}