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
  Newbie Question: Uniformly increase spacing between volume spots? SAMYTHEBIGJUICY 1 4 09-01-2023, 03:38 PM
Last Post: _Aka_
  Changing material of Volume spot at creation? _RicO 5 11 08-11-2023, 09:39 AM
Last Post: _Aka_
  Volume Spots not even when "drawing" spline too fast at runtime. _RicO 9 11 08-11-2023, 09:22 AM
Last Post: _Aka_
  How to generate mesh on spline at runtime? _RicO 8 12 07-19-2023, 08:55 AM
Last Post: _Aka_

Forum Jump: