class Fastlane::Helper::Unity3dHelper

Public Class Methods

default_exe_path() click to toggle source

class methods that you define here become available in your action as `Helper::Unity3dHelper.your_method`

github.com/safu9/fastlane-plugin-unity/blob/main/lib/fastlane/plugin/unity/helper/unity_helper.rb

# File lib/fastlane/plugin/unity3d/helper/unity3d_helper.rb, line 12
def self.default_exe_path
  paths = []

  if OS::Underlying.docker?
    # See: https://gitlab.com/gableroux/unity3d
    paths << "/opt/Unity/Editor/Unity"
  end

  if OS.windows?
    paths << "C:\\Program Files\\Unity\\Editor\\Unity.exe"
  elsif OS.mac?
    paths << "/Applications/Unity/Unity.app/Contents/MacOS/Unity"
    paths += Dir[File.join('Applications', '**', 'Unity.app', 'Contents', 'MacOS', 'Unity')]
  elsif OS.linux?
    paths << "~/Unity/Editor/Unity"
  end

  return paths.find { |path| File.exist?(path) }
end