Repository Workflow: Getting Started

Getting Started

In order to get started working with Unreal Plugin development you must first understand and execute the necessary steps to creating and managing your plugin's repository.

Understanding Plugin Based Workflow

Plugin-based workflow refers to a software development approach where the functionality of an application is extended and customized through the use of plugins or modules. In this workflow, the core application provides a framework or platform that allows developers to create and integrate their own plugins, which enhance or modify the application's capabilities.

Some plugins even extend off of or require other plugins. These dependencies are important to note because of a problem known as cyclical dependencies. Cyclical dependencies occur when two plugins depend on one another, causing errors. Instead, plugins should be created with a left to right structure where plugins in the right of the framework integrate plugins that are connected to the left of them. This structure is documented to show where each plugin integrates in a the larger project, all of which eventually funnel into the main repository where final integration occurs. Plugins may integrate several other plugins as dependencies while being a dependency itself. It is vital to update documentation referencing how a plugin is integrated for this reason. By following this framework, this ensures dependencies are managed efficiently.

Team Compliance

Plugin Based Development requires a certain work flow in order to operate efficiently. Communication and coordination is key in keeping projects moving smoothly.

When beginning to create your plugin package, you first should get permission from the appropriate leadership if necessary. This is important since new plugins need to be properly documented with dependencies in mind.

After having receiving authorization and worked out necessary documentation details, such as the Scripting Define Symbol or the UPlugin Friendly Name, you can begin creating your plugin repository.

What is a Template Repository?

A GitHub template repository is a special type of repository on the GitHub platform that serves as a starting point for creating new repositories. It allows you to define a repository with a pre-configured structure, files, and content that can be easily duplicated and used as a foundation for similar projects.

GitHub template repositories are particularly useful in scenarios where you want to establish a standardized structure or workflow, or when you want to make it easy for others to contribute to your projects by providing them with a consistent starting point. It saves time by eliminating the need to recreate the same setup and promotes consistency across plugins.

Using Template Repositories

When creating a repository from a template you must first

  1. Open your web browser and go to the GitHub website at https://github.com and log in to your GitHub account.

  2. Once you're logged in, navigate to the repository template you want to copy. You can search for the repository or directly access it if you have the URL. The following unreal repositories templates have been created for plugins developing code assets and plugins developing general assets: • Assets Plugin Template

    • Code + Assets Plugin Template

  3. On the repository template page, you'll see a green button labeled "Use this template." Click on it.

  4. After clicking the button, you'll be redirected to a new page where you can create a new repository based on the template.

  5. On the "Create a new repository" page, you'll see the template repository name and a field to enter the new repository name. Provide a name for your new repository and add a proper description and visibility (public or private) setting. If you are working with an organization that requires you to set them as the owner of the repo you can assign them as the owner to the left of the repository name.

  6. Once you've entered the required information, click the "Create repository from template" button to finish making the repository..

  7. GitHub will create a new repository in your account using the template. It will include all the files, directories, and commit history from the template repository.

Cloning a Repository to your Local Computer

  1. Launch GitHub Desktop: After the installation is complete, launch GitHub Desktop on your computer.

  2. Sign in to your GitHub account: When you launch GitHub Desktop for the first time, you'll be prompted to sign in to your GitHub account. Enter your GitHub username and password to sign in.

  3. Locate the repository to clone: Once you're signed in, you can either clone a repository from the GitHub.com website or from your GitHub desktop client.

  4. To clone a repository from the GitHub Desktop application, click on the "File" menu and select "Clone Repository". This will open a dialog where you can browse and select repositories from your GitHub account by clicking on it. Cloning on github.com is as simple as opening the repository on a browser, selecting the green code button, and then finally selecting Open with GitHub Desktop

  5. Choose the clone destination: After selecting the repository, you'll need to specify the local directory where you want to clone the repository. Choose a suitable directory on your computer to store the cloned repository such as a work or documents folder.

  6. Clone the repository: Once you've selected the repository and the clone destination, click on the "Clone" button. GitHub Desktop will initiate the cloning process, downloading the repository from GitHub.com to your local machine.

  7. Open the cloned repository: After the cloning process is complete, the repository will appear in your GitHub Desktop application. You can click on the repository to open it and start working with the files.

Initializing Git LFS

  1. In order to fully initialize Git LFS make sure you have installed Git, GitHub Desktop, and Git LFS Git: https://git-scm.com/download/win GitHub Desktop: https://desktop.github.com/ Git LFS: https://git-lfs.com/

  2. Find your unreal project folder and right click it to open the context menu. Select the Git Bash Here option. This opens a git command line application for the selected unreal project.

  3. Enter the following command to install Git LFS:

    git lfs install

The message Updated git hooks. Git LFS initialized. should appear to verify the process was successful. You may now close the Git Command Line application.

  1. Find the .gitattributes text file in your project root folder.

  2. Edit the .gitattributes text file to contain the following text:

    # Auto detect text files and perform LF normalization
    * text=auto
    
    # Content types
    *.uasset filter=lfs diff=lfs merge=lfs -text
    *.umap filter=lfs diff=lfs merge=lfs -text
    *.fbx filter=lfs diff=lfs merge=lfs -text
    *.3ds filter=lfs diff=lfs merge=lfs -text
    *.psd filter=lfs diff=lfs merge=lfs -text
    *.png filter=lfs diff=lfs merge=lfs -text
    *.mp3 filter=lfs diff=lfs merge=lfs -text
    *.wav filter=lfs diff=lfs merge=lfs -text
    *.xcf filter=lfs diff=lfs merge=lfs -text
    *.jpg filter=lfs diff=lfs merge=lfs -text
  3. Open GitHub Desktop and view your repository. You should now see the change to your git attributes as well as any other changes displayed under the changed files tab. Create a name for your commit under the summary and add a description before hitting the commit button below.

  4. Select the Push Origin button on the top right to push your commit and upload your commit to the online repository. Developers are now free to start development on their plugin in this new repository by creating the necessary branches, content, and settings!

Note: While developers are able to construct their plugins how they deem necessary thought should be placed in how these plugins will be integrated into the larger projects during development.

Ready For Integration: Final Steps

During development eventually there will come a time for when your plugin is ready for integration. Depending on the size of your team this responsibility could be regulated to individual team members, team leads, or someone running developer operations.

After reaching out and verifying who you need to contact, notify them that your plugin is ready for integration by making sure files are ready for exporting. This process may be team specific and should be discussed with leadership if necessary. Assuming no problems occur, integration of your Plugin is now complete! You may continue working on your plugin, repeating this process!

Last updated