This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Programming Overview

This article describes ways of creating projects in Unigine.

The main purpose of the article is to provide insight into setting up the development environment and give the overview of programming. It contains links to other articles that help you to prepare the development environment, choose the language to programming and so on.

Languages#

To create your own project with Unigine, you can use the following programming languages:

UnigineScript can be easily extended through the Unigine API. The Unigine engine enables exporting the C++ and C# code and vice versa. You can write some functionality by using the C++ or C# language, and export it to the UnigineScript. See usage examples articles of C++ API and C# API to know more.

Platforms#

Unigine supports the following platforms:

  • Windows (7 SP1/8/10)
  • Linux (kernel 3.0+)

A 64-bit system is required to develop applications using UNIGINE 2 SDK. The engine fully and efficiently uses multi-core CPU architecture.

With Unigine you can build applications for these platforms with a single codebase.

Read more about the Hardware Requirements.

Development Environments#

You can use any of these PC platforms to write your Unigine-powered project:

  • Windows
  • Linux

In addition to UNIGINE SDK, each platform requires specific software that you need to install in order to start coding. You can find requirements for each platform here:

Execution Sequence#

Unigine has three main concepts of logic:

  • System logic - the logic of the application. You can implement your logic that will be performed during application life cycle. Your custom logic can be put in the system script file (by using UnigineScript API only), or you can inherit SystemLogic class and implement your logic (C++ and C# APIs).

    UnigineScript unigine.usc system script file is created automatically in the your project's folder. When you create a new C++ / C# project, it has already inherited system logic class with implemented methods to put your logic code inside.

  • World logic - the logic of the world - here you should put the logic of the virtual scene. The logic takes effect when the world is loaded. You can put your logic inside the world script file (by using UnigineScript API only), or you can inherit WorldLogic class and implement your logic (C++ and C# APIs).

    The world script *.usc file is automatically created with the new world and has the name of your project. When you create a new C++ / C# project, it has already inherited world logic class with implemented methods to put your logic code inside.

  • Editor logic - the logic of the editor. The logic takes effect only when the editor is loaded. You can put your logic inside the editor script file (by using UnigineScript API only), or you can inherit EditorLogic class and implement your logic (C++ and C# APIs).

    When you create a new C++ / C# project, it has already inherited editor logic class with implemented methods to put your logic code inside.

Notice
In case of inheriting *Logic classes (C++ / C#), implemented methods will be called right after corresponding scripts' methods.

Read this article to know where to put your logic code.

Also, read the Execution Sequence and Logic System articles to know the detailed workflow of the Unigine engine.

Usage Examples#

There are three sections with usage example samples:

The programming code is the same for all supported platforms, the difference is in compiling.

For all of these samples we create new projects by using Project Generator. Project Generator creates a new world with the World Light source and the plane mesh.

Last update: 27.12.2018
Build: ()