Create Nodes
SDK Path: <SDK_INSTALLATION>
This sample demonstrates how to create parametric 3D primitives at runtime in UNIGINE. It showcases the use of the Mesh class and ObjectMeshDynamic nodes to procedurally generate a variety of basic shapes (Box, Sphere, Cylinder, Capsule, Prism with a custom number of sides and Plane) via code.
Each shape is constructed with a customizable size and resolution, added to a mesh surface, and placed in the world at a designated position. This approach allows dynamic geometry generation for tools, editor extensions, procedural environments, and rapid prototyping.
SDK Path: <SDK_INSTALLATION>data/csharp_component_samples/nodes/create_primitives
Accessing Demo Source Code#
You can study and modify the source code of this demo to create your own projects. To access the source code do the following:
- Find the C# Component Samples demo in the Demos section and click Install (if you haven't installed it yet).
- After successful installation the demo will appear in the Installed section, and you can click Copy as Project to create a project based on this demo.
- In the Create New Project window, that opens, enter the name for your new project in the corresponding field and click Create New Project.
- Now you can click Open Code IDE to check and modify source code in your default IDE, or click Open Editor to open the project in the UnigineEditor.
The information on this page is valid for UNIGINE 2.20 SDK.