08-10-2023, 10:41 AM
Hi
Until then, have a nice day
- Assigning the material to the prefab at runtime leads to that problem because the material you assigned is runtime created, meaning it stops existing once you exit play mode, while the prefab is persistent.
- A solution is to use the Input Meshes module instead of the Input GameObjects. This module allows you to set the material as you wish.
- The solution you thought about, assigning a material to each created mesh, while is not the best solution, is possible. Here is how to listen on OnRefresh event of a generator. Same event exists also for each module.
Code:using FluffyUnderware.Curvy;
using FluffyUnderware.Curvy.Generator;
using UnityEngine;
public class Test : MonoBehaviour
{
void Start()
{
GetComponent<CurvyGenerator>().OnRefresh.AddListenerOnce(WhenGeneratorIsRefreshed);
}
private void WhenGeneratorIsRefreshed(CurvyCGEventArgs arg0)
{
Debug.Log("Refeshed");
}
} - Allow me to ask questions about your issue with leaving a review. Can you try to download the asset from both the asset store (on browser), and from the package manager window (which lists assets too if you select that in the selector). Is the issue still present? If so, can you please send me the invoice number so that I contact Unity's customer support? You probably are not the only one with this issue.
- Thanks a lot for thinking about donation. You really don't have to, but if you really want to, I will send you details via private message.
Until then, 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.