This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Protecting Your Data with a Password

In order to protect your source code and content, you are recommended to use the Archiver tool to archive your resources into UNG archives. It implements data encrypting to avoid unauthorized access and provides a password protection.

To protect resources, you need to create an archive with the password specified and pass the same password on engine initialization. The workflow is as follows:

  • Create an UNG archive with the specified password. For example, to create an archive named files.ung with the 12345 password that contains the textures directory, pass the following CLI:
    Shell commands
    ung_x86 -o files.ung -d textures -p 12345
    
  • Specify the same password to be passed on engine initialization in the main.cpp file:
    Source code (C++)
    #include <Unigine.h>
    
    /*
     */
    using namespace Unigine;
    
    /*
     */
    int main(int argc,char **argv) {
    	
    	Engine *engine = Engine::init(UNIGINE_VERSION,argc,argv,my_project,12345);
    	engine->main();
    	Engine::shutdown();
    	
    	return 0;
    }
    
    
Last update: 03.07.2017
Build: ()