public override void OnInspectorGUI()
        {
            configuration = target as AssetServiceConfiguration;

            GUILayout.Label("Asset Service Configuration Options ", EditorUITools.HeaderStyle);
            cachedUseStreamingAssets         = configuration.UseStreamingAssets;
            configuration.UseStreamingAssets = EditorGUILayout.ToggleLeft("Use Streaming Assets?", configuration.UseStreamingAssets);

            if (!configuration.UseStreamingAssets)
            {
                EditorUITools.HorizontalLine();

                configuration.AssetBundlesURL = EditorGUILayout.TextField("Asset Bundles URL", configuration.AssetBundlesURL);
                EditorUITools.HorizontalLine();

                if (!configuration.AssetBundlesURL.Equals(string.Empty))
                {
                    configuration.UseCache = EditorGUILayout.ToggleLeft("Cache Asset Bundles?", configuration.UseCache);

                    EditorUITools.HorizontalLine();

                    EditorGUILayout.LabelField("Manifest Cache Expiring Period in Days?");
                    configuration.ManifestCachePeriod = EditorGUILayout.IntSlider(configuration.ManifestCachePeriod, 1, 90);
                }
                else
                {
                    EditorGUILayout.LabelField("Invalid URL");
                }
            }

            if (cachedUseStreamingAssets != configuration.UseStreamingAssets)
            {
                cachedUseStreamingAssets = configuration.UseStreamingAssets;

                EditorUtility.SetDirty(target);
                AssetDatabase.SaveAssets();
            }
        }
예제 #2
0
 public void Configure(ServiceConfiguration config)
 {
     configuration = config as AssetServiceConfiguration;
     serviceConfigured.OnNext(this);
     serviceConfigured.OnCompleted();
 }