Answer the question
In order to leave comments, you need to log in
What is the correct way to write a two-dimensional array without new?
There is such a line
public FlowerPRO[,] flowersPRO = new FlowerPRO[MAX_FLOWERS_X, MAX_FLOWERS_Y];
Says you can't use new because of MonoBehaviour
FlowerPRO[,] flowersPRO = gameObject.AddComponent();
Tell me how or where to write brackets from the array on the right side?
Answer the question
In order to leave comments, you need to log in
If your FlowerPRO inherits from MonoBehaviour, then everything is correct. Or remove inheritance, or create List/Array through the inspector and pass where it is necessary. And the announcement can be written simplypublic FlowerPRO[,] flowersPRO = null;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question