Hi, I want to be able to fill Transform and gameobjects in script components slots with a seperate Editor script. I assume this would be the same as filling the slots at runtime.
pupilCTRL is the script attached to the eyeInnerR asset. In this script component there is an empty transform slot by the name of Other. This is where I want to drop the gameobject Cube.
Any help would be appreciated
{
GameObject PupilRCTRL = GameObject.Find("eyeInnerR");
Component PupilRCTRLCheck = PupilRCTRL.GetComponent<pupilCTRL>();
if (PupilRCTRL != null && PupilRCTRLCheck == null)
{
GameObject tester = GameObject.Find("Cube");
PupilRCTRL.GetComponent<pupilCTRL>().other.Add(tester);
}
}