Giter VIP home page Giter VIP logo

openunityproject's Introduction

Windows batch file which invokes appropriate version of Unity.exe without UnityHub.

Prerequisites

  • Windows 10/11
  • pwsh (PowerShell7)
  • Unity 2019 or greater.

Setup

You can set up your Unity project with the following commands:

pushd "\PATH\TO\Your\UnityProject\"
where.exe ProjectSettings:ProjectVersion.txt && curl.exe -JOL https://raw.githubusercontent.com/t-mat/OpenUnityProject/main/OpenUnityProject.cmd
.\OpenUnityProject.cmd

Please note that \PATH\TO\Your\UnityProject\ means the root directory of your Untiy project. The root directory must contains Assets/ etc.

\PATH\TO\Your\UnityProject\
|
+---Assets
|
+---ProjectSettings
|   |
|   +---ProjectVersion.txt
|
+---OpenUnityProject.cmd      <===

Usage

Run the copied version of OpenUnityProject.cmd.

  • You can invoke it via Explorer, Command prompt or PowerShell.

It will read ProjectSettings/ProjectVersion.txt, find appropriate version of Unity.exe and invoke it.

  • Or it reports an error.
  • It tries to avoid to launch UnityHub.

Usage (#2)

If you put OpenUnityProject.cmd to the %PATH%, you can invoke it as a "normal" command.

cd /d C:\Path\To\Your\UnityProject
OpenUnityProject.cmd

Special CLI argument

--open-unity-project-with=XXX

  • You can specify the desired version of unity.exe.
  • For example: OpenUnityProject.cmd --open-unity-project-with=2022.3.19f1

Note about Unity 6

New versioning convention specifies Unity 6 as version 6000. For example, you can invoke Unity 6000.0.0b11 by the following command:

cd /d C:\Path\To\Your\UnityProject
OpenUnityProject.cmd --open-unity-project-with=6000.0.0b11

Clone & Build

pushd "%USERPROFILE%\Documents"
git clone https://github.com/t-mat/OpenUnityProject.git
cd OpenUnityProject

: Edit and build
notepad src\OpenUnityProject.cs
cmd.exe /c .\scripts\build.cmd

: Make sure OpenUnityProject.cmd is updated
dir .\OpenUnityProject.cmd

openunityproject's People

Contributors

t-mat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

babiskir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.