playMaker

Author Topic: [solved] Pick 2 prefabs from Array and combine them  (Read 873 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
[solved] Pick 2 prefabs from Array and combine them
« on: January 14, 2020, 07:16:11 PM »
Hello !

I am working on a Level based Runner game. Made around 20 different Ground prefabs with obstacles.

What I want is , I wanted to add 20 prefabs to Array and get random 2 from array and put it on a position. Then , I wanted to join them and make it as single prefab.

How to get this combine prefab ?

Thank you
« Last Edit: January 19, 2020, 08:28:22 AM by heavygunner »

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Pick 2 prefabs from Array and combine them
« Reply #1 on: January 18, 2020, 02:36:37 PM »
Bump !

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Pick 2 prefabs from Array and combine them
« Reply #2 on: January 18, 2020, 11:13:15 PM »
Hi, maybe something like, "Create Empty Prefab" (store object) Parent and Position the 2 selected prefabs inside the empty prefab.
you can disable the object so its not visible (and best to do creation somewhere offscreen)

then you can create multiples from that empty object.

or pool them (create pool from the empty object)