Skip to content

Commit d80d985

Browse files
committed
Merge branch 'develop'
2 parents 7e019e8 + 9db2c51 commit d80d985

5 files changed

Lines changed: 23 additions & 26 deletions

File tree

-88 Bytes
Binary file not shown.

Appcoins Unity/Assets/AppcoinsUnity/Example/Scene/Test Scene.unity

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,10 +641,6 @@ Prefab:
641641
propertyPath: m_RootOrder
642642
value: 4
643643
objectReference: {fileID: 0}
644-
- target: {fileID: 1087073868984312, guid: 53ffe963ba9e4624aac3b31b1619f682, type: 2}
645-
propertyPath: m_Name
646-
value: AppcoinsUnity1
647-
objectReference: {fileID: 0}
648644
- target: {fileID: 114267058133941440, guid: 53ffe963ba9e4624aac3b31b1619f682,
649645
type: 2}
650646
propertyPath: purchaserObject

Appcoins Unity/Assets/AppcoinsUnity/Prefabs/AppcoinsUnity.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ MonoBehaviour:
5656
enablePOA: 1
5757
enableDebug: 1
5858
products:
59-
- {fileID: 11400000, guid: 0d15512d72769f74ab15ddca55592937, type: 2}
60-
- {fileID: 11400000, guid: 650461753210374449ff8c3efd539ff5, type: 2}
61-
- {fileID: 11400000, guid: 248b1346f3a05b341b2d93ed2f017be5, type: 2}
59+
- {fileID: 0}
60+
- {fileID: 0}
61+
- {fileID: 0}
6262
purchaserObject: {fileID: 0}

Appcoins Unity/Assets/AppcoinsUnity/Scripts/AppcoinsUnity.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void OnValidate()
8080
if (previousDebug != enableDebug)
8181
{
8282
previousDebug = enableDebug;
83-
updateVarOnMainTemplateGradle(DEBUG, enableDebug.ToString());
83+
updateVarOnMainTemplateGradle(DEBUG, previousDebug.ToString());
8484
}
8585

8686
if(previousName == null || !previousName.Equals(this.name))
@@ -169,7 +169,7 @@ private void changePrefabName()
169169
while(line[i].Equals("\t") || line[i].Equals(" "))
170170
{
171171
i++;
172-
newLine = string.Concat(" ", "");
172+
newLine = string.Concat("\t", "");
173173
}
174174

175175
newLine = string.Concat(newLine, line);
@@ -207,7 +207,7 @@ private void updateVarOnMainTemplateGradle(string varName, string varToCheck)
207207
string line;
208208
string contentToChange = null;
209209
string contentInTemplate = null;
210-
int lineToChange = -1;
210+
ArrayList linesToChange = new ArrayList();
211211
int counter = 0;
212212
int numberOfSpaces = 0;
213213
ArrayList fileLines = new ArrayList();
@@ -225,12 +225,6 @@ private void updateVarOnMainTemplateGradle(string varName, string varToCheck)
225225
contentInTemplate = "resValue \"bool\", \"APPCOINS_ENABLE_DEBUG\", \"" + ((varToCheck.ToLower()).Equals("true") ? "false" : "true") + "\"";
226226
}
227227

228-
else if(varName.Equals(NAME))
229-
{
230-
contentToChange = "resValue \"string\", \"APPCOINS_PREFAB\", \"" + varToCheck + "\"";
231-
contentInTemplate = "resValue \"string\", \"APPCOINS_PREFAB\", \"" + previousName + "\"";
232-
}
233-
234228
System.IO.StreamReader fileReader = new System.IO.StreamReader(pathToMainTemplate);
235229

236230
//Read all lines and get the line numer to be changed
@@ -246,7 +240,7 @@ private void updateVarOnMainTemplateGradle(string varName, string varToCheck)
246240

247241
if (line.Length == contentInTemplate.Length && line.Substring(0, contentInTemplate.Length).Equals(contentInTemplate))
248242
{
249-
lineToChange = counter;
243+
linesToChange.Add(counter);
250244
numberOfSpaces = (int)a[1];
251245
}
252246

@@ -255,14 +249,19 @@ private void updateVarOnMainTemplateGradle(string varName, string varToCheck)
255249

256250
fileReader.Close();
257251

258-
if (lineToChange > -1)
252+
foreach(int lineToChange in linesToChange)
259253
{
260-
for (int i = 0; i < numberOfSpaces; i++)
254+
if (lineToChange > -1)
261255
{
262-
contentToChange = string.Concat(" ", contentToChange);
263-
}
256+
string change = contentToChange;
264257

265-
fileLines[lineToChange] = contentToChange;
258+
for (int i = 0; i < numberOfSpaces; i++)
259+
{
260+
change = string.Concat(" ", change);
261+
}
262+
263+
fileLines[lineToChange] = change;
264+
}
266265
}
267266

268267
System.IO.StreamWriter fileWriter = new System.IO.StreamWriter(pathToMainTemplate);
@@ -304,4 +303,4 @@ private static ArrayList RemoveFirstsWhiteSpaces(string line)
304303
return a;
305304
}
306305
}
307-
}
306+
}

Appcoins Unity/Assets/Plugins/Android/mainTemplate.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ allprojects {
2323
apply plugin: 'com.android.application'
2424

2525
dependencies {
26-
compile fileTree(dir: 'libs', include: ['*.jar'])
26+
compile fileTree(dir: 'libs', excludes: ['com.android.support.support-annotations*.jar'], include: ['*.jar'])
2727
api 'com.asfoundation:appcoins:0.3.6a'
28-
implementation(name: 'appcoinsunity-release', ext:'aar')
2928
**DEPS**
3029
}
3130

@@ -65,14 +64,17 @@ android {
6564
useProguard false
6665
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
6766
jniDebuggable true
67+
resValue "bool", "APPCOINS_ENABLE_POA", "true"
68+
resValue "bool", "APPCOINS_ENABLE_DEBUG", "true"
69+
resValue "string", "APPCOINS_PREFAB", "AppcoinsUnity"
6870
}
6971
release {
7072
minifyEnabled false
7173
useProguard false
7274
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
7375
resValue "bool", "APPCOINS_ENABLE_POA", "true"
7476
resValue "bool", "APPCOINS_ENABLE_DEBUG", "true"
75-
resValue "string", "APPCOINS_PREFAB", "AppcoinsUnity1"
77+
resValue "string", "APPCOINS_PREFAB", "AppcoinsUnity"
7678

7779
**SIGNCONFIG**
7880
}

0 commit comments

Comments
 (0)