Search Unity

how can we open an Unity project from Nautilus/Caja script (or from command-line)?

Discussion in 'Linux' started by nitrofurano, Jul 14, 2019.

  1. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    (edited post, i found out how to use it)

    Perhaps this Nautilus/Caja script might be useful. The idea is, instead of using that "chaotic" Unity-Hub for opening projects (it indeed becomes really chaotic when we have hundreds of experiences as projects there), we can select a project folder on Nautilus or Caja, and run a Nautilus/Caja script for opening it from the context menu.

    OpenUnityProject.sh:
    Code (Bash):
    1. #!/bin/bash
    2. filesall=""
    3. while [ $# -gt 0 ]
    4.   do
    5.     files=`echo "$1" | sed 's/ /\?/g'`
    6.     filesall="$files $filesall"
    7.     shift
    8.   done
    9. ~/Unity/Hub/Editor/2019.3.0a8/Editor/Unity -projectPath $filesall&
    (doing the same for other file managers, like Thunar, might be as simple as this)
     
    Last edited: Jul 14, 2019