# Unity3D

Put the <mark style="color:orange;">lib/Plugins</mark> folder and files from the ProudNet installation path into <mark style="color:orange;">Assets/Plugins</mark> in your Unity project path, and the ProudNet library will be included in your project.

The detailed process is as follows.

## 1. plugins copy and paste

<figure><img src="/files/YgaQfRzhWS6Lv6yHn1H2" alt=""><figcaption><p>Move to the ProudNet installation path</p></figcaption></figure>

Copy Plugins from the ProudNet installation path.

<figure><img src="/files/ceIAAPwU2rjjRb66TABi" alt=""><figcaption><p>Unity Project Path</p></figcaption></figure>

Paste the copied files into the Plugins folder of the Unity project where you want to use ProudNet.

## 2.  Plugin common settings

### - Select x86, x86\_64 plugins

{% hint style="info" %}
The photo below is an example of using the x86\_64 plugin to delete the x86 folder.
{% endhint %}

<figure><img src="/files/fFRqGzciOXowjjD0D7ZH" alt=""><figcaption><p>Delete the x86 folder inside the Plugins folder in your Unity project path</p></figcaption></figure>

{% hint style="danger" %}
Delete the x86 folder because if you leave it unused, it may duplicate the contents of <mark style="color:orange;">x86\_64</mark>.
{% endhint %}

<figure><img src="/files/rckQfc5tVfDWPHzrzDJV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/u8a0XHP9R0uSmsU85Zx3" alt=""><figcaption></figcaption></figure>

Change the plugin file settings inside <mark style="color:orange;">x86\_64</mark> to use it.

### -  Select a plugin from the Stripped folder

If you check the Plugins folder in your Unity project, it contains plugins as shown in the photo below. The plugins in the stripped folder are the same as the ones outside, but the ones in the stripped folder contain **symbols**, so keep the ones you need and delete the ones you do not use.

{% hint style="warning" %}
The photo below shows an example of deleting a stripped folder to use a plugin that does not contain symbols.
{% endhint %}

{% hint style="danger" %}
If you do not delete one of the plugins in the stripped folder and one of the plugins outside of it, you might get an error at build time.
{% endhint %}

<figure><img src="/files/1YFSQa0iEMqj55uNh9x6" alt=""><figcaption><p>libs -> arm64-v8a -> Delete the stripped folder.</p></figcaption></figure>

<figure><img src="/files/7GKva5VUJqCsvH1PjTBU" alt=""><figcaption><p>libs -> armeabi-v7a -> Delete the stripped folder.</p></figcaption></figure>

<figure><img src="/files/zzBUA8SUPJkHUMfth2Lc" alt=""><figcaption><p>libs -> x86 -> Delete the stripped folder.</p></figcaption></figure>

## 3. Setting up plugins based on your environment

### - Mac

<figure><img src="/files/Krpbk6WU290P4XGHP9dY" alt=""><figcaption><p>Mac - ProudDotNetClientUnity</p></figcaption></figure>

<figure><img src="/files/64UD78SBUxEd6ImbAPAP" alt=""><figcaption><p>Mac - ProudDotNetClientUnity</p></figcaption></figure>

<figure><img src="/files/z6lPracvrvykvCHAkqBH" alt=""><figcaption><p>Mac - ProudNetClientPlugin</p></figcaption></figure>

<figure><img src="/files/ATVcfEYr4QDeaEmBUXWS" alt=""><figcaption><p>Mac - ProudDotNetClientUnity-IOS</p></figcaption></figure>

The other plugins can be used by default, but if you are on iOS, you will need to set up the plugins as shown in the photos above.

### - Windows or Android

If you are on Windows or Android, proceed as follows to set up the plugin.

<figure><img src="/files/ThCQ1ZBKGp1gzKVr8zD3" alt=""><figcaption><p>ProudDotNetClientUnity-IOS</p></figcaption></figure>

<figure><img src="/files/B0KQLfq9MtFK6JgY1pKX" alt=""><figcaption><p>Window - ProudDotNetClientUnity</p></figcaption></figure>

<figure><img src="/files/bmKRrHniPATjnpZeio85" alt=""><figcaption><p>Window - ProudDotNetClientUnity</p></figcaption></figure>

<figure><img src="/files/3NARW2OPxvBz51PtVmqf" alt=""><figcaption><p>Window - ProudDotClienPlugin</p></figcaption></figure>

### - WebGL

Under <mark style="color:orange;">/Assets/Plugins/WebGL</mark>, you will find <mark style="color:orange;">WebGL</mark>-specific plugins.

Unity will automatically recognize the plugin as being built with <mark style="color:orange;">WebGL</mark>; If it's not <mark style="color:orange;">WebGL</mark>, other plugins should not be built with it when the build platform <mark style="color:orange;">WebGL</mark> is selected.

If you get an error like ***'XXX' could not be found***, it means that <mark style="color:orange;">WebGL</mark>-related plugins have not been added properly, and if you get an error like ***'XXX' already defined***, it means that there is a conflict with another plugin.

Select the plugin and set <mark style="color:orange;">JSClient.jslib</mark> and <mark style="color:orange;">ProudNetClientPlugin-webgl.dll</mark> to be included in the <mark style="color:orange;">WebGL</mark> build as shown in the Inspector window.

<figure><img src="/files/C0uo3W55DjfvmcLyVafu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/5KtRv20NALJTmt9B6k5D" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
To prevent other plugins from being included in the WebGL build, you can uncheck **Any Platform** and check only the platforms you want.
{% endhint %}

## 4. Creating a script

<figure><img src="/files/1r4MU0e6Z5JzFZtgdQ8U" alt=""><figcaption></figcaption></figure>

After everything is set up, create a script to create the <mark style="color:orange;">NetClient</mark>.

<figure><img src="/files/j80k0F23p9KPW3fHP8e2" alt=""><figcaption><p>CS file to use as a client</p></figcaption></figure>

As in the example above, you can create a <mark style="color:orange;">NetClient</mark> normally without any compilation errors.

<figure><img src="/files/Oa2Iq46iT8V6qtpw6VM2" alt=""><figcaption><p>Example of adding <strong>GameClient.cs</strong> as a component to an empty Game Object</p></figcaption></figure>

You can use the script file you created by adding it as a component to the Game Object you want to use as a client.

## 5. iOS Build

{% hint style="info" %}
For iOS, please see  [**iOS Build**](/proudnet.eng/proudnet/2.setting/unity3d/ios-build.md).
{% endhint %}

***

## :arrow\_left: [Back](https://docs.proudnet.com/proudnet.eng/proudnet/2.setting/pages/YF7Z3CPCxDI0T1hoMsHR#2.-pidl)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proudnet.com/proudnet.eng/proudnet/2.setting/unity3d.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
