07-05-2019, 03:14 PM
(This post was last modified: 07-05-2019, 03:16 PM by josemendez.)
(07-05-2019, 02:29 PM)herbst Wrote: Hi, I welcome you to test the behaviour and you'll see that just having an entire rope hierarchy inside a prefab breaks the attachment points (that are also parts of the prefab).
Hi there,
I just tested this, but it works fine for me. Pin constraints are kept within the prefab. If you have a repro project showing otherwise, please send it to support(at)virtualmethodstudio.com and I'll personally take a look at it.
Code:
Additionally, please not that in fact, it is very much possible to have references from inside an instantiated prefab to the "outside world", because the scene the prefab is in will hold that reference (or, for nested prefabs, a parent prefab depending on where the referenced object lives).
From an instantiated prefab yes, but not within a prefab. Prefabs themselves exist independently of any scene, so they cannot hold any references to something that is not part of the prefab. Once you instantiate the prefab within a scene then yes, it behaves just like a regular GameObject. I just wanted to point this out because many users in the past assumed they could pin a rope to something in the scene, make a prefab out of it, instantiate the prefab multiple times and these instances would still retain the pin constraint reference.