This is a Neovim plugin for Unity
- Unity Play/Stop/Refresh with Neovim commands.
- Configuration options for nvim-dap. (Please check the license of the package before using it.)
- Neovim >= 0.10.0
- NeovimForUnity (Unity Package)
optional
- .NET SDK installed and
dotnet
command available(for vsutc debugger) - mono (for unity-debugger)
Install the plugin with your preferred package manager:
{
'nagaohiroki/unity.nvim',
opts = {
discover_time = 2000 -- default option
}
}
nvim-dap option
{
'nagaohiroki/nvim-dap', -- Fixed vstuc error(See Note)
dependencies = {
'nagaohiroki/unity.nvim',
},
config = function()
local dap = require('dap')
vim.keymap.set('n', '<F5>', function()
if dap.session() == nil then
local unity = require('unity')
-- vstuc
dap.adapters.vstuc = unity.vstuc_dap_adapter()
dap.configurations.cs = unity.vstuc_dap_configuration()
-- unity-debug(old)
-- dap.adapters.unity = unity.unity_dap_adapter()
-- dap.configurations.cs = { unity.unity_dap_configuration() }
end
dap.continue()
end)
end
}
Command | |
---|---|
URefresh | Refresh Unity |
UPlay | Play Unity |
UStop | Stop Playing Unity |
UPause | Pause Unity |
Unpause | Unpause Unity |
UPlayToggle | Toggle Play Unity |
UPauseToggle | Toggle Pause Unity |
ShowUnityProcess | Show Debug Target Info |
InstallUnityDebugger | Install vstuc *1 |
InstallUnityDebuggerOld | Install unity-debug *1 |
*1 Installed debugger path.
- Linux or MacOS:
~/.local/share/nvim/unity-degger
- Windows:
%LOCALAPPDATA%\nvim-data\unity-degger
vstuc on nvim-dap is not working.
Adding filterOptions to nvim-dap's setExceptionBreakpoints made it work.
mfussenegger/nvim-dap/lua/dap/session.lua
- { filters = filters, exceptionOptions = exceptionOptions },
+ { filters = filters, exceptionOptions = exceptionOptions, filterOptions = {} },