Пример #1
0
        private void DisplayUnityEditorTab()
        {
            if (!IssuesUtility.HasEditorIssues())
            {
                return;
            }

            EditorGUIHelper.DrawTitleFoldout("Unity Editor", ref _showEditor, () =>
            {
                EditorGUI.indentLevel++;
                EditorGUIHelper.DrawSpritedLabel("Ensure you are using Unity 2019.1.10f1 as your development environment", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));
                GUILayout.Space(EditorGUIUtility.singleLineHeight);
                EditorGUI.indentLevel--;
            });
        }
Пример #2
0
        private void DisplayRenderingTab()
        {
            if (!IssuesUtility.HasRenderingIssues())
            {
                return;
            }

            EditorGUIHelper.DrawTitleFoldout("Rendering", ref _showRendering, () =>
            {
                EditorGUI.indentLevel++;

                if (!PlayerSettings.virtualRealitySupported)
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUIHelper.DrawSpritedLabel("Virtual Reality Must Be Supported", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                    if (GUILayout.Button("Enable VR Support"))
                    {
                        PlayerSettings.virtualRealitySupported = true;
                    }

                    EditorGUILayout.EndHorizontal();
                    GUILayout.Space(EditorGUIUtility.singleLineHeight);
                    EditorGUI.indentLevel--;
                }

                if (PlayerSettings.stereoRenderingPath != StereoRenderingPath.SinglePass)
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUIHelper.DrawSpritedLabel("Stereo Rendering Mode Must be Set To Single Pass", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                    if (GUILayout.Button("Set To Single Pass"))
                    {
                        PlayerSettings.stereoRenderingPath = StereoRenderingPath.SinglePass;
                    }

                    EditorGUILayout.EndHorizontal();
                    GUILayout.Space(EditorGUIUtility.singleLineHeight);
                    EditorGUI.indentLevel--;
                }

                EditorGUI.indentLevel--;
            });
        }
Пример #3
0
 private void CheckDefaultParameters()
 {
     EditorGUIHelper.DrawTitleFoldout("Default Parameters", ref _showDefaultParameters,
                                      () => LimappErrorFinder.Draw(), LimappErrorFinder.LocateIssues);
 }
Пример #4
0
        private void DisplayVRAvatarTab()
        {
            VRAvatar avatar = null;

            foreach (var item in _sceneGameObjects)
            {
                if (item.GetComponentInChildren <VRAvatar>())
                {
                    avatar = item.GetComponentInChildren <VRAvatar>();
                    break;
                }
            }

            if (!IssuesUtility.HasAvatarIssues(avatar))
            {
                return;
            }

            EditorGUIHelper.DrawTitleFoldout("VR Avatar", ref _showVRAvatar, () =>
            {
                EditorGUI.indentLevel++;

                if (avatar == null)
                {
                    EditorGUIHelper.DrawSpritedLabel("Scene Must Contain A VR Avatar", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));
                    GUILayout.Space(EditorGUIUtility.singleLineHeight);
                    EditorGUI.indentLevel--;
                    return;
                }

                IssuesUtility.CheckEyes(avatar, out var eyePosWrong, out var eyeRotWrong, out var eyes);

                if (avatar.Head.Transform.localEulerAngles != Vector3.zero)
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUIHelper.DrawSpritedLabel("VR Avatar Head rotation must be Zeroed", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                    if (GUILayout.Button("Reset Head Rotation"))
                    {
                        avatar.Head.Transform.localEulerAngles = Vector3.zero;
                    }

                    EditorGUILayout.EndHorizontal();
                }

                if (avatar.Head.Transform.localPosition != new Vector3(0, 1.7f, 0))
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUIHelper.DrawSpritedLabel("VR Avatar Head postion should be (0, 1.7f, 0)", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                    if (GUILayout.Button("Reset Head Position"))
                    {
                        avatar.Head.Transform.localPosition = new Vector3(0, 1.7f, 0);
                    }

                    EditorGUILayout.EndHorizontal();
                }

                if (eyePosWrong || eyeRotWrong)
                {
                    if (eyeRotWrong)
                    {
                        EditorGUILayout.BeginHorizontal();
                        EditorGUIHelper.DrawSpritedLabel("Eye Local Rotation Must be Zeroed", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                        if (GUILayout.Button("Reset Eye Rotation"))
                        {
                            eyes.ForEach(x => x.transform.localEulerAngles = Vector3.zero);
                        }

                        EditorGUILayout.EndHorizontal();
                    }

                    if (eyePosWrong)
                    {
                        EditorGUILayout.BeginHorizontal();
                        EditorGUIHelper.DrawSpritedLabel("Eye Local Position Must be Zeroed", ErrorTexture, GUILayout.MaxWidth(16), GUILayout.MaxHeight(16));

                        if (GUILayout.Button("Reset Eye Position"))
                        {
                            eyes.ForEach(x => x.transform.localPosition = Vector3.zero);
                        }

                        EditorGUILayout.EndHorizontal();
                    }

                    GUILayout.Space(EditorGUIUtility.singleLineHeight);
                }

                EditorGUI.indentLevel--;
            });