53 lines
1.8 KiB
Markdown
53 lines
1.8 KiB
Markdown
# Editor
|
|
|
|
Files for using the Unity editor
|
|
|
|
## Installation
|
|
|
|
Place the "Editor" folder anywhere in your project Assets folder.
|
|
|
|
## Usage
|
|
|
|
### MeshPostProcessor
|
|
|
|
Used to perform various operations to models on import to unity
|
|
|
|
#### Add Colliders
|
|
|
|
To convert objects to colliders on import, add the following strings to the object's name:
|
|
|
|
* `_COLLIDER`: Converts to a mesh collider
|
|
|
|
* `_SPHERECOLLIDER`: Converts to a sphere collider
|
|
|
|
* `_CAPSULECOLLIDER`: Converts to a capsule collider, with the axis along the object's longest axis
|
|
|
|
* `_BOXCOLLIDER`: Converts to a box collider. The box will be aligned to the object's local coordinates
|
|
|
|
#### Merge Meshes
|
|
|
|
Add `_MERGE` to an object's name, and all its child objects meshes will be automatically merged into one. Does not work for skinned meshes
|
|
|
|
#### Delete Objects
|
|
|
|
Add `_DEL` to an object's name to delete it on import
|
|
|
|
#### Trim animations
|
|
|
|
Automatically removes any animations with only 2 keyframes to make them easier to edit manually
|
|
|
|
|
|
### TexturePostProcessor
|
|
|
|
Used to perform various operations on textures on import to Unity. Configured with constants in the top of the file.
|
|
|
|
Only works on files with the extension `EXTENSION` (default ".png").
|
|
|
|
#### Specular maps
|
|
|
|
If `SPEC_ENABLE` is enabled (default true), textures with the suffix `SPEC_TAG` (default "-spec") will be copied into the alpha channel of the texture without that suffix. For example, the file `foo-spec.png` will be copied into the alpha channel of the imported texture `foo.png`.
|
|
|
|
#### Normal maps
|
|
|
|
If `NORMAL_ENABLE` is enabled (default true), textures with the suffix `NORMAL_TAG` (default "-spec") will be marked as normal maps on import and when KSP PartTools exports the texture. if `NORMAL_GENERATE` is enabled (default true), then the texture will automatically be converted from a hightmap using Unity's normal map generation tool.
|