Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!
Join Today!We can build below project for Unity Client with VisualStudio 2013
longzu\branches\longzu_170705\blrCode\client\goe\client\project
If somebody build APK successfuly, please share how to make it
using UnityEngine;using System.Collections;using System.Collections.Generic;using System.Runtime.InteropServices;public class AndroidAgent : MonoBehaviour{#if UNITY_ANDROID && !UNITY_EDITOR static AndroidJavaObject m_activity; static AndroidAgent m_instance;#endif void Awake() {#if UNITY_ANDROID && !UNITY_EDITOR m_instance = this; using (AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { m_activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); } //InitSDK ();#endif } //设置按钮是否隐藏 public static void InitSDK() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("InitSDK");#endif }#if UNITY_ANDROID && !UNITY_EDITOR [DllImport("ourpalm_sdk_a")] public static extern void SetClientGameInfo(string aliHostName, string bucketListName, string bucketChatName, string buglyid, string dataPath); //初始化key#endif public static void SetClientGameInfo1(string aliHostName, string bucketListName, string bucketChatName, string buglyid, string dataPath) {#if UNITY_ANDROID && !UNITY_EDITOR SetClientGameInfo(aliHostName, bucketListName, bucketChatName, buglyid, dataPath); //if (m_activity != null) // m_activity.Call("SetClientGameInfo",aliHostName,bucketListName,bucketChatName, buglyid, dataPath);#endif } //登录 public static void Login() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("login");#endif } //支付 public static void SetPurchaseInfo(string mPrice, string mCurrencyType, string mPropName, string mPropId, string mPropNum, string mPropDescribe, string mDeleverUrl, string mExtendParams, string level, string vip) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("setPurchaseInfo",mPrice,mCurrencyType,mPropName,mPropId,mPropNum,mPropDescribe,mDeleverUrl,mExtendParams, level, vip);#endif } //切换账号 public static void SwitchAccount() { //调用切换账号时,请退到游戏登录界面(因为点击切换账号按钮时,账号已经登出平台)#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("switchAccount");#endif } //登出 public static void userLogout() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("userLogout");#endif } //用户中心 public static void userAccount() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("userAccount");#endif } public static void StartRecordVoice(string str, string key) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("StartRecordVoice", str,key);#endif } public static void EndRecordVoice(bool cancel = false) {#if UNITY_ANDROID && !UNITY_EDITOR int i = 0; if (cancel) { i = 1; } if (m_activity != null) m_activity.Call("EndRecordVoice", i.ToString());#endif } //退出游戏 public static void exitGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("exitGame");#endif } //直接退出游戏 public static void killGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ExitFromGame");#endif } public static void SetGameInfo(string type, string serverName, string serverId, string roleName, string roleId, string roleLev, string roleVipLev) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("setGameInfo",type,serverName,serverId,roleName,roleId,roleLev,roleVipLev);#endif } public static void GetChannelID() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetChannelID");#endif } public static void OpenServiceQuestion() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ServiceQuestion");#endif } public static void YingyongbaoLogin(string type) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SetLoginType",type);#endif } public static void PlayVoice(string str) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("PlayVoice", str);#endif } public static void StopVoice() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("StopVoice");#endif } public static void PlayVideo() { //m_activity.Call("PlayVideo"); } public static void EndVideo() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("EndVideo");#endif } public static void GetBatteryLevel() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetBatteryLevel");#endif } public static void GetDeviceInfo() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetDeviceInfo");#endif } public static void GetDeviceNetStatus() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetDeviceNetStatus");#endif } public static void RestartGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("restartApplication");#endif } public static void SendPalmLog(string logid, string logkey, string logvaljson) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SendPalmLog",logid,logkey,logvaljson);#endif } public static void SendPalmSpecAttr(string logvaljson) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SendSpecAttr", logvaljson);#endif } public static void SaveRecentList(string user, string list) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SaveRecentList", user, list);#endif } public static void RequestRecentList(string user) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("RequestRecentList", user);#endif } public static void ShareSocialContent(string titleTxt, string shareTxt, string imgUrl, string titleUrl, string siteUrl) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ShareSocialContent", titleTxt, shareTxt, imgUrl, titleUrl, siteUrl);#endif } public static void AddNotification(string title, string message, int secondsFromNow, int repeatIntervalSec = -1, bool sound = true, bool vibrate = false) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("AddNotification", title, message, secondsFromNow, repeatIntervalSec, sound, vibrate);#endif } public static void ClearNotification() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ClearNotification");#endif } public static void GiftExchange(string giftCode, string deleverUrl, string extendParams) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GiftExchange", giftCode, deleverUrl, extendParams);#endif } public static void UploadUserFile(string bucketName, string fileKey, string filePath, bool append = false) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("UploadUserFile", bucketName, fileKey, filePath, append);#endif } public static void DownloadUserFile(string bucketName, string fileKey, string localFilePath) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("DownloadUserFile", bucketName, fileKey, localFilePath);#endif } public static void GetUserDevicePhoto(int type, int aspectX = -1, int aspectY = -1, int outputX = -1, int outputY = -1) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetUserDevicePhoto", type, aspectX, aspectY, outputX, outputY);#endif } public static void TestCrashType(int type) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("TestCrash", type);#endif } public static void GetServiceCode(string gameResVersion) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetServiceCode", gameResVersion);#endif } public static void CopyTextToClipboard(string copyText) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("copyTextToClipboard", copyText);#endif } public static void PlaySystemSound() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("Vibrate500"); #endif } public static void SetSystemBrightness(bool isDark) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("ChangeLight", isDark);#endif } public static void SetPhoneBrightness(float value) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("SetScreenLight", value);#endif } public static void SaveImageToGallery(string path) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("SaveImageToGallery", path);#endif }}
Hi guys, I wanna share my progress for Unity client
You can download the client source at below link
To view the content, you need to sign in or register
When you run this source, you face to one error
You can fix the error by below way
1. Modify line 57 in Assets/PlatformSDK/Common/PlatformSDK.cs
with this...
AndroidAgent.SetClientGameInfo1(SDKConfig.ALi_HostName,SDKConfig.ALi_BucketListName,SDKConfig.ALi_BucketChatName,SDKConfig.Bugly_ID_Android,Application.persistentDataPath);
2. Change all codes in Assets/PlatformSDK/Common/Agent/AndroidAgent.cs
with this...
Code:using UnityEngine;using System.Collections;using System.Collections.Generic;using System.Runtime.InteropServices;public class AndroidAgent : MonoBehaviour{#if UNITY_ANDROID && !UNITY_EDITOR static AndroidJavaObject m_activity; static AndroidAgent m_instance;#endif void Awake() {#if UNITY_ANDROID && !UNITY_EDITOR m_instance = this; using (AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { m_activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); } //InitSDK ();#endif } //设置按钮是否隐藏 public static void InitSDK() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("InitSDK");#endif }#if UNITY_ANDROID && !UNITY_EDITOR [DllImport("ourpalm_sdk_a")] public static extern void SetClientGameInfo(string aliHostName, string bucketListName, string bucketChatName, string buglyid, string dataPath); //初始化key#endif public static void SetClientGameInfo1(string aliHostName, string bucketListName, string bucketChatName, string buglyid, string dataPath) {#if UNITY_ANDROID && !UNITY_EDITOR SetClientGameInfo(aliHostName, bucketListName, bucketChatName, buglyid, dataPath); //if (m_activity != null) // m_activity.Call("SetClientGameInfo",aliHostName,bucketListName,bucketChatName, buglyid, dataPath);#endif } //登录 public static void Login() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("login");#endif } //支付 public static void SetPurchaseInfo(string mPrice, string mCurrencyType, string mPropName, string mPropId, string mPropNum, string mPropDescribe, string mDeleverUrl, string mExtendParams, string level, string vip) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("setPurchaseInfo",mPrice,mCurrencyType,mPropName,mPropId,mPropNum,mPropDescribe,mDeleverUrl,mExtendParams, level, vip);#endif } //切换账号 public static void SwitchAccount() { //调用切换账号时,请退到游戏登录界面(因为点击切换账号按钮时,账号已经登出平台)#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("switchAccount");#endif } //登出 public static void userLogout() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("userLogout");#endif } //用户中心 public static void userAccount() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("userAccount");#endif } public static void StartRecordVoice(string str, string key) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("StartRecordVoice", str,key);#endif } public static void EndRecordVoice(bool cancel = false) {#if UNITY_ANDROID && !UNITY_EDITOR int i = 0; if (cancel) { i = 1; } if (m_activity != null) m_activity.Call("EndRecordVoice", i.ToString());#endif } //退出游戏 public static void exitGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("exitGame");#endif } //直接退出游戏 public static void killGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ExitFromGame");#endif } public static void SetGameInfo(string type, string serverName, string serverId, string roleName, string roleId, string roleLev, string roleVipLev) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("setGameInfo",type,serverName,serverId,roleName,roleId,roleLev,roleVipLev);#endif } public static void GetChannelID() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetChannelID");#endif } public static void OpenServiceQuestion() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ServiceQuestion");#endif } public static void YingyongbaoLogin(string type) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SetLoginType",type);#endif } public static void PlayVoice(string str) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("PlayVoice", str);#endif } public static void StopVoice() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("StopVoice");#endif } public static void PlayVideo() { //m_activity.Call("PlayVideo"); } public static void EndVideo() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("EndVideo");#endif } public static void GetBatteryLevel() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetBatteryLevel");#endif } public static void GetDeviceInfo() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetDeviceInfo");#endif } public static void GetDeviceNetStatus() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetDeviceNetStatus");#endif } public static void RestartGame() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("restartApplication");#endif } public static void SendPalmLog(string logid, string logkey, string logvaljson) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SendPalmLog",logid,logkey,logvaljson);#endif } public static void SendPalmSpecAttr(string logvaljson) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SendSpecAttr", logvaljson);#endif } public static void SaveRecentList(string user, string list) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("SaveRecentList", user, list);#endif } public static void RequestRecentList(string user) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("RequestRecentList", user);#endif } public static void ShareSocialContent(string titleTxt, string shareTxt, string imgUrl, string titleUrl, string siteUrl) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ShareSocialContent", titleTxt, shareTxt, imgUrl, titleUrl, siteUrl);#endif } public static void AddNotification(string title, string message, int secondsFromNow, int repeatIntervalSec = -1, bool sound = true, bool vibrate = false) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("AddNotification", title, message, secondsFromNow, repeatIntervalSec, sound, vibrate);#endif } public static void ClearNotification() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("ClearNotification");#endif } public static void GiftExchange(string giftCode, string deleverUrl, string extendParams) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GiftExchange", giftCode, deleverUrl, extendParams);#endif } public static void UploadUserFile(string bucketName, string fileKey, string filePath, bool append = false) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("UploadUserFile", bucketName, fileKey, filePath, append);#endif } public static void DownloadUserFile(string bucketName, string fileKey, string localFilePath) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("DownloadUserFile", bucketName, fileKey, localFilePath);#endif } public static void GetUserDevicePhoto(int type, int aspectX = -1, int aspectY = -1, int outputX = -1, int outputY = -1) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetUserDevicePhoto", type, aspectX, aspectY, outputX, outputY);#endif } public static void TestCrashType(int type) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("TestCrash", type);#endif } public static void GetServiceCode(string gameResVersion) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("GetServiceCode", gameResVersion);#endif } public static void CopyTextToClipboard(string copyText) {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("copyTextToClipboard", copyText);#endif } public static void PlaySystemSound() {#if UNITY_ANDROID && !UNITY_EDITOR if (m_activity != null) m_activity.Call("Vibrate500"); #endif } public static void SetSystemBrightness(bool isDark) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("ChangeLight", isDark);#endif } public static void SetPhoneBrightness(float value) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("SetScreenLight", value);#endif } public static void SaveImageToGallery(string path) {#if UNITY_ANDROID && !UNITY_EDITOR if(m_activity != null) m_activity.Call("SaveImageToGallery", path);#endif }}
Translated Language.txt
To view the content, you need to sign in or register
Translated ConfData.bytes
To view the content, you need to sign in or register
Translated Excel files
To view the content, you need to sign in or register
I fixed all errors on Unity editor, the last thisg is arrangement of resources.
I changed the server IP in this source. But still it dosent connect to server.
I am still work for it. And probably some smart guy could make this work.
Let's try our best until in game!!
I fixed all errors on Unity editor, the last thisg is arrangement of resources.
I changed the server IP in this source. But still it dosent connect to server.
I am still work for it. And probably some smart guy could make this work.
Let's try our best until in game!!
anyone have a guide how to run this game?
which version of unity to use?