196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
# File 'lib/u3d/commands.rb', line 196
def run(options: {}, run_args: [])
version = options[:unity_version]
runner = Runner.new
args_pp = Runner.find_projectpath_in_args(run_args)
pp = args_pp
pp ||= Dir.pwd
up = UnityProject.new(pp)
unless version version = up.editor_version if up.exist?
UI.user_error!('Not sure which version of Unity to run. Are you in a Unity5 or later project?') unless version
end
if up.exist? && args_pp.nil?
= ['-projectPath', up.path]
run_args = [, run_args].flatten
end
unity = check_unity_presence(version: version)
UI.user_error! "Unity version '#{version}' not found" unless unity
runner.run(unity, run_args, raw_logs: options[:raw_logs])
end
|