- Home /
Assigning instances of the same script to a array-member in the Inspector
There are multiple instances of the same script assigned to a camera. Each instance creates a graphical grid with a different amount of cells at a different position (as defined in the inspector for each instance).
Now i would like to link some of this grids to some of the other grids in the Inspector to allow objects beeing dragged from grid 1 to grid 3 but not from grid 1 to grid 2 e.g.. The script/class contains an array to store such script/class-instances and the array is exposed to the Inspector.
As usual i can enter a size for the array and then start select the elements. However, even if i add the script 5 times to the Camera i only have 1 selection available: MainCamera (DragDropGrid).
Is there a solution for this problem without the need to attach the scripts to different (dummy) game objects? Thank you!