- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Enumerable Parsing - Lets Make Unity Shell - Part 4
Let's expand upon the Conversion support we added in the last video. The goal here is to add full support for the conversion of all Enumerable types. This will add an implicit conversion to any enumerable type parameter that is done using a slightly modified converter. Conversion takes advantage of Enum.Parse() which allows parsing by both name and value.
This will allow us to automatically convert to any enumerable type without requiring the user to make their own converter for each enumerable type they want to use.
Single conversions by name are supported such as:
Sphere → PrimitiveType.Sphere
- or -
Average → PhysicMaterialCombine.Average
Conversions by value are supported such as:
0 → PhysicsMaterialCombine.Average
Conversions by lists of names are supported such as:
Read,Write,PathDiscovery → FileIOPermissionAccess.Read | FileIOPermissionAccess.Write | FileIOPermission.PathDiscovery
Conversions by flag values are supported such as:
3 → FileIOPermissionAccess.Read | FileIOPermissionAccess.Write
Learn more about using Enum.Parse() here (including additional examples): https://msdn.microsoft.com/en-us/library/essfb559(v=vs.110).aspx
Grab Unity Shell for yourself on GitHub: https://github.com/WorldOfZero/Unity-Shell
Discord: https://discord.gg/hU5Kq2u
Видео Enumerable Parsing - Lets Make Unity Shell - Part 4 канала World of Zero
This will allow us to automatically convert to any enumerable type without requiring the user to make their own converter for each enumerable type they want to use.
Single conversions by name are supported such as:
Sphere → PrimitiveType.Sphere
- or -
Average → PhysicMaterialCombine.Average
Conversions by value are supported such as:
0 → PhysicsMaterialCombine.Average
Conversions by lists of names are supported such as:
Read,Write,PathDiscovery → FileIOPermissionAccess.Read | FileIOPermissionAccess.Write | FileIOPermission.PathDiscovery
Conversions by flag values are supported such as:
3 → FileIOPermissionAccess.Read | FileIOPermissionAccess.Write
Learn more about using Enum.Parse() here (including additional examples): https://msdn.microsoft.com/en-us/library/essfb559(v=vs.110).aspx
Grab Unity Shell for yourself on GitHub: https://github.com/WorldOfZero/Unity-Shell
Discord: https://discord.gg/hU5Kq2u
Видео Enumerable Parsing - Lets Make Unity Shell - Part 4 канала World of Zero
world of zero lets make unity-shell unity shell unity 3d reflection enum.parse Enum parsing enumerables Lets Make Unity Shell part 4 xamarin workbooks xamarin unity 3d c# c# example unity 3d tutorial tutorial example how to enum flags parse enumerable types reflection c# unity 3d reflection type converters c# type converters Enum Converter programming tutorial programming building a shell repl read execute print loop lets-make console unity3d console
Комментарии отсутствуют
Информация о видео
3 августа 2017 г. 9:49:57
00:22:33
Другие видео канала




















