Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IndexOutOfRangeException In InterpolateFast
#6
Hi,

Thanks for sharing this code.

With the new prefab system, destroying a GameObject inside a Prefab instance is no more allowed through the API. What I think is the correct way to handle this is to make it clear to Curvy's users that the operation they are trying to do (that leads to an attempt of game object destruction) is no more valid. So I added, to the exception message you posted (coming from Unity) an error message explaining exactly what is happening. For example:
"[Curvy] Error while trying to destroy the object 'Create Mesh_5_Mesh000'. This is probably because that object is part of a prefab instance, and Unity 2018.3 and beyond forbid deleting such objects without breaking the prefab link. Please remove the corresponding object from the prefab and try the faulty operation again."

Unfortunately, a lot of users don't read the console. This made think about considering your solution, but I decided that it is not a perfect one neither, because it will make the generator behave differently, and silently, based on whether the generator is part of a prefab or not. I prefer clearly showing that something is wrong, so that users can take the correct steps to fix it.

What do you think about what I said?
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: IndexOutOfRangeException In InterpolateFast - by _Aka_ - 09-06-2019, 01:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance billowe 2 753 09-06-2022, 06:09 AM
Last Post: sambutle
Question IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance function mchangxe 13 3,243 05-06-2021, 12:56 PM
Last Post: _Aka_

Forum Jump: