/// <summary>
        /// Ensures that the appropriate symbolic constant is defined based on the presence of the Leap Motion Core Assets.
        /// </summary>
        /// <returns>If the define was added or the define has already been added, return true</returns>
        private static bool ReconcileLeapMotionDefine()
        {
            FileInfo[] files = FileUtilities.FindFilesInAssets(trackedLeapFileName);

            if (files.Length > 0)
            {
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, CommonDefinitions);
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.WSA, CommonDefinitions);

                isLeapInProject        = true;
                isLeapRecognizedByMRTK = true;

                return(true);
            }
            else
            {
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, CommonDefinitions);
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.WSA, CommonDefinitions);

                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, UnityPluginDefinitions);
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.WSA, UnityPluginDefinitions);

                isLeapRecognizedByMRTK = false;

                return(false);
            }
        }
Пример #2
0
        private static void ReconcileGltfImporterDefine()
        {
            BuildTargetGroup group = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);

#if MRTK_GLTF_IMPORTER_OFF
            ScriptUtilities.RemoveScriptingDefinitions(group, "MRTK_GLTF_IMPORTER_OFF");
#else
            ScriptUtilities.AppendScriptingDefinitions(group, "MRTK_GLTF_IMPORTER_OFF");
#endif
        }
 private static void ReconcileSceneUnderstandingDefine()
 {
     FileInfo[] files = FileUtilities.FindFilesInAssets(FileName);
     if (files.Length > 0)
     {
         ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.WSA, definitions);
     }
     else
     {
         ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.WSA, definitions);
     }
 }
 /// <summary>
 /// Updates the assembly definitions to mark the Oculus Integration Asset as present or not present
 /// </summary>
 internal static void ReconcileOculusIntegrationDefine(bool oculusIntegrationPresent)
 {
     if (oculusIntegrationPresent)
     {
         ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Android, Definitions);
         ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
     }
     else
     {
         ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Android, Definitions);
         ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
     }
 }
Пример #5
0
        /// <summary>
        /// Ensures that the appropriate symbolic constant is defined based on the presence of the Leap Motion Core Assets.
        /// </summary>
        /// <returns>If the define was added or the define has already been added, return true</returns>
        private static bool ReconcileLeapMotionDefine()
        {
            FileInfo[] files = FileUtilities.FindFilesInAssets(trackedLeapFileName);

            if (files.Length > 0)
            {
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                return(true);
            }
            else
            {
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                return(false);
            }
        }
 /// <summary>
 /// Ensures that the appropriate symbolic constant is defined based on the presence of the AR Foundation package.
 /// </summary>
 /// <returns>True if the define was added, false otherwise.</returns>
 private static bool ReconcileArFoundationDefine()
 {
     FileInfo[] files = FileUtilities.FindFilesInPackageCache(FileName);
     if (files.Length > 0)
     {
         ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Android, definitions);
         ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.iOS, definitions);
         return(true);
     }
     else
     {
         ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Android, definitions);
         ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.iOS, definitions);
         return(false);
     }
 }
Пример #7
0
        /// <summary>
        /// Updates the assembly definitions to mark the Oculus Integration Asset as present or not present
        /// </summary>
        /// <returns>true if Assets/Oculus/OculusProjectConfig exists, false otherwise</returns>
        private static bool ReconcileOculusIntegrationDefine()
        {
            FileInfo[] files = FileUtilities.FindFilesInAssets(OculusIntegrationProjectConfig);

            if (files.Length > 0)
            {
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Android, Definitions);
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                return(true);
            }
            else
            {
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Android, Definitions);
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                return(false);
            }
        }
        private static bool UpdateAssemblyDefinitions()
        {
            FileInfo[] files = FileUtilities.FindFilesInAssets(OculusIntegrationProjectConfig);

            if (files.Length > 0)
            {
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Android, Definitions);
                ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                ConfigureProfilesForHandtracking();
                return(true);
            }
            else
            {
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Android, Definitions);
                ScriptUtilities.RemoveScriptingDefinitions(BuildTargetGroup.Standalone, Definitions);
                return(false);
            }
        }
 /// <summary>
 /// Adds scripting definitions that are required when using the Ultraleap Unity Plugin (i.e. >= V5.0)
 /// </summary>
 private static void AddScriptingDefinitionsForUnityPlugin()
 {
     ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.Standalone, UnityPluginDefinitions);
     ScriptUtilities.AppendScriptingDefinitions(BuildTargetGroup.WSA, UnityPluginDefinitions);
 }