@@ -62,7 +62,7 @@ public static void ShowWindow()
6262 }
6363 else
6464 {
65- var window = ScriptableObject . CreateInstance < MixedRealityProjectConfiguratorWindow > ( ) ;
65+ var window = CreateInstance < MixedRealityProjectConfiguratorWindow > ( ) ;
6666 window . titleContent = new GUIContent ( "MRTK Project Configurator" , EditorGUIUtility . IconContent ( "_Popup" ) . image ) ;
6767 window . position = new Rect ( Screen . width / 2.0f , Screen . height / 2.0f , Default_Window_Height , Default_Window_Width ) ;
6868 window . ShowUtility ( ) ;
@@ -147,69 +147,75 @@ private void RenderChoiceDialog()
147147 }
148148 }
149149
150+ private Vector2 scrollPosition = Vector2 . zero ;
151+
150152 private void RenderConfigurations ( )
151153 {
152154 EditorGUILayout . LabelField ( "Enabled options will be applied to the project. Disabled items are already properly configured." ) ;
153155 EditorGUILayout . Space ( ) ;
154156
155- EditorGUILayout . LabelField ( "Project Settings" , EditorStyles . boldLabel ) ;
156- RenderToggle ( MRConfig . ForceTextSerialization , "Enable Force Text Serialization" ) ;
157- RenderToggle ( MRConfig . VisibleMetaFiles , "Enable Visible meta files" ) ;
158- if ( ! MixedRealityOptimizeUtils . IsBuildTargetAndroid ( ) && ! MixedRealityOptimizeUtils . IsBuildTargetIOS ( ) )
157+ using ( var scrollView = new EditorGUILayout . ScrollViewScope ( scrollPosition ) )
159158 {
159+ scrollPosition = scrollView . scrollPosition ;
160+ EditorGUILayout . LabelField ( "Project Settings" , EditorStyles . boldLabel ) ;
161+ RenderToggle ( MRConfig . ForceTextSerialization , "Enable Force Text Serialization" ) ;
162+ RenderToggle ( MRConfig . VisibleMetaFiles , "Enable Visible meta files" ) ;
163+ if ( ! MixedRealityOptimizeUtils . IsBuildTargetAndroid ( ) && ! MixedRealityOptimizeUtils . IsBuildTargetIOS ( ) )
164+ {
160165#if UNITY_2019_3_OR_NEWER
161- RenderToggle ( MRConfig . VirtualRealitySupported , "Enable Legacy XR" ) ;
166+ RenderToggle ( MRConfig . VirtualRealitySupported , "Enable Legacy XR" ) ;
162167#else
163168 RenderToggle ( MRConfig . VirtualRealitySupported , "Enable VR Supported" ) ;
164169#endif // UNITY_2019_3_OR_NEWER
165- }
170+ }
166171#if UNITY_2019_3_OR_NEWER
167- RenderToggle ( MRConfig . SinglePassInstancing , "Set Single Pass Instanced rendering path (legacy XR API)" ) ;
172+ RenderToggle ( MRConfig . SinglePassInstancing , "Set Single Pass Instanced rendering path (legacy XR API)" ) ;
168173#else
169- RenderToggle ( MRConfig . SinglePassInstancing , "Set Single Pass Instanced rendering path" ) ;
174+ RenderToggle ( MRConfig . SinglePassInstancing , "Set Single Pass Instanced rendering path" ) ;
170175#endif // UNITY_2019_3_OR_NEWER
171- RenderToggle ( MRConfig . SpatialAwarenessLayer , "Set Default Spatial Awareness Layer " ) ;
172- EditorGUILayout . Space ( ) ;
176+ RenderToggle ( MRConfig . SpatialAwarenessLayer , "Set default Spatial Awareness layer " ) ;
177+ EditorGUILayout . Space ( ) ;
173178
174- if ( MixedRealityOptimizeUtils . IsBuildTargetUWP ( ) )
175- {
176- EditorGUILayout . LabelField ( "UWP Capabilities" , EditorStyles . boldLabel ) ;
179+ if ( MixedRealityOptimizeUtils . IsBuildTargetUWP ( ) )
180+ {
181+ EditorGUILayout . LabelField ( "UWP Capabilities" , EditorStyles . boldLabel ) ;
177182
178- RenderToggle ( MRConfig . MicrophoneCapability , "Enable Microphone Capability" ) ;
179- RenderToggle ( MRConfig . InternetClientCapability , "Enable Internet Client Capability" ) ;
180- RenderToggle ( MRConfig . SpatialPerceptionCapability , "Enable Spatial Perception Capability" ) ;
183+ RenderToggle ( MRConfig . MicrophoneCapability , "Enable Microphone Capability" ) ;
184+ RenderToggle ( MRConfig . InternetClientCapability , "Enable Internet Client Capability" ) ;
185+ RenderToggle ( MRConfig . SpatialPerceptionCapability , "Enable Spatial Perception Capability" ) ;
181186#if UNITY_2019_3_OR_NEWER
182- RenderToggle ( MRConfig . EyeTrackingCapability , "Enable Eye Gaze Input Capability" ) ;
187+ RenderToggle ( MRConfig . EyeTrackingCapability , "Enable Eye Gaze Input Capability" ) ;
183188#endif
184- EditorGUILayout . Space ( ) ;
189+ EditorGUILayout . Space ( ) ;
185190
186- EditorGUILayout . LabelField ( "MSBuild for Unity Support" , EditorStyles . boldLabel ) ;
187- EditorGUILayout . HelpBox ( "Enable this for additional HoloLens 2 features, like hand joint remoting and depth LSR mode." , MessageType . Info ) ;
188- RenderToggle ( MRConfig . EnableMSBuildForUnity , "Enable MSBuild for Unity" ) ;
189- }
190- else
191- {
192- trackToggles [ MRConfig . MicrophoneCapability ] = false ;
193- trackToggles [ MRConfig . InternetClientCapability ] = false ;
194- trackToggles [ MRConfig . SpatialPerceptionCapability ] = false ;
191+ EditorGUILayout . LabelField ( "MSBuild for Unity Support" , EditorStyles . boldLabel ) ;
192+ EditorGUILayout . HelpBox ( "Enable this for additional HoloLens 2 features, like hand joint remoting and depth LSR mode." , MessageType . Info ) ;
193+ RenderToggle ( MRConfig . EnableMSBuildForUnity , "Enable MSBuild for Unity" ) ;
194+ }
195+ else
196+ {
197+ trackToggles [ MRConfig . MicrophoneCapability ] = false ;
198+ trackToggles [ MRConfig . InternetClientCapability ] = false ;
199+ trackToggles [ MRConfig . SpatialPerceptionCapability ] = false ;
195200#if UNITY_2019_3_OR_NEWER
196- trackToggles [ MRConfig . EyeTrackingCapability ] = false ;
201+ trackToggles [ MRConfig . EyeTrackingCapability ] = false ;
197202#endif
198- }
203+ }
199204
200- if ( MixedRealityOptimizeUtils . IsBuildTargetAndroid ( ) )
201- {
202- EditorGUILayout . LabelField ( "Android Settings" , EditorStyles . boldLabel ) ;
203- RenderToggle ( MRConfig . AndroidMultiThreadedRendering , "Disable Multi-Threaded Rendering" ) ;
204- RenderToggle ( MRConfig . AndroidMinSdkVersion , "Set Minimum API Level" ) ;
205- }
205+ if ( MixedRealityOptimizeUtils . IsBuildTargetAndroid ( ) )
206+ {
207+ EditorGUILayout . LabelField ( "Android Settings" , EditorStyles . boldLabel ) ;
208+ RenderToggle ( MRConfig . AndroidMultiThreadedRendering , "Disable Multi-Threaded Rendering" ) ;
209+ RenderToggle ( MRConfig . AndroidMinSdkVersion , "Set Minimum API Level" ) ;
210+ }
206211
207- if ( MixedRealityOptimizeUtils . IsBuildTargetIOS ( ) )
208- {
209- EditorGUILayout . LabelField ( "iOS Settings" , EditorStyles . boldLabel ) ;
210- RenderToggle ( MRConfig . IOSMinOSVersion , "Set Required OS Version" ) ;
211- RenderToggle ( MRConfig . IOSArchitecture , "Set Required Architecture" ) ;
212- RenderToggle ( MRConfig . IOSCameraUsageDescription , "Set Camera Usage Descriptions" ) ;
212+ if ( MixedRealityOptimizeUtils . IsBuildTargetIOS ( ) )
213+ {
214+ EditorGUILayout . LabelField ( "iOS Settings" , EditorStyles . boldLabel ) ;
215+ RenderToggle ( MRConfig . IOSMinOSVersion , "Set Required OS Version" ) ;
216+ RenderToggle ( MRConfig . IOSArchitecture , "Set Required Architecture" ) ;
217+ RenderToggle ( MRConfig . IOSCameraUsageDescription , "Set Camera Usage Descriptions" ) ;
218+ }
213219 }
214220 }
215221
0 commit comments