Advertisement
kadyr

Untitled

Oct 10th, 2021
881
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Spawner : MonoBehaviour
  6. {
  7.     public GameObject spawnedObject;
  8.  
  9.     void Start()
  10.     {
  11.         var t = Instantiate(spawnedObject);
  12.         t.transform.position = transform.position + new Vector3(Random.Range(-5, 5), 0,
  13.             Random.Range(-5, 5));
  14.     }
  15.  
  16.     void Update() { }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement