partial void OnClicked(int component) { Vector3Distribution distribution = Value; if (DistributionType == PropertyDistributionType.Curve) { AnimationCurve[] curves = AnimationUtility.SplitCurve3D(distribution.GetMinCurve()); if (component < curves.Length) { CurveEditorWindow.Show(curves[component], (success, curve) => { if (!success) { return; } curves[component] = curve; Vector3Curve compoundCurve = AnimationUtility.CombineCurve3D(curves); Value = new Vector3Distribution(compoundCurve); OnChanged?.Invoke(); OnConfirmed?.Invoke(); }); } } else if (DistributionType == PropertyDistributionType.RandomCurveRange) { AnimationCurve[] minCurves = AnimationUtility.SplitCurve3D(distribution.GetMinCurve()); AnimationCurve[] maxCurves = AnimationUtility.SplitCurve3D(distribution.GetMaxCurve()); if (component < minCurves.Length && component < maxCurves.Length) { CurveEditorWindow.Show(minCurves[component], maxCurves[component], (success, minCurve, maxCurve) => { if (!success) { return; } minCurves[component] = minCurve; maxCurves[component] = maxCurve; Vector3Curve minCompoundCurves = AnimationUtility.CombineCurve3D(minCurves); Vector3Curve maxCompoundCurves = AnimationUtility.CombineCurve3D(maxCurves); Value = new Vector3Distribution(minCompoundCurves, maxCompoundCurves); OnChanged?.Invoke(); OnConfirmed?.Invoke(); }); } } }
private static extern void Internal_TDistribution3(Vector3Distribution managedInstance, Vector3Curve minCurve, Vector3Curve maxCurve);
private static extern void Internal_TDistribution2(Vector3Distribution managedInstance, Vector3Curve curve);
private static extern void Internal_TDistribution1(Vector3Distribution managedInstance, ref Vector3 minValue, ref Vector3 maxValue);
private static extern void Internal_TDistribution0(Vector3Distribution managedInstance, ref Vector3 value);
private static extern void Internal_TDistribution(Vector3Distribution managedInstance);
private static extern void Internal_setInitialRotation3D(IntPtr thisPtr, Vector3Distribution value);
private static extern void Internal_setValue(IntPtr thisPtr, Vector3Distribution value);