06-15-2016, 01:43 PM
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");
}
}
}