Commit 344bae0e authored by SherryChaos's avatar SherryChaos

new deck share function

parent b6acd2b1
......@@ -6610,7 +6610,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -399.99988, y: 0}
m_AnchoredPosition: {x: -399.99994, y: 0}
m_SizeDelta: {x: -1350, y: 80}
m_Pivot: {x: 1, y: 0}
--- !u!114 &129642814
......@@ -7533,7 +7533,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: -490.00037, y: 0}
m_AnchoredPosition: {x: -490.00043, y: 0}
m_SizeDelta: {x: 490, y: 2000}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &153416284
......@@ -9897,7 +9897,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -95}
m_AnchoredPosition: {x: 0, y: -94.99997}
m_SizeDelta: {x: 790, y: -190}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &204678201
......@@ -14754,8 +14754,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1225, y: -34}
m_SizeDelta: {x: 180, y: 62}
m_AnchoredPosition: {x: 1170, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &294388333
MonoBehaviour:
......@@ -15059,7 +15059,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1581995138}
m_Direction: 2
m_Value: 0
m_Size: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -17255,7 +17255,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -399.99988, y: 300}
m_AnchoredPosition: {x: -399.99994, y: 300}
m_SizeDelta: {x: -1350, y: 80}
m_Pivot: {x: 1, y: 0}
--- !u!114 &365844423
......@@ -18424,7 +18424,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 931169952}
m_Direction: 2
m_Value: 0
m_Size: 0.6103896
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -26549,6 +26549,7 @@ MonoBehaviour:
- {fileID: 294388338}
- {fileID: 2138188175}
- {fileID: 1822864211}
- {fileID: 1599650669}
- {fileID: 717080758}
--- !u!1 &531886761
GameObject:
......@@ -30931,6 +30932,7 @@ RectTransform:
- {fileID: 1561439605}
- {fileID: 294388332}
- {fileID: 2138188169}
- {fileID: 1599650668}
- {fileID: 1822864205}
- {fileID: 717080757}
m_Father: {fileID: 531693330}
......@@ -34002,7 +34004,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &702608002
......@@ -34449,12 +34451,12 @@ RectTransform:
m_Children:
- {fileID: 1330121968}
m_Father: {fileID: 618154539}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1225, y: -34}
m_SizeDelta: {x: 580, y: 62}
m_AnchoredPosition: {x: 1170, y: -34}
m_SizeDelta: {x: 700, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &717080758
MonoBehaviour:
......@@ -35897,7 +35899,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -419.99988, y: -60}
m_AnchoredPosition: {x: -419.99994, y: -60}
m_SizeDelta: {x: 400, y: 760}
m_Pivot: {x: 0, y: 1}
--- !u!114 &736958434
......@@ -37252,7 +37254,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 476827028}
m_Direction: 2
m_Value: 1
m_Size: 0.62626565
m_Size: 0.62616915
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -47205,8 +47207,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 825, y: -34}
m_SizeDelta: {x: 180, y: 62}
m_AnchoredPosition: {x: 810, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &970736159
MonoBehaviour:
......@@ -53275,7 +53277,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1117266860
......@@ -65541,6 +65543,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1369834985}
m_CullTransparentMesh: 1
--- !u!1 &1370259933
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1370259934}
- component: {fileID: 1370259936}
- component: {fileID: 1370259935}
m_Layer: 5
m_Name: '#Text'
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1370259934
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1370259933}
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_Children: []
m_Father: {fileID: 1599650668}
m_RootOrder: 0
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: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1370259935
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1370259933}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 3
m_MaxSize: 30
m_Alignment: 4
m_AlignByGeometry: 1
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u5206\u4EAB"
--- !u!222 &1370259936
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1370259933}
m_CullTransparentMesh: 1
--- !u!1 &1371617108
GameObject:
m_ObjectHideFlags: 0
......@@ -65730,7 +65811,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -399.99988, y: 150}
m_AnchoredPosition: {x: -399.99994, y: 150}
m_SizeDelta: {x: -1350, y: 80}
m_Pivot: {x: 1, y: 0}
--- !u!114 &1374530642
......@@ -69042,7 +69123,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 761159127}
m_Direction: 2
m_Value: 0
m_Size: 0.6629212
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -72587,7 +72668,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 2083794100}
m_Direction: 2
m_Value: 0
m_Size: 0.55882347
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -75982,8 +76063,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1025, y: -34}
m_SizeDelta: {x: 180, y: 62}
m_AnchoredPosition: {x: 990, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1561439606
MonoBehaviour:
......@@ -77854,6 +77935,188 @@ MonoBehaviour:
iconOnColor: {r: 0, g: 0, b: 0, a: 1}
textOffColor: {r: 0, g: 0, b: 0, a: 0}
textOnColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!1 &1599650667
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1599650668}
- component: {fileID: 1599650674}
- component: {fileID: 1599650673}
- component: {fileID: 1599650672}
- component: {fileID: 1599650671}
- component: {fileID: 1599650670}
- component: {fileID: 1599650669}
m_Layer: 5
m_Name: Button Share
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1599650668
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
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_Children:
- {fileID: 1370259934}
m_Father: {fileID: 618154539}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1530, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1599650669
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d45bbefa568ea23d9ad54b33ccf4780f, type: 3}
m_Name:
m_EditorClassIdentifier:
label: ButtonDeckShare
--- !u!114 &1599650670
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c48b628189305e649b63ee28987f282f, type: 3}
m_Name:
m_EditorClassIdentifier:
previewClip: {fileID: 0}
enterAudio:
clickAudio: SE_MENU_SELECT_01
exitAudio:
audioType: 0
--- !u!114 &1599650671
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e0fb4b52f774bc84b91e8b296e15849a, type: 3}
m_Name:
m_EditorClassIdentifier:
icon: {fileID: 0}
text: {fileID: 1370259935}
pressColor: 0.5
disableColor: 0.5
--- !u!114 &1599650672
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 2
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: 21300000, guid: 949af5211945ac243b5fd11c8405bc0d, type: 3}
m_PressedSprite: {fileID: 21300000, guid: 949af5211945ac243b5fd11c8405bc0d, type: 3}
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: 1599650673}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 531693331}
m_TargetAssemblyTypeName: MDPro3.EditDeck, Assembly-CSharp
m_MethodName: OnShare
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1599650673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
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: 21300000, guid: 59a03203e2994a74b91d9b4d3e389016, type: 3}
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.5
--- !u!222 &1599650674
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599650667}
m_CullTransparentMesh: 1
--- !u!1 &1600984489
GameObject:
m_ObjectHideFlags: 0
......@@ -88245,7 +88508,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -399.99988, y: -150}
m_AnchoredPosition: {x: -399.99994, y: -150}
m_SizeDelta: {x: -1350, y: 80}
m_Pivot: {x: 1, y: 0}
--- !u!114 &1800729521
......@@ -89800,12 +90063,12 @@ RectTransform:
m_Children:
- {fileID: 686026289}
m_Father: {fileID: 618154539}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1625, y: -34}
m_SizeDelta: {x: 180, y: 62}
m_AnchoredPosition: {x: 1710, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1822864206
MonoBehaviour:
......@@ -104327,8 +104590,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1425, y: -34}
m_SizeDelta: {x: 180, y: 62}
m_AnchoredPosition: {x: 1350, y: -34}
m_SizeDelta: {x: 160, y: 62}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2138188170
MonoBehaviour:
......@@ -14,6 +14,7 @@ using MDPro3.YGOSharp;
using MDPro3.YGOSharp.OCGWrapper.Enums;
using MDPro3.UI;
using Toggle = MDPro3.UI.Toggle;
using UnityEngine.Android;
namespace MDPro3
{
......@@ -532,22 +533,24 @@ namespace MDPro3
listWidth = uiWidth - (outerWidth * 2 + descriptionWidth + innerWidth * 2 + tableWidth);
manager.GetElement<RectTransform>("List").sizeDelta = new Vector2(listWidth, 840);
var startX = 825f;
var startX = 810f;
var space = 20f;
var fullWidth = uiWidth - startX - 100 - space * 4;
var buttonWidth = fullWidth / 5;
var fullWidth = uiWidth - startX - 30 - space * 5;
var buttonWidth = fullWidth / 6;
manager.GetElement<RectTransform>("ButtonDeckReset").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonDeckSort").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonDeckRandom").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonDeckCopy").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonDeckShare").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonDeckSave").sizeDelta = new Vector2(buttonWidth, 62);
manager.GetElement<RectTransform>("ButtonChangeSide").sizeDelta = new Vector2(buttonWidth * 3 + space * 2, 62);
manager.GetElement<RectTransform>("ButtonChangeSide").sizeDelta = new Vector2(buttonWidth * 4 + space * 3, 62);
manager.GetElement<RectTransform>("ButtonDeckReset").anchoredPosition = new Vector2(startX, -34);
manager.GetElement<RectTransform>("ButtonDeckSort").anchoredPosition = new Vector2(startX + buttonWidth + space, -34);
manager.GetElement<RectTransform>("ButtonDeckRandom").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 2, -34);
manager.GetElement<RectTransform>("ButtonDeckCopy").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 3, -34);
manager.GetElement<RectTransform>("ButtonDeckSave").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 4, -34);
manager.GetElement<RectTransform>("ButtonDeckShare").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 4, -34);
manager.GetElement<RectTransform>("ButtonDeckSave").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 5, -34);
manager.GetElement<RectTransform>("ButtonChangeSide").anchoredPosition = new Vector2(startX + (buttonWidth + space) * 2, -34);
foreach (var card in cards)
......@@ -1014,6 +1017,20 @@ namespace MDPro3
deckName += " - " + InterString.Get("复制");
input.text = deckName;
}
public void OnShare()
{
if(dirty || !File.Exists("Deck/" + deckName + ".ydk"))
{
MessageManager.Cast(InterString.Get("请先保存卡组。"));
return;
}
#if UNITY_ANDROID && !UNITY_EDITOR
new NativeShare().SetText(File.ReadAllText("Deck/" + deckName + ".ydk")).Share();
#else
Tools.TryOpenInFileExplorer(Path.GetFullPath("Deck/" + deckName + ".ydk"));
#endif
}
public void OnSave()
{
if (manager.GetElement<Text>("TextBanlist").text != "N/A")
......
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
......@@ -174,5 +175,18 @@ namespace MDPro3
result[i] = result[i].Replace("\"", "");
return result.ToArray();
}
public static void TryOpenInFileExplorer(string path)
{
try
{
string argument = $"/select, \"{path}\"";
Process.Start(new ProcessStartInfo("explorer.exe", argument));
}
catch (Exception ex)
{
MessageManager.Cast($"Failed to open file explorer: {ex.Message}");
}
}
}
}
......@@ -14,6 +14,7 @@
"com.unity.timeline": "1.4.8",
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.6",
"com.unity.ugui": "1.0.0",
"com.yasirkula.nativeshare": "https://github.com/yasirkula/UnityNativeShare.git",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
......
......@@ -195,6 +195,13 @@
"com.unity.modules.imgui": "1.0.0"
}
},
"com.yasirkula.nativeshare": {
"version": "https://github.com/yasirkula/UnityNativeShare.git",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "99559c82d9ef7fa2e2c588b91b1995f117f754b2"
},
"com.unity.modules.ai": {
"version": "1.0.0",
"depth": 0,
......
......@@ -134,8 +134,9 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.0.1
preloadedAssets: []
bundleVersion: 1.0.2
preloadedAssets:
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment