This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
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.

Properties Class

Unigine properties. This interface provides access to Unigine property manager functions.

To use this class, include the UnigineProperties.h file.

Properties Class

Members


int removeWorldLibrary (const char * name)

Removes a world library and all its contents.

Arguments

  • const char * name - Name of the library to remove.

Return value

1 if the library is removed successfully; otherwise, 0.

int getNumLibraries ()

Returns the number of loaded property libraries.

Return value

The number of loaded property libraries.

int load (const char * name)

Loads the property library from the file.

Arguments

  • const char * name - Property library name.

Return value

1 if the property library is loaded successfully; otherwise, 0.

int findLibrary (const char * name)

Finds the property library by its name.

Arguments

  • const char * name - Property library name.

Return value

Property library number.

int getNumProperties (int library)

Returns the number of library properties.

Arguments

  • int library - Library number.

Return value

The number of library properties.

int findPropertyLibrary (const char * name)

Finds the property library by property name.

Arguments

  • const char * name - Property name.

Return value

Property library number.

int moveProperty (const char * name, const char * new_library, const char * new_name)

Moves property into the specified property library..

Arguments

  • const char * name - Property name.
  • const char * new_library - New property library name.
  • const char * new_name - New property name.

Return value

1 if the property is moved successfully; otherwise,

Ptr<Property> getProperty (int library, int num)

Returns the property.

Arguments

  • int library - Library number.
  • int num - Property number.

Return value

Property smart pointer.

const char * getWorldLibraryName (int num)

Returns the name of a library belonging to the current world by its index.

Arguments

  • int num - Index of the library.

Return value

Name of the library.

int replaceProperty (const Ptr<Property> & property, const char * new_name)

Replaces the specified property with a new one.

Arguments

  • const Ptr<Property> & property - Name of the property to be replaced.
  • const char * new_name - Name of the new property

Return value

1 if the property is replaced successfully; otherwise, 0.

const char * getLibraryName (int num)

Returns the property library name.

Arguments

  • int num - Property library number.

Return value

The name of property library.

int replaceProperty (const char * name, const char * new_name)

Replaces the specified property with a new one.

Arguments

  • const char * name - Name of the property to be replaced.
  • const char * new_name - Name of the new property

Return value

1 if the property is replaced successfully; otherwise, 0.

int isProperty (const char * name)

Checks the property by its name.

Arguments

  • const char * name - Property name.

Return value

1 if the property exists; otherwise, 0.

Ptr<Property> findProperty (const char * name)

Finds the property by its name.

Arguments

  • const char * name - Property name.

Return value

Property smart pointer.

int getNumWorldLibraries ()

Returns the number of property libraries belonging to the current world.

Return value

Number of libraries belonging to the world.

int isLibrary (const char * name)

Checks the property library by its name.

Arguments

  • const char * name - Property library name.

Return value

1 if the property library exists; otherwise, 0.

int addWorldLibrary (const char * name)

Loads a library and associates it with the current world. If the library file does not exist, an empty library is created.

Arguments

  • const char * name - File with the library to load.

Return value

1 if the library is loaded or created successfully; otherwise, 0.

int findLibraryProperty (int library, const Ptr<Property> & property)

Finds the property in the specified property library.

Arguments

  • int library - Library number.
  • const Ptr<Property> & property - Property name.

Return value

Property number.

int create (const char * name)

Creates an empty property library.

Arguments

  • const char * name - Property library name.

Return value

1 if the property library is created successfully; otherwise, 0.

int removeProperty (const char * name)

Removes property by its name.

Arguments

  • const char * name - Property name.

Return value

1 if the property is removed successfully; otherwise, 0.

int clear (const char * name)

Clears the property library by its name.

Arguments

  • const char * name - Property library name.

Return value

1 if the property library is cleared successfully; otherwise, 0.

int cloneProperty (const char * name, const char * new_library, const char * new_name)

Clones property into the specified property library.

Arguments

  • const char * name - Property name.
  • const char * new_library - New property library name.
  • const char * new_name - New property name.

Return value

1 if the property is cloned successfully; otherwise, 0.

int inheritProperty (const char * name, const char * new_library, const char * new_name)

Inherits property into the specified property library.

Arguments

  • const char * name - Property name.
  • const char * new_library - New property library name.
  • const char * new_name - New property name.

Return value

1 if the property is inherited successfully; otherwise, 0.

int findPropertyLibrary (const Ptr<Property> & property)

Finds the property library by property name.

Arguments

  • const Ptr<Property> & property - Property name.

Return value

Property library number.

int isLibraryEditable (int num)

Returns the property library editable flag.

Arguments

  • int num - Property library number.

Return value

The editable flag.

int findLibraryProperty (int library, const char * name)

Finds the property in the specified property library.

Arguments

  • int library - Library number.
  • const char * name - Property name.

Return value

Property number.

int save (const char * name)

Saves the property library into the file.

Arguments

  • const char * name - Property library name.

Return value

1 if the property library is saved successfully; otherwise, 0.

const char * getPropertyName (int library, int num)

Returns the property name.

Arguments

  • int library - Library number.
  • int num - Property number.

Return value

The name of property.

void clearWorldLibraries ()

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