Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Welcome to Code Forum!
Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
@menator01 is exactly correct. There were no arguments passed and the starting value is zero.
The args variable is passed and set as an array by the spread operator.
reduce can take the two parameters a being the element of the array as it loops through it and b being the value stored in memory...
Imagine you specify the location of a character in a 2D game by only the X & Y coordinates.
In order to store the coordinates you would create a Vector2 type variable which requires x & y.
Now imagine you upgrade the game to 3D.
You now have to account for coordinate Z in 3D space.
Vector3 is...
I know you stated you solved the issue, but I believe the issue stems from GameObject.FindGameObjectsWithTag("Animobject") returning an array of GameObjects.
Therefore you can't access the GetComponent function directly from the results which in this case is an array of GameObjects.
You can...