Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding OnSwitch event via Script
#1
Hello, I am struggling with adding an OnSwitch event to my Spline Controller via script.

what i tried :
Code:
  private void Init()
        {
        

            CurvySplineMoveEvent curvySplineMoveEvent = new CurvySplineMoveEvent();
            curvySplineMoveEvent.AddListener(OnSwitch);

            controller = gameObject.AddComponent<SplineController>();
            controller.OnSwitch = curvySplineMoveEvent;

        }

        private void OnSwitch(CurvySplineMoveEventArgs args)
        {
            Debug.Log("switch!");
        }
Reply


Messages In This Thread
Adding OnSwitch event via Script - by NovoNG - 01-09-2021, 12:00 PM
RE: Adding OnSwitch event via Script - by _Aka_ - 01-09-2021, 12:58 PM
RE: Adding OnSwitch event via Script - by NovoNG - 01-09-2021, 03:02 PM
RE: Adding OnSwitch event via Script - by _Aka_ - 01-09-2021, 05:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_
  Adding Begining and End Mesh to Spline velikizlivuk 2 4 08-02-2023, 11:10 AM
Last Post: velikizlivuk
  Way to get objects script from generator Lupos 10 29 05-26-2023, 09:51 AM
Last Post: _Aka_
  Adding a CP breaks the mesh lethekun 3 6 05-25-2022, 01:53 AM
Last Post: _Aka_

Forum Jump: