Spawned and Pickup all together?

I’m sorry if looks… lazy :blush:
I was wondering if we can make Spawner and Pickup in just one asset, maybe nested? :thinking:
Because when you start working seriously on a scene and placing object around the world, you have to.

  • Take your pickup, place it in scene
  • Copy transform
  • Delete it.
  • Place the spawner
  • Paste the transform.

… it’s time spending. :grimacing:

Here’s what I do:

I make a prefab with the ItemSpawner on it:
I put a dummy object in the ItemSpawner to help place the item.
I put a small script on the dummy object:

using UnityEngine;

public class DestroyOnLoad : MonoBehaviour
{
    void Awake()
    {
          Destroy(gameObject);
     }
}

Now, when the game starts, no more dummy object, and the ItemSpawner spawns the right item.

1 Like

Simple as can be :grin::+1:

I like things simple.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms