Search Unity

no placeable prefab?

Discussion in 'AR/VR (XR) Discussion' started by OpheliaHed, Aug 13, 2020.

  1. OpheliaHed

    OpheliaHed

    Joined:
    Aug 4, 2020
    Posts:
    10
    I've been following this tutorial to learn how to place objects in ar:


    But I've come across a problem.

    From video:
    upload_2020-8-13_12-33-48.png

    My project:
    upload_2020-8-13_12-34-11.png

    For some reason I don't have the Placeable Prefab section in my SpawnObjectOnPlace(Script).

    I just started Unity perhaps a week ago and I know practically nothing about coding, I just tried following the video step-by-step so if I'm blinding on something that's my bad.

    Just in case here's the code I copied from the video. Any kind of help is much appreciated!
    upload_2020-8-13_12-39-27.png
    upload_2020-8-13_12-39-57.png
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Make the placeablePrefab property `public` rather than `private`.
     
  3. OpheliaHed

    OpheliaHed

    Joined:
    Aug 4, 2020
    Posts:
    10
    Thank you for the reply but the Placeable Prefab is still not visible.

    I rewrote the code just to be safe, is there anything else I could do?
    upload_2020-8-17_12-18-9.png
    upload_2020-8-17_12-18-34.png
     
  4. OpheliaHed

    OpheliaHed

    Joined:
    Aug 4, 2020
    Posts:
    10
    And now I'm also getting these errors, any idea why?
    upload_2020-8-17_12-21-5.png
     
  5. Aokkii

    Aokkii

    Joined:
    Nov 3, 2013
    Posts:
    118

    you are missing the Monobehavior word?

    Code (CSharp):
    1. public class SpawnObjectOnPlane : MonoBehaviour
    you can't use Awake(), update(), etc. without the MonoBehaviour word