This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine.Plugins.SpiderVision.DebugData Class

This object stores the debug data such as the warp grid state, blend zone adjustment points, viewport debug color filling, etc.

Notice
The debug data are not stored in the configuration file.

This object is accessible via the corresponding method of the ViewportData class.

DebugData Class

Properties

bool ShowBlendLines#

The value indicating if the visualization is enabled for blend area control lines and selected points on the screen.

vec2[] BlendPointPositions#

The positions of blend area points displayed in the viewport.

bool ShowGrid#

The value indicating if the visualization of warping grid on the screen is enabled.

bool WarpPointsEnabled#

The value indicating if warping control points are displayed in the viewport.

vec2[] WarpPointPositions#

The positions of warping grid control points displayed in the viewport.

int DebugColorIndex#

The indexed color used in debug mode.
Notice
Setting individual colors for different viewports enables you to visualize overlapping regions for different viewports and facilitates the setup process.

vec4 DebugColor#

The color used in debug mode.
Notice
Setting individual colors for different viewports enables you to visualize overlapping regions for different viewports and facilitates the setup process.

Event EventChanged#

The event triggered on changing debug data. You can subscribe to events via Connect() and unsubscribe via Disconnect(). You can also use EventConnection and EventConnections classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler()

Usage Example

Source code (C#)
// implement the Changed event handler
void changed_event_handler()
{
	Log.Message("\Handling Changed event\n");
}

//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an EventConnections instance
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections changed_event_connections = new EventConnections();


// link to this instance when subscribing to an event (subscription to various events can be linked)
DebugData.EventChanged.Connect(changed_event_connections, changed_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
DebugData.EventChanged.Connect(changed_event_connections, () => { 
		Log.Message("Handling Changed event lambda\n");
		}
	);

// later all of these linked subscriptions can be removed with a single line
changed_event_connections.DisconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the Changed event with a handler function
DebugData.EventChanged.Connect(changed_event_handler);


// remove subscription to the Changed event later by the handler function
DebugData.EventChanged.Disconnect(changed_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   3. Subscribe to an event and unsubscribe later via an EventConnection instance
//////////////////////////////////////////////////////////////////////////////

// define a connection to be used to unsubscribe later
EventConnection changed_event_connection;

// subscribe to the Changed event with a lambda handler function and keeping the connection
changed_event_connection = DebugData.EventChanged.Connect(() => { 
		Log.Message("Handling Changed event lambda\n");
	}
);

// ...

// you can temporarily disable a particular event connection 
changed_event_connection.Enabled = false;

// ... perform certain actions

// and enable it back when necessary
changed_event_connection.Enabled = true;

// ...

// remove the subscription later using the saved connection
changed_event_connection.Disconnect();

//////////////////////////////////////////////////////////////////////////////
//   4. Ignoring Changed events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
DebugData.EventChanged.Enabled = false;

// ... actions to be performed

// and enable it back when necessary
DebugData.EventChanged.Enabled = true;

Members


string GetDebugColorName ( int index ) #

Returns the name of the debug color by its index.

Arguments

  • int index - Index of the color used in debug mode.

Return value

Name of the indexed color.

int GetNumDebugColors ( ) #

Returns the total number of indexed debug colors.

Return value

The total number of indexed debug colors.

void Save ( Stream stream ) #

Saves the debug data to the specified stream.

Arguments

  • Stream stream - Stream to which the data is to be written.

void Restore ( Stream stream ) #

Loads the debug data from the specified stream.

Arguments

  • Stream stream - Stream the data from which is to be loaded.
Last update: 13.12.2024
Build: ()