PropertyRefs - Unity Tool for Property Management
About the Project
PropertyRefs is an open-source tool I developed for Unity to simplify and centralize property management across game components. This tool allows developers to set up centralized references to essential properties within a game object or prefab, making it easy to access and modify these properties directly from other scripts. This kind of structure is especially helpful for game and level designers, keeping complex projects organized and reducing the time spent searching for and adjusting properties within components.
The key features of PropertyRefs include both editor integration and code access for centralized properties, as well as robust AOT systems support for platforms like iOS that have limitations with runtime reflection.
Inspiration and Development Journey
The idea for PropertyRefs emerged from a larger initiative called BricksBucket, a collection of scripts and systems aimed at helping developers create games more efficiently. However, I realized that BricksBucket was growing too broad in scope, so I decided to break it down into smaller, focused packages. PropertyRefs was the first standalone project to come out of this restructuring.
While developing PropertyRefs, I focused on making the tool compatible with Ahead-Of-Time (AOT) compilation systems. Since platforms like Android or desktop can often rely on reflection, iOS requires a more precompiled approach. To address this, I integrated a Roslyn Source Generator that automatically creates these references at compile-time, ensuring that PropertyRefs would function smoothly on platforms like iOS without compatibility issues.
Technical Highlights
The development process included setting up continuous integration and deployment (CI/CD) pipelines to streamline updates and releases. Initially, I worked with Bitbucket, but this project involved transitioning to GitHub and implementing GitHub Actions to manage CI/CD. By establishing an automated pipeline, I made it easier to manage versioning, uploads, and upgrades, helping to deliver updates consistently.
Key Features in Detail
-
Editor Integration: PropertyRefs integrates directly with Unity’s editor, using a custom property drawer to display important properties in a centralized location, allowing users to view and adjust them without navigating through multiple settings.
-
Code Access: Properties can also be modified programmatically, providing flexibility and keeping the codebase more manageable.
-
AOT Systems Support: For iOS compatibility, PropertyRefs includes a Roslyn Source Generator to handle property references without runtime reflection, ensuring stable performance across all platforms.
I hope this project serves other developers well by simplifying workflows, reducing boilerplate code, and contributing to more organized, efficient Unity projects. Thank you for checking it out!
Files
Get PropertyRefs
PropertyRefs
Open-source Unity tool that simplifies accessing and managing component properties across Game Objects.
Status | Released |
Category | Tool |
Author | Javier García |
Tags | Open Source, Unity, upm |
Leave a comment
Log in with itch.io to leave a comment.