rider редактор кода unity

Integrating Rider 2018.2 and the Unity Editor

Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Installation and first use

The easiest way to get started with Rider and Unity is to load an existing solution, at which point we’ll automatically install a plugin into your Unity project. When you switch back to Unity, the plugin initialises, sets Rider as the default external editor and you’re all set. The plugin makes sure the generated C# projects are compatible with Rider, and will set up the inter-process communication that lets Rider run tests, view logs and so on.

But there’s a little bit of a chicken and egg scenario here. What happens when there aren’t any solution files? Unity generates these files, and makes sure they’re up to date when you double click a C# file. But they’re not usually checked into source control. So how do you open a project without solution files?

Of course, once Rider is set as the default external editor in Unity, you can double click a C# file and Unity will open Rider for you. But we also received feedback that users were trying to open a Unity project using Rider’s Open Folder feature. This is mostly intended for working with web files, and not C# projects, which require MSBuild files. Without important context from project files (e.g. target framework version, references, etc.) Rider can’t show the C# features we all know and love, such as code completion or inspections, and this was understandably leaving users frustrated.

The good news is that we’ve addressed this in Rider 2018.2! If you try and open a fresh Unity project as a folder, Rider will now notify you that Unity and C# functionality is unavailable until the project is reopened correctly. It will also prompt you to install the plugin. Once you’ve clicked the action link, Rider will install the plugin and then prompt you to switch back to Unity, at which point Unity will load the plugin, set the default external editor and generate the project files. You can now reload the solution correctly.

rider редактор кода unity. dotnet open folder notification. rider редактор кода unity фото. rider редактор кода unity-dotnet open folder notification. картинка rider редактор кода unity. картинка dotnet open folder notification. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

