Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Curve Spline be used for an in game level editor.
#12
(05-03-2023, 02:31 PM)Lupos Wrote: Or modify 1 spot module directly and fill that with the data I need by figuring out manually the spaces between the points I need?

To define the positions of the spots on the spline, use the CurvySpline.InterpolateByDistance and CurvySplineSegment.Length methods to build you code.

(05-03-2023, 02:31 PM)Lupos Wrote: Which would you recommend overall?

Multiple spline rasterizers is the fastest to implement. If you feel that you might need modifying the logic behind defining where to put objects, then using a custom spot module would be better I believe.

(05-03-2023, 02:31 PM)Lupos Wrote: Edit* In the createGenerator example, are the generators automatically pooled? Or is that something I'll need to take care of?

It is automatically pooled.

(05-03-2023, 02:31 PM)Lupos Wrote: Edit** When using my own prefabs with their own logic, is it possible to call specific functions on generation? Or do I move logic into OnEnable of the component?

You can use the OnBeforeRefresh and/or OnRefresh events of the modules to execute your code at each generation.

(05-03-2023, 02:31 PM)Lupos Wrote: Edit*** I keep getting a "The given key "Path" was no present in the dictionary. For the volume spots module when I try connecting the InputPath's "Path".  No matter what combination of "Path" or "Volume" I'd try would result in the error.
(Turns out you have to use "Path/Volume") The documentation made it seem like either or is fine. Or that Volume/Path would work. My bad.
 
The parameter to use is the slot's name, which can be different than the slot's display name. Example with BuildVolumeSpots.InPath:
Code:
        [InputSlotInfo(
            typeof(CGPath),
            Name = "Path/Volume",
            DisplayName = "Volume/Rasterized Path"
        )]

        public CGModuleInputSlot InPath = new CGModuleInputSlot();

(05-03-2023, 02:31 PM)Lupos Wrote: The documentation made it seem like either or is fine. Or that Volume/Path would work.
  
That was meant to mean that the type of the input can be either a path or a volume. In code world, it should be clear since the type of accepted data for that slot is CGPath, and CGVolume inherits from CGPath. But for the documentation not related to code, it has to be clarified.

(05-03-2023, 02:31 PM)Lupos Wrote: My bad.

Mine too for not making things clearer.

(05-03-2023, 02:31 PM)Lupos Wrote: Incredible support thank you so much, I'll be sure to leave a solid review.
 
Well, you jinxed me, I took longer than usual to answer you today Big Grin
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: Can Curve Spline be used for an in game level editor. - by _Aka_ - 05-04-2023, 09:06 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: