Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
follow spline on instantiation
#2
nvm, this seems to work:


Code:
 public CurvySpline Spline
       {
           get
           {
               var mySpline = GameObject.FindGameObjectWithTag(splinetag);
               var m_Spline = mySpline.gameObject.GetComponent("CurvySpline") as CurvySpline;


               return m_Spline;
           }
           set
           {
               if (m_Spline != value)
               {
                   if (m_Spline != null)
                       UnbindEvents();

                   m_Spline = value;
                   if (m_Spline)
                       BindEvents();
               }
           }
       }
Reply


Messages In This Thread
follow spline on instantiation - by pez111 - 11-12-2017, 11:10 PM
RE: follow spline on instantiation - by pez111 - 11-13-2017, 07:34 PM
RE: follow spline on instantiation - by Jake - 11-15-2017, 06:42 PM
RE: follow spline on instantiation - by pez111 - 11-16-2017, 11:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Additional offset to Follow behaviour Ayyappa 3 7 04-30-2024, 01:35 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: