Skip to content

Nuterra/ExampleBlockPack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up the project

  1. Download or clone the repository onto your computer.
  2. Open the project with Unity 5.5.1.
  3. Click Nuterra > Build AssetBundles to verify the assetbundles can be succesfully build.

Creating your own block

Album of gifs

Setting up the scene

  1. Add a cube to the scene (3D Object > Cube).
  2. Set the position of the cube to (0, -1, 0)
  3. Add an empty GameObject to the scene (this will be referred to as your root object).
  4. Set the position of the root object to (0, 0, 0)

Adding your model

In order to add a model to your block, the model should already be imported into the Unity Editor.

  1. Drag the model onto the root object, so it will be put inside of it.
  2. Change the scale, position and rotation of the model to be correct for the block
  3. Add colliders (note: if you want to use mesh colliders, they must be convex!)

Setting the information of your model

  1. Add the following script to the root object: Scripts > Nuterra.Editor > Custom Block Prefab
  2. Setup the information to your liking.
  3. Make sure the BlockID is unique, otherwise Nuterra will throw an error during startup.
  4. Make sure the dimensions of your block are at least 1 in each direction. Setup basic info Create simple icon

Setting up your blockpack as asssetbundle

  1. Create a folder for your blockpack, it must exist under /Blocks, example: /Blocks/MyFirstPack
  2. Set the asset bundle of your blockpack folder with a name, it is handy to put all your assets in this folder so they all get serialized
  3. Drag the root object into your blockpack folder to save the prefab To save future edits on your custom block, you need to use the Apply button on the root object. Create assets folder

Installing your blockpack

BlockPacks are put in the /GeneratedAssetBundles folder of the Unity project. To install these, put them in TerraTech/Nuterra_Data/BlockPacks/

You can use the following script to make copying the required files easier:

/GeneratedAssetBundles/copy-to-nuterra.bat

@echo off
set TT_ROOT=D:\Program Files (x86)\Steam\steamapps\common\TerraTech Beta
set PACK_NAME=myfirstpack

set TT_BLOCKS=%TT_ROOT%\Nuterra_Data\BlockPacks
if not exist "%TT_BLOCKS%" mkdir "%TT_BLOCKS%"
copy /Y %PACK_NAME% "%TT_BLOCKS%\%PACK_NAME%"
copy /Y %PACK_NAME%.manifest "%TT_BLOCKS%\%PACK_NAME%.manifest"
pause

Alternate versions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages