Hello, I am very new to coding. Before posting this question I searched internet quite a bit, but due to my programming ignorance I could not figure this out.
Assume I have 2 classes, attached to 2 different objects.
ObjectA has a serialize field with a prefab that must be attached by hand in Inspector.
In runtime I want to pass that prefab from ObjectA (or information about which prefab must be used) to ObjectB as GameObject to instantiate it later.
The problem is, that in ObjectB class I can’t “scan” ObjectA (using GetComponent, FindObjectOfType, etc) due to some other restrictions.
Is there a way to handle this, or I need to consider of using other approaches? Thanks in advance.