10-04-2024, 09:26 AM
Hi,
I found the cause of the issue. Basically Unity offers a method in its API to search for objects of specific type. This is used to find the available generators when showing the popup list. The issue is that said method looks only for objects in scenes, and not in prefab stage (prefab editing scene). I have to go through all usages of this method in Curvy Splines and make sure it handles properly the prefab stage. This will take some time, and will be released in the next update.
Until then, here is a quick fix that you can include in your project:
Please note that with this modification, Curvy Splines is nor more compatible with Unity 2020.3. This modification bumps the minimum compatible version to 2021.3.
Please let me know if this fix worked for you or not.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.
I found the cause of the issue. Basically Unity offers a method in its API to search for objects of specific type. This is used to find the available generators when showing the popup list. The issue is that said method looks only for objects in scenes, and not in prefab stage (prefab editing scene). I have to go through all usages of this method in Curvy Splines and make sure it handles properly the prefab stage. This will take some time, and will be released in the next update.
Until then, here is a quick fix that you can include in your project:
- Go to \ToolBuddy\Dependencies\DevTools\Extensions\Extensions.cs
- Look for the following method:
Code:public static T[] FindSortedObjectsOfType<T>() where T : Object
- Replace it completely with this one:
Code:
public static T[] FindSortedObjectsOfType<T>() where T : Component
{
T[] result;
#if UNITY_EDITOR
T[] componentsOfType = StageUtility.GetCurrentStage().FindComponentsOfType<T>();
//handle includeInactive
result = componentsOfType
.Where(c => c is MonoBehaviour m && m.isActiveAndEnabled)
.ToArray();
//handle sortObjects
result = result.OrderBy(c => c.GetInstanceID()).ToArray();
#else
result = Object.FindObjectsByType<T>(
FindObjectsInactive.Exclude,
FindObjectsSortMode.InstanceID
);
#endif
return result;
}Please note that with this modification, Curvy Splines is nor more compatible with Unity 2020.3. This modification bumps the minimum compatible version to 2021.3.
Please let me know if this fix worked for you or not.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Please consider leaving a review for Curvy, this helps immensely. Thank you.

