This commit is contained in:
2020-07-11 18:34:05 +08:00
parent d587401a58
commit 096f0ae4a1
38 changed files with 964 additions and 787 deletions

View File

@@ -17,14 +17,14 @@ PluginImporter:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
@@ -34,12 +34,12 @@ PluginImporter:
- first:
Any:
second:
enabled: 1
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
@@ -59,42 +59,43 @@ PluginImporter:
- first:
Standalone: Linux
second:
enabled: 1
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings: {}
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:

View File

@@ -17,14 +17,14 @@ PluginImporter:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
@@ -34,12 +34,12 @@ PluginImporter:
- first:
Any:
second:
enabled: 1
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
@@ -59,42 +59,43 @@ PluginImporter:
- first:
Standalone: Linux
second:
enabled: 1
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings: {}
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:

View File

@@ -12,16 +12,94 @@ PluginImporter:
validateReferences: 1
platformData:
- first:
Any:
'': Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,16 +12,94 @@ PluginImporter:
validateReferences: 1
platformData:
- first:
Any:
'': Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -17,14 +17,14 @@ PluginImporter:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
@@ -34,12 +34,12 @@ PluginImporter:
- first:
Any:
second:
enabled: 1
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
@@ -59,42 +59,43 @@ PluginImporter:
- first:
Standalone: Linux
second:
enabled: 1
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings: {}
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:

View File

@@ -17,14 +17,14 @@ PluginImporter:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
@@ -34,12 +34,12 @@ PluginImporter:
- first:
Any:
second:
enabled: 1
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
@@ -59,42 +59,43 @@ PluginImporter:
- first:
Standalone: Linux
second:
enabled: 1
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings: {}
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:

View File

@@ -29,36 +29,8 @@ - (id)init:(NSString *)ak withUnityListner:(NSString *)listner andCoorType:(int)
_unityListner = listner;
[[BMKLocationAuth sharedInstance] checkPermisionWithKey:ak authDelegate:self];
[self initLocation:coordinateType];
return self;
}
-(void)initLocation:(int)coordinateType
{
_locationManager = [[BMKLocationManager alloc] init];
_locationManager.delegate = self;
if(coordinateType == 0) {
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09LL;
} else if(coordinateType == 1) {
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09MC;
} else if(coordinateType == 2) {
_locationManager.coordinateType = BMKLocationCoordinateTypeWGS84;
} else {
_locationManager.coordinateType = BMKLocationCoordinateTypeGCJ02;
}
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09LL; //BMKLocationCoordinateTypeGCJ02
_locationManager.distanceFilter = kCLDistanceFilterNone;
_locationManager.desiredAccuracy = kCLLocationAccuracyBest;
_locationManager.activityType = CLActivityTypeAutomotiveNavigation;
_locationManager.pausesLocationUpdatesAutomatically = NO;
_locationManager.allowsBackgroundLocationUpdates = NO;// YES
_locationManager.locationTimeout = 10;
_locationManager.reGeocodeTimeout = 10;
}
-(void)getMyLocation
{
self.completionBlock = ^(BMKLocation *location, BMKLocationNetworkState state, NSError *error)
{
long code = 0;
@@ -91,6 +63,38 @@ -(void)getMyLocation
NSString * json = [NSString stringWithFormat:@"{\"cmd\":\"onGetLocation\", \"code\":%ld,\"msg\":\"%@\",\"latitude\":%0.6f,\"longitude\":%0.6f,\"AddrStr\":\"%@\"}",code, msg, latitude, longitude, AddrStr];
[self sendUnityMessage:@"onCallback" with:json];
};
return self;
}
-(void)initLocation:(int)coordinateType
{
_locationManager = [[BMKLocationManager alloc] init];
_locationManager.delegate = self;
if(coordinateType == 0) {
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09LL;
} else if(coordinateType == 1) {
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09MC;
} else if(coordinateType == 2) {
_locationManager.coordinateType = BMKLocationCoordinateTypeWGS84;
} else {
_locationManager.coordinateType = BMKLocationCoordinateTypeGCJ02;
}
_locationManager.coordinateType = BMKLocationCoordinateTypeBMK09LL; //BMKLocationCoordinateTypeGCJ02
_locationManager.distanceFilter = kCLDistanceFilterNone;
_locationManager.desiredAccuracy = kCLLocationAccuracyBest;
_locationManager.activityType = CLActivityTypeAutomotiveNavigation;
_locationManager.pausesLocationUpdatesAutomatically = NO;
_locationManager.allowsBackgroundLocationUpdates = NO;// YES
_locationManager.locationTimeout = 10;
_locationManager.reGeocodeTimeout = 10;
}
-(void)getMyLocation
{
[_locationManager requestLocationWithReGeocode:true withNetworkState:true completionBlock:self.completionBlock];
}
-(void) sendUnityMessage:(const NSString*)method with:(NSString*)msg