Skip to content

Commit a7a18cb

Browse files
author
Karl Henkel
committed
fix compile errors 2019.4. fixed package validation errors.
1 parent ab7ebbd commit a7a18cb

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

Debug/Editor/Guides.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static class GuidesSettingsProvider
99
{
1010
const string k_PreferencesPath = "Preferences/Scene Guides";
1111
static Settings s_Settings;
12-
public static Settings settings => s_Settings ??= new Settings("com.unity.scene-guides");
12+
public static Settings settings => s_Settings ?? (s_Settings = new Settings("com.unity.scene-guides"));
1313

1414
[SettingsProvider]
1515
static SettingsProvider CreateSettingsProvider()
@@ -89,11 +89,19 @@ static void DrawLine(Vector3 from, Vector3 to, Color color, float occludedTint =
8989
{
9090
Handles.color = color;
9191
Handles.zTest = CompareFunction.LessEqual;
92+
#if UNITY_2021_1_OR_NEWER
9293
Handles.DrawLine(from, to, thickness);
94+
#else
95+
Handles.DrawLine(from, to);
96+
#endif
9397

9498
Handles.color = color * occludedTint;
9599
Handles.zTest = CompareFunction.Greater;
100+
#if UNITY_2021_1_OR_NEWER
96101
Handles.DrawLine(from, to, thickness);
102+
#else
103+
Handles.DrawLine(from, to);
104+
#endif
97105
}
98106
}
99107
}

Runtime/Core/MeshUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ internal static void RestoreParticleSystem(ProBuilderMesh pbmesh)
662662
#endif
663663
}
664664

665-
public static Bounds GetBounds(this ProBuilderMesh mesh)
665+
internal static Bounds GetBounds(this ProBuilderMesh mesh)
666666
{
667667
if (mesh.mesh != null)
668668
return mesh.mesh.bounds;

Runtime/MeshOperations/MeshTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static class MeshTransform
1111
/// <param name="mesh">The <see cref="ProBuilderMesh"/> to adjust vertices for a new pivot point.</param>
1212
/// <param name="pivotLocation">The new pivot point is either the center of the mesh bounding box, or
1313
/// the bounds center - extents.</param>
14-
public static void SetPivot(this ProBuilderMesh mesh, PivotLocation pivotLocation)
14+
internal static void SetPivot(this ProBuilderMesh mesh, PivotLocation pivotLocation)
1515
{
1616
var bounds = mesh.GetBounds();
1717
var pivot = pivotLocation == PivotLocation.Center ? bounds.center : bounds.center - bounds.extents;

0 commit comments

Comments
 (0)