| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d445ef7 commit 6d3b44c
21 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,9 +31,6 @@ static bool EnableAnalytics() | |||
| 31 | 31 | ||
| 32 | 32 | public static void SendCodeEditorUsage(IExternalCodeEditor codeEditor) | |
| 33 | 33 | { | |
| 34 | - if (!UnityEngine.Analytics.Analytics.enabled) | ||
| 35 | - return; | ||
| 36 | - | ||
| 37 | 34 | if (!EnableAnalytics()) | |
| 38 | 35 | return; | |
| 39 | 36 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,6 +51,7 @@ public enum PS4BuildSubtarget | |||
| 51 | 51 | /// SA: EditorUserBuildSettings.ps4BuildSubtarget. | |
| 52 | 52 | Package = 1, | |
| 53 | 53 | Iso = 2, | |
| 54 | + GP4Project = 3, | ||
| 54 | 55 | } | |
| 55 | 56 | ||
| 56 | 57 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,9 @@ protected ToolAttribute(string displayName, Type targetType = null, Type editorT | |||
| 31 | 31 | [AttributeUsage(AttributeTargets.Class, Inherited = false)] | |
| 32 | 32 | public sealed class EditorToolAttribute : ToolAttribute | |
| 33 | 33 | { | |
| 34 | - public EditorToolAttribute(string displayName, Type componentToolTarget = null, Type editorToolContext = null) | ||
| 34 | + public EditorToolAttribute(string displayName, Type componentToolTarget = null) | ||
| 35 | + : base(displayName, componentToolTarget) {} | ||
| 36 | + public EditorToolAttribute(string displayName, Type componentToolTarget, Type editorToolContext) | ||
| 35 | 37 | : base(displayName, componentToolTarget, editorToolContext) {} | |
| 36 | 38 | } | |
| 37 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1061,14 +1061,19 @@ internal static GameObject FindSelectionBaseForPicking(GameObject go) | |||
| 1061 | 1061 | // alternatively a GameObject with the SelectionBaseAttribute assigned. | |
| 1062 | 1062 | Transform tr = go.transform; | |
| 1063 | 1063 | GameObject outerMostSelectableRoot = null; | |
| 1064 | + GameObject prefabBaseGo = null; | ||
| 1064 | 1065 | ||
| 1065 | 1066 | while (tr != null) | |
| 1066 | 1067 | { | |
| 1067 | 1068 | if (!SceneVisibilityState.IsGameObjectPickingDisabled(tr.gameObject)) | |
| 1068 | 1069 | { | |
| 1069 | - // If we come across the prefab base, no need to search further | ||
| 1070 | - if (tr == prefabBase) | ||
| 1071 | - return tr.gameObject; | ||
| 1070 | + // If we come across the prefab base, we still need to make sure there are no | ||
| 1071 | + // go with the SelectionBaseAttribute assigned before returning prefabBaseGo. | ||
| 1072 | + if (tr == prefabBase && prefabBaseGo == null) | ||
| 1073 | + { | ||
| 1074 | + prefabBaseGo = tr.gameObject; | ||
| 1075 | + continue; | ||
| 1076 | + } | ||
| 1072 | 1077 | ||
| 1073 | 1078 | // Only test again nested prefab if go is already part of a prefab to avoid selecting a | |
| 1074 | 1079 | // parent prefab is the current go is only child of this prefab but does not belong to it | |
@@ -1081,14 +1086,18 @@ internal static GameObject FindSelectionBaseForPicking(GameObject go) | |||
| 1081 | 1086 | outerMostSelectableRoot = tr.gameObject; | |
| 1082 | 1087 | } | |
| 1083 | 1088 | ||
| 1084 | - // If a SelectionBaseAttribute is found, select the nearest to the picked GameObject | ||
| 1089 | + // If a SelectionBaseAttribute is found, select the nearest to the picked GameObject. | ||
| 1090 | + // GameObjects with the SelectionBaseAttribute should have priority over all others. | ||
| 1085 | 1091 | if (AttributeHelper.GameObjectContainsAttribute<SelectionBaseAttribute>(tr.gameObject)) | |
| 1086 | 1092 | return tr.gameObject; | |
| 1087 | 1093 | } | |
| 1088 | 1094 | ||
| 1089 | 1095 | tr = tr.parent; | |
| 1090 | 1096 | } | |
| 1091 | 1097 | ||
| 1098 | + if (prefabBaseGo != null) | ||
| 1099 | + return prefabBaseGo; | ||
| 1100 | + | ||
| 1092 | 1101 | return outerMostSelectableRoot; | |
| 1093 | 1102 | } | |
| 1094 | 1103 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -662,7 +662,7 @@ private void DoAssetPipelineSettings() | |||
| 662 | 662 | { | |
| 663 | 663 | // Known issue with Docs redirect - versioned pages might not open offline docs | |
| 664 | 664 | var help = Help.FindHelpNamed("ParallelImport"); | |
| 665 | - Application.OpenURL(help); | ||
| 665 | + Help.BrowseURL(help); | ||
| 666 | 666 | } | |
| 667 | 667 | GUILayout.EndHorizontal(); | |
| 668 | 668 | } | |
@@ -738,7 +738,7 @@ private void DoCacheServerSettings() | |||
| 738 | 738 | { | |
| 739 | 739 | // Known issue with Docs redirect - versioned pages might not open offline docs | |
| 740 | 740 | var help = Help.FindHelpNamed("UnityAccelerator"); | |
| 741 | - Application.OpenURL(help); | ||
| 741 | + Help.BrowseURL(help); | ||
| 742 | 742 | } | |
| 743 | 743 | GUILayout.EndHorizontal(); | |
| 744 | 744 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -215,7 +215,7 @@ class SettingsContent | |||
| 215 | 215 | public static readonly GUIContent lightmapStreamingPriority = EditorGUIUtility.TrTextContent("Streaming Priority", "Lightmap mipmap streaming priority when there's contention for resources. Positive numbers represent higher priority. Valid range is -128 to 127. This value is applied to the light map textures as they are generated."); | |
| 216 | 216 | public static readonly GUIContent lightmapQualityAndroidWarning = EditorGUIUtility.TrTextContent("The selected Lightmap Encoding requires OpenGL ES 3.0 or Vulkan. Please remove the OpenGL ES 2 API."); | |
| 217 | 217 | public static readonly GUIContent legacyClampBlendShapeWeights = EditorGUIUtility.TrTextContent("Clamp BlendShapes (Deprecated)*", "If set, the range of BlendShape weights in SkinnedMeshRenderers will be clamped."); | |
| 218 | - public static readonly GUIContent virtualTexturingSupportEnabled = EditorGUIUtility.TrTextContent("Virtual Texturing*", "Enable support for Virtual Texturing. Changing this value requires an Editor restart."); | ||
| 218 | + public static readonly GUIContent virtualTexturingSupportEnabled = EditorGUIUtility.TrTextContent("Virtual Texturing (Experimental)*", "Enable Virtual Texturing. This feature is experimental and not ready for production use. Changing this value requires an Editor restart."); | ||
| 219 | 219 | public static readonly GUIContent virtualTexturingUnsupportedPlatformWarning = EditorGUIUtility.TrTextContent("The current target platform does not support Virtual Texturing. To build for this platform, uncheck Enable Virtual Texturing."); | |
| 220 | 220 | public static readonly GUIContent virtualTexturingUnsupportedAPI = EditorGUIUtility.TrTextContent("The target graphics API does not support Virtual Texturing. To target compatible graphics APIs, uncheck 'Auto Graphics API', and remove OpenGL ES 2/3 and OpenGLCore."); | |
| 221 | 221 | public static readonly GUIContent virtualTexturingUnsupportedAPIWin = EditorGUIUtility.TrTextContent("The target Windows graphics API does not support Virtual Texturing. To target compatible graphics APIs, uncheck 'Auto Graphics API for Windows', and remove OpenGL ES 2/3 and OpenGLCore."); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -105,40 +105,65 @@ public static string GetPort(int connectionId) | |||
| 105 | 105 | ||
| 106 | 106 | public static GUIContent GetIcon(string name) | |
| 107 | 107 | { | |
| 108 | - // *begin-nonstandard-formatting* | ||
| 109 | - var content = name switch | ||
| 108 | + var content = GetBuildTargetIcon(name); | ||
| 109 | + if (content == null) | ||
| 110 | 110 | { | |
| 111 | - "Editor" => EditorGUIUtility.IconContent("d_SceneAsset Icon"), | ||
| 112 | - "WindowsEditor" => EditorGUIUtility.IconContent("d_SceneAsset Icon"), | ||
| 113 | - "WindowsPlayer" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 114 | - "Android" => EditorGUIUtility.IconContent("BuildSettings.Android.Small"), | ||
| 115 | - "OSXPlayer" => EditorGUIUtility.IconContent("BuildSettings.Standalone.Small"), | ||
| 116 | - "IPhonePlayer" => EditorGUIUtility.IconContent("BuildSettings.iPhone.Small"), | ||
| 117 | - "WebGLPlayer" => EditorGUIUtility.IconContent("BuildSettings.WebGL.Small"), | ||
| 118 | - "tvOS" => EditorGUIUtility.IconContent("BuildSettings.tvOS.Small"), | ||
| 119 | - "Lumin" => EditorGUIUtility.IconContent("BuildSettings.Lumin.small"), | ||
| 120 | - "LinuxPlayer" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 121 | - "WSAPlayerX86" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 122 | - "WSAPlayerX64" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 123 | - "WSAPlayerARM" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 124 | - "Switch" => EditorGUIUtility.IconContent("BuildSettings.Switch.Small"), | ||
| 125 | - "Stadia" => EditorGUIUtility.IconContent("BuildSettings.Stadia.small"), | ||
| 126 | - "GameCoreScarlett" => EditorGUIUtility.IconContent("BuildSettings.GameCoreScarlett.Small"), | ||
| 127 | - "GameCoreXboxOne" => EditorGUIUtility.IconContent("BuildSettings.GameCoreXboxOne.Small"), | ||
| 128 | - "XboxOne" => EditorGUIUtility.IconContent("BuildSettings.GameCoreXboxOne.Small"), | ||
| 129 | - "EmbeddedLinuxArm64" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 130 | - "EmbeddedLinuxArm32" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 131 | - "EmbeddedLinuxX64" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 132 | - "EmbeddedLinuxX86" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 133 | - "PS4" => EditorGUIUtility.IconContent("BuildSettings.PS4.Small"), | ||
| 134 | - "PS5" => EditorGUIUtility.IconContent("BuildSettings.PS5.Small"), | ||
| 135 | - "Devices" => EditorGUIUtility.IconContent("BuildSettings.Standalone.Small"), | ||
| 136 | - "<unknown>" => EditorGUIUtility.IconContent("BuildSettings.Broadcom"), | ||
| 137 | - _ => EditorGUIUtility.IconContent("BuildSettings.Broadcom") | ||
| 138 | - }; | ||
| 139 | - // *end-nonstandard-formatting* | ||
| 111 | + // *begin-nonstandard-formatting* | ||
| 112 | + content = name switch | ||
| 113 | + { | ||
| 114 | + "Editor" => EditorGUIUtility.IconContent("d_SceneAsset Icon"), | ||
| 115 | + "WindowsEditor" => EditorGUIUtility.IconContent("d_SceneAsset Icon"), | ||
| 116 | + "WindowsPlayer" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 117 | + "Android" => EditorGUIUtility.IconContent("BuildSettings.Android.Small"), | ||
| 118 | + "OSXPlayer" => EditorGUIUtility.IconContent("BuildSettings.Standalone.Small"), | ||
| 119 | + "IPhonePlayer" => EditorGUIUtility.IconContent("BuildSettings.iPhone.Small"), | ||
| 120 | + "WebGLPlayer" => EditorGUIUtility.IconContent("BuildSettings.WebGL.Small"), | ||
| 121 | + "tvOS" => EditorGUIUtility.IconContent("BuildSettings.tvOS.Small"), | ||
| 122 | + "Lumin" => EditorGUIUtility.IconContent("BuildSettings.Lumin.small"), | ||
| 123 | + "LinuxPlayer" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 124 | + "WSAPlayerX86" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 125 | + "WSAPlayerX64" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 126 | + "WSAPlayerARM" => EditorGUIUtility.IconContent("BuildSettings.Metro.Small"), | ||
| 127 | + "Switch" => EditorGUIUtility.IconContent("BuildSettings.Switch.Small"), | ||
| 128 | + "Stadia" => EditorGUIUtility.IconContent("BuildSettings.Stadia.small"), | ||
| 129 | + "EmbeddedLinuxArm64" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 130 | + "EmbeddedLinuxArm32" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 131 | + "EmbeddedLinuxX64" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 132 | + "EmbeddedLinuxX86" => EditorGUIUtility.IconContent("BuildSettings.EmbeddedLinux.Small"), | ||
| 133 | + "PS4" => EditorGUIUtility.IconContent("BuildSettings.PS4.Small"), | ||
| 134 | + "PS5" => EditorGUIUtility.IconContent("BuildSettings.PS5.Small"), | ||
| 135 | + "Devices" => EditorGUIUtility.IconContent("BuildSettings.Standalone.Small"), | ||
| 136 | + "<unknown>" => EditorGUIUtility.IconContent("BuildSettings.Broadcom"), | ||
| 137 | + _ => EditorGUIUtility.IconContent("BuildSettings.Broadcom") | ||
| 138 | + }; | ||
| 139 | + // *end-nonstandard-formatting* | ||
| 140 | + } | ||
| 141 | + | ||
| 140 | 142 | return content; | |
| 141 | 143 | } | |
| 144 | + | ||
| 145 | + private static GUIContent GetBuildTargetIcon(string name) | ||
| 146 | + { | ||
| 147 | + var target = BuildPipeline.GetBuildTargetByName(name); | ||
| 148 | + if (target == BuildTarget.NoTarget) | ||
| 149 | + { | ||
| 150 | + return null; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + var namedBuildTarget = Build.NamedBuildTarget.FromActiveSettings(target); | ||
| 154 | + if (namedBuildTarget == null) | ||
| 155 | + { | ||
| 156 | + return null; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + var buildPlatform = Build.BuildPlatforms.instance.BuildPlatformFromNamedBuildTarget(namedBuildTarget); | ||
| 160 | + if (buildPlatform == null || buildPlatform.smallIcon == null) | ||
| 161 | + { | ||
| 162 | + return null; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + return new GUIContent(buildPlatform.smallIcon); | ||
| 166 | + } | ||
| 142 | 167 | } | |
| 143 | 168 | ||
| 144 | 169 | internal class ConnectionDropDownItem : TreeViewItem | |
@@ -703,7 +728,7 @@ public override void OnGUI(Rect rect) | |||
| 703 | 728 | if (EditorGUI.Button(rect, Content.TroubleShoot, ConnectionDropDownStyles.sConnectionTrouble)) | |
| 704 | 729 | { | |
| 705 | 730 | var help = Help.FindHelpNamed("profiler-profiling-applications"); | |
| 706 | - Application.OpenURL(help); | ||
| 731 | + Help.BrowseURL(help); | ||
| 707 | 732 | } | |
| 708 | 733 | ||
| 709 | 734 | if (Event.current.type == EventType.MouseMove) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -249,7 +249,7 @@ void ShowGUI() | |||
| 249 | 249 | { | |
| 250 | 250 | // Known issue with Docs redirect - versioned pages might not open offline docs | |
| 251 | 251 | var help = Help.FindHelpNamed("UnityAccelerator"); | |
| 252 | - Application.OpenURL(help); | ||
| 252 | + Help.BrowseURL(help); | ||
| 253 | 253 | } | |
| 254 | 254 | GUILayout.EndHorizontal(); | |
| 255 | 255 | EditorGUI.BeginChangeCheck(); | |
@@ -328,7 +328,7 @@ void DoImportWorkerCount() | |||
| 328 | 328 | { | |
| 329 | 329 | // Known issue with Docs redirect - versioned pages might not open offline docs | |
| 330 | 330 | var help = Help.FindHelpNamed("ParallelImport"); | |
| 331 | - Application.OpenURL(help); | ||
| 331 | + Help.BrowseURL(help); | ||
| 332 | 332 | } | |
| 333 | 333 | ||
| 334 | 334 | GUILayout.EndHorizontal(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1094,6 +1094,7 @@ private void WritePreferences() | |||
| 1094 | 1094 | EditorPrefs.SetBool("GraphSnapping", m_GraphSnapping); | |
| 1095 | 1095 | ||
| 1096 | 1096 | EditorPrefs.SetBool("EnableConstrainProportionsTransformScale", m_EnableConstrainProportionsScalingForNewObjects); | |
| 1097 | + EditorPrefs.SetBool("UseInspectorExpandedState", AnnotationUtility.useInspectorExpandedState); | ||
| 1097 | 1098 | } | |
| 1098 | 1099 | ||
| 1099 | 1100 | private int CurrentEditorScalingValue | |
@@ -1184,6 +1185,7 @@ private void ReadPreferences() | |||
| 1184 | 1185 | m_GpuDevice = EditorPrefs.GetString("GpuDeviceName"); | |
| 1185 | 1186 | ||
| 1186 | 1187 | m_EnableConstrainProportionsScalingForNewObjects = EditorPrefs.GetBool("EnableConstrainProportionsTransformScale", false); | |
| 1188 | + AnnotationUtility.useInspectorExpandedState = EditorPrefs.GetBool("UseInspectorExpandedState", false); | ||
| 1187 | 1189 | ||
| 1188 | 1190 | if (EditorPrefs.HasKey(kContentScalePrefKey)) | |
| 1189 | 1191 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3268,7 +3268,8 @@ internal void HandleDragging(Event evt) | |||
| 3268 | 3268 | if (DragAndDrop.HasHandler(DragAndDropWindowTarget.sceneView)) | |
| 3269 | 3269 | { | |
| 3270 | 3270 | PickObject(ref pickedObject, ref parentTransform); | |
| 3271 | - DragAndDrop.visualMode = DragAndDrop.Drop(DragAndDropWindowTarget.sceneView, pickedObject, pivot, Event.current.mousePosition, parentTransform, isPerform); | ||
| 3271 | + Vector3 worldPosition = HandleUtility.PlaceObject(Event.current.mousePosition, out Vector3 placedPosition, out _) ? placedPosition : pivot; | ||
| 3272 | + DragAndDrop.visualMode = DragAndDrop.Drop(DragAndDropWindowTarget.sceneView, pickedObject, worldPosition, Event.current.mousePosition, parentTransform, isPerform); | ||
| 3272 | 3273 | dropHandled = DragAndDrop.visualMode != DragAndDropVisualMode.None; | |
| 3273 | 3274 | } | |
| 3274 | 3275 | ||
@@ -3287,7 +3288,9 @@ internal void HandleDragging(Event evt) | |||
| 3287 | 3288 | { | |
| 3288 | 3289 | if (pickedObject == null || parentTransform == null) | |
| 3289 | 3290 | PickObject(ref pickedObject, ref parentTransform); | |
| 3290 | - DragAndDrop.visualMode = InternalEditorUtility.SceneViewDrag(pickedObject, pivot, Event.current.mousePosition, parentTransform, isPerform); | ||
| 3291 | + | ||
| 3292 | + Vector3 worldPosition = HandleUtility.PlaceObject(Event.current.mousePosition, out Vector3 placedPosition, out _) ? placedPosition : pivot; | ||
| 3293 | + DragAndDrop.visualMode = InternalEditorUtility.SceneViewDrag(pickedObject, worldPosition, Event.current.mousePosition, parentTransform, isPerform); | ||
| 3291 | 3294 | } | |
| 3292 | 3295 | ||
| 3293 | 3296 | evt.Use(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments