Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animating a shape on along a spline will not playback in scene or game views
#2
Hi

TL;DR:
Add this script to your module:
Code:
using FluffyUnderware.Curvy.Generator;
using UnityEngine;

public class Dirtier : MonoBehaviour
{
    void Update() =>
        GetComponent<CGModule>().Dirty = true;
}



The issue is that the animator seems to not call Unity's OnValidate when changing the value of a property. OnValidate is where the module gets dirty, meaning that the module is marked as needing to trigger a refresh of the generator. So no OnValidate -> no dirtying -> no refreshing.
The script provided will artificially dirty the module at every update. Disable the script if you are not animating the module, since that will lead to unnecessary updates generator.
You can use a similar that will dirty the whole generator (CurvyGenerator.Dirty) instead of a single module.

Did this help?
If and when you feel like it, please leave a review for the asset, that helps a lot
Have a nice day
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: Animating a shape on along a spline will not playback in scene or game views - by _Aka_ - 05-01-2023, 11:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get length starting from one spline to connected nth spline Dragon-3623 1 1 05-14-2024, 04:52 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 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_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: