Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Including scripts on created meshes
Hi -- big fan of this asset, which powers a lot of the procedural generation in my roguelike/racer. I use Curvy to generate prefab road chunks that I mix and match in my level generator. In Curvy 7, I was able to add scripts to created meshes (generated by the Create Mesh tool) which then were automatically passed on to the generated meshes created at runtime. In the editor, I simply added the scripts to the created mesh (contained within a prefab with a Curvy spline), and the scripts appeared on the created mesh in game accordingly.

Since I updated to Curvy 8, this approach doesn't work anymore. I will add the scripts to the created mesh object contained with in a Curvy spline prefab. But the moment I save the prefab and spawn it in game (or return to the prefab in editor), the Create Mesh tool creates a new mesh that is missing the scripts I added.

There are a number of tiles in my game that require these additional scripts to be added to generated meshes. I suppose I could contain the scripts on another object in these prefabs and reference them to the child of the Create Mesh object, but for simplicity's sake it would be great if I could add these scripts to the created meshes in a consistent way like I could with Curvy 7. 

Any tips here? Thanks!

Messages In This Thread
Including scripts on created meshes - by lewsk55 - 10-04-2022, 02:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  Cant Generate Meshes At Runtime alms94 5 22 01-26-2024, 11:27 AM
Last Post: _Aka_
  Collider doesn't get created by the CreateMesh Module pako88 5 10 12-26-2023, 11:13 AM
Last Post: _Aka_
  Disable rebuild of meshes in dynamic mode Zilk1 1 8 10-04-2023, 09:50 AM
Last Post: _Aka_

Forum Jump: