Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing once a release is decided this line will be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is done afterwards, by the person that will upgrade probuilder to the next version

### Fixed

- [PBLD-279] Fixed an issue where serialization warning would appear upon creating a probuilder shape.

## [6.0.8] - 2025-11-17

### Fixed
Expand Down
1 change: 1 addition & 0 deletions Runtime/Shapes/Arch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [arch](../manual/Arch.html) shape.
/// </summary>
[Shape("Arch")]
[System.Serializable]
public class Arch : Shape
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Cone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [cone](../manual/Cone.html) shape.
/// </summary>
[Shape("Cone")]
[System.Serializable]
public class Cone : Shape
{
/// <summary>
Expand All @@ -25,7 +26,7 @@ public class Cone : Shape
/// </summary>
[SerializeField]
bool m_Smooth = true;

internal override void SetParametersToBuiltInShape()
{
m_NumberOfSides = 8;
Expand Down
11 changes: 6 additions & 5 deletions Runtime/Shapes/Cube.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [cube](../manual/Cube.html) shape.
/// </summary>
[Shape("Cube")]
[System.Serializable]
public class Cube : Shape
{
/// <summary>
Expand All @@ -25,14 +26,14 @@ public class Cube : Shape
new Vector3(.5f, .5f, -.5f), // 6
new Vector3(-.5f, .5f, -.5f) // 7
};

/// <summary>
/// Defines a set of triangles forming a cube with reference to the k_CubeVertices array.
/// </summary>
static readonly int[] k_CubeTriangles = new int[] {
0, 1, 4, 5, 1, 2, 5, 6, 2, 3, 6, 7, 3, 0, 7, 4, 4, 5, 7, 6, 3, 2, 0, 1
};

internal override void SetParametersToBuiltInShape() { }

/// <inheritdoc/>
Expand All @@ -47,14 +48,14 @@ public override Bounds RebuildMesh(ProBuilderMesh mesh, Vector3 size, Quaternion

for (int i = 0; i < k_CubeTriangles.Length; i++)
points[i] = rotation * Vector3.Scale(k_CubeVertices[k_CubeTriangles[i]], Math.Abs(size));

mesh.GeometryWithPoints(points);

UvUnwrapping.SetAutoUV(mesh, mesh.facesInternal, true);
foreach (var face in mesh.facesInternal)
face.uv = new AutoUnwrapSettings(face.uv) { anchor = AutoUnwrapSettings.Anchor.UpperLeft};
mesh.RefreshUV(mesh.faces);

return mesh.mesh.bounds;
}
}
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Cylinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [cylinder](../manual/Cylinder.html) shape.
/// </summary>
[Shape("Cylinder")]
[System.Serializable]
public class Cylinder : Shape
{
/// <summary>
Expand All @@ -30,7 +31,7 @@ public class Cylinder : Shape
/// </summary>
[SerializeField]
bool m_Smooth = true;

internal override void SetParametersToBuiltInShape()
{
m_AxisDivisions = 8;
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [door](../manual/Door.html) shape.
/// </summary>
[Shape("Door")]
[System.Serializable]
public class Door : Shape
{
/// <summary>
Expand All @@ -30,7 +31,7 @@ internal override void SetParametersToBuiltInShape()
m_DoorHeight = 0.5f;
m_LegWidth = 0.75f;
}

/// <inheritdoc/>
public override void CopyShape(Shape shape)
{
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Pipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [pipe](../manual/Pipe.html) shape.
/// </summary>
[Shape("Pipe")]
[System.Serializable]
public class Pipe : Shape
{
/// <summary>
Expand Down Expand Up @@ -39,7 +40,7 @@ public class Pipe : Shape
/// </summary>
[SerializeField]
bool m_Smooth = true;

internal override void SetParametersToBuiltInShape()
{
m_Thickness = 0.25f;
Expand Down
1 change: 1 addition & 0 deletions Runtime/Shapes/Plane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [plane](../manual/Plane.html) shape.
/// </summary>
[Shape("Plane")]
[System.Serializable]
public class Plane : Shape
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Prism.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [prism](../manual/Prism.html) shape.
/// </summary>
[Shape("Prism")]
[System.Serializable]
public class Prism : Shape
{
internal override void SetParametersToBuiltInShape() { }

/// <inheritdoc/>
public override void CopyShape(Shape shape) {}

Expand Down
5 changes: 3 additions & 2 deletions Runtime/Shapes/Sphere.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [sphere](../manual/Sphere.html) shape.
/// </summary>
[Shape("Sphere")]
[System.Serializable]
public class Sphere : Shape
{
static readonly Vector3[] k_IcosphereVertices = new Vector3[12]
Expand Down Expand Up @@ -67,7 +68,7 @@ public class Sphere : Shape
int m_BottomMostVertexIndex = 0;

/// <summary>
/// Determines whether to smooth the edges of the polygons.
/// Determines whether to smooth the edges of the polygons.
/// This property is enabled by default.
/// </summary>
[SerializeField]
Expand All @@ -78,7 +79,7 @@ internal override void SetParametersToBuiltInShape()
m_Subdivisions = 2;
m_Smooth = false;
}

/// <inheritdoc/>
public override void CopyShape(Shape shape)
{
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Shapes/Sprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [sprite](../manual/Sprite.html) (a single-unit plane shape).
/// </summary>
[Shape("Sprite")]
[System.Serializable]
public class Sprite : Shape
{
internal override void SetParametersToBuiltInShape() { }

/// <inheritdoc/>
public override void CopyShape(Shape shape) {}

Expand Down
9 changes: 5 additions & 4 deletions Runtime/Shapes/Stairs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum StepGenerationType
/// Represents a basic [stairs](../manual/Stairs.html) shape.
/// </summary>
[Shape("Stairs")]
[System.Serializable]
public class Stairs : Shape
{
/// <summary>
Expand Down Expand Up @@ -51,12 +52,12 @@ public class Stairs : Shape
[Range(1, 256)]
[SerializeField]
int m_StepsCount = 10;
internal int stepsCount
internal int stepsCount
{
get => m_StepsCount;
set => m_StepsCount = value;
}

/// <summary>
/// Determines whether to force every step to be the exactly the same height. If disabled,
/// the height of the last step is smaller than the others depending on the remaining height.
Expand All @@ -78,7 +79,7 @@ internal int stepsCount
[SerializeField]
float m_Circumference = 0f;

internal float circumference
internal float circumference
{
get => m_Circumference;
set => m_Circumference = value;
Expand All @@ -103,7 +104,7 @@ public bool sides

[SerializeField, Min(0f)]
float m_InnerRadius;
internal float innerRadius
internal float innerRadius
{
get => m_InnerRadius;
set => m_InnerRadius = value;
Expand Down
1 change: 1 addition & 0 deletions Runtime/Shapes/Torus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace UnityEngine.ProBuilder.Shapes
/// Represents a basic [torus](../manual/Torus.html) shape.
/// </summary>
[Shape("Torus")]
[System.Serializable]
public class Torus : Shape
{
/// <summary>
Expand Down