├── .gitignore
├── Assets
├── ContextCircleMenu.meta
├── ContextCircleMenu
│ ├── Editor.meta
│ ├── Editor
│ │ ├── ContextCircleMenu.Editor.asmdef
│ │ ├── ContextCircleMenu.Editor.asmdef.meta
│ │ ├── ContextCircleMenuLoader.cs
│ │ ├── ContextCircleMenuLoader.cs.meta
│ │ ├── Core.meta
│ │ ├── Core
│ │ │ ├── CircleMenuBuilder.cs
│ │ │ ├── CircleMenuBuilder.cs.meta
│ │ │ ├── CircleMenus.meta
│ │ │ ├── CircleMenus
│ │ │ │ ├── CircleMenu.cs
│ │ │ │ ├── CircleMenu.cs.meta
│ │ │ │ ├── CircleMenuFactory.cs
│ │ │ │ ├── CircleMenuFactory.cs.meta
│ │ │ │ ├── FolderCircleMenu.cs
│ │ │ │ ├── FolderCircleMenu.cs.meta
│ │ │ │ ├── ICircleMenuFactory.cs
│ │ │ │ ├── ICircleMenuFactory.cs.meta
│ │ │ │ ├── LeafCircleMenu.cs
│ │ │ │ └── LeafCircleMenu.cs.meta
│ │ │ ├── ClircleButtons.meta
│ │ │ ├── ClircleButtons
│ │ │ │ ├── ButtonFactory.cs
│ │ │ │ ├── ButtonFactory.cs.meta
│ │ │ │ ├── CircleButton.cs
│ │ │ │ ├── CircleButton.cs.meta
│ │ │ │ ├── IButtonFactory.cs
│ │ │ │ ├── IButtonFactory.cs.meta
│ │ │ │ ├── SimpleCircleButton.cs
│ │ │ │ └── SimpleCircleButton.cs.meta
│ │ │ ├── ContextCircleMenu.cs
│ │ │ ├── ContextCircleMenu.cs.meta
│ │ │ ├── ContextCircleMenuOption.cs
│ │ │ ├── ContextCircleMenuOption.cs.meta
│ │ │ ├── IMenuControllable.cs
│ │ │ └── IMenuControllable.cs.meta
│ │ ├── Extensions.meta
│ │ └── Extensions
│ │ │ ├── Painter2DExtension.cs
│ │ │ └── Painter2DExtension.cs.meta
│ ├── Runtime.meta
│ ├── Runtime
│ │ ├── ContextCircleMenu.asmdef
│ │ ├── ContextCircleMenu.asmdef.meta
│ │ ├── Core.meta
│ │ ├── Core
│ │ │ ├── ContextCircleMenuAttribute.cs
│ │ │ └── ContextCircleMenuAttribute.cs.meta
│ │ ├── Utility.meta
│ │ └── Utility
│ │ │ ├── EditorIcons.cs
│ │ │ └── EditorIcons.cs.meta
│ ├── Samples~
│ │ ├── Custom.meta
│ │ ├── Custom
│ │ │ ├── Custom.unity
│ │ │ ├── Custom.unity.meta
│ │ │ ├── Editor.meta
│ │ │ └── Editor
│ │ │ │ ├── CustomMenu.cs
│ │ │ │ └── CustomMenu.cs.meta
│ │ ├── Sandbox.meta
│ │ └── Sandbox
│ │ │ ├── Editor.meta
│ │ │ ├── Editor
│ │ │ ├── Menu.cs
│ │ │ └── Menu.cs.meta
│ │ │ ├── Sample.unity
│ │ │ └── Sample.unity.meta
│ ├── package.json
│ └── package.json.meta
├── Scenes.meta
└── Scenes
│ ├── SampleScene.unity
│ └── SampleScene.unity.meta
├── LICENSE.md
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Packages
│ └── com.unity.testtools.codecoverage
│ │ └── Settings.json
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── XRSettings.asset
├── README.md
├── README_JA.md
├── Third Party Notices.md
└── docs
├── ContextCircleMenu Logo.png
├── image-1.png
├── image-2.png
├── image-3.png
├── image-4.png
├── image-5.png
├── image-6.png
└── image.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/unity
2 | # Edit at https://www.gitignore.io/?templates=unity
3 |
4 | # Jetbrain Rider Cache
5 | .idea/
6 | Assets/Plugins/Editor/JetBrains*
7 |
8 | # Visual Studio Code
9 | .vscode/
10 |
11 |
12 | ### Unity ###
13 | [Ll]ibrary/
14 | [Ll]ogs/
15 | [Tt]emp/
16 | [Oo]bj/
17 | [Bb]uild/
18 | [Bb]uilds/
19 | [Uu]serSettings/
20 | Assets/AssetStoreTools*
21 |
22 | # Visual Studio cache directory
23 | .vs/
24 |
25 | # Autogenerated VS/MD/Consulo solution and project files
26 | ExportedObj/
27 | .consulo/
28 | *.csproj
29 | *.unityproj
30 | *.sln
31 | *.suo
32 | *.tmp
33 | *.user
34 | *.userprefs
35 | *.pidb
36 | *.booproj
37 | *.svd
38 | *.pdb
39 | *.opendb
40 | *.VC.db
41 |
42 | # Unity3D generated meta files
43 | *.pidb.meta
44 | *.pdb.meta
45 |
46 | # Unity3D Generated File On Crash Reports
47 | sysinfo.txt
48 |
49 | # Builds
50 | *.apk
51 | *.unitypackage
52 |
53 | # End of https://www.gitignore.io/api/unity
54 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0f637ca30178faa40a9dae7f4ae69e21
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 141bab50ba18413fb437d5b4babdb26e
3 | timeCreated: 1713767545
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/ContextCircleMenu.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ContextCircleMenu.Editor",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:976b98c4db6ffd04d9cdc43fa24bfbe8"
6 | ],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/ContextCircleMenu.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ce4a28b970f186c48a0ecd6283d583f3
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/ContextCircleMenuLoader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using UnityEditor;
4 | using UnityEditor.ShortcutManagement;
5 | using UnityEngine;
6 |
7 | namespace ContextCircleMenu.Editor
8 | {
9 | ///
10 | /// Initializes and manages the Context Circle Menu within the Unity Scene View.
11 | ///
12 | [InitializeOnLoad]
13 | public static class ContextCircleMenuLoader
14 | {
15 | private static SceneView _activeSceneView;
16 | private static int _activeSceneViewInstanceID;
17 |
18 | private static ContextCircleMenu _contextCircleMenu;
19 | private static readonly Vector2 RadialMenuSize = new(100, 100);
20 |
21 | private static Action _onBuild;
22 |
23 |
24 | static ContextCircleMenuLoader()
25 | {
26 | EditorApplication.update -= Update;
27 | EditorApplication.update += Update;
28 | }
29 |
30 |
31 | private static void Update()
32 | {
33 | // Get the currently active scene view.
34 | _activeSceneView = SceneView.currentDrawingSceneView
35 | ? SceneView.currentDrawingSceneView
36 | : SceneView.lastActiveSceneView;
37 |
38 | // Check if the scene view changed.
39 | if (_activeSceneView && _activeSceneView.GetInstanceID() != _activeSceneViewInstanceID)
40 | {
41 | _activeSceneViewInstanceID = _activeSceneView.GetInstanceID();
42 | RemovePreviousRadialMenu();
43 | }
44 |
45 | if (_contextCircleMenu != null || _activeSceneView == null) return;
46 |
47 | if (_activeSceneView.rootVisualElement != null) Initialize();
48 | else Debug.LogError("_activeSceneView.rootVisualElement was null");
49 | }
50 |
51 | private static void Initialize()
52 | {
53 | if (_contextCircleMenu != null) RemovePreviousRadialMenu();
54 | _contextCircleMenu =
55 | new ContextCircleMenu(RadialMenuSize.x, RadialMenuSize.y, 100f, _activeSceneView.rootVisualElement);
56 |
57 | if (_onBuild == null)
58 | _contextCircleMenu.CreateMenu(builder =>
59 | {
60 | var attributes = TypeCache.GetMethodsWithAttribute();
61 | foreach (var method in attributes)
62 | {
63 | var attribute = method.GetCustomAttribute(false);
64 | builder.AddMenu(attribute, method);
65 | }
66 | });
67 | else
68 | _contextCircleMenu.CreateMenu(_onBuild);
69 |
70 | _activeSceneView.rootVisualElement.Add(_contextCircleMenu);
71 | }
72 |
73 |
74 | ///
75 | /// Event that allows customization of the Context Circle Menu construction.
76 | ///
77 | ///
78 | /// This event provides a mechanism to extend or modify the content of the Context Circle Menu
79 | /// dynamically at runtime. It's invoked during the initialization phase of the menu in the Scene View.
80 | /// Subscribers can add custom menu items or modify existing ones by manipulating the CircleMenuBuilder
81 | /// instance provided in the event arguments.
82 | /// Example Usage:
83 | /// ContextCircleMenuLoader.OnBuild += builder =>
84 | /// {
85 | /// // Adds a nested menu item under "Custom" with an action to log "custom/test" to the console
86 | /// builder.AddMenu("Custom/Debug Test", new GUIContent(), () => Debug.Log("custom/test"));
87 | /// // Adds another top-level menu item with an action to log "test"
88 | /// builder.AddMenu("Debug Test", new GUIContent(), () => Debug.Log("test"));
89 | /// };
90 | /// This example demonstrates how developers can add items that perform actions like logging to the console,
91 | /// but it could also be used to trigger any method reflecting more complex functionality.
92 | ///
93 | public static event Action OnBuild
94 | {
95 | add => _onBuild += value;
96 | remove => _onBuild -= value;
97 | }
98 |
99 |
100 | ///
101 | /// Shortcut that toggles the visibility of the Context Circle Menu based on keyboard input.
102 | ///
103 | [ClutchShortcut("Context Circle Menu/Show Menu", typeof(SceneView), KeyCode.A)]
104 | public static void ToggleMenuClutch(ShortcutArguments args)
105 | {
106 | _contextCircleMenu.BlockMouseEvents = args.stage switch
107 | {
108 | ShortcutStage.Begin => true,
109 | ShortcutStage.End => false,
110 | _ => _contextCircleMenu.BlockMouseEvents
111 | };
112 |
113 | if (_contextCircleMenu.IsVisible)
114 | {
115 | if (args.stage == ShortcutStage.End && _contextCircleMenu.TryForceSelect())
116 | _contextCircleMenu.Hide();
117 | }
118 | else
119 | {
120 | _contextCircleMenu.Show();
121 | }
122 | }
123 |
124 | private static void RemovePreviousRadialMenu()
125 | {
126 | if (_contextCircleMenu == null) return;
127 | _contextCircleMenu.RemoveFromHierarchy();
128 | _contextCircleMenu = null;
129 | }
130 | }
131 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/ContextCircleMenuLoader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 440205763c9319d418ca6dc6768d9588
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24c3e0bc481744d0af211fbd63f276f1
3 | timeCreated: 1713808675
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenuBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using UnityEngine;
6 |
7 | namespace ContextCircleMenu.Editor
8 | {
9 | public sealed class CircleMenuBuilder
10 | {
11 | private readonly List _factories = new();
12 | private IButtonFactory _buttonFactory;
13 | private IFolderCircleMenuFactory _folderFactory;
14 |
15 | internal CircleMenu Build(IMenuControllable menu)
16 | {
17 | _folderFactory ??= new FolderMenuFactory();
18 | _buttonFactory ??= new ButtonFactory();
19 |
20 | CircleMenu root = _folderFactory.Create(string.Empty, menu, null, _buttonFactory);
21 | foreach (var factory in _factories)
22 | {
23 | var pathSegments = factory.PathSegments.SkipLast(1);
24 | var currentMenu = root;
25 | foreach (var pathSegment in pathSegments)
26 | {
27 | var child = currentMenu.Children.Find(m => m.Path == pathSegment);
28 | if (child == null)
29 | {
30 | child = _folderFactory.Create(pathSegment, menu, currentMenu, _buttonFactory);
31 | var backButton = _buttonFactory.CreateBackButton(menu.Back);
32 | backButton.ShouldCloseMenuAfterSelection = false;
33 | child.PrepareButton(backButton);
34 | currentMenu.Children.Add(child);
35 | }
36 |
37 | currentMenu = child;
38 | }
39 |
40 | currentMenu.Children.Add(factory.Create(_buttonFactory));
41 | }
42 |
43 | return root;
44 | }
45 |
46 | ///
47 | /// Adds a menu from attribute.
48 | ///
49 | ///
50 | ///
51 | public void AddMenu(ContextCircleMenuAttribute attribute, MethodInfo method)
52 | {
53 | AddMenu(new AttributeCircleMenuFactory(attribute, method));
54 | }
55 |
56 | ///
57 | /// Adds a menu manually.
58 | ///
59 | ///
60 | ///
61 | ///
62 | public void AddMenu(string path, GUIContent content, Action action)
63 | {
64 | AddMenu(new CircleMenuFactory(path, content, action));
65 | }
66 |
67 | ///
68 | /// Adds a factory to the list of menu item factories.
69 | ///
70 | /// The factory responsible for creating the menu item.
71 | public void AddMenu(ICircleMenuFactory factory)
72 | {
73 | _factories.Add(factory);
74 | }
75 |
76 | ///
77 | /// Sets a custom factory for creating folder-like menu items, allowing for further customization of menu folders.
78 | ///
79 | /// The factory to use for creating folder menu items.
80 | public void ConfigureFolder(IFolderCircleMenuFactory factory)
81 | {
82 | _folderFactory = factory;
83 | }
84 |
85 | ///
86 | /// Sets a custom factory for creating menu buttons, allowing for further customization of menu buttons.
87 | ///
88 | /// The factory to use for creating menu buttons.
89 | public void ConfigureButton(IButtonFactory factory)
90 | {
91 | _buttonFactory = factory;
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenuBuilder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 975640e667b54338a57a4e020e3f55d1
3 | timeCreated: 1713956297
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0dc8d51ac1434c2faaf9fff715593328
3 | timeCreated: 1713976296
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/CircleMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Buffers;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using UnityEngine;
6 | using UnityEngine.UIElements;
7 |
8 | namespace ContextCircleMenu.Editor
9 | {
10 | ///
11 | /// Represents a menu item in the circle menu.
12 | ///
13 | public abstract class CircleMenu
14 | {
15 | protected internal readonly CircleMenu Parent;
16 |
17 | private bool _alreadyInitialized;
18 | private IButtonFactory _buttonFactory;
19 |
20 | protected CircleButton[] ButtonElements;
21 | protected VisualElement[] UtilityElements;
22 |
23 | protected CircleMenu(string path, GUIContent icon, Action onSelected, CircleMenu parent, IButtonFactory factory,
24 | bool shouldCloseMenuAfterSelection = true)
25 | {
26 | Path = path;
27 | Icon = icon;
28 | OnSelected = onSelected;
29 | Parent = parent;
30 | ShouldCloseMenuAfterSelection = shouldCloseMenuAfterSelection;
31 | _buttonFactory = factory;
32 | }
33 |
34 | public List Children { get; } = new(8);
35 | public GUIContent Icon { get; }
36 | public string Path { get; }
37 | public bool ShouldCloseMenuAfterSelection { get; }
38 | public Action OnSelected { get; protected set; }
39 |
40 | internal ReadOnlySpan BuildElements(ref ContextCircleMenuOption menuOption)
41 | {
42 | if (!_alreadyInitialized)
43 | {
44 | _buttonFactory ??= new ButtonFactory();
45 | var buttons = CreateButtons(_buttonFactory, ref menuOption);
46 | ButtonElements = ButtonElements == null ? buttons : ButtonElements.Concat(buttons).ToArray();
47 | UtilityElements = CreateUtilityElements(ref menuOption);
48 |
49 | OnInitialized(ref menuOption);
50 | _alreadyInitialized = true;
51 | }
52 |
53 | OnBuild();
54 |
55 | var pool = ArrayPool.Shared;
56 | var buffer = pool.Rent(ButtonElements.Length + UtilityElements.Length);
57 | ButtonElements.CopyTo(buffer, 0);
58 | UtilityElements.CopyTo(buffer, ButtonElements.Length);
59 | var combinedSpan = new Span(buffer, 0, ButtonElements.Length + UtilityElements.Length);
60 | pool.Return(buffer);
61 | return combinedSpan;
62 | }
63 |
64 |
65 | internal void PrepareButton(CircleButton button)
66 | {
67 | if (ButtonElements == null)
68 | {
69 | ButtonElements = new[] { button };
70 | }
71 | else
72 | {
73 | Array.Resize(ref ButtonElements, ButtonElements.Length + 1);
74 | ButtonElements[^1] = button;
75 | }
76 | }
77 |
78 | ///
79 | /// Creates the buttons for the menu.
80 | ///
81 | ///
82 | protected abstract CircleButton[]
83 | CreateButtons(IButtonFactory factory, ref ContextCircleMenuOption menuOption);
84 |
85 | ///
86 | /// Creates the utility elements for the menu.
87 | ///
88 | ///
89 | protected virtual VisualElement[] CreateUtilityElements(ref ContextCircleMenuOption menuOption)
90 | {
91 | return Array.Empty();
92 | }
93 |
94 | ///
95 | /// Called when the menu is initialized.
96 | ///
97 | ///
98 | protected virtual void OnInitialized(ref ContextCircleMenuOption menuOption)
99 | {
100 | }
101 |
102 | ///
103 | /// Called when the menu is built.
104 | ///
105 | protected virtual void OnBuild()
106 | {
107 | }
108 | }
109 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/CircleMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 801e563bc86c41ef811feb3a6415f73e
3 | timeCreated: 1713808699
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/CircleMenuFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using UnityEditor;
6 | using UnityEngine;
7 |
8 | namespace ContextCircleMenu.Editor
9 | {
10 | public class AttributeCircleMenuFactory : ICircleMenuFactory
11 | {
12 | private readonly GUIContent _content;
13 | private readonly MethodInfo _method;
14 |
15 | public AttributeCircleMenuFactory(ContextCircleMenuAttribute attribute, MethodInfo method)
16 | {
17 | PathSegments = attribute.Path.Split("/");
18 | _method = method;
19 |
20 | _content = !string.IsNullOrEmpty(attribute.IconPath)
21 | ? EditorGUIUtility.IconContent(attribute.IconPath)
22 | : default;
23 | }
24 |
25 | public IEnumerable PathSegments { get; }
26 |
27 | public CircleMenu Create(IButtonFactory factory)
28 | {
29 | return new LeafCircleMenu(PathSegments.Last(), _content, () => _method.Invoke(null, null), factory);
30 | }
31 | }
32 |
33 | public class CircleMenuFactory : ICircleMenuFactory
34 | {
35 | private readonly Action _action;
36 | private readonly GUIContent _content;
37 |
38 | public CircleMenuFactory(string path, GUIContent content, Action action)
39 | {
40 | PathSegments = path.Split("/");
41 | _content = content;
42 | _action = action;
43 | }
44 |
45 | public IEnumerable PathSegments { get; }
46 |
47 | public CircleMenu Create(IButtonFactory factory)
48 | {
49 | return new LeafCircleMenu(PathSegments.Last(), _content, _action, factory);
50 | }
51 | }
52 |
53 | public class FolderMenuFactory : IFolderCircleMenuFactory
54 | {
55 | public FolderCircleMenu Create(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory)
56 | {
57 | return new FolderCircleMenu(path, menu, parent, factory);
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/CircleMenuFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04bc51fbfc96404c84f552527002746f
3 | timeCreated: 1713957951
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/FolderCircleMenu.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 | using UnityEngine.UIElements;
4 |
5 | namespace ContextCircleMenu.Editor
6 | {
7 | ///
8 | public class FolderCircleMenu : CircleMenu
9 | {
10 | private Vector3[] _buttonPositions;
11 |
12 | public FolderCircleMenu(string path, IMenuControllable menu,
13 | GUIContent icon,
14 | CircleMenu parent,
15 | IButtonFactory factory) :
16 | base(path, icon, null, parent, factory, false)
17 | {
18 | OnSelected = () => menu.Open(this);
19 | }
20 |
21 | internal FolderCircleMenu(string path, IMenuControllable menu,
22 | CircleMenu parent,
23 | IButtonFactory factory) :
24 | this(path, menu, EditorGUIUtility.IconContent(EditorIcons.FolderIcon), parent, factory)
25 | {
26 | }
27 |
28 | ///
29 | protected override CircleButton[] CreateButtons(IButtonFactory factory, ref ContextCircleMenuOption menuOption)
30 | {
31 | var buttons = new CircleButton[Children.Count];
32 | for (var index = 0; index < buttons.Length; index++)
33 | {
34 | var item = Children[index];
35 | var button = factory.Create(
36 | item.Path,
37 | item.Icon,
38 | item.OnSelected,
39 | Children.Count - index);
40 | button.ShouldCloseMenuAfterSelection = item.ShouldCloseMenuAfterSelection;
41 | buttons[index] = button;
42 | }
43 |
44 | return buttons;
45 | }
46 |
47 | ///
48 | protected override VisualElement[] CreateUtilityElements(ref ContextCircleMenuOption menuOption)
49 | {
50 | var label = new Label(Path)
51 | {
52 | style =
53 | {
54 | marginBottom = menuOption.Height * 0.5f + 5.0f,
55 | fontSize = 10,
56 | unityTextAlign = TextAnchor.MiddleCenter,
57 | color = Color.white,
58 | textShadow = new TextShadow
59 | {
60 | offset = new Vector2(0.2f, 0.2f),
61 | blurRadius = 0,
62 | color = Color.black
63 | }
64 | }
65 | };
66 | return new VisualElement[] { label };
67 | }
68 |
69 | ///
70 | protected override void OnInitialized(ref ContextCircleMenuOption menuOption)
71 | {
72 | var buttonCount = ButtonElements.Length;
73 | _buttonPositions = new Vector3[buttonCount];
74 | for (var i = 0; i < buttonCount; i++)
75 | _buttonPositions[i] = GetPositionForIndex(i, buttonCount, menuOption.Radius);
76 | }
77 |
78 | ///
79 | protected override void OnBuild()
80 | {
81 | for (var i = 0; i < ButtonElements.Length; i++)
82 | {
83 | var button = ButtonElements[i];
84 | button.transform.position = Vector3.zero;
85 | var to = _buttonPositions[i];
86 | button.experimental.animation.Position(to, 100);
87 | }
88 | }
89 |
90 | private Vector3 GetPositionForIndex(float index, float totalCount, float radius)
91 | {
92 | var angle = index / totalCount * 360f;
93 | return new Vector2(
94 | Mathf.Sin(angle * Mathf.Deg2Rad) * radius,
95 | Mathf.Cos(angle * Mathf.Deg2Rad) * radius
96 | );
97 | }
98 | }
99 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/FolderCircleMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97e4be0c435f4372893fe6358dbdd1de
3 | timeCreated: 1713976908
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/ICircleMenuFactory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ContextCircleMenu.Editor
4 | {
5 | public interface ICircleMenuFactory
6 | {
7 | public IEnumerable PathSegments { get; }
8 | public CircleMenu Create(IButtonFactory factory);
9 | }
10 |
11 | public interface IFolderCircleMenuFactory
12 | {
13 | public FolderCircleMenu Create(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory);
14 | }
15 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/ICircleMenuFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ffd726355244507a3abc8368ba95681
3 | timeCreated: 1713957829
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/LeafCircleMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace ContextCircleMenu.Editor
5 | {
6 | ///
7 | public sealed class LeafCircleMenu : CircleMenu
8 | {
9 | public LeafCircleMenu(string path, GUIContent icon, Action onSelected, IButtonFactory factory,
10 | CircleMenu parent = null) : base(path, icon, onSelected, parent, factory)
11 | {
12 | }
13 |
14 | ///
15 | protected override CircleButton[] CreateButtons(IButtonFactory factory, ref ContextCircleMenuOption menuOption)
16 | {
17 | return null;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/CircleMenus/LeafCircleMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9302173dd4a494196fb49da25c46e15
3 | timeCreated: 1713978907
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1bc21fb923548c2b66d294f4c889c63
3 | timeCreated: 1715644602
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/ButtonFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace ContextCircleMenu.Editor
6 | {
7 | public class ButtonFactory : IButtonFactory
8 | {
9 | public CircleButton Create(string path, GUIContent icon, Action onSelected, int section)
10 | {
11 | return new SimpleCircleButton(path, icon, section, onSelected);
12 | }
13 |
14 | public CircleButton CreateBackButton(Action onBack)
15 | {
16 | return new SimpleCircleButton("Back", EditorGUIUtility.IconContent(EditorIcons.Back2x), -1, onBack);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/ButtonFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 925ee182e9d94ae792d656e54ed4231f
3 | timeCreated: 1715646161
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/CircleButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using UnityEngine.UIElements;
4 |
5 | namespace ContextCircleMenu.Editor
6 | {
7 | public abstract class CircleButton : VisualElement
8 | {
9 | private readonly Action _onSelect;
10 | private Button _button;
11 |
12 | protected CircleButton(string text, GUIContent icon, int section, Action onSelect)
13 | {
14 | _onSelect = onSelect;
15 |
16 | Section = section;
17 |
18 | Initialize(text, icon, section);
19 | }
20 |
21 | internal bool ShouldCloseMenuAfterSelection { get; set; } = true;
22 |
23 | public bool IsEntered { get; private set; }
24 | public int Section { get; private set; }
25 | private void Initialize(string text, GUIContent icon, int section)
26 | {
27 | style.position = Position.Absolute;
28 | style.alignItems = Align.Center;
29 |
30 | _button = new Button(_onSelect);
31 | ModifierButton(_button, text, icon, section);
32 | Add(_button);
33 |
34 | RegisterCallback(InternalOnMouseEnter);
35 | RegisterCallback(InternalOnMouseLeave);
36 | }
37 |
38 | protected abstract void ModifierButton(Button button, string text, GUIContent icon, int section);
39 |
40 | internal bool TryForceSelect()
41 | {
42 | _onSelect?.Invoke();
43 | return ShouldCloseMenuAfterSelection;
44 | }
45 |
46 | private void InternalOnMouseEnter(MouseEnterEvent evt)
47 | {
48 | IsEntered = true;
49 | OnMouseEnter(_button, evt);
50 | }
51 |
52 | protected virtual void OnMouseEnter(Button button, MouseEnterEvent evt)
53 | {
54 | }
55 |
56 | private void InternalOnMouseLeave(MouseLeaveEvent evt)
57 | {
58 | IsEntered = false;
59 | OnMouseLeave(_button, evt);
60 | }
61 |
62 | protected virtual void OnMouseLeave(Button button, MouseLeaveEvent evt)
63 | {
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/CircleButton.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a4acd60cf754149b9b197a9d2c9b490
3 | timeCreated: 1713720243
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/IButtonFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace ContextCircleMenu.Editor
5 | {
6 | public interface IButtonFactory
7 | {
8 | public CircleButton Create(string path, GUIContent icon, Action onSelected, int section);
9 |
10 | public CircleButton CreateBackButton(Action onBack);
11 | }
12 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/IButtonFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd92d51777ad4b77957c94541043b5f0
3 | timeCreated: 1715649254
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/SimpleCircleButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using UnityEngine.UIElements;
4 |
5 | namespace ContextCircleMenu.Editor
6 | {
7 | public class SimpleCircleButton : CircleButton
8 | {
9 | private readonly Color _hoverColor = new(0.2745098f, 0.3764706f, 0.4862745f, 1.0f);
10 | private readonly Color _normalColor = new(0.02f, 0.02f, 0.02f, 0.8f);
11 |
12 | public SimpleCircleButton(string text, GUIContent icon, int section, Action onSelect)
13 | : base(text, icon, section, onSelect)
14 | {
15 | }
16 |
17 | protected override void ModifierButton(Button button, string text, GUIContent icon, int section)
18 | {
19 | button.style.paddingLeft = 8f;
20 | button.style.paddingRight = 8f;
21 | button.style.paddingTop = 4f;
22 | button.style.paddingBottom = 4f;
23 | button.style.flexDirection = FlexDirection.Row;
24 | button.style.borderTopLeftRadius = 4f;
25 | button.style.borderBottomLeftRadius = 4f;
26 | button.style.borderBottomRightRadius = 4f;
27 | button.style.borderTopRightRadius = 4f;
28 | button.style.flexGrow = 1;
29 | button.style.backgroundColor = _normalColor;
30 | button.text = "";
31 |
32 | var label = new Label
33 | {
34 | style =
35 | {
36 | paddingBottom = 0f,
37 | paddingLeft = 0f,
38 | paddingRight = 0f,
39 | paddingTop = 0f,
40 | marginLeft = 5f,
41 | marginRight = 5f,
42 | flexGrow = 1
43 | },
44 | text = text
45 | };
46 |
47 | if (icon != null)
48 | {
49 | var image = new Image
50 | {
51 | image = icon.image,
52 | style =
53 | {
54 | width = 16f,
55 | height = 16f,
56 | flexShrink = 0
57 | }
58 | };
59 | button.Add(image);
60 | }
61 |
62 | button.Add(label);
63 |
64 | if (section != -1)
65 | {
66 | var index = new Label
67 | {
68 | text = section.ToString(),
69 | style =
70 | {
71 | color = new Color(0.7f, 0.7f, 0.7f, 1.0f),
72 | unityFontStyleAndWeight = FontStyle.Italic
73 | }
74 | };
75 | button.Add(index);
76 | }
77 | }
78 |
79 | protected override void OnMouseEnter(Button button, MouseEnterEvent evt)
80 | {
81 | button.style.backgroundColor = _hoverColor;
82 | }
83 |
84 | protected override void OnMouseLeave(Button button, MouseLeaveEvent evt)
85 | {
86 | button.style.backgroundColor = _normalColor;
87 | }
88 | }
89 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ClircleButtons/SimpleCircleButton.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59172d3eb1194cdd992880de8aa1bdb2
3 | timeCreated: 1715644710
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ContextCircleMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using UnityEngine;
4 | using UnityEngine.UIElements;
5 |
6 | namespace ContextCircleMenu.Editor
7 | {
8 | ///
9 | /// Represents a circular context menu that can be dynamically constructed and controlled within the Unity Editor.
10 | ///
11 | public class ContextCircleMenu : VisualElement, IMenuControllable
12 | {
13 | private const float IndicatorSizeDegrees = 70.0f;
14 | private static readonly Color AnnulusColor = new(0.02f, 0.02f, 0.02f, 0.8f);
15 | private static readonly Color MouseAngleIndicatorBackgroundColor = new(0.01f, 0.01f, 0.01f, 1.0f);
16 | private static readonly Color MouseAngleIndicatorForegroundColor = Color.white;
17 | private readonly VisualElement _target;
18 |
19 | private float _currentMouseAngle;
20 | private Vector2 _mousePosition;
21 | private ContextCircleMenuOption _option;
22 | private Vector2 _position;
23 |
24 | private CircleMenu _selectedMenu;
25 |
26 | ///
27 | /// Initializes a new instance of the ContextCircleMenu with specified dimensions and target.
28 | ///
29 | /// Width of the menu.
30 | /// Height of the menu.
31 | /// Radius of the menu.
32 | /// The UI element in which the menu will appear.
33 | public ContextCircleMenu(float width, float height, float radius, VisualElement target)
34 | {
35 | _option = new ContextCircleMenuOption(radius, height, width);
36 | _target = target;
37 |
38 | style.position = Position.Absolute;
39 | style.width = width;
40 | style.height = height;
41 | style.display = DisplayStyle.None;
42 | style.marginBottom = 0.0f;
43 | style.marginTop = 0.0f;
44 | style.marginRight = 0.0f;
45 | style.marginLeft = 0.0f;
46 | style.paddingBottom = 0.0f;
47 | style.paddingTop = 0.0f;
48 | style.paddingRight = 0.0f;
49 | style.paddingLeft = 0.0f;
50 | style.alignItems = Align.Center;
51 | style.alignContent = Align.Center;
52 | style.justifyContent = Justify.Center;
53 |
54 | RegisterCallback(OnAttach);
55 | RegisterCallback(OnDetach);
56 | }
57 |
58 | ///
59 | /// Determines whether mouse events are blocked by the menu.
60 | ///
61 | public bool BlockMouseEvents { get; set; }
62 |
63 |
64 | public bool IsVisible => style.display == DisplayStyle.Flex;
65 |
66 | ///
67 | /// Displays the menu and repositions it based on the current mouse position.
68 | ///
69 | public void Show()
70 | {
71 | if (IsVisible) return;
72 |
73 | style.display = DisplayStyle.Flex;
74 | _position = _mousePosition;
75 | transform.position = _position - new Vector2(_option.Width * 0.5f, _option.Height * 0.5f);
76 | Rebuild();
77 | }
78 |
79 | ///
80 | /// Hides the menu.
81 | ///
82 | public void Hide()
83 | {
84 | if (!IsVisible) return;
85 |
86 | style.display = DisplayStyle.None;
87 | }
88 |
89 | ///
90 | /// Opens a specified menu within the context circle menu.
91 | ///
92 | /// The menu to display.
93 | public void Open(CircleMenu menu)
94 | {
95 | if (!IsVisible) return;
96 | _selectedMenu = menu;
97 | Rebuild();
98 | }
99 |
100 | ///
101 | /// Returns to the parent menu if available.
102 | ///
103 | public void Back()
104 | {
105 | if (_selectedMenu.Parent != null) Open(_selectedMenu.Parent);
106 | }
107 |
108 | private void OnAttach(AttachToPanelEvent evt)
109 | {
110 | generateVisualContent += OnGenerateVisualContent;
111 | _target.RegisterCallback(UpdateMousePosition, TrickleDown.TrickleDown);
112 | _target.RegisterCallback(OnClick, TrickleDown.TrickleDown);
113 | }
114 |
115 | private void OnDetach(DetachFromPanelEvent evt)
116 | {
117 | generateVisualContent -= OnGenerateVisualContent;
118 | _target.UnregisterCallback(UpdateMousePosition, TrickleDown.TrickleDown);
119 | _target.UnregisterCallback(OnClick, TrickleDown.TrickleDown);
120 | }
121 |
122 | private void UpdateMousePosition(MouseMoveEvent evt)
123 | {
124 | _mousePosition = evt.localMousePosition;
125 |
126 | if (!IsVisible) return;
127 | var referenceVector = new Vector2(0f, -1f);
128 | var mouseVector = new Vector2(
129 | _mousePosition.x - _position.x,
130 | -_mousePosition.y + _position.y).normalized;
131 | _currentMouseAngle = Vector2.SignedAngle(mouseVector, referenceVector);
132 |
133 | MarkDirtyRepaint();
134 | }
135 |
136 | private void OnClick(ClickEvent evt)
137 | {
138 | if (BlockMouseEvents) return;
139 | Hide();
140 | }
141 |
142 | ///
143 | /// Force selection of the active button in the menu.
144 | ///
145 | public bool TryForceSelect()
146 | {
147 | var button = Children().OfType().FirstOrDefault(b => b.IsEntered);
148 | return button != null && button.TryForceSelect();
149 | }
150 |
151 | public bool TryForceEnterByMousePosition()
152 | {
153 | var anglePerRegion = 360f / (Children().Count() - 1);
154 |
155 | var currentAngle = _currentMouseAngle % 360;
156 | if (currentAngle < 0) currentAngle += 360;
157 |
158 | var region = (int)(currentAngle / anglePerRegion);
159 | if (region <= 0) region = Children().Count() - 1;
160 |
161 | var otherButtons = Children().OfType().Where(x => x.Section != region);
162 | foreach (var otherButton in otherButtons)
163 | {
164 | var mouseLeaveEvent = MouseLeaveEvent.GetPooled();
165 | mouseLeaveEvent.target = otherButton;
166 | otherButton.SendEvent(mouseLeaveEvent);
167 | }
168 |
169 | var button = Children().OfType().FirstOrDefault(x => x.Section == region);
170 | if (button == null) return true;
171 | var mouseEnterEvent = MouseEnterEvent.GetPooled();
172 | mouseEnterEvent.target = button;
173 | button.SendEvent(mouseEnterEvent);
174 | return false;
175 | }
176 |
177 | private void Rebuild()
178 | {
179 | Clear();
180 | var elements = _selectedMenu.BuildElements(ref _option);
181 | for (var i = 0; i < elements.Length; i++) Add(elements[i]);
182 | }
183 |
184 | private void OnGenerateVisualContent(MeshGenerationContext context)
185 | {
186 | var position = new Vector2(_option.Width * 0.5f, _option.Height * 0.5f);
187 | var radius = _option.Width * 0.1f;
188 |
189 | var startAngle = _currentMouseAngle + 90.0f - IndicatorSizeDegrees * 0.5f;
190 | var endAngle = _currentMouseAngle + 90.0f + IndicatorSizeDegrees * 0.5f;
191 |
192 | var painter = context.painter2D;
193 | painter.lineCap = LineCap.Butt;
194 |
195 | painter.DrawCircle(position, radius, 0f, 360.0f, 8.0f, AnnulusColor);
196 | painter.DrawCircle(position, radius, startAngle, endAngle, 8.0f, MouseAngleIndicatorBackgroundColor);
197 | painter.DrawCircle(position, radius, startAngle, endAngle, 4.0f, MouseAngleIndicatorForegroundColor);
198 | }
199 |
200 | ///
201 | /// Configures and builds the menu based on a provided configuration action.
202 | ///
203 | ///
204 | /// An action delegate that configures the menu. This delegate is responsible for defining
205 | /// the structure and behavior of the menu items within the context menu.
206 | ///
207 | ///
208 | /// This method is used to dynamically construct the menu content at runtime. It allows for flexible modification
209 | /// and extension of the menu items by external code. The method receives an action delegate that takes a
210 | /// as a parameter, which is used to add, configure, and organize menu items.
211 | /// The provides methods such as AddMenu
which are used to define each
212 | /// item's
213 | /// label, icon, and the action it triggers when selected. This design allows for the encapsulation of the menu's
214 | /// construction logic, making the class highly modular and customizable.
215 | /// Example usage:
216 | ///
217 | /// contextCircleMenu.CreateMenu(builder => {
218 | /// builder.AddMenu("File/Open", new GUIContent(), () => { Debug.Log("Open clicked"); });
219 | /// builder.AddMenu("File/Save", new GUIContent(), () => { Debug.Log("Save clicked"); });
220 | /// });
221 | ///
222 | /// This example configures the menu to have "Open" and "Save" options under a "File" submenu, with each menu item
223 | /// triggering a logging action when clicked.
224 | ///
225 | public void CreateMenu(Action configureMenu)
226 | {
227 | var builder = new CircleMenuBuilder();
228 | configureMenu(builder);
229 |
230 | _selectedMenu = builder.Build(this);
231 | }
232 | }
233 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ContextCircleMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38fc1dc0d871465d8dd03fc87cfe7c03
3 | timeCreated: 1713893370
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ContextCircleMenuOption.cs:
--------------------------------------------------------------------------------
1 | namespace ContextCircleMenu.Editor
2 | {
3 | public struct ContextCircleMenuOption
4 | {
5 | public ContextCircleMenuOption(float radius, float height, float width)
6 | {
7 | Radius = radius;
8 | Height = height;
9 | Width = width;
10 | }
11 |
12 | public readonly float Radius;
13 | public readonly float Height;
14 | public readonly float Width;
15 | }
16 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/ContextCircleMenuOption.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 79090acad5c84c3abc55b874b127d8ce
3 | timeCreated: 1715833322
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/IMenuControllable.cs:
--------------------------------------------------------------------------------
1 | namespace ContextCircleMenu.Editor
2 | {
3 | public interface IMenuControllable
4 | {
5 | public void Show();
6 | public void Hide();
7 | public void Open(CircleMenu menu);
8 | public void Back();
9 | }
10 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Core/IMenuControllable.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e141bd0bdc8b400fae21b9750843478b
3 | timeCreated: 1714237450
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca576a0c47a940d49ff9fc3976f7c3f8
3 | timeCreated: 1714749264
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Extensions/Painter2DExtension.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 | using UnityEngine;
3 | using UnityEngine.UIElements;
4 |
5 | namespace ContextCircleMenu.Editor
6 | {
7 | public static class Painter2DExtension
8 | {
9 | [MethodImpl(MethodImplOptions.AggressiveInlining)]
10 | public static void DrawCircle(this Painter2D painter, Vector2 center, float radius, float startAngle,
11 | float endAngle, float lineWidth, Color color)
12 | {
13 | painter.lineWidth = lineWidth;
14 | painter.strokeColor = color;
15 | painter.BeginPath();
16 | painter.Arc(center, radius, startAngle, endAngle);
17 | painter.Stroke();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Editor/Extensions/Painter2DExtension.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec59384ff1ae4293a1fff8fb9a019bf0
3 | timeCreated: 1714749274
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab96d913660840d3aaf3b57c32e2d440
3 | timeCreated: 1714541574
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/ContextCircleMenu.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ContextCircleMenu",
3 | "rootNamespace": "ContextCircleMenu",
4 | "references": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": [],
12 | "versionDefines": [],
13 | "noEngineReferences": false
14 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/ContextCircleMenu.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 976b98c4db6ffd04d9cdc43fa24bfbe8
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/Core.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7a68bb0dafe4180bfa96b92e3ef5ee1
3 | timeCreated: 1714541582
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/Core/ContextCircleMenuAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ContextCircleMenu
4 | {
5 | ///
6 | /// Attribute to add an item to the Context Circle Menu.
7 | ///
8 | ///
9 | /// Apply this attribute to a method to add it as an item in the Context Circle Menu. The 'path' parameter
10 | /// defines the location and name of the item within the menu. Optionally, an 'iconPath' can be specified
11 | /// to set an icon for the menu item. Use the 'EditorIcons' static class to specify icons.
12 | ///
13 | [AttributeUsage(AttributeTargets.Method)]
14 | public sealed class ContextCircleMenuAttribute : Attribute
15 | {
16 | public readonly string IconPath;
17 | public readonly string Path;
18 |
19 | ///
20 | /// Initializes a new instance of the class with the specified path and
21 | /// optional icon path.
22 | ///
23 | /// The path under which the menu item will be listed in the Context Circle Menu.
24 | /// The optional path to the icon for the menu item.
25 | public ContextCircleMenuAttribute(string path, string iconPath = "")
26 | {
27 | Path = path;
28 | IconPath = iconPath;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/Core/ContextCircleMenuAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51c8e59ad58a4d72a8f570452a61c508
3 | timeCreated: 1713720173
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/Utility.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3bc0c359beb24bec847d60d10ee4c52b
3 | timeCreated: 1713769409
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Runtime/Utility/EditorIcons.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa533d12a73247daab694b047cd7a30f
3 | timeCreated: 1713769302
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 487dd503d7980514fb183b140d633d43
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom/Custom.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 12
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 0
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 512
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 256
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 1
83 | m_PVRDenoiserTypeDirect: 1
84 | m_PVRDenoiserTypeIndirect: 1
85 | m_PVRDenoiserTypeAO: 1
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 1
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ExportTrainingData: 0
98 | m_TrainingDataDestination: TrainingData
99 | m_LightProbeSampleCountMultiplier: 4
100 | m_LightingDataAsset: {fileID: 0}
101 | m_LightingSettings: {fileID: 0}
102 | --- !u!196 &4
103 | NavMeshSettings:
104 | serializedVersion: 2
105 | m_ObjectHideFlags: 0
106 | m_BuildSettings:
107 | serializedVersion: 3
108 | agentTypeID: 0
109 | agentRadius: 0.5
110 | agentHeight: 2
111 | agentSlope: 45
112 | agentClimb: 0.4
113 | ledgeDropHeight: 0
114 | maxJumpAcrossDistance: 0
115 | minRegionArea: 2
116 | manualCellSize: 0
117 | cellSize: 0.16666667
118 | manualTileSize: 0
119 | tileSize: 256
120 | buildHeightMesh: 0
121 | maxJobWorkers: 0
122 | preserveTilesOutsideBounds: 0
123 | debug:
124 | m_Flags: 0
125 | m_NavMeshData: {fileID: 0}
126 | --- !u!1 &9314703
127 | GameObject:
128 | m_ObjectHideFlags: 0
129 | m_CorrespondingSourceObject: {fileID: 0}
130 | m_PrefabInstance: {fileID: 0}
131 | m_PrefabAsset: {fileID: 0}
132 | serializedVersion: 6
133 | m_Component:
134 | - component: {fileID: 9314705}
135 | - component: {fileID: 9314704}
136 | m_Layer: 0
137 | m_Name: Directional Light
138 | m_TagString: Untagged
139 | m_Icon: {fileID: 0}
140 | m_NavMeshLayer: 0
141 | m_StaticEditorFlags: 0
142 | m_IsActive: 1
143 | --- !u!108 &9314704
144 | Light:
145 | m_ObjectHideFlags: 0
146 | m_CorrespondingSourceObject: {fileID: 0}
147 | m_PrefabInstance: {fileID: 0}
148 | m_PrefabAsset: {fileID: 0}
149 | m_GameObject: {fileID: 9314703}
150 | m_Enabled: 1
151 | serializedVersion: 10
152 | m_Type: 1
153 | m_Shape: 0
154 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
155 | m_Intensity: 1
156 | m_Range: 10
157 | m_SpotAngle: 30
158 | m_InnerSpotAngle: 21.80208
159 | m_CookieSize: 10
160 | m_Shadows:
161 | m_Type: 2
162 | m_Resolution: -1
163 | m_CustomResolution: -1
164 | m_Strength: 1
165 | m_Bias: 0.05
166 | m_NormalBias: 0.4
167 | m_NearPlane: 0.2
168 | m_CullingMatrixOverride:
169 | e00: 1
170 | e01: 0
171 | e02: 0
172 | e03: 0
173 | e10: 0
174 | e11: 1
175 | e12: 0
176 | e13: 0
177 | e20: 0
178 | e21: 0
179 | e22: 1
180 | e23: 0
181 | e30: 0
182 | e31: 0
183 | e32: 0
184 | e33: 1
185 | m_UseCullingMatrixOverride: 0
186 | m_Cookie: {fileID: 0}
187 | m_DrawHalo: 0
188 | m_Flare: {fileID: 0}
189 | m_RenderMode: 0
190 | m_CullingMask:
191 | serializedVersion: 2
192 | m_Bits: 4294967295
193 | m_RenderingLayerMask: 1
194 | m_Lightmapping: 4
195 | m_LightShadowCasterMode: 0
196 | m_AreaSize: {x: 1, y: 1}
197 | m_BounceIntensity: 1
198 | m_ColorTemperature: 6570
199 | m_UseColorTemperature: 0
200 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
201 | m_UseBoundingSphereOverride: 0
202 | m_UseViewFrustumForShadowCasterCull: 1
203 | m_ShadowRadius: 0
204 | m_ShadowAngle: 0
205 | --- !u!4 &9314705
206 | Transform:
207 | m_ObjectHideFlags: 0
208 | m_CorrespondingSourceObject: {fileID: 0}
209 | m_PrefabInstance: {fileID: 0}
210 | m_PrefabAsset: {fileID: 0}
211 | m_GameObject: {fileID: 9314703}
212 | serializedVersion: 2
213 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
214 | m_LocalPosition: {x: 0, y: 3, z: 0}
215 | m_LocalScale: {x: 1, y: 1, z: 1}
216 | m_ConstrainProportionsScale: 0
217 | m_Children: []
218 | m_Father: {fileID: 0}
219 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
220 | --- !u!1 &1925678451
221 | GameObject:
222 | m_ObjectHideFlags: 0
223 | m_CorrespondingSourceObject: {fileID: 0}
224 | m_PrefabInstance: {fileID: 0}
225 | m_PrefabAsset: {fileID: 0}
226 | serializedVersion: 6
227 | m_Component:
228 | - component: {fileID: 1925678454}
229 | - component: {fileID: 1925678453}
230 | - component: {fileID: 1925678452}
231 | m_Layer: 0
232 | m_Name: Main Camera
233 | m_TagString: MainCamera
234 | m_Icon: {fileID: 0}
235 | m_NavMeshLayer: 0
236 | m_StaticEditorFlags: 0
237 | m_IsActive: 1
238 | --- !u!81 &1925678452
239 | AudioListener:
240 | m_ObjectHideFlags: 0
241 | m_CorrespondingSourceObject: {fileID: 0}
242 | m_PrefabInstance: {fileID: 0}
243 | m_PrefabAsset: {fileID: 0}
244 | m_GameObject: {fileID: 1925678451}
245 | m_Enabled: 1
246 | --- !u!20 &1925678453
247 | Camera:
248 | m_ObjectHideFlags: 0
249 | m_CorrespondingSourceObject: {fileID: 0}
250 | m_PrefabInstance: {fileID: 0}
251 | m_PrefabAsset: {fileID: 0}
252 | m_GameObject: {fileID: 1925678451}
253 | m_Enabled: 1
254 | serializedVersion: 2
255 | m_ClearFlags: 1
256 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
257 | m_projectionMatrixMode: 1
258 | m_GateFitMode: 2
259 | m_FOVAxisMode: 0
260 | m_Iso: 200
261 | m_ShutterSpeed: 0.005
262 | m_Aperture: 16
263 | m_FocusDistance: 10
264 | m_FocalLength: 50
265 | m_BladeCount: 5
266 | m_Curvature: {x: 2, y: 11}
267 | m_BarrelClipping: 0.25
268 | m_Anamorphism: 0
269 | m_SensorSize: {x: 36, y: 24}
270 | m_LensShift: {x: 0, y: 0}
271 | m_NormalizedViewPortRect:
272 | serializedVersion: 2
273 | x: 0
274 | y: 0
275 | width: 1
276 | height: 1
277 | near clip plane: 0.3
278 | far clip plane: 1000
279 | field of view: 60
280 | orthographic: 0
281 | orthographic size: 5
282 | m_Depth: -1
283 | m_CullingMask:
284 | serializedVersion: 2
285 | m_Bits: 4294967295
286 | m_RenderingPath: -1
287 | m_TargetTexture: {fileID: 0}
288 | m_TargetDisplay: 0
289 | m_TargetEye: 3
290 | m_HDR: 1
291 | m_AllowMSAA: 1
292 | m_AllowDynamicResolution: 0
293 | m_ForceIntoRT: 0
294 | m_OcclusionCulling: 1
295 | m_StereoConvergence: 10
296 | m_StereoSeparation: 0.022
297 | --- !u!4 &1925678454
298 | Transform:
299 | m_ObjectHideFlags: 0
300 | m_CorrespondingSourceObject: {fileID: 0}
301 | m_PrefabInstance: {fileID: 0}
302 | m_PrefabAsset: {fileID: 0}
303 | m_GameObject: {fileID: 1925678451}
304 | serializedVersion: 2
305 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
306 | m_LocalPosition: {x: 0, y: 1, z: -10}
307 | m_LocalScale: {x: 1, y: 1, z: 1}
308 | m_ConstrainProportionsScale: 0
309 | m_Children: []
310 | m_Father: {fileID: 0}
311 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
312 | --- !u!1660057539 &9223372036854775807
313 | SceneRoots:
314 | m_ObjectHideFlags: 0
315 | m_Roots:
316 | - {fileID: 1925678454}
317 | - {fileID: 9314705}
318 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom/Custom.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b03b39a29f2a9ac49b7de51605d7ef64
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 89ee4d2d00404431b374b000fb44be87
3 | timeCreated: 1714032147
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom/Editor/CustomMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using ContextCircleMenu.Editor;
3 | using UnityEditor;
4 | using UnityEngine;
5 | using UnityEngine.UIElements;
6 |
7 | namespace ContextCircleMenu.Custom
8 | {
9 | public static class CustomMenu
10 | {
11 | [InitializeOnLoadMethod]
12 | public static void Initialize()
13 | {
14 | ContextCircleMenuLoader.OnBuild += builder =>
15 | {
16 | builder.AddMenu("Custom/Debug Test", new GUIContent(), () => Debug.Log("custom/test"));
17 | builder.AddMenu("Custom/Debug Test 2", EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon2x),
18 | () => Debug.Log("custom/test2"));
19 | builder.AddMenu("Custom/Debug Test 3", EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon2x),
20 | () => Debug.Log("custom/test3"));
21 |
22 | for (var i = 0; i < 5; i++)
23 | {
24 | var i1 = i;
25 | builder.AddMenu($"Custom/a/Debug Test {i}",
26 | EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon2x),
27 | () => Debug.Log($"custom/test{i1}"));
28 | }
29 |
30 | for (var i = 0; i < 6; i++)
31 | {
32 | var i1 = i;
33 | builder.AddMenu($"Custom/b/Debug Test {i}",
34 | EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon2x),
35 | () => Debug.Log($"custom/test{i1}"));
36 | }
37 |
38 | builder.AddMenu("Debug Test", new GUIContent(), () => Debug.Log("test"));
39 | builder.AddMenu("Debug Test 2", EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon2x),
40 | () => Debug.Log("test2"));
41 | builder.ConfigureButton(new CustomButtonFactory());
42 | builder.ConfigureFolder(new CustomFolderMenuFactory());
43 | };
44 | }
45 | }
46 |
47 | public class CustomFolderMenuFactory : IFolderCircleMenuFactory
48 | {
49 | public FolderCircleMenu Create(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory)
50 | {
51 | return new CustomFolderCircleMenu(path, menu, parent, factory);
52 | }
53 | }
54 |
55 | public class CustomFolderCircleMenu : FolderCircleMenu
56 | {
57 | public CustomFolderCircleMenu(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory) :
58 | base(path, menu, EditorGUIUtility.IconContent(EditorIcons.FolderIcon), parent, factory)
59 | {
60 | }
61 |
62 | protected override VisualElement[] CreateUtilityElements(ref ContextCircleMenuOption menuOption)
63 | {
64 | var element = new VisualElement();
65 | var option = menuOption;
66 | element.generateVisualContent += context =>
67 | {
68 | var painter = context.painter2D;
69 | var buttonCount = ButtonElements.Length;
70 | for (var i = 0; i < buttonCount; i++)
71 | {
72 | var angle = (float)i / buttonCount * 360f;
73 | if (buttonCount % 2 == 1)
74 | angle += 180f;
75 | else
76 | angle += 180f - 360f / buttonCount / 2;
77 | var vector = new Vector2(
78 | Mathf.Sin(Mathf.Deg2Rad * angle),
79 | Mathf.Cos(Mathf.Deg2Rad * angle)).normalized;
80 |
81 | var from = vector * 12f;
82 | var to = vector * option.Radius * 1.5f;
83 | painter.strokeColor = Color.black;
84 | painter.lineWidth = 2f;
85 | painter.BeginPath();
86 | painter.MoveTo(from);
87 | painter.LineTo(to);
88 | painter.Stroke();
89 | }
90 |
91 | painter.BeginPath();
92 | painter.Arc(Vector2.zero, option.Radius * 1.5f, 0, 360f);
93 | painter.fillColor = new Color(0f, 0f, 0f, 0.2f);
94 | painter.Fill();
95 |
96 | painter.DrawCircle(Vector2.zero, option.Radius * 1.5f, 0, 360f, 5f, Color.gray);
97 | };
98 | return new[] { element };
99 | }
100 | }
101 |
102 | public class CustomButtonFactory : IButtonFactory
103 | {
104 | public CircleButton Create(string path, GUIContent icon, Action onSelected, int section)
105 | {
106 | return new OnlyImageCircleButton(path, icon, section, onSelected);
107 | }
108 |
109 | public CircleButton CreateBackButton(Action onBack)
110 | {
111 | return new OnlyImageCircleButton("Back", EditorGUIUtility.IconContent(EditorIcons.Back2x),
112 | -1, onBack);
113 | }
114 | }
115 |
116 | public class OnlyImageCircleButton : CircleButton
117 | {
118 | public OnlyImageCircleButton(string text, GUIContent icon, int section, Action onSelect) : base(text, icon,
119 | section, onSelect)
120 | {
121 | }
122 |
123 | protected override void ModifierButton(Button button, string text, GUIContent icon, int section)
124 | {
125 | var image = new Image
126 | {
127 | image = icon.image,
128 | style =
129 | {
130 | width = 32f,
131 | height = 32f,
132 | flexShrink = 0
133 | },
134 | tooltip = text
135 | };
136 |
137 | button.Add(image);
138 | }
139 | }
140 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Custom/Editor/CustomMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 05d0a7ea4ca9473498d0f40ad86cff5e
3 | timeCreated: 1714032205
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 15b016060da24f97bef24027c231885f
3 | timeCreated: 1714032111
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b7b767ba8ce4573a76a70cae5f9b6cf
3 | timeCreated: 1714026847
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox/Editor/Menu.cs:
--------------------------------------------------------------------------------
1 | using ContextCircleMenu.Editor;
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace ContextCircleMenu.Sandbox
6 | {
7 | public class Menu
8 | {
9 | [ContextCircleMenu("Debug Test", EditorIcons.ConsoleInfoIcon)]
10 | public static void TestMethod()
11 | {
12 | Debug.Log("TestMethod");
13 | }
14 |
15 | [ContextCircleMenu("Instantiate/Cube", EditorIcons.PreMatCube)]
16 | public static void InstantiateCube()
17 | {
18 | var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
19 | cube.transform.position = Vector3.zero;
20 | }
21 |
22 | [ContextCircleMenu("Instantiate/Sphere", EditorIcons.PreMatSphere)]
23 | public static void InstantiateSphere()
24 | {
25 | var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
26 | sphere.transform.position = Vector3.zero;
27 | }
28 |
29 | [ContextCircleMenu("SceneView/Shaded", "d_Shaded")]
30 | public static void ChangeShadingModeToShaded()
31 | {
32 | var sceneView = SceneView.lastActiveSceneView;
33 | sceneView.cameraMode = SceneView.GetBuiltinCameraMode(DrawCameraMode.Textured);
34 | }
35 |
36 | [ContextCircleMenu("SceneView/Wireframe", "d_Shaded")]
37 | public static void ChangeShadingModeToWireframe()
38 | {
39 | var sceneView = SceneView.lastActiveSceneView;
40 | sceneView.cameraMode = SceneView.GetBuiltinCameraMode(DrawCameraMode.Wireframe);
41 | }
42 |
43 | [ContextCircleMenu("SceneView/Shaded Wireframe", "d_Shaded")]
44 | public static void ChangeShadingModeToShadedWireframe()
45 | {
46 | var sceneView = SceneView.lastActiveSceneView;
47 | sceneView.cameraMode = SceneView.GetBuiltinCameraMode(DrawCameraMode.TexturedWire);
48 | }
49 |
50 | [ContextCircleMenu("SceneView/Toggle 2D", EditorIcons.SceneView2D)]
51 | public static void Toggle2D()
52 | {
53 | var sceneView = SceneView.lastActiveSceneView;
54 | sceneView.in2DMode = !sceneView.in2DMode;
55 | }
56 |
57 | [ContextCircleMenu("SceneView/Toggle Gizmos", EditorIcons.GizmosToggle)]
58 | private static void ToggleGizmos()
59 | {
60 | var sceneView = SceneView.lastActiveSceneView;
61 | sceneView.drawGizmos = !sceneView.drawGizmos;
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox/Editor/Menu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 46f70908cb5143299b44240177992c1a
3 | timeCreated: 1713807190
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox/Sample.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 12
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 0
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 512
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 256
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 1
83 | m_PVRDenoiserTypeDirect: 1
84 | m_PVRDenoiserTypeIndirect: 1
85 | m_PVRDenoiserTypeAO: 1
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 1
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ExportTrainingData: 0
98 | m_TrainingDataDestination: TrainingData
99 | m_LightProbeSampleCountMultiplier: 4
100 | m_LightingDataAsset: {fileID: 0}
101 | m_LightingSettings: {fileID: 0}
102 | --- !u!196 &4
103 | NavMeshSettings:
104 | serializedVersion: 2
105 | m_ObjectHideFlags: 0
106 | m_BuildSettings:
107 | serializedVersion: 3
108 | agentTypeID: 0
109 | agentRadius: 0.5
110 | agentHeight: 2
111 | agentSlope: 45
112 | agentClimb: 0.4
113 | ledgeDropHeight: 0
114 | maxJumpAcrossDistance: 0
115 | minRegionArea: 2
116 | manualCellSize: 0
117 | cellSize: 0.16666667
118 | manualTileSize: 0
119 | tileSize: 256
120 | buildHeightMesh: 0
121 | maxJobWorkers: 0
122 | preserveTilesOutsideBounds: 0
123 | debug:
124 | m_Flags: 0
125 | m_NavMeshData: {fileID: 0}
126 | --- !u!1 &461918383
127 | GameObject:
128 | m_ObjectHideFlags: 0
129 | m_CorrespondingSourceObject: {fileID: 0}
130 | m_PrefabInstance: {fileID: 0}
131 | m_PrefabAsset: {fileID: 0}
132 | serializedVersion: 6
133 | m_Component:
134 | - component: {fileID: 461918386}
135 | - component: {fileID: 461918385}
136 | - component: {fileID: 461918384}
137 | m_Layer: 0
138 | m_Name: Main Camera
139 | m_TagString: MainCamera
140 | m_Icon: {fileID: 0}
141 | m_NavMeshLayer: 0
142 | m_StaticEditorFlags: 0
143 | m_IsActive: 1
144 | --- !u!81 &461918384
145 | AudioListener:
146 | m_ObjectHideFlags: 0
147 | m_CorrespondingSourceObject: {fileID: 0}
148 | m_PrefabInstance: {fileID: 0}
149 | m_PrefabAsset: {fileID: 0}
150 | m_GameObject: {fileID: 461918383}
151 | m_Enabled: 1
152 | --- !u!20 &461918385
153 | Camera:
154 | m_ObjectHideFlags: 0
155 | m_CorrespondingSourceObject: {fileID: 0}
156 | m_PrefabInstance: {fileID: 0}
157 | m_PrefabAsset: {fileID: 0}
158 | m_GameObject: {fileID: 461918383}
159 | m_Enabled: 1
160 | serializedVersion: 2
161 | m_ClearFlags: 1
162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
163 | m_projectionMatrixMode: 1
164 | m_GateFitMode: 2
165 | m_FOVAxisMode: 0
166 | m_Iso: 200
167 | m_ShutterSpeed: 0.005
168 | m_Aperture: 16
169 | m_FocusDistance: 10
170 | m_FocalLength: 50
171 | m_BladeCount: 5
172 | m_Curvature: {x: 2, y: 11}
173 | m_BarrelClipping: 0.25
174 | m_Anamorphism: 0
175 | m_SensorSize: {x: 36, y: 24}
176 | m_LensShift: {x: 0, y: 0}
177 | m_NormalizedViewPortRect:
178 | serializedVersion: 2
179 | x: 0
180 | y: 0
181 | width: 1
182 | height: 1
183 | near clip plane: 0.3
184 | far clip plane: 1000
185 | field of view: 60
186 | orthographic: 0
187 | orthographic size: 5
188 | m_Depth: -1
189 | m_CullingMask:
190 | serializedVersion: 2
191 | m_Bits: 4294967295
192 | m_RenderingPath: -1
193 | m_TargetTexture: {fileID: 0}
194 | m_TargetDisplay: 0
195 | m_TargetEye: 3
196 | m_HDR: 1
197 | m_AllowMSAA: 1
198 | m_AllowDynamicResolution: 0
199 | m_ForceIntoRT: 0
200 | m_OcclusionCulling: 1
201 | m_StereoConvergence: 10
202 | m_StereoSeparation: 0.022
203 | --- !u!4 &461918386
204 | Transform:
205 | m_ObjectHideFlags: 0
206 | m_CorrespondingSourceObject: {fileID: 0}
207 | m_PrefabInstance: {fileID: 0}
208 | m_PrefabAsset: {fileID: 0}
209 | m_GameObject: {fileID: 461918383}
210 | serializedVersion: 2
211 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
212 | m_LocalPosition: {x: 0, y: 1, z: -10}
213 | m_LocalScale: {x: 1, y: 1, z: 1}
214 | m_ConstrainProportionsScale: 0
215 | m_Children: []
216 | m_Father: {fileID: 0}
217 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
218 | --- !u!1 &1141626238
219 | GameObject:
220 | m_ObjectHideFlags: 0
221 | m_CorrespondingSourceObject: {fileID: 0}
222 | m_PrefabInstance: {fileID: 0}
223 | m_PrefabAsset: {fileID: 0}
224 | serializedVersion: 6
225 | m_Component:
226 | - component: {fileID: 1141626240}
227 | - component: {fileID: 1141626239}
228 | m_Layer: 0
229 | m_Name: Directional Light
230 | m_TagString: Untagged
231 | m_Icon: {fileID: 0}
232 | m_NavMeshLayer: 0
233 | m_StaticEditorFlags: 0
234 | m_IsActive: 1
235 | --- !u!108 &1141626239
236 | Light:
237 | m_ObjectHideFlags: 0
238 | m_CorrespondingSourceObject: {fileID: 0}
239 | m_PrefabInstance: {fileID: 0}
240 | m_PrefabAsset: {fileID: 0}
241 | m_GameObject: {fileID: 1141626238}
242 | m_Enabled: 1
243 | serializedVersion: 10
244 | m_Type: 1
245 | m_Shape: 0
246 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
247 | m_Intensity: 1
248 | m_Range: 10
249 | m_SpotAngle: 30
250 | m_InnerSpotAngle: 21.80208
251 | m_CookieSize: 10
252 | m_Shadows:
253 | m_Type: 2
254 | m_Resolution: -1
255 | m_CustomResolution: -1
256 | m_Strength: 1
257 | m_Bias: 0.05
258 | m_NormalBias: 0.4
259 | m_NearPlane: 0.2
260 | m_CullingMatrixOverride:
261 | e00: 1
262 | e01: 0
263 | e02: 0
264 | e03: 0
265 | e10: 0
266 | e11: 1
267 | e12: 0
268 | e13: 0
269 | e20: 0
270 | e21: 0
271 | e22: 1
272 | e23: 0
273 | e30: 0
274 | e31: 0
275 | e32: 0
276 | e33: 1
277 | m_UseCullingMatrixOverride: 0
278 | m_Cookie: {fileID: 0}
279 | m_DrawHalo: 0
280 | m_Flare: {fileID: 0}
281 | m_RenderMode: 0
282 | m_CullingMask:
283 | serializedVersion: 2
284 | m_Bits: 4294967295
285 | m_RenderingLayerMask: 1
286 | m_Lightmapping: 4
287 | m_LightShadowCasterMode: 0
288 | m_AreaSize: {x: 1, y: 1}
289 | m_BounceIntensity: 1
290 | m_ColorTemperature: 6570
291 | m_UseColorTemperature: 0
292 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
293 | m_UseBoundingSphereOverride: 0
294 | m_UseViewFrustumForShadowCasterCull: 1
295 | m_ShadowRadius: 0
296 | m_ShadowAngle: 0
297 | --- !u!4 &1141626240
298 | Transform:
299 | m_ObjectHideFlags: 0
300 | m_CorrespondingSourceObject: {fileID: 0}
301 | m_PrefabInstance: {fileID: 0}
302 | m_PrefabAsset: {fileID: 0}
303 | m_GameObject: {fileID: 1141626238}
304 | serializedVersion: 2
305 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
306 | m_LocalPosition: {x: 0, y: 3, z: 0}
307 | m_LocalScale: {x: 1, y: 1, z: 1}
308 | m_ConstrainProportionsScale: 0
309 | m_Children: []
310 | m_Father: {fileID: 0}
311 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
312 | --- !u!1660057539 &9223372036854775807
313 | SceneRoots:
314 | m_ObjectHideFlags: 0
315 | m_Roots:
316 | - {fileID: 461918386}
317 | - {fileID: 1141626240}
318 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/Samples~/Sandbox/Sample.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0bb57a90effdc249ad79da4594ade1f
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.garume.context-circle-menu",
3 | "displayName": "Context Circle Menu",
4 | "version": "1.0.0",
5 | "unity": "2022.3",
6 | "license": "MIT",
7 | "category": "UI",
8 | "keywords": [
9 | "unity",
10 | "uitoolkit"
11 | ],
12 | "author": {
13 | "name": "Garume",
14 | "url": "https://github.com/Garume"
15 | },
16 | "description": "Context Circle Menu",
17 | "samples": [
18 | {
19 | "displayName": "Sandbox",
20 | "description": "How to use Context Circle Menu.",
21 | "path": "Samples~/Sandbox"
22 | },
23 | {
24 | "displayName": "Custom",
25 | "description": "How to customize Context Circle.",
26 | "path": "Samples~/Custom"
27 | }
28 | ]
29 | }
--------------------------------------------------------------------------------
/Assets/ContextCircleMenu/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 76d47e12087b4b72a2bc67acb4ce267f
3 | timeCreated: 1714033499
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 62e17e677dc7a884bacfb89bc73848d8
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/SampleScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 705507994}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 12
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 0
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 500
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 2
83 | m_PVRDenoiserTypeDirect: 0
84 | m_PVRDenoiserTypeIndirect: 0
85 | m_PVRDenoiserTypeAO: 0
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 0
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ExportTrainingData: 0
98 | m_TrainingDataDestination: TrainingData
99 | m_LightProbeSampleCountMultiplier: 4
100 | m_LightingDataAsset: {fileID: 0}
101 | m_LightingSettings: {fileID: 0}
102 | --- !u!196 &4
103 | NavMeshSettings:
104 | serializedVersion: 2
105 | m_ObjectHideFlags: 0
106 | m_BuildSettings:
107 | serializedVersion: 2
108 | agentTypeID: 0
109 | agentRadius: 0.5
110 | agentHeight: 2
111 | agentSlope: 45
112 | agentClimb: 0.4
113 | ledgeDropHeight: 0
114 | maxJumpAcrossDistance: 0
115 | minRegionArea: 2
116 | manualCellSize: 0
117 | cellSize: 0.16666667
118 | manualTileSize: 0
119 | tileSize: 256
120 | accuratePlacement: 0
121 | debug:
122 | m_Flags: 0
123 | m_NavMeshData: {fileID: 0}
124 | --- !u!1 &705507993
125 | GameObject:
126 | m_ObjectHideFlags: 0
127 | m_CorrespondingSourceObject: {fileID: 0}
128 | m_PrefabInternal: {fileID: 0}
129 | serializedVersion: 6
130 | m_Component:
131 | - component: {fileID: 705507995}
132 | - component: {fileID: 705507994}
133 | m_Layer: 0
134 | m_Name: Directional Light
135 | m_TagString: Untagged
136 | m_Icon: {fileID: 0}
137 | m_NavMeshLayer: 0
138 | m_StaticEditorFlags: 0
139 | m_IsActive: 1
140 | --- !u!108 &705507994
141 | Light:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInternal: {fileID: 0}
145 | m_GameObject: {fileID: 705507993}
146 | m_Enabled: 1
147 | serializedVersion: 8
148 | m_Type: 1
149 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
150 | m_Intensity: 1
151 | m_Range: 10
152 | m_SpotAngle: 30
153 | m_CookieSize: 10
154 | m_Shadows:
155 | m_Type: 2
156 | m_Resolution: -1
157 | m_CustomResolution: -1
158 | m_Strength: 1
159 | m_Bias: 0.05
160 | m_NormalBias: 0.4
161 | m_NearPlane: 0.2
162 | m_Cookie: {fileID: 0}
163 | m_DrawHalo: 0
164 | m_Flare: {fileID: 0}
165 | m_RenderMode: 0
166 | m_CullingMask:
167 | serializedVersion: 2
168 | m_Bits: 4294967295
169 | m_Lightmapping: 1
170 | m_LightShadowCasterMode: 0
171 | m_AreaSize: {x: 1, y: 1}
172 | m_BounceIntensity: 1
173 | m_ColorTemperature: 6570
174 | m_UseColorTemperature: 0
175 | m_ShadowRadius: 0
176 | m_ShadowAngle: 0
177 | --- !u!4 &705507995
178 | Transform:
179 | m_ObjectHideFlags: 0
180 | m_CorrespondingSourceObject: {fileID: 0}
181 | m_PrefabInternal: {fileID: 0}
182 | m_GameObject: {fileID: 705507993}
183 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
184 | m_LocalPosition: {x: 0, y: 3, z: 0}
185 | m_LocalScale: {x: 1, y: 1, z: 1}
186 | m_Children: []
187 | m_Father: {fileID: 0}
188 | m_RootOrder: 1
189 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
190 | --- !u!1 &963194225
191 | GameObject:
192 | m_ObjectHideFlags: 0
193 | m_CorrespondingSourceObject: {fileID: 0}
194 | m_PrefabInternal: {fileID: 0}
195 | serializedVersion: 6
196 | m_Component:
197 | - component: {fileID: 963194228}
198 | - component: {fileID: 963194227}
199 | - component: {fileID: 963194226}
200 | m_Layer: 0
201 | m_Name: Main Camera
202 | m_TagString: MainCamera
203 | m_Icon: {fileID: 0}
204 | m_NavMeshLayer: 0
205 | m_StaticEditorFlags: 0
206 | m_IsActive: 1
207 | --- !u!81 &963194226
208 | AudioListener:
209 | m_ObjectHideFlags: 0
210 | m_CorrespondingSourceObject: {fileID: 0}
211 | m_PrefabInternal: {fileID: 0}
212 | m_GameObject: {fileID: 963194225}
213 | m_Enabled: 1
214 | --- !u!20 &963194227
215 | Camera:
216 | m_ObjectHideFlags: 0
217 | m_CorrespondingSourceObject: {fileID: 0}
218 | m_PrefabInternal: {fileID: 0}
219 | m_GameObject: {fileID: 963194225}
220 | m_Enabled: 1
221 | serializedVersion: 2
222 | m_ClearFlags: 1
223 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
224 | m_projectionMatrixMode: 1
225 | m_SensorSize: {x: 36, y: 24}
226 | m_LensShift: {x: 0, y: 0}
227 | m_GateFitMode: 2
228 | m_FocalLength: 50
229 | m_NormalizedViewPortRect:
230 | serializedVersion: 2
231 | x: 0
232 | y: 0
233 | width: 1
234 | height: 1
235 | near clip plane: 0.3
236 | far clip plane: 1000
237 | field of view: 60
238 | orthographic: 0
239 | orthographic size: 5
240 | m_Depth: -1
241 | m_CullingMask:
242 | serializedVersion: 2
243 | m_Bits: 4294967295
244 | m_RenderingPath: -1
245 | m_TargetTexture: {fileID: 0}
246 | m_TargetDisplay: 0
247 | m_TargetEye: 3
248 | m_HDR: 1
249 | m_AllowMSAA: 1
250 | m_AllowDynamicResolution: 0
251 | m_ForceIntoRT: 0
252 | m_OcclusionCulling: 1
253 | m_StereoConvergence: 10
254 | m_StereoSeparation: 0.022
255 | --- !u!4 &963194228
256 | Transform:
257 | m_ObjectHideFlags: 0
258 | m_CorrespondingSourceObject: {fileID: 0}
259 | m_PrefabInternal: {fileID: 0}
260 | m_GameObject: {fileID: 963194225}
261 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
262 | m_LocalPosition: {x: 0, y: 1, z: -10}
263 | m_LocalScale: {x: 1, y: 1, z: 1}
264 | m_Children: []
265 | m_Father: {fileID: 0}
266 | m_RootOrder: 0
267 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
268 |
--------------------------------------------------------------------------------
/Assets/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Garume
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": "2.3.1",
4 | "com.unity.feature.development": "1.0.1",
5 | "com.unity.textmeshpro": "3.0.6",
6 | "com.unity.timeline": "1.7.6",
7 | "com.unity.ugui": "1.0.0",
8 | "com.unity.visualscripting": "1.9.2",
9 | "com.unity.modules.ai": "1.0.0",
10 | "com.unity.modules.androidjni": "1.0.0",
11 | "com.unity.modules.animation": "1.0.0",
12 | "com.unity.modules.assetbundle": "1.0.0",
13 | "com.unity.modules.audio": "1.0.0",
14 | "com.unity.modules.cloth": "1.0.0",
15 | "com.unity.modules.director": "1.0.0",
16 | "com.unity.modules.imageconversion": "1.0.0",
17 | "com.unity.modules.imgui": "1.0.0",
18 | "com.unity.modules.jsonserialize": "1.0.0",
19 | "com.unity.modules.particlesystem": "1.0.0",
20 | "com.unity.modules.physics": "1.0.0",
21 | "com.unity.modules.physics2d": "1.0.0",
22 | "com.unity.modules.screencapture": "1.0.0",
23 | "com.unity.modules.terrain": "1.0.0",
24 | "com.unity.modules.terrainphysics": "1.0.0",
25 | "com.unity.modules.tilemap": "1.0.0",
26 | "com.unity.modules.ui": "1.0.0",
27 | "com.unity.modules.uielements": "1.0.0",
28 | "com.unity.modules.umbra": "1.0.0",
29 | "com.unity.modules.unityanalytics": "1.0.0",
30 | "com.unity.modules.unitywebrequest": "1.0.0",
31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
32 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
33 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
34 | "com.unity.modules.unitywebrequestwww": "1.0.0",
35 | "com.unity.modules.vehicles": "1.0.0",
36 | "com.unity.modules.video": "1.0.0",
37 | "com.unity.modules.vr": "1.0.0",
38 | "com.unity.modules.wind": "1.0.0",
39 | "com.unity.modules.xr": "1.0.0"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": {
4 | "version": "2.3.1",
5 | "depth": 0,
6 | "source": "registry",
7 | "dependencies": {},
8 | "url": "https://packages.unity.com"
9 | },
10 | "com.unity.editorcoroutines": {
11 | "version": "1.0.0",
12 | "depth": 1,
13 | "source": "registry",
14 | "dependencies": {},
15 | "url": "https://packages.unity.com"
16 | },
17 | "com.unity.ext.nunit": {
18 | "version": "1.0.6",
19 | "depth": 2,
20 | "source": "registry",
21 | "dependencies": {},
22 | "url": "https://packages.unity.com"
23 | },
24 | "com.unity.feature.development": {
25 | "version": "1.0.1",
26 | "depth": 0,
27 | "source": "builtin",
28 | "dependencies": {
29 | "com.unity.ide.visualstudio": "2.0.22",
30 | "com.unity.ide.rider": "3.0.28",
31 | "com.unity.ide.vscode": "1.2.5",
32 | "com.unity.editorcoroutines": "1.0.0",
33 | "com.unity.performance.profile-analyzer": "1.2.2",
34 | "com.unity.test-framework": "1.1.33",
35 | "com.unity.testtools.codecoverage": "1.2.5"
36 | }
37 | },
38 | "com.unity.ide.rider": {
39 | "version": "3.0.28",
40 | "depth": 1,
41 | "source": "registry",
42 | "dependencies": {
43 | "com.unity.ext.nunit": "1.0.6"
44 | },
45 | "url": "https://packages.unity.com"
46 | },
47 | "com.unity.ide.visualstudio": {
48 | "version": "2.0.22",
49 | "depth": 1,
50 | "source": "registry",
51 | "dependencies": {
52 | "com.unity.test-framework": "1.1.9"
53 | },
54 | "url": "https://packages.unity.com"
55 | },
56 | "com.unity.ide.vscode": {
57 | "version": "1.2.5",
58 | "depth": 1,
59 | "source": "registry",
60 | "dependencies": {},
61 | "url": "https://packages.unity.com"
62 | },
63 | "com.unity.performance.profile-analyzer": {
64 | "version": "1.2.2",
65 | "depth": 1,
66 | "source": "registry",
67 | "dependencies": {},
68 | "url": "https://packages.unity.com"
69 | },
70 | "com.unity.settings-manager": {
71 | "version": "2.0.1",
72 | "depth": 2,
73 | "source": "registry",
74 | "dependencies": {},
75 | "url": "https://packages.unity.com"
76 | },
77 | "com.unity.test-framework": {
78 | "version": "1.1.33",
79 | "depth": 1,
80 | "source": "registry",
81 | "dependencies": {
82 | "com.unity.ext.nunit": "1.0.6",
83 | "com.unity.modules.imgui": "1.0.0",
84 | "com.unity.modules.jsonserialize": "1.0.0"
85 | },
86 | "url": "https://packages.unity.com"
87 | },
88 | "com.unity.testtools.codecoverage": {
89 | "version": "1.2.5",
90 | "depth": 1,
91 | "source": "registry",
92 | "dependencies": {
93 | "com.unity.test-framework": "1.0.16",
94 | "com.unity.settings-manager": "1.0.1"
95 | },
96 | "url": "https://packages.unity.com"
97 | },
98 | "com.unity.textmeshpro": {
99 | "version": "3.0.6",
100 | "depth": 0,
101 | "source": "registry",
102 | "dependencies": {
103 | "com.unity.ugui": "1.0.0"
104 | },
105 | "url": "https://packages.unity.com"
106 | },
107 | "com.unity.timeline": {
108 | "version": "1.7.6",
109 | "depth": 0,
110 | "source": "registry",
111 | "dependencies": {
112 | "com.unity.modules.director": "1.0.0",
113 | "com.unity.modules.animation": "1.0.0",
114 | "com.unity.modules.audio": "1.0.0",
115 | "com.unity.modules.particlesystem": "1.0.0"
116 | },
117 | "url": "https://packages.unity.com"
118 | },
119 | "com.unity.ugui": {
120 | "version": "1.0.0",
121 | "depth": 0,
122 | "source": "builtin",
123 | "dependencies": {
124 | "com.unity.modules.ui": "1.0.0",
125 | "com.unity.modules.imgui": "1.0.0"
126 | }
127 | },
128 | "com.unity.visualscripting": {
129 | "version": "1.9.2",
130 | "depth": 0,
131 | "source": "registry",
132 | "dependencies": {
133 | "com.unity.ugui": "1.0.0",
134 | "com.unity.modules.jsonserialize": "1.0.0"
135 | },
136 | "url": "https://packages.unity.com"
137 | },
138 | "com.unity.modules.ai": {
139 | "version": "1.0.0",
140 | "depth": 0,
141 | "source": "builtin",
142 | "dependencies": {}
143 | },
144 | "com.unity.modules.androidjni": {
145 | "version": "1.0.0",
146 | "depth": 0,
147 | "source": "builtin",
148 | "dependencies": {}
149 | },
150 | "com.unity.modules.animation": {
151 | "version": "1.0.0",
152 | "depth": 0,
153 | "source": "builtin",
154 | "dependencies": {}
155 | },
156 | "com.unity.modules.assetbundle": {
157 | "version": "1.0.0",
158 | "depth": 0,
159 | "source": "builtin",
160 | "dependencies": {}
161 | },
162 | "com.unity.modules.audio": {
163 | "version": "1.0.0",
164 | "depth": 0,
165 | "source": "builtin",
166 | "dependencies": {}
167 | },
168 | "com.unity.modules.cloth": {
169 | "version": "1.0.0",
170 | "depth": 0,
171 | "source": "builtin",
172 | "dependencies": {
173 | "com.unity.modules.physics": "1.0.0"
174 | }
175 | },
176 | "com.unity.modules.director": {
177 | "version": "1.0.0",
178 | "depth": 0,
179 | "source": "builtin",
180 | "dependencies": {
181 | "com.unity.modules.audio": "1.0.0",
182 | "com.unity.modules.animation": "1.0.0"
183 | }
184 | },
185 | "com.unity.modules.imageconversion": {
186 | "version": "1.0.0",
187 | "depth": 0,
188 | "source": "builtin",
189 | "dependencies": {}
190 | },
191 | "com.unity.modules.imgui": {
192 | "version": "1.0.0",
193 | "depth": 0,
194 | "source": "builtin",
195 | "dependencies": {}
196 | },
197 | "com.unity.modules.jsonserialize": {
198 | "version": "1.0.0",
199 | "depth": 0,
200 | "source": "builtin",
201 | "dependencies": {}
202 | },
203 | "com.unity.modules.particlesystem": {
204 | "version": "1.0.0",
205 | "depth": 0,
206 | "source": "builtin",
207 | "dependencies": {}
208 | },
209 | "com.unity.modules.physics": {
210 | "version": "1.0.0",
211 | "depth": 0,
212 | "source": "builtin",
213 | "dependencies": {}
214 | },
215 | "com.unity.modules.physics2d": {
216 | "version": "1.0.0",
217 | "depth": 0,
218 | "source": "builtin",
219 | "dependencies": {}
220 | },
221 | "com.unity.modules.screencapture": {
222 | "version": "1.0.0",
223 | "depth": 0,
224 | "source": "builtin",
225 | "dependencies": {
226 | "com.unity.modules.imageconversion": "1.0.0"
227 | }
228 | },
229 | "com.unity.modules.subsystems": {
230 | "version": "1.0.0",
231 | "depth": 1,
232 | "source": "builtin",
233 | "dependencies": {
234 | "com.unity.modules.jsonserialize": "1.0.0"
235 | }
236 | },
237 | "com.unity.modules.terrain": {
238 | "version": "1.0.0",
239 | "depth": 0,
240 | "source": "builtin",
241 | "dependencies": {}
242 | },
243 | "com.unity.modules.terrainphysics": {
244 | "version": "1.0.0",
245 | "depth": 0,
246 | "source": "builtin",
247 | "dependencies": {
248 | "com.unity.modules.physics": "1.0.0",
249 | "com.unity.modules.terrain": "1.0.0"
250 | }
251 | },
252 | "com.unity.modules.tilemap": {
253 | "version": "1.0.0",
254 | "depth": 0,
255 | "source": "builtin",
256 | "dependencies": {
257 | "com.unity.modules.physics2d": "1.0.0"
258 | }
259 | },
260 | "com.unity.modules.ui": {
261 | "version": "1.0.0",
262 | "depth": 0,
263 | "source": "builtin",
264 | "dependencies": {}
265 | },
266 | "com.unity.modules.uielements": {
267 | "version": "1.0.0",
268 | "depth": 0,
269 | "source": "builtin",
270 | "dependencies": {
271 | "com.unity.modules.ui": "1.0.0",
272 | "com.unity.modules.imgui": "1.0.0",
273 | "com.unity.modules.jsonserialize": "1.0.0"
274 | }
275 | },
276 | "com.unity.modules.umbra": {
277 | "version": "1.0.0",
278 | "depth": 0,
279 | "source": "builtin",
280 | "dependencies": {}
281 | },
282 | "com.unity.modules.unityanalytics": {
283 | "version": "1.0.0",
284 | "depth": 0,
285 | "source": "builtin",
286 | "dependencies": {
287 | "com.unity.modules.unitywebrequest": "1.0.0",
288 | "com.unity.modules.jsonserialize": "1.0.0"
289 | }
290 | },
291 | "com.unity.modules.unitywebrequest": {
292 | "version": "1.0.0",
293 | "depth": 0,
294 | "source": "builtin",
295 | "dependencies": {}
296 | },
297 | "com.unity.modules.unitywebrequestassetbundle": {
298 | "version": "1.0.0",
299 | "depth": 0,
300 | "source": "builtin",
301 | "dependencies": {
302 | "com.unity.modules.assetbundle": "1.0.0",
303 | "com.unity.modules.unitywebrequest": "1.0.0"
304 | }
305 | },
306 | "com.unity.modules.unitywebrequestaudio": {
307 | "version": "1.0.0",
308 | "depth": 0,
309 | "source": "builtin",
310 | "dependencies": {
311 | "com.unity.modules.unitywebrequest": "1.0.0",
312 | "com.unity.modules.audio": "1.0.0"
313 | }
314 | },
315 | "com.unity.modules.unitywebrequesttexture": {
316 | "version": "1.0.0",
317 | "depth": 0,
318 | "source": "builtin",
319 | "dependencies": {
320 | "com.unity.modules.unitywebrequest": "1.0.0",
321 | "com.unity.modules.imageconversion": "1.0.0"
322 | }
323 | },
324 | "com.unity.modules.unitywebrequestwww": {
325 | "version": "1.0.0",
326 | "depth": 0,
327 | "source": "builtin",
328 | "dependencies": {
329 | "com.unity.modules.unitywebrequest": "1.0.0",
330 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
331 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
332 | "com.unity.modules.audio": "1.0.0",
333 | "com.unity.modules.assetbundle": "1.0.0",
334 | "com.unity.modules.imageconversion": "1.0.0"
335 | }
336 | },
337 | "com.unity.modules.vehicles": {
338 | "version": "1.0.0",
339 | "depth": 0,
340 | "source": "builtin",
341 | "dependencies": {
342 | "com.unity.modules.physics": "1.0.0"
343 | }
344 | },
345 | "com.unity.modules.video": {
346 | "version": "1.0.0",
347 | "depth": 0,
348 | "source": "builtin",
349 | "dependencies": {
350 | "com.unity.modules.audio": "1.0.0",
351 | "com.unity.modules.ui": "1.0.0",
352 | "com.unity.modules.unitywebrequest": "1.0.0"
353 | }
354 | },
355 | "com.unity.modules.vr": {
356 | "version": "1.0.0",
357 | "depth": 0,
358 | "source": "builtin",
359 | "dependencies": {
360 | "com.unity.modules.jsonserialize": "1.0.0",
361 | "com.unity.modules.physics": "1.0.0",
362 | "com.unity.modules.xr": "1.0.0"
363 | }
364 | },
365 | "com.unity.modules.wind": {
366 | "version": "1.0.0",
367 | "depth": 0,
368 | "source": "builtin",
369 | "dependencies": {}
370 | },
371 | "com.unity.modules.xr": {
372 | "version": "1.0.0",
373 | "depth": 0,
374 | "source": "builtin",
375 | "dependencies": {
376 | "com.unity.modules.physics": "1.0.0",
377 | "com.unity.modules.jsonserialize": "1.0.0",
378 | "com.unity.modules.subsystems": "1.0.0"
379 | }
380 | }
381 | }
382 | }
383 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 0
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 0
30 | m_SerializeInlineMappingsOnOneLine: 1
31 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | m_PreloadedShaders: []
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 0}
42 | m_TransparencySortMode: 0
43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
44 | m_DefaultRenderingPath: 1
45 | m_DefaultMobileRenderingPath: 1
46 | m_TierSettings: []
47 | m_LightmapStripping: 0
48 | m_FogStripping: 0
49 | m_InstancingStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 0
62 | m_LogWhenShaderIsCompiled: 0
63 | m_AllowEnlightenSupportForUpgradedProject: 0
64 |
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/ProjectSettings/MemorySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!387306366 &1
4 | MemorySettings:
5 | m_ObjectHideFlags: 0
6 | m_EditorMemorySettings:
7 | m_MainAllocatorBlockSize: -1
8 | m_ThreadAllocatorBlockSize: -1
9 | m_MainGfxBlockSize: -1
10 | m_ThreadGfxBlockSize: -1
11 | m_CacheBlockSize: -1
12 | m_TypetreeBlockSize: -1
13 | m_ProfilerBlockSize: -1
14 | m_ProfilerEditorBlockSize: -1
15 | m_BucketAllocatorGranularity: -1
16 | m_BucketAllocatorBucketsCount: -1
17 | m_BucketAllocatorBlockSize: -1
18 | m_BucketAllocatorBlockCount: -1
19 | m_ProfilerBucketAllocatorGranularity: -1
20 | m_ProfilerBucketAllocatorBucketsCount: -1
21 | m_ProfilerBucketAllocatorBlockSize: -1
22 | m_ProfilerBucketAllocatorBlockCount: -1
23 | m_TempAllocatorSizeMain: -1
24 | m_JobTempAllocatorBlockSize: -1
25 | m_BackgroundJobTempAllocatorBlockSize: -1
26 | m_JobTempAllocatorReducedBlockSize: -1
27 | m_TempAllocatorSizeGIBakingWorker: -1
28 | m_TempAllocatorSizeNavMeshWorker: -1
29 | m_TempAllocatorSizeAudioWorker: -1
30 | m_TempAllocatorSizeCloudWorker: -1
31 | m_TempAllocatorSizeGfx: -1
32 | m_TempAllocatorSizeJobWorker: -1
33 | m_TempAllocatorSizeBackgroundWorker: -1
34 | m_TempAllocatorSizePreloadManager: -1
35 | m_PlatformMemorySettings: {}
36 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreReleasePackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | m_SeeAllPackageVersions: 0
20 | oneTimeWarningShown: 0
21 | m_Registries:
22 | - m_Id: main
23 | m_Name:
24 | m_Url: https://packages.unity.com
25 | m_Scopes: []
26 | m_IsDefault: 1
27 | m_Capabilities: 7
28 | m_UserSelectedRegistryName:
29 | m_UserAddingNewScopedRegistry: 0
30 | m_RegistryInfoDraft:
31 | m_Modified: 0
32 | m_ErrorMessage:
33 | m_UserModificationsInstanceId: -830
34 | m_OriginalInstanceId: -832
35 | m_LoadAssets: 0
36 |
--------------------------------------------------------------------------------
/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "m_Dictionary": {
3 | "m_DictionaryValues": []
4 | }
5 | }
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 26
7 | productGUID: 43363e16442bb14419b8e166967c4f40
8 | AndroidProfiler: 0
9 | AndroidFilterTouchesWhenObscured: 0
10 | AndroidEnableSustainedPerformanceMode: 0
11 | defaultScreenOrientation: 4
12 | targetDevice: 2
13 | useOnDemandResources: 0
14 | accelerometerFrequency: 60
15 | companyName: DefaultCompany
16 | productName: ContextCircleMenu
17 | defaultCursor: {fileID: 0}
18 | cursorHotspot: {x: 0, y: 0}
19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20 | m_ShowUnitySplashScreen: 1
21 | m_ShowUnitySplashLogo: 1
22 | m_SplashScreenOverlayOpacity: 1
23 | m_SplashScreenAnimation: 1
24 | m_SplashScreenLogoStyle: 1
25 | m_SplashScreenDrawMode: 0
26 | m_SplashScreenBackgroundAnimationZoom: 1
27 | m_SplashScreenLogoAnimationZoom: 1
28 | m_SplashScreenBackgroundLandscapeAspect: 1
29 | m_SplashScreenBackgroundPortraitAspect: 1
30 | m_SplashScreenBackgroundLandscapeUvs:
31 | serializedVersion: 2
32 | x: 0
33 | y: 0
34 | width: 1
35 | height: 1
36 | m_SplashScreenBackgroundPortraitUvs:
37 | serializedVersion: 2
38 | x: 0
39 | y: 0
40 | width: 1
41 | height: 1
42 | m_SplashScreenLogos: []
43 | m_VirtualRealitySplashScreen: {fileID: 0}
44 | m_HolographicTrackingLossScreen: {fileID: 0}
45 | defaultScreenWidth: 1920
46 | defaultScreenHeight: 1080
47 | defaultScreenWidthWeb: 960
48 | defaultScreenHeightWeb: 600
49 | m_StereoRenderingPath: 0
50 | m_ActiveColorSpace: 1
51 | unsupportedMSAAFallback: 0
52 | m_SpriteBatchVertexThreshold: 300
53 | m_MTRendering: 1
54 | mipStripping: 0
55 | numberOfMipsStripped: 0
56 | numberOfMipsStrippedPerMipmapLimitGroup: {}
57 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
58 | iosShowActivityIndicatorOnLoading: -1
59 | androidShowActivityIndicatorOnLoading: -1
60 | iosUseCustomAppBackgroundBehavior: 0
61 | allowedAutorotateToPortrait: 1
62 | allowedAutorotateToPortraitUpsideDown: 1
63 | allowedAutorotateToLandscapeRight: 1
64 | allowedAutorotateToLandscapeLeft: 1
65 | useOSAutorotation: 1
66 | use32BitDisplayBuffer: 1
67 | preserveFramebufferAlpha: 0
68 | disableDepthAndStencilBuffers: 0
69 | androidStartInFullscreen: 1
70 | androidRenderOutsideSafeArea: 1
71 | androidUseSwappy: 1
72 | androidBlitType: 0
73 | androidResizableWindow: 0
74 | androidDefaultWindowWidth: 1920
75 | androidDefaultWindowHeight: 1080
76 | androidMinimumWindowWidth: 400
77 | androidMinimumWindowHeight: 300
78 | androidFullscreenMode: 1
79 | androidAutoRotationBehavior: 1
80 | defaultIsNativeResolution: 1
81 | macRetinaSupport: 1
82 | runInBackground: 1
83 | captureSingleScreen: 0
84 | muteOtherAudioSources: 0
85 | Prepare IOS For Recording: 0
86 | Force IOS Speakers When Recording: 0
87 | deferSystemGesturesMode: 0
88 | hideHomeButton: 0
89 | submitAnalytics: 1
90 | usePlayerLog: 1
91 | dedicatedServerOptimizations: 0
92 | bakeCollisionMeshes: 0
93 | forceSingleInstance: 0
94 | useFlipModelSwapchain: 1
95 | resizableWindow: 0
96 | useMacAppStoreValidation: 0
97 | macAppStoreCategory: public.app-category.games
98 | gpuSkinning: 1
99 | xboxPIXTextureCapture: 0
100 | xboxEnableAvatar: 0
101 | xboxEnableKinect: 0
102 | xboxEnableKinectAutoTracking: 0
103 | xboxEnableFitness: 0
104 | visibleInBackground: 1
105 | allowFullscreenSwitch: 1
106 | fullscreenMode: 1
107 | xboxSpeechDB: 0
108 | xboxEnableHeadOrientation: 0
109 | xboxEnableGuest: 0
110 | xboxEnablePIXSampling: 0
111 | metalFramebufferOnly: 0
112 | xboxOneResolution: 0
113 | xboxOneSResolution: 0
114 | xboxOneXResolution: 3
115 | xboxOneMonoLoggingLevel: 0
116 | xboxOneLoggingLevel: 1
117 | xboxOneDisableEsram: 0
118 | xboxOneEnableTypeOptimization: 0
119 | xboxOnePresentImmediateThreshold: 0
120 | switchQueueCommandMemory: 0
121 | switchQueueControlMemory: 16384
122 | switchQueueComputeMemory: 262144
123 | switchNVNShaderPoolsGranularity: 33554432
124 | switchNVNDefaultPoolsGranularity: 16777216
125 | switchNVNOtherPoolsGranularity: 16777216
126 | switchGpuScratchPoolGranularity: 2097152
127 | switchAllowGpuScratchShrinking: 0
128 | switchNVNMaxPublicTextureIDCount: 0
129 | switchNVNMaxPublicSamplerIDCount: 0
130 | switchNVNGraphicsFirmwareMemory: 32
131 | switchMaxWorkerMultiple: 8
132 | stadiaPresentMode: 0
133 | stadiaTargetFramerate: 0
134 | vulkanNumSwapchainBuffers: 3
135 | vulkanEnableSetSRGBWrite: 0
136 | vulkanEnablePreTransform: 1
137 | vulkanEnableLateAcquireNextImage: 0
138 | vulkanEnableCommandBufferRecycling: 1
139 | loadStoreDebugModeEnabled: 0
140 | visionOSBundleVersion: 1.0
141 | tvOSBundleVersion: 1.0
142 | bundleVersion: 0.1
143 | preloadedAssets: []
144 | metroInputSource: 0
145 | wsaTransparentSwapchain: 0
146 | m_HolographicPauseOnTrackingLoss: 1
147 | xboxOneDisableKinectGpuReservation: 1
148 | xboxOneEnable7thCore: 1
149 | vrSettings:
150 | enable360StereoCapture: 0
151 | isWsaHolographicRemotingEnabled: 0
152 | enableFrameTimingStats: 0
153 | enableOpenGLProfilerGPURecorders: 1
154 | allowHDRDisplaySupport: 0
155 | useHDRDisplay: 0
156 | hdrBitDepth: 0
157 | m_ColorGamuts: 00000000
158 | targetPixelDensity: 30
159 | resolutionScalingMode: 0
160 | resetResolutionOnWindowResize: 0
161 | androidSupportedAspectRatio: 1
162 | androidMaxAspectRatio: 2.1
163 | applicationIdentifier: {}
164 | buildNumber:
165 | Standalone: 0
166 | VisionOS: 0
167 | iPhone: 0
168 | tvOS: 0
169 | overrideDefaultApplicationIdentifier: 0
170 | AndroidBundleVersionCode: 1
171 | AndroidMinSdkVersion: 22
172 | AndroidTargetSdkVersion: 0
173 | AndroidPreferredInstallLocation: 1
174 | aotOptions:
175 | stripEngineCode: 1
176 | iPhoneStrippingLevel: 0
177 | iPhoneScriptCallOptimization: 0
178 | ForceInternetPermission: 0
179 | ForceSDCardPermission: 0
180 | CreateWallpaper: 0
181 | APKExpansionFiles: 0
182 | keepLoadedShadersAlive: 0
183 | StripUnusedMeshComponents: 1
184 | strictShaderVariantMatching: 0
185 | VertexChannelCompressionMask: 4054
186 | iPhoneSdkVersion: 988
187 | iOSTargetOSVersionString: 12.0
188 | tvOSSdkVersion: 0
189 | tvOSRequireExtendedGameController: 0
190 | tvOSTargetOSVersionString: 12.0
191 | VisionOSSdkVersion: 0
192 | VisionOSTargetOSVersionString: 1.0
193 | uIPrerenderedIcon: 0
194 | uIRequiresPersistentWiFi: 0
195 | uIRequiresFullScreen: 1
196 | uIStatusBarHidden: 1
197 | uIExitOnSuspend: 0
198 | uIStatusBarStyle: 0
199 | appleTVSplashScreen: {fileID: 0}
200 | appleTVSplashScreen2x: {fileID: 0}
201 | tvOSSmallIconLayers: []
202 | tvOSSmallIconLayers2x: []
203 | tvOSLargeIconLayers: []
204 | tvOSLargeIconLayers2x: []
205 | tvOSTopShelfImageLayers: []
206 | tvOSTopShelfImageLayers2x: []
207 | tvOSTopShelfImageWideLayers: []
208 | tvOSTopShelfImageWideLayers2x: []
209 | iOSLaunchScreenType: 0
210 | iOSLaunchScreenPortrait: {fileID: 0}
211 | iOSLaunchScreenLandscape: {fileID: 0}
212 | iOSLaunchScreenBackgroundColor:
213 | serializedVersion: 2
214 | rgba: 0
215 | iOSLaunchScreenFillPct: 100
216 | iOSLaunchScreenSize: 100
217 | iOSLaunchScreenCustomXibPath:
218 | iOSLaunchScreeniPadType: 0
219 | iOSLaunchScreeniPadImage: {fileID: 0}
220 | iOSLaunchScreeniPadBackgroundColor:
221 | serializedVersion: 2
222 | rgba: 0
223 | iOSLaunchScreeniPadFillPct: 100
224 | iOSLaunchScreeniPadSize: 100
225 | iOSLaunchScreeniPadCustomXibPath:
226 | iOSLaunchScreenCustomStoryboardPath:
227 | iOSLaunchScreeniPadCustomStoryboardPath:
228 | iOSDeviceRequirements: []
229 | iOSURLSchemes: []
230 | macOSURLSchemes: []
231 | iOSBackgroundModes: 0
232 | iOSMetalForceHardShadows: 0
233 | metalEditorSupport: 1
234 | metalAPIValidation: 1
235 | iOSRenderExtraFrameOnPause: 0
236 | iosCopyPluginsCodeInsteadOfSymlink: 0
237 | appleDeveloperTeamID:
238 | iOSManualSigningProvisioningProfileID:
239 | tvOSManualSigningProvisioningProfileID:
240 | VisionOSManualSigningProvisioningProfileID:
241 | iOSManualSigningProvisioningProfileType: 0
242 | tvOSManualSigningProvisioningProfileType: 0
243 | VisionOSManualSigningProvisioningProfileType: 0
244 | appleEnableAutomaticSigning: 0
245 | iOSRequireARKit: 0
246 | iOSAutomaticallyDetectAndAddCapabilities: 1
247 | appleEnableProMotion: 0
248 | shaderPrecisionModel: 0
249 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
250 | templatePackageId: com.unity.template.3d@8.1.3
251 | templateDefaultScene: Assets/Scenes/SampleScene.unity
252 | useCustomMainManifest: 0
253 | useCustomLauncherManifest: 0
254 | useCustomMainGradleTemplate: 0
255 | useCustomLauncherGradleManifest: 0
256 | useCustomBaseGradleTemplate: 0
257 | useCustomGradlePropertiesTemplate: 0
258 | useCustomGradleSettingsTemplate: 0
259 | useCustomProguardFile: 0
260 | AndroidTargetArchitectures: 1
261 | AndroidTargetDevices: 0
262 | AndroidSplashScreenScale: 0
263 | androidSplashScreen: {fileID: 0}
264 | AndroidKeystoreName:
265 | AndroidKeyaliasName:
266 | AndroidEnableArmv9SecurityFeatures: 0
267 | AndroidBuildApkPerCpuArchitecture: 0
268 | AndroidTVCompatibility: 0
269 | AndroidIsGame: 1
270 | AndroidEnableTango: 0
271 | androidEnableBanner: 1
272 | androidUseLowAccuracyLocation: 0
273 | androidUseCustomKeystore: 0
274 | m_AndroidBanners:
275 | - width: 320
276 | height: 180
277 | banner: {fileID: 0}
278 | androidGamepadSupportLevel: 0
279 | chromeosInputEmulation: 1
280 | AndroidMinifyRelease: 0
281 | AndroidMinifyDebug: 0
282 | AndroidValidateAppBundleSize: 1
283 | AndroidAppBundleSizeToValidate: 150
284 | m_BuildTargetIcons: []
285 | m_BuildTargetPlatformIcons:
286 | - m_BuildTarget: Android
287 | m_Icons:
288 | - m_Textures: []
289 | m_Width: 432
290 | m_Height: 432
291 | m_Kind: 2
292 | m_SubKind:
293 | - m_Textures: []
294 | m_Width: 324
295 | m_Height: 324
296 | m_Kind: 2
297 | m_SubKind:
298 | - m_Textures: []
299 | m_Width: 216
300 | m_Height: 216
301 | m_Kind: 2
302 | m_SubKind:
303 | - m_Textures: []
304 | m_Width: 162
305 | m_Height: 162
306 | m_Kind: 2
307 | m_SubKind:
308 | - m_Textures: []
309 | m_Width: 108
310 | m_Height: 108
311 | m_Kind: 2
312 | m_SubKind:
313 | - m_Textures: []
314 | m_Width: 81
315 | m_Height: 81
316 | m_Kind: 2
317 | m_SubKind:
318 | - m_Textures: []
319 | m_Width: 192
320 | m_Height: 192
321 | m_Kind: 1
322 | m_SubKind:
323 | - m_Textures: []
324 | m_Width: 144
325 | m_Height: 144
326 | m_Kind: 1
327 | m_SubKind:
328 | - m_Textures: []
329 | m_Width: 96
330 | m_Height: 96
331 | m_Kind: 1
332 | m_SubKind:
333 | - m_Textures: []
334 | m_Width: 72
335 | m_Height: 72
336 | m_Kind: 1
337 | m_SubKind:
338 | - m_Textures: []
339 | m_Width: 48
340 | m_Height: 48
341 | m_Kind: 1
342 | m_SubKind:
343 | - m_Textures: []
344 | m_Width: 36
345 | m_Height: 36
346 | m_Kind: 1
347 | m_SubKind:
348 | - m_Textures: []
349 | m_Width: 192
350 | m_Height: 192
351 | m_Kind: 0
352 | m_SubKind:
353 | - m_Textures: []
354 | m_Width: 144
355 | m_Height: 144
356 | m_Kind: 0
357 | m_SubKind:
358 | - m_Textures: []
359 | m_Width: 96
360 | m_Height: 96
361 | m_Kind: 0
362 | m_SubKind:
363 | - m_Textures: []
364 | m_Width: 72
365 | m_Height: 72
366 | m_Kind: 0
367 | m_SubKind:
368 | - m_Textures: []
369 | m_Width: 48
370 | m_Height: 48
371 | m_Kind: 0
372 | m_SubKind:
373 | - m_Textures: []
374 | m_Width: 36
375 | m_Height: 36
376 | m_Kind: 0
377 | m_SubKind:
378 | m_BuildTargetBatching:
379 | - m_BuildTarget: Standalone
380 | m_StaticBatching: 1
381 | m_DynamicBatching: 0
382 | - m_BuildTarget: tvOS
383 | m_StaticBatching: 1
384 | m_DynamicBatching: 0
385 | - m_BuildTarget: Android
386 | m_StaticBatching: 1
387 | m_DynamicBatching: 0
388 | - m_BuildTarget: iPhone
389 | m_StaticBatching: 1
390 | m_DynamicBatching: 0
391 | - m_BuildTarget: WebGL
392 | m_StaticBatching: 0
393 | m_DynamicBatching: 0
394 | m_BuildTargetShaderSettings: []
395 | m_BuildTargetGraphicsJobs:
396 | - m_BuildTarget: MacStandaloneSupport
397 | m_GraphicsJobs: 0
398 | - m_BuildTarget: Switch
399 | m_GraphicsJobs: 1
400 | - m_BuildTarget: MetroSupport
401 | m_GraphicsJobs: 1
402 | - m_BuildTarget: AppleTVSupport
403 | m_GraphicsJobs: 0
404 | - m_BuildTarget: BJMSupport
405 | m_GraphicsJobs: 1
406 | - m_BuildTarget: LinuxStandaloneSupport
407 | m_GraphicsJobs: 1
408 | - m_BuildTarget: PS4Player
409 | m_GraphicsJobs: 1
410 | - m_BuildTarget: iOSSupport
411 | m_GraphicsJobs: 0
412 | - m_BuildTarget: WindowsStandaloneSupport
413 | m_GraphicsJobs: 1
414 | - m_BuildTarget: XboxOnePlayer
415 | m_GraphicsJobs: 1
416 | - m_BuildTarget: LuminSupport
417 | m_GraphicsJobs: 0
418 | - m_BuildTarget: AndroidPlayer
419 | m_GraphicsJobs: 0
420 | - m_BuildTarget: WebGLSupport
421 | m_GraphicsJobs: 0
422 | m_BuildTargetGraphicsJobMode:
423 | - m_BuildTarget: PS4Player
424 | m_GraphicsJobMode: 0
425 | - m_BuildTarget: XboxOnePlayer
426 | m_GraphicsJobMode: 0
427 | m_BuildTargetGraphicsAPIs:
428 | - m_BuildTarget: AndroidPlayer
429 | m_APIs: 150000000b000000
430 | m_Automatic: 1
431 | - m_BuildTarget: iOSSupport
432 | m_APIs: 10000000
433 | m_Automatic: 1
434 | - m_BuildTarget: AppleTVSupport
435 | m_APIs: 10000000
436 | m_Automatic: 1
437 | - m_BuildTarget: WebGLSupport
438 | m_APIs: 0b000000
439 | m_Automatic: 1
440 | m_BuildTargetVRSettings:
441 | - m_BuildTarget: Standalone
442 | m_Enabled: 0
443 | m_Devices:
444 | - Oculus
445 | - OpenVR
446 | m_DefaultShaderChunkSizeInMB: 16
447 | m_DefaultShaderChunkCount: 0
448 | openGLRequireES31: 0
449 | openGLRequireES31AEP: 0
450 | openGLRequireES32: 0
451 | m_TemplateCustomTags: {}
452 | mobileMTRendering:
453 | Android: 1
454 | iPhone: 1
455 | tvOS: 1
456 | m_BuildTargetGroupLightmapEncodingQuality:
457 | - m_BuildTarget: Android
458 | m_EncodingQuality: 1
459 | - m_BuildTarget: iPhone
460 | m_EncodingQuality: 1
461 | - m_BuildTarget: tvOS
462 | m_EncodingQuality: 1
463 | m_BuildTargetGroupHDRCubemapEncodingQuality:
464 | - m_BuildTarget: Android
465 | m_EncodingQuality: 1
466 | - m_BuildTarget: iPhone
467 | m_EncodingQuality: 1
468 | - m_BuildTarget: tvOS
469 | m_EncodingQuality: 1
470 | m_BuildTargetGroupLightmapSettings: []
471 | m_BuildTargetGroupLoadStoreDebugModeSettings: []
472 | m_BuildTargetNormalMapEncoding:
473 | - m_BuildTarget: Android
474 | m_Encoding: 1
475 | - m_BuildTarget: iPhone
476 | m_Encoding: 1
477 | - m_BuildTarget: tvOS
478 | m_Encoding: 1
479 | m_BuildTargetDefaultTextureCompressionFormat:
480 | - m_BuildTarget: Android
481 | m_Format: 3
482 | playModeTestRunnerEnabled: 0
483 | runPlayModeTestAsEditModeTest: 0
484 | actionOnDotNetUnhandledException: 1
485 | enableInternalProfiler: 0
486 | logObjCUncaughtExceptions: 1
487 | enableCrashReportAPI: 0
488 | cameraUsageDescription:
489 | locationUsageDescription:
490 | microphoneUsageDescription:
491 | bluetoothUsageDescription:
492 | macOSTargetOSVersion: 10.13.0
493 | switchNMETAOverride:
494 | switchNetLibKey:
495 | switchSocketMemoryPoolSize: 6144
496 | switchSocketAllocatorPoolSize: 128
497 | switchSocketConcurrencyLimit: 14
498 | switchScreenResolutionBehavior: 2
499 | switchUseCPUProfiler: 0
500 | switchEnableFileSystemTrace: 0
501 | switchLTOSetting: 0
502 | switchApplicationID: 0x01004b9000490000
503 | switchNSODependencies:
504 | switchCompilerFlags:
505 | switchTitleNames_0:
506 | switchTitleNames_1:
507 | switchTitleNames_2:
508 | switchTitleNames_3:
509 | switchTitleNames_4:
510 | switchTitleNames_5:
511 | switchTitleNames_6:
512 | switchTitleNames_7:
513 | switchTitleNames_8:
514 | switchTitleNames_9:
515 | switchTitleNames_10:
516 | switchTitleNames_11:
517 | switchTitleNames_12:
518 | switchTitleNames_13:
519 | switchTitleNames_14:
520 | switchTitleNames_15:
521 | switchPublisherNames_0:
522 | switchPublisherNames_1:
523 | switchPublisherNames_2:
524 | switchPublisherNames_3:
525 | switchPublisherNames_4:
526 | switchPublisherNames_5:
527 | switchPublisherNames_6:
528 | switchPublisherNames_7:
529 | switchPublisherNames_8:
530 | switchPublisherNames_9:
531 | switchPublisherNames_10:
532 | switchPublisherNames_11:
533 | switchPublisherNames_12:
534 | switchPublisherNames_13:
535 | switchPublisherNames_14:
536 | switchPublisherNames_15:
537 | switchIcons_0: {fileID: 0}
538 | switchIcons_1: {fileID: 0}
539 | switchIcons_2: {fileID: 0}
540 | switchIcons_3: {fileID: 0}
541 | switchIcons_4: {fileID: 0}
542 | switchIcons_5: {fileID: 0}
543 | switchIcons_6: {fileID: 0}
544 | switchIcons_7: {fileID: 0}
545 | switchIcons_8: {fileID: 0}
546 | switchIcons_9: {fileID: 0}
547 | switchIcons_10: {fileID: 0}
548 | switchIcons_11: {fileID: 0}
549 | switchIcons_12: {fileID: 0}
550 | switchIcons_13: {fileID: 0}
551 | switchIcons_14: {fileID: 0}
552 | switchIcons_15: {fileID: 0}
553 | switchSmallIcons_0: {fileID: 0}
554 | switchSmallIcons_1: {fileID: 0}
555 | switchSmallIcons_2: {fileID: 0}
556 | switchSmallIcons_3: {fileID: 0}
557 | switchSmallIcons_4: {fileID: 0}
558 | switchSmallIcons_5: {fileID: 0}
559 | switchSmallIcons_6: {fileID: 0}
560 | switchSmallIcons_7: {fileID: 0}
561 | switchSmallIcons_8: {fileID: 0}
562 | switchSmallIcons_9: {fileID: 0}
563 | switchSmallIcons_10: {fileID: 0}
564 | switchSmallIcons_11: {fileID: 0}
565 | switchSmallIcons_12: {fileID: 0}
566 | switchSmallIcons_13: {fileID: 0}
567 | switchSmallIcons_14: {fileID: 0}
568 | switchSmallIcons_15: {fileID: 0}
569 | switchManualHTML:
570 | switchAccessibleURLs:
571 | switchLegalInformation:
572 | switchMainThreadStackSize: 1048576
573 | switchPresenceGroupId:
574 | switchLogoHandling: 0
575 | switchReleaseVersion: 0
576 | switchDisplayVersion: 1.0.0
577 | switchStartupUserAccount: 0
578 | switchSupportedLanguagesMask: 0
579 | switchLogoType: 0
580 | switchApplicationErrorCodeCategory:
581 | switchUserAccountSaveDataSize: 0
582 | switchUserAccountSaveDataJournalSize: 0
583 | switchApplicationAttribute: 0
584 | switchCardSpecSize: -1
585 | switchCardSpecClock: -1
586 | switchRatingsMask: 0
587 | switchRatingsInt_0: 0
588 | switchRatingsInt_1: 0
589 | switchRatingsInt_2: 0
590 | switchRatingsInt_3: 0
591 | switchRatingsInt_4: 0
592 | switchRatingsInt_5: 0
593 | switchRatingsInt_6: 0
594 | switchRatingsInt_7: 0
595 | switchRatingsInt_8: 0
596 | switchRatingsInt_9: 0
597 | switchRatingsInt_10: 0
598 | switchRatingsInt_11: 0
599 | switchRatingsInt_12: 0
600 | switchLocalCommunicationIds_0:
601 | switchLocalCommunicationIds_1:
602 | switchLocalCommunicationIds_2:
603 | switchLocalCommunicationIds_3:
604 | switchLocalCommunicationIds_4:
605 | switchLocalCommunicationIds_5:
606 | switchLocalCommunicationIds_6:
607 | switchLocalCommunicationIds_7:
608 | switchParentalControl: 0
609 | switchAllowsScreenshot: 1
610 | switchAllowsVideoCapturing: 1
611 | switchAllowsRuntimeAddOnContentInstall: 0
612 | switchDataLossConfirmation: 0
613 | switchUserAccountLockEnabled: 0
614 | switchSystemResourceMemory: 16777216
615 | switchSupportedNpadStyles: 22
616 | switchNativeFsCacheSize: 32
617 | switchIsHoldTypeHorizontal: 0
618 | switchSupportedNpadCount: 8
619 | switchEnableTouchScreen: 1
620 | switchSocketConfigEnabled: 0
621 | switchTcpInitialSendBufferSize: 32
622 | switchTcpInitialReceiveBufferSize: 64
623 | switchTcpAutoSendBufferSizeMax: 256
624 | switchTcpAutoReceiveBufferSizeMax: 256
625 | switchUdpSendBufferSize: 9
626 | switchUdpReceiveBufferSize: 42
627 | switchSocketBufferEfficiency: 4
628 | switchSocketInitializeEnabled: 1
629 | switchNetworkInterfaceManagerInitializeEnabled: 1
630 | switchUseNewStyleFilepaths: 1
631 | switchUseLegacyFmodPriorities: 0
632 | switchUseMicroSleepForYield: 1
633 | switchEnableRamDiskSupport: 0
634 | switchMicroSleepForYieldTime: 25
635 | switchRamDiskSpaceSize: 12
636 | ps4NPAgeRating: 12
637 | ps4NPTitleSecret:
638 | ps4NPTrophyPackPath:
639 | ps4ParentalLevel: 11
640 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
641 | ps4Category: 0
642 | ps4MasterVersion: 01.00
643 | ps4AppVersion: 01.00
644 | ps4AppType: 0
645 | ps4ParamSfxPath:
646 | ps4VideoOutPixelFormat: 0
647 | ps4VideoOutInitialWidth: 1920
648 | ps4VideoOutBaseModeInitialWidth: 1920
649 | ps4VideoOutReprojectionRate: 60
650 | ps4PronunciationXMLPath:
651 | ps4PronunciationSIGPath:
652 | ps4BackgroundImagePath:
653 | ps4StartupImagePath:
654 | ps4StartupImagesFolder:
655 | ps4IconImagesFolder:
656 | ps4SaveDataImagePath:
657 | ps4SdkOverride:
658 | ps4BGMPath:
659 | ps4ShareFilePath:
660 | ps4ShareOverlayImagePath:
661 | ps4PrivacyGuardImagePath:
662 | ps4ExtraSceSysFile:
663 | ps4NPtitleDatPath:
664 | ps4RemotePlayKeyAssignment: -1
665 | ps4RemotePlayKeyMappingDir:
666 | ps4PlayTogetherPlayerCount: 0
667 | ps4EnterButtonAssignment: 1
668 | ps4ApplicationParam1: 0
669 | ps4ApplicationParam2: 0
670 | ps4ApplicationParam3: 0
671 | ps4ApplicationParam4: 0
672 | ps4DownloadDataSize: 0
673 | ps4GarlicHeapSize: 2048
674 | ps4ProGarlicHeapSize: 2560
675 | playerPrefsMaxSize: 32768
676 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
677 | ps4pnSessions: 1
678 | ps4pnPresence: 1
679 | ps4pnFriends: 1
680 | ps4pnGameCustomData: 1
681 | playerPrefsSupport: 0
682 | enableApplicationExit: 0
683 | resetTempFolder: 1
684 | restrictedAudioUsageRights: 0
685 | ps4UseResolutionFallback: 0
686 | ps4ReprojectionSupport: 0
687 | ps4UseAudio3dBackend: 0
688 | ps4UseLowGarlicFragmentationMode: 1
689 | ps4SocialScreenEnabled: 0
690 | ps4ScriptOptimizationLevel: 0
691 | ps4Audio3dVirtualSpeakerCount: 14
692 | ps4attribCpuUsage: 0
693 | ps4PatchPkgPath:
694 | ps4PatchLatestPkgPath:
695 | ps4PatchChangeinfoPath:
696 | ps4PatchDayOne: 0
697 | ps4attribUserManagement: 0
698 | ps4attribMoveSupport: 0
699 | ps4attrib3DSupport: 0
700 | ps4attribShareSupport: 0
701 | ps4attribExclusiveVR: 0
702 | ps4disableAutoHideSplash: 0
703 | ps4videoRecordingFeaturesUsed: 0
704 | ps4contentSearchFeaturesUsed: 0
705 | ps4CompatibilityPS5: 0
706 | ps4AllowPS5Detection: 0
707 | ps4GPU800MHz: 1
708 | ps4attribEyeToEyeDistanceSettingVR: 0
709 | ps4IncludedModules: []
710 | ps4attribVROutputEnabled: 0
711 | monoEnv:
712 | splashScreenBackgroundSourceLandscape: {fileID: 0}
713 | splashScreenBackgroundSourcePortrait: {fileID: 0}
714 | blurSplashScreenBackground: 1
715 | spritePackerPolicy:
716 | webGLMemorySize: 16
717 | webGLExceptionSupport: 1
718 | webGLNameFilesAsHashes: 0
719 | webGLShowDiagnostics: 0
720 | webGLDataCaching: 1
721 | webGLDebugSymbols: 0
722 | webGLEmscriptenArgs:
723 | webGLModulesDirectory:
724 | webGLTemplate: APPLICATION:Default
725 | webGLAnalyzeBuildSize: 0
726 | webGLUseEmbeddedResources: 0
727 | webGLCompressionFormat: 1
728 | webGLWasmArithmeticExceptions: 0
729 | webGLLinkerTarget: 1
730 | webGLThreadsSupport: 0
731 | webGLDecompressionFallback: 0
732 | webGLInitialMemorySize: 32
733 | webGLMaximumMemorySize: 2048
734 | webGLMemoryGrowthMode: 2
735 | webGLMemoryLinearGrowthStep: 16
736 | webGLMemoryGeometricGrowthStep: 0.2
737 | webGLMemoryGeometricGrowthCap: 96
738 | webGLPowerPreference: 2
739 | scriptingDefineSymbols: {}
740 | additionalCompilerArguments: {}
741 | platformArchitecture: {}
742 | scriptingBackend: {}
743 | il2cppCompilerConfiguration: {}
744 | il2cppCodeGeneration: {}
745 | managedStrippingLevel:
746 | EmbeddedLinux: 1
747 | GameCoreScarlett: 1
748 | GameCoreXboxOne: 1
749 | Nintendo Switch: 1
750 | PS4: 1
751 | PS5: 1
752 | QNX: 1
753 | Stadia: 1
754 | VisionOS: 1
755 | WebGL: 1
756 | Windows Store Apps: 1
757 | XboxOne: 1
758 | iPhone: 1
759 | tvOS: 1
760 | incrementalIl2cppBuild: {}
761 | suppressCommonWarnings: 1
762 | allowUnsafeCode: 0
763 | useDeterministicCompilation: 1
764 | additionalIl2CppArgs:
765 | scriptingRuntimeVersion: 1
766 | gcIncremental: 1
767 | gcWBarrierValidation: 0
768 | apiCompatibilityLevelPerPlatform: {}
769 | m_RenderingPath: 1
770 | m_MobileRenderingPath: 1
771 | metroPackageName: ContextCircleMenu
772 | metroPackageVersion:
773 | metroCertificatePath:
774 | metroCertificatePassword:
775 | metroCertificateSubject:
776 | metroCertificateIssuer:
777 | metroCertificateNotAfter: 0000000000000000
778 | metroApplicationDescription: ContextCircleMenu
779 | wsaImages: {}
780 | metroTileShortName:
781 | metroTileShowName: 0
782 | metroMediumTileShowName: 0
783 | metroLargeTileShowName: 0
784 | metroWideTileShowName: 0
785 | metroSupportStreamingInstall: 0
786 | metroLastRequiredScene: 0
787 | metroDefaultTileSize: 1
788 | metroTileForegroundText: 2
789 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
790 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1}
791 | metroSplashScreenUseBackgroundColor: 0
792 | platformCapabilities: {}
793 | metroTargetDeviceFamilies: {}
794 | metroFTAName:
795 | metroFTAFileTypes: []
796 | metroProtocolName:
797 | vcxProjDefaultLanguage:
798 | XboxOneProductId:
799 | XboxOneUpdateKey:
800 | XboxOneSandboxId:
801 | XboxOneContentId:
802 | XboxOneTitleId:
803 | XboxOneSCId:
804 | XboxOneGameOsOverridePath:
805 | XboxOnePackagingOverridePath:
806 | XboxOneAppManifestOverridePath:
807 | XboxOneVersion: 1.0.0.0
808 | XboxOnePackageEncryption: 0
809 | XboxOnePackageUpdateGranularity: 2
810 | XboxOneDescription:
811 | XboxOneLanguage:
812 | - enus
813 | XboxOneCapability: []
814 | XboxOneGameRating: {}
815 | XboxOneIsContentPackage: 0
816 | XboxOneEnhancedXboxCompatibilityMode: 0
817 | XboxOneEnableGPUVariability: 1
818 | XboxOneSockets: {}
819 | XboxOneSplashScreen: {fileID: 0}
820 | XboxOneAllowedProductIds: []
821 | XboxOnePersistentLocalStorageSize: 0
822 | XboxOneXTitleMemory: 8
823 | XboxOneOverrideIdentityName:
824 | XboxOneOverrideIdentityPublisher:
825 | vrEditorSettings: {}
826 | cloudServicesEnabled:
827 | UNet: 1
828 | luminIcon:
829 | m_Name:
830 | m_ModelFolderPath:
831 | m_PortalFolderPath:
832 | luminCert:
833 | m_CertPath:
834 | m_SignPackage: 1
835 | luminIsChannelApp: 0
836 | luminVersion:
837 | m_VersionCode: 1
838 | m_VersionName:
839 | hmiPlayerDataPath:
840 | hmiForceSRGBBlit: 1
841 | embeddedLinuxEnableGamepadInput: 1
842 | hmiLogStartupTiming: 0
843 | hmiCpuConfiguration:
844 | apiCompatibilityLevel: 6
845 | activeInputHandler: 0
846 | windowsGamepadBackendHint: 0
847 | cloudProjectId:
848 | framebufferDepthMemorylessMode: 0
849 | qualitySettingsNames: []
850 | projectName:
851 | organizationId:
852 | cloudEnabled: 0
853 | legacyClampBlendShapeWeights: 0
854 | hmiLoadingImage: {fileID: 0}
855 | platformRequiresReadableAssets: 0
856 | virtualTexturingSupportEnabled: 0
857 | insecureHttpOption: 0
858 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2022.3.21f1
2 | m_EditorVersionWithRevision: 2022.3.21f1 (bf09ca542b87)
3 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | GameCoreScarlett: 5
223 | GameCoreXboxOne: 5
224 | Nintendo 3DS: 5
225 | Nintendo Switch: 5
226 | PS4: 5
227 | PS5: 5
228 | Stadia: 5
229 | Standalone: 5
230 | WebGL: 3
231 | Windows Store Apps: 5
232 | XboxOne: 5
233 | iPhone: 2
234 | tvOS: 2
235 |
--------------------------------------------------------------------------------
/ProjectSettings/SceneTemplateSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "templatePinStates": [],
3 | "dependencyTypeInfos": [
4 | {
5 | "userAdded": false,
6 | "type": "UnityEngine.AnimationClip",
7 | "defaultInstantiationMode": 0
8 | },
9 | {
10 | "userAdded": false,
11 | "type": "UnityEditor.Animations.AnimatorController",
12 | "defaultInstantiationMode": 0
13 | },
14 | {
15 | "userAdded": false,
16 | "type": "UnityEngine.AnimatorOverrideController",
17 | "defaultInstantiationMode": 0
18 | },
19 | {
20 | "userAdded": false,
21 | "type": "UnityEditor.Audio.AudioMixerController",
22 | "defaultInstantiationMode": 0
23 | },
24 | {
25 | "userAdded": false,
26 | "type": "UnityEngine.ComputeShader",
27 | "defaultInstantiationMode": 1
28 | },
29 | {
30 | "userAdded": false,
31 | "type": "UnityEngine.Cubemap",
32 | "defaultInstantiationMode": 0
33 | },
34 | {
35 | "userAdded": false,
36 | "type": "UnityEngine.GameObject",
37 | "defaultInstantiationMode": 0
38 | },
39 | {
40 | "userAdded": false,
41 | "type": "UnityEditor.LightingDataAsset",
42 | "defaultInstantiationMode": 0
43 | },
44 | {
45 | "userAdded": false,
46 | "type": "UnityEngine.LightingSettings",
47 | "defaultInstantiationMode": 0
48 | },
49 | {
50 | "userAdded": false,
51 | "type": "UnityEngine.Material",
52 | "defaultInstantiationMode": 0
53 | },
54 | {
55 | "userAdded": false,
56 | "type": "UnityEditor.MonoScript",
57 | "defaultInstantiationMode": 1
58 | },
59 | {
60 | "userAdded": false,
61 | "type": "UnityEngine.PhysicMaterial",
62 | "defaultInstantiationMode": 0
63 | },
64 | {
65 | "userAdded": false,
66 | "type": "UnityEngine.PhysicsMaterial2D",
67 | "defaultInstantiationMode": 0
68 | },
69 | {
70 | "userAdded": false,
71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
72 | "defaultInstantiationMode": 0
73 | },
74 | {
75 | "userAdded": false,
76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
77 | "defaultInstantiationMode": 0
78 | },
79 | {
80 | "userAdded": false,
81 | "type": "UnityEngine.Rendering.VolumeProfile",
82 | "defaultInstantiationMode": 0
83 | },
84 | {
85 | "userAdded": false,
86 | "type": "UnityEditor.SceneAsset",
87 | "defaultInstantiationMode": 1
88 | },
89 | {
90 | "userAdded": false,
91 | "type": "UnityEngine.Shader",
92 | "defaultInstantiationMode": 1
93 | },
94 | {
95 | "userAdded": false,
96 | "type": "UnityEngine.ShaderVariantCollection",
97 | "defaultInstantiationMode": 1
98 | },
99 | {
100 | "userAdded": false,
101 | "type": "UnityEngine.Texture",
102 | "defaultInstantiationMode": 0
103 | },
104 | {
105 | "userAdded": false,
106 | "type": "UnityEngine.Texture2D",
107 | "defaultInstantiationMode": 0
108 | },
109 | {
110 | "userAdded": false,
111 | "type": "UnityEngine.Timeline.TimelineAsset",
112 | "defaultInstantiationMode": 0
113 | }
114 | ],
115 | "defaultDependencyTypeInfo": {
116 | "userAdded": false,
117 | "type": "",
118 | "defaultInstantiationMode": 1
119 | },
120 | "newSceneOverride": 0
121 | }
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_DashboardUrl: https://dashboard.unity3d.com
13 | m_TestInitMode: 0
14 | CrashReportingSettings:
15 | m_EventUrl: https://perf-events.cloud.unity3d.com
16 | m_Enabled: 0
17 | m_LogBufferSize: 10
18 | m_CaptureEditorExceptions: 1
19 | UnityPurchasingSettings:
20 | m_Enabled: 0
21 | m_TestMode: 0
22 | UnityAnalyticsSettings:
23 | m_Enabled: 0
24 | m_TestMode: 0
25 | m_InitializeOnStartup: 1
26 | m_PackageRequiringCoreStatsPresent: 0
27 | UnityAdsSettings:
28 | m_Enabled: 0
29 | m_InitializeOnStartup: 1
30 | m_TestMode: 0
31 | m_IosGameId:
32 | m_AndroidGameId:
33 | m_GameIds: {}
34 | m_GameId:
35 | PerformanceReportingSettings:
36 | m_Enabled: 0
37 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Context Circle Menu
2 |
3 | Context Circle Menu is Unity tool that allows users to open a circular menu in the Scene view to quickly execute user-defined methods, enhancing workflow efficiency.
4 |
5 |
6 |
7 | [](LICENSE)
8 | 
9 |
10 | [日本語版](https://github.com/Garume/ContextCircleMenu/blob/master/README_JA.md)
11 |
12 | ## Overview
13 |
14 | Context Circle Menu is a simple open-source tool for Unity. It lets users open a circular menu in the Scene view or as a standalone VisualElement. This menu makes it easy to quickly use your own methods, helping you work faster by avoiding complex menus. Perfect for developers wanting to manage their scenes better and save time, Context Circle Menu is flexible and easy to use.
15 |
16 | [](https://gyazo.com/8124142a3643fb0d735f7dd66b068142)
17 |
18 | [](https://gyazo.com/8256a41b2b0f7f73d98e6f6af0f94479)
19 |
20 | ### Feature
21 |
22 | - Create Context Circle Menu
23 | - Easy to use Editor Icon
24 | - Customized Menu
25 | - Add from Attribute
26 | - Add Manual
27 | - Button design
28 | - Folder design
29 | - Open in Scene View
30 | - Customized Shortcut Key
31 |
32 | ## Table of Contents
33 | - [Context Circle Menu](#context-circle-menu)
34 | - [Overview](#Overview)
35 | - [Features](#Features)
36 | - [Table of Contents](#Table-of-Contents)
37 | - [Setup](#Setup)
38 | - [Requirements](#Requirements)
39 | - [Installation](#Installation)
40 | - [Demonstration](#Demonstration)
41 | - [Editor Icons](#editor-icons)
42 | - [Add Manual Method](#Add-Manual-Method)
43 | - [Customize](#Customize)
44 | - [Customize Buttons](#Customize-Buttons)
45 | - [Customize Folder](#Customize-Folder)
46 | - [Customize Shortcut](#Customized-Shortcut-Key)
47 | - [API Documentation](#API-Documentation)
48 | - [LISENCE](#lisence)
49 | - [AUTHOR](#author)
50 |
51 | ## Setup
52 |
53 | ### Requirements
54 |
55 | - Unity 2022.3 or higher
56 |
57 | ### Installation
58 |
59 | 1. select Window > Package Manager
60 | 2. Select the "+" button > Add package from git URL
61 | 3. Enter the following URL
62 |
63 | ```
64 | https://github.com/Garume/ContextCircleMenu.git?path=/Assets/ContextCircleMenu
65 | ```
66 |
67 | Or open Packages/manifest.json and add the following to the dependencies block
68 |
69 | ```
70 | {
71 | "dependencies": {
72 | "com.garume.context-circle-menu": "https://github.com/Garume/ContextCircleMenu.git?path=/Assets/ContextCircleMenu"
73 | }
74 | }
75 | ```
76 |
77 | ## Demonstration
78 |
79 | Just apply the `Context Circle Menu` attribute to the static method you wish to add.
80 |
81 | ```cs
82 | public class Menu
83 | {
84 | [ContextCircleMenu("Debug Test")]
85 | public static void TestMethod()
86 | {
87 | Debug.Log("TestMethod");
88 | }
89 | }
90 | ```
91 |
92 | Then you will see below menu.
93 |
94 | Press the `A` key on the scene view.
95 |
96 | [](https://gyazo.com/1ec027f73700f52c6b3cd9691647a8a1)
97 |
98 | If you want to create folders, separate them with `/`.
99 |
100 | ```cs
101 | public class Menu
102 | {
103 | [ContextCircleMenu("Example/Debug Test")]
104 | public static void TestMethod()
105 | {
106 | Debug.Log("TestMethod");
107 | }
108 | }
109 | ```
110 |
111 | Then you will see below menu.
112 |
113 | [](https://gyazo.com/39b665e8fdd473bb408102e1b5d5bf09)
114 |
115 | ### Editor Icons
116 |
117 | Icons can be attached to menu buttons.
118 |
119 | The `EditorIcons` class is provided as a utility to add icon easily.
120 |
121 | To add an icon, do the below.
122 |
123 | ```cs
124 | [ContextCircleMenu("Debug Test", EditorIcons.ConsoleInfoIcon)]
125 | public static void TestMethod()
126 | {
127 | Debug.Log("TestMethod");
128 | }
129 | ```
130 | ### Manual Add Method
131 |
132 | If you do not want to use the `Context Circle Menu` attribute, you can register the method manually.
133 |
134 | The process of registering methods internally can be hooked.
135 |
136 | ```cs
137 | public class Menu
138 | {
139 | [InitializeOnLoadMethod]
140 | private static void Initialize()
141 | {
142 | ContextCircleMenuLoader.OnBuild += (builder =>
143 | {
144 | builder.AddMenu("Debug Test", EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon), () => Debug.Log("Debug Test"));
145 | builder.AddMenu("Instantiate/Cube", EditorGUIUtility.IconContent(EditorIcons.PreMatCube), ()=> GameObject.CreatePrimitive(PrimitiveType.Cube));
146 | builder.AddMenu("Instantiate/Sphere", EditorGUIUtility.IconContent(EditorIcons.PreMatSphere), ()=> GameObject.CreatePrimitive(PrimitiveType.Sphere));
147 | });
148 | }
149 | }
150 | ```
151 |
152 | ## Customization
153 |
154 | ### Customized Button
155 |
156 | If you don't like the UI of the button, you can replace it with your own button.
157 |
158 | Use `builder.ConfigureButton` in `ContextCircleMenuLoader.OnBuild`.
159 |
160 | ```cs
161 | ContextCircleMenuLoader.OnBuild += (builder =>
162 | {
163 | ...
164 | builder.ConfigureButton(FolderMenuFactory);
165 | });
166 | ```
167 |
168 | To create your own button, you must create a class that extends CircleButton and a corresponding Factory class.
169 |
170 | Here is an example code similar to the one provided in Sample's Custom.
171 |
172 | Samples can be imported from Package Manager > ContextCircleMenu > Samples.
173 |
174 | In this example, the button is replaced with a button that displays only an icon.
175 |
176 | Create the following class
177 |
178 | ```cs
179 | public class CustomButtonFactory : IButtonFactory
180 | {
181 | public CircleButton Create(string path, GUIContent icon, Action onSelected, int section)
182 | {
183 | return new OnlyImageCircleButton(path, icon, section, onSelected);
184 | }
185 |
186 | // Back button is needed when creating a folder structure menu.
187 | // section should be -1 unless ConfigureFolder is used.
188 | public CircleButton CreateBackButton(Action onBack)
189 | {
190 | return new OnlyImageCircleButton("Back", EditorGUIUtility.IconContent(EditorIcons.Back2x),
191 | -1, onBack);
192 | }
193 | }
194 |
195 | public class OnlyImageCircleButton : CircleButton
196 | {
197 | public OnlyImageCircleButton(string text, GUIContent icon, int section, Action onSelect) : base(text, icon, section, onSelect)
198 | {
199 | }
200 |
201 | // You can edit the generated buttons.
202 | // Feel free to customize the buttons here.
203 | protected override void ModifierButton(Button button, string text, GUIContent icon, int section)
204 | {
205 | var image = new Image
206 | {
207 | image = icon.image,
208 | style =
209 | {
210 | width = 32f,
211 | height = 32f,
212 | flexShrink = 0
213 | },
214 | tooltip = text
215 | };
216 |
217 | button.Add(image);
218 | }
219 | }
220 |
221 | ```
222 |
223 | Set the created Factory class.
224 |
225 | ```cs
226 | ContextCircleMenuLoader.OnBuild += (builder =>
227 | {
228 | ...
229 | builder.ConfigureButton(new CustomButtonFactory());
230 | });
231 | ```
232 |
233 | It will then be replaced by a button that displays only the icon as shown below.
234 |
235 | 
236 |
237 | ### Customize Folder
238 |
239 | If you don't like the folder UI, you can replace it with your own folder.
240 |
241 | ```cs
242 | ContextCircleMenuLoader.OnBuild += (builder =>
243 | {
244 | ...
245 | builder.ConfigureFolder(FolderMenuFactory);
246 | });
247 | ```
248 |
249 | > [!CAUTION]
250 | > Destructive changes were made in v1.0.0.
251 |
252 | To create your own folder, you need to create a class that extends FolderCircleMenu and a corresponding Factory class.
253 |
254 |
255 | Here is an example code similar to the one provided in Sample's Custom.
256 |
257 | Samples can be imported from Package Manager > ContextCircleMenu > Samples.
258 |
259 | In this example, we are replacing an existing UI with vector graphics.
260 |
261 | Create the following classes
262 |
263 | ```cs
264 | public class CustomFolderMenuFactory : IFolderCircleMenuFactory
265 | {
266 | public FolderCircleMenu Create(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory)
267 | {
268 | return new CustomFolderCircleMenu(path, menu, parent, factory);
269 | }
270 | }
271 |
272 | public class CustomFolderCircleMenu : FolderCircleMenu
273 | {
274 | public CustomFolderCircleMenu(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory) :
275 | base(path, menu, EditorGUIUtility.IconContent(EditorIcons.FolderIcon), parent, factory)
276 | {
277 | }
278 |
279 | protected override VisualElement[] CreateUtilityElements(ref ContextCircleMenuOption menuOption)
280 | {
281 | var element = new VisualElement();
282 | var option = menuOption;
283 | element.generateVisualContent += context =>
284 | {
285 | var painter = context.painter2D;
286 | var buttonCount = ButtonElements.Length;
287 | for (var i = 0; i < buttonCount; i++)
288 | {
289 | var angle = (float)i / buttonCount * 360f;
290 | if (buttonCount % 2 == 1)
291 | angle += 180f;
292 | else
293 | angle += 180f - 360f / buttonCount / 2;
294 | var vector = new Vector2(
295 | Mathf.Sin(Mathf.Deg2Rad * angle),
296 | Mathf.Cos(Mathf.Deg2Rad * angle)).normalized;
297 |
298 | var from = vector * 12f;
299 | var to = vector * option.Radius * 1.5f;
300 | painter.strokeColor = Color.black;
301 | painter.lineWidth = 2f;
302 | painter.BeginPath();
303 | painter.MoveTo(from);
304 | painter.LineTo(to);
305 | painter.Stroke();
306 | }
307 |
308 | painter.BeginPath();
309 | painter.Arc(Vector2.zero, option.Radius * 1.5f, 0, 360f);
310 | painter.fillColor = new Color(0f, 0f, 0f, 0.2f);
311 | painter.Fill();
312 |
313 | painter.DrawCircle(Vector2.zero, option.Radius * 1.5f, 0, 360f, 5f, Color.gray);
314 | };
315 | return new[] { element };
316 | }
317 | }
318 | ```
319 |
320 | Set the created Factory class.
321 |
322 | ```cs
323 | ContextCircleMenuLoader.OnBuild += (builder =>
324 | {
325 | ...
326 | builder.ConfigureButton(new CustomButtonFactory());
327 | builder.ConfigureFolder(new CustomFolderMenuFactory());
328 | });
329 | ```
330 |
331 | Then it will be replaced by the following UI.
332 |
333 | 
334 |
335 | ### Customized Shortcut Key
336 |
337 | The default menu open/close button is set to the `A` key, but can be changed freely.
338 |
339 | `Edit > Shortcuts` to open a window.
340 |
341 | Search for `Context Circle Menu` and you will find the settings as shown in the figure below.
342 |
343 | 
344 |
345 | Set the keys as you like.
346 |
347 | ## API Documentation
348 |
349 | This section describes the major APIs and can be used as a reference when customizing the UI.
350 |
351 | ### ContextCircleMenu
352 |
353 | #### property
354 | | property name | description |
355 | | ---- | ---- |
356 | | BlockMouseEvents | Disables mouse operations such as clicking if true. |
357 |
358 | #### method
359 | | method name | description |
360 | | ---- | ---- |
361 | | Show() | Show menu. |
362 | | Hide() | Hide menu. |
363 | | Open(CircleMenu menu) | Opens the menu specified in the argument. |
364 | | Back() | Open the previous menu. |
365 | | TryForceSelect() | If there is a button in focus, it is forced to select it. |
366 | | TryForceEnterByMousePosition() | Forces the button corresponding to the mouse position to focus. |
367 | | CreateMenu(Action\ configureMenu) | Create the menu content using CircleMenuBuilder. |
368 |
369 | ### CircleMenuBuilder
370 | #### method
371 | | method name | description |
372 | | ---- | ---- |
373 | | AddMenu(ICircleMenuFactory factory) | Add custom menu. |
374 | | AddMenu(string path, GUIContent content, Action action) | Add a menu manually. |
375 | | AddMenu(ContextCircleMenuAttribute attribute, MethodInfo method) | Add a menu from the attributes. |
376 | | ConfigureFolder(IFolderCircleMenuFactory factory) | Replace with your custom folder menu. |
377 | | ConfigureButton(IButtonFactory factory) | Replace with your custom button. |
378 |
379 | ### CircleMenu
380 | #### abstract method
381 | | method name | description |
382 | | ---- | ---- |
383 | | CreateButtons(IButtonFactory factory, ref ContextCircleMenuOption menuOption) | Create a button to be displayed on the menu. The IButtonFactory passed here will be the one set in CircleMenuBuilder.ConfigureButton(). |
384 |
385 | #### virtual method
386 | | method name | description |
387 | | ---- | ---- |
388 | | CreateUtilityElements(ref ContextCircleMenuOption menuOption) | Create elements other than buttons. |
389 | | OnInitialized(ref ContextCircleMenuOption menuOption) | Called at initialization. |
390 | | OnBuild() | Called when an element is created. Mainly when Show() or Open() is called. |
391 |
392 | ### CircleButton
393 | #### abstract method
394 | | method name | description |
395 | | ---- | ---- |
396 | | ModifierButton(Button button, string text, GUIContent icon, int section) | Called when creating a button. Use it to modify the elements of the button. |
397 |
398 | #### virtual method
399 | | method name | description |
400 | | ---- | ---- |
401 | | OnMouseEnter(Button button, MouseEnterEvent evt) | Called when the mouse enters an element.|
402 | | OnMouseLeave(Button button, MouseLeaveEvent evt) | Called when the mouse leaves an element. |
403 |
404 | ## LISENCE
405 |
406 | MIT
407 |
408 | ## AUTHOR
409 |
410 | @Garume
411 |
--------------------------------------------------------------------------------
/README_JA.md:
--------------------------------------------------------------------------------
1 | # Context Circle Menu
2 |
3 | Context Circle Menu は、Sceneビュー上で円形のメニューを開き、任意のメソッドを直観的に実行できるツールです。開発効率を極限まで高めます。
4 |
5 |
6 |
7 | [](LICENSE)
8 | 
9 |
10 | ## 概要
11 |
12 | Context Circle Menu はUnity用のシンプルなツールです。円形のメニューを開くことができるVisualElementを提供します。また、Sceneビュー上でメニューを開くローダー機能を搭載しています。このメニューは円形にボタンが広がるため少ないマウス操作と直観的な理解で任意のメソッドを実行させることができます。開発効率を極限まで高まることが期待できます。
13 |
14 | [](https://gyazo.com/8124142a3643fb0d735f7dd66b068142)
15 |
16 | [](https://gyazo.com/8256a41b2b0f7f73d98e6f6af0f94479)
17 |
18 | ### 特徴
19 |
20 | - 円形メニューの作成
21 | - 使いやすいエディターアイコン
22 | - メニューのカスタマイズ
23 | - アトリビュートからメソッドを追加
24 | - 手動でメソッドを追加
25 | - ボタンのデザイン
26 | - フォルダーのデザイン
27 | - Sceneビュー上でメニューを開く
28 | - ショートカットキーのカスタマイズ
29 |
30 | ## 目次
31 | - [Context Circle Menu](#context-circle-menu)
32 | - [概要](#概要)
33 | - [特徴](#特徴)
34 | - [目次](#目次)
35 | - [セットアップ](#セットアップ)
36 | - [要求](#要求)
37 | - [インストール](#インストール)
38 | - [デモ](#デモ)
39 | - [Editor Icons](#editor-icons)
40 | - [手動メソッド追加](#手動メソッド追加)
41 | - [カスタマイズ](#カスタマイズ)
42 | - [ボタンのカスタマイズ](#ボタンのカスタマイズ)
43 | - [フォルダのカスタマイズ](#フォルダのカスタマイズ)
44 | - [ショートカットキーのカスタマイズ](#ショートカットキーのカスタマイズ)
45 | - [API ドキュメント](#API-ドキュメント)
46 | - [LISENCE](#lisence)
47 | - [AUTHOR](#author)
48 |
49 | ## セットアップ
50 |
51 | ### 要求
52 |
53 | - Unity 2022.3 以上
54 |
55 | ### インストール
56 |
57 | 1. Window > Package ManagerからPackage Managerを開く
58 | 2. 「+」ボタン > Add package from git URL
59 | 3. 以下を入力する
60 |
61 | ```
62 | https://github.com/Garume/ContextCircleMenu.git?path=/Assets/ContextCircleMenu
63 | ```
64 |
65 | あるいはPackages/manifest.jsonを開き、dependenciesブロックに以下を追記
66 |
67 | ```
68 | {
69 | "dependencies": {
70 | "com.garume.context-circle-menu": "https://github.com/Garume/ContextCircleMenu.git?path=/Assets/ContextCircleMenu"
71 | }
72 | }
73 | ```
74 |
75 | ## デモ
76 |
77 | 静的メソッドに `ContextCircleMenu` 属性を適用するだけで追加できます。
78 |
79 | ```cs
80 | public class Menu
81 | {
82 | [ContextCircleMenu("Debug Test")]
83 | public static void TestMethod()
84 | {
85 | Debug.Log("TestMethod");
86 | }
87 | }
88 | ```
89 |
90 | 下図のようにメニューが作成されます。
91 |
92 | メニューはSceneビュー上で`A`キーを押すことで開くことができます。
93 |
94 | [](https://gyazo.com/1ec027f73700f52c6b3cd9691647a8a1)
95 |
96 | フォルダを作りたい場合は、`/`で区切ってください。
97 |
98 | ```cs
99 | public class Menu
100 | {
101 | [ContextCircleMenu("Example/Debug Test")]
102 | public static void TestMethod()
103 | {
104 | Debug.Log("TestMethod");
105 | }
106 | }
107 | ```
108 |
109 | すると下図のようにフォルダ階層付きのメニューが作成されます。
110 |
111 | [](https://gyazo.com/39b665e8fdd473bb408102e1b5d5bf09)
112 |
113 | ### Editor Icons
114 |
115 | メニューボタンにアイコンを付けることができます。
116 |
117 | アイコンを簡単に追加するためのユーティリティとして `EditorIcons` クラスが提供されています。
118 |
119 | アイコンを追加するには、以下のようにしてください。
120 |
121 | ```cs
122 | [ContextCircleMenu("Debug Test", EditorIcons.ConsoleInfoIcon)]
123 | public static void TestMethod()
124 | {
125 | Debug.Log("TestMethod");
126 | }
127 | ```
128 |
129 | ### 手動メソッド追加
130 |
131 | `Context Circle Menu` 属性を使用する以外に、手動で追加することもできます。
132 |
133 | 内部的にメソッドを登録するプロセスを`ContextCircleMenuLoader.OnBuild`でフックすることができます。これを利用して以下のように記述します。
134 |
135 | ```cs
136 | public class Menu
137 | {
138 | [InitializeOnLoadMethod]
139 | private static void Initialize()
140 | {
141 | ContextCircleMenuLoader.OnBuild += (builder =>
142 | {
143 | builder.AddMenu("Debug Test", EditorGUIUtility.IconContent(EditorIcons.ConsoleInfoIcon), () => Debug.Log("Debug Test"));
144 | builder.AddMenu("Instantiate/Cube", EditorGUIUtility.IconContent(EditorIcons.PreMatCube), ()=> GameObject.CreatePrimitive(PrimitiveType.Cube));
145 | builder.AddMenu("Instantiate/Sphere", EditorGUIUtility.IconContent(EditorIcons.PreMatSphere), ()=> GameObject.CreatePrimitive(PrimitiveType.Sphere));
146 | });
147 | }
148 | }
149 | ```
150 |
151 | ## カスタマイズ
152 |
153 |
154 | ### ボタンのカスタマイズ
155 |
156 | ボタンのUIが気に入らなければ、独自のボタンに置き換えることができます。
157 |
158 | `ContextCircleMenuLoader.OnBuild`内で`builder.ConfigureButton`を使用してください。
159 |
160 | ```cs
161 | ContextCircleMenuLoader.OnBuild += (builder =>
162 | {
163 | ...
164 | builder.ConfigureButton(FolderMenuFactory);
165 | });
166 | ```
167 |
168 | 独自のボタンを作成するためには、CircleButtonを継承したクラスとそれに対応したFactoryクラスを作成する必要があります。
169 |
170 | ここでは、SampleのCustomで提供しているものと同様のコードを例として紹介します。
171 |
172 | SampleはPackage Manager > ContextCircleMenu > Samplesからインポートすることができます。
173 |
174 | この例では、アイコンのみ表示するボタンに置き換えています。
175 |
176 | 以下のクラスを作成してください。
177 |
178 | ```cs
179 | public class CustomButtonFactory : IButtonFactory
180 | {
181 | public CircleButton Create(string path, GUIContent icon, Action onSelected, int section)
182 | {
183 | return new OnlyImageCircleButton(path, icon, section, onSelected);
184 | }
185 |
186 | // フォルダ構造のメニューを作成する際に戻るボタンが必要です。
187 | // ConfigureFolderを利用しない限りsectionは-1にしてください。
188 | public CircleButton CreateBackButton(Action onBack)
189 | {
190 | return new OnlyImageCircleButton("Back", EditorGUIUtility.IconContent(EditorIcons.Back2x),
191 | -1, onBack);
192 | }
193 | }
194 |
195 | public class OnlyImageCircleButton : CircleButton
196 | {
197 | public OnlyImageCircleButton(string text, GUIContent icon, int section, Action onSelect) : base(text, icon, section, onSelect)
198 | {
199 | }
200 |
201 | // 生成したボタンを編集することができます。
202 | // ここで自由にボタンをカスタマイズしてください。
203 | protected override void ModifierButton(Button button, string text, GUIContent icon, int section)
204 | {
205 | var image = new Image
206 | {
207 | image = icon.image,
208 | style =
209 | {
210 | width = 32f,
211 | height = 32f,
212 | flexShrink = 0
213 | },
214 | tooltip = text
215 | };
216 |
217 | button.Add(image);
218 | }
219 | }
220 |
221 | ```
222 |
223 | 作成したFactoryクラスを設定します。
224 |
225 | ```cs
226 | ContextCircleMenuLoader.OnBuild += (builder =>
227 | {
228 | ...
229 | builder.ConfigureButton(new CustomButtonFactory());
230 | });
231 | ```
232 |
233 | すると以下のようにアイコンのみ表示するボタンに置き換わります。
234 |
235 | 
236 |
237 |
238 | ### フォルダのカスタマイズ
239 |
240 | フォルダのUIが気に入らなければ、独自のフォルダに置き換えることができます。
241 |
242 | `ContextCircleMenuLoader.OnBuild`内で`builder.ConfigureFolder`を使用してください。
243 |
244 | ```cs
245 | ContextCircleMenuLoader.OnBuild += (builder =>
246 | {
247 | ...
248 | builder.ConfigureFolder(FolderMenuFactory);
249 | });
250 | ```
251 |
252 | > [!CAUTION]
253 | > v1.0.0で破壊的な変更が加えられました。
254 |
255 | 独自のフォルダを作成するためには、FolderCircleMenuを継承したクラスとそれに対応したFactoryクラスを作成する必要があります。
256 |
257 |
258 | ここでは、SampleのCustomで提供しているものと同様のコードを例として紹介します。
259 |
260 | SampleはPackage Manager > ContextCircleMenu > Samplesからインポートすることができます。
261 |
262 | この例では、既存のUIにベクターグラフィックスを加えたものに置き換えています。
263 |
264 | 以下のクラスを作成してください。
265 |
266 | ```cs
267 | public class CustomFolderMenuFactory : IFolderCircleMenuFactory
268 | {
269 | public FolderCircleMenu Create(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory)
270 | {
271 | return new CustomFolderCircleMenu(path, menu, parent, factory);
272 | }
273 | }
274 |
275 | public class CustomFolderCircleMenu : FolderCircleMenu
276 | {
277 | public CustomFolderCircleMenu(string path, IMenuControllable menu, CircleMenu parent, IButtonFactory factory) :
278 | base(path, menu, EditorGUIUtility.IconContent(EditorIcons.FolderIcon), parent, factory)
279 | {
280 | }
281 |
282 | protected override VisualElement[] CreateUtilityElements(ref ContextCircleMenuOption menuOption)
283 | {
284 | var element = new VisualElement();
285 | var option = menuOption;
286 | element.generateVisualContent += context =>
287 | {
288 | var painter = context.painter2D;
289 | var buttonCount = ButtonElements.Length;
290 | for (var i = 0; i < buttonCount; i++)
291 | {
292 | var angle = (float)i / buttonCount * 360f;
293 | if (buttonCount % 2 == 1)
294 | angle += 180f;
295 | else
296 | angle += 180f - 360f / buttonCount / 2;
297 | var vector = new Vector2(
298 | Mathf.Sin(Mathf.Deg2Rad * angle),
299 | Mathf.Cos(Mathf.Deg2Rad * angle)).normalized;
300 |
301 | var from = vector * 12f;
302 | var to = vector * option.Radius * 1.5f;
303 | painter.strokeColor = Color.black;
304 | painter.lineWidth = 2f;
305 | painter.BeginPath();
306 | painter.MoveTo(from);
307 | painter.LineTo(to);
308 | painter.Stroke();
309 | }
310 |
311 | painter.BeginPath();
312 | painter.Arc(Vector2.zero, option.Radius * 1.5f, 0, 360f);
313 | painter.fillColor = new Color(0f, 0f, 0f, 0.2f);
314 | painter.Fill();
315 |
316 | painter.DrawCircle(Vector2.zero, option.Radius * 1.5f, 0, 360f, 5f, Color.gray);
317 | };
318 | return new[] { element };
319 | }
320 | }
321 | ```
322 |
323 | 作成したFactoryクラスを設定します。
324 |
325 | ```cs
326 | ContextCircleMenuLoader.OnBuild += (builder =>
327 | {
328 | ...
329 | builder.ConfigureButton(new CustomButtonFactory());
330 | builder.ConfigureFolder(new CustomFolderMenuFactory());
331 | });
332 | ```
333 |
334 | すると以下のようなUIに置き換わります。
335 |
336 | 
337 |
338 | ### ショートカットキーのカスタマイズ
339 |
340 | デフォルトのメニュー開閉ボタンは`A`キーに設定されていますが、自由に変更することができます。
341 |
342 | まず`Edit > Shortcuts`でウィンドウを開いてください。
343 |
344 | `Context Circle Menu`と検索すると、下図のような設定が見つかります。
345 | 
346 |
347 | 好きなキーに設定してください。
348 |
349 | ## API ドキュメント
350 |
351 | ここでは主要なAPIを説明します。UIをカスタマイズする際の参考にしてください。
352 |
353 | ### ContextCircleMenu
354 |
355 | #### プロパティ
356 | | プロパティ名 | 説明 |
357 | | ---- | ---- |
358 | | BlockMouseEvents | trueの場合にクリック等のマウス操作を無効化します |
359 |
360 | #### メソッド
361 | | メソッド名 | 説明 |
362 | | ---- | ---- |
363 | | Show() | メニューを表示します。 |
364 | | Hide() | メニューを非表示にします。 |
365 | | Open(CircleMenu menu) | 引数に指定したメニューを開きます。 |
366 | | Back() | 前回のメニューを開きます。 |
367 | | TryForceSelect() | フォーカスされているボタンがあれば強制的に選択します。 |
368 | | TryForceEnterByMousePosition() | マウスの位置に対応するボタンを強制的にフォーカスします。 |
369 | | CreateMenu(Action\ configureMenu) | メニュー内容をCircleMenuBuilderを用いて作成します。 |
370 |
371 | ### CircleMenuBuilder
372 | #### メソッド
373 | | メソッド名 | 説明 |
374 | | ---- | ---- |
375 | | AddMenu(ICircleMenuFactory factory) | 独自のメニューを追加します。 |
376 | | AddMenu(string path, GUIContent content, Action action) | 手動でメニューを追加します。 |
377 | | AddMenu(ContextCircleMenuAttribute attribute, MethodInfo method) | 属性からメニューを追加します。 |
378 | | ConfigureFolder(IFolderCircleMenuFactory factory) | 独自のフォルダーメニューに置き換えます。 |
379 | | ConfigureButton(IButtonFactory factory) | 独自のボタンに置き換えます。 |
380 |
381 | ### CircleMenu
382 | #### 抽象メソッド
383 | | メソッド名 | 説明 |
384 | | ---- | ---- |
385 | | CreateButtons(IButtonFactory factory, ref ContextCircleMenuOption menuOption) | メニューに表示するボタンを作成します。ここで渡されるIButtonFactoryはCircleMenuBuilder.ConfigureButton()で設定したものになります。 |
386 |
387 | #### 仮想メソッド
388 | | メソッド名 | 説明 |
389 | | ---- | ---- |
390 | | CreateUtilityElements(ref ContextCircleMenuOption menuOption) | ボタン以外の要素を作成します。 |
391 | | OnInitialized(ref ContextCircleMenuOption menuOption) | 初期化時に呼ばれます。 |
392 | | OnBuild() | 要素作成時に呼ばれます。主にShow()やOpen()が呼ばれた時です。 |
393 |
394 | ### CircleButton
395 | #### 抽象メソッド
396 | | メソッド名 | 説明 |
397 | | ---- | ---- |
398 | | ModifierButton(Button button, string text, GUIContent icon, int section) | ボタン作成時に呼ばれます。ボタンの要素を編集するために用いてください。 |
399 |
400 | #### 仮想メソッド
401 | | メソッド名 | 説明 |
402 | | ---- | ---- |
403 | | OnMouseEnter(Button button, MouseEnterEvent evt) | マウスが要素内に入った際に呼ばれます。|
404 | | OnMouseLeave(Button button, MouseLeaveEvent evt) | マウスが要素内から出た際に呼ばれます。 |
405 |
406 | ## LISENCE
407 |
408 | MIT
409 |
410 | ## AUTHOR
411 |
412 | @Garume
413 |
--------------------------------------------------------------------------------
/Third Party Notices.md:
--------------------------------------------------------------------------------
1 | https://gist.github.com/alexanderameye/1eef648d7d1699a9548bc2de3dde2a45
2 |
3 | MIT License
4 |
5 | Copyright (c) [year] [fullname]
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 | ---
24 |
25 | https://github.com/BennyKok/unity-pie
26 |
27 | MIT License
28 |
29 | Copyright (c) 2021 BennyKok
30 |
31 | Permission is hereby granted, free of charge, to any person obtaining a copy
32 | of this software and associated documentation files (the "Software"), to deal
33 | in the Software without restriction, including without limitation the rights
34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35 | copies of the Software, and to permit persons to whom the Software is
36 | furnished to do so, subject to the following conditions:
37 |
38 | The above copyright notice and this permission notice shall be included in all
39 | copies or substantial portions of the Software.
40 |
41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47 | SOFTWARE.
48 |
49 | ---
50 |
51 | https://github.com/AnnulusGames/UnityEditorIcons
52 |
53 | MIT License
54 |
55 | Copyright (c) 2023 Annulus Games
56 |
57 | Permission is hereby granted, free of charge, to any person obtaining a copy
58 | of this software and associated documentation files (the "Software"), to deal
59 | in the Software without restriction, including without limitation the rights
60 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61 | copies of the Software, and to permit persons to whom the Software is
62 | furnished to do so, subject to the following conditions:
63 |
64 | The above copyright notice and this permission notice shall be included in all
65 | copies or substantial portions of the Software.
66 |
67 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
73 | SOFTWARE.
74 |
--------------------------------------------------------------------------------
/docs/ContextCircleMenu Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/ContextCircleMenu Logo.png
--------------------------------------------------------------------------------
/docs/image-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-1.png
--------------------------------------------------------------------------------
/docs/image-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-2.png
--------------------------------------------------------------------------------
/docs/image-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-3.png
--------------------------------------------------------------------------------
/docs/image-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-4.png
--------------------------------------------------------------------------------
/docs/image-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-5.png
--------------------------------------------------------------------------------
/docs/image-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image-6.png
--------------------------------------------------------------------------------
/docs/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Garume/ContextCircleMenu/55da84287758705c47b84f6d28b68e49e47ea7bf/docs/image.png
--------------------------------------------------------------------------------