(Of course, you can also set Rider as the default external editor in Unity’s preferences – recent versions of Unity will recognise when Rider is installed and automatically add it to the list of available editors. Once selected, double clicking a C# file will generate the solution, open it in Rider, and then the plugin is automatically installed.)

rider редактор кода unity. dotnet rider in unity prefs. rider редактор кода unity фото. rider редактор кода unity-dotnet rider in unity prefs. картинка rider редактор кода unity. картинка dotnet rider in unity prefs. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Log viewer

One of the cool features of Rider’s deep Unity integration is the ability to capture Unity’s Console log messages and bring them into Rider’s UI, with parsed, clickable stack traces. We’ve made a couple of nice updates in this release.

Firstly, we’ve added a text filter. Just start typing in the search field at the bottom of the window, and we’ll narrow down the list by only show matching items. Hit enter to change focus to the list and navigate with the cursor keys.

rider редактор кода unity. dotnet search logs preview. rider редактор кода unity фото. rider редактор кода unity-dotnet search logs preview. картинка rider редактор кода unity. картинка dotnet search logs preview. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

And if there are too many log entries? Well, you can now collapse similar items, using the toggle button in the toolbar. Once selected, Rider will only show a single item, with the number of merged items shown in brackets at the end of the message.

rider редактор кода unity. dotnet collapsed log entries2. rider редактор кода unity фото. rider редактор кода unity-dotnet collapsed log entries2. картинка rider редактор кода unity. картинка dotnet collapsed log entries2. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

And finally, we can now open editor and player log files in Rider’s editor. Simply open the options menu in the Unity log viewer tool window (the cog in the top right of the tool window) and select Open Unity Editor Log or Open Unity Editor Player Log. Note that these log files are the Unity editor’s own logs, or logs from a standalone player, rather than the messages logged to Unity’s Console.

rider редактор кода unity. dotnet open editor log. rider редактор кода unity фото. rider редактор кода unity-dotnet open editor log. картинка rider редактор кода unity. картинка dotnet open editor log. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Working with class libraries

With the advent of Assembly Definition Files, Unity now has a story for splitting a solution up into separate assemblies, with the architectural and build time advantages this gives. But we know that there are still a lot of Unity developers who create a separate solution for class libraries that are then added as binary references to a Unity project. Wouldn’t it be nice if all those lovely Unity project integration features were available to these class library projects? Well, now they are!

If you have a class library project, with solution files living in the root of the Unity project (in the same location as the generated solution file), Rider will now enable the same rich integration features for class library projects.

This means you’ll get the log viewer, the play/pause/step buttons to control Unity’s play mode, and also automatic Attach to Unity Editor and Attach to Unity Editor and Play run configurations, to make it very easy to attach the debugger to the Unity editor.

And best of all, it will work even if you have the class library and the generated solutions open at the same time!

Control when to reloading assemblies

Unity is designed to have a tight feedback loop. Whenever a source file changes, the underlying assemblies are recompiled and reloaded. This works great for immediate feedback, but can be annoying when you’re in play mode – you’re busy play testing a scenario, and a modified file causes everything to reload and lose state. It can be very frustrating.

Unity 2018.2 added an option in the General preferences page to control what happens when scripts change during play mode. We liked it so much, we’ve brought it to earlier versions of Unity. The Rider page in Unity’s preferences dialog will now allow you to prevent assembly reloads during play mode, or reschedule them for after play mode, or to stop play mode straight away and recompile.

rider редактор кода unity. dotnet unity recompile options. rider редактор кода unity фото. rider редактор кода unity-dotnet unity recompile options. картинка rider редактор кода unity. картинка dotnet unity recompile options. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

This is very useful when used together with Rider’s background refresh, which notifies Unity when a file has changed, causing a recompile. And you’ll also be pleased to hear that this release of Rider continues to fine tune the background refresh, making it a little less aggressive in when it causes a recompile.

Even better, the implementation for the lock assemblies feature came from an external contribution (yes, the Unity support is open source and has up-for-grabs issues!). Congratulations and thanks to Jurjen Biewenga! 🎉

Everything Else

Those are the main new features for editor integration in Rider 2018.2, but that’s not everything. There are also a few more minor updates, although some are no less important. For example:

As you can see, we’ve put a lot of effort into integrating Rider well with Unity, and we’re not done yet. In our next post, we’ll take a look at the new Unity specific inspections in Rider 2018.2.

If you have any suggestions for other features you’d like to see in Rider, please let us know. And in the meantime, please download Rider 2018.2 today, and give it a go (and don’t forget about the 30 day trial version)!

Источник

Советы по использованию редактора кода JetBrains Rider в Unity

Что вы узнаете на этой странице: советы по эффективной разработке кода для проектов на Unity с помощью JetBrains Rider. JetBrains Rider — это кроссплатформенная среда разработки скриптов на C# со множеством возможностей для пользователей Unity. Пользуйтесь этими советами, и не забудьте узнать еще больше из доклада на Unite от Мэтта Эллиса из JetBrains.

rider редактор кода unity. tips using jetbrains rider search shift shift shortcut. rider редактор кода unity фото. rider редактор кода unity-tips using jetbrains rider search shift shift shortcut. картинка rider редактор кода unity. картинка tips using jetbrains rider search shift shift shortcut. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Используйте сочетание Shift+Shift для поиска по скриптам на C#, включая файлы, классы и символы. Введите в поле поиска все, что вам интересно, и Rider предоставит вам доступные варианты. Вам даже не требуется вводить слова полностью — Rider распознает их по сокращениям.

Для перехода к нужному методу, атрибуту или полю открытого файла можно использовать кнопку Navigate to Member. Сузить область поиска можно вводом искомого текста.

rider редактор кода unity. tips using jetbrains rider alt enter. rider редактор кода unity фото. rider редактор кода unity-tips using jetbrains rider alt enter. картинка rider редактор кода unity. картинка tips using jetbrains rider alt enter. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Сочетание Alt+Enter открывает контекстное меню действий для конкретного участка кода, включая исправление ошибок, предлагаемых алгоритмами Rider на основе анализа кода. Например, если нажать сочетание Alt+Enter при курсоре над именем класса, то в меню появится список действий, включая исправление стандартов наименования или открытие общего доступа к классу.

А если вы неправильно ввели имя для метода Invoke, Rider предупредит вас заранее и покажет возможные варианты исправления. При работе в редакторе Unity Rider позволяет избежать изменений, нарушающих работу кода, которых вы бы не заметили до запуска приложения.

Во всплывающем контекстном меню также отображаются точки перехода практически к любой функции Rider. Если вы не можете вспомнить нужное вам сочетание клавиш, то нажмите Alt+Enter, начните вводить название функции, и получите список соответствующих действий.

Функция Refactor This поможет вам провести рефакторинг кода, переместить его в другой файл, переименовать символы как в открытом, так и в других файлах.

Кроме того, меню Alt+Enter можно использовать для генерации функций событий. Это действие доступно для любого класса Unity. Вы получите список всех функций событий, которые доступны для создания в этом конкретном классе.

Rider распознает функцию события, сериализованное поле или класс MonoBehaviour, выделяя их в тексте. Если навести курсор на функцию события, то появится подсказка с описанием этой функции. Введите текст «quick documentation», чтобы получить дополнительную информацию во всплывающем окне, или перейдите по ссылке к полной версии документации.

Меню Navigate to очень полезно для быстрого перемещения по коду Unity, например, к основным или производным классам, а также к примерам использования. Функция также позволяет декомпилировать код Unity на лету, демонстрируя то, что происходит в собственных API Unity.

rider редактор кода unity. tips using jetbrains rider debugging. rider редактор кода unity фото. rider редактор кода unity-tips using jetbrains rider debugging. картинка rider редактор кода unity. картинка tips using jetbrains rider debugging. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

The Rider debugger shows extra data for Unity objects. For example, when looking at a Scene in the debugger, you see a list of root GameObjects, and each GameObject shows child GameObjects and attached components. ECS Entity objects also show component data.

Rider includes a code-focused profiler that looks at just your scripts; it doesn’t look at any of the other things that are happening inside Unity itself. You can quickly search for types and methods and perform what-if analysis to see if it’s worth optimizing a method.

rider редактор кода unity. tips using jetbrains rider scheme switcher. rider редактор кода unity фото. rider редактор кода unity-tips using jetbrains rider scheme switcher. картинка rider редактор кода unity. картинка tips using jetbrains rider scheme switcher. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Переключатель схем позволяет выбирать тему оформления Rider и цветовой гаммы интерфейса.

Эта функция особенно полезна при совместном использовании одного рабочего места — с ее помощью можно менять схему сочетаний клавиш. Например, один программист предпочитает свою схему сочетаний, а второй — свою. Этот инструмент позволяет быстро переключаться между схемами.

Дополнительные рекомендации смотрите в документации Rider for Unity.

Источник

Features

You can start with watching this 3-minute video where Matt Ellis gives a short overview of JetBrains Rider features for Unity Development.

Unity Explorer

rider редактор кода unity. . rider редактор кода unity фото. rider редактор кода unity-. картинка rider редактор кода unity. картинка . Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Modes
By default, when working with a Unity project in Rider, the Explorer window works in the Unity mode showing you all the assets that constitute the project. If you switch the Explorer window to the Solution mode, you will see only the Scripts part of the project.

Packages
Primarily, the Packages node shows you the contents of the Packages folder in the root of your project. This might well only contain a manifest.json file which you can edit in Rider and when saved, Unity will update your project to include the packages you’ve added. More importantly, the Packages node will also show all of the packages referenced in your project. Unity supports a number of different package types, and Rider will show them all. For more details on how Rider works with Unity packages, refer to the blog post.

Control over Unity editor

To reduce the time you spend context switching between Rider and the Unity editor, some of the Unity editor’s functionality is exposed directly in Rider on the Unity toolbar located in the top right corner.

rider редактор кода unity. unity toolbar. rider редактор кода unity фото. rider редактор кода unity-unity toolbar. картинка rider редактор кода unity. картинка unity toolbar. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

The toolbar allows:

Start Unity : start Unity Editor and open the Unity project that corresponds to the solution opened in Rider.

Start Unity : start Unity Editor with enabled code coverage support and open the Unity project that corresponds to the solution opened in Rider.

Unity Settings. : quickly open the Rider’s Unity Engine settings page.

Show Unity Log Window : open the log viewer.

Switch to Full UI / Switch to Minimized UI : switch between the full Rider UI and the minimized one (all UI elements that are not related to Unity are hidden).

Editor tips

JetBrains Rider marks classes, methods and fields that are implicitly used by Unity directly in the editor.

The UnityEngine.Color and UnityEngine.Color32 colors are highlighted, and hitting Alt+Enter will open the color palette editor to modify the color. Also named colors and Color.HSVToRGB are supported.

rider редактор кода unity. unity colors. rider редактор кода unity фото. rider редактор кода unity-unity colors. картинка rider редактор кода unity. картинка unity colors. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Find Usages

In Unity projects, the Find Usages Alt+F7 feature is extended with data pulled from Unity scenes, assets and prefabs. If you search for a class or a method used as an event handler, Rider will show where it is used in Unity files, grouped by type, component name, and parent game objects.

rider редактор кода unity. find unity usages. rider редактор кода unity фото. rider редактор кода unity-find unity usages. картинка rider редактор кода unity. картинка find unity usages. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Code Vision

The Code Vision feature also supports Unity. Right in the Rider editor, you can see what classes, methods, fields (including field values set in Unity), and even assets are implicitly used. Code Vision provides navigation to the Unity Editor.

rider редактор кода unity. unity props code vision. rider редактор кода unity фото. rider редактор кода unity-unity props code vision. картинка rider редактор кода unity. картинка unity props code vision. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Performance indicators

rider редактор кода unity. unity frequently called method. rider редактор кода unity фото. rider редактор кода unity-unity frequently called method. картинка rider редактор кода unity. картинка unity frequently called method. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Event functions

rider редактор кода unity. unity generate event function. rider редактор кода unity фото. rider редактор кода unity-unity generate event function. картинка rider редактор кода unity. картинка unity generate event function. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

rider редактор кода unity. unity events autocomplete. rider редактор кода unity фото. rider редактор кода unity-unity events autocomplete. картинка rider редактор кода unity. картинка unity events autocomplete. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Descriptions for event functions and parameters in Unity based classes are shown in tooltips and Quick Documentation.

rider редактор кода unity. unity quickdoc. rider редактор кода unity фото. rider редактор кода unity-unity quickdoc. картинка rider редактор кода unity. картинка unity quickdoc. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Inspections and quick-fixes

Rider shows warnings for unknown scenes, tags, and layers.

rider редактор кода unity. unity layer warning. rider редактор кода unity фото. rider редактор кода unity-unity layer warning. картинка rider редактор кода unity. картинка unity layer warning. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

When the Solution-wide analysis is enabled, JetBrains Rider understands implicitly used fields and event functions and do not highlight them as not accessed.

Empty event functions are shown as dead code, with a quick-fix to remove them.

Using the SyncVarAttribute inside any class other than NetworkBehaviour is treated as an error.

A quick-fix is suggested to create a serialized field from a usage of an unresolved symbol:

rider редактор кода unity. unity serialized field. rider редактор кода unity фото. rider редактор кода unity-unity serialized field. картинка rider редактор кода unity. картинка unity serialized field. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

JetBrains Rider ensures that all of your event functions have correct signatures: it highlights incorrect signatures and offers a quick-fix to correct them:

rider редактор кода unity. unity signature. rider редактор кода unity фото. rider редактор кода unity-unity signature. картинка rider редактор кода unity. картинка unity signature. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

rider редактор кода unity. unity comparetag. rider редактор кода unity фото. rider редактор кода unity-unity comparetag. картинка rider редактор кода unity. картинка unity comparetag. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

There are also inspections for the [InitializeOnLoad] and [InitializeOnLoadMethod] attributes, ensuring that they have the correct method or constructor signatures, and JetBrains Rider will grey out a redundant [InitializeOnLoad] attribute if the class doesn’t have a static constructor, with a quick-fix to either quickly remove the attribute, or create the constructor.

External annotations

A lot of Unity-specific assemblies are annotated with External annotations to improve code inspection when you make use of these assemblies.

Marking Component.gameObject and Object.name as not-nullable.

Assertions.Assert methods marked as assertion methods to help null-value analysis.

EditorTestsWithLogParser.ExpectLogLineRegex gets regular expression helper functionality.

Support for Unity 2017.2’s modularised UnityEngine assemblies.

rider редактор кода unity. unity shader colors. rider редактор кода unity фото. rider редактор кода unity-unity shader colors. картинка rider редактор кода unity. картинка unity shader colors. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

JetBrains Rider provides code completion.

rider редактор кода unity. unity shader completion. rider редактор кода unity фото. rider редактор кода unity-unity shader completion. картинка rider редактор кода unity. картинка unity shader completion. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

rider редактор кода unity. unity shader todo. rider редактор кода unity фото. rider редактор кода unity-unity shader todo. картинка rider редактор кода unity. картинка unity shader todo. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

rider редактор кода unity. unity shader folding. rider редактор кода unity фото. rider редактор кода unity-unity shader folding. картинка rider редактор кода unity. картинка unity shader folding. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

[Cg/HLSL] Code completion in Cg/HLSL blocks.

rider редактор кода unity. unity shader hlsl completion. rider редактор кода unity фото. rider редактор кода unity-unity shader hlsl completion. картинка rider редактор кода unity. картинка unity shader hlsl completion. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Search everywhere will help you to navigate to symbols inside shader files. rider редактор кода unity. unity shader find everywhere. rider редактор кода unity фото. rider редактор кода unity-unity shader find everywhere. картинка rider редактор кода unity. картинка unity shader find everywhere. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Support for assembly definition files

rider редактор кода unity. unity asmdef. rider редактор кода unity фото. rider редактор кода unity-unity asmdef. картинка rider редактор кода unity. картинка unity asmdef. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Live templates

JetBrains Rider offers a couple of Unity-specific live templates:

sprop : a Unity property with a serialized backing field.

sfield : a Unity serialized field.

File templates

JetBrains Rider offers a number of file templates for new C# script, tests, and shader files:

rider редактор кода unity. unity filetemplates. rider редактор кода unity фото. rider редактор кода unity-unity filetemplates. картинка rider редактор кода unity. картинка unity filetemplates. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Unity logs

rider редактор кода unity. unity log window. rider редактор кода unity фото. rider редактор кода unity-unity log window. картинка rider редактор кода unity. картинка unity log window. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

When Rider is connected to the Unity editor, the Unity tool window becomes available. To open the window, select View | Tool Windows | Unity from the main menu or use the Unity-related Actions list on the Unity toolbar.

The Log tab of the Unity tool window brings Unity’s Console into Rider. The tab shows Unity log entries and is updated as events are logged in Unity.

The Output part of the window on the right shows the content of the currently selected log entry. Rider makes the content interactive, so that you can navigate to any source file, class, method or property mentioned in the log entry.

Note that log entries can be filtered by event type: events from play or edit mode, warnings, errors, and messages.

UnityYAMLMerge Support

Источник

Rider редактор кода unity

JetBrains Rider — быстрый и мощный редактор C# для Unity, который работает на Windows, Mac и Linux. Непревзойденное количество интеллектуальных механизмов инспекции кода и рефакторинга (более 2500), включенных в Rider, позволяют писать безошибочный код на C# гораздо быстрее.

Легкая интеграция с Unity

В Rider уже встроена поддержка Unity. Когда вы впервые откроете решение Unity, Rider будет автоматически установлен в качестве стандартного редактора для файлов шейдеров и сценариев C#. Впоследствии при двойном щелчке по файлу шейдера или сценарию C# они будут открываться в Rider.

rider редактор кода unity. rider 183 unity intro preview@2x 6e56b743c3f9bc14e1fca2189971d04e. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity intro preview@2x 6e56b743c3f9bc14e1fca2189971d04e. картинка rider редактор кода unity. картинка rider 183 unity intro preview@2x 6e56b743c3f9bc14e1fca2189971d04e. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Управление редактором Unity

Благодаря интегрированному механизму двусторонней связи вы можете входить или выходить из режима Play, а также приостанавливать его и продолжать выполнение покадровыми шагами, при этом не покидая Rider. На панели инструментов есть кнопки просмотра игры Play, Pause и Step, которые работают так же, как в редакторе Unity. Небольшая иконка Unity в строке состояния показывает состояние редактора Unity: подключен, обновляет состояние или находится в режиме Play. Любые изменения, внесенные в Rider в режиме Edit, будут сразу же переданы в редактор Unity.

rider редактор кода unity. rider 183 unity control preview@2x 86bb75536244d15782b156d91c87fd96. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity control preview@2x 86bb75536244d15782b156d91c87fd96. картинка rider редактор кода unity. картинка rider 183 unity control preview@2x 86bb75536244d15782b156d91c87fd96. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Советы по коду

Rider предоставляет высококлассный механизм анализа кода C# и содержит как специальные инспекции кода для Unity, так и необходимые быстрые исправления.

rider редактор кода unity. rider 183 unity coding hints preview@2x a4c842e78ce2241182079df27523c671. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity coding hints preview@2x a4c842e78ce2241182079df27523c671. картинка rider редактор кода unity. картинка rider 183 unity coding hints preview@2x a4c842e78ce2241182079df27523c671. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Удобная отладка Unity

Rider позволяет без проблем осуществлять отладку ваших скриптов C#, когда они выполняются в редакторе Unity. Все необходимые параметры уже настроены, вам нужно лишь нажать сочетание клавиш, команду меню или кнопку Debug на панели инструментов, чтобы подключить отладчик к запущенному редактору Unity. В редакторе можно устанавливать точки останова, исполнять код пошагово, просматривать значения локальных переменных, отслеживать определенные значения, а также вычислять выражения.

С помощью Rider можно выполнять даже отладку кода, для которого нет отладочной информации. Rider автоматически декомпилирует внешние библиотеки, позволяя выполнять отладку декомпилированного кода, входить во вложенные функции, устанавливать точки останова, просматривать и устанавливать локальные и другие переменные.

rider редактор кода unity. debugging@2x 684645ed2f5bdf1cbb9dfd777affcaf9. rider редактор кода unity фото. rider редактор кода unity-debugging@2x 684645ed2f5bdf1cbb9dfd777affcaf9. картинка rider редактор кода unity. картинка debugging@2x 684645ed2f5bdf1cbb9dfd777affcaf9. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Запуск тестов Unity

Прямо из Rider можно запускать тесты, взаимодействующие с Unity API и способные выполнять код покадрово. Ну и конечно же, изучать результаты тестов Unity можно так же, как и с обычными тестами, — например, фильтровать по результату и щелкать по трассировкам стека для перемещения по коду.

Журналы консоли Unity

Новое окно инструмента Unity Logs с гиперссылками на трассировки стека позволяет просматривать события, которые регистрируются в консоли редактора Unity. Оно позволяет фильтровать события по категории (ошибка, предупреждение или сообщение), скрывать их в зависимости от того, когда они были зафиксированы (в режиме Play или Edit), а также с легкостью переходить к любому исходному файлу, классу, методу или свойству, упомянутым в записи журнала. Окно Unity Logs автоматически очищается после каждого перехода в режим Play.

rider редактор кода unity. unity unit testing@2x a2192f820f6e7608a2ac3b4828f84187. rider редактор кода unity фото. rider редактор кода unity-unity unit testing@2x a2192f820f6e7608a2ac3b4828f84187. картинка rider редактор кода unity. картинка unity unit testing@2x a2192f820f6e7608a2ac3b4828f84187. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Подсветка проблем производительности

Rider позволяет писать более производительный C#-код для Unity. Это достигается путем подсветки ресурсоемких API Unity внутри методов, которые вызываются каждый кадр, таких как Update и корутины. Rider подсвечивает вызовы даже тех методов, которые используют ресурсоемкие API Unity неявным образом.

Помимо этого, Rider оснащен множеством специально предназначенных для Unity инспекций и соответствующих быстрых исправлений. Он способен распознавать паттерны низкопроизводительного кода и может рекомендовать для них автоматические исправления, например использовать перегрузку, кэширование значений или альтернативный API.

rider редактор кода unity. rider 183 unity perf indicators preview@2x 8f1aa31cb97d7f29b9efd5160553caf0. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity perf indicators preview@2x 8f1aa31cb97d7f29b9efd5160553caf0. картинка rider редактор кода unity. картинка rider 183 unity perf indicators preview@2x 8f1aa31cb97d7f29b9efd5160553caf0. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Поиск вхождений в файлах Unity

Теперь Find Usages включает в себя сцены, ресурсы и префабы Unity. Если вы ищете класс или метод, используемый в качестве обработчика событий, Rider показывает, где он используется в ваших файлах Unity, группируя такие места по типу, наименованию компонента и родительским игровым объектам. Более того, при двойном щелчке на элементе его вхождения подсвечиваются непосредственно в редакторе Unity.

Теперь при извлечении этой информации из файлов Unity Rider корректно подсвечивает методы обработчика событий как неявно используемые. Подсветка неявного использования преобразуется в ссылки Code Vision, что позволяет вам сразу видеть, какие классы, методы и поля неявно используются Unity. При нажатии на такую ссылку будут найдены все вхождения элемента, в том числе в файлах Unity.

rider редактор кода unity. rider 183 unity code vision yaml preview@2x 4354d138bd0bee4a94aa23236059d2da. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity code vision yaml preview@2x 4354d138bd0bee4a94aa23236059d2da. картинка rider редактор кода unity. картинка rider 183 unity code vision yaml preview@2x 4354d138bd0bee4a94aa23236059d2da. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Поддержка шейдеров

Rider теперь также поддерживает файлы .shader, обеспечивая подсветку синтаксиса, сворачивание кода, выделение парных скобок и многое другое. Подсвечиваются синтаксические ошибки в разделах ShaderLab, комментарии типа todo упорядочиваются в окне To Do Explorer, подсветкой также отмечаются цветовые свойства, которые можно редактировать с помощью специального инструмента выбора цвета. Автозаполнение простых слов доступно в рамках всего файла, в том числе в блоках кода Cg/HLSL.

rider редактор кода unity. shader preview@2x a7cc55582d254c4156d2137dc392cded. rider редактор кода unity фото. rider редактор кода unity-shader preview@2x a7cc55582d254c4156d2137dc392cded. картинка rider редактор кода unity. картинка shader preview@2x a7cc55582d254c4156d2137dc392cded. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Просмотр документации Unity

rider редактор кода unity. rider 183 unity docs preview@2x a3d41fb8e430938c370d20fe25b5b41d. rider редактор кода unity фото. rider редактор кода unity-rider 183 unity docs preview@2x a3d41fb8e430938c370d20fe25b5b41d. картинка rider редактор кода unity. картинка rider 183 unity docs preview@2x a3d41fb8e430938c370d20fe25b5b41d. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

rider редактор кода unity. technologies 34030a60d26f9f4742d072ad837cb782. rider редактор кода unity фото. rider редактор кода unity-technologies 34030a60d26f9f4742d072ad837cb782. картинка rider редактор кода unity. картинка technologies 34030a60d26f9f4742d072ad837cb782. Rider 2018.1 introduced deep integration with the Unity Editor, allowing you to run unit tests, view Unity console log entries and control play mode, all without leaving Rider. In our third post looking at Rider 2018.2 and Unity, we’ll look at what’s new in Editor integration.

Бесплатная пробная версия на 30 дней

Клиенты

«Наличие подходящего инструментария исключительно важно для сохранения конкурентоспособности на любом рынке — и особенно в сфере игр. Каждый разработчик в Yakuto имеет подписку на JetBrains Toolbox — важность этого пакета для продуктивной работы, с нашей точки зрения, невозможно переоценить. Основная наша работа ведется в C# на компьютерах Mac. Из-за этого раньше нам требовалась виртуальная машина с ReSharper, но благодаря Rider мы работаем с одной ОС в native-режиме, и это просто здорово. Отладка Unity стала бесшовным процессом, а расширения позволили установить важную контекстуальную связь с Unity. Будучи опытным пользователем ReSharper, я чувствую себя в Rider как дома: рефакторинг, глобальный анализ решения, инструменты запуска тестов — все это у меня под рукой. Мы даже не можем себе представить, как вели бы разработку на C# без Rider».

Джеймс Грэттон
Технический директор, Yakuto

«Rider быстро стала единственной IDE, которую хочется использовать для любых задач разработки на UE4 или Unity. Я экономлю очень много времени благодаря понятным рабочим процессам и доволен интеграцией с P4. Когда руководители видят, как быстро мы движемся от постановки задач к решению, они приходят в восторг от продукта. Rider устраняет все затруднения, мешающие нам делать то, что мы умеем лучше всего, — писать код».

«Во всех смыслах лучшая IDE для Unity под Mac. Беспрецедентные возможности отладки и рефакторинга».

Эрин Кинен
Инженер-программист, компания-производитель мобильных игр N3twork

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *