1
0
mirror of synced 2024-11-27 23:50:50 +01:00

Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Yasu3D 2022-11-08 05:22:13 +01:00
commit 67f96f02e5
17 changed files with 3772 additions and 2921 deletions

View File

@ -105,8 +105,9 @@ Material:
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _AlphaClip: 0 - _AlphaClip: 0
- _Alpha_Contrast: 2.5 - _Alpha_Brightness: 0.5
- _Alpha_Multiplier: 3 - _Alpha_Contrast: 0.9
- _Alpha_Multiplier: 7.5
- _Blend: 0 - _Blend: 0
- _BumpScale: 1 - _BumpScale: 1
- _ClearCoatMask: 0 - _ClearCoatMask: 0

View File

@ -23,6 +23,9 @@
}, },
{ {
"m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09" "m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09"
},
{
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
} }
], ],
"m_Keywords": [], "m_Keywords": [],
@ -116,6 +119,12 @@
}, },
{ {
"m_Id": "2f2e1ff57ed84414b6ffae2d80b8229d" "m_Id": "2f2e1ff57ed84414b6ffae2d80b8229d"
},
{
"m_Id": "bb8e9a9c5d98492a8c7e8f571b2d5507"
},
{
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
} }
], ],
"m_GroupDatas": [], "m_GroupDatas": [],
@ -345,6 +354,20 @@
"m_SlotId": 1 "m_SlotId": 1
} }
}, },
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "41e6c78a7ed64dfb8bc26dcf4b486bb9"
},
"m_SlotId": 0
}
},
{ {
"m_OutputSlot": { "m_OutputSlot": {
"m_Node": { "m_Node": {
@ -359,6 +382,20 @@
"m_SlotId": 1 "m_SlotId": 1
} }
}, },
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "bb8e9a9c5d98492a8c7e8f571b2d5507"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
},
"m_SlotId": 1
}
},
{ {
"m_OutputSlot": { "m_OutputSlot": {
"m_Node": { "m_Node": {
@ -368,7 +405,7 @@
}, },
"m_InputSlot": { "m_InputSlot": {
"m_Node": { "m_Node": {
"m_Id": "41e6c78a7ed64dfb8bc26dcf4b486bb9" "m_Id": "b2aecaa072904a07b2ee471f35abcc05"
}, },
"m_SlotId": 0 "m_SlotId": 0
} }
@ -920,6 +957,9 @@
{ {
"m_Id": "fbbb6cbccd3240ee93b203f186d8bbe2" "m_Id": "fbbb6cbccd3240ee93b203f186d8bbe2"
}, },
{
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
},
{ {
"m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09" "m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09"
}, },
@ -1040,10 +1080,10 @@
"m_Expanded": true, "m_Expanded": true,
"m_Position": { "m_Position": {
"serializedVersion": "2", "serializedVersion": "2",
"x": -1000.0, "x": -772.800048828125,
"y": 455.0, "y": 598.4000244140625,
"width": 166.00006103515626, "width": 208.00006103515626,
"height": 118.00006103515625 "height": 301.5999755859375
} }
}, },
"m_Slots": [ "m_Slots": [
@ -1059,7 +1099,7 @@
], ],
"synonyms": [], "synonyms": [],
"m_Precision": 0, "m_Precision": 0,
"m_PreviewExpanded": false, "m_PreviewExpanded": true,
"m_PreviewMode": 0, "m_PreviewMode": 0,
"m_CustomColors": { "m_CustomColors": {
"m_SerializableColors": [] "m_SerializableColors": []
@ -1090,6 +1130,30 @@
} }
} }
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "43866a2d617a40ae99084a6a42bf61ae",
"m_Id": 2,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{ {
"m_SGVersion": 0, "m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
@ -1137,7 +1201,7 @@
"m_FloatType": 1, "m_FloatType": 1,
"m_RangeValues": { "m_RangeValues": {
"x": 0.0, "x": 0.0,
"y": 4.0 "y": 15.0
} }
} }
@ -1658,6 +1722,21 @@
"m_BareResource": false "m_BareResource": false
} }
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "721eada0fdb94f6398db4e78803a98c1",
"m_Id": 0,
"m_DisplayName": "Alpha Brightness",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{ {
"m_SGVersion": 0, "m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@ -2049,6 +2128,33 @@
"m_SerializedDescriptor": "SurfaceDescription.NormalTS" "m_SerializedDescriptor": "SurfaceDescription.NormalTS"
} }
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "8491e4dac7524b18a4bd44dd7705b6f7",
"m_Guid": {
"m_GuidSerialized": "a4179661-b119-48b5-9f12-d6c402eec235"
},
"m_Name": "Alpha Brightness",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Alpha Brightness",
"m_DefaultReferenceName": "_Alpha_Brightness",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 1,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{ {
"m_SGVersion": 0, "m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
@ -2507,10 +2613,10 @@
"m_Expanded": true, "m_Expanded": true,
"m_Position": { "m_Position": {
"serializedVersion": "2", "serializedVersion": "2",
"x": -1401.0, "x": -1401.5999755859375,
"y": 761.0, "y": 764.0,
"width": 156.0, "width": 156.0,
"height": 34.0 "height": 33.5999755859375
} }
}, },
"m_Slots": [ "m_Slots": [
@ -2530,6 +2636,73 @@
} }
} }
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "b0d17648b763413f8aeee92672eb4ef0",
"m_Id": 1,
"m_DisplayName": "B",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "B",
"m_StageCapability": 3,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubtractNode",
"m_ObjectId": "b2aecaa072904a07b2ee471f35abcc05",
"m_Group": {
"m_Id": ""
},
"m_Name": "Subtract",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1005.6000366210938,
"y": 540.0,
"width": 207.99993896484376,
"height": 301.60003662109377
}
},
"m_Slots": [
{
"m_Id": "d6c85ddf50744992947b2c7e713fb8ed"
},
{
"m_Id": "b0d17648b763413f8aeee92672eb4ef0"
},
{
"m_Id": "43866a2d617a40ae99084a6a42bf61ae"
}
],
"synonyms": [
"subtraction",
"remove",
"minus",
"take away"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{ {
"m_SGVersion": 0, "m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode", "m_Type": "UnityEditor.ShaderGraph.BlockNode",
@ -2575,10 +2748,10 @@
"m_Expanded": true, "m_Expanded": true,
"m_Position": { "m_Position": {
"serializedVersion": "2", "serializedVersion": "2",
"x": -657.0, "x": -519.9998779296875,
"y": 471.0, "y": 573.5999755859375,
"width": 130.0, "width": 129.59994506835938,
"height": 118.0 "height": 117.60003662109375
} }
}, },
"m_Slots": [ "m_Slots": [
@ -2629,6 +2802,41 @@
} }
} }
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "bb8e9a9c5d98492a8c7e8f571b2d5507",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1195.1998291015625,
"y": 661.5999755859375,
"width": 164.0,
"height": 33.60003662109375
}
},
"m_Slots": [
{
"m_Id": "721eada0fdb94f6398db4e78803a98c1"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
}
}
{ {
"m_SGVersion": 1, "m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
@ -2733,6 +2941,30 @@
"m_Labels": [] "m_Labels": []
} }
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "d6c85ddf50744992947b2c7e713fb8ed",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"m_StageCapability": 3,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{ {
"m_SGVersion": 0, "m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
@ -3096,7 +3328,7 @@
"m_FloatType": 1, "m_FloatType": 1,
"m_RangeValues": { "m_RangeValues": {
"x": 0.0, "x": 0.0,
"y": 4.0 "y": 5.0
} }
} }

View File

@ -996,7 +996,7 @@
"m_StageCapability": 3, "m_StageCapability": 3,
"m_Value": { "m_Value": {
"x": 0.0, "x": 0.0,
"y": 0.3499999940395355 "y": 0.30000001192092898
}, },
"m_DefaultValue": { "m_DefaultValue": {
"x": 0.0, "x": 0.0,
@ -1603,10 +1603,10 @@
"m_Expanded": true, "m_Expanded": true,
"m_Position": { "m_Position": {
"serializedVersion": "2", "serializedVersion": "2",
"x": 708.5999755859375, "x": 600.0,
"y": 786.4000244140625, "y": 997.5999755859375,
"width": 0.0, "width": 167.199951171875,
"height": 0.0 "height": 33.5999755859375
} }
}, },
"m_Slots": [ "m_Slots": [

View File

@ -25,8 +25,8 @@ Material:
type: 3} type: 3}
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 6 m_LightmapFlags: 0
m_EnableInstancingVariants: 1 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
@ -128,7 +128,7 @@ Material:
- _Surface: 0 - _Surface: 0
- _UVSec: 0 - _UVSec: 0
- _Vignett: 0.8 - _Vignett: 0.8
- _VignettHardness: -0.15 - _VignettHardness: 0
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:

View File

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

Binary file not shown.

View File

@ -0,0 +1,106 @@
fileFormatVersion: 2
guid: b0a9d478c50f0c74891d9a527746f25a
ModelImporter:
serializedVersion: 21300
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 1
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -21,29 +21,34 @@ public class CaptureSettingManager : MonoBehaviour
var desktopIndexDropdown = desktopIndexWidget.GetComponent<TMP_Dropdown>(); var desktopIndexDropdown = desktopIndexWidget.GetComponent<TMP_Dropdown>();
modeDropdown.onValueChanged.AddListener((int value) => { modeDropdown.onValueChanged.AddListener((int value) => {
windowTexture.captureMode = (CaptureMode)Enum.GetValues(typeof(CaptureMode)).GetValue(value) - 1; windowTexture.captureMode = (CaptureMode)value - 1;
Debug.Log("CaptureFPS: " + windowTexture.captureMode);
}); });
fpsDropdown.onValueChanged.AddListener((int value) => { fpsDropdown.onValueChanged.AddListener((int value) => {
var fps = Enum.GetName(typeof(CEnum.FPS), value); var fps = Enum.GetName(typeof(CEnum.FPS), value);
windowTexture.captureFrameRate = int.Parse(fps.Remove(0, 3)); windowTexture.captureFrameRate = int.Parse(fps.Remove(0, 3));
Debug.Log("CaptureFPS: " + windowTexture.captureFrameRate);
}); });
desktopToggle.onValueChanged.AddListener((bool value) => { desktopToggle.onValueChanged.AddListener((bool value) => {
if (value) if (value)
{ {
windowTexture.type = WindowTextureType.Desktop; windowTexture.type = WindowTextureType.Desktop;
desktopIndexDropdown.interactable = true; desktopIndexDropdown.interactable = true;
} }
else else
{ {
windowTexture.type = WindowTextureType.Desktop; windowTexture.type = WindowTextureType.Window;
desktopIndexDropdown.interactable = false; desktopIndexDropdown.interactable = false;
} }
Debug.Log("CaptureTarget: " + windowTexture.type);
}); });
desktopIndexDropdown.onValueChanged.AddListener((int value) => { desktopIndexDropdown.onValueChanged.AddListener((int value) => {
windowTexture.desktopIndex = value; windowTexture.desktopIndex = value;
Debug.Log("DesktopIndex: " + windowTexture.desktopIndex);
}); });
modeDropdown.onValueChanged?.Invoke(modeDropdown.value); modeDropdown.onValueChanged?.Invoke(modeDropdown.value);
fpsDropdown.onValueChanged?.Invoke(fpsDropdown.value); fpsDropdown.onValueChanged?.Invoke(fpsDropdown.value);

View File

@ -23,13 +23,12 @@ public class Config
public float HapticDuration = 0.1f; public float HapticDuration = 0.1f;
public float HapticAmplitude = 0.75f; public float HapticAmplitude = 0.75f;
public int TouchSampleRate = 3; public int TouchSampleRate = 3;
public int HandTrackingMode = 0; public int HandTrackingMode = 1;
public float Threshold = 0.3f; public float Threshold = 0.3f;
public float HandStabilVelocity = 0.3f; public bool TouchPanelAirWall = false;
public float HandStabilDistance = 0.1f;
public float HandStabilSmooth = 0.1f;
public bool UseIPCLighting = true; public bool UseIPCLighting = true;
public bool UseIPCTouch = true; public bool UseIPCTouch = true;
public float LightStrength = 1.35f;
public int TestKeyBind = 40; public int TestKeyBind = 40;
public int ServiceKeyBind = 41; public int ServiceKeyBind = 41;
public int CoinKeyBind = 31; public int CoinKeyBind = 31;

View File

@ -127,30 +127,30 @@ public class ConfigManager : MonoBehaviour
{ {
var dropdown = widget.GetComponent<TMP_Dropdown>(); var dropdown = widget.GetComponent<TMP_Dropdown>();
// add listener to dropdown to update config by key name // add listener to dropdown to update config by key name
dropdown.onValueChanged.AddListener(delegate dropdown.onValueChanged.AddListener((int value) =>
{ {
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName); var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, dropdown.value); field.SetValue(config, value);
onConfigChanged?.Invoke(); onConfigChanged?.Invoke();
}); });
} }
else if (widget.GetComponent<Toggle>() != null) else if (widget.GetComponent<Toggle>() != null)
{ {
var toggle = widget.GetComponent<Toggle>(); var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener(delegate toggle.onValueChanged.AddListener((bool value) =>
{ {
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName); var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, toggle.isOn); field.SetValue(config, value);
onConfigChanged?.Invoke(); onConfigChanged?.Invoke();
}); });
} }
else if (widget.GetComponent<Slider>() != null) else if (widget.GetComponent<Slider>() != null)
{ {
var slider = widget.GetComponent<Slider>(); var slider = widget.GetComponent<Slider>();
slider.onValueChanged.AddListener(delegate slider.onValueChanged.AddListener((float value) =>
{ {
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName); var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, slider.value); field.SetValue(config, value);
onConfigChanged?.Invoke(); onConfigChanged?.Invoke();
}); });
} }

View File

@ -0,0 +1,12 @@
## How to add configuration widget
- First, you will find the widget prefab in the ``/Asset/Prefab`` folder.
- Add any type of widget to the Config Canvans. Just follow other widgets' placement.
- You can also duplicate the existing widget.
- Rename the widget. This is very important because everything is based on the widget's name. You can have space in your widget's name but it will automatically be removed in the script. The space is for visual only since JSON does not support key names with space.
- Then you can use unity's ``onvalueChanged`` function in the inspector to control your function or make your own script.
- For scrip, pls check the ``CaptureSettingManager.cs``, you need to copy and paste the StartUp content and modify it with your need.
- First use ``var someWidget = ConfigManager.GetConfigPanelWidget("WidgetNameWithOutSpace");`` to get Widget
- Then use ``var someDropdown = someWidget.GetComponent<TMP_Dropdown>();`` to get the ui component.
- Then you can use ``someDropdown.onValueChanged.AddListener( (int value) => {var somethingYouWantToDoWith = value} );`` to add something you want to execute when the config is updated.
- Now you need to add the widget name to Config.cs file. This file is the default config. (This step will not be necessary in the future)

View File

@ -25,7 +25,7 @@ public class HandFollowManager : MonoBehaviour
var threshSlider = threshWidget.GetComponent<Slider>(); var threshSlider = threshWidget.GetComponent<Slider>();
modeDropdown.onValueChanged.AddListener((int value) => { modeDropdown.onValueChanged.AddListener((int value) => {
VelocityThreshold = ConfigManager.config.HandStabilVelocity; VelocityThreshold = ConfigManager.config.Threshold;
Mode = (CEnum.handStabilization)value; Mode = (CEnum.handStabilization)value;
switch (Mode) switch (Mode)
{ {

View File

@ -18,16 +18,27 @@ public class LightManager : MonoBehaviour
private void Start() private void Start()
{ {
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++) for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material); Materials.Add(Lights[i].GetComponent<Renderer>().material);
var lightWidget = ConfigManager.GetConfigPanelWidget("UseIPCLighting");
var strengthWidgent = ConfigManager.GetConfigPanelWidget("LightStrength");
var lightToggle = lightWidget.GetComponent<Toggle>();
var strengthSlider = strengthWidgent.GetComponent<Slider>();
lightToggle.onValueChanged.AddListener((bool value) => {
useIPCLighting = value;
});
strengthSlider.onValueChanged.AddListener((float value) => {
for (int i = 0; i < Materials.Count; i++)
Materials[i].SetFloat("_EmissionStrength", value);
});
lightToggle.onValueChanged.Invoke(useIPCLighting);
strengthSlider.onValueChanged.Invoke(strengthSlider.value);
if (useIPCLighting) if (useIPCLighting)
{ {
RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false); RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false);

View File

@ -15,7 +15,7 @@ public class ColliderToTouch : MonoBehaviour
{ {
Area = Convert.ToInt32(gameObject.name); Area = Convert.ToInt32(gameObject.name);
} }
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider collider)
{ {
_insideColliderCount += 1; _insideColliderCount += 1;
TouchManager.SetTouch(Area, true); TouchManager.SetTouch(Area, true);
@ -23,7 +23,7 @@ public class ColliderToTouch : MonoBehaviour
LightManager.UpdateFadeLight(Area, true); LightManager.UpdateFadeLight(Area, true);
} }
private void OnTriggerExit(Collider other) private void OnTriggerExit(Collider collider)
{ {
_insideColliderCount -= 1; _insideColliderCount -= 1;
_insideColliderCount = Mathf.Max(0, _insideColliderCount); _insideColliderCount = Mathf.Max(0, _insideColliderCount);

View File

@ -21,7 +21,7 @@ QualitySettings:
skinWeights: 2 skinWeights: 2
textureQuality: 0 textureQuality: 0
anisotropicTextures: 1 anisotropicTextures: 1
antiAliasing: 2 antiAliasing: 0
softParticles: 0 softParticles: 0
softVegetation: 0 softVegetation: 0
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1