- Home /
Question by
ThisIsAJoke · Feb 25, 2012 at 03:05 AM ·
transformarraypublicstruct
visible public struct
I have following struct:
public struct Luminary {
public Transform transform;
public maxLightBrightness;
etc...
}
in start method:
public Luminary[] luminary;
now I want to access a value in it:
luminary[i].transform.Rotate(new Vector3(1,0,0)*Time.deltaTime);
the only problem: I cant drag an drop my luminaries (suns) into the transform slot because the struct doenst show up in the viewer.
how can I solve this? thx in advance
Comment
Best Answer
Answer by Eric5h5 · Feb 25, 2012 at 03:14 AM
Custom structs won't show up in the inspector. That should be a class anyway, not a struct.