Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avoiding runtime GC allocations on control point position change
#2
Hi,
I tried to reproduce your result but couldn't. Here is a script I attached to a spline:

using FluffyUnderware.Curvy;
using UnityEngine;

public class tesT : MonoBehaviour
{
void Update()
{
var controlPoints = this.GetComponent<CurvySpline>().ControlPointsList;

for (int i = 0; i < controlPoints.Count; i++)
{
controlPoints[i].SetPosition(Vector3.forward);
}
}
}


At runtime, there were no allocations from this script. Can you please profile with the Deep Profiling option, and then send me a screenshot of the memory usage of the problematic Curvy Spline method(s)?

Thank you
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Avoiding runtime GC allocations on control point position change - by _Aka_ - 02-05-2024, 10:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 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_
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: