Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Convert to Entity subscene appears in edit mode, not on device

Discussion in 'Entity Component System' started by alexchesser, Feb 13, 2020.

  1. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    I've got a unity project that uses the convert-to-entity process to create a subscene for a group of mesh objects.

    In this screenshot it is the map/landscape assets
    upload_2020-2-12_23-50-44.png
    Note that these are not terrain, but in this sample are just a demo level out of a syntystudios asset pack.

    If I hit PLAY in the editor, my character can run around on the map without issue. If I build this app to an oculus quest (being sure to include the subscene in the list of scenes I build and run)

    The landscape disappears in-game.

    I've got the hybrid renderer package installed, but is there something else that I am missing?
     
  2. JohnnyTurbo

    JohnnyTurbo

    Joined:
    May 17, 2017
    Posts:
    42
    My first though would be a compatibility issue with one of the preview packages and the Oculus Quest?

    Is it possible for you to make a build for PC or another platform and see if you are having the same issues?
     
  3. Zec_

    Zec_

    Joined:
    Feb 9, 2017
    Posts:
    148
    I'm not sure, but I might have a similar issue. I'm building for PC though, but it seems as though a lot of my entities that come from subscenes won't render correctly. Most are completely invisible, but some are rendered. I haven't dug into it yet, but it kind of seemed to be shader/material based. Subscene entities with certain materials rendered in builds, while certain other materials didn't. From what I saw, all entities that I converted from prefabs during runtime in the build worked correctly though. I'm planning to eventually test it out with a very small scale project+subscene, but haven't gotten around to it yet.

    Did you notice if you still had entities generated for the missing objects? Like, if you've got collision on the terrain in your subscenes, is that collision still working in the builds?

    If you figure anything out, I'd be happy to hear about it!
     
  4. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Since I'm on android (OculusQuest) it's really hard to live debug the running sytem. You can essentially build&run then try again if it doesn't work. I envy the people who have link-cable capable computers :) I will have to check tonight. I definitely collide with something on the way down, but I don't know if it is a placeholder terrain with a bad material or the entities.
     
  5. Chebn

    Chebn

    Joined:
    Oct 25, 2019
    Posts:
    9
    SubScenes currently don’t load with the regular Build settings. You need to create a ClassicBuildSettings and configured your scene there.
     
    alexchesser likes this.
  6. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Awesome! I'll try that now. For anyone that finds this thread later, the item is here:

    upload_2020-2-14_7-58-18.png


    edit ... hmmm... this doesn't seem to work right out of the box. Do you have a link to the docs or a guide on how to use this?
     
    Last edited: Feb 14, 2020
    SubPixelPerfect likes this.
  7. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    same issue, and all SRP material entities (in SubScene/converted) are not rendering, legacy material seems fine for now.
     
    alexchesser likes this.
  8. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    i indeed did, no luck with that.
     
    alexchesser likes this.
  9. Chebn

    Chebn

    Joined:
    Oct 25, 2019
    Posts:
    9
    I was able to Load a scene with SubScene on my Android device using these settings (mine includes NetCode so you can ignore that).
     

    Attached Files:

    alexchesser likes this.
  10. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    i already tried that, no luck neither. i guess Net Code Conversion did stuff actually , DOTS sample have same settings.
     
  11. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    I'm probably going to have to reinstall unity or something. My builds with a classic buildpipeline asset wind up not even running on device!

    Am uploading a bug report now.
     
  12. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
  13. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    thanks, but unfortunatetly:

    #1 i am building a PC version, so i tried "Hybrid" & "WindowsHybrid", "AndroidHybrid" was not available for my case.
    #2 without "classic scripting component" you can not build anything -- unity will throw build error.
     
  14. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    223
    Update:
    Today i upgrade my project to 2019.3.1f1, everything works !
     
    alexchesser likes this.
  15. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    I found the same!