private static IEnumerable <PluginDesc> RegisterVRPlugins(BuildTarget target)
        {
            List <PluginDesc> list = new List <PluginDesc>();

            if (PlayerSettings.virtualRealitySupported)
            {
                string pluginFolder = VRPostProcess.GetPluginFolder(target);
                if (pluginFolder != null)
                {
                    string pluginExtension = VRPostProcess.GetPluginExtension(target, false);
                    VRDeviceInfoEditor[] enabledVRDeviceInfo = VREditor.GetEnabledVRDeviceInfo(BuildPipeline.GetBuildTargetGroup(target));
                    string[]             array = (from d in enabledVRDeviceInfo
                                                  where !string.IsNullOrEmpty(d.externalPluginName)
                                                  select d.externalPluginName).ToArray <string>();
                    for (int i = 0; i < array.Length; i++)
                    {
                        string[] paths = new string[]
                        {
                            pluginFolder,
                            array[i]
                        };
                        list.Add(new PluginDesc
                        {
                            pluginPath = FileUtil.CombinePaths(paths) + pluginExtension
                        });
                    }
                }
                if (!list.Any <PluginDesc>())
                {
                    Debug.LogWarning("Unable to find plugins folder " + target + ". Native VR plugins will not be loaded.");
                }
            }
            return(list);
        }
        public static bool ShouldInjectVRDependenciesForBuildTarget(BuildTarget target)
        {
            if (!PlayerSettings.virtualRealitySupported)
            {
                return(false);
            }

            VRDeviceInfoEditor[] enabledVRDevices = VREditor.GetEnabledVRDeviceInfo(target);

            return(enabledVRDevices.Length > 0);
        }