Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting MissingReferenceException from the component pool when I destroy a spline
#4
(11-22-2020, 05:46 AM)Excrubulent Wrote: As for the shapes along the spline, I didn't explain properly, I'm trying to extrude along the spline, but change the size & shape of the extrusion as I go.  I will be roughly circular.  Ideally I'd like to be able to vary the mesh geometry along the length of the spline, including adding noise and adjusting the number of radial segments, but I understand if that's beyond the scope of this plugin.

Changing the size of the extrusion's shape is doable here.
Changing the actual shape of the extrusion is doable with this module. It is used in example scene 27_CGVariableExtrusion


(11-22-2020, 05:46 AM)Excrubulent Wrote: The error is coming from Assets/Plugins/DevTools/Components/ComponentPool.cs:318, so it's not really my code that's throwing the error, which is why I decided to ask about it.
Of course, I am not saying the opposite. But still I have to ask you questions to know how to reproduce the bug in order to fix it. Your use case seems very particular, since I am not aware of any other user having your issue.
After reading your code, I can confirm my earlier guess, which is that you are destroying objects twice. You do not need to destroy the children, since destroying the parent will lead to the destruction of the children: "If obj is a GameObject, it destroys the GameObject, all its components and all transform children of the GameObject" from https://docs.unity3d.com/ScriptReference/Object.Destroy.html
In conclusion, avoiding the destruction of a spline twice will avoid the raise of the exception.
Did this help?

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


Messages In This Thread
RE: Getting MissingReferenceException from the component pool when I destroy a spline - by _Aka_ - 11-22-2020, 11:04 AM

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: