Пример #1
0
        public static void SetMediaSources(string rawmediasources)
        {
            MediaSource[] sources = JsonUtil.GetJsonArray <MediaSource>(rawmediasources);
            Debug.Log("Response contains " + sources.Length + " media sources");

            UnityEditor.ArrayUtility.Insert <MediaSource>(ref sources, 0, new MediaSource());
            MediaSources = sources;
            //EditorPrefs.SetString("cognitive_mediasources", rawmediasources);
        }
Пример #2
0
        void GetManifestResponse(int responsecode, string error, string text)
        {
            if (responsecode == 200)
            {
                //BuildManifest(getRequest.text);
                var allEntries = JsonUtil.GetJsonArray <AggregationManifest.AggregationManifestEntry>(text);

                Debug.Log("Number of Dynamic Objects in current Manifest: " + allEntries.Length);

                Manifest = new AggregationManifest();

                Manifest.objects = new List <AggregationManifest.AggregationManifestEntry>(allEntries);
                Repaint();

                //also hit settings to get the current version of the scene
                EditorCore.RefreshSceneVersion(null);
            }
            else
            {
                Util.logWarning("GetManifestResponse " + responsecode + " " + error);
            }
        }