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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Volume Spots problem with spacing Bond007 3 241 01-20-2025, 12:27 PM
Last Post: _Aka_
  Duplicate Volume references become null joebain 5 310 11-18-2024, 10:46 AM
Last Post: joebain
  Can't set CG Path Controller j95677 4 254 10-04-2024, 06:55 PM
Last Post: j95677
  Nested Spline Volume Spot Instantiation merobbins5 3 259 07-26-2024, 09:58 AM
Last Post: _Aka_

Forum Jump: