ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Setting the value of Property in Unity Editor Inspector|Public Variables C# Serialize Field|

Автор: TechWorld Plaza

Загружено: 2023-01-03

Просмотров: 174

Описание: In this short Unity Game Engine tutorial we will learn how to expose a property to the Inspector in the same way as a field.
A public variable is available in the Unity editor for read and write. This is not a good practise as Public member variables give up control of who can change the state of the object and that introduces an opportunity for bugs.
The Inspector can only display values that are serialized by Unity and Unity doesn't auto-detect properties like it does public member variables. This means we have to tell it which properties to serialize so they will be displayed in the Inspector. We accomplish this by annotating variable with the SerializeField attribute, and add the field prefix to the annotation like this

[field: SerializeField]
public float Speed { get; set; }

We can now see the variable Speed in the Inspector and edit the value there.

I hope this helped. Please Subscribe, Like,Comment and Share my channel for more fun videos and stay tuned for more. Thanks for watching.

Subscribe to TechWorld Plaza on YouTube:
   / @techworldplaza  

Unity 3d:
https://unity3d.com/get-unity/download

#unitytutorial #unity3d #unity2d

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Setting the value of Property in Unity Editor Inspector|Public Variables C# Serialize Field|

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

UI Animation in Unity

UI Animation in Unity

Изменение сцен в Unity с помощью кнопки (базовый урок)

Изменение сцен в Unity с помощью кнопки (базовый урок)

Create UI ANIMATIONS without ❌CODING❌! - Unity UI tutorial

Create UI ANIMATIONS without ❌CODING❌! - Unity UI tutorial

Прямой эфир Euronews

Прямой эфир Euronews

Изучите ОСНОВЫ C# за 10 МИНУТ!

Изучите ОСНОВЫ C# за 10 МИНУТ!

Python  - Полный Курс по Python [15 ЧАСОВ]

Python - Полный Курс по Python [15 ЧАСОВ]

Самый быстрый микроконтроллер (MCU) против самого дешевого микропроцессора (MPU)

Самый быстрый микроконтроллер (MCU) против самого дешевого микропроцессора (MPU)

КАК НЕЛЬЗЯ ХРАНИТЬ ПАРОЛИ (и как нужно) за 11 минут

КАК НЕЛЬЗЯ ХРАНИТЬ ПАРОЛИ (и как нужно) за 11 минут

Роковая ошибка Jaguar: Как “повестка” в рекламе добила легенду британского автопрома

Роковая ошибка Jaguar: Как “повестка” в рекламе добила легенду британского автопрома

Психология людей, которые не публикуют свои фотографии в социальных сетях

Психология людей, которые не публикуют свои фотографии в социальных сетях

Christmas Magic: Happy Snowman Art Screensaver | 16 Stunning 4K Images for Your TV

Christmas Magic: Happy Snowman Art Screensaver | 16 Stunning 4K Images for Your TV

ESP32 + MLX90640: тепловизор с искусственным интеллектом (TensorFlow Lite)

ESP32 + MLX90640: тепловизор с искусственным интеллектом (TensorFlow Lite)

12 Cursor-лайфхаков, которые делают тебя быстрее на 10×

12 Cursor-лайфхаков, которые делают тебя быстрее на 10×

Zed the IDE (да, я попробовал Cursor & Antigravity)

Zed the IDE (да, я попробовал Cursor & Antigravity)

Как работает кэш внутри процессора

Как работает кэш внутри процессора

🌿 Relaxing Music with Nature Sounds | Soothing Forest, River & Birds Chirping for Deep Relaxation 🌊🎶

🌿 Relaxing Music with Nature Sounds | Soothing Forest, River & Birds Chirping for Deep Relaxation 🌊🎶

Prawda o witaminie D wyszła na jaw...

Prawda o witaminie D wyszła na jaw...

Практический экзамен SolidWorks CSWA

Практический экзамен SolidWorks CSWA

Bomby, drony i 40 tysięcy dezerterów. Płk rez. Piotr Lewandowski: Front może pęknąć w każdej chwili

Bomby, drony i 40 tysięcy dezerterów. Płk rez. Piotr Lewandowski: Front może pęknąć w każdej chwili

How to Serialize a Dictionary in Unity | #unityin60sec

How to Serialize a Dictionary in Unity | #unityin60sec

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]