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()
public void ProceduralPrimitives_Generate(PrimitiveType shape)
Examples
The following paragraph contains an example script that uses the SculptingPro_Primitives script.
using UnityEngine;
using SculptingPro.Geometry;
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;
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);
}
}