Contributing to Auto LOD Generator
April 30, 2026 · View on GitHub
Thank you for your interest in contributing to Auto LOD Generator! This document provides guidelines and information for contributors.
Table of Contents
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Coding Standards
- Submitting Changes
- Releasing
- Reporting Bugs
- Requesting Features
Code of Conduct
Please be respectful and constructive in all interactions. We're all here to make this project better.
Getting Started
- Fork the repository
- Clone your fork locally
- Set up the development environment (see below)
- Create a new branch for your changes
- Make your changes
- Submit a pull request
How to Contribute
Ways to Contribute
- Report bugs - Found a bug? Open an issue!
- Suggest features - Have an idea? We'd love to hear it!
- Fix bugs - Check the issues labeled
bugandgood first issue - Add features - Check the issues labeled
enhancement - Improve documentation - Help make our docs better
- Write tests - Help improve code coverage
Development Setup
Prerequisites
- Unity 2021.3 LTS or newer
- Git
- A code editor (Visual Studio, Rider, or VS Code recommended)
Setup Steps
-
Clone the repository:
git clone https://github.com/manaporkun/Automatic-LOD-Generator.git -
Create or open a Unity project:
- Open Unity Hub
- Create a new project or open an existing one (Unity 2021.3+)
-
Add the package locally:
- Open Window > Package Manager
- Click + > Add package from disk
- Select the
package.jsonat the repository root
-
Install dependencies:
- In Package Manager, click + > Add package from git URL
- Enter:
https://github.com/Whinarn/UnityMeshSimplifier.git
-
Import demo scene (optional):
- In Package Manager, find Auto LOD Generator
- Expand Samples and click Import next to "Demo Scene"
-
Verify setup:
- Open Tools > Auto LOD Generator > Open Window
- The window should open without errors
Coding Standards
C# Style Guide
- Use C# 8.0+ features where appropriate
- Follow Microsoft's C# Coding Conventions
- Use meaningful variable and method names
- Add XML documentation comments for public APIs
Naming Conventions
| Type | Convention | Example |
|---|---|---|
| Classes | PascalCase | LODGeneratorCore |
| Methods | PascalCase | GenerateLODGroup |
| Properties | PascalCase | VertexCount |
| Private fields | _camelCase | _selectedObjects |
| Local variables | camelCase | meshFilter |
| Constants | PascalCase | MaxLODLevels |
Code Organization
// 1. Using statements
using UnityEngine;
// 2. Namespace
namespace Plugins.AutoLODGenerator.Editor
{
// 3. XML documentation
/// <summary>
/// Brief description of the class.
/// </summary>
public class MyClass
{
// 4. Constants
private const int MaxValue = 100;
// 5. Private fields
private int _myField;
// 6. Properties
public int MyProperty { get; set; }
// 7. Unity lifecycle methods
private void OnEnable() { }
// 8. Public methods
public void PublicMethod() { }
// 9. Private methods
private void PrivateMethod() { }
}
}
Best Practices
- Keep methods short and focused (< 30 lines ideally)
- Use early returns to reduce nesting
- Handle errors gracefully with try-catch where appropriate
- Register undo operations for editor changes
- Validate input parameters
Submitting Changes
Branch Naming
feature/description- For new featuresfix/description- For bug fixesdocs/description- For documentation changesrefactor/description- For code refactoring
Commit Messages
Write clear, concise commit messages:
Short summary (50 chars or less)
More detailed explanation if needed. Wrap at 72 characters.
Explain the problem this commit solves and why.
- Bullet points are okay
- Use present tense ("Add feature" not "Added feature")
Pull Request Process
- Update the CHANGELOG.md with your changes
- Ensure all tests pass
- Update documentation if needed
- Request review from maintainers
- Address any feedback
- Squash commits if requested
Releasing
Releases are fully automated with GitHub Actions after changes land on the default branch.
Maintainer flow
- Merge to default branch — A normal push or merged pull request to
maintriggers the Release workflow. - Automatic patch release — The workflow bumps
package.jsonto the next available patch version, prepends aCHANGELOG.mdentry from commits since the previousv*tag, commits the release bump, creates the matching tag, and publishes the GitHub Release. - Skip when needed — Include
[skip release]in the commit message to skip the automatic release workflow for that push. - Optional explicit bump — You can still run Version Bump (Actions → Version Bump → Run workflow) when you need a specific patch/minor/major bump. That workflow creates the bump commit, tag, changelog section, and GitHub Release itself.
Manual v* tag pushes by maintainers still publish releases. Automated tag pushes from release workflows are skipped by the tag-push release job because the originating workflow publishes the release directly.
Automation requires GITHUB_TOKEN to have contents: write and the default branch to allow the workflow token to push the release commit and tag.
Reporting Bugs
When reporting bugs, please include:
- Unity version you're using
- Steps to reproduce the bug
- Expected behavior vs actual behavior
- Error messages from the console
- Screenshots if applicable
- Mesh information (vertex count, type, etc.)
Use the bug report template when creating an issue.
Requesting Features
When requesting features:
- Check if the feature already exists or is planned
- Describe the problem the feature would solve
- Propose a solution
- Consider alternative approaches
- Explain your use case
Use the feature request template when creating an issue.
Questions?
Feel free to open an issue with the question label if you have any questions about contributing.
Thank you for contributing to Auto LOD Generator!