Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Referencing Paths in Editor
#3
Ok, reviewed it. There were some issues I've corrected for 2.1.1, also improved API of CGDataReference. Changes to several files were needed, so I'll send them to you privately. After you apply the changed files, the following test script will work (used to set the Path from "None" to an existing module at startup):

Code:
using UnityEngine;
using System.Collections;
using FluffyUnderware.Curvy.Generator;
using FluffyUnderware.Curvy.Generator.Modules;
using FluffyUnderware.Curvy.Controllers;


public class test : MonoBehaviour {
   public CurvyGenerator Gen;
   public PathController Ctl;
   // Use this for initialization
IEnumerator  Start () {
       Ctl = GetComponent<PathController>();
       if (Gen)
       {
           while (!Gen.IsInitialized)
               yield return 0;
           var mod = Gen.FindModules<BuildRasterizedPath>()[0];
           Ctl.Path = new CGDataReference(mod, "Path");
       }
}
}
Reply


Messages In This Thread
Referencing Paths in Editor - by johnnemann - 06-06-2016, 11:28 PM
RE: Referencing Paths in Editor - by Jake - 06-09-2016, 07:53 PM
RE: Referencing Paths in Editor - by Jake - 06-15-2016, 01:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Splines Built In Editor Undo causes issues. Lupos 1 9 10-02-2023, 08:52 AM
Last Post: _Aka_
  Can Curve Spline be used for an in game level editor. Lupos 30 71 06-03-2023, 10:58 AM
Last Post: _Aka_
Brick Extending Curvy to make a Hallway editor. JacobSL 5 396 02-13-2023, 09:29 AM
Last Post: _Aka_
  Generator window causes my editor to lag every couple seconds niuage 1 3 03-28-2022, 11:05 AM
Last Post: _Aka_

Forum Jump: