Skip to content

Commit 97e4aad

Browse files
committed
added warning on Editor mode
1 parent ea2260d commit 97e4aad

File tree

2 files changed

+44
-33
lines changed

2 files changed

+44
-33
lines changed

UnityNativeToolkit/Assets/NativeToolkit.unity

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ RectTransform:
977977
m_RootOrder: 7
978978
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
979979
m_AnchorMin: {x: 0, y: 0.11324934}
980-
m_AnchorMax: {x: 1, y: 0.19938798}
980+
m_AnchorMax: {x: 1, y: 0.19749488}
981981
m_AnchoredPosition: {x: 0, y: 0}
982982
m_SizeDelta: {x: 0, y: 0}
983983
m_Pivot: {x: 0.5, y: 0.5}
@@ -2770,7 +2770,7 @@ RectTransform:
27702770
m_Father: {fileID: 1980027726}
27712771
m_RootOrder: 0
27722772
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
2773-
m_AnchorMin: {x: 0, y: 0.72495353}
2773+
m_AnchorMin: {x: 0, y: 0.66271484}
27742774
m_AnchorMax: {x: 1, y: 1}
27752775
m_AnchoredPosition: {x: 0, y: 0}
27762776
m_SizeDelta: {x: 0, y: 0}
@@ -2841,7 +2841,7 @@ MonoBehaviour:
28412841
m_enableWordWrapping: 1
28422842
m_wordWrappingRatios: 0.4
28432843
m_overflowMode: 0
2844-
m_firstOverflowCharacterIndex: 0
2844+
m_firstOverflowCharacterIndex: -1
28452845
m_linkedTextComponent: {fileID: 0}
28462846
m_isLinkedTextComponent: 0
28472847
m_isTextTruncated: 0
@@ -2862,7 +2862,7 @@ MonoBehaviour:
28622862
m_firstVisibleCharacter: 0
28632863
m_useMaxVisibleDescender: 1
28642864
m_pageToDisplay: 1
2865-
m_margin: {x: 0, y: 0, z: 0, w: 0}
2865+
m_margin: {x: 0, y: 0, z: 0, w: 0.6057663}
28662866
m_textInfo:
28672867
textComponent: {fileID: 623333397}
28682868
characterCount: 8
@@ -3375,7 +3375,18 @@ MonoBehaviour:
33753375
m_Group: {fileID: 0}
33763376
onValueChanged:
33773377
m_PersistentCalls:
3378-
m_Calls: []
3378+
m_Calls:
3379+
- m_Target: {fileID: 65225236}
3380+
m_MethodName: SetResultText
3381+
m_Mode: 5
3382+
m_Arguments:
3383+
m_ObjectArgument: {fileID: 0}
3384+
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
3385+
m_IntArgument: 0
3386+
m_FloatArgument: 0
3387+
m_StringArgument: Changed Continuous Listening mode
3388+
m_BoolArgument: 0
3389+
m_CallState: 2
33793390
m_IsOn: 0
33803391
--- !u!1 &701257301
33813392
GameObject:
@@ -6653,7 +6664,7 @@ RectTransform:
66536664
m_RootOrder: 1
66546665
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
66556666
m_AnchorMin: {x: 0, y: 0}
6656-
m_AnchorMax: {x: 1, y: 0.72495353}
6667+
m_AnchorMax: {x: 1, y: 0.66271484}
66576668
m_AnchoredPosition: {x: 0, y: 0}
66586669
m_SizeDelta: {x: 0, y: 0}
66596670
m_Pivot: {x: 0.5, y: 0.5}
@@ -6678,7 +6689,7 @@ MonoBehaviour:
66786689
fitType: 2
66796690
rows: 2
66806691
columns: 1
6681-
cellSize: {x: 360, y: 24.038101}
6692+
cellSize: {x: 360, y: 22.57658}
66826693
spacing: {x: 0, y: 0}
66836694
fitX: 1
66846695
fitY: 1
@@ -6870,7 +6881,7 @@ MonoBehaviour:
68706881
fitType: 3
68716882
rows: 1
68726883
columns: 3
6873-
cellSize: {x: 120, y: 24.038101}
6884+
cellSize: {x: 120, y: 22.57658}
68746885
spacing: {x: 0, y: 0}
68756886
fitX: 1
68766887
fitY: 1
@@ -11551,7 +11562,7 @@ RectTransform:
1155111562
m_Father: {fileID: 33280479}
1155211563
m_RootOrder: 6
1155311564
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
11554-
m_AnchorMin: {x: 0, y: 0.20729524}
11565+
m_AnchorMin: {x: 0, y: 0.20445558}
1155511566
m_AnchorMax: {x: 1, y: 0.31091437}
1155611567
m_AnchoredPosition: {x: 0, y: 0}
1155711568
m_SizeDelta: {x: 0, y: 0}

UnityNativeToolkit/Assets/Scripts/Plugins/NativeToolkit/NativeToolkitPlugin_Editor.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,118 +6,118 @@ public NativeToolkitPlugin_Editor(string gameObjectName) : base(gameObjectName)
66

77
protected override void SetUp()
88
{
9-
Debug.LogWarning(" <b> WARNING </b>: You are running this plugin on Editor mode. Real recognition only works running on mobile device.");
9+
Debug.LogWarning(" <b> WARNING </b>: You are running this plugin on Editor mode. Real plugin only works running on mobile device.");
1010
}
1111

1212
#region Features
1313
public override void SaveShotsOnGallery(bool saveShotsOnGallery)
1414
{
15-
throw new System.NotImplementedException();
15+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
1616
}
1717

1818
public override void SaveShotsOnPrivateDirectory(bool saveShotsOnPrivateDirectory)
1919
{
20-
throw new System.NotImplementedException();
20+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
2121
}
2222

2323
public override void TakeShot()
2424
{
25-
throw new System.NotImplementedException();
25+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
2626
}
2727

2828
public override void PickPhotoFromGallery()
2929
{
30-
throw new System.NotImplementedException();
30+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
3131
}
3232

3333
public override void ShowAlertDialog(string message, string title)
3434
{
35-
throw new System.NotImplementedException();
35+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
3636
}
3737

3838
public override void ShowAlertDialog(string message, string title, bool hasPositiveButton, bool hasNegativeButton, bool hasNeutralButton)
3939
{
40-
throw new System.NotImplementedException();
40+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
4141
}
4242

4343
public override void ShowDatePickerDialog()
4444
{
45-
throw new System.NotImplementedException();
45+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
4646
}
4747

4848
public override void ShowTimePickerDialog()
4949
{
50-
throw new System.NotImplementedException();
50+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
5151
}
5252

5353
public override void ShowRateAppDialog(string message, string title)
5454
{
55-
throw new System.NotImplementedException();
55+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
5656
}
5757

5858
public override void ShowToast(string message, int duration, int gravity, int xOffset, int yOffset)
5959
{
60-
throw new System.NotImplementedException();
60+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
6161
}
6262

6363
public override void ShowToast(string message)
6464
{
65-
throw new System.NotImplementedException();
65+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
6666
}
6767

6868
public override void ShowToast(string message, int duration)
6969
{
70-
throw new System.NotImplementedException();
70+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
7171
}
7272

7373
public override void PickContact()
7474
{
75-
throw new System.NotImplementedException();
75+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
7676
}
77-
77+
7878
public override void ShareText(string title, string content)
7979
{
80-
throw new System.NotImplementedException();
80+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
8181
}
8282

8383
public override void ShareImage(string title, string uriContentString)
8484
{
85-
throw new System.NotImplementedException();
85+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
8686
}
8787

8888
public override void StartListening()
8989
{
90-
throw new System.NotImplementedException();
90+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
9191
}
9292

9393
public override void SetContinuousListening(bool isContinuous)
9494
{
95-
throw new System.NotImplementedException();
95+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
9696
}
9797

9898
public override void Speak(string textToSpeak)
9999
{
100-
throw new System.NotImplementedException();
100+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
101101
}
102102

103103
public override void SetLanguage(string language)
104104
{
105-
throw new System.NotImplementedException();
105+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
106106
}
107107

108108
public override void SetLanguage(string language, string country)
109109
{
110-
throw new System.NotImplementedException();
110+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
111111
}
112112

113113
public override void Speak(string textToSpeak, string language)
114114
{
115-
throw new System.NotImplementedException();
115+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
116116
}
117117

118118
public override void Speak(string textToSpeak, string language, string country)
119119
{
120-
throw new System.NotImplementedException();
120+
Debug.LogWarning(" <b> WARNING </b>: You are trying one feature of the plugin on Editor mode. Real features only work running on mobile device.");
121121
}
122122
#endregion
123123
}

0 commit comments

Comments
 (0)