Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline Gizmos & Segments Invisible while Drawing
#1
Video 
I'm currently using Unity 2021.3.19f1 and I started having a strange issue in my project when drawing splines in the Scene view.  If I draw a spline in the Scene view with no object in the hierarchy selected, everything works as expected - with Ctrl held down, I see each control point gizmo show up as I click with the mouse and the segment lines appear between the control points.

However, if I have an object selected in the hierarchy to contain the spline, when I draw the spline it doesn't show the control point gizmos or the segments between the control points.  Selecting any control point or the spline object doesn't change the display, but if I select the parent object containing the spline, the control point gizmos and segments show up.  Afterwards, everything appears to work as normal until I go to draw another spline in a containing object.

I have attached a short video to show the behavior.  Any ideas why this might happen?


Attached Files
.zip   Curvy Issue.zip (Size: 1.49 MB / Downloads: 1)
Reply
#2
Hi
I could not reproduce the issue. Can you please create a new empty project, and make a reproduction case there and send it to me?
Also, what version of Unity do you have?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Apologies, I should have thought of doing that before.  Blush  After some more testing, here's what I found:
  • I'm using Unity 2021.3.19f1 with Curvy 8.3.0 to produce the issue.
  • It occurred to me that I had updated Unity in the last week.  I believe I was on Unity 2021.3.16f1 previously, I hadn't noticed any issues at that point.  Unfortunately, I already dumped 16f1 so I don't have it for testing any more.
  • I do have Unity 2020.3.15f2 installed.  Created a clean project with only Curvy installed, I could not produce the issue, everything appears to work fine.
  • Created a clean project in Unity 2021.3.19f1 with only Curvy installed and can produce the issue at will.  That said, it appears to be some kind of refresh issue as it only occurs visually until something refreshes the parent object (e.g. clicking the parent object containing the spline, load another scene then reload the problem scene, stop/start Unity).  So I'm thinking my test project won't show anything for you, but still happy to send it along.

I saw you removed the attachment quota on the post, but it's around 105MB.  When I tried upload the first time, it didn't appear to show up after sitting for several minutes.  When I tried to post, the forum returned a maximum size error and then the page just spun and I lost the original post.  Sad  If you still want the test project, looks like I'll need to get it to you another way.

Thanks for your help.
Reply
#4
Hi
I managed to reproduce the issue. It is due to a regression in Unity that happened either in 18f1 or 19f1. OnDrawGizmosSelected and OnDrawGizmos are not automatically called, as they should, in the scenario you explained.
I will raise the issue to Unity support. Knowing how slow they can be, I would not recommend you to rely on them fixing it any time soon. I would recommend you to use another Unity version.
I will keep you updated here if there is anything new.
I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
Okay, no worries... it's not a showstopper, just a nuisance issue.  By chance, would there be a quick hack I could make to a Curvy script to have it force a refresh (if feasible) even though Unity should be calling it automatically?  If not, it's okay... I can either regress back to 16f1 or just work around it.  Smile

Thanks for your help, I appreciate it.
Reply
#6
Without much think I would say sometime in the lines of:
Have a script that listens to Untiy's Selection.selectionChanged. When it sees that a spline is selected, it calls the spline's MonoBehaviour.OnDrawGizmosSelected(). You need first to make that existing method public.
I hope this helps
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#7
(02-27-2023, 12:48 PM)_Aka_ Wrote: I will raise the issue to Unity support.

The issue was validate and published by Unity
https://issuetracker.unity3d.com/issues/...s-selected
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#8
(03-06-2023, 01:32 PM)_Aka_ Wrote:
(02-27-2023, 12:48 PM)_Aka_ Wrote: I will raise the issue to Unity support.

The issue was validate and published by Unity
https://issuetracker.unity3d.com/issues/...s-selected

Issue was marked as duplicate. Here is the ticket to follow:
https://issuetracker.unity3d.com/issues/collider-gizmos-are-not-visible-when-a-child-gameobject-is-selected-and-parent-gameobject-is-outside-the-view
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#9
(03-13-2023, 05:31 PM)_Aka_ Wrote:
(03-06-2023, 01:32 PM)_Aka_ Wrote:
(02-27-2023, 12:48 PM)_Aka_ Wrote: I will raise the issue to Unity support.

The issue was validate and published by Unity
https://issuetracker.unity3d.com/issues/...s-selected

Issue was marked as duplicate. Here is the ticket to follow:
https://issuetracker.unity3d.com/issues/collider-gizmos-are-not-visible-when-a-child-gameobject-is-selected-and-parent-gameobject-is-outside-the-view

Heh... well... I'm not convinced they've fixed it.  In fact, in 2021.3.22f1 (freshly downloaded this evening), it's actually a bit worse in my opinion.  Rolleyes 

I created a new test project with just Curvy 8.4.0 in it.  Here's what I found:
  • As I create the spline, it now shows as you're drawing control points, so that's good.  
  • If you select the parent object containing the spline... poof, the spline doesn't show at all. Actually, selecting any parent object above the spline causes the spline to not show in the scene.
  • If you have any other object selected in the scene or no object selected, it shows the spline.

I consider it "worse" in that after creating a spline and making a prefab of it, I generally drag the prefab into the scene to position it... but without it showing, that makes it a bit difficult to do.

In 2021.3.19f1, I could get the spline to show as soon as I selected the parent object of the spline (or any parent in the chain).  Afterwards, any new control points drawn would show appropriately and prefabs dragged into the scene showed up fine.  So it was a nuisance issue, but workable.

From the ticket: "Fixed in 2021.3.22f1, 2022.2.4f1, 2023.1.0b3, 2023.2.0a1"... it doesn't appear to be fixed, at least in 2021.3.22f1.  Smile
Reply
#10
That's very unfortunate. Can you please comment on the ticket stating that the issue is still there in 21.3.22f1? Also, if you can report a Unity bug, that would help a lot. If you do, I highly recommend that you attach a reproduction case not containing Curvy Splines. You can, like the previous ticket, reproduce the issue with a Unity component, such as the box collider.
Thanks
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
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 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: