Skip to content

Commit

Permalink
Updated Unity 2018 version and added 8 more kits.
Browse files Browse the repository at this point in the history
Updated demo scenes for 2018 versions.
  • Loading branch information
sametguzeldev committed Apr 29, 2021
2 parents c94368a + e6af554 commit d0bf5f6
Show file tree
Hide file tree
Showing 164 changed files with 20,643 additions and 5,084 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ crashlytics-build.properties
# Keystores
*.keystore

# IntelliJ’s project specific settings files
/.idea/
2 changes: 1 addition & 1 deletion Assets/Huawei/Scripts/Editor.meta → Assets/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions Assets/Editor/HMSUnityPackageCreator.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace HmsPlugin
{
public static class HMSUnityPackageCreator
{
[MenuItem("Huawei/Prepare Packages")]
private static void PreparePackages()
{
string[] hmsFileNames =
{
"Assets/Huawei",
"Assets/Plugins",
"Assets/Resources",
"Assets/StreamingAssets"
};
AssetDatabase.ExportPackage(hmsFileNames, Application.dataPath + "/HMSUnityPackage.unitypackage", ExportPackageOptions.Recurse | ExportPackageOptions.Interactive);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -378,7 +378,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &986534255
GameObject:
Expand Down Expand Up @@ -459,8 +459,8 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_MethodName:
- m_Target: {fileID: 2045589634}
m_MethodName: HideBannerAd
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
Expand Down Expand Up @@ -661,8 +661,8 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_MethodName:
- m_Target: {fileID: 2045589634}
m_MethodName: ShowBannerAd
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
Expand Down Expand Up @@ -707,6 +707,75 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1180931071}
m_CullTransparentMesh: 0
--- !u!1001 &1194566057
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5065712364284268900, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_Name
value: AdsManager
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalPosition.x
value: 958.5132
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalPosition.y
value: 494.61365
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalPosition.z
value: 116.25
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5065712364284268922, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4e0f42d9e2c1f4f4fa6449074c4d64ac, type: 3}
--- !u!1 &1318779273
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1232,7 +1301,7 @@ RectTransform:
- {fileID: 986534256}
- {fileID: 1180931072}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down Expand Up @@ -1280,92 +1349,5 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &4539183333915013004
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4539183333134310242, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_Name
value: AdsManager
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalPosition.x
value: 958.5132
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalPosition.y
value: 494.61365
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalPosition.z
value: 116.25
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4539183333134310268, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5eb1c08074b934f4f9ea4bd40aeba3de, type: 3}
--- !u!1 &4539183333915013005 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4539183333134310242, guid: 5eb1c08074b934f4f9ea4bd40aeba3de,
type: 3}
m_PrefabInstance: {fileID: 4539183333915013004}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4539183333915013006
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4539183333915013005}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a2b8c5b2b7d680409d1892edd11c84c, type: 3}
m_Name:
m_EditorClassIdentifier:

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions Assets/Huawei/Demos/Ads/AdsDemoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AdsDemoManager : MonoBehaviour
private const string BANNER_AD_ID = "testw6vs28auh3";

private RewardAdManager rewardAdManager;
private InterstitalAdManager interstitialAdManager;
private InterstitialAdManager interstitialAdManager;
private BannerAdsManager bannerAdsManager;

// Start is called before the first frame update
Expand All @@ -37,11 +37,18 @@ private void InitRewardedAds()

private void InitInterstitialAds()
{
interstitialAdManager = InterstitalAdManager.GetInstance();
interstitialAdManager = InterstitialAdManager.GetInstance();
interstitialAdManager.AdId = INTERSTITIAL_AD_ID;
interstitialAdManager.OnAdClosed = OnInterstitialAdClosed;
}

public void ShowBannerAd()
{
bannerAdsManager.ShowBannerAd();
}
public void HideBannerAd()
{
bannerAdsManager.HideBannerAd();
}
public void ShowRewardedAd()
{
Debug.Log("[HMS] AdsDemoManager ShowRewardedAd");
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d0bf5f6

Please sign in to comment.