Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] LegacyConnectionAny and GetAllConnectionsControlPoints();
#1
Hi,

I have 2 small issues with a obsolete and none definition while updating to 2.0.4  I thought about to read LegacyConnectionAny already in the forum but [search] didn't find.

[Image: obsolete.jpg]

Any solution for this?
Thanks, Roger
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#2
Solved: Used a different approach.

Code:
public override void OnClick() {
           var selectedCP = DTSelection.GetAs<CurvySplineSegment>();
           var cps = new List<CurvySplineSegment>();
           var connection = selectedCP.Connection;
           cps.Add(selectedCP);
           if (connection != null) {
               foreach (var ccp in connection.ControlPoints) {
                   if (!cps.Contains(ccp)) {
                       cps.Add(ccp);
                   }
               }
           }
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NullReferenceException ComponentPool.cs:36 [SOLVED] ionside 6 8,632 01-11-2018, 12:48 AM
Last Post: _Aka_
  GetComponent<SplineController>() doesn't work? [SOLVED] ionside 0 2,244 07-10-2016, 02:37 AM
Last Post: ionside
  [Solved] SplineController skips on CurvySpline.ControlPoints[0].Delete() cpoll 6 10,613 02-15-2016, 04:56 PM
Last Post: cpoll
  [SOLVED] Additional fields on a Connection Trainzland 6 9,947 01-27-2016, 07:18 PM
Last Post: Jake

Forum Jump: