Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Virtual Furniture Scene - Changing prefabs for my own - can't get it to work.

Discussion in 'VR' started by gavinprior, Aug 28, 2023.

  1. gavinprior

    gavinprior

    Joined:
    Jul 27, 2020
    Posts:
    42
    Hi All.

    I am playing with passthrough and the Virtual Furniture Scene from Oculus. I can get it to work fine. Now I want to replace the standard furniture items with something else (a rock for instance). This is so that I can build a scene that uses the objects in the real world as scenery (and the user wont bump into them - in theory).

    The problem:

    * I can add a rock (for instance) as a child to the original prefab (the table) and it appears in my scene but is unscaled. So I know that there is no problem with the actual prefab (the rock) itself

    * When I create a new scaleable prefab (i.e the rock prefab with the added 'Pivot' game object and the 'Simple Resizable' script) - adding it to the Plane and Volume runs the apk happily but my new object (the rock) doesn't appear in the Scene.

    I am stumped. I cannot see any problems. The Resize script is - simple! It should just be scaling the object that it is attached to but doesn't seem to want to for some reason(!).

    Any ideas??
    I've also put this question on th eOculus forum but i'm not holding out(!).

    Thanks for any ideas.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,879
    Share the resize script and spawn scirpt
     
  3. valecambiaso

    valecambiaso

    Joined:
    Mar 2, 2023
    Posts:
    2
    Hi! I have the same issue gavinprior has with replacing the default forniture. The resize script and spawn script are the following ones:
     

    Attached Files:

    gavinprior likes this.
  4. gavinprior

    gavinprior

    Joined:
    Jul 27, 2020
    Posts:
    42
    Thank you. I was just about to post them :)
    The script(s) seems to only resize the parent object not children.
     
    valecambiaso likes this.
  5. valecambiaso

    valecambiaso

    Joined:
    Mar 2, 2023
    Posts:
    2
    Hi Gavin! Have you been able to find a solution?
     
  6. gavinprior

    gavinprior

    Joined:
    Jul 27, 2020
    Posts:
    42
    Hi. Sorry for the very long delay on replying. There was no solution at the time - don't know if that has changed now with the new version of passthough on the Quest3(?) which looks amazing. Looking forward to buying one when I can!

    I ended up using the room setup element but not adding furniture (as I am using an empty space) and created a nice floor/walls/ceiling that fitted with my requirements (using the room setup element for my space) and then created prefabs that I could easily step through; choose one and then spawn/place/rotate/scale any way I wanted to. This worked better for me rather than trying to use furniture as the system was also just allowing me to place just one table; one bed; etc so it was very limiting.