P
P
PsyDuckbest2021-08-09 17:33:24
C++ / C#
PsyDuckbest, 2021-08-09 17:33:24

How to assign array elements through code?

Hello!
My object is worn at five points that are randomly selected one after another and at some point this object is destroyed and a new one appears, but these points are not already marked in the array, since I manually added them through the unit, how can I through code to add unity objects to the array so that the prefab spawns immediately with this "knowledge"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CHIDWI, 2021-08-19
@CHIDWI

You declare the vector3 array through the code and immediately initialize its elements with the given coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question