Search Unity

Can't insert prefab GameObject into "public GameObject" slot in Inspector. Please help.

Discussion in 'Prefabs' started by MinutesPerBeat, Feb 10, 2019.

  1. MinutesPerBeat

    MinutesPerBeat

    Joined:
    Jan 31, 2018
    Posts:
    3
    Capture.PNG
    I wan't to place the "water" prefab, which is a GameObject with 4 nested GameObjects, inside the "Water Drop" slot in the script component. I had them working before but after restarting Unity (not updating, just closing then opening again) they all disappeared from their appropriate spots and now I can't fill any of the slots. I have tried making everything from scratch, including making a whole new game object, deleting the script file, making a new one and attaching it to the new game object, but for the life of me I can't figure out how to fill the slots. They just remain empty.

    The code for each of those slots on the script component is:
    "public GameObject [NAME]"
    replace [NAME] with Water Drop, Electric Drop, etc.

    Any help would be greatly appreciated. I really don't want to have to start this project over again.
     
  2. MAFTAAstudios

    MAFTAAstudios

    Joined:
    Feb 22, 2022
    Posts:
    2
    im having the same problem but with photon and multiplayer, i dont know how to fix this i hope someone finds this post and helps us