Action Bar Weapon Group Binding
Selecting a weapon now displays weapon group toggles Added global drag and drop handling in game manager Weapon group toggles can be dragged to action bar to bind them
This commit is contained in:
parent
4489b18452
commit
9779afb1bb
24 changed files with 1213 additions and 27 deletions
40
Assets/Scripts/Editor/PlayScenePlusPlus.cs
Normal file
40
Assets/Scripts/Editor/PlayScenePlusPlus.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
|
||||
[InitializeOnLoad]
|
||||
public class PlayScenePlusPlus
|
||||
{
|
||||
static PlayScenePlusPlus()
|
||||
{
|
||||
if(EditorPrefs.HasKey("PlayScene"))
|
||||
{
|
||||
EditorSceneManager.playModeStartScene = AssetDatabase.LoadAssetAtPath<SceneAsset>(EditorPrefs.GetString("PlayScene"));
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Edit/Play Scene/Set Static", false)]
|
||||
private static void SelectPlayScene()
|
||||
{
|
||||
EditorSceneManager.playModeStartScene = Selection.activeObject as SceneAsset;
|
||||
EditorPrefs.SetString("PlayScene", AssetDatabase.GetAssetPath(EditorSceneManager.playModeStartScene));
|
||||
}
|
||||
|
||||
[MenuItem("Edit/Play Scene/Set Static", true)]
|
||||
private static bool SelectPlaySceneValidate()
|
||||
{
|
||||
return Selection.objects.Length == 1 && Selection.activeObject is SceneAsset;
|
||||
}
|
||||
|
||||
[MenuItem("Edit/Play Scene/Clear", false)]
|
||||
private static void ClearPlayScene()
|
||||
{
|
||||
EditorSceneManager.playModeStartScene = null;
|
||||
EditorPrefs.DeleteKey("PlayScene");
|
||||
}
|
||||
|
||||
[MenuItem("Edit/Play Scene/Clear", true)]
|
||||
private static bool ClearPlaySceneValidate()
|
||||
{
|
||||
return EditorSceneManager.playModeStartScene;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue