Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Feedback Scene Templates feature - what do you want?

Discussion in 'Editor & General Support' started by willgoldstone, May 15, 2019.

?

Does Creating Scenes from template need to support multiple scenes?

Poll closed May 22, 2019.
  1. Yes

    2 vote(s)
    33.3%
  2. No

    4 vote(s)
    66.7%
  1. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    Hi all,

    We're currently working on Scene Templates - a way to mark scenes as templates that you can create anew from the File menu.

    I'd love to hear your feedback on the open questions we have in order to inform the design - so here's the current thinking along with some mockups -

    1. Add metadata 'is template' to scenes, a simple boolean - and expose as a checkbox when you select a scene in the inspector.

    isTemplate.jpg

    2. Add a Save Scene as Template from the File menu and Right Click menu in Hierarchy. This would basically be a Save As command that would also check the boolean mentioned in (1) above.

    3. Change the File > New Scene to New Scene(s) and allow you to specify one or more scenes to Open. A checkbox is also included to allow you to load additively, keeping what you currently have open. For example if you have a lighting rig template scene you like to use, then create that additively and start working on it.

    SaveAsTemplate.jpg

    This would then present you with the dialog showing a simple selection of the scenes you have marked 'Is Template' in the project, along with the option to load additively -

    NewScenes2.jpg

    So Questions for you all -

    A. What do you think of the above? Give me your thoughts and additional requests if you think they're critical to add, and that we're missing something from the feature spec.
    B. Using the Poll on this post tell us - How important is the ability to load multiple scenes to you? Personally I would use them, but I'm keen to hear if I'm misjudging this, let me know how you would use this please.

    Thanks

    Will
     
    Anjin_nz likes this.
  2. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    102
    This is a great idea. Some critical items from my perspective:

    1) I must be able to press Ctrl+N and get a new scene from a designated "default template". Having to use the mouse to select a few menus/sub-menus is a hard no for me

    2) Editing and Deleting templates has to be painless and easy


    3) Assuming version compatibility is there, I want to be able to copy/paste scene templates across versions. I use multiple versions of Unity for clients and having to manually create templates for each version (or each new version of Unity) would be cumbersome.


    The primary use case for me will be debug and test scenes that need a specific lighting or template object setup. For example, if a client project requires that all scenes that are testable must have some boilerplate prefabs included in order to function, I would make a "no lighting" version of this scene so I can create a new scene and get to solving the problem, rather than creating a new scene, looking up boilerplate objects, setting up lighting, etc. before being able to get to work. Being able to edit this and transport it across versions will be an amazing time saver.

    Thanks Will! :)
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,609
    I don't need a lot of templates, I just want to be able to edit the default one.
     
    willgoldstone likes this.
  4. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    74
    Portability is a good idea. +1 for that.
     
    willgoldstone likes this.
  5. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    @whilefun Thanks for your feedback, appreciate it! - Addressing your points directly -

    1.If the dialog defaulted to a blank empty scene at the outset, and simply let you hit Return to confirm (no extra clicks), would that be ok? Also I'm wondering if it makes sense for the selection of scene templates in the dialog to remain each time you use it, instead of defaulting back to blank. That way if blank is selected, it'll be selected next time you Ctrl-N, if not, you'll get whatever you had selected last. Also we'd hope to support keyboard control - cursor keys and space bar to select and deselect like the import window. Thoughts?

    2. It'd be same as deleting normal scenes, and in theory we could then make the project browser filter by those that have 'is template' checked.

    3. Yes its clearly something we'd want to expand into package format later - allowing you to package up your template scenes (once we ship that concept) would make sense to make the feature a lot more cross project simple. For now you could use the existing .unityPackage format and keep your template scenes and dependent content (prefabs etc) ready to fire into any project though.

    Hope this all makes sense, let me know if i've not addressed anything.

    Will
     
  6. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    The default one is actually spawned through code, not from a 'scene' you could actually edit, its what makes it fast. We could make this simply by making a default scene be blank and spawned by code which I've heard a lot of people want especially for testing, and then the rest of the template scenes would be whatever you create, or we create in templates and provide.
     
    AcidArrow likes this.
  7. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    259
    When creating new scene from template, I thought it'll be more like sub-menu and not a new window.
    Something like that:
    upload_2019-5-15_14-54-53.png
     
  8. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    Another useful question that's arisen - how would you like us to handle dependent assets. Say you make a template scene that contains a post processing volume. That volume relies on the profile Asset. Should we find a way to duplicate that with each usage of the scene template? any thoughts around this would be appreciated.
     
    Anjin_nz likes this.
  9. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    This was one early thought i'd had too - but it rules out allowing for multi scene - part of why i'm asking in the poll above if you need that. It also doesn't give us a way to let you pick whether to close what you have open first (that's what the load additively checkbox refers to).
     
  10. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    259
    So it depends, the multi scene template isn't must have in my opinion, and like with the "Add New Scene" from the scene Hierarchy menu, you can add "Add Scene From Template" sub-menu.
    upload_2019-5-15_15-59-30.png
     
  11. vertxxyz

    vertxxyz

    Joined:
    Oct 29, 2014
    Posts:
    35
    I wonder about organising that list - whether that's grouping, sorting, etc.
    Perhaps you could display them in a hierarchy whose base was the highest commonly shared folder (so it you wanted to bury your template scenes in amongst the project they'd still be nice in this view)
    That would allow you to tick the group and it ticks the scenes under that folder.

    As for the dependent assets, I think it could be painful to have them duplicate automatically. Perhaps you could write/apply templating scripts that would perform that logic when creating a template. Because I can imagine having a default PP asset that isn't intended to be modified, and having many duplicates can be frustrating from a management perspective. But I can also imagine people wanting a fresh PP asset for each generated scene that could be based off a templated asset. Though in that case perhaps the workflow would make more sense to be:
    >Have a template scene without a PP asset, easily generate a new one, and then apply an appropriate Preset to that if you want to work from a base.

    Honestly it's not something I'd end up using much, so I struggle to think of it from a use-case standpoint. But I can imagine people wanting common groups of templates, or wanting to customise the order for familiarity purposes.
     
  12. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    102
    1. That would be okay, I think. That's basically the same as adding a new layer in photoshop. As long as I can use keyboard shortcuts and don't have to manually navigate/select everytime, I'm good.

    2. Sounds good. Though would said templates have to exist inside each project, or would they exist similar to "default script template" relative to the overall Unity Editor version? I'd prefer editor to project, that way I don't have to import the same scene over and over if using multiple projects and the same scenes. Likewise, wouldn't have to clog up my repos with boilerplate scene template files.

    3. Similar to 2, managing the templates across editor versions and projects needs to be simple and ideally as low footprint as possible. I know these are probably pretty small files, but at scale when you have a dozen or more Unity Editors installed and tens or hundreds of projects, it will get pretty unmanageable I imagine.
     
  13. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,608
    We would be quite interested in engine level for support for this as well with our assets.

    Gaia already automates a bunch of scene setup, and it would be great to make this more flexible, and perhaps something that could be expanded on via the package manager.
     
    Lurking-Ninja likes this.
  14. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    689
    Hey folks just a brief update, we're now building a prototype so i'll share a video with you in the next few days on how its working.
     
    whilefun, Anjin_nz and De-Panther like this.