Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feedback Scene Templates - Preview now available for feedback!

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

  1. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Hey all,

    We now have a Preview package available for you to download of our new Scene Templates feature. In future, this will be built-in to Unity, but for now whilst we're iterating, we provide it as a package. We would love your feedback on the feature, it's UX, functionality and any kind of use cases you foresee. For us it means we can give you well setup template scenes with our project templates going forward, and we hope that for you, it means you can template-ify all your commonly used content that you wish to instance and prototype with often.

    To try this out, you will need 2 things -

    1. The Scene Templates package from the Package Manager (make sure to show Preview packages) - now available, and will be updated there until we roll it back into the Editor codebase itself.

    2. Unity 2020.1 Alpha 12 or higher (available in the Unity Hub).

    Watch this video for an overview of the feature and how it works. As noted in the video, we will follow up with information on the scripting aspect of the feature soon.



    Looking forward to your feedback on this feature below, thanks for your help to all of those we've consulted so far :)

    Will
     
    Last edited: Nov 18, 2019
  2. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    117
    The first thing that struck me with this proposed workflow is the worry of file clutter. The main thing that is bothersome is the creation of a scene file AND folder for the scene template. Is it possible to put everything for the template (scene file, all related cloned files) into a single self-contained folder? When viewing this in "smali icon" explorer view, I am concerned it may not scale well, and deleting scene files and folders will not be clean and efficicient at scale.

    The other thing I really *really* want, is a default scene template across a given Unity version. So for 2020.1f1 let's say, I want to have a default prototyping scene template that is placed into ALL new Unity 2020.1f1 projects from a common source, similar to how we can edit default script templates today. The opening part of the preview video where you have to start with the URP file clutter, and figure out which things to delete is exactly what I want to avoid. I want to be able to create a frictionless rapid prototyping environment where there are as few items and button clicks in the way as humanly possible. As it stands, Unity is becoming harder to use in a quick and flexible way, which I find adds friction and is slowly pushing me away from using it as my goto prototyping tool.

    Thanks for considering the community's feedback. It is appreciated! :)
     
    willgoldstone likes this.
  3. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    hey thanks for the reply! So to your points -

    1. not too sure I agree on the clutter aspect - well I agree there is clearly potential for clutter I’m not sure I agree about putting it all into a single folder, I worry it’s more preference so will wait and hear from others on this but I take your point totally.

    2. yes so the vision here is that we won’t have that clutter in future at all. In our project templates we will just have some simple scenes with good looking environment settings setup for you, so you won’t be doing anything like what you saw me do - sorry if that was misleading. Additionally I agree that’s what I want you to do with this feature, my thinking was that you would use one of our project templates then create your own scene templates for a version and then save your own project template out for your own use. The latter feature is something we wanna work on next, our first step towards that - removing project templates from the editor install is already shipping soon. If you read about ‘dynamic templates’ then that is what is meant.
    So the intended future workflow is - I) install unity, II) make a new project with one of our project templates and add some scene templates of your own (you might already have these saved as a new package format, authoring for this is being added too) and then iii) save as a project template. iv) use your project template you made for prototyping.

    alternatively you could simply keep your scene templates in a package you bring in each time to the provided project templates - whatever way around feels sensible to you, hopefully the former as we want you to have your project template in the hub and get it ready in one click.

    let me know what you think! And thanks again.
     
  4. CodeMonkeyYT

    CodeMonkeyYT

    Joined:
    Dec 22, 2014
    Posts:
    61
    Interesting feature, having a global pool of templates would be really useful for quickly starting new projects.
    I can see the Create Additive being extremely useful for quickly adding modular elements onto a scene.

    When I make my videos the first thing I do is simply Copy Paste my Base Project Folder. Then I open it up and remove the unnecessary things (for that video) from the base scene and if I need something extra like a Highscore Table I have to go into that other scene, copy the transform and paste in my base scene.

    This would be really useful to just open up a empty scene then Add my Player Shooting template then a Highscore Table template, a Pathfinding template, etc.
     
    jonathans42 and willgoldstone like this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,117
    Hi Will,

    thanks for giving us an option to provide some feedback.


    Functionality to exclude template assets from "Select asset" windows

    As template assets probably shouldn't be used in other parts of the project, I imagine it would be useful to be able to exclude these template assets (and probably cloned assets) from Unity's various "Select asset" windows.

    For example if you have a template material, I don't want it to appear in the "Select Material" window, if you click that round-button next to a Material field. Much like this feedback.

    Allowing us to mark what assets we want to hide from these selection windows would help.


    Unclear asset names
    If you create several new scenes based off a template, you end up with potentially a lot of assets with the same name.

    Following your preview video, if you create three scenes from this template, you would end up with three "Cube" prefabs, one in each scene folder.

    "Cube" then becomes unclear, because you can't derive from the name where it belongs to. Sure it's in the path, but the "Select Prefab" dialog doesn't show the full path unless you select the asset. This makes it enormously cumbersome to search for these assets and find the correct one that should be used in a particular scene.

    These assets could be renamed to "MyNewScene-Cube".prefab for example, just to give you an idea how to make it more clear where it belongs to.
     
  6. vertxxyz

    vertxxyz

    Joined:
    Oct 29, 2014
    Posts:
    42
    I can imagine using this a lot around film production specifically. I'm glad it has some scripting extensiblity built in too.

    It would be useful if instead of just having the cloning option, you could choose to create variants from the source template.
    Which leads on to a massive workflow thing I've been pondering for a while, why don't other asset types have the ability to create variants?
    It would make sense to me to be able to have a base scene with post-processing set up and be able to tweak that at any time and have that propagate selectively (avoiding overrides). Not to mention similar workflow enhancements with custom Scriptable Object types. That's all probably way out of the scope of this feature, but hopefully doing that with prefabs makes enough sense.
     
  7. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    34
    Just to let you know guys that Scene Template is now officially a preview package and can be fetched using the Package Manager from Unity 2020.1a12:

    upload_2019-11-18_13-4-13.png
     
  8. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Hey Peter

    As always, great feedback. So regarding the exclusion - how would you feel about us using the Labels system in Unity to assign labels to any assets used in a Template as soon as you assign the scene to a Scene template asset? Then if we set the pickers to ignore template assets (anything with said label), would that suit?

    Second - the unclear names - I don't want to presume everyone needs that so how about a checkbox on the Asset which says 'append scene name to cloned assets' or something like that? such that it would then do that job for you? seems like something I would set to off by default maybe but it sounds like you'd use it.. thoughts?

    Cheers again!
     
  9. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Hey whilefun,

    Regarding 'all in one folder' - I'm unsure - I sort of get it, but I like the cleanliness of the scene outside of it - and the one less click to go into it and open the scene.. but I'd love to hear what everyone else thinks about this.

    Re 'a default scene per editor' so basically you'd GET that once we start using this feature in the Project templates. So there won't be any clearing out of junk in future, it'll all be setup with scene templates, and you will just be able to go File > New and start from there - maybe we make an 'example' scene, but otherwise the required assets would be in the templates folders.

    So you can imagine going into the Universal RP template and you'd see -

    Assets
    -ExampleScene (1 folder you can nuke easily, and in future we give you option to include or not)
    -Templates
    -Shared (this contains the render pipeline stuff)
    -Template1
    -Template2

    Thoughts?
     
  10. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    852
    @willgoldstone On the project structure above I'm confused about what's inside the Templates folder. Wouldn't that be Template1, Template2, etc?
     
  11. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,117
    Hi Will,

    thanks for your reply.

    That sounds like a slick approach. I would appreciate if I can also use this label system to ignore any asset I like, not only template assets.

    Sounds good too!
     
  12. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    117
    Thanks Will! Regarding the template folder:

    Would it always be included in all projects, even if I don't use all the template scenes? My impression from quoted above is that if I start a new URP project, I would get the whole Templates folder regardless of if I used Template1 or Template2?

    The main through line of my concern is project structure bloat and duplication of files (and/or risk of "change once effect everywhere" if not duplicated), and the crisp choice for each decision point what that implies for these vectors of file creation and management.

    I also presume only used templates (and their resources) are only included in builds if they are used in the project?
     
  13. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    117
    The workflow steps outlined above (I-IV) sound great! Thanks for clarifying and listening to our feedback :)
     
  14. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    417
    Is there support for "templates as packages"?

    i.e. specifically storing them outside of Assets.

    For those of us who mainly see templates as being cross-project rather than project specific that would be a huge win.

    1. Adding templates to a project becomes as simple as pasting a repo url into package manager (or even just ticking a box if you've set up a custom package repo)

    2. Much less version control noise. For me the biggest win with custom package manager packages is that it clearly separates stuff I'm using and modifying in a project from "read-only dependencies for this project". The latter don't need to be in my repo.
     
    Peter77 likes this.
  15. iMobCoding

    iMobCoding

    Joined:
    Feb 13, 2017
    Posts:
    60
    This is exactly what I do when starting new game, copy/paste my template project...

    The only drawback I see here, is when new Unity version appears, I have to load my template in one Unity instance, and then create new default project in another Unity instance, so I can compare all the differences in preferences and project settings, and wherever else it may happen. Because, with every new Unity version, there are some new defaults they introduce - like, for example, new Asset Import Pipeline going on as default from v2019.3. So if you want to stay current, with every new Unity version, you have to go through this tedious task of making your template settings current
     
  16. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    34
    Good question! The scene template can be both in project (under Assets/) OR in a package. The Scene template package itself contains 2-3 templates that are used for unit testing.

    Using Package containing templates would indeed be the best way to share templates between packages. Also, the current Unity managed packages (SRP/URP/HDRP) are planning on shipping with specific templates that are already setup for the Render Platform workflows.

     
  17. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    34
    Could you use a package to store the assets you want to be common with multiple projects? Scene template are supported inside templates.

     
    willgoldstone likes this.
  18. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    34
    Hi guys,

    Scene Template 1.0.0.preview.7 is now live (at you current Package Manager). You need an alpha copy of Unity 20.1.

    Changelog:
    • [UX-API] Allow SceneTemplatePipeline to filter out its bound template according to a set of condition.
    • [UX] Add a toggle in dependency header to batch clone/reference all dependencies.

    Allow me to explain what is the SceneTemplatePipeline: basically you attach a script to (not a Monobehavior) to a SceneTemplate. Your script can override any of the following function:

    Code (CSharp):
    1. public interface ISceneTemplatePipeline
    2. {
    3.     // Decide if the template should be shown in the New Scene Dialog
    4.     bool IsValidTemplateForInstantiation(SceneTemplateAsset sceneTemplateAsset);
    5.     void BeforeTemplateInstantiation(SceneTemplateAsset sceneTemplateAsset, bool isAdditive, string sceneName);
    6.     void AfterTemplateInstantiation(SceneTemplateAsset sceneTemplateAsset, Scene scene, bool isAdditive, string sceneName);
    7. }
    Using the API you can control if a scene template should be shown in the New Scene Dialog or what happens before or after this particular template instantiation (thus allowing you to generate content in the newly instantiated scene).
     
    willgoldstone likes this.
  19. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Hey all, working on the design we are wondering about the value of 'Load Additive' - how much do you need it / would you use it? and what for? I had imagined I have a second scene with say a lighting rig for example... keen to hear your ideas..
     
  20. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    91
    We're still at the start of the project, but with nested prefabs, sub-scenes and ECS (which means a flat hierarchy) there's barely a need for more than one main scene in our case. The only ones we can think of right now are: main menu, ingame, credits and such. Using scenes instead of prefabs also make lighting settings kinda hard (but i heard you're working on a unified solution or something similar in that regard.
     
  21. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    117
    Can you elaborate on what the work flow would be for this? The idea of having a template scene and loading in an additive lighting rig seems to makes sense, rather than copying your lighting rig into the template. Though perhaps just putting a lighting rig prefab into the template scene would work just as well.
     
  22. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Sorry for late reply - to elaborate the idea here is that we would just give you a checkbox for load additive (in the new UI we are working on now) and you would put your lighting rig in that example into a scene, and just use cmd-n - but ultimately its just an alternative to duplicating - so what you're getting here is 'I'm avoiding having to duplicating my lighting rig scene because if I made a new scene then loaded it normally (read: opened that scene additively) alongside my level, any edits would of course be destructive. So you're able to use the File > New > check additive to bring in and duplicate additional scenes you might want.
     
  23. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    664
    Could you clarify the wording and usage of "Scene Templates" vs. "Project Templates"?
    (I'd honestly be much more interested in the latter, e.g. "how to I get new templates into the 'New Project' section without hacking around in each Editor installation".)
     
  24. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,003
    This looks really useful. Having a post-process script in there is really great. For World to the West, setting up a scene right (ie. you can go into play mode and it loads all the things that needs to be loaded) meant putting a "level" prefab into the scene; being able to just do that automatically would have helped a lot.

    For our current game, the "empty" scene would be really great, because all of our additive scenes should not have lights or cameras.

    So, yeah, seems like a great feature.


    I don't really see us using the clone feature - if I'm making an underground level, it should for sure have the same post processing asset as the other underground levels. The alternative is that we have to change 100 pp assets if we want to change how the underground scenes looks. The same goes for all the other assets in there. We're very used to assets being shared across scenes, so I don't understand why you think it's an important feature that they're not. It has the potential to clutter our Assets folder and bloat our project size by a lot.

    I mean, by all means leave it in, just make sure that when we untoggle all those checkboxes, you don't make an empty folder for the 0 clones we want.


    As I believe somebody said upthread, it'd be great if you could make project templates as well. It's always annoying to have to delete a tutorial folder whenever I want an URP project for a bug report or a jam or whatever. That'll involve the Hub, which... well, it doesn't have the best track-record on quality or listening to user feedback or anything, really, but hey, maybe you'll be lucky with project templates.
     
    willgoldstone and fherbst like this.
  25. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    117
    This seems to make sense to me! Thanks Will :)
     
  26. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Thanks as always Baste, great feedback. Yes to project templates, working on reconfiguring how these are made today to make that happen.
     
  27. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    Hey everyone here's an update on Scene Templates!

     
  28. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    417
    @willgoldstone Thanks - but it would be fab next time if you could write a couple of sentences for those of us that don't want to watch a 10 minute video. :)

    For me text > speech...
     
  29. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    776
    A little update on this feature. It will be in a package still for 20.1 and in mainline Unity 20.2, looking forward to more feedback as it rolls out. Thanks for all of you that reached out about this and related features both here and directly, thanks!
     
unityunity