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
Question Volume Spots inter group distance Sacryn 1 3 02-27-2024, 04:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  Add noise to spline controller movement DekoGames 2 10 02-06-2024, 01:28 PM
Last Post: DekoGames
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_

Forum Jump: