using System;
using UnityEngine;
using System.Collections;
using UnityStandardAssets.Characters.ThirdPerson;
public class Multiple_objects : MonoBehaviour {
public GameObject prefab;
public GameObject[] gos;
public int NumberOfObjects;
private ThirdPersonCharacter[] thirdPersonCharacter;
private Animator[] _animator;
private int count = 0;
void Awake()
{
Vector3 v3 = prefab.transform.position;
_animator = new Animator[NumberOfObjects];
gos = new GameObject[NumberOfObjects];
for(int i = 0; i < gos.Length; i++)
{
count = count + 2;
GameObject clone = (GameObject)Instantiate(prefab, Vector3.zero, Quaternion.identity);
gos [i] = clone;
gos [i].transform.position = new Vector3 (v3.x - count, v3.y, v3.z);
_animator [i] = gos[i].GetComponent<Animator>();
Math.Round(Random
랜덤 뒤에 포인트를 입력 할 때 : 랜덤. 내가 가진 은 같음과 ReferenceEquals 랜덤 클래스에 속성 범위가 존재하지 않는 이유는 무엇입니까?
그리고 내가 예를 들어 임의의 변수를 만들 경우 :Random _random;
그럼 내가 _random 입력합니다. 나는 더 많은 산물을 얻지 만 범위는 얻지 못한다.
내 [RandomGenerator] (https://github.com/chanibal/RandomGenerator) 유틸리티 그냥 뻔뻔한 플러그를, 그것의 문제를 해결 인스턴스 가능한'Random' 클래스를 가지며 값의 무작위성을보다 잘 제어 할 수 있습니다. –