This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

gui_06

This article describes the data/samples/objects/gui_06.cpp sample.

The gui_06 sample demonstrates how to attach a GUI object to a static mesh, namely:

  • Create a GUI object without a background and set the value indicating if the GUI object should be a billboard to the 1.
  • Assign an instance of the WidgetLabel class to the created object
  • Add the GUI object with the text label to the static mesh as a child

GUI object attached to the static mesh

If you change the mesh position, the label position is also changed.

Notice
If you want to delete an instance of the ObjectGui class, first you have to delete the label assigned to it in your script.

See Also

Last update: 2017-07-03
Build: ()