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
  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
  Connect two spline at runtime Doomchecker 2 12 05-18-2022, 04:12 PM
Last Post: Doomchecker
  Outer space simple vehicle controller itzikpel 1 7 04-29-2022, 03:05 PM
Last Post: _Aka_

Forum Jump: