Skip to content

Commit 42b88f3

Browse files
author
Karl Henkel
authored
Merge branch 'v4.4/master' into v4.4/fix-preview-shape-material
2 parents 10ac668 + b590c0c commit 42b88f3

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [4.4.2] - 2021-01-08
99

1010
- Fixed the insertion of new points on a Poly Shape being unreliable.
11+
- Fixed rect selection not working with Universal Render Pipeline.
1112
- [case: 1281254] Fixed shader warning in URP for UNITY_PASS_FORWARDBASE macro redefinition.
1213
- [case: 1294866] Fix annotation warning on InitializeOnLoad call.
1314
- [case: 1304561] Fix `Shape Preview` not rendering with the blue preview tint.

Runtime/Core/SelectionPickerRendererStandard.cs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using UObject = UnityEngine.Object;
1+
using UnityEditor;
2+
using UnityEngine.Rendering;
3+
using UObject = UnityEngine.Object;
24

35
namespace UnityEngine.ProBuilder
46
{
@@ -36,13 +38,10 @@ public Texture2D RenderLookupTexture(
3638
renderCam.enabled = false;
3739
renderCam.clearFlags = CameraClearFlags.SolidColor;
3840
renderCam.backgroundColor = Color.white;
39-
#if UNITY_5_6_OR_NEWER
4041
renderCam.allowHDR = false;
4142
renderCam.allowMSAA = false;
4243
renderCam.forceIntoRenderTexture = true;
43-
#endif
4444

45-
#if UNITY_2017_1_OR_NEWER
4645
RenderTextureDescriptor descriptor = new RenderTextureDescriptor()
4746
{
4847
width = _width,
@@ -59,16 +58,6 @@ public Texture2D RenderLookupTexture(
5958
msaaSamples = 1
6059
};
6160
RenderTexture rt = RenderTexture.GetTemporary(descriptor);
62-
#else
63-
RenderTexture rt = RenderTexture.GetTemporary(
64-
_width,
65-
_height,
66-
16,
67-
renderTextureFormat,
68-
RenderTextureReadWrite.Linear,
69-
1);
70-
#endif
71-
7261
RenderTexture prev = RenderTexture.active;
7362
renderCam.targetTexture = rt;
7463
RenderTexture.active = rt;
@@ -91,7 +80,16 @@ public Texture2D RenderLookupTexture(
9180
RenderTexture.active.width));
9281
*/
9382
#endif
83+
84+
// URP does not support replacement shaders or custom passes from code, so for now it is necessary to
85+
// force the pipeline to built-in when rendering. In editor it may be possible to use Handles.DrawCamera
86+
// to avoid disposing and re-assigning the pipeline, as the RenderEditorCamera function has some logic
87+
// that switches rendering path if replacement shaders are in use, but I wasn't able to get that
88+
// approach to work without also requiring that the drawing happen during a repaint event.
89+
var currentRenderPipeline = GraphicsSettings.renderPipelineAsset;
90+
GraphicsSettings.renderPipelineAsset = null;
9491
renderCam.RenderWithShader(shader, tag);
92+
GraphicsSettings.renderPipelineAsset = currentRenderPipeline;
9593

9694
Texture2D img = new Texture2D(_width, _height, textureFormat, false, false);
9795
img.ReadPixels(new Rect(0, 0, _width, _height), 0, 0);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.unity.probuilder",
33
"displayName": "ProBuilder",
4-
"version": "4.4.1",
4+
"version": "4.4.2",
55
"unity": "2018.3",
66
"description": "Build, edit, and texture custom geometry in Unity. Use ProBuilder for in-scene level design, prototyping, collision meshes, all with on-the-fly play-testing.\n\nAdvanced features include UV editing, vertex colors, parametric shapes, and texture blending. With ProBuilder's model export feature it's easy to tweak your levels in any external 3D modelling suite.",
77
"keywords": [

0 commit comments

Comments
 (0)