Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Curve Spline be used for an in game level editor.
#18
(05-05-2023, 10:22 AM)_Aka_ Wrote: You can find them by searching for files with the asmdef extensions.
I tried and no files for Curvy seem to exist. I was able to find everything but curvy's asmdef.

Edit* I found the generate asmdef button in the Curvy options menu (after reading the changelog.) I'm wondering if this is an issue since without these files generated, its not possilbe to make the modifications you mentioned. 

You suggested either delete these files, or modify them to support the files I needed. Well it appears not having them just doesn't work and I'm forced to generate them and append my required data into it.

Edit** Another issue I came across was that I can't both reference the CurvySpline asdmf in my own code, and have it reference my code. (circular dependency.) I wish there was a simply way to override the parameters I need within my own code, or possibly inject what I need.


Edit*** Because I had the asset in the plugin folder, I was prevented from accessing my own namespaces without the asmdfs. (I forget if I added it to plugins myself or not)

Edit**** Even after being able to get the script I need to be referenced, it still wouldn't show up when generating. I'm not exactly sure what I need to do to get my own scripts to show on the spawned mesh.

Just to clarify, I'm convering Input GameObjects to a mesh.. oh. Create Gameobject is a thing. Aaaah thats why. Okay this makes more sense now. I'm stupid lol
   

(05-05-2023, 10:22 AM)_Aka_ Wrote: I doubt you will have to create/destroy generators every frame (do you?)


I create new generators based on the total segments. Each segment needs a generator so the longer the spline, the more I need. I'll look into a custom spots volume since I think this would def remove the need for this.

I've created a simple package with just 1 scene, 1 prefab. No scripts or anything. I didn't include Curvy either to avoid breaking the law.

You can see here that I have the generator added to the spline, rather then the spline added to the generator (like the default behavior when creating a generator and a spline input)
This is so I could share 1 spline across many generators.

Side request, is it possible to zoom in the Generator graph? And if not, is that functionality possibly able to be added?

(05-05-2023, 10:22 AM)_Aka_ Wrote: You have access to the source code of the spots producing modules (by order of complexity: InputSpots, InputTransformSpots and BuildVolumeSpots). You can skim through the code to see how things are done.

I see this, I was able to get my own custom module created, I'm just having trouble getting the right data. The VolumeSpots takes a rasterizedPath, which converts a normal path and its control points into something simpler for the actual spot generation. How would I get per segment data so I can modify the refresh. Specifically the endDistance/startDistance stuff 

   

This data is just the total length left over from the splineInput -> splineRasterizier. Which is cool, but I'd like to get the distances of each segment so I can apply that offset instead.
Maybe I need to perform the rasterization in this module per segment and have its source just be the splineInput. However that doesn't seem to fit the convention of this asset.


Attached Files
.unitypackage   Custom Spline To Generator Bug.unitypackage (Size: 14.71 KB / Downloads: 1)
Reply


Messages In This Thread
RE: Can Curve Spline be used for an in game level editor. - by Lupos - 05-05-2023, 12:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 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: