Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input Spline Shapes from Prefabs destroys graph
#1

I have been having a strange behavior in my project that I couldn't explain. Sometimes my CurvyGenerator graph would, for some reason I couldn't decern, destroy the graph. What I mean by that is that ALL of the links between ALL of the modules would disappear. No dragging of paths from one module to the other would now create any links between any more other modules. I would have to destroy the generator and create it from scratch.

It has recently prevented me for moving forward in a new architectural direction because it always happens within it.  So I have spent a couple of days trying to isolate what is its cause. It took me a while to isolate because my newer architecture had many items on top that I suspected 'might' be the cause. But is was not.

Load the attached project adding Curvy library to it. The follow these steps:

  1. First Play the project and see how it runs
  2. Press the "Instantiate" button in the Game window which creates a generator under GenTest in the hierarchy and shows the results
  3. In the Hierarchy window, click on TrackProfileGen
  4. Click on "Edit Graph' button to see that the graph. All links are in place.
  5. Select "Input Spline Shape
  6. Click on "Shape" to see that "defaultProfile" in the Hierarchy is being used
  7. Exit Play mode

  1. In the "Hierarchy" window, select "defaultProfile"
  2. Drag the "defaultProfile" down to the folder "Resources/TrackProfiles". This will create a prefab out to the "defaultProfile"
  3. In the Hierarchy window, click on TrackProfileGen/Input Spline Shape
  4. Replace the Input Spline Shape's "Shape by dragging the shape from step 9) "Resources/TrackProfiles/defaultProfile" to the Shape field
  5. Click on the "Shape" field to confirm that the Input Spline Shape is now referring to the resource

  1. Play the project
  2. Press the "Instantiate" button in the Game window
  3. Notice that nothing is shown in the Game window but the generator was still created in the hierarchy
  4. In the Hierarchy window, click on TrackProfileGen
  5. Click on "Edit Graph' button to see that the graph. All links are missing
  6. Try to dray any paths between modules. They can not be created.

Replacing an Input Spline Shape from the Hierarchy with the identical Shape from a Prefab destroys the graph!
I need to assign Shapes at runtime from prefabs.


Attached Files
.zip   Assets.zip (Size: 78.22 KB / Downloads: 2)
Reply


Messages In This Thread
Input Spline Shapes from Prefabs destroys graph - by tairoark - 11-22-2022, 08:10 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_
  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_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: