This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

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.

Notice
Protected packages are entirely loaded into memory, no data streaming is available for them.

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 <your_project_name>.cpp file:
    Source code (C++)
    #include <UnigineEngine.h>
    
    #include "AppSystemLogic.h"
    #include "AppWorldLogic.h"
    #include "AppEditorLogic.h"
    
    #ifdef _WIN32
    	int wmain(int argc,wchar_t *argv[]) {
    #else
    	int main(int argc,char *argv[]) {
    #endif
    	
    	Unigine::Engine::InitParameters init_params;
    	init_params.window_title = "Your_Title";
    	init_params_params.project = "<your_project_name>";
    	init_params_params.password = "12345";
    	Unigine::EnginePtr engine(init_params, argc, argv);
    	
    	AppSystemLogic system_logic;
    	AppWorldLogic world_logic;
    	AppEditorLogic editor_logic;
    	
    	engine->main(&system_logic,&world_logic,&editor_logic);
    	
    	return 0;
    }
    Notice
    If you pass a project name during engine initialization, this means the engine will store its rewritable data (such as logs, cache and configuration files) in user profile (in C:\Users\<username> on Windows or in /home/<username> on Linux) rather than <UnigineSDK/bin/ or <UnigineSDK/data/ folders.

    On engine initialization, you can set NULL to the project attribute of initialization parameters, if you don't need that data is stored in user profile:

    Source code (C++)
    // engine initialization
    Unigine::Engine::InitParameters init_params;
    init_params_params.project = NULL;
    init_params_params.password = "12345";
    Unigine::EnginePtr engine(init_params, argc, argv);
Last update: 2024-08-16
Build: ()