Answers for "unity look at in instantiated object"

C#
1

how to instantiate an object behind another object in unity

Instantiate( prefab, transform.position + ( transform.right * distance), transform.rotation );
Posted by: Guest on October-18-2020
4

unity instantiate an object

// Instantiates 10 copies of Prefab each 2 units apart from each otherusing UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
    public Transform prefab;
    void Start()
    {
        for (int i = 0; i < 10; i++)
        {
            Instantiate(prefab, new Vector3(i * 2.0F, 0, 0), Quaternion.identity);
        }
    }
}
Posted by: Guest on March-25-2020

C# Answers by Framework

Browse Popular Code Answers by Language