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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace deform mesh on volume spots Kokoriko49 1 2,335 06-09-2025, 06:49 PM
Last Post: _Aka_
Photo Volume Spots problem with spacing Bond007 3 2,567 01-20-2025, 12:27 PM
Last Post: _Aka_
  Duplicate Volume references become null joebain 5 3,275 11-18-2024, 10:46 AM
Last Post: joebain
  Can't set CG Path Controller j95677 4 3,271 10-04-2024, 06:55 PM
Last Post: j95677

Forum Jump: