Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to assign a Volume to a controller at runtime using API
#1
Hi

You can do that by assigning a new instance to the VolumeController.Volume property. Here is an example script:


Code:
public class ExampleScript: MonoBehaviour
{
    public VolumeController VolumeController;

    public BuildShapeExtrusion ShapeExtrusion;

    void Start()
    {
        VolumeController.Volume = new CGDataReference(ShapeExtrusion, "Volume");
    }
}

I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to generate bevels at volume caps GameJazz 3 4 12-17-2022, 10:20 AM
Last Post: _Aka_
  Volume Mesh bug based on whether input spline is closed GameJazz 2 10 12-15-2022, 08:32 AM
Last Post: GameJazz
  Volume Mesh material tairoark 3 21 06-16-2022, 12:29 PM
Last Post: _Aka_
Photo Volume Spot placement tairoark 2 15 06-14-2022, 10:06 PM
Last Post: tairoark

Forum Jump: