Esempio n. 1
0
        private void PropertiesView_PreviewDrop(object sender, DragEventArgs e)
        {
            GameObjectNode gameObjNode = _selectedObject as GameObjectNode;
            GameObjectRef  gameObj     = gameObjNode.mGameObject;

            gameObj.AddComponent(DragItem.DragText);
            BorderBrush    = Brushes.Transparent;
            SelectedObject = null;
            SelectedObject = gameObjNode;
        }
Esempio n. 2
0
        public PubNubUnityBase(PNConfiguration pnConfiguration, GameObject gameObjectRef, IJsonLibrary jsonLibrary)
        {
            PNConfig = pnConfiguration;
            PNLog    = new PNLoggingMethod(PNConfig.LogVerbosity);
            #if (UNITY_IOS)
            Version = string.Format("PubNub-CSharp-UnityIOS/{0}", build);
            #elif (UNITY_STANDALONE_WIN)
            Version = string.Format("PubNub-CSharp-UnityWin/{0}", build);
            #elif (UNITY_STANDALONE_OSX)
            Version = string.Format("PubNub-CSharp-UnityOSX/{0}", build);
            #elif (UNITY_ANDROID)
            Version = string.Format("PubNub-CSharp-UnityAndroid/{0}", build);
            #elif (UNITY_STANDALONE_LINUX)
            Version = string.Format("PubNub-CSharp-UnityLinux/{0}", build);
            #elif (UNITY_WEBPLAYER)
            Version = string.Format("PubNub-CSharp-UnityWeb/{0}", build);
            #elif (UNITY_WEBGL)
            Version = string.Format("PubNub-CSharp-UnityWebGL/{0}", build);
            #else
            Version = string.Format("PubNub-CSharp-Unity/{0}", build);
            #endif
            #if (ENABLE_PUBNUB_LOGGING)
            this.PNLog.WriteToLog(Version, PNLoggingMethod.LevelInfo);
            #endif

            if (gameObjectRef == null)
            {
                #if (ENABLE_PUBNUB_LOGGING)
                this.PNLog.WriteToLog("Initilizing new GameObject", PNLoggingMethod.LevelInfo);
                #endif
                GameObjectRef = new GameObject("PubnubGameObject");
                localGobj     = true;
            }
            else
            {
                #if (ENABLE_PUBNUB_LOGGING)
                this.PNLog.WriteToLog("Reusing already initialized GameObject", PNLoggingMethod.LevelInfo);
                #endif
                GameObjectRef = gameObjectRef;
                localGobj     = false;
            }
            publishMessageCounter = new Counter();

            QManager = GameObjectRef.AddComponent <QueueManager> ();
            latency  = GameObjectRef.AddComponent <PNLatencyManager> ();
            QManager.NoOfConcurrentRequests = PNConfig.ConcurrentNonSubscribeWorkers;
        }