Hi,
I am trying to use on-demand resources, and I have the following script in my Editor folder, however it just constantly complains about missing namespaces. So, is this the right place for it? - is there another problem?
#if ENABLE_IOS_ON_DEMAND_RESOURCES || ENABLE_IOS_APP_SLICING
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
#if UNITY_IOS
using UnityEditor.iOS;
#endif
public class BuildResources
{
[InitializeOnLoadMethod]
static void SetupResourcesBuild()
{
UnityEngine.Debug.Log ("SetupResourcesBuild COLLECT");
UnityEngine.Debug.Log ("SetupResourcesBuild COLLECTING");
UnityEditor.iOS.BuildPipeline.collectResources += CollectResources;
}
static string GetPath(string relativePath)
{
string root = Path.Combine(AssetBundles.Utility.AssetBundlesOutputPath,
AssetBundles.Utility.GetPlatformName());
return Path.Combine(root, relativePath);
}
static UnityEditor.iOS.Resource[] CollectResources()
{
string manifest = AssetBundles.Utility.GetPlatformName();
return new Resource[]
{
new Resource(manifest, GetPath(manifest)).AddOnDemandResourceTags(manifest),
new Resource("twcanyon", GetPath("twcanyon")).AddOnDemandResourceTags("twcanyon")
};
}
}
#endif
