Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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.