Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
rm -rf ./project/EmptyProject/Assets/Tests/Editor
rm ./project/EmptyProject/Assets/Tests/Editor.meta

- name: Run Tests using Unity TestRunner
uses: game-ci/unity-test-runner@v2
id: tests
Expand Down
12 changes: 7 additions & 5 deletions Editor/MobiledgeXEditorWindow.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018-2021 MobiledgeX, Inc. All rights and licenses reserved.
* Copyright 2018-2022 MobiledgeX, Inc. All rights and licenses reserved.
* MobiledgeX, Inc. 156 2nd Street #408, San Francisco, CA 94105
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -224,8 +224,12 @@ void OnInspectorUpdate()
string GetSDKVersion()
{
TextAsset asset = (TextAsset)AssetDatabase.LoadAssetAtPath("Packages/com.mobiledgex.sdk/package.json", typeof(TextAsset));
string sdkVersion = JsonUtility.FromJson<PackageDetails>(asset.text).version;
return "v" + sdkVersion;
if (asset != null)
{
string sdkVersion = JsonUtility.FromJson<PackageDetails>(asset.text).version;
return "v" + sdkVersion;
}
return "DEBUG_VER";
}

/// <summary>
Expand Down Expand Up @@ -441,7 +445,6 @@ void AddMobiledgeXPlugins()
string iosPluginPath = Path.GetFullPath("Packages/com.mobiledgex.sdk/Runtime/Plugins/iOS/PlatformIntegration.m");
string linkXMLPath = Path.GetFullPath("Packages/com.mobiledgex.sdk/link.xml");
string settingPath = Path.GetFullPath("Packages/com.mobiledgex.sdk/Resources/MobiledgeXSettings.asset");
string melAARPath = Path.GetFullPath("Packages/com.mobiledgex.sdk/Runtime/Plugins/Android/mel.aar");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

try
{
if (!Directory.Exists(@unityPluginsFolderPath))
Expand All @@ -468,7 +471,6 @@ void AddMobiledgeXPlugins()
{
AssetDatabase.CreateFolder("Assets/Plugins/MobiledgeX", "Android");
}
MoveFile(melAARPath, Path.Combine(@mobiledgeXFolderPath, @"Android/mel.aar"), true);
AssetDatabase.Refresh();
}
catch (Exception e)
Expand Down
8 changes: 0 additions & 8 deletions Runtime/Plugins/Android.meta

This file was deleted.

Binary file removed Runtime/Plugins/Android/mel.aar
Binary file not shown.
32 changes: 0 additions & 32 deletions Runtime/Plugins/Android/mel.aar.meta

This file was deleted.

Binary file modified Runtime/Plugins/MatchingEngineSDKRestLibrary.dll
Binary file not shown.
128 changes: 0 additions & 128 deletions Runtime/Scripts/MelMessaging.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/Scripts/MelMessaging.cs.meta

This file was deleted.

25 changes: 7 additions & 18 deletions Runtime/Scripts/MobiledgeXIntegration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018-2021 MobiledgeX, Inc. All rights and licenses reserved.
* Copyright 2018-2022 MobiledgeX, Inc. All rights and licenses reserved.
* MobiledgeX, Inc. 156 2nd Street #408, San Francisco, CA 94105
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -80,7 +80,6 @@ public partial class MobiledgeXIntegration : IDisposable
AppPort latestAppPort = null;
AppPort[] latestAppPortList = null;
Location fallbackLocation = new Location(0, 0);
MelMessaging melMessaging;

string region
{
Expand Down Expand Up @@ -121,11 +120,6 @@ public MobiledgeXIntegration(CarrierInfo carrierInfo = null, NetInterface netInt
netInterface == null ? pIntegration.NetInterface : netInterface,
uniqueId == null ? pIntegration.UniqueID : uniqueId,
deviceInfo == null ? pIntegration.DeviceInfo : deviceInfo);
if (settings.MEL_ENABLED)
{
melMessaging = new MelMessaging(appName);
matchingEngine.SetMelMessaging(melMessaging);
}
}

/// <summary>
Expand All @@ -142,11 +136,6 @@ public MobiledgeXIntegration(string orgName, string appName, string appVers, str
pIntegration = new PlatformIntegration();

matchingEngine = new MatchingEngine(pIntegration.CarrierInfo, pIntegration.NetInterface, pIntegration.UniqueID, pIntegration.DeviceInfo);
if (settings.MEL_ENABLED)
{
melMessaging = new MelMessaging(appName);
matchingEngine.SetMelMessaging(melMessaging);
}
}

/// <summary>
Expand Down Expand Up @@ -205,17 +194,17 @@ public async Task<bool> VerifyLocation(string dmeHost = null, uint dmePort = 0)
// GPS and Tower Status:
switch (reply.gps_location_status)
{
case VerifyLocationReply.GPSLocationStatus.LOC_ROAMING_COUNTRY_MISMATCH:
case VerifyLocationReply.GPSLocationStatus.LOC_ERROR_UNAUTHORIZED:
case VerifyLocationReply.GPSLocationStatus.LOC_ERROR_OTHER:
case VerifyLocationReply.GPSLocationStatus.LOC_UNKNOWN:
case VerifyLocationReply.GPSLocationStatus.RoamingCountryMismatch:
case VerifyLocationReply.GPSLocationStatus.ErrorUnauthorized:
case VerifyLocationReply.GPSLocationStatus.ErrorOther:
case VerifyLocationReply.GPSLocationStatus.Unknown:
return false;
}

switch (reply.tower_status)
{
case VerifyLocationReply.TowerStatus.NOT_CONNECTED_TO_SPECIFIED_TOWER:
case VerifyLocationReply.TowerStatus.TOWER_UNKNOWN:
case VerifyLocationReply.TowerStatus.NotConnectedToSpecifiedTower:
case VerifyLocationReply.TowerStatus.TowerUnknown:
return false;
}

Expand Down
4 changes: 1 addition & 3 deletions Runtime/Scripts/MobiledgeXSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018-2021 MobiledgeX, Inc. All rights and licenses reserved.
* Copyright 2018-2022 MobiledgeX, Inc. All rights and licenses reserved.
* MobiledgeX, Inc. 156 2nd Street #408, San Francisco, CA 94105
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -29,7 +29,5 @@ public class MobiledgeXSettings : ScriptableObject
public string authPublicKey;
public string region;
public Logger.LogType logType = Logger.LogType.ErrorsAndWarnings;
[Tooltip("Set to true, If MEL mode is Enabled on your device.")]
public bool MEL_ENABLED;
}
}
Loading