Unity C# instantiate prefab
Instantiate(myPrefab, new Vector3(0, 0, 0), Quaternion.identity);
Unity C# instantiate prefab
Instantiate(myPrefab, new Vector3(0, 0, 0), Quaternion.identity);
unity create gameobject from prefab in script
using UnityEngine;
public class example : MonoBehaviour
{
public GameObject prefab;
// Start is called before the first frame update
void Start()
{
Instantiate(prefab, new Vector3(0, 0, 0), Quaternion.identity);
}
}
unity instantiate prefab
Instantiate(cube, Vector3 (x, y, 0), Quaternion.identity);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us