# Understanding this Project

### 3D Engine Class Diagram

<figure><img src="https://518400696-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFQ0NAsexBZFs3RihmQyK%2Fuploads%2F8OLGndGKzd1P1obhJ8mJ%2FClassDiagram.png?alt=media&#x26;token=928087a2-3cfd-4694-ac3d-bf8c0e41ee03" alt=""><figcaption><p>3D Engine Class Diagram</p></figcaption></figure>

## Solution

The 3D Engine contains three Projects:&#x20;

* 3DEngine (Package)
* Editor
* Engine

You can compile the **3DEngine (Package)** for the Editor and the **Engine** as a standalone.&#x20;

### NuGet Package

You can also only get the Engine with the NuGet Package Manager and create applications using the 3DEngine (w/o Editor) in a new project and implement all features via code.

<pre class="language-batch"><code class="lang-batch"><strong>dotnet new console -n Project
</strong>cd Project
dotnet add package 3DEngine
dotnet add package Costura.Fody
</code></pre>

Engine usage:&#x20;

```csharp
sealed class Program
{
    [STAThread]
    private static void Main() =>
        new Engine.Program().Run(true);
}
```

Use the Engine Core to get to the Scene System.

{% content-ref url="../engine/core" %}
[core](https://engine3d.gitbook.io/wiki/engine/core)
{% endcontent-ref %}

Project Setup:

```xml
<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<OutputType>WinExe</OutputType>
		<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
		<PlatformTarget>x64</PlatformTarget>
		<PublishAot>true</PublishAot>
		<ImplicitUsings>enable</ImplicitUsings>
	</PropertyGroup>

	<ItemGroup>
	  <None Remove="FodyWeavers.xml" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="3DEngine" Version="1.0.1" />
		<PackageReference Include="Costura.Fody" Version="5.7.0">
		  <PrivateAssets>all</PrivateAssets>
		</PackageReference>
	</ItemGroup>

</Project>
```

Also set the Files inside the Assets Folder to "CopyIfNewer" in the Properties Panel inside Visual Studio, so it is included in the Build Folder. This will be obsolete in the Future by the USD Format.
