Contributing to LayoutElementDrag
November 22, 2025 · View on GitHub
Thank you for your interest in contributing to LayoutElementDrag! This document provides guidelines and instructions for contributing.
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/LayoutElementDrag.git - Open the project in Unity 2021.3 or later
Development Setup
Requirements
- Unity 2021.3.19f1 or later
- Git
Project Structure
Assets/
├── Scripts/ # Core library scripts
├── Tests/ # Unit tests
├── Prefabs/ # Sample prefabs
└── Scenes/ # Demo scenes
Making Changes
Coding Standards
- Follow C# naming conventions:
PascalCasefor public members and types_camelCasewith underscore prefix for private fieldscamelCasefor local variables and parameters
- Add XML documentation comments to all public members
- Add
[Tooltip]attributes to all[SerializeField]fields - Include error handling with meaningful log messages using the
[ClassName]prefix
Example
/// <summary>
/// Brief description of what this method does.
/// </summary>
/// <param name="paramName">Description of the parameter.</param>
/// <returns>Description of the return value.</returns>
public ReturnType MethodName(ParamType paramName)
{
if (paramName == null)
{
Debug.LogError("[ClassName] paramName cannot be null.");
return default;
}
// Implementation
}
Submitting Changes
Pull Request Process
-
Create a feature branch from
master:git checkout -b feature/your-feature-name -
Make your changes following the coding standards above
-
Test your changes:
- Run the sample scene and verify drag functionality works
- Run unit tests in Unity Test Runner (Window > General > Test Runner)
-
Commit your changes with a clear message:
git commit -m "Add feature: brief description" -
Push to your fork:
git push origin feature/your-feature-name -
Create a Pull Request on GitHub with:
- Clear description of changes
- Screenshots/GIFs for UI changes
- Reference to related issues (if any)
Commit Message Guidelines
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests when relevant
Examples:
Add configurable swap distance thresholdFix pivot calculation for non-centered elementsRefactor ScrollableCardPanel to reduce code duplication
Reporting Issues
When reporting issues, please include:
- Unity version you're using
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots or GIFs if applicable
- Console error messages if any
Feature Requests
Feature requests are welcome! Please:
- Check existing issues to avoid duplicates
- Clearly describe the feature and its use case
- Explain why this feature would benefit the project
Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
Questions?
If you have questions, feel free to:
- Open an issue with the "question" label
- Check existing issues and documentation
Thank you for contributing!