Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing material of Volume spot at creation?
#2
Hi
  1. 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.
  2. 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.
  3. 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");
        }
    }
  4. 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.
  5. 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.
Will answer you other post soon.
Until then, have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
RE: Changing material of Volume spot at creation? - by _Aka_ - 08-10-2023, 10:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace deform mesh on volume spots Kokoriko49 1 2,311 06-09-2025, 06:49 PM
Last Post: _Aka_
Photo Volume Spots problem with spacing Bond007 3 2,529 01-20-2025, 12:27 PM
Last Post: _Aka_
  Duplicate Volume references become null joebain 5 3,224 11-18-2024, 10:46 AM
Last Post: joebain
  Nested Spline Volume Spot Instantiation merobbins5 3 2,837 07-26-2024, 09:58 AM
Last Post: _Aka_

Forum Jump: