in Networked Physics/Assets/Oculus/VR/Editor/OVRPluginUpdater.cs [245:352]
private static void EnablePluginPackage(PluginPackage pluginPkg)
{
foreach(var kvp in pluginPkg.Plugins)
{
BuildTarget platform = kvp.Key;
string path = kvp.Value;
if ((Directory.Exists(path + GetDisabledPluginSuffix())) || (File.Exists(path + GetDisabledPluginSuffix())))
{
string basePath = GetCurrentProjectPath();
string relPath = path.Substring(basePath.Length + 1);
AssetDatabase.MoveAsset(relPath + GetDisabledPluginSuffix(), relPath);
AssetDatabase.ImportAsset(relPath, ImportAssetOptions.ForceUpdate);
PluginImporter pi = PluginImporter.GetAtPath(relPath) as PluginImporter;
if (pi == null)
{
continue;
}
pi.SetCompatibleWithAnyPlatform(false);
switch (platform)
{
case BuildTarget.Android:
pi.SetCompatibleWithPlatform(BuildTarget.Android, true);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARMv7");
#if UNITY_2017_3_OR_NEWER
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSX, false);
#else
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXUniversal, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel64, false);
#endif
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows64, false);
pi.SetCompatibleWithEditor(false);
break;
#if UNITY_2017_3_OR_NEWER
case BuildTarget.StandaloneOSX:
#else
case BuildTarget.StandaloneOSXUniversal:
#endif
pi.SetCompatibleWithPlatform(BuildTarget.Android, false);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARMv7");
#if UNITY_2017_3_OR_NEWER
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSX, true);
#else
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXUniversal, true);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel, true);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel64, true);
#endif
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows64, false);
pi.SetCompatibleWithEditor(true);
pi.SetEditorData("CPU", "AnyCPU");
pi.SetEditorData("OS", "OSX");
pi.SetPlatformData("Editor", "CPU", "AnyCPU");
pi.SetPlatformData("Editor", "OS", "OSX");
break;
case BuildTarget.StandaloneWindows:
pi.SetCompatibleWithPlatform(BuildTarget.Android, false);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARMv7");
#if UNITY_2017_3_OR_NEWER
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSX, false);
#else
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXUniversal, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel64, false);
#endif
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows, true);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows64, false);
pi.SetCompatibleWithEditor(true);
pi.SetEditorData("CPU", "X86");
pi.SetEditorData("OS", "Windows");
pi.SetPlatformData("Editor", "CPU", "X86");
pi.SetPlatformData("Editor", "OS", "Windows");
break;
case BuildTarget.StandaloneWindows64:
pi.SetCompatibleWithPlatform(BuildTarget.Android, false);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARMv7");
#if UNITY_2017_3_OR_NEWER
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSX, false);
#else
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXUniversal, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel64, false);
#endif
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows64, true);
pi.SetCompatibleWithEditor(true);
pi.SetEditorData("CPU", "X86_64");
pi.SetEditorData("OS", "Windows");
pi.SetPlatformData("Editor", "CPU", "X86_64");
pi.SetPlatformData("Editor", "OS", "Windows");
break;
default:
throw new ArgumentException("Attempted EnablePluginPackage() for unsupported BuildTarget: " + platform);
}
AssetDatabase.ImportAsset(relPath, ImportAssetOptions.ForceUpdate);
}
}
AssetDatabase.Refresh();
AssetDatabase.SaveAssets();
}