Hand Transforms

Hi Rick
wouldn`t it have been easier to have the hand transform in the scriptable object and get it from there instead of having a left and right hand transform?

It actually wouldn’t be possible to save the hand transforms in the scriptable objects, because they refer directly to things in the scene or prefab. The hand transform reference in fighter refers specfically to the hand transforms on the GameObjects that the fighter is on, which allows the references to be saved and serialized.
What we can save in the Scriptable Object is whether it should be the left or right transform, but we need to pass the actual transform references to the methods. What you don’t want to do, however is to cache that reference within the Scriptable Object, (i.e. save the transforms for later use). Scriptable Objects data is shared amongst every instance that uses them, so if all of your enemies with bows are using the same data.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms