Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thunderkit Utilities #558

Merged
merged 23 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7f73102
Added asset bundles guide
Indigocoder1 Feb 28, 2024
2d9cd12
Grammar changes and formatting
Indigocoder1 Feb 28, 2024
2f03104
Grammar & readability improvements. Added prefab guide
Indigocoder1 Feb 29, 2024
612d98d
Fix a couple grammar issues
LeeTwentyThree Feb 29, 2024
c8d44e8
Fixed names and comment spaces
Indigocoder1 Mar 1, 2024
c41b416
Merge branch 'master' of https://github.com/Indigocoder1/Nautilus
Indigocoder1 Mar 1, 2024
699d92e
Replace constant classID with PrefabInfo one
Indigocoder1 Mar 1, 2024
56a92bc
Changed TechType to PascalCase
Indigocoder1 Mar 1, 2024
19bda17
Fix duplicate usage of "on"
LeeTwentyThree Mar 1, 2024
d4616b4
Add Nautilus.Utility using statement
LeeTwentyThree Mar 1, 2024
3bc5d8a
Since the prefab has a recipe, must be pickupable
LeeTwentyThree Mar 1, 2024
12d6124
Merge branch 'master' of https://github.com/Indigocoder1/Nautilus
Indigocoder1 Sep 14, 2024
f0e3d6f
Added thunderkit utilites
Indigocoder1 Sep 14, 2024
ad6de78
Added SN/BZ checking
Indigocoder1 Sep 14, 2024
cbd18cb
Added separate enums for the layers in SN & BZ
Indigocoder1 Sep 14, 2024
a6cd36c
Changed name of application modes
Indigocoder1 Sep 14, 2024
600639d
Moved material getters to MaterialUtils
Indigocoder1 Sep 14, 2024
0e5f48d
Changed layer application to use switch expression
Indigocoder1 Sep 14, 2024
50efec8
Removed unnecessary comment
Indigocoder1 Sep 14, 2024
8b2ddd0
Changed property names to respect their type name
Indigocoder1 Sep 14, 2024
a86deef
Added default index of 0 to material indices
Indigocoder1 Sep 14, 2024
1c2a2d5
Added graphic setting and reverted default build config
Indigocoder1 Sep 14, 2024
3a31553
Added graphic option to layer applier & removed outdated comment
Indigocoder1 Sep 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Grammar changes and formatting
  • Loading branch information
Indigocoder1 committed Feb 28, 2024
commit 2d9cd125557f855215093596263b8841b1938fc7
33 changes: 18 additions & 15 deletions Nautilus/Documentation/guides/assetbundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Here are some things you will need to know:
- Basic modding and C# knowledge
- Basic knowledge of how to navigate the Unity game engine interface

The first thing you will need to do (Assuming you have a model already) is download the Unity Hub.
The first thing you will need to do (Assuming you have a model already) is download the Unity Hub.
This is where you will get the Unity version you need to use to export your asset bundle.

The version Subnautica uses is 2019.4.36 for SN1, as well as Below Zero.
Expand All @@ -17,36 +17,37 @@ Here are the download links you will need:
- Unity hub: [https://unity.com/download](https://unity.com/download)
- Unity version archive: [https://unity.com/releases/editor/archive](https://unity.com/releases/editor/archive)

Once you've installed both, open Unity hub and click "New Project" from the top right.
Once you've installed both, open Unity hub and click "New Project" from the top right.
Once there, select 3D Core, choose your project name and then click "Create Project".
![assetbundles-project-setup](../images/guides/assetbundles-project-setup.png)

If you get the error "Failed to resolve project template", follow these steps:
1. Locate where your editor is.
You can do that by opening Unity Hub, going to Installs then right clicking on the version in question and clicking on "Show in Explorer"
2. Go to ``Editor\Data\Resources\PackageManager\ProjectTemplates``. You will find a ``manifest.json`` and ``UnityLicense.json`` files, delete them both.
3. Kill Unity Hub in your task manager and open it again.

You should now be able to create your project!
> [!NOTE]
> If you get the error "<font color="red">Failed to resolve project template</font>", follow these steps:
> 1. Locate where your editor is.
> You can do that by opening Unity Hub, going to Installs, and then right clicking on the version in question and clicking "Show in Explorer"
> 2. Go to ``Editor\Data\Resources\PackageManager\ProjectTemplates``. You will find a ``manifest.json`` and ``UnityLicense.json`` files. delete them both.
> 3. Kill Unity Hub in your task manager and open it again.
>
> You should now be able to create your project!

The Unity editor will now open. This may take a while.
Once the editor is open, drag your model from your file manager into the Scene window
Once the editor is open, drag your model from your file manager into the Scene window.

You can either click on your model in the scene window or in the hierarchy on the left to select it and use transformations on it
You can either click on your model in the scene window or in the hierarchy on the left to select it.

Next, click on ``Window`` at the top of the Unity editor, and then click ``Package Manager``.
Click on the dropdown at the top left and select ``Unity Registry`` if not on it already.
Search for "Asset Bundle Browser" and install it.

Next, drag your model from the hierarchy on the left into the ``Assets`` section at the bottom.
This will create what is called a Prefab. It can be instantiated (created/spawned) multiple times but they are all copies of the original.
This will create what is called a ``Prefab``. It can be instantiated (created/spawned) multiple times, but they are all copies of the original.

To edit the prefab, double click on it in the ``Assets`` window.
You can add components to the prefab by clicking "Add Component" in the inspector on the right.
One example of a component is a ``RigidBody``, which can apply physics to your Prefab.
Any components you add will be included in the AssetBundle.

You **should not**, however, add scripts you made in the editor, as the AssetBundle will not link them to the scripts in your modding project and you will get errors.
You <font color="red">**should not**</font>, however, add scripts you made in the editor, as the AssetBundle will not link them to the scripts in your modding project and you will get errors.

After all your prefab configuration is done, click on it in the ``Assets`` window, and click on "Asset Bundle" in the bottom right of the Inspector.
Here you can either assign your prefab to an existing AssetBundle or create a new one.
Expand All @@ -58,7 +59,7 @@ Here you can see all the assets that will be put into your AssetBundle.

Click on the build tab, and change the ``Build Target`` to "Standalone Windows" if it isn't already.
You can also configure the ``Output Path`` of the build.
Once all that is set, click ``Build``.
After all that is set, click ``Build``.

Once your AssetBundle is built, move the built file to the location of your mod in the Plugins folder.
I prefer to put them inside a folder namded "Assets", but that isn't necessary.
Expand Down Expand Up @@ -108,4 +109,6 @@ To use this in a Nautilus prefab, just use
```csharp
myCustomPrefab.SetGameObject(myAssetBundleGO);
```
Instead of using a CloneTemplate.
Instead of using a CloneTemplate.

This reaches the end of this guide. If you have more questions about AssetBundles, feel free to ask in the modding channels of the modding Discord.
Loading