#Components
1 messages · Page 1 of 1 (latest)
depends on what you're doing
im just asking for the future
perhaps it is somewhere in assembly-csharp
can you provide more context?
GetComponent gets the component on the same GameObject so if you know it's the same then call that
i just don't understand when you need to get a component and when you need to get it from the parent or child
this is the main problem for me
right
you'd need to know the hierarchy of objects
e.g. a player model may have multiple hitboxes, so you'd need to find it in the parents
though HitboxIdentity caches the target player
why do you need to do that for BasicRagdoll in the original message thuogh?
are you doing collision checks?
just as example
where can I find out this hierarchy?
i guess what you can do is try GetComponent first, if that fails, use GetComponentInParent
theres no other way?
