安卓分享
This commit is contained in:
parent
6c0d9f5dec
commit
a9e4b1fd34
Binary file not shown.
@ -574,6 +574,77 @@ MonoBehaviour:
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!1 &1031507702417298358
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3498779329465273042}
|
||||
- component: {fileID: 4876364747175189510}
|
||||
- component: {fileID: 462953419039700935}
|
||||
m_Layer: 5
|
||||
m_Name: ShareContainer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3498779329465273042
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1031507702417298358}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5813129645164555224}
|
||||
m_Father: {fileID: 4516012623829342350}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -20, y: -27}
|
||||
m_SizeDelta: {x: 40, y: 34}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4876364747175189510
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1031507702417298358}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &462953419039700935
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1031507702417298358}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 5
|
||||
m_Spacing: 10
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!1 &3956325779266006875
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1036,7 +1107,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -10}
|
||||
m_SizeDelta: {x: 0, y: 34}
|
||||
m_SizeDelta: {x: -40, y: 34}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4516012621968954542
|
||||
CanvasRenderer:
|
||||
@ -1267,6 +1338,7 @@ RectTransform:
|
||||
- {fileID: 4085630362103246101}
|
||||
- {fileID: 331225472001556011}
|
||||
- {fileID: 331225470839700686}
|
||||
- {fileID: 3498779329465273042}
|
||||
m_Father: {fileID: 4085630360693585359}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -1582,6 +1654,80 @@ MonoBehaviour:
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!1 &5614155410591243744
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5813129645164555224}
|
||||
- component: {fileID: 7771189167173914649}
|
||||
- component: {fileID: 921265397514328597}
|
||||
m_Layer: 5
|
||||
m_Name: Wx
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5813129645164555224
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5614155410591243744}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3498779329465273042}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 24, y: 24}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7771189167173914649
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5614155410591243744}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &921265397514328597
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5614155410591243744}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 47efb322b7994f243bd73eec064d44d5, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7194638139558042746
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -107,9 +107,9 @@ public class WeChatController
|
||||
/// <param name="url">网页链接</param>
|
||||
/// <param name="title">标题</param>
|
||||
/// <param name="description">描述</param>
|
||||
public void ShareWebpageToWX(int scene, string url, string title, string description)
|
||||
public void ShareWebpageToWX(int scene, string url, string title, string description,byte[] image)
|
||||
{
|
||||
mainActivityClass.CallStatic("ShareWebpageToWX", scene, url, title, description);
|
||||
mainActivityClass.CallStatic("ShareWebpageToWX", scene, url, title, description,image);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -178,6 +178,11 @@ public class RouteItem : MonoBehaviour
|
||||
//btnDelete.gameObject.SetActive(false);
|
||||
//btnDelete.GetComponent<Button>().onClick.AddListener(Delete);
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
UIManager.AddEvent(left.Find("Main/ShareContainer/Wx").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
Debug.Log(App.CurrentUser.WebHost);
|
||||
App.weChatController.ShareWebpageToWX(0, "http://192.168.0.101:3081/RoutesRecords/" + result.RankingId, result.RouteName, "By " + App.CurrentUser.Nickname, null);
|
||||
});
|
||||
UIManager.AddEvent(btnDelete.gameObject, EventTriggerType.PointerClick, (b) => Detail());
|
||||
#else
|
||||
UIManager.AddEvent(btnDelete.gameObject, EventTriggerType.PointerClick, (b) => Delete());
|
||||
|
||||
@ -220,6 +220,9 @@ namespace Assets.Scripts
|
||||
}
|
||||
loading.GetComponent<LoadingPf>().Show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool isUpdate(string currentVersion,string realVersion)
|
||||
{
|
||||
var a = currentVersion.Split('.');
|
||||
@ -310,6 +313,13 @@ namespace Assets.Scripts
|
||||
/*删除父亲节点下的所有孩子*/
|
||||
|
||||
/*显示网络图片*/
|
||||
|
||||
public static void GetImageBytes(string url, Action<byte[]> p)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
return;
|
||||
UIManager.Instance.StartCoroutine(DownloadImageByte(url, p));
|
||||
}
|
||||
public static Dictionary<string, Texture> propTextureCache = new Dictionary<string, Texture>();
|
||||
public delegate Coroutine StartCoroutine(IEnumerator routine);
|
||||
public static void DisplayImage(RawImage img, string url, bool cache = false,Dictionary<string,Texture> caches = null)
|
||||
@ -374,8 +384,24 @@ namespace Assets.Scripts
|
||||
startCoroutine(DownloadImageCallBack(img, url, action));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static IEnumerator DownloadImageByte(string MediaUrl, Action<byte[]> action = null)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequest.Get(MediaUrl);
|
||||
yield return request.SendWebRequest();
|
||||
if (request.isNetworkError || request.isHttpError)
|
||||
{
|
||||
Debug.Log(request.error);
|
||||
action.Invoke(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke(request.downloadHandler.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
static IEnumerator DownloadImage(RawImage img,string MediaUrl, Action<Texture> action = null)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequest.Get(MediaUrl);
|
||||
|
||||
@ -6,8 +6,8 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Login.unity
|
||||
guid: 6dce3e17997730b4492f91dd8fede429
|
||||
path: Assets/Scenes/Login-Mobile.unity
|
||||
guid: 4be878da00cf764499988cf403faf94d
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainScene.unity
|
||||
guid: ab586a3c1bacd4a48a55178eb06fe0cc
|
||||
|
||||
@ -38,6 +38,7 @@ GraphicsSettings:
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user