
For compatibility reasons, the ID has to be an integer (within the range -2,147,483,647 to +2,147,483,647, giving you around 4 billion possible numbers to use). In order to associate your asset with an agent, you need to give it a unique identifier. In this case, the Credit Entity is using sprite 736 as its icon when displayed in the UI. In xml, the assets are referenced like this: (for performance, the assets are stored in an array, so the identifier is the literal element index) Once you've added this file, you'll have access to a huge number of scripts, the most important one is LibraryModifier_MonoBehaviour.Īll assets in Starmancer are assigned a unique identifier. Copy and paste it into your Assets folder. Once you're familiar with the XML system, you'll need to find "StarmancerMod.dll" and add it to your created Unity project (it's located in the Starmancer installation directory). If you're not familar with the XML system in Starmancer, you can read about it, here. You'll have to edit some xml to associate your new content with an agent. If you followed the tutorial, you created an asset bundle, but it won't actually do anything in the game yet. This will add a menu entry: Assets > Build AssetBundles. you can anything to edit the file, even notepad)
#Modding unity assets code
Open that file and paste the code (double click to open it. Right click in the project view and select Create > C# Script (name the script anything you want)Ģ. If(!Directory.Exists(assetBundleDirectory))ĭirectory.CreateDirectory(assetBundleDirectory) īuildPipeline.BuildAssetBundles(assetBundleDirectory,ġ. String assetBundleDirectory = "Assets/AssetBundles" Unity doesn't natively make it super easy to build asset bundles, but there's an easy fix (and one that I took directly from the Unity documentation above).Īll you need to do is add the following code to any C# file in your project: You can add multiple objects to the same Asset Bundle. Select the bottom right of the inspector window. Then, select your asset in the project view (NOT the hierarchy). We're going to use this project to export Asset Bundles.įirst, create whatever assets that you want (sprites, animations, gameobjects, etc) Once downloaded, just open Unity and create a new project. You don't need to worry about how they're loaded (unless you're curious). You're only interested in building Asset Bundles. You can view the unity documentation here.
#Modding unity assets download
I'm not sure how much the specific version matters, but you might as well download the exact same version that the game was built with.Īsset Bundles are created in Unity. Starmancer is currently using Unity version 2019.4. It would help if you're familiar with Unity concepts before creating asset bundles, but you could also just learn by doing (much more fun)įirst, you'll have to download Unity. This is how you add new Sprites, Animations, GameObjects, Menus, and whatever else you might want to create.Īll assets are created with Unity.
