예제 #1
0
        void Awake()
        {
            // for simple singleton

            if (instance_ == this)
            {
                return;
            }

            if (instance_ != null && instance_ != this)
            {
                Destroy(gameObject);
                return;
            }

            instance_ = this;

            Lib.SetDebugMode(debugMode);
            Lib.SetLogFunc(onDebugLog);
            Lib.SetErrorFunc(onDebugErr);

            Lib.Initialize();

            CreateMonitors();

        #if UNITY_2018_1_OR_NEWER
            Shader.DisableKeyword("USE_GAMMA_TO_LINEAR_SPACE");
        #else
            Shader.EnableKeyword("USE_GAMMA_TO_LINEAR_SPACE");
        #endif
        }
예제 #2
0
        public static UDDManager CreateInstance()
        {
            if (instance_ != null)
            {
                return(instance_);
            }

            var manager = FindObjectOfType <UDDManager>();

            if (manager)
            {
                instance_ = manager;
                return(manager);
            }

            var go = new GameObject("uDesktopDuplicationManager");

            instance_ = go.AddComponent <UDDManager>();
            return(instance_);
        }
예제 #3
0
 void Reinitialize()
 {
     // Monitor instance is released here when initialized.
     uddMonitor = UDDManager.GetMonitor(lastMonitorId_);
 }