Sculpting Pro APi Documentation
Sculpting Pro Procedural Primitives
Collection of simple geometry - procedural primitives. This script sums up all the simple geometry types that the plugin provides.
You can access to each geometry class by calling its static method 'GetPrimitive'.
Public Methods
public static GameObject ProceduralPrimitives_Generate()
// Generate a new gameObject with procedural primitives component
public void ProceduralPrimitives_Generate(PrimitiveType shape)
// Generate a specific primitive type for this mesh filter
Examples
The following paragraph contains an example script that uses the SculptingPro_Primitives script.
using UnityEngine;
using SculptingPro.Geometry;

/// <summary>
/// Example script for getting the procedural primitives.
/// </summary>
public class TestScript : MonoBehaviour
{
private SculptingPro_ProceduralPrimitives prim;

private void Start()
 {
  prim = SculptingPro_ProceduralPrimitives.ProceduralPrimitives_Generate().GetComponent<SculptingPro_ProceduralPrimitives>();
 }
}
You can access the actual component parameters and methods and control the script through the code.
using UnityEngine;
using SculptingPro.Geometry;

/// <summary>
/// Example script for getting the procedural primitives and controlling its content.
/// </summary>
public class TestScript : MonoBehaviour
{
public SculptingPro_ProceduralPrimitives.PrimitiveType primitiveType;
private SculptingPro_ProceduralPrimitives prim;

private void Start()
 {
  prim = SculptingPro_ProceduralPrimitives.ProceduralPrimitives_Generate().GetComponent<SculptingPro_ProceduralPrimitives>();
 }

private void Update()
 {
  prim.ProceduralPrimitives_Generate(primitiveType);
 }
}