Skip to content

Commit 2587569

Browse files
committed
feat: Notify user that Ecommerce won't work in the Editor
Some features of the plugin, such as the Ecommerce interface, require the use of the Social Overlay. If the Social Overlay isn't available, it won't work. This aims to cover exactly one scenario: the Unity Editor. If UNITY_EDITOR is defined, `DisabledInEditorWarningPanel` will enable a game object. That game object may contain text that explains the error. There is no standardized warning panel prefab, and should be used as-needed. #EOS-2130
1 parent cce606f commit 2587569

File tree

3 files changed

+309
-2
lines changed

3 files changed

+309
-2
lines changed

Assets/Prefab/storeUI.prefab

Lines changed: 247 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ RectTransform:
2727
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
2828
m_LocalPosition: {x: 0, y: 0, z: 0}
2929
m_LocalScale: {x: 1, y: 1, z: 1}
30+
m_ConstrainProportionsScale: 0
3031
m_Children:
3132
- {fileID: 1482626942630675680}
3233
- {fileID: 1482626942316438264}
3334
- {fileID: 1482626941296793831}
3435
- {fileID: 1482626942705128076}
3536
- {fileID: 1482626941700709650}
37+
- {fileID: 1468356738485475707}
3638
m_Father: {fileID: 0}
3739
m_RootOrder: 0
3840
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -53,13 +55,13 @@ MonoBehaviour:
5355
m_Script: {fileID: 11500000, guid: 9939d6613a9656d4494c6292bd547d14, type: 3}
5456
m_Name:
5557
m_EditorClassIdentifier:
56-
StoreUIParent: {fileID: 1482626941293486413}
58+
UIFirstSelected: {fileID: 1482626942630675681}
59+
UIParent: {fileID: 0}
5760
queryOffersButton: {fileID: 1482626942630675687}
5861
catalogueItem0: {fileID: 1482626942316438271}
5962
checkOutButton0: {fileID: 1482626941296793830}
6063
catalogueItem1: {fileID: 1482626942705128067}
6164
checkOutButton1: {fileID: 1482626941700709649}
62-
UIFirstSelected: {fileID: 1482626942630675681}
6365
--- !u!1 &1482626941296793824
6466
GameObject:
6567
m_ObjectHideFlags: 0
@@ -89,6 +91,7 @@ RectTransform:
8991
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
9092
m_LocalPosition: {x: 0, y: 0, z: 0}
9193
m_LocalScale: {x: 1, y: 1, z: 1}
94+
m_ConstrainProportionsScale: 0
9295
m_Children:
9396
- {fileID: 1482626942457547241}
9497
m_Father: {fileID: 1482626941293486412}
@@ -151,6 +154,7 @@ MonoBehaviour:
151154
m_EditorClassIdentifier:
152155
m_Navigation:
153156
m_Mode: 3
157+
m_WrapAround: 0
154158
m_SelectOnUp: {fileID: 0}
155159
m_SelectOnDown: {fileID: 0}
156160
m_SelectOnLeft: {fileID: 0}
@@ -220,6 +224,7 @@ RectTransform:
220224
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
221225
m_LocalPosition: {x: 0, y: 0, z: 0}
222226
m_LocalScale: {x: 1, y: 1, z: 1}
227+
m_ConstrainProportionsScale: 0
223228
m_Children: []
224229
m_Father: {fileID: 1482626941700709650}
225230
m_RootOrder: 0
@@ -300,6 +305,7 @@ RectTransform:
300305
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
301306
m_LocalPosition: {x: 0, y: 0, z: 0}
302307
m_LocalScale: {x: 1, y: 1, z: 1}
308+
m_ConstrainProportionsScale: 0
303309
m_Children:
304310
- {fileID: 1482626941654172854}
305311
m_Father: {fileID: 1482626941293486412}
@@ -362,6 +368,7 @@ MonoBehaviour:
362368
m_EditorClassIdentifier:
363369
m_Navigation:
364370
m_Mode: 3
371+
m_WrapAround: 0
365372
m_SelectOnUp: {fileID: 0}
366373
m_SelectOnDown: {fileID: 0}
367374
m_SelectOnLeft: {fileID: 0}
@@ -431,6 +438,7 @@ RectTransform:
431438
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
432439
m_LocalPosition: {x: 0, y: 0, z: 0}
433440
m_LocalScale: {x: 1, y: 1, z: 1}
441+
m_ConstrainProportionsScale: 0
434442
m_Children: []
435443
m_Father: {fileID: 1482626941293486412}
436444
m_RootOrder: 1
@@ -510,6 +518,7 @@ RectTransform:
510518
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
511519
m_LocalPosition: {x: 0, y: 0, z: 0}
512520
m_LocalScale: {x: 1, y: 1, z: 1}
521+
m_ConstrainProportionsScale: 0
513522
m_Children: []
514523
m_Father: {fileID: 1482626941296793831}
515524
m_RootOrder: 0
@@ -590,6 +599,7 @@ RectTransform:
590599
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
591600
m_LocalPosition: {x: 0, y: 0, z: 0}
592601
m_LocalScale: {x: 1, y: 1, z: 1}
602+
m_ConstrainProportionsScale: 0
593603
m_Children:
594604
- {fileID: 1482626942919863218}
595605
m_Father: {fileID: 1482626941293486412}
@@ -652,6 +662,7 @@ MonoBehaviour:
652662
m_EditorClassIdentifier:
653663
m_Navigation:
654664
m_Mode: 3
665+
m_WrapAround: 0
655666
m_SelectOnUp: {fileID: 0}
656667
m_SelectOnDown: {fileID: 0}
657668
m_SelectOnLeft: {fileID: 0}
@@ -721,6 +732,7 @@ RectTransform:
721732
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
722733
m_LocalPosition: {x: 0, y: 0, z: 0}
723734
m_LocalScale: {x: 1, y: 1, z: 1}
735+
m_ConstrainProportionsScale: 0
724736
m_Children: []
725737
m_Father: {fileID: 1482626941293486412}
726738
m_RootOrder: 3
@@ -800,6 +812,7 @@ RectTransform:
800812
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
801813
m_LocalPosition: {x: 0, y: 0, z: 0}
802814
m_LocalScale: {x: 1, y: 1, z: 1}
815+
m_ConstrainProportionsScale: 0
803816
m_Children: []
804817
m_Father: {fileID: 1482626942630675680}
805818
m_RootOrder: 0
@@ -851,3 +864,235 @@ MonoBehaviour:
851864
m_VerticalOverflow: 1
852865
m_LineSpacing: 1
853866
m_Text: Query Offers
867+
--- !u!1 &4115028963255797954
868+
GameObject:
869+
m_ObjectHideFlags: 0
870+
m_CorrespondingSourceObject: {fileID: 0}
871+
m_PrefabInstance: {fileID: 0}
872+
m_PrefabAsset: {fileID: 0}
873+
serializedVersion: 6
874+
m_Component:
875+
- component: {fileID: 4155179291769630087}
876+
- component: {fileID: 1885342102632220536}
877+
- component: {fileID: 3167685106336637182}
878+
m_Layer: 5
879+
m_Name: Disabled Text
880+
m_TagString: Untagged
881+
m_Icon: {fileID: 0}
882+
m_NavMeshLayer: 0
883+
m_StaticEditorFlags: 0
884+
m_IsActive: 1
885+
--- !u!224 &4155179291769630087
886+
RectTransform:
887+
m_ObjectHideFlags: 0
888+
m_CorrespondingSourceObject: {fileID: 0}
889+
m_PrefabInstance: {fileID: 0}
890+
m_PrefabAsset: {fileID: 0}
891+
m_GameObject: {fileID: 4115028963255797954}
892+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
893+
m_LocalPosition: {x: 0, y: 0, z: 0}
894+
m_LocalScale: {x: 1, y: 1, z: 1}
895+
m_ConstrainProportionsScale: 0
896+
m_Children: []
897+
m_Father: {fileID: 7281475077879034014}
898+
m_RootOrder: 0
899+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
900+
m_AnchorMin: {x: 0, y: 0}
901+
m_AnchorMax: {x: 1, y: 1}
902+
m_AnchoredPosition: {x: 0, y: 0}
903+
m_SizeDelta: {x: -10, y: -10}
904+
m_Pivot: {x: 0.5, y: 0.5}
905+
--- !u!222 &1885342102632220536
906+
CanvasRenderer:
907+
m_ObjectHideFlags: 0
908+
m_CorrespondingSourceObject: {fileID: 0}
909+
m_PrefabInstance: {fileID: 0}
910+
m_PrefabAsset: {fileID: 0}
911+
m_GameObject: {fileID: 4115028963255797954}
912+
m_CullTransparentMesh: 1
913+
--- !u!114 &3167685106336637182
914+
MonoBehaviour:
915+
m_ObjectHideFlags: 0
916+
m_CorrespondingSourceObject: {fileID: 0}
917+
m_PrefabInstance: {fileID: 0}
918+
m_PrefabAsset: {fileID: 0}
919+
m_GameObject: {fileID: 4115028963255797954}
920+
m_Enabled: 1
921+
m_EditorHideFlags: 0
922+
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
923+
m_Name:
924+
m_EditorClassIdentifier:
925+
m_Material: {fileID: 0}
926+
m_Color: {r: 1, g: 1, b: 1, a: 1}
927+
m_RaycastTarget: 1
928+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
929+
m_Maskable: 1
930+
m_OnCullStateChanged:
931+
m_PersistentCalls:
932+
m_Calls: []
933+
m_FontData:
934+
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
935+
m_FontSize: 18
936+
m_FontStyle: 0
937+
m_BestFit: 0
938+
m_MinSize: 1
939+
m_MaxSize: 40
940+
m_Alignment: 4
941+
m_AlignByGeometry: 0
942+
m_RichText: 1
943+
m_HorizontalOverflow: 0
944+
m_VerticalOverflow: 0
945+
m_LineSpacing: 1
946+
m_Text: '<i>WARNING</i>: Purchasing through the Ecommerce Interface requires the
947+
Social Overlay, which does not function in the Editor.'
948+
--- !u!1 &5727101875978684896
949+
GameObject:
950+
m_ObjectHideFlags: 0
951+
m_CorrespondingSourceObject: {fileID: 0}
952+
m_PrefabInstance: {fileID: 0}
953+
m_PrefabAsset: {fileID: 0}
954+
serializedVersion: 6
955+
m_Component:
956+
- component: {fileID: 1468356738485475707}
957+
- component: {fileID: 1233833416005705470}
958+
- component: {fileID: 7237128876429589983}
959+
m_Layer: 5
960+
m_Name: DisabledInEditorPanel
961+
m_TagString: Untagged
962+
m_Icon: {fileID: 0}
963+
m_NavMeshLayer: 0
964+
m_StaticEditorFlags: 0
965+
m_IsActive: 1
966+
--- !u!224 &1468356738485475707
967+
RectTransform:
968+
m_ObjectHideFlags: 0
969+
m_CorrespondingSourceObject: {fileID: 0}
970+
m_PrefabInstance: {fileID: 0}
971+
m_PrefabAsset: {fileID: 0}
972+
m_GameObject: {fileID: 5727101875978684896}
973+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
974+
m_LocalPosition: {x: 0, y: 0, z: 0}
975+
m_LocalScale: {x: 1, y: 1, z: 1}
976+
m_ConstrainProportionsScale: 0
977+
m_Children:
978+
- {fileID: 7281475077879034014}
979+
m_Father: {fileID: 1482626941293486412}
980+
m_RootOrder: 5
981+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
982+
m_AnchorMin: {x: 1, y: 1}
983+
m_AnchorMax: {x: 1, y: 1}
984+
m_AnchoredPosition: {x: -175, y: -100}
985+
m_SizeDelta: {x: 0, y: 0}
986+
m_Pivot: {x: 1, y: 1}
987+
--- !u!222 &1233833416005705470
988+
CanvasRenderer:
989+
m_ObjectHideFlags: 0
990+
m_CorrespondingSourceObject: {fileID: 0}
991+
m_PrefabInstance: {fileID: 0}
992+
m_PrefabAsset: {fileID: 0}
993+
m_GameObject: {fileID: 5727101875978684896}
994+
m_CullTransparentMesh: 1
995+
--- !u!114 &7237128876429589983
996+
MonoBehaviour:
997+
m_ObjectHideFlags: 0
998+
m_CorrespondingSourceObject: {fileID: 0}
999+
m_PrefabInstance: {fileID: 0}
1000+
m_PrefabAsset: {fileID: 0}
1001+
m_GameObject: {fileID: 5727101875978684896}
1002+
m_Enabled: 1
1003+
m_EditorHideFlags: 0
1004+
m_Script: {fileID: 11500000, guid: 68cad8e714fa96b4a8dd8767625f2326, type: 3}
1005+
m_Name:
1006+
m_EditorClassIdentifier:
1007+
VisualComponent: {fileID: 7775262654386316380}
1008+
--- !u!1 &7775262654386316380
1009+
GameObject:
1010+
m_ObjectHideFlags: 0
1011+
m_CorrespondingSourceObject: {fileID: 0}
1012+
m_PrefabInstance: {fileID: 0}
1013+
m_PrefabAsset: {fileID: 0}
1014+
serializedVersion: 6
1015+
m_Component:
1016+
- component: {fileID: 7281475077879034014}
1017+
- component: {fileID: 8079908928070024256}
1018+
- component: {fileID: 7019128117418311014}
1019+
- component: {fileID: 802549710338079597}
1020+
m_Layer: 5
1021+
m_Name: Inner Panel
1022+
m_TagString: Untagged
1023+
m_Icon: {fileID: 0}
1024+
m_NavMeshLayer: 0
1025+
m_StaticEditorFlags: 0
1026+
m_IsActive: 1
1027+
--- !u!224 &7281475077879034014
1028+
RectTransform:
1029+
m_ObjectHideFlags: 0
1030+
m_CorrespondingSourceObject: {fileID: 0}
1031+
m_PrefabInstance: {fileID: 0}
1032+
m_PrefabAsset: {fileID: 0}
1033+
m_GameObject: {fileID: 7775262654386316380}
1034+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
1035+
m_LocalPosition: {x: 0, y: 0, z: 0}
1036+
m_LocalScale: {x: 1, y: 1, z: 1}
1037+
m_ConstrainProportionsScale: 0
1038+
m_Children:
1039+
- {fileID: 4155179291769630087}
1040+
m_Father: {fileID: 1468356738485475707}
1041+
m_RootOrder: 0
1042+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1043+
m_AnchorMin: {x: 0.5, y: 0.5}
1044+
m_AnchorMax: {x: 0.5, y: 0.5}
1045+
m_AnchoredPosition: {x: 100, y: 50}
1046+
m_SizeDelta: {x: 300, y: 150}
1047+
m_Pivot: {x: 1, y: 1}
1048+
--- !u!222 &8079908928070024256
1049+
CanvasRenderer:
1050+
m_ObjectHideFlags: 0
1051+
m_CorrespondingSourceObject: {fileID: 0}
1052+
m_PrefabInstance: {fileID: 0}
1053+
m_PrefabAsset: {fileID: 0}
1054+
m_GameObject: {fileID: 7775262654386316380}
1055+
m_CullTransparentMesh: 1
1056+
--- !u!114 &7019128117418311014
1057+
MonoBehaviour:
1058+
m_ObjectHideFlags: 0
1059+
m_CorrespondingSourceObject: {fileID: 0}
1060+
m_PrefabInstance: {fileID: 0}
1061+
m_PrefabAsset: {fileID: 0}
1062+
m_GameObject: {fileID: 7775262654386316380}
1063+
m_Enabled: 1
1064+
m_EditorHideFlags: 0
1065+
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
1066+
m_Name:
1067+
m_EditorClassIdentifier:
1068+
m_Material: {fileID: 0}
1069+
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
1070+
m_RaycastTarget: 1
1071+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
1072+
m_Maskable: 1
1073+
m_OnCullStateChanged:
1074+
m_PersistentCalls:
1075+
m_Calls: []
1076+
m_Sprite: {fileID: 21300000, guid: 9ef7d6a858725b1488cba073fd5ee2b3, type: 3}
1077+
m_Type: 0
1078+
m_PreserveAspect: 0
1079+
m_FillCenter: 1
1080+
m_FillMethod: 4
1081+
m_FillAmount: 1
1082+
m_FillClockwise: 1
1083+
m_FillOrigin: 0
1084+
m_UseSpriteMesh: 0
1085+
m_PixelsPerUnitMultiplier: 1
1086+
--- !u!114 &802549710338079597
1087+
MonoBehaviour:
1088+
m_ObjectHideFlags: 0
1089+
m_CorrespondingSourceObject: {fileID: 0}
1090+
m_PrefabInstance: {fileID: 0}
1091+
m_PrefabAsset: {fileID: 0}
1092+
m_GameObject: {fileID: 7775262654386316380}
1093+
m_Enabled: 1
1094+
m_EditorHideFlags: 0
1095+
m_Script: {fileID: 11500000, guid: 68cad8e714fa96b4a8dd8767625f2326, type: 3}
1096+
m_Name:
1097+
m_EditorClassIdentifier:
1098+
VisualComponent: {fileID: 7775262654386316380}

0 commit comments

Comments
 (0)