Hello.
I have a prefab that has in root 2 particlesystem gameobjects, each one with a different script, and a prefab that has a 3rd particlesystem.
The 3rd object has a script with 3 variables for these particlesystems. While it's easy to get the one in the object itself, I am having trouble getting the other 2, because they are neither parents or children.
It is important that the other 2 objects are found as siblings in order to prevent them to be found by other prefabs of the same type.
This is what I've tried so far, but it doesn't work:
GetComponentInParent<Transform>().gameObject.GetComponentInChildren<sphereParticle>().gameObject.GetComponent<ParticleSystem>();
sphereParticle is one of the two scripts I am using to differentiate the 2 particlesystems