1
0
mirror of synced 2024-11-23 22:30:56 +01:00

update new config system

This commit is contained in:
xpeng 2022-11-05 01:32:17 +01:00
parent be88d76799
commit d3840cb36e
40 changed files with 10198 additions and 628 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: a6560a915ef98420e9faacc1c7438823
NativeFormatImporter:
guid: dd46221f8de0268428f1a148427fec0d
PrefabImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,610 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &659669992804368571
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9164038402622875688}
- component: {fileID: 8448562723110540812}
- component: {fileID: 6018230961502990812}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9164038402622875688
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659669992804368571}
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: 7814508486837759516}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8448562723110540812
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659669992804368571}
m_CullTransparentMesh: 1
--- !u!114 &6018230961502990812
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659669992804368571}
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: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &891580135007950144
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4379138013412375809}
- component: {fileID: 2179692002657241977}
- component: {fileID: 8604649185009308040}
m_Layer: 5
m_Name: ConfigSlider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4379138013412375809
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 891580135007950144}
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: 1363411995734526485}
- {fileID: 4740189457704012167}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2179692002657241977
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 891580135007950144}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 970da0aecbe521547a08f1b032980950, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8604649185009308040
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 891580135007950144}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0913f02b8bfb1041afdf0ef24c51c54, type: 3}
m_Name:
m_EditorClassIdentifier:
Notes: This script will automatically set the text and config key name to object
name. Pls rename prefab/gameobject name.
--- !u!1 &4246038389502470451
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7814508486837759516}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7814508486837759516
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4246038389502470451}
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: 9164038402622875688}
m_Father: {fileID: 4740189457704012167}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &4561609128562839145
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1363411995734526485}
- component: {fileID: 5149884829390063607}
- component: {fileID: 6714706628717741128}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1363411995734526485
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4561609128562839145}
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: 4379138013412375809}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -15, y: 0}
m_SizeDelta: {x: 250, y: 30}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &5149884829390063607
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4561609128562839145}
m_CullTransparentMesh: 1
--- !u!114 &6714706628717741128
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4561609128562839145}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: ConfigSlider
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: d4c2f646d95b8274aa0db87aafdbc403, type: 2}
m_sharedMaterial: {fileID: -496328944936906682, guid: d4c2f646d95b8274aa0db87aafdbc403,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 4
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5248623083823133808
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4740189457704012167}
- component: {fileID: 288245633637051364}
- component: {fileID: 7888897870522036489}
m_Layer: 5
m_Name: Slider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4740189457704012167
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5248623083823133808}
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: 5524304563666903134}
- {fileID: 7814508486837759516}
- {fileID: 4544298917695847334}
m_Father: {fileID: 4379138013412375809}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 15, y: 0}
m_SizeDelta: {x: 300, y: 20}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &288245633637051364
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5248623083823133808}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5404588422838776637}
m_FillRect: {fileID: 9164038402622875688}
m_HandleRect: {fileID: 3648176191617605587}
m_Direction: 0
m_MinValue: -8
m_MaxValue: 8
m_WholeNumbers: 0
m_Value: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!225 &7888897870522036489
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5248623083823133808}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 1
--- !u!1 &7173117462366850584
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4544298917695847334}
m_Layer: 5
m_Name: Handle Slide Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4544298917695847334
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7173117462366850584}
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: 3648176191617605587}
m_Father: {fileID: 4740189457704012167}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &7901089309352835526
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5524304563666903134}
- component: {fileID: 1396150690910426763}
- component: {fileID: 2213744314643784352}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5524304563666903134
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7901089309352835526}
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: 4740189457704012167}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1396150690910426763
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7901089309352835526}
m_CullTransparentMesh: 1
--- !u!114 &2213744314643784352
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7901089309352835526}
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: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8448396296409418970
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3648176191617605587}
- component: {fileID: 6558513155871506449}
- component: {fileID: 5404588422838776637}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3648176191617605587
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8448396296409418970}
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: 4544298917695847334}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6558513155871506449
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8448396296409418970}
m_CullTransparentMesh: 1
--- !u!114 &5404588422838776637
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8448396296409418970}
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: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
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

View File

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

View File

@ -0,0 +1,456 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &652253943176883115
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3176634365634174013}
- component: {fileID: 7182732246791599489}
- component: {fileID: 3977922937026757818}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3176634365634174013
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 652253943176883115}
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: 5440830733378705599}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -15, y: 0}
m_SizeDelta: {x: 250, y: 30}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &7182732246791599489
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 652253943176883115}
m_CullTransparentMesh: 1
--- !u!114 &3977922937026757818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 652253943176883115}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: ConfigToggle
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: d4c2f646d95b8274aa0db87aafdbc403, type: 2}
m_sharedMaterial: {fileID: -496328944936906682, guid: d4c2f646d95b8274aa0db87aafdbc403,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 4
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3374722208396652140
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6000614096234414561}
- component: {fileID: 6723403437521629126}
- component: {fileID: 508526573143515440}
m_Layer: 5
m_Name: Checkmark
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6000614096234414561
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3374722208396652140}
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: 1822302700036566079}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6723403437521629126
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3374722208396652140}
m_CullTransparentMesh: 1
--- !u!114 &508526573143515440
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3374722208396652140}
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: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0}
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 &4651204985420041901
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5440830733378705599}
- component: {fileID: 2988653770819437978}
- component: {fileID: 8379768786361774294}
m_Layer: 5
m_Name: ConfigToggle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5440830733378705599
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4651204985420041901}
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: 3176634365634174013}
- {fileID: 7514495594010619466}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2988653770819437978
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4651204985420041901}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 970da0aecbe521547a08f1b032980950, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8379768786361774294
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4651204985420041901}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a0913f02b8bfb1041afdf0ef24c51c54, type: 3}
m_Name:
m_EditorClassIdentifier:
Notes: This script will automatically set the text and config key name to object
name. Pls rename prefab/gameobject name.
--- !u!1 &5143295140159713149
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7514495594010619466}
- component: {fileID: 2423535075009293953}
- component: {fileID: 4650482328337415340}
m_Layer: 5
m_Name: Toggle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7514495594010619466
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5143295140159713149}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 1822302700036566079}
m_Father: {fileID: 5440830733378705599}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 15, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &2423535075009293953
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5143295140159713149}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6722789646713123282}
toggleTransition: 1
graphic: {fileID: 508526573143515440}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls: []
m_IsOn: 0
--- !u!225 &4650482328337415340
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5143295140159713149}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 1
--- !u!1 &9104199693510226126
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1822302700036566079}
- component: {fileID: 3342515679499302543}
- component: {fileID: 6722789646713123282}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1822302700036566079
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9104199693510226126}
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: 6000614096234414561}
m_Father: {fileID: 7514495594010619466}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -10}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3342515679499302543
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9104199693510226126}
m_CullTransparentMesh: 1
--- !u!114 &6722789646713123282
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9104199693510226126}
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: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using WindowsInput.Native;
using System;
using TMPro;
using WindowsInput.Native;
public class ButtonSettingManager : MonoBehaviour
{
@ -11,27 +10,12 @@ public class ButtonSettingManager : MonoBehaviour
void Start()
{
panelButton = GetComponent<PanelButton>();
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
void ApplyConfig()
{
switch (buttonType)
{
case ButtonType.Test:
panelButton.key = ConfigManager.config.TestKey;
break;
case ButtonType.Service:
panelButton.key = ConfigManager.config.ServiceKey;
break;
case ButtonType.Coin:
panelButton.key = ConfigManager.config.CoinKey;
break;
case ButtonType.Custom:
panelButton.key = ConfigManager.config.CustomKey;
break;
}
var widget = ConfigManager.GetConfigPanelWidget(Enum.GetName(typeof(ButtonType), buttonType));
var dropdown = widget.GetComponent<TMP_Dropdown>();
dropdown.onValueChanged.AddListener((int value) => {
panelButton.key = (VirtualKeyCode)Enum.GetValues(typeof(VirtualKeyCode)).GetValue(value);
});
dropdown.onValueChanged?.Invoke(dropdown.value);
}
public enum ButtonType

View File

@ -10,23 +10,44 @@ public class CaptureSettingManager : MonoBehaviour
private void Start()
{
windowTexture = GetComponent<UwcWindowTexture>();
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
private void ApplyConfig()
{
windowTexture.captureMode = (CaptureMode)ConfigManager.config.CaptureMode - 1;
var modeWidget = ConfigManager.GetConfigPanelWidget("CaptureMode");
var fpsWidget = ConfigManager.GetConfigPanelWidget("CaptureFPS");
var desktopWidget = ConfigManager.GetConfigPanelWidget("CaptureDesktop");
var desktopIndexWidget = ConfigManager.GetConfigPanelWidget("DesktopIndex");
var fps = Enum.GetName(typeof(Config.captureFPS), ConfigManager.config.CaptureFPS);
windowTexture.captureFrameRate = int.Parse(fps.Remove(0, 3));
var modeDropdown = modeWidget.GetComponent<TMP_Dropdown>();
var fpsDropdown = fpsWidget.GetComponent<TMP_Dropdown>();
var desktopToggle = desktopWidget.GetComponent<Toggle>();
var desktopIndexDropdown = desktopIndexWidget.GetComponent<TMP_Dropdown>();
if (ConfigManager.config.CaptureDesktop)
{
windowTexture.type = WindowTextureType.Desktop;
windowTexture.desktopIndex = ConfigManager.config.CaptureDesktopNumber;
}
else
windowTexture.type = WindowTextureType.Window;
modeDropdown.onValueChanged.AddListener((int value) => {
windowTexture.captureMode = (CaptureMode)Enum.GetValues(typeof(CaptureMode)).GetValue(value) - 1;
});
fpsDropdown.onValueChanged.AddListener((int value) => {
var fps = Enum.GetName(typeof(CEnum.FPS), value);
windowTexture.captureFrameRate = int.Parse(fps.Remove(0, 3));
});
desktopToggle.onValueChanged.AddListener((bool value) => {
if (value)
{
windowTexture.type = WindowTextureType.Desktop;
desktopIndexDropdown.interactable = true;
}
else
{
windowTexture.type = WindowTextureType.Desktop;
desktopIndexDropdown.interactable = false;
}
});
desktopIndexDropdown.onValueChanged.AddListener((int value) => {
windowTexture.desktopIndex = value;
});
modeDropdown.onValueChanged?.Invoke(modeDropdown.value);
fpsDropdown.onValueChanged?.Invoke(fpsDropdown.value);
desktopToggle.onValueChanged?.Invoke(desktopToggle.isOn);
desktopIndexDropdown.onValueChanged?.Invoke(desktopIndexDropdown.value);
}
}

View File

@ -0,0 +1,22 @@
using TMPro;
using UnityEngine;
[ExecuteAlways]
public class ComponentAutoName : MonoBehaviour
{
[Header("!Readme!")]
[TextArea]
public string Notes = "This script will automatically set the text and config key name to object name. Pls rename prefab/gameobject name.";
private TMP_Text text;
private ConfigPanelComponent configPanelComponent;
private void Awake()
{
text = GetComponentInChildren<TMP_Text>();
configPanelComponent = GetComponent<ConfigPanelComponent>();
text.text = gameObject.name;
}
void Update()
{
text.text = gameObject.name;
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 785dd3d2a9b58f24d9e6ecf071fb1304
guid: a0913f02b8bfb1041afdf0ef24c51c54
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -4,88 +4,39 @@ using UnityEngine;
public class Config
{
public captureMode CaptureMode = captureMode.BitBlt;
public enum captureMode
{
None = 0,
PrintWindow = 1,
BitBlt = 2,
WindowsGraphicCapture = 3,
Auto = 4
}
public captureFPS CaptureFPS = captureFPS.FPS72;
public enum captureFPS
{
FPS30 = 0,
FPS60 = 1,
FPS72 = 2,
FPS90 = 3,
FPS120 = 4,
FPS144 = 5
}
public int CaptureMode = 3;
public int CaptureFPS = 2;
public bool CaptureDesktop = false;
public int CaptureDesktopNumber = 0;
public spectatorMode SpectatorMode = spectatorMode.ThirdPerson;
public enum spectatorMode
{
FirstPerson = 0,
FirstPersonSmooth = 1,
ThirdPerson = 2,
}
public spectatorFPS SpectatorFPS = spectatorFPS.FPS60;
public enum spectatorFPS
{
FPS15 = 0,
FPS30 = 1,
FPS45 = 2,
FPS60 = 3,
FPS72 = 4,
FPS90 = 5,
FPS120 = 6,
FPS144 = 7
}
public int DesktopIndex = 0;
public int SpectatorMode = 2;
public int SpectatorFPS = 3;
public float SpectatorFOV = 40;
public float SpectatorSmooth = 0.05f;
public float[] TPCamPosition = new float[3] { -0.6f, 1.8f, -1.2f };
public float[] TPCamRotation = new float[3] { 23, 35, 0 };
public float HandSize = 8f;
public float[] HandPosition = new float[3] { 0, 0, 0 };
public int Skybox = 0;
public float HandX = 0;
public float HandY = 0;
public float HandZ = 0;
public float PlayerHeight = 0;
public int Skybox = 0;
public float HapticDuration = 0.1f;
public float HapticAmplitude = 0.75f;
public touchSampleRate TouchSampleRate = touchSampleRate.FPS90;
public enum touchSampleRate
{
FPS60 = 0,
FPS72 = 1,
FPS90 = 2,
FPS120 = 3,
FPS144 = 4,
FPS160 = 5,
FPS180 = 6,
FPS200 = 7,
FPS240 = 8,
FPS280 = 9,
FPS320 = 10,
}
public handStabilization HandStabilizationMode = handStabilization.None;
public enum handStabilization
{
None = 0,
Velocity = 1,
Distance = 2,
Smooth = 3,
}
public int TouchSampleRate = 2;
public int HandStabilization = 0;
public float Threshold = 0.3f;
public float HandStabilVelocity = 0.3f;
public float HandStabilDistance = 0.1f;
public float HandStabilSmooth = 0.1f;
public bool useLight = true;
public bool useIPCLighting = true;
public bool useIPCTouch = true;
public VirtualKeyCode TestKey = VirtualKeyCode.INSERT;
public VirtualKeyCode ServiceKey = VirtualKeyCode.DELETE;
public VirtualKeyCode CoinKey = VirtualKeyCode.HOME;
public VirtualKeyCode CustomKey = VirtualKeyCode.NONAME;
public bool UseIPCLighting = true;
public bool UseIPCTouch = true;
public int TestKeyBind = 39;
public int ServiceKeyBind = 40;
public int CoinKeyBind = 30;
public int CustomKeyBind = 169;
public bool FlatShadedRing = false;
public bool PostProcess = true;
public int AntiAliasing = 0;
public string batFileLocation = "";
}

View File

@ -6,28 +6,30 @@ using TMPro;
using UnityEngine.UI;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
public class ConfigManager : MonoBehaviour
{
public static Config config;
private static bool hasInitialized = false;
Config oldConfig;
public static event Action onConfigChanged;
private static float saverTimer = 0;
private static bool isSavingConfig = false;
private float saverDelay = 1.5f;
public List<GameObject> Tabs;
[SerializeField]
public static List<ConfigPanelComponent> ConfigPanelComponents;
void Awake()
{
onConfigChanged += EnsureInitialization;
onConfigChanged += SaveFile;
ConfigPanelComponents = GetConfigPanelComponents();
EnsureInitialization();
}
void Start()
{
EnsureInitialization();
FindConfigPanelWidget();
UpdateConfigPanel();
AddListenerToWidget();
AddListenerToWidget(ConfigPanelComponents);
onConfigChanged?.Invoke();
}
public static void EnsureInitialization()
@ -35,6 +37,7 @@ public class ConfigManager : MonoBehaviour
if (hasInitialized)
return;
LoadFile();
UpdateConfigPanelFromConfig(ref ConfigPanelComponents);
hasInitialized = true;
}
private static void LoadFile()
@ -83,158 +86,113 @@ public class ConfigManager : MonoBehaviour
}
}
private TMP_Dropdown CaptureModeDropdown;
private TMP_Dropdown CaptureFPSDropdown;
private Toggle CaptureDesktopToggle;
private TMP_Dropdown SpectatorModeDropdown;
private TMP_Dropdown SpectatorFPSDropdown;
private Slider SpectatorFOVSlider;
private Slider HandSizeSlider;
private Slider HandXSlider;
private Slider HandYSlider;
private Slider HandZSlider;
private TMP_Dropdown SkyboxDropdown;
private ValueManager PlayerHeightManager;
private Slider HapticDurationSlider;
private Slider HapticAmplitudeSlider;
private TMP_Dropdown TouchSampleRateDropdown;
private TMP_Dropdown HandStabilizationModeDropdown;
private Slider HandStabilVelocitySlider;
private Slider HandStabilDistanceSlider;
private Slider HandStabilSmoothSlider;
private Toggle isIPCLightingToggle;
private Toggle isIPCTouchToggle;
private TMP_Dropdown TestKeyDropdown;
private TMP_Dropdown ServiceKeyDropdown;
private TMP_Dropdown CoinKeyDropdown;
private TMP_Dropdown CustomKeyDropdown;
void FindConfigPanelWidget()
public static GameObject GetConfigPanelWidget(string configKeyName)
{
CaptureModeDropdown = transform.Find("Tab1").Find("CaptureMode").Find("Dropdown").GetComponent<TMP_Dropdown>();
CaptureFPSDropdown = transform.Find("Tab1").Find("CaptureFPS").Find("Dropdown").GetComponent<TMP_Dropdown>();
CaptureDesktopToggle = transform.Find("Tab1").Find("CaptureDesktop").Find("Toggle").GetComponent<Toggle>();
SpectatorModeDropdown = transform.Find("Tab1").Find("SpectatorMode").Find("Dropdown").GetComponent<TMP_Dropdown>();
SpectatorFPSDropdown = transform.Find("Tab1").Find("SpectatorFPS").Find("Dropdown").GetComponent<TMP_Dropdown>();
SpectatorFOVSlider = transform.Find("Tab1").Find("SpectatorFOV").Find("Slider").GetComponent<Slider>();
HandSizeSlider = transform.Find("Tab1").Find("HandSize").Find("Slider").GetComponent<Slider>();
HandXSlider = transform.Find("Tab1").Find("HandX").Find("Slider").GetComponent<Slider>();
HandYSlider = transform.Find("Tab1").Find("HandY").Find("Slider").GetComponent<Slider>();
HandZSlider = transform.Find("Tab1").Find("HandZ").Find("Slider").GetComponent<Slider>();
SkyboxDropdown = transform.Find("Tab1").Find("Skybox").Find("Dropdown").GetComponent<TMP_Dropdown>();
PlayerHeightManager = transform.Find("Tab1").Find("PlayerHeight").Find("Value").GetComponent<ValueManager>();
HapticDurationSlider = transform.Find("Tab2").Find("HapticDuration").Find("Slider").GetComponent<Slider>();
HapticAmplitudeSlider = transform.Find("Tab2").Find("HapticAmplitude").Find("Slider").GetComponent<Slider>();
TouchSampleRateDropdown = transform.Find("Tab2").Find("TouchSampleRate").Find("Dropdown").GetComponent<TMP_Dropdown>();
HandStabilizationModeDropdown = transform.Find("Tab2").Find("HandStabilization").Find("Dropdown").GetComponent<TMP_Dropdown>();
//HandStabilVelocitySlider = transform.Find("Tab2").Find("HandStabilVelocity").Find("Slider").GetComponent<Slider>();
//HandStabilDistanceSlider = transform.Find("Tab2").Find("HandStabilDistance").Find("Slider").GetComponent<Slider>();
//HandStabilSmoothSlider = transform.Find("Tab2").Find("HandStabilSmooth").Find("Slider").GetComponent<Slider>();
isIPCLightingToggle = transform.Find("Tab2").Find("UseIPCLighting").Find("Toggle").GetComponent<Toggle>();
isIPCTouchToggle = transform.Find("Tab2").Find("UseIPCTouch").Find("Toggle").GetComponent<Toggle>();
TestKeyDropdown = transform.Find("Tab2").Find("TestKeyBind").Find("Dropdown").GetComponent<TMP_Dropdown>();
ServiceKeyDropdown = transform.Find("Tab2").Find("ServiceKeyBind").Find("Dropdown").GetComponent<TMP_Dropdown>();
CoinKeyDropdown = transform.Find("Tab2").Find("CoinKeyBind").Find("Dropdown").GetComponent<TMP_Dropdown>();
CustomKeyDropdown = transform.Find("Tab2").Find("CustomKeyBind").Find("Dropdown").GetComponent<TMP_Dropdown>();
}
void AddListenerToWidget()
{
CaptureModeDropdown.onValueChanged.AddListener(onIntChanged);
CaptureFPSDropdown.onValueChanged.AddListener(onIntChanged);
CaptureDesktopToggle.onValueChanged.AddListener(onBoolChanged);
SpectatorModeDropdown.onValueChanged.AddListener(onIntChanged);
SpectatorFPSDropdown.onValueChanged.AddListener(onIntChanged);
SpectatorFOVSlider.onValueChanged.AddListener(onFloatChanged);
HandSizeSlider.onValueChanged.AddListener(onFloatChanged);
HandXSlider.onValueChanged.AddListener(onFloatChanged);
HandYSlider.onValueChanged.AddListener(onFloatChanged);
HandZSlider.onValueChanged.AddListener(onFloatChanged);
SkyboxDropdown.onValueChanged.AddListener(onIntChanged);
PlayerHeightManager.onValueChanged.AddListener(onValueChanged);
HapticDurationSlider.onValueChanged.AddListener(onFloatChanged);
HapticAmplitudeSlider.onValueChanged.AddListener(onFloatChanged);
TouchSampleRateDropdown.onValueChanged.AddListener(onIntChanged);
HandStabilizationModeDropdown.onValueChanged.AddListener(onIntChanged);
//HandStabilVelocitySlider.onValueChanged.AddListener(onFloatChanged);
//HandStabilDistanceSlider.onValueChanged.AddListener(onFloatChanged);
//HandStabilSmoothSlider.onValueChanged.AddListener(onFloatChanged);
isIPCLightingToggle.onValueChanged.AddListener(onBoolChanged);
isIPCTouchToggle.onValueChanged.AddListener(onBoolChanged);
TestKeyDropdown.onValueChanged.AddListener(onIntChanged);
ServiceKeyDropdown.onValueChanged.AddListener(onIntChanged);
CoinKeyDropdown.onValueChanged.AddListener(onIntChanged);
CustomKeyDropdown.onValueChanged.AddListener(onIntChanged);
}
void onValueChanged()
{
config.PlayerHeight = PlayerHeightManager.Value;
onConfigChanged?.Invoke();
}
void onIntChanged(int value)
{
config.CaptureMode = (Config.captureMode)CaptureModeDropdown.value;
config.CaptureFPS = (Config.captureFPS)CaptureFPSDropdown.value;
config.SpectatorMode = (Config.spectatorMode)SpectatorModeDropdown.value;
config.SpectatorFPS = (Config.spectatorFPS)SpectatorFPSDropdown.value;
config.Skybox = SkyboxDropdown.value;
config.TouchSampleRate = (Config.touchSampleRate)TouchSampleRateDropdown.value;
config.HandStabilizationMode = (Config.handStabilization)HandStabilizationModeDropdown.value;
config.TestKey = (VirtualKeyCode)Enum.GetValues(typeof(VirtualKeyCode)).GetValue(TestKeyDropdown.value);
config.ServiceKey = (VirtualKeyCode)Enum.GetValues(typeof(VirtualKeyCode)).GetValue(ServiceKeyDropdown.value);
config.CoinKey = (VirtualKeyCode)Enum.GetValues(typeof(VirtualKeyCode)).GetValue(CoinKeyDropdown.value);
config.CustomKey = (VirtualKeyCode)Enum.GetValues(typeof(VirtualKeyCode)).GetValue(CustomKeyDropdown.value);
onConfigChanged?.Invoke();
foreach (var item in ConfigPanelComponents)
{
if (item.ConfigKeyName == configKeyName)
{
return item.Widget;
}
}
return null;
}
void onFloatChanged(float value)
private List<ConfigPanelComponent> GetConfigPanelComponents()
{
config.SpectatorFOV = SpectatorFOVSlider.value;
config.HandSize = HandSizeSlider.value;
config.HandPosition[0] = HandXSlider.value;
config.HandPosition[1] = HandYSlider.value;
config.HandPosition[2] = HandZSlider.value;
config.HapticDuration = HapticDurationSlider.value;
config.HapticAmplitude = HapticAmplitudeSlider.value;
//config.HandStabilVelocity = HandStabilVelocitySlider.value;
//config.HandStabilDistance = HandStabilDistanceSlider.value;
//config.HandStabilSmooth = HandStabilSmoothSlider.value;
onConfigChanged?.Invoke();
var _configPanelComponents = new List<ConfigPanelComponent>();
foreach (var tab in Tabs)
{
var _configPanelComponentsInTab = tab.GetComponentsInChildren<ConfigPanelComponent>();
_configPanelComponents.AddRange(_configPanelComponentsInTab);
}
return _configPanelComponents;
}
void onBoolChanged(bool value)
private void AddListenerToWidget(List<ConfigPanelComponent> _configPanelComponents)
{
config.CaptureDesktop = CaptureDesktopToggle.isOn;
config.useIPCLighting = isIPCLightingToggle.isOn;
config.useIPCTouch = isIPCTouchToggle.isOn;
onConfigChanged?.Invoke();
foreach (var configPanelComponent in _configPanelComponents)
{
var widget = configPanelComponent.Widget;
if (widget.GetComponent<TMP_Dropdown>() != null)
{
var dropdown = widget.GetComponent<TMP_Dropdown>();
// add listener to dropdown to update config by key name
dropdown.onValueChanged.AddListener(delegate
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, dropdown.value);
onConfigChanged?.Invoke();
});
}
else if (widget.GetComponent<Toggle>() != null)
{
var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener(delegate
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, toggle.isOn);
onConfigChanged?.Invoke();
});
}
else if (widget.GetComponent<Slider>() != null)
{
var slider = widget.GetComponent<Slider>();
slider.onValueChanged.AddListener(delegate
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, slider.value);
onConfigChanged?.Invoke();
});
}
else if (widget.GetComponent<ValueManager>() != null)
{
var valueManager = widget.GetComponent<ValueManager>();
valueManager.onValueChanged.AddListener(delegate
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, valueManager.Value);
onConfigChanged?.Invoke();
});
}
}
}
[ContextMenu("UpdateConfigPanel")]
void UpdateConfigPanel()
private static void UpdateConfigPanelFromConfig(ref List<ConfigPanelComponent> _configPanelComponents)
{
CaptureModeDropdown.value = (int)config.CaptureMode;
CaptureFPSDropdown.value = (int)config.CaptureFPS;
CaptureDesktopToggle.isOn = config.CaptureDesktop;
SpectatorModeDropdown.value = (int)config.SpectatorMode;
SpectatorFPSDropdown.value = (int)config.SpectatorFPS;
SpectatorFOVSlider.value = config.SpectatorFOV;
HandSizeSlider.value = config.HandSize;
HandXSlider.value = config.HandPosition[0];
HandYSlider.value = config.HandPosition[1];
HandZSlider.value = config.HandPosition[2];
SkyboxDropdown.value = config.Skybox;
PlayerHeightManager.Value = config.PlayerHeight;
HapticDurationSlider.value = config.HapticDuration;
HapticAmplitudeSlider.value = config.HapticAmplitude;
TouchSampleRateDropdown.value = (int)config.TouchSampleRate;
HandStabilizationModeDropdown.value = (int)config.HandStabilizationMode;
//HandStabilVelocitySlider.value = HandStabilVelocity;
//HandStabilDistanceSlider.value = HandStabilDistance;
//HandStabilSmoothSlider.value = HandStabilSmooth;
isIPCLightingToggle.isOn = config.useIPCLighting;
isIPCTouchToggle.isOn = config.useIPCTouch;
TestKeyDropdown.value = Array.IndexOf(Enum.GetValues(typeof(VirtualKeyCode)), config.TestKey);
ServiceKeyDropdown.value = Array.IndexOf(Enum.GetValues(typeof(VirtualKeyCode)), config.ServiceKey);
CoinKeyDropdown.value = Array.IndexOf(Enum.GetValues(typeof(VirtualKeyCode)), config.CoinKey);
CustomKeyDropdown.value = Array.IndexOf(Enum.GetValues(typeof(VirtualKeyCode)), config.CustomKey);
foreach (var configPanelComponent in _configPanelComponents)
{
Debug.Log(configPanelComponent.ConfigKeyName);
var componentObject = configPanelComponent.Widget;
if (componentObject.GetComponent<TMP_Dropdown>() != null)
{
var dropdown = componentObject.GetComponent<TMP_Dropdown>();
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
dropdown.value = (int)field.GetValue(config);
dropdown.onValueChanged?.Invoke(dropdown.value);
}
else if (componentObject.GetComponent<Toggle>() != null)
{
var toggle = componentObject.GetComponent<Toggle>();
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
toggle.isOn = (bool)field.GetValue(config);
toggle.onValueChanged?.Invoke(toggle.isOn);
}
else if (componentObject.GetComponent<Slider>() != null)
{
var slider = componentObject.GetComponent<Slider>();
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
slider.value = (float)field.GetValue(config);
slider.onValueChanged?.Invoke(slider.value);
}
else if (componentObject.GetComponent<ValueManager>() != null)
{
var valueManager = componentObject.GetComponent<ValueManager>();
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
valueManager.Value = (float)field.GetValue(config);
valueManager.onValueChanged?.Invoke();
}
}
}
}

View File

@ -0,0 +1,37 @@
using UnityEngine.UI;
using UnityEngine;
using TMPro;
public class ConfigPanelComponent : MonoBehaviour
{
[SerializeField]
public string ConfigKeyName
{
get
{
return gameObject.name.Replace(" ", "");
}
}
private string configKeyName;
[SerializeField]
public GameObject Widget
{
get
{
var dropdown = gameObject.GetComponentInChildren<TMP_Dropdown>();
var toggle = gameObject.GetComponentInChildren<Toggle>();
var slider = gameObject.GetComponentInChildren<Slider>();
var value = gameObject.GetComponentInChildren<ValueManager>();
if (dropdown != null)
return dropdown.gameObject;
else if (toggle != null)
return toggle.gameObject;
else if (slider != null)
return slider.gameObject;
else if (value != null)
return value.gameObject;
else
return null;
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5dc3809278e8e6344b8891c35a1896ad
guid: 970da0aecbe521547a08f1b032980950
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LightSettingManager : MonoBehaviour
{
public GameObject LightManager;
void Start()
{
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
void ApplyConfig()
{
LightManager.SetActive(ConfigManager.config.useLight);
}
}

View File

@ -16,24 +16,43 @@ public class PlayerSettingManager : MonoBehaviour
{
LHandTransform = transform.Find("Camera Offset").Find("LeftHand Controller").Find("LHand Virtual");
RHandTransform = transform.Find("Camera Offset").Find("RightHand Controller").Find("RHand Virtual");
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
void ApplyConfig()
{
LHandTransform.localPosition = new Vector3(ConfigManager.config.HandPosition[0]/100,
ConfigManager.config.HandPosition[1]/100,
ConfigManager.config.HandPosition[2]/100);
RHandTransform.localPosition = new Vector3(-ConfigManager.config.HandPosition[0]/100,
ConfigManager.config.HandPosition[1]/100,
ConfigManager.config.HandPosition[2]/100);
var value = ConfigManager.config.HandSize;
LHandTransform.localScale = new Vector3(value/100, value/100, value/100);
RHandTransform.localScale = new Vector3(value/100, value/100, value/100);
height = ConfigManager.config.PlayerHeight;
var sizeWidget = ConfigManager.GetConfigPanelWidget("HandSize");
var xWidget = ConfigManager.GetConfigPanelWidget("HandX");
var yWidget = ConfigManager.GetConfigPanelWidget("HandY");
var zWidget = ConfigManager.GetConfigPanelWidget("HandZ");
var heightWidget = ConfigManager.GetConfigPanelWidget("PlayerHeight");
var sizeSlider = sizeWidget.GetComponent<Slider>();
var xSlider = xWidget.GetComponent<Slider>();
var ySlider = yWidget.GetComponent<Slider>();
var zSlider = zWidget.GetComponent<Slider>();
var heightManager = heightWidget.GetComponent<ValueManager>();
sizeSlider.onValueChanged.AddListener((float value) => {
LHandTransform.localScale = new Vector3(value, value, value);
RHandTransform.localScale = new Vector3(value, value, value);
});
xSlider.onValueChanged.AddListener((float value) => {
LHandTransform.localPosition = new Vector3(value, LHandTransform.localPosition.y, LHandTransform.localPosition.z);
RHandTransform.localPosition = new Vector3(-value, RHandTransform.localPosition.y, RHandTransform.localPosition.z);
});
ySlider.onValueChanged.AddListener((float value) => {
LHandTransform.localPosition = new Vector3(LHandTransform.localPosition.x, value, LHandTransform.localPosition.z);
RHandTransform.localPosition = new Vector3(RHandTransform.localPosition.x, value, RHandTransform.localPosition.z);
});
zSlider.onValueChanged.AddListener((float value) => {
LHandTransform.localPosition = new Vector3(LHandTransform.localPosition.x, LHandTransform.localPosition.y, value);
RHandTransform.localPosition = new Vector3(RHandTransform.localPosition.x, RHandTransform.localPosition.y, value);
});
heightManager.onValueChanged.AddListener(delegate {
height = heightManager.Value;
});
sizeSlider.onValueChanged.Invoke(sizeSlider.value);
xSlider.onValueChanged.Invoke(xSlider.value);
ySlider.onValueChanged.Invoke(ySlider.value);
zSlider.onValueChanged.Invoke(zSlider.value);
heightManager.onValueChanged.Invoke();
}
void Update()
{

View File

@ -13,7 +13,6 @@ public class SkyboxSwitcher : MonoBehaviour
public List<FileInfo> imageFiles = new List<FileInfo>();
public List<Texture2D> textures = new List<Texture2D>();
public List<System.IntPtr> ptrs = new List<System.IntPtr>();
public static bool useSkybox = false;
public GameObject Room;
[SerializeField]
@ -32,22 +31,18 @@ public class SkyboxSwitcher : MonoBehaviour
StartCoroutine(AddSkyboxes());
Dropdown = GetComponent<TMP_Dropdown>();
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
void ApplyConfig()
{
if (ConfigManager.config.Skybox == 0)
{
Room.SetActive(true);
}
else
{
Room.SetActive(false);
currentSkyboxIndex = ConfigManager.config.Skybox-1;
SetSkybox();
}
Dropdown.onValueChanged.AddListener((int value) => {
if (value == 0)
{
Room.SetActive(true);
}
else
{
Room.SetActive(false);
currentSkyboxIndex = Dropdown.value-1;
SetSkybox();
}
});
}
IEnumerator AddSkyboxes()

View File

@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using TMPro;
using UnityEngine.UI;
public class SpectatorManager : MonoBehaviour
{
@ -14,47 +14,60 @@ public class SpectatorManager : MonoBehaviour
{
cameraSmooth = GetComponent<CameraSmooth>();
SpectatorCam = GetComponent<Camera>();
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
var modeWidget = ConfigManager.GetConfigPanelWidget("SpectatorMode");
var fovWidget = ConfigManager.GetConfigPanelWidget("SpectatorFOV");
var fpsWidget = ConfigManager.GetConfigPanelWidget("SpectatorFPS");
var modeDropdown = modeWidget.GetComponent<TMP_Dropdown>();
var fovSlider = fovWidget.GetComponent<Slider>();
var fpsDropdown = fpsWidget.GetComponent<TMP_Dropdown>();
modeDropdown.onValueChanged.AddListener((int value) => {
if (SpectatorCam == null || cameraSmooth == null || SpectatorFPTarget == null || SpectatorTPTarget == null)
return;
switch (value)
{
case 0:
if (gameObject.activeSelf)
gameObject.SetActive(false);
break;
case 1:
if (!gameObject.activeSelf)
gameObject.SetActive(true);
cameraSmooth.target = SpectatorFPTarget;
cameraSmooth.smoothSpeed = (float)ConfigManager.config.SpectatorSmooth;
SpectatorCam.cullingMask |= 1 << LayerMask.NameToLayer("TPBlock"); // Enable TPBlock Layer Mask
SpectatorCam.cullingMask &= ~(1 << LayerMask.NameToLayer("FPBlock")); // Disable FPBlock Layer Mask
break;
case 2:
if (!gameObject.activeSelf)
gameObject.SetActive(true);
cameraSmooth.target = SpectatorTPTarget;
cameraSmooth.smoothSpeed = 1;
SpectatorCam.cullingMask &= ~(1 << LayerMask.NameToLayer("TPBlock")); // Disable TPBlock Layer Mask
SpectatorCam.cullingMask |= 1 << LayerMask.NameToLayer("FPBlock"); // Enable FPBlock Layer Mask
break;
}
});
fovSlider.onValueChanged.AddListener((float value) => {
SpectatorCam.fieldOfView = value;
});
fpsDropdown.onValueChanged.AddListener((int value) => {
var fpsString = Enum.GetName(typeof(CEnum.FPS), value);
Application.targetFrameRate = int.Parse(fpsString.Remove(0, 3));
});
modeDropdown.onValueChanged?.Invoke(modeDropdown.value);
fovSlider.onValueChanged?.Invoke(fovSlider.value);
fpsDropdown.onValueChanged?.Invoke(fpsDropdown.value);
ApplyTPCamTransform();
}
// Update is called once per frame
void ApplyConfig()
{
if (SpectatorCam == null || cameraSmooth == null || SpectatorFPTarget == null || SpectatorTPTarget == null)
return;
switch ((int)ConfigManager.config.SpectatorMode)
{
case 0:
if (gameObject.activeSelf)
gameObject.SetActive(false);
break;
case 1:
if (!gameObject.activeSelf)
gameObject.SetActive(true);
cameraSmooth.target = SpectatorFPTarget;
cameraSmooth.smoothSpeed = (float)ConfigManager.config.SpectatorSmooth;
SpectatorCam.cullingMask |= 1 << LayerMask.NameToLayer("TPBlock"); // Enable TPBlock Layer Mask
SpectatorCam.cullingMask &= ~(1 << LayerMask.NameToLayer("FPBlock")); // Disable FPBlock Layer Mask
break;
case 2:
if (!gameObject.activeSelf)
gameObject.SetActive(true);
cameraSmooth.target = SpectatorTPTarget;
cameraSmooth.smoothSpeed = 1;
SpectatorCam.cullingMask &= ~(1 << LayerMask.NameToLayer("TPBlock")); // Disable TPBlock Layer Mask
SpectatorCam.cullingMask |= 1 << LayerMask.NameToLayer("FPBlock"); // Enable FPBlock Layer Mask
break;
}
SpectatorCam.fieldOfView = (float)ConfigManager.config.SpectatorFOV;
string fpsString = Enum.GetName(typeof(Config.captureFPS), ConfigManager.config.CaptureFPS);
Application.targetFrameRate = int.Parse(fpsString.Remove(0, 3));
}
void ApplyTPCamTransform()
void ApplyTPCamTransform()
{
if (SpectatorTPTarget == null)
return;
@ -65,7 +78,7 @@ public class SpectatorManager : MonoBehaviour
ConfigManager.config.TPCamRotation[1],
ConfigManager.config.TPCamRotation[2]);
}
public void SaveTransform()
public void SaveTransform() // will be called from TPCameraCube
{
if (SpectatorTPTarget == null)
return;

View File

@ -8,13 +8,15 @@ public class TouchSettingManager : MonoBehaviour
{
void Start()
{
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
public void ApplyConfig()
{
string fpsString = Enum.GetName(typeof(Config.captureFPS), ConfigManager.config.CaptureFPS);
Time.fixedDeltaTime = 1 / int.Parse(fpsString.Remove(0, 3));
var sampleWidget = ConfigManager.GetConfigPanelWidget("TouchSampleRate");
var sampleDropdown = sampleWidget.GetComponent<TMP_Dropdown>();
sampleDropdown.onValueChanged.AddListener((int value) => {
string fpsString = Enum.GetName(typeof(CEnum.FPS), value);
Time.fixedDeltaTime = 1 / int.Parse(fpsString.Remove(0, 3));
});
sampleDropdown.onValueChanged?.Invoke(sampleDropdown.value);
}
}

View File

@ -27,7 +27,7 @@ public class ValueManager : MonoBehaviour
void Start()
{
tmp = GetComponent<TMP_Text>();
ConfigManager.EnsureInitialization();
//ConfigManager.EnsureInitialization();
onValueChanged.AddListener(UpdateText);
}
void Update()

View File

@ -3,7 +3,9 @@
"rootNamespace": "",
"references": [
"GUID:80de51a1f88203a4cb129a5922de311f",
"GUID:fe685ec1767f73d42b749ea8045bfe43"
"GUID:fe685ec1767f73d42b749ea8045bfe43",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:e9ef0e10f8c2b264e9705f57f028b9e8"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -1,5 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
using UnityEngine.XR;
public class ControllerHapticManager : MonoBehaviour
@ -10,9 +9,14 @@ public class ControllerHapticManager : MonoBehaviour
public float amplitude = 1f;
void Start()
{
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
var durationWidget = ConfigManager.GetConfigPanelWidget("HapticDuration");
var amplitudeWidget = ConfigManager.GetConfigPanelWidget("HapticAmplitude");
var durationSlider = durationWidget.GetComponent<Slider>();
var amplitudeSlider = amplitudeWidget.GetComponent<Slider>();
durationSlider.onValueChanged.AddListener( (float value) => { duration = value;});
amplitudeSlider.onValueChanged.AddListener( (float value) => { amplitude = value;});
durationSlider.onValueChanged?.Invoke(duration);
amplitudeSlider.onValueChanged?.Invoke(amplitude);
}
private void OnTriggerEnter(Collider other)
{
@ -24,9 +28,4 @@ public class ControllerHapticManager : MonoBehaviour
device = InputDevices.GetDeviceAtXRNode(Hand);
device.StopHaptics();
}
void ApplyConfig()
{
duration = ConfigManager.config.HapticDuration;
amplitude = ConfigManager.config.HapticAmplitude;
}
}

View File

@ -1,12 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class HandFollowManager : MonoBehaviour
{
public GameObject Target;
public Transform Center;
public Config.handStabilization Mode;
public CEnum.handStabilization Mode;
public float VelocityThreshold = 0.1f;
private Rigidbody TargetRigidbody;
private Vector3 previousPosition;
@ -14,14 +14,24 @@ public class HandFollowManager : MonoBehaviour
private void Start()
{
TargetRigidbody = Target.GetComponent<Rigidbody>();
ConfigManager.onConfigChanged += ApplyConfig;
ConfigManager.EnsureInitialization();
ApplyConfig();
}
private void ApplyConfig()
{
VelocityThreshold = ConfigManager.config.HandStabilVelocity;
Mode = ConfigManager.config.HandStabilizationMode;
var modeWidget = ConfigManager.GetConfigPanelWidget("HandStabilization");
var threshWidget = ConfigManager.GetConfigPanelWidget("Threshold");
var modeDropdown = modeWidget.GetComponent<TMP_Dropdown>();
var threshSlider = threshWidget.GetComponent<Slider>();
modeDropdown.onValueChanged.AddListener((int value) => {
VelocityThreshold = ConfigManager.config.HandStabilVelocity;
Mode = (CEnum.handStabilization)value;
});
threshSlider.onValueChanged.AddListener((float value) => {
VelocityThreshold = value;
});
modeDropdown.onValueChanged?.Invoke(modeDropdown.value);
threshSlider.onValueChanged?.Invoke(threshSlider.value);
}
private void VelocityTracking()
@ -42,10 +52,10 @@ public class HandFollowManager : MonoBehaviour
{
switch (Mode)
{
case Config.handStabilization.Velocity:
case CEnum.handStabilization.Velocity:
VelocityTracking();
break;
case Config.handStabilization.None:
case CEnum.handStabilization.None:
transform.position = Target.transform.position;
break;
}

View File

@ -0,0 +1,229 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CEnum
{
public enum captureMode
{
None = 0,
PrintWindow = 1,
BitBlt = 2,
WindowsGraphicCapture = 3,
Auto = 4
}
public enum spectatorMode
{
FirstPerson = 0,
FirstPersonSmooth = 1,
ThirdPerson = 2,
}
public enum FPS
{
FPS15 = 0,
FPS30 = 1,
FPS45 = 2,
FPS60 = 3,
FPS72 = 4,
FPS90 = 5,
FPS120 = 6,
FPS144 = 7,
FPS160 = 8,
FPS180 = 9,
FPS200 = 10,
FPS240 = 11,
FPS280 = 12,
FPS320 = 13,
}
public enum handStabilization
{
None = 0,
Velocity = 1,
Distance = 2,
Smooth = 3,
}
public enum listType
{
VirtualKeyCode = 0,
captureMode = 1,
spectatorMode = 2,
FPS = 3,
handStabilization = 4,
}
public enum VirtualKeyCode
{
LBUTTON = 1,
RBUTTON = 2,
CANCEL = 3,
MBUTTON = 4,
XBUTTON1 = 5,
XBUTTON2 = 6,
BACK = 8,
TAB = 9,
CLEAR = 12,
RETURN = 13,
SHIFT = 16,
CONTROL = 17,
MENU = 18,
PAUSE = 19,
CAPITAL = 20,
KANA = 21,
HANGEUL = 21,
HANGUL = 21,
JUNJA = 23,
FINAL = 24,
HANJA = 25,
KANJI = 25,
ESCAPE = 27,
CONVERT = 28,
NONCONVERT = 29,
ACCEPT = 30,
MODECHANGE = 31,
SPACE = 32,
PRIOR = 33,
NEXT = 34,
END = 35,
HOME = 36,
LEFT = 37,
UP = 38,
RIGHT = 39,
DOWN = 40,
SELECT = 41,
PRINT = 42,
EXECUTE = 43,
SNAPSHOT = 44,
INSERT = 45,
DELETE = 46,
HELP = 47,
VK_0 = 48,
VK_1 = 49,
VK_2 = 50,
VK_3 = 51,
VK_4 = 52,
VK_5 = 53,
VK_6 = 54,
VK_7 = 55,
VK_8 = 56,
VK_9 = 57,
VK_A = 65,
VK_B = 66,
VK_C = 67,
VK_D = 68,
VK_E = 69,
VK_F = 70,
VK_G = 71,
VK_H = 72,
VK_I = 73,
VK_J = 74,
VK_K = 75,
VK_L = 76,
VK_M = 77,
VK_N = 78,
VK_O = 79,
VK_P = 80,
VK_Q = 81,
VK_R = 82,
VK_S = 83,
VK_T = 84,
VK_U = 85,
VK_V = 86,
VK_W = 87,
VK_X = 88,
VK_Y = 89,
VK_Z = 90,
LWIN = 91,
RWIN = 92,
APPS = 93,
SLEEP = 95,
NUMPAD0 = 96,
NUMPAD1 = 97,
NUMPAD2 = 98,
NUMPAD3 = 99,
NUMPAD4 = 100,
NUMPAD5 = 101,
NUMPAD6 = 102,
NUMPAD7 = 103,
NUMPAD8 = 104,
NUMPAD9 = 105,
MULTIPLY = 106,
ADD = 107,
SEPARATOR = 108,
SUBTRACT = 109,
DECIMAL = 110,
DIVIDE = 111,
F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F10 = 121,
F11 = 122,
F12 = 123,
F13 = 124,
F14 = 125,
F15 = 126,
F16 = 127,
F17 = 128,
F18 = 129,
F19 = 130,
F20 = 131,
F21 = 132,
F22 = 133,
F23 = 134,
F24 = 135,
NUMLOCK = 144,
SCROLL = 145,
LSHIFT = 160,
RSHIFT = 161,
LCONTROL = 162,
RCONTROL = 163,
LMENU = 164,
RMENU = 165,
BROWSER_BACK = 166,
BROWSER_FORWARD = 167,
BROWSER_REFRESH = 168,
BROWSER_STOP = 169,
BROWSER_SEARCH = 170,
BROWSER_FAVORITES = 171,
BROWSER_HOME = 172,
VOLUME_MUTE = 173,
VOLUME_DOWN = 174,
VOLUME_UP = 175,
MEDIA_NEXT_TRACK = 176,
MEDIA_PREV_TRACK = 177,
MEDIA_STOP = 178,
MEDIA_PLAY_PAUSE = 179,
LAUNCH_MAIL = 180,
LAUNCH_MEDIA_SELECT = 181,
LAUNCH_APP1 = 182,
LAUNCH_APP2 = 183,
OEM_1 = 186,
OEM_PLUS = 187,
OEM_COMMA = 188,
OEM_MINUS = 189,
OEM_PERIOD = 190,
OEM_2 = 191,
OEM_3 = 192,
OEM_4 = 219,
OEM_5 = 220,
OEM_6 = 221,
OEM_7 = 222,
OEM_8 = 223,
OEM_102 = 226,
PROCESSKEY = 229,
PACKET = 231,
ATTN = 246,
CRSEL = 247,
EXSEL = 248,
EREOF = 249,
PLAY = 250,
ZOOM = 251,
NONAME = 252,
PA1 = 253,
OEM_CLEAR = 254
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2e8e5bc584f08bb4f843dcefbee539b8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
using System.Linq;
using System.Collections.Generic;
using System;
using UnityEngine;
using TMPro;
using WindowsInput.Native;
public class DropdownPopulateList : MonoBehaviour
{
TMP_Dropdown Dropdown;
public CEnum.listType ListType = CEnum.listType.VirtualKeyCode;
[ExecuteAlways]
void Awake()
{
Dropdown = GetComponent<TMP_Dropdown>();
PopulateList();
}
void PopulateList()
{
Dropdown.ClearOptions();
List<string> keyNames = new List<string>();
switch (ListType)
{
case CEnum.listType.VirtualKeyCode:
keyNames = Enum.GetNames(typeof(VirtualKeyCode)).ToList();
break;
case CEnum.listType.captureMode:
keyNames = Enum.GetNames(typeof(CEnum.captureMode)).ToList();
break;
case CEnum.listType.spectatorMode:
keyNames = Enum.GetNames(typeof(CEnum.spectatorMode)).ToList();
break;
case CEnum.listType.FPS:
keyNames = Enum.GetNames(typeof(CEnum.FPS)).ToList();
break;
case CEnum.listType.handStabilization:
keyNames = Enum.GetNames(typeof(CEnum.handStabilization)).ToList();
break;
}
Dropdown.AddOptions(keyNames);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1819584be400c834aae945d75e5d0b92
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,22 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using TMPro;
using WindowsInput.Native;
public class KeyDropdownManager : MonoBehaviour
{
TMP_Dropdown Dropdown;
void Awake()
{
Dropdown = GetComponent<TMP_Dropdown>();
PopulateList();
}
void PopulateList()
{
string[] enumNames = Enum.GetNames(typeof(VirtualKeyCode));
List<string> keyNames = new List<string>(enumNames);
Dropdown.AddOptions(keyNames);
}
}

View File

@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.IO.MemoryMappedFiles;
using System.Security.Principal;
using UnityEngine.UI;
using UnityEngine;
public class LightManager : MonoBehaviour
@ -19,9 +18,12 @@ public class LightManager : MonoBehaviour
private void Start()
{
ConfigManager.EnsureInitialization();
ConfigManager.onConfigChanged += UpdateConfig;
UpdateConfig();
var widget = ConfigManager.GetConfigPanelWidget("UseIPCLighting");
var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener((value) => {
useIPCLighting = value;
});
toggle.onValueChanged.Invoke(useIPCLighting);
for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material);
@ -53,10 +55,6 @@ public class LightManager : MonoBehaviour
isIPCIdle = true;
}
}
void UpdateConfig()
{
useIPCLighting = ConfigManager.config.useIPCLighting;
}
private void CheckIPCState()
{
if (RGBColor2D.GetPixel(0 , 0).a == 1)

View File

@ -5,6 +5,7 @@ using System.Threading;
using System.IO.Ports;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class TouchManager : MonoBehaviour
{
const byte CMD_GET_SYNC_BOARD_VER = 0xa0;
@ -37,9 +38,16 @@ public class TouchManager : MonoBehaviour
static byte[] TouchPackR = new byte[36];
static bool[] TouchPackAll = new bool[240];
bool StartUp = false;
static bool useIPCTouch = true;
void Start()
{
ConfigManager.EnsureInitialization();
var widget = ConfigManager.GetConfigPanelWidget("UseIPCTouch");
var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener((value) => {
useIPCTouch = value;
});
toggle.onValueChanged.Invoke(useIPCTouch);
try
{
ComL.Open();
@ -247,7 +255,7 @@ public class TouchManager : MonoBehaviour
Area += Area / 5 * 3 + 7;
ByteHelper.SetBit(TouchPackL, Area, State);
}
if (ConfigManager.config.useIPCTouch)
if (useIPCTouch)
IPCManager.SetTouchData(TouchPackAll); //send touch data to IPC
}
}

View File

@ -20,8 +20,8 @@ MonoBehaviour:
m_OverrideState: 1
m_Value: 1
scatter:
m_OverrideState: 1
m_Value: 1
m_OverrideState: 0
m_Value: 0.7
clamp:
m_OverrideState: 0
m_Value: 65472
@ -62,7 +62,7 @@ MonoBehaviour:
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.134
m_Value: 0.25
smoothness:
m_OverrideState: 1
m_Value: 0.4
@ -82,5 +82,22 @@ MonoBehaviour:
m_Name: Post-Process
m_EditorClassIdentifier:
components:
- {fileID: 849379129802519247}
- {fileID: -7893295128165547882}
- {fileID: -7011558710299706105}
--- !u!114 &849379129802519247
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
m_Name: Tonemapping
m_EditorClassIdentifier:
active: 1
mode:
m_OverrideState: 1
m_Value: 1

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 49ff217759b281644a632cb50497dc62
guid: a6560a915ef98420e9faacc1c7438823
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

View File

@ -1,123 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7893295128165547882
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
m_Name: Bloom
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
threshold:
m_OverrideState: 1
m_Value: 1
min: 0
intensity:
m_OverrideState: 1
m_Value: 1
min: 0
scatter:
m_OverrideState: 0
m_Value: 0.7
min: 0
max: 1
clamp:
m_OverrideState: 0
m_Value: 65472
min: 0
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
highQualityFiltering:
m_OverrideState: 0
m_Value: 0
skipIterations:
m_OverrideState: 0
m_Value: 1
min: 0
max: 16
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dirtIntensity:
m_OverrideState: 0
m_Value: 0
min: 0
--- !u!114 &-7011558710299706105
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
m_Name: Vignette
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
color:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
center:
m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.25
min: 0
max: 1
smoothness:
m_OverrideState: 1
m_Value: 0.4
min: 0.01
max: 1
rounded:
m_OverrideState: 0
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: SampleSceneProfile
m_EditorClassIdentifier:
components:
- {fileID: 849379129802519247}
- {fileID: -7893295128165547882}
- {fileID: -7011558710299706105}
--- !u!114 &849379129802519247
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
m_Name: Tonemapping
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
mode:
m_OverrideState: 1
m_Value: 1

View File

@ -263,7 +263,7 @@ MonoBehaviour:
nameUi: Mock Runtime
version: 0.0.2
featureIdInternal: com.unity.openxr.feature.mockruntime
openxrExtensionStrings: XR_UNITY_null_gfx
openxrExtensionStrings: XR_UNITY_null_gfx XR_UNITY_android_present
company: Unity
priority: 0
required: 0

View File

@ -12,7 +12,7 @@
"com.unity.ugui": "1.0.0",
"com.unity.xr.interaction.toolkit": "2.1.1",
"com.unity.xr.management": "4.2.1",
"com.unity.xr.openxr": "1.4.2",
"com.unity.xr.openxr": "1.5.3",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",

View File

@ -57,7 +57,7 @@
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.4.2",
"version": "1.4.3",
"depth": 1,
"source": "registry",
"dependencies": {
@ -202,13 +202,13 @@
"url": "https://packages.unity.com"
},
"com.unity.xr.openxr": {
"version": "1.4.2",
"version": "1.5.3",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.xr.management": "4.0.1",
"com.unity.xr.legacyinputhelpers": "2.1.2",
"com.unity.inputsystem": "1.3.0"
"com.unity.inputsystem": "1.4.2"
},
"url": "https://packages.unity.com"
},

View File

@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.11f1
m_EditorVersionWithRevision: 2021.3.11f1 (0a5ca18544bf)
m_EditorVersion: 2021.3.12f1
m_EditorVersionWithRevision: 2021.3.12f1 (8af3c3e441b1)