示例#1
0
    void Awake()
    {
        _instance = this;
#if UNITY_ANDROID && ENABLE_PLUGIN
        android = new AndroidJavaObject(ObjectClassPath);
        int clients = 1;
        if (EnableCloudSave)
        {
            clients |= 2;
        }
        android.Call("init", gameObject.name, "PlayServicesReceiveAgentEvent", clients);
        handleSaveStatePtr         = AndroidJNIHelper.GetMethodID(android.GetRawClass(), "UpdateState", "(I[B)V");
        handleSaveStateImmedatePtr = AndroidJNIHelper.GetMethodID(android.GetRawClass(), "UpdateStateImmediate", "(II[B)V");
#endif
    }
	void Awake()
	{
		_instance = this;
#if UNITY_ANDROID && ENABLE_PLUGIN
		android = new AndroidJavaObject(ObjectClassPath);
		int clients = 1;
		if (EnableCloudSave) clients |= 2;
		android.Call("init", gameObject.name, "PlayServicesReceiveAgentEvent", clients);
		handleSaveStatePtr = AndroidJNIHelper.GetMethodID(android.GetRawClass(), "UpdateState", "(I[B)V");
		handleSaveStateImmedatePtr = AndroidJNIHelper.GetMethodID(android.GetRawClass(), "UpdateStateImmediate", "(II[B)V");
#endif
	}