smkplus / customtoolbar Goto Github PK
View Code? Open in Web Editor NEWCustomToolbar
License: MIT License
CustomToolbar
License: MIT License
ToolBarSceneSelection's Draw handling of the dropdown conflicts with opening scenes for playing.
As this changes the lists content (rebuild), the scene is opened implicitly (again) by this action (GUI.changed).
This becomes noticable if the ToolbarStartFromFirstScene button is used. The internal reopening of the scene prolongs the playmode start and the regular unity toolbar buttons don't show the entering-playmode-state change (play-button being visually pressed down).
This little change works around this (in DrawSceneDropdown() - ToolbarSceneSelection.cs):
if ((scenePath) == scenesPopupDisplay[selectedSceneIndex].path && !EditorApplication.isPlayingOrWillChangePlaymode) // check for entering playmode here
It draws GUI elements on toolbar but they don't properly react on mouse events... e.g. scene drown-down does nothing on click.
ArgumentException: Scene file not found: ''.
UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath, UnityEditor.SceneManagement.OpenSceneMode mode) (at <007193b7fa9c4ad1be5b26df6a654213>:0)
UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath) (at <007193b7fa9c4ad1be5b26df6a654213>:0)
ToolbarStartFromFirstScene.LogPlayModeState (UnityEditor.PlayModeStateChange state) (at Library/PackageCache/com.smkplus.custom-toolbar@34d4c8580b/Editor/CustomToolbar/Scripts/ToolbarElements/ToolbarStartFromFirstScene.cs:40)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <007193b7fa9c4ad1be5b26df6a654213>:0)
@Team-on
120 is the maximum FPS I can set in the tool, but my screen can run 144Hz, so I would like to set 144FPS.
There are also screen with 250Hz (more expensive), and those screens are limited by half of their max frequency
I think that, by default, you must limit the max FPS by retrieving the Resolution.refreshRate of the Monitor.
https://docs.unity3d.com/ScriptReference/Resolution-refreshRate.html
Currently the asset can't be installed through openupm, since it is missing a github release.
To add a version to OpenUPM just add a git-tag (like 1.0.0) to the commit that should be used for the version :)
In my opinion, we should create a document with a contribution protocol from now on. Because the code is getting complicated. Let's talk about this together if you have any opinions about it.
In some cases, most of asset from asset store provides several example scenes that uses common names such as Main.unity
, SampleScene.unity
, Scene.unity
and Test.unity
. Distinguishing by name of scene might cause malfunction. So my suggestion is to use path to take uniqueness instead of name.
If you don't mind, I'll PR this branch.
Appreciate.
Would you please move CustomToolbarSetting.asset under UserSettings folder?
What about publishing asset at Unity Asset Store? I think that asset pretty usefull and it should be in the store.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.