Parkitect Mod Community

Parkitect Mod Community

  • Documentation
  • Blog

›Models And Assets

Starter

  • Starter

Modding

  • IMod Interface
  • Logging
  • Debugging
  • GitHub for beginners
  • Parkitool

Models And Assets

  • Models and Assets
  • Asset Bundle For Beginners
  • Recolorable Objects

Asset Bundle For Beginners

Introduction

Asset bundles are unity's way of providing game assets to the game after a game has been released. It's meant for DLC or expansion packs. But that can be used for modding also!

Requirements

  • 3D Models
  • Unity 5+
  • Default unity layout is recommended for this tutorial.

How To

Create (or open) a new default 3d project in Unity. Drag your models into the asset folder (found in the project tab, bottom left). Right click on the asset folder > create > C# Script and call it AssetBundleExporter. Double click that file, now monodevelop or visual studio will open.

Replace the contents with the following script:

using UnityEditor;

public class AssetBundleExporter
{
    [MenuItem("Assets/Build AssetBundles")]
    static void BuildAllAssetBundles()
    {
        BuildPipeline.BuildAssetBundles("./");
    }
}

Save the file and close MonoDevelop or Visual Studio.

Now select all the models that you want to include in an asset bundle. In the inspector on the bottom right side of your screen there is an Asset Labels section. Open the dropdown and click on new, enter your assetbundle name. If you're following this tutorial for the custom scenery, the name must be 'scenery'.

Now go in the top menu to Assets > Build AssetBundles. This can take from a few seconds to minutes, depending on how much models you have included.

When it's done building, the asset bundles can be found in the root of your unity project folder. If you follow this tutorial for the custom scenery, make sure you copy scenery and scenery.manifest.

← Models and AssetsRecolorable Objects →
  • Introduction
  • Requirements
  • How To
Parkitect Mod Community
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2020 Your Name or Your Company Name