06-02-2023, 10:27 AM
Hi
Creating connections while in prefab mode is not allowed. This is an unfortunate consequence of how things were designed initially:
The issue comes from the fact that connections are stored in a separate object, the _CurvyGlobal_ object which has a component of type CurvyGlobalManager. Because of this, creating a connection in prefab mode is not allowed, since it would modify an object that exists outside of the prefab.
A work around for this limitation could be to make your script check if it is running in prefab mode (PrefabStageUtility.GetCurrentPrefabStage() != null) and create the connections only when not in prefab mode.
The error message you got was misleading. Sorry for that, I will correct the message in the next update.
Did this help?
Creating connections while in prefab mode is not allowed. This is an unfortunate consequence of how things were designed initially:
The issue comes from the fact that connections are stored in a separate object, the _CurvyGlobal_ object which has a component of type CurvyGlobalManager. Because of this, creating a connection in prefab mode is not allowed, since it would modify an object that exists outside of the prefab.
A work around for this limitation could be to make your script check if it is running in prefab mode (PrefabStageUtility.GetCurrentPrefabStage() != null) and create the connections only when not in prefab mode.
The error message you got was misleading. Sorry for that, I will correct the message in the next update.
Did this help?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.