Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by dyangca · Jun 07, 2018 at 09:27 PM · scene view

How to save scene view camera perspectives.

For my project, I need to constantly switch back and forth between 2 specific camera perspectives in the editor in scene view, is there a way to save them so I can easily switch?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by Bunny83 · Jun 07, 2018 at 11:54 PM

Well, the easiest solution is to just open another sceneview. You can dock them in the same tab view so you can just switch between the two or even more than two by clicking on the corresponding tab.


However if you want more control over your saved points you can use this little editor script i just made. With CTRL+ALT+P you can enable / disable the controls in the sceneview. The control window can be expanded / collapsed and moved around in the sceneview. You can add as many presets you like. The presets as well as all the settings are stored as json in the editorprefs as a single string.


edit
I just added some more features to this editor script. Each preset now has a context menu to edit the preset and general settings. I've added a way to re-order the presets and to export the settings to a file in case you want to move it to another machine. You can also additively import only the presets from an exported save. Furthermore i've added a visualization of the camera positions and their pivots when holding down CTRL. This can be disabled. Also there's now a toggle in the Tools menu on the top.


If you find any problems with this script, feel free to leave a comment.


ps: Since it's an editor script it need to be placed in a folder called "editor".

Comment
Add comment · Show 15 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dyangca · Jun 07, 2018 at 11:58 PM 0
Share

Wow, I didn't even know you can have more than 1 scene view window, that's going to come very handy.

I'll check out your script as well, thanks a ton!

avatar image Bunny83 dyangca · Jun 08, 2018 at 12:02 AM 0
Share

Just edited the script to support 2d and ortho views

avatar image sok0 · Nov 15, 2018 at 03:47 AM 0
Share

Thanks for sharing!!

avatar image AlanPT · Jul 01, 2019 at 11:21 AM 0
Share

This script is great thanks Bunny.

If you are taking requests, It would be super useful to allow the preset titles to be hyperlinks. In my use case I have photos that I am working from. If the title could also be a link - I could open http:// or file:// reference photos. But I could also imagine people using it to link to text notes.

Thanks again!

avatar image Bunny83 AlanPT · Jul 03, 2019 at 03:05 AM 0
Share

That sounds a bit strange. This is an editor tool to manage different editor scene view camera positions. Why would you need a hyperlink as the name? Even if such a feature would be built in.an http / https link is quite different from a file URI. Do you actually want to reference a Texture2D inside your project? or an external file? What exactly should "open" when you click on that "link". Also there isn't really a lot of space in that presets "window". So a whole link would be total overkill. Also the title is currently shown on a button which actually restores the camera settings. Do you want to have that link "opened" at the same time? Everytime when you click on the button? That's even stranger.

avatar image AlanPT Bunny83 · Jul 03, 2019 at 11:28 AM 0
Share

Sorry, I should have been more clearer. I wrote that very late.

In my scenario, I am working from reference photographs recreating the real world. It would be helpful if I could directly open a bookmarked photo alongside the preset view - ins$$anonymous$$d of having to open up explorer and browse for the file. Not incredibly important but it would save some time. If I was working with a $$anonymous$$m, I might use a link to a text file or Trello card that would store notes.

It would mean adding another button (or separating the title from an open button), which would take away the elegant simplicity of your solution though.

avatar image fatoKato · Mar 03, 2020 at 05:57 AM 0
Share

@Bunny83 This looks like exactly the type of scene view saver I've been wishing for. Thanks! However, I'm having issues getting it to run. I saved the script into a 'Editor' folder within 'Assets'. 'B83' appears in the 'Tools' menu bar drop down. 'Toggle SceneView Presets' appears when 'B83' is selected. But that's all that happens. No additional windows appear. Using 2019.3.3f1 Any thoughts?

avatar image fatoKato · Mar 03, 2020 at 06:21 AM 0
Share

Update: replacing the following in the script makes the window appear. replace: //SceneView.onSceneGUIDelegate += OnSceneView; with: SceneView.duringSceneGui += OnSceneView;

avatar image Bunny83 fatoKato · Mar 03, 2020 at 04:30 PM 0
Share

I haven't looked at my little tool for quite some time now. Yes, it seems Unity has replaced the old "onSceneGUIDelegate" event with multiple events which are called at different times during a sceneview repaint. The event "duringSceneGui" seems to be the most suitable replacement. Currently I don't have time to test it but I can update my script. Thanks for the testing and pointing out that compatibility issue ^^.

Show more comments
avatar image
0

Answer by Grizmu · Jul 23, 2019 at 02:16 PM

I've released a plugin called VoltGizmos, which allows saving scene view camera, gizmo and icon settings, and easily toggle between them.


You can check this video for comparison between default workflow and VoltGizmos: Video


Still if you don't need all those features, and want to do it yourself, all SceneView camera settings are stored in: Click You can create your own ScriptableObject with a custom editor, which has Save/Load buttons. Use those buttons to save/load the current settings of the SceneView.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

90 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sprite Manager sprite is visible in Scene view but not Game view 0 Answers

Game objects created in scene but not game. 2 Answers

Editor Scripting: change selected objects layer with button press 0 Answers

Game and scene view partially stuck. 1 Answer

Orthographic 3D 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